Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
if (isConst(reference)) {
if (reference.value()) {
vm.goto(target);
}
} else {
let cache = new ReferenceCache(reference);
if (cache.peek()) {
vm.goto(target);
}
vm.updateWith(new Assert(cache));
}
});
APPEND_OPCODES.add(Op.JumpUnless, (vm, { op1: target }) => {
let reference = check(vm.stack.pop(), CheckReference);
if (isConst(reference)) {
if (!reference.value()) {
vm.goto(target);
}
} else {
let cache = new ReferenceCache(reference);
if (!cache.peek()) {
vm.goto(target);
}
vm.updateWith(new Assert(cache));
}
});
}
} else {
let cache = new ReferenceCache(reference);
if (cache.peek()) {
vm.goto(target);
}
vm.updateWith(new Assert(cache));
}
},
OpcodeKind.Mut
);
APPEND_OPCODES.add(
Op.JumpUnless,
(vm, { op1: target }) => {
let reference = check(vm.stack.pop(), CheckReference);
if (isConst(reference)) {
if (!reference.value()) {
vm.goto(target);
}
} else {
let cache = new ReferenceCache(reference);
if (!cache.peek()) {
vm.goto(target);
}
vm.updateWith(new Assert(cache));
}