LibJS: More properly implement scoping rules in bytecode codegen

Now we emit CreateVariable and SetVariable with the appropriate
initialization/environment modes, much closer to the spec.
This makes a whole lot of things like let/const variables, function
and variable hoisting and some other things work :^)
This commit is contained in:
Ali Mohammad Pur 2022-02-12 19:48:45 +03:30 committed by Linus Groh
commit 1bbfaf8627
Notes: sideshowbarker 2024-07-17 18:55:09 +09:00
12 changed files with 503 additions and 38 deletions

View file

@ -20,6 +20,8 @@
O(ConcatString) \
O(ContinuePendingUnwind) \
O(CopyObjectExcludingProperties) \
O(CreateEnvironment) \
O(CreateVariable) \
O(Decrement) \
O(Div) \
O(EnterUnwindContext) \
@ -42,6 +44,7 @@
O(JumpConditional) \
O(JumpNullish) \
O(JumpUndefined) \
O(LeaveEnvironment) \
O(LeaveUnwindContext) \
O(LeftShift) \
O(LessThan) \