1
Fork 0
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:
Jakub Berkop 2023-10-29 21:37:52 +01:00 committed by Andreas Kling
parent 0776404e03
commit 6a7b9b85a4
6 changed files with 35 additions and 8 deletions

View file

@ -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)));
}
}