LibJS/Bytecode: Fix register being freed too early in delete codegen

It wasn't actually possible for it to get reused incorrectly here, but
let's fix the bug anyway.
This commit is contained in:
Andreas Kling 2024-05-10 13:12:27 +02:00 committed by Alexander Kalenik
parent 353e635535
commit 01ec56f1ed
Notes: sideshowbarker 2024-07-17 11:34:34 +09:00

View file

@ -528,7 +528,7 @@ CodeGenerationErrorOr<Optional<ScopedOperand>> Generator::emit_delete_reference(
if (is<SuperExpression>(expression.object())) {
auto super_reference = TRY(emit_super_reference(expression));
auto dst = Operand(allocate_register());
auto dst = allocate_register();
if (super_reference.referenced_name.has_value()) {
emit<Bytecode::Op::DeleteByValueWithThis>(dst, *super_reference.base, *super_reference.this_value, *super_reference.referenced_name);
} else {