LibJS/Bytecode: Add "raw" property correctly for tagged template literal

We were adding it to the wrong object before. :^)
This commit is contained in:
Andreas Kling
2023-06-15 16:36:14 +02:00
parent 2ac8a4bbb7
commit 0772a23c65

View File

@@ -1935,8 +1935,7 @@ Bytecode::CodeGenerationErrorOr<void> TaggedTemplateLiteral::generate_bytecode(B
auto raw_strings_reg = generator.allocate_register();
generator.emit<Bytecode::Op::Store>(raw_strings_reg);
generator.emit<Bytecode::Op::Load>(strings_reg);
generator.emit<Bytecode::Op::PutById>(raw_strings_reg, generator.intern_identifier("raw"));
generator.emit<Bytecode::Op::PutById>(strings_reg, generator.intern_identifier("raw"));
generator.emit<Bytecode::Op::LoadImmediate>(js_undefined());
auto this_reg = generator.allocate_register();