diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-10-18 15:42:17 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-29 10:38:45 +0100 |
commit | 5229a8b259286c9ea61036fd6b4bd0039104a206 (patch) | |
tree | 277d62ecedeaf703ce778d86f8cbcb94b9a57fe2 /src/qml/compiler/qv4isel_p.cpp | |
parent | 570686d42176af193b15abfe4b7bc17d831f4cf6 (diff) |
Rework exception handling
Start the work to remove c++ exceptions from our JS
exception handling. Rather rely on engine->hasException.
Check the flag after we return from any runtime call in the
JIT.
Implement new try/catch handling code in qv4codegen and
for the JIT that doesn't rely on exceptions. As an added
bonus, we can remove the Try statement in the IR.
Change-Id: Ic95addd6ae03371c43c47e04cac26afdce23a061
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/compiler/qv4isel_p.cpp')
-rw-r--r-- | src/qml/compiler/qv4isel_p.cpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/qml/compiler/qv4isel_p.cpp b/src/qml/compiler/qv4isel_p.cpp index 483cb8e6f9..7d10230f43 100644 --- a/src/qml/compiler/qv4isel_p.cpp +++ b/src/qml/compiler/qv4isel_p.cpp @@ -266,9 +266,15 @@ void IRDecoder::callBuiltin(V4IR::Call *call, V4IR::Temp *result) callBuiltinThrow(arg); } return; - case V4IR::Name::builtin_finish_try: - callBuiltinFinishTry(); - return; + case V4IR::Name::builtin_rethrow: { + callBuiltinReThrow(); + } return; + + case V4IR::Name::builtin_push_catch_scope: { + V4IR::String *s = call->args->expr->asString(); + Q_ASSERT(s); + callBuiltinPushCatchScope(*s->value); + } return; case V4IR::Name::builtin_foreach_iterator_object: { V4IR::Temp *arg = call->args->expr->asTemp(); |