mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00:00
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:
committed by
Alexander Kalenik
parent
353e635535
commit
01ec56f1ed
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user