1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:08:10 +00:00

LibJS/JIT: Add fastpath for set variable

This commit is contained in:
Stephan Vedder 2023-11-16 07:13:35 +01:00 committed by Andreas Kling
parent b3cbe0fdb9
commit 84eecbb10e
8 changed files with 148 additions and 12 deletions

View file

@ -414,7 +414,7 @@ void Generator::emit_set_variable(JS::Identifier const& identifier, Bytecode::Op
if (identifier.is_local()) {
emit<Bytecode::Op::SetLocal>(identifier.local_variable_index());
} else {
emit<Bytecode::Op::SetVariable>(intern_identifier(identifier.string()), initialization_mode, mode);
emit<Bytecode::Op::SetVariable>(intern_identifier(identifier.string()), next_environment_variable_cache(), initialization_mode, mode);
}
}