Skip to content

Commit

Permalink
pop and push instead of popJs and pushJs
Browse files Browse the repository at this point in the history
  • Loading branch information
snewcomer committed Feb 15, 2022
1 parent 78038f1 commit d116bea
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions packages/@glimmer/runtime/lib/compiled/opcodes/expressions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -344,43 +344,43 @@ APPEND_OPCODES.add(Op.NotEqual, (vm) => {
});

APPEND_OPCODES.add(Op.Less, (vm) => {
let lOperand = check(vm.stack.popJs(), CheckReference);
let rOperand = check(vm.stack.popJs(), CheckReference);
let lOperand = check(vm.stack.pop(), CheckReference);
let rOperand = check(vm.stack.pop(), CheckReference);

vm.stack.pushJs(
vm.stack.push(
createComputeRef(() => {
return (valueForRef(lOperand) as any) < (valueForRef(rOperand) as any);
})
);
});

APPEND_OPCODES.add(Op.LessEqual, (vm) => {
let lOperand = check(vm.stack.popJs(), CheckReference);
let rOperand = check(vm.stack.popJs(), CheckReference);
let lOperand = check(vm.stack.pop(), CheckReference);
let rOperand = check(vm.stack.pop(), CheckReference);

vm.stack.pushJs(
vm.stack.push(
createComputeRef(() => {
return (valueForRef(lOperand) as any) <= (valueForRef(rOperand) as any);
})
);
});

APPEND_OPCODES.add(Op.Greater, (vm) => {
let lOperand = check(vm.stack.popJs(), CheckReference);
let rOperand = check(vm.stack.popJs(), CheckReference);
let lOperand = check(vm.stack.pop(), CheckReference);
let rOperand = check(vm.stack.pop(), CheckReference);

vm.stack.pushJs(
vm.stack.push(
createComputeRef(() => {
return (valueForRef(lOperand) as any) > (valueForRef(rOperand) as any);
})
);
});

APPEND_OPCODES.add(Op.GreaterEqual, (vm) => {
let lOperand = check(vm.stack.popJs(), CheckReference);
let rOperand = check(vm.stack.popJs(), CheckReference);
let lOperand = check(vm.stack.pop(), CheckReference);
let rOperand = check(vm.stack.pop(), CheckReference);

vm.stack.pushJs(
vm.stack.push(
createComputeRef(() => {
return (valueForRef(lOperand) as any) >= (valueForRef(rOperand) as any);
})
Expand Down

0 comments on commit d116bea

Please sign in to comment.