mirror of
https://github.com/RGBCube/serenity
synced 2025-05-24 01:15:07 +00:00
LibJS: Split the per-call-frame environment into lexical and variable
To better follow the spec, we need to distinguish between the current execution context's lexical environment and variable environment. This patch moves us to having two record pointers, although both of them point at the same environment records for now.
This commit is contained in:
parent
aabd82d508
commit
1d20380859
13 changed files with 52 additions and 41 deletions
|
@ -48,7 +48,7 @@ Value Interpreter::run(Executable const& executable, BasicBlock const* entry_poi
|
|||
global_call_frame.this_value = &global_object();
|
||||
static FlyString global_execution_context_name = "(*BC* global execution context)";
|
||||
global_call_frame.function_name = global_execution_context_name;
|
||||
global_call_frame.environment_record = &global_object();
|
||||
global_call_frame.lexical_environment = &global_object();
|
||||
VERIFY(!vm().exception());
|
||||
// FIXME: How do we know if we're in strict mode? Maybe the Bytecode::Block should know this?
|
||||
// global_call_frame.is_strict_mode = ???;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue