mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-04-05 04:06:08 +00:00
LibJS/Bytecode: Defer GetGlobal identifier lookup until cache misses
This way we avoid looking up the identifier when the cache hits.
This commit is contained in:
@@ -1264,7 +1264,7 @@ ThrowCompletionOr<void> GetCalleeAndThisFromEnvironment::execute_impl(Bytecode::
|
||||
|
||||
ThrowCompletionOr<void> GetGlobal::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
{
|
||||
interpreter.set(dst(), TRY(get_global(interpreter, interpreter.current_executable().get_identifier(m_identifier), interpreter.current_executable().global_variable_caches[m_cache_index])));
|
||||
interpreter.set(dst(), TRY(get_global(interpreter, m_identifier, interpreter.current_executable().global_variable_caches[m_cache_index])));
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user