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

LibJS/JIT: Compile the GetObjectPropertyIterator instruction

This commit is contained in:
Simon Wanner 2023-10-29 21:18:16 +01:00 committed by Andreas Kling
parent ad81bf47bb
commit 4ce2878394
2 changed files with 17 additions and 1 deletions

View file

@ -1,5 +1,6 @@
/*
* Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
* Copyright (c) 2023, Simon Wanner <simon@skyrising.xyz>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -1381,6 +1382,19 @@ void Compiler::compile_delete_by_value_with_this(Bytecode::Op::DeleteByValueWith
check_exception();
}
static Value cxx_get_object_property_iterator(VM& vm, Value object)
{
return TRY_OR_SET_EXCEPTION(Bytecode::get_object_property_iterator(vm, object));
}
void Compiler::compile_get_object_property_iterator(Bytecode::Op::GetObjectPropertyIterator const&)
{
load_vm_register(ARG1, Bytecode::Register::accumulator());
native_call((void*)cxx_get_object_property_iterator);
store_vm_register(Bytecode::Register::accumulator(), RET);
check_exception();
}
void Compiler::jump_to_exit()
{
m_assembler.jump(m_exit_label);