mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 13:19:05 +00:00
LibJS/JIT: Resolve the GetGlobal identifier at JIT time
This commit is contained in:
parent
c92954db36
commit
234ed2d466
Notes:
sideshowbarker
2024-07-17 17:49:11 +09:00
Author: https://github.com/awesomekling
Commit: 234ed2d466
Pull-request: https://github.com/SerenityOS/serenity/pull/21817
4 changed files with 12 additions and 13 deletions
|
@ -952,7 +952,7 @@ void Compiler::compile_get_by_value(Bytecode::Op::GetByValue const& op)
|
|||
check_exception();
|
||||
}
|
||||
|
||||
static Value cxx_get_global(VM& vm, Bytecode::IdentifierTableIndex identifier, u32 cache_index)
|
||||
static Value cxx_get_global(VM& vm, DeprecatedFlyString const& identifier, u32 cache_index)
|
||||
{
|
||||
return TRY_OR_SET_EXCEPTION(Bytecode::get_global(vm.bytecode_interpreter(), identifier, cache_index));
|
||||
}
|
||||
|
@ -961,7 +961,7 @@ void Compiler::compile_get_global(Bytecode::Op::GetGlobal const& op)
|
|||
{
|
||||
m_assembler.mov(
|
||||
Assembler::Operand::Register(ARG1),
|
||||
Assembler::Operand::Imm(op.identifier().value()));
|
||||
Assembler::Operand::Imm(bit_cast<u64>(&m_bytecode_executable.get_identifier(op.identifier()))));
|
||||
m_assembler.mov(
|
||||
Assembler::Operand::Register(ARG2),
|
||||
Assembler::Operand::Imm(op.cache_index()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue