mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-25 17:25:08 +02:00
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:
committed by
Andreas Kling
parent
3fb678b376
commit
fb05063dde
Notes:
github-actions[bot]
2025-10-29 20:22:27 +00:00
Author: https://github.com/awesomekling Commit: https://github.com/LadybirdBrowser/ladybird/commit/fb05063dde0 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6629
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user