diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-10-30 14:47:07 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-11-01 23:01:30 +0100 |
commit | b5991ce2a61219bda5a7fa6e33f323158d1eb78b (patch) | |
tree | b7887aab103d993436c22c80d1178ff4984459a3 /src/qml/jsruntime/qv4vme_moth.cpp | |
parent | aff3202b9fdd36ed64f55d658d1e4d066c5259d3 (diff) |
Avoid exception checks after calls to some run-time functions
We know that some run-time functions won't thrown an exception, so this
patch annotates them with a tricked NoThrowContext* instead of
ExecutionContext*, which allows the masm isel to detect calls to them
and avoid generating the exception handling checks after the call.
Change-Id: Ida1c9497edda14f26e1d6389b0144f6abeeba654
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4vme_moth.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4vme_moth.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4vme_moth.cpp b/src/qml/jsruntime/qv4vme_moth.cpp index 463a226d7d..82d9599582 100644 --- a/src/qml/jsruntime/qv4vme_moth.cpp +++ b/src/qml/jsruntime/qv4vme_moth.cpp @@ -638,19 +638,19 @@ QV4::ReturnedValue VME::run(QV4::ExecutionContext *context, const uchar *code, MOTH_END_INSTR(LoadThis) MOTH_BEGIN_INSTR(LoadQmlIdObject) - VALUE(instr.result) = __qmljs_get_id_object(context, instr.id); + VALUE(instr.result) = __qmljs_get_id_object(static_cast<QV4::NoThrowContext*>(context), instr.id); MOTH_END_INSTR(LoadQmlIdObject) MOTH_BEGIN_INSTR(LoadQmlImportedScripts) - VALUE(instr.result) = __qmljs_get_imported_scripts(context); + VALUE(instr.result) = __qmljs_get_imported_scripts(static_cast<QV4::NoThrowContext*>(context)); MOTH_END_INSTR(LoadQmlImportedScripts) MOTH_BEGIN_INSTR(LoadQmlContextObject) - VALUE(instr.result) = __qmljs_get_context_object(context); + VALUE(instr.result) = __qmljs_get_context_object(static_cast<QV4::NoThrowContext*>(context)); MOTH_END_INSTR(LoadContextObject) MOTH_BEGIN_INSTR(LoadQmlScopeObject) - VALUE(instr.result) = __qmljs_get_scope_object(context); + VALUE(instr.result) = __qmljs_get_scope_object(static_cast<QV4::NoThrowContext*>(context)); MOTH_END_INSTR(LoadScopeObject) #ifdef MOTH_THREADED_INTERPRETER |