mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 09:47:35 +00:00
LibJS/JIT: Compile the ImportCall instruction
This commit is contained in:
parent
246daa0810
commit
c0c40110c1
3 changed files with 19 additions and 1 deletions
|
@ -1527,6 +1527,20 @@ void Compiler::compile_put_private_by_id(Bytecode::Op::PutPrivateById const& op)
|
|||
check_exception();
|
||||
}
|
||||
|
||||
static Value cxx_import_call(VM& vm, Value specifier, Value options)
|
||||
{
|
||||
return TRY_OR_SET_EXCEPTION(perform_import_call(vm, specifier, options));
|
||||
}
|
||||
|
||||
void Compiler::compile_import_call(Bytecode::Op::ImportCall const& op)
|
||||
{
|
||||
load_vm_register(ARG1, op.specifier());
|
||||
load_vm_register(ARG2, op.options());
|
||||
native_call((void*)cxx_import_call);
|
||||
store_vm_register(Bytecode::Register::accumulator(), RET);
|
||||
check_exception();
|
||||
}
|
||||
|
||||
void Compiler::jump_to_exit()
|
||||
{
|
||||
m_assembler.jump(m_exit_label);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue