diff options
author | Erik Verbruggen <erik.verbruggen@digia.com> | 2012-11-15 13:12:55 +0100 |
---|---|---|
committer | Lars Knoll <lars.knoll@digia.com> | 2012-11-15 13:31:33 +0100 |
commit | 559115fc6320ebc1d376da111d92c3f0d262e9d5 (patch) | |
tree | 60f709c0145be926c9df755d40413bdd86983318 /qv4codegen_p.h | |
parent | 68b099b8f8caf0b3df1ca77dd7f2b884f1fea1ed (diff) |
Rethrow the right exception after finally if catch is missing.
Save the (unhandled) exception, because there might be another try block
with a catch in the finally block. Restore it at the end of the finally
block.
The codegen for the finally, which is also needed for the break/continue
trampoline blocks, has moved into a helper method.
Change-Id: Iff28506b92a3749c6a5585fb6d94f3120696e89a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'qv4codegen_p.h')
-rw-r--r-- | qv4codegen_p.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/qv4codegen_p.h b/qv4codegen_p.h index bd8f3f829a..fa84beabe4 100644 --- a/qv4codegen_p.h +++ b/qv4codegen_p.h @@ -188,6 +188,8 @@ protected: AST::SourceElements *body, Mode mode = FunctionCode); int indexOfArgument(const QStringRef &string) const; + void generateFinallyBlock(IR::BasicBlock *finallyBlock, bool exceptionNeedsSaving, AST::Block *ast, int hasException, IR::BasicBlock *after); + void statement(AST::Statement *ast); void statement(AST::ExpressionNode *ast); void condition(AST::ExpressionNode *ast, IR::BasicBlock *iftrue, IR::BasicBlock *iffalse); |