LibJS/JIT: Resolve the GetCalleeAndThisFromEnvironment cache at JIT time

This commit is contained in:
Andreas Kling 2023-11-10 13:00:36 +01:00
commit 2520c46224
Notes: sideshowbarker 2024-07-17 05:23:40 +09:00
4 changed files with 17 additions and 15 deletions

View file

@ -692,7 +692,10 @@ ThrowCompletionOr<void> GetVariable::execute_impl(Bytecode::Interpreter& interpr
ThrowCompletionOr<void> GetCalleeAndThisFromEnvironment::execute_impl(Bytecode::Interpreter& interpreter) const
{
auto callee_and_this = TRY(get_callee_and_this_from_environment(interpreter, interpreter.current_executable().get_identifier(m_identifier), m_cache_index));
auto callee_and_this = TRY(get_callee_and_this_from_environment(
interpreter,
interpreter.current_executable().get_identifier(m_identifier),
interpreter.current_executable().environment_variable_caches[m_cache_index]));
interpreter.reg(m_callee_reg) = callee_and_this.callee;
interpreter.reg(m_this_reg) = callee_and_this.this_value;
return {};