diff --git a/Userland/Libraries/LibJS/JIT/Compiler.cpp b/Userland/Libraries/LibJS/JIT/Compiler.cpp index 24ca3d7aeb..aa756f4702 100644 --- a/Userland/Libraries/LibJS/JIT/Compiler.cpp +++ b/Userland/Libraries/LibJS/JIT/Compiler.cpp @@ -1541,6 +1541,17 @@ void Compiler::compile_import_call(Bytecode::Op::ImportCall const& op) check_exception(); } +static Value cxx_get_import_meta(VM& vm) +{ + return vm.get_import_meta(); +} + +void Compiler::compile_get_import_meta(Bytecode::Op::GetImportMeta const&) +{ + native_call((void*)cxx_get_import_meta); + store_vm_register(Bytecode::Register::accumulator(), RET); +} + void Compiler::jump_to_exit() { m_assembler.jump(m_exit_label); diff --git a/Userland/Libraries/LibJS/JIT/Compiler.h b/Userland/Libraries/LibJS/JIT/Compiler.h index 0db7cffc54..e6d385a5e1 100644 --- a/Userland/Libraries/LibJS/JIT/Compiler.h +++ b/Userland/Libraries/LibJS/JIT/Compiler.h @@ -127,7 +127,8 @@ private: O(DeleteByIdWithThis, delete_by_id_with_this) \ O(PutByIdWithThis, put_by_id_with_this) \ O(PutPrivateById, put_private_by_id) \ - O(ImportCall, import_call) + O(ImportCall, import_call) \ + O(GetImportMeta, get_import_meta) # define DECLARE_COMPILE_OP(OpTitleCase, op_snake_case) \ void compile_##op_snake_case(Bytecode::Op::OpTitleCase const&);