1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-30 21:48:11 +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

@ -780,7 +780,12 @@ ThrowCompletionOr<void> SetVariable::execute_impl(Bytecode::Interpreter& interpr
{
auto& vm = interpreter.vm();
auto const& name = interpreter.current_executable().get_identifier(m_identifier);
TRY(set_variable(vm, name, interpreter.accumulator(), m_mode, m_initialization_mode));
TRY(set_variable(vm,
name,
interpreter.accumulator(),
m_mode,
m_initialization_mode,
interpreter.current_executable().environment_variable_caches[m_cache_index]));
return {};
}