1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 16:57:34 +00:00

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
parent c7e6b65fd2
commit 1bbfaf8627
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 };
};