LibJS: Generate bytecode for entering nested lexical environments

This adds a new PushLexicalEnvironment instruction that creates a new
LexicalEnvironment and pushes it on the VM's scope stack.

There is no corresponding PopLexicalEnvironment instruction yet,
so this will behave incorrectly with let/const scopes for example.
This commit is contained in:
Andreas Kling 2021-06-10 22:12:21 +02:00
commit c3c68399b5
Notes: sideshowbarker 2024-07-18 12:28:40 +09:00
4 changed files with 92 additions and 1 deletions

View file

@ -58,6 +58,7 @@
O(Increment) \
O(Decrement) \
O(Throw) \
O(PushLexicalEnvironment) \
O(EnterUnwindContext) \
O(LeaveUnwindContext) \
O(ContinuePendingUnwind)