Skip to content

Commit

Permalink
Fix evaluation stack off-by-one error introduced in #1293
Browse files Browse the repository at this point in the history
Before #1293, the `Load` operation would have popped the helper
definition off of the evalution stack. After the #1293, nothing is
popping it off anymore and that creates problem downstream.

This balances things out by inserting a `Pop(1)` in the original
frame.

I couldn't think of a good way to test this, and this is blocking
Ember beta, so we will merge this now (Ember has a test confirming
this works) and @pzuraq will add a test later.
  • Loading branch information
chancancode committed Apr 22, 2021
1 parent 5c4def2 commit 821b9dc
Showing 1 changed file with 2 additions and 0 deletions.
Expand Up @@ -87,8 +87,10 @@ export function CallDynamic(
op(Op.Fetch, $v0);
append();
op(MachineOp.PopFrame);
op(Op.Pop, 1);
} else {
op(MachineOp.PopFrame);
op(Op.Pop, 1);
op(Op.Fetch, $v0);
}
}
Expand Down

0 comments on commit 821b9dc

Please sign in to comment.