mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-06-03 00:42:54 +00:00
LibJS/JIT: Compile the DeleteById instruction
This commit is contained in:
parent
0104225d9b
commit
f5fcd4596c
Notes:
sideshowbarker
2024-07-17 21:26:19 +09:00
Author: https://github.com/jakubberkop
Commit: f5fcd4596c
Pull-request: https://github.com/SerenityOS/serenity/pull/21680
6 changed files with 33 additions and 6 deletions
|
@ -817,12 +817,8 @@ ThrowCompletionOr<void> PutPrivateById::execute_impl(Bytecode::Interpreter& inte
|
|||
|
||||
ThrowCompletionOr<void> DeleteById::execute_impl(Bytecode::Interpreter& interpreter) const
|
||||
{
|
||||
auto& vm = interpreter.vm();
|
||||
auto base_value = interpreter.accumulator();
|
||||
auto const& identifier = interpreter.current_executable().get_identifier(m_property);
|
||||
bool strict = vm.in_strict_mode();
|
||||
auto reference = Reference { base_value, identifier, {}, strict };
|
||||
interpreter.accumulator() = Value(TRY(reference.delete_(vm)));
|
||||
interpreter.accumulator() = TRY(Bytecode::delete_by_id(interpreter, base_value, m_property));
|
||||
return {};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue