Example #1
0
 // This is a dummy stack frame
 public StackFrame(Procedure proc)
 {
     Locals                  = new SimpleVariableStore();
     InternalOldGlobals      = null;
     this.Proc               = proc;
     this.Impl               = null;
     this.CurrentInstruction = null;
 }
Example #2
0
        public void TransferToBlock(Block BB)
        {
            // Update GotoCmd stats
            if (CurrentInstruction != null)
            {
                var gotoCmd = CurrentInstruction.Current as GotoCmd;
                Debug.Assert(gotoCmd != null, "Expected GotoCmd at current instruction");
                (gotoCmd.GetInstructionStatistics() as GotoInstructionStatistics).IncrementJumpTo(BB);
            }

            // Check if BB is in procedure
            Debug.Assert(Impl.Blocks.Contains(BB));

            CurrentBlock       = BB;
            CurrentInstruction = new BlockCmdEnumerator(CurrentBlock);
        }