bridgeCall method
Run the VM in a 'sub-state' of a parent invocation of the VM. Used for bridge calls. For performance reasons, avoid making excessive use of this pattern, despite its convenience
Implementation
void bridgeCall(int $offset) {
final _savedOffset = _prOffset;
_prOffset = $offset;
callStack.add(-1);
catchStack.add([]);
try {
while (true) {
final op = pr[_prOffset++];
op.run(this);
}
} on ProgramExit catch (_) {
_prOffset = _savedOffset;
return;
} on RuntimeException catch (_) {
rethrow;
} on WrappedException catch (e) {
throw e.exception;
} catch (e, stk) {
throw RuntimeException(this, e, stk);
}
}