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:
parent
19045d6431
commit
712c89dacf
2 changed files with 13 additions and 1 deletions
|
@ -1585,6 +1585,17 @@ void Compiler::compile_get_method(Bytecode::Op::GetMethod const& op)
|
||||||
check_exception();
|
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()
|
void Compiler::jump_to_exit()
|
||||||
{
|
{
|
||||||
m_assembler.jump(m_exit_label);
|
m_assembler.jump(m_exit_label);
|
||||||
|
|
|
@ -130,7 +130,8 @@ private:
|
||||||
O(ImportCall, import_call) \
|
O(ImportCall, import_call) \
|
||||||
O(GetImportMeta, get_import_meta) \
|
O(GetImportMeta, get_import_meta) \
|
||||||
O(DeleteVariable, delete_variable) \
|
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) \
|
# define DECLARE_COMPILE_OP(OpTitleCase, op_snake_case) \
|
||||||
void compile_##op_snake_case(Bytecode::Op::OpTitleCase const&);
|
void compile_##op_snake_case(Bytecode::Op::OpTitleCase const&);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue