mirror of
https://github.com/RGBCube/serenity
synced 2025-05-30 22:08:12 +00:00
LibJS/JIT: Compile the DeleteByValueWithThis instruction
This commit is contained in:
parent
0776404e03
commit
6a7b9b85a4
6 changed files with 35 additions and 8 deletions
|
@ -646,4 +646,15 @@ ThrowCompletionOr<Value> delete_by_value(Bytecode::Interpreter& interpreter, Val
|
|||
return Value(TRY(reference.delete_(vm)));
|
||||
}
|
||||
|
||||
ThrowCompletionOr<Value> delete_by_value_with_this(Bytecode::Interpreter& interpreter, Value base, Value property_key_value, Value this_value)
|
||||
{
|
||||
auto& vm = interpreter.vm();
|
||||
|
||||
auto property_key = TRY(property_key_value.to_property_key(vm));
|
||||
bool strict = vm.in_strict_mode();
|
||||
auto reference = Reference { base, property_key, this_value, strict };
|
||||
|
||||
return Value(TRY(reference.delete_(vm)));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue