diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-06-01 09:35:20 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-06-04 13:02:39 +0000 |
commit | 0fac88c7ed7bafccd4c89fa952460c921bca85f0 (patch) | |
tree | edf7d9873110a6a2c857b90d6616148b0835b2ad /src/qml/compiler/qv4compilercontrolflow_p.h | |
parent | 8d69977ab1f7f2d5eb8a0ce518071afe6a62894f (diff) |
Rename SetExceptionHandler to SetUnwindHandler
It's being used for more than just exception handling,
unwinding for return or break/continue statements also
goes through those handlers.
Change-Id: I145c7909540a1adca431de6a98d9c115ddf23612
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compilercontrolflow_p.h')
-rw-r--r-- | src/qml/compiler/qv4compilercontrolflow_p.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/qml/compiler/qv4compilercontrolflow_p.h b/src/qml/compiler/qv4compilercontrolflow_p.h index db109533eb..b6c207e68c 100644 --- a/src/qml/compiler/qv4compilercontrolflow_p.h +++ b/src/qml/compiler/qv4compilercontrolflow_p.h @@ -310,14 +310,14 @@ struct ControlFlowWith : public ControlFlowUnwind // assumes the with object is in the accumulator Instruction::PushWithContext pushScope; generator()->addInstruction(pushScope); - generator()->setExceptionHandler(&unwindLabel); + generator()->setUnwindHandler(&unwindLabel); } virtual ~ControlFlowWith() { // emit code for unwinding unwindLabel.link(); - generator()->setExceptionHandler(parentExceptionHandler()); + generator()->setUnwindHandler(parentExceptionHandler()); Instruction::PopContext pop; generator()->addInstruction(pop); @@ -335,7 +335,7 @@ struct ControlFlowBlock : public ControlFlowUnwind if (block->requiresExecutionContext) { setupExceptionHandler(); - generator()->setExceptionHandler(&unwindLabel); + generator()->setUnwindHandler(&unwindLabel); } } @@ -343,7 +343,7 @@ struct ControlFlowBlock : public ControlFlowUnwind // emit code for unwinding if (block->requiresExecutionContext ) { unwindLabel.link(); - generator()->setExceptionHandler(parentExceptionHandler()); + generator()->setUnwindHandler(parentExceptionHandler()); } block->emitBlockFooter(cg); @@ -375,7 +375,7 @@ struct ControlFlowCatch : public ControlFlowUnwind catchUnwindLabel(generator()->newExceptionHandler()) { setupExceptionHandler(); - generator()->setExceptionHandler(&exceptionLabel); + generator()->setUnwindHandler(&exceptionLabel); } virtual Handler getHandler(HandlerType type, const QString &label = QString()) { @@ -413,7 +413,7 @@ struct ControlFlowCatch : public ControlFlowUnwind // clear the unwind temp for exceptions, we want to resume normal code flow afterwards Reference::storeConstOnStack(cg, QV4::Encode::undefined(), controlFlowTemp); - generator()->setExceptionHandler(&catchUnwindLabel); + generator()->setUnwindHandler(&catchUnwindLabel); if (catchExpression->patternElement->bindingIdentifier.isEmpty()) // destructuring pattern @@ -431,7 +431,7 @@ struct ControlFlowCatch : public ControlFlowUnwind // break/continue/return statements in try go here unwindLabel.link(); - generator()->setExceptionHandler(parentExceptionHandler()); + generator()->setUnwindHandler(parentExceptionHandler()); emitUnwindHandler(); } @@ -448,7 +448,7 @@ struct ControlFlowFinally : public ControlFlowUnwind { Q_ASSERT(finally != nullptr); setupExceptionHandler(); - generator()->setExceptionHandler(&unwindLabel); + generator()->setUnwindHandler(&unwindLabel); } virtual Handler getHandler(HandlerType type, const QString &label = QString()) { @@ -480,7 +480,7 @@ struct ControlFlowFinally : public ControlFlowUnwind generator()->addInstruction(instr); Reference::fromStackSlot(cg, exceptionTemp).storeConsumeAccumulator(); - generator()->setExceptionHandler(parentExceptionHandler()); + generator()->setUnwindHandler(parentExceptionHandler()); cg->statement(finally->statement); insideFinally = false; |