diff options
author | Lars Knoll <lars.knoll@digia.com> | 2013-09-15 15:46:36 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-18 13:14:21 +0200 |
commit | 87f475cbdb89fcbfbce68c3b676a240bb255a6d9 (patch) | |
tree | 9ed2acca5036e70fdd9d60204e1dd5ca3ce0d758 /src/qml/jsruntime/qv4string.cpp | |
parent | 43cdae853b726642893622d2feffcd0f4a2d6953 (diff) |
Refactor our NaN boxing to be more efficient
* Use a unified way to store all Managed objects inside
a Value, instead of distinguishing between strings
and other objects.
* On 64 bit we store pointers as pointers, so accessing them
through Scoped<> objects is cheap. This implies that doubles
are now stored in a mangled form (xor'ed with a mask).
Change-Id: I582e0fb167a62c0c527c6bfa3452550e37944069
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'src/qml/jsruntime/qv4string.cpp')
-rw-r--r-- | src/qml/jsruntime/qv4string.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qml/jsruntime/qv4string.cpp b/src/qml/jsruntime/qv4string.cpp index d0f3a196b7..bd1f14b680 100644 --- a/src/qml/jsruntime/qv4string.cpp +++ b/src/qml/jsruntime/qv4string.cpp @@ -215,6 +215,8 @@ bool String::isEqualTo(Managed *t, Managed *o) { if (t == o) return true; + + Q_ASSERT(t->type == Type_String && o->type == Type_String); String *that = static_cast<String *>(t); String *other = static_cast<String *>(o); if (that->hashValue() != other->hashValue()) |