mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 10:48:41 +00:00
LibJS/JIT: Compile the DeleteById instruction
This commit is contained in:
committed by
Andreas Kling
parent
0104225d9b
commit
f5fcd4596c
@@ -624,4 +624,15 @@ ThrowCompletionOr<void> append(VM& vm, Value lhs, Value rhs, bool is_spread)
|
||||
return {};
|
||||
}
|
||||
|
||||
ThrowCompletionOr<Value> delete_by_id(Bytecode::Interpreter& interpreter, Value base, IdentifierTableIndex property)
|
||||
{
|
||||
auto& vm = interpreter.vm();
|
||||
|
||||
auto const& identifier = interpreter.current_executable().get_identifier(property);
|
||||
bool strict = vm.in_strict_mode();
|
||||
auto reference = Reference { base, identifier, {}, strict };
|
||||
|
||||
return TRY(reference.delete_(vm));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user