LibJS: Let bytecode instructions know whether they are in strict mode

This commits puts the strict mode flag in the header of every bytecode
instruction. This allows us to check for strict mode without looking at
the currently running execution context.
This commit is contained in:
Andreas Kling
2025-10-28 20:25:12 +01:00
committed by Andreas Kling
parent 3fb678b376
commit fb05063dde
Notes: github-actions[bot] 2025-10-29 20:22:27 +00:00
16 changed files with 183 additions and 227 deletions

View File

@@ -766,7 +766,7 @@ static ErrorOr<int> run_repl(bool gc_on_every_allocation, bool syntax_highlight)
switch (mode) {
case CompleteProperty: {
auto reference_or_error = g_vm->resolve_binding(variable_name, &global_environment);
auto reference_or_error = g_vm->resolve_binding(variable_name, JS::Strict::No, &global_environment);
if (reference_or_error.is_error())
return {};
auto value_or_error = reference_or_error.value().get_value(*g_vm);