Exemple #1
0
        internal virtual void AddBranch(Opcode opcode)
        {
            Fx.Assert(null != opcode, "");
            // Replace what follows this opcode with a branch containing .next and the new opcode
            // If this opcode is a conditional, then since the tree structure is about to change, conditional
            // reachability for everything that follows is about to change.
            // 1. Remove .next from the conditional's AlwaysBranch Table.
            // 2. Create the new branch structure.
            // 3. The branch, once in the tree, will fix up all conditional jumps
            Opcode next = this.next;

            if (this.TestFlag(OpcodeFlags.InConditional))
            {
                this.DelinkFromConditional(next);
            }

            BranchOpcode branch = new BranchOpcode();

            this.next = null;
            this.Attach(branch);

            if (null != next)
            {
                Fx.Assert(OpcodeID.Branch != next.ID, "");
                branch.Add(next);
            }
            branch.Add(opcode);
        }
 internal virtual void AddBranch(Opcode opcode)
 {
     Opcode next = this.next;
     if (this.TestFlag(OpcodeFlags.InConditional))
     {
         this.DelinkFromConditional(next);
     }
     BranchOpcode op = new BranchOpcode();
     this.next = null;
     this.Attach(op);
     if (next != null)
     {
         op.Add(next);
     }
     op.Add(opcode);
 }
        internal virtual void AddBranch(Opcode opcode)
        {
            Opcode next = this.next;

            if (this.TestFlag(OpcodeFlags.InConditional))
            {
                this.DelinkFromConditional(next);
            }
            BranchOpcode op = new BranchOpcode();

            this.next = null;
            this.Attach(op);
            if (next != null)
            {
                op.Add(next);
            }
            op.Add(opcode);
        }
        internal virtual void AddBranch(Opcode opcode)
        {
            Fx.Assert(null != opcode, "");
            // Replace what follows this opcode with a branch containing .next and the new opcode
            // If this opcode is a conditional, then since the tree structure is about to change, conditional
            // reachability for everything that follows is about to change.
            // 1. Remove .next from the conditional's AlwaysBranch Table.
            // 2. Create the new branch structure.
            // 3. The branch, once in the tree, will fix up all conditional jumps
            Opcode next = this.next;
            if (this.TestFlag(OpcodeFlags.InConditional))
            {
                this.DelinkFromConditional(next);
            }

            BranchOpcode branch = new BranchOpcode();
            this.next = null;
            this.Attach(branch);

            if (null != next)
            {
                Fx.Assert(OpcodeID.Branch != next.ID, "");
                branch.Add(next);
            }
            branch.Add(opcode);
        }