mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 13:02:09 +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
@@ -25,7 +25,7 @@ Executable::Executable(
|
||||
size_t number_of_property_lookup_caches,
|
||||
size_t number_of_global_variable_caches,
|
||||
size_t number_of_registers,
|
||||
bool is_strict_mode)
|
||||
Strict strict)
|
||||
: bytecode(move(bytecode))
|
||||
, string_table(move(string_table))
|
||||
, identifier_table(move(identifier_table))
|
||||
@@ -33,7 +33,7 @@ Executable::Executable(
|
||||
, constants(move(constants))
|
||||
, source_code(move(source_code))
|
||||
, number_of_registers(number_of_registers)
|
||||
, is_strict_mode(is_strict_mode)
|
||||
, is_strict_mode(strict == Strict::Yes)
|
||||
{
|
||||
property_lookup_caches.resize(number_of_property_lookup_caches);
|
||||
global_variable_caches.resize(number_of_global_variable_caches);
|
||||
|
||||
Reference in New Issue
Block a user