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

@ -29,7 +29,7 @@ private:
ExecutionContext m_execution_context;
ECMAScriptFunctionObject* m_generating_function { nullptr };
Value m_previous_value;
Bytecode::RegisterWindow m_frame;
Optional<Bytecode::RegisterWindow> m_frame;
bool m_done { false };
};