1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 22:17:45 +00:00

LibJS/JIT: Compile the ImportCall instruction

This commit is contained in:
Simon Wanner 2023-10-29 23:41:33 +01:00 committed by Andreas Kling
parent 246daa0810
commit c0c40110c1
3 changed files with 19 additions and 1 deletions

View file

@ -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);