execute method
Start program execution at a specific bytecode offset. Users should use executeLib instead.
Implementation
dynamic execute(int entrypoint) {
_setup();
_prOffset = entrypoint;
try {
callStack.add(-1);
catchStack.add([]);
while (true) {
final op = pr[_prOffset++];
op.run(this);
}
} on ProgramExit catch (_) {
return returnValue;
} on RuntimeException catch (_) {
rethrow;
} on WrappedException catch (e) {
throw e.exception;
} catch (e, stk) {
throw RuntimeException(this, e, stk);
}
}