1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 08:27:45 +00:00

LibJS/JIT: Compile the GetNewTarget instruction

This commit is contained in:
Simon Wanner 2023-10-30 00:16:42 +01:00 committed by Andreas Kling
parent 19045d6431
commit 712c89dacf
2 changed files with 13 additions and 1 deletions

View file

@ -1585,6 +1585,17 @@ void Compiler::compile_get_method(Bytecode::Op::GetMethod const& op)
check_exception();
}
static Value cxx_get_new_target(VM& vm)
{
return vm.get_new_target();
}
void Compiler::compile_get_new_target(Bytecode::Op::GetNewTarget const&)
{
native_call((void*)cxx_get_new_target);
store_vm_register(Bytecode::Register::accumulator(), RET);
}
void Compiler::jump_to_exit()
{
m_assembler.jump(m_exit_label);

View file

@ -130,7 +130,8 @@ private:
O(ImportCall, import_call) \
O(GetImportMeta, get_import_meta) \
O(DeleteVariable, delete_variable) \
O(GetMethod, get_method)
O(GetMethod, get_method) \
O(GetNewTarget, get_new_target)
# define DECLARE_COMPILE_OP(OpTitleCase, op_snake_case) \
void compile_##op_snake_case(Bytecode::Op::OpTitleCase const&);