Exemplo n.º 1
0
            public override void Optimize()
            {
                var fixups    = new List <CodeBlock>();
                var refmap    = new Dictionary <Variable, int>();
                var callsites = new Dictionary <Variable, int>();

                Pass0 p0 = new Pass0(refmap, callsites);

                p0.WalkNode(Root);

                Pass1 p1 = new Pass1(fixups, refmap, callsites);

                p1.WalkNode(Root);

                Pass2 p2 = new Pass2();

                p2.WalkNode(Root);

                foreach (var cb in Distinct(fixups))
                {
                    cb.Bind();
                }

                Root.Bind();
            }
 public override void Optimize()
 {
     Pass0 p0 = new Pass0();
     p0.WalkNode(Root);
     //Pass1 p1 = new Pass1();
     //p1.WalkNode(Root);
     Pass2 p2 = new Pass2(references);
     p2.WalkNode(Root);
     Pass3 p3 = new Pass3(references);
     p3.WalkNode(Root);
 }
Exemplo n.º 3
0
            public override void Optimize()
            {
                Pass0 p0 = new Pass0();

                p0.WalkNode(Root);
                //Pass1 p1 = new Pass1();
                //p1.WalkNode(Root);
                Pass2 p2 = new Pass2(references);

                p2.WalkNode(Root);
                Pass3 p3 = new Pass3(references);

                p3.WalkNode(Root);
            }
Exemplo n.º 4
0
            public override void Optimize()
            {
                var fixups = new List<CodeBlock>();
                var refmap = new Dictionary<Variable, int>();
                var callsites = new Dictionary<Variable, int>();

                Pass0 p0 = new Pass0(refmap, callsites);
                p0.WalkNode(Root);

                Pass1 p1 = new Pass1(fixups, refmap, callsites);
                p1.WalkNode(Root);

                Pass2 p2 = new Pass2();
                p2.WalkNode(Root);

                foreach (var cb in Distinct(fixups))
                {
                  cb.Bind();
                }

                Root.Bind();
            }