diff options
author | Simon Hausmann <[email protected]> | 2013-10-30 14:47:07 +0100 |
---|---|---|
committer | The Qt Project <[email protected]> | 2013-11-01 23:01:30 +0100 |
commit | b5991ce2a61219bda5a7fa6e33f323158d1eb78b (patch) | |
tree | b7887aab103d993436c22c80d1178ff4984459a3 /src/qml/compiler/qv4isel_masm_p.h | |
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 <[email protected]>
Diffstat (limited to 'src/qml/compiler/qv4isel_masm_p.h')
-rw-r--r-- | src/qml/compiler/qv4isel_masm_p.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/qml/compiler/qv4isel_masm_p.h b/src/qml/compiler/qv4isel_masm_p.h index b55192aae7..bf01d0429d 100644 --- a/src/qml/compiler/qv4isel_masm_p.h +++ b/src/qml/compiler/qv4isel_masm_p.h @@ -104,6 +104,22 @@ template <typename A> struct ExceptionCheck<QV4::ExecutionContext *(*)(QV4::ExecutionContext *, A)> { enum { NeedsCheck = 0 }; }; +template <> +struct ExceptionCheck<QV4::ReturnedValue (*)(QV4::NoThrowContext *)> { + enum { NeedsCheck = 0 }; +}; +template <typename A> +struct ExceptionCheck<QV4::ReturnedValue (*)(QV4::NoThrowContext *, A)> { + enum { NeedsCheck = 0 }; +}; +template <typename A, typename B> +struct ExceptionCheck<QV4::ReturnedValue (*)(QV4::NoThrowContext *, A, B)> { + enum { NeedsCheck = 0 }; +}; +template <typename A, typename B, typename C> +struct ExceptionCheck<void (*)(QV4::NoThrowContext *, A, B, C)> { + enum { NeedsCheck = 0 }; +}; class Assembler : public JSC::MacroAssembler { |