mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-28 18:40:29 +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:
parent
353e635535
commit
01ec56f1ed
Notes:
sideshowbarker
2024-07-17 11:34:34 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/01ec56f1ed Pull-request: https://github.com/SerenityOS/serenity/pull/24276 Reviewed-by: https://github.com/Hendiadyoin1 Reviewed-by: https://github.com/shannonbooth
1 changed files with 1 additions and 1 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue