diff options
Diffstat (limited to 'src/qml/compiler/qv4codegen.cpp')
| -rw-r--r-- | src/qml/compiler/qv4codegen.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4codegen.cpp b/src/qml/compiler/qv4codegen.cpp index b9d223bab0..68bda2dcd3 100644 --- a/src/qml/compiler/qv4codegen.cpp +++ b/src/qml/compiler/qv4codegen.cpp @@ -1885,12 +1885,13 @@ bool Codegen::visit(RegExpLiteral *ast) if (hasError) return false; - auto r = Reference::fromAccumulator(this); + auto r = Reference::fromStackSlot(this); r.isReadonly = true; _expr.setResult(r); - Instruction::LoadRegExp instr; + Instruction::MoveRegExp instr; instr.regExpId = jsUnitGenerator->registerRegExp(ast); + instr.destReg = r.stackSlot(); bytecodeGenerator->addInstruction(instr); return false; } |
