1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 13:57:35 +00:00

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
parent d560ee118d
commit c3c68399b5
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)