mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 14:37:46 +00:00
LibJS/JIT: Compile the DeleteByValue instruction
This commit is contained in:
parent
f5fcd4596c
commit
0776404e03
6 changed files with 33 additions and 10 deletions
|
@ -1352,6 +1352,20 @@ void Compiler::compile_delete_by_id(Bytecode::Op::DeleteById const& op)
|
|||
check_exception();
|
||||
}
|
||||
|
||||
static Value cxx_delete_by_value(VM& vm, Value base_value, Value property_key_value)
|
||||
{
|
||||
return TRY_OR_SET_EXCEPTION(Bytecode::delete_by_value(vm.bytecode_interpreter(), base_value, property_key_value));
|
||||
}
|
||||
|
||||
void Compiler::compile_delete_by_value(Bytecode::Op::DeleteByValue const& op)
|
||||
{
|
||||
load_vm_register(ARG1, op.base());
|
||||
load_vm_register(ARG2, Bytecode::Register::accumulator());
|
||||
native_call((void*)cxx_delete_by_value);
|
||||
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