diff --git a/Userland/Libraries/LibJS/Bytecode/Generator.h b/Userland/Libraries/LibJS/Bytecode/Generator.h index ed4fa05818..f5dcee15d3 100644 --- a/Userland/Libraries/LibJS/Bytecode/Generator.h +++ b/Userland/Libraries/LibJS/Bytecode/Generator.h @@ -18,10 +18,12 @@ public: Register allocate_register(); template - void emit(Args&&... args) + OpType& emit(Args&&... args) { auto instruction = make(forward(args)...); + auto* ptr = instruction.ptr(); append(move(instruction)); + return *ptr; } private: