Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
});
APPEND_OPCODES.add(Op.Enter, (vm, { op1: args }) => {
vm.enter(args);
});
APPEND_OPCODES.add(Op.Exit, vm => {
vm.exit();
});
APPEND_OPCODES.add(Op.PushSymbolTable, (vm, { op1: _table }) => {
let stack = vm.stack;
stack.push(vm.constants.getSymbolTable(_table));
});
APPEND_OPCODES.add(Op.CompileBlock, vm => {
let stack = vm.stack;
let block = stack.pop | 0>();
stack.push(block ? block.compile() : null);
check(vm.stack.peek(), CheckOption(CheckNumber));
});
APPEND_OPCODES.add(Op.InvokeVirtual, vm => {
vm.call(check(vm.stack.pop(), CheckHandle));
});
APPEND_OPCODES.add(Op.InvokeStatic, (vm, { op1: handle }) => {
vm.call(handle as Recast);
});
APPEND_OPCODES.add(Op.InvokeYield, vm => {
stack.push(vm[CONSTANTS].getSerializable(_table));
},
OpcodeKind.Mut
);
APPEND_OPCODES.add(
Op.PushBlockScope,
vm => {
let stack = vm.stack;
stack.push(vm.scope);
},
OpcodeKind.Mut
);
APPEND_OPCODES.add(
Op.CompileBlock,
vm => {
let stack = vm.stack;
let block = stack.pop | 0>();
if (block) {
stack.pushSmi(block.compile() as Recast);
} else {
stack.pushNull();
}
check(vm.stack.peek(), CheckOption(CheckNumber));
},
OpcodeKind.Mut
);
APPEND_OPCODES.add(