From 01ec56f1ed97fd69ce2c98f60c8281d66974a966 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 10 May 2024 13:12:27 +0200 Subject: [PATCH] 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. --- Userland/Libraries/LibJS/Bytecode/Generator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Userland/Libraries/LibJS/Bytecode/Generator.cpp b/Userland/Libraries/LibJS/Bytecode/Generator.cpp index 41fc783ebf7..efa078f9142 100644 --- a/Userland/Libraries/LibJS/Bytecode/Generator.cpp +++ b/Userland/Libraries/LibJS/Bytecode/Generator.cpp @@ -528,7 +528,7 @@ CodeGenerationErrorOr> Generator::emit_delete_reference( if (is(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(dst, *super_reference.base, *super_reference.this_value, *super_reference.referenced_name); } else {