mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-12-08 06:09:58 +00: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:
parent
3fb678b376
commit
fb05063dde
Notes:
github-actions[bot]
2025-10-29 20:22:27 +00:00
Author: https://github.com/awesomekling
Commit: fb05063dde
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/6629
16 changed files with 183 additions and 227 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue