public override void Execute(CPU cpu) { object functionPointer = cpu.GetValue(Destination); if (functionPointer is int) { int currentPointer = cpu.InstructionPointer; DeltaInstructionPointer = (int)functionPointer - currentPointer; var contextRecord = new SubroutineContext(currentPointer + 1); cpu.PushStack(contextRecord); cpu.MoveStackPointer(-1); } else { var name = functionPointer as string; if (name != null) { string functionName = name; functionName = functionName.Substring(0, functionName.Length - 2); cpu.CallBuiltinFunction(functionName); } } }
public FList <Pair <Tag, Subroutine> > GetOrdinaryEdgeSubroutines(CFGBlock from, CFGBlock to, SubroutineContext context) { Contract.Requires(from != null); Contract.Requires(to != null); throw new NotImplementedException(); }
public void Print(TextWriter tw, ILPrinter <APC> ilPrinter, BlockInfoPrinter <APC> edgePrinter, Func <CFGBlock, IEnumerable <SubroutineContext> > contextLookup, SubroutineContext context) { throw new NotImplementedException(); }
public FList <Pair <string, Subroutine> > GetOrdinaryEdgeSubroutines(CFGBlock from, CFGBlock to, SubroutineContext context) { CallAdaption.Push(this); try { return(this.Subroutine.GetOrdinaryEdgeSubroutines(from, to, context)); } finally { CallAdaption.Pop(this); } }