diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-10-04 15:38:42 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-11 16:01:24 +0200 |
commit | f6de6160b915b5a35e75746a35c4ef94ceb9b2c2 (patch) | |
tree | b75e37bc0579a2195c36074999cd4b116aeb7a1f /src/qml/jsruntime/qv4value_def_p.h | |
parent | 886c359ebb86afcad3a62ce6cf7697fd7d6a1ea8 (diff) |
Optimise code generation for convertTypeToSInt32
Add 64 bit code patch and avoid some duplicated
calculation in 32 bit mode
Change-Id: I0e111de8ac4e733aa8802c49b4b15d785688d7ea
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4value_def_p.h')
-rw-r--r-- | src/qml/jsruntime/qv4value_def_p.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4value_def_p.h b/src/qml/jsruntime/qv4value_def_p.h index 82f8d02dfe..163aed9abc 100644 --- a/src/qml/jsruntime/qv4value_def_p.h +++ b/src/qml/jsruntime/qv4value_def_p.h @@ -194,8 +194,8 @@ struct Q_QML_EXPORT Value inline bool isUndefined() const { return tag == Undefined_Type; } inline bool isNull() const { return tag == _Null_Type; } inline bool isBoolean() const { return tag == _Boolean_Type; } - inline bool isInteger() const { return tag == _Integer_Type; } #if QT_POINTER_SIZE == 8 + inline bool isInteger() const { return (val >> IsNumber_Shift) == 1; } inline bool isDouble() const { return (val >> IsDouble_Shift); } inline bool isNumber() const { return (val >> IsNumber_Shift); } inline bool isManaged() const { return !(val >> IsManaged_Shift); } @@ -227,6 +227,7 @@ struct Q_QML_EXPORT Value } bool isNaN() const { return (tag & 0x7fff8000) == 0x00078000; } #else + inline bool isInteger() const { return tag == _Integer_Type; } inline bool isDouble() const { return (tag & NotDouble_Mask) != NotDouble_Mask; } inline bool isNumber() const { return tag == _Integer_Type || (tag & NotDouble_Mask) != NotDouble_Mask; } inline bool isManaged() const { return tag == Managed_Type; } |