mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 19:29:16 +00:00
LibJS/Bytecode: Determine strict mode on an executable basis
An executable is generated for the top-level script and for each function. Strict mode can only be changed with the first statement of the top-level script and each function, which corresponds directly to Executable.
This commit is contained in:
@@ -57,8 +57,7 @@ Interpreter::ValueAndFrame Interpreter::run_and_return_frame(Executable const& e
|
||||
execution_context.lexical_environment = &m_realm.global_environment();
|
||||
execution_context.variable_environment = &m_realm.global_environment();
|
||||
execution_context.realm = &m_realm;
|
||||
// FIXME: How do we know if we're in strict mode? Maybe the Bytecode::Block should know this?
|
||||
// execution_context.is_strict_mode = ???;
|
||||
execution_context.is_strict_mode = executable.is_strict_mode;
|
||||
vm().push_execution_context(execution_context);
|
||||
pushed_execution_context = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user