mirror of
https://github.com/RGBCube/serenity
synced 2025-06-01 09:18:11 +00:00
LibJS/JIT: Compile the GetImportMeta instruction
This commit is contained in:
parent
c0c40110c1
commit
cd18bc9d55
2 changed files with 13 additions and 1 deletions
|
@ -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);
|
||||
|
|
|
@ -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&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue