mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 15:07:45 +00:00
LibJS/JIT: Compile the IteratorToArray instruction
This commit is contained in:
parent
5179ff5fc9
commit
3dc5c8d28e
2 changed files with 15 additions and 1 deletions
|
@ -1306,6 +1306,19 @@ void Compiler::compile_iterator_close(Bytecode::Op::IteratorClose const& op)
|
|||
check_exception();
|
||||
}
|
||||
|
||||
static Value iterator_to_array(VM& vm, Value iterator)
|
||||
{
|
||||
return TRY_OR_SET_EXCEPTION(Bytecode::iterator_to_array(vm, iterator));
|
||||
}
|
||||
|
||||
void Compiler::compile_iterator_to_array(Bytecode::Op::IteratorToArray const&)
|
||||
{
|
||||
load_vm_register(ARG1, Bytecode::Register::accumulator());
|
||||
native_call((void*)iterator_to_array);
|
||||
store_vm_register(Bytecode::Register::accumulator(), RET);
|
||||
check_exception();
|
||||
}
|
||||
|
||||
void Compiler::jump_to_exit()
|
||||
{
|
||||
m_assembler.jump(m_exit_label);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue