mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 12:18:25 +00:00
LibJS/JIT: Compile the DeleteByValueWithThis instruction
This commit is contained in:
committed by
Andreas Kling
parent
0776404e03
commit
6a7b9b85a4
@@ -1117,16 +1117,12 @@ ThrowCompletionOr<void> DeleteByValue::execute_impl(Bytecode::Interpreter& inter
|
||||
|
||||
ThrowCompletionOr<void> DeleteByValueWithThis::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
{
|
||||
auto& vm = interpreter.vm();
|
||||
|
||||
// NOTE: Get the property key from the accumulator before side effects have a chance to overwrite it.
|
||||
auto property_key_value = interpreter.accumulator();
|
||||
|
||||
auto base_value = interpreter.reg(m_base);
|
||||
auto property_key = TRY(property_key_value.to_property_key(vm));
|
||||
bool strict = vm.in_strict_mode();
|
||||
auto reference = Reference { base_value, property_key, interpreter.reg(m_this_value), strict };
|
||||
interpreter.accumulator() = Value(TRY(reference.delete_(vm)));
|
||||
auto this_value = interpreter.reg(m_this_value);
|
||||
interpreter.accumulator() = TRY(delete_by_value_with_this(interpreter, base_value, property_key_value, this_value));
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user