diff options
Diffstat (limited to 'src/qml/compiler/qv4compilercontrolflow_p.h')
-rw-r--r-- | src/qml/compiler/qv4compilercontrolflow_p.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/qml/compiler/qv4compilercontrolflow_p.h b/src/qml/compiler/qv4compilercontrolflow_p.h index 415a112ec5..1ef290ea56 100644 --- a/src/qml/compiler/qv4compilercontrolflow_p.h +++ b/src/qml/compiler/qv4compilercontrolflow_p.h @@ -389,9 +389,6 @@ struct ControlFlowFinally : public ControlFlowUnwind Codegen::RegisterScope scope(cg); insideFinally = true; - int exceptionTemp = generator()->newRegister(); - Instruction::GetException instr; - generator()->addInstruction(instr); int returnValueTemp = -1; if (cg->requiresReturnValue) { returnValueTemp = generator()->newRegister(); @@ -400,20 +397,22 @@ struct ControlFlowFinally : public ControlFlowUnwind move.destReg = returnValueTemp; generator()->addInstruction(move); } + int exceptionTemp = generator()->newRegister(); + Instruction::GetException instr; + generator()->addInstruction(instr); Reference::fromStackSlot(cg, exceptionTemp).storeConsumeAccumulator(); generator()->setUnwindHandler(parentUnwindHandler()); cg->statement(finally->statement); insideFinally = false; - Reference::fromStackSlot(cg, exceptionTemp).loadInAccumulator(); - if (cg->requiresReturnValue) { Instruction::MoveReg move; move.srcReg = returnValueTemp; move.destReg = cg->_returnAddress; generator()->addInstruction(move); } + Reference::fromStackSlot(cg, exceptionTemp).loadInAccumulator(); Instruction::SetException setException; generator()->addInstruction(setException); |