mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 08:47:34 +00:00
LibJS/JIT: Compile the GetObjectPropertyIterator instruction
This commit is contained in:
parent
ad81bf47bb
commit
4ce2878394
2 changed files with 17 additions and 1 deletions
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
|
* Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
|
||||||
|
* Copyright (c) 2023, Simon Wanner <simon@skyrising.xyz>
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -1381,6 +1382,19 @@ void Compiler::compile_delete_by_value_with_this(Bytecode::Op::DeleteByValueWith
|
||||||
check_exception();
|
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()
|
void Compiler::jump_to_exit()
|
||||||
{
|
{
|
||||||
m_assembler.jump(m_exit_label);
|
m_assembler.jump(m_exit_label);
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
|
* Copyright (c) 2023, Andreas Kling <kling@serenityos.org>
|
||||||
|
* Copyright (c) 2023, Simon Wanner <simon@skyrising.xyz>
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: BSD-2-Clause
|
* SPDX-License-Identifier: BSD-2-Clause
|
||||||
*/
|
*/
|
||||||
|
@ -117,7 +118,8 @@ private:
|
||||||
O(Append, append) \
|
O(Append, append) \
|
||||||
O(DeleteById, delete_by_id) \
|
O(DeleteById, delete_by_id) \
|
||||||
O(DeleteByValue, delete_by_value) \
|
O(DeleteByValue, delete_by_value) \
|
||||||
O(DeleteByValueWithThis, delete_by_value_with_this)
|
O(DeleteByValueWithThis, delete_by_value_with_this) \
|
||||||
|
O(GetObjectPropertyIterator, get_object_property_iterator)
|
||||||
|
|
||||||
# define DECLARE_COMPILE_OP(OpTitleCase, op_snake_case) \
|
# define DECLARE_COMPILE_OP(OpTitleCase, op_snake_case) \
|
||||||
void compile_##op_snake_case(Bytecode::Op::OpTitleCase const&);
|
void compile_##op_snake_case(Bytecode::Op::OpTitleCase const&);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue