public Value Interpret(BytecodeFile file, DebugInfo debug, string argument) { if (file.FindFunction("Main String") != -1) { return Interpret(file, debug, "Main String", new Value(argument)); } else { // no main that takes a string, so look for one with no string return Interpret(file, debug, "Main ()", null); } }
public Value Interpret(BytecodeFile file, DebugInfo debug, string function, Value argument) { mFile = file; mDebug = debug; int functionOffset = file.FindFunction(function); if (argument != null) { // push the argument Push(argument); Push(functionOffset); Call(1, false); } else { Push(functionOffset); Call(0, false); } return Interpret(); }