aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4debugging.cpp
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-09-15 15:46:36 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-18 13:14:21 +0200
commit87f475cbdb89fcbfbce68c3b676a240bb255a6d9 (patch)
tree9ed2acca5036e70fdd9d60204e1dd5ca3ce0d758 /src/qml/jsruntime/qv4debugging.cpp
parent43cdae853b726642893622d2feffcd0f4a2d6953 (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/qv4debugging.cpp')
-rw-r--r--src/qml/jsruntime/qv4debugging.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4debugging.cpp b/src/qml/jsruntime/qv4debugging.cpp
index 2b6dc4616c..34b72e95fb 100644
--- a/src/qml/jsruntime/qv4debugging.cpp
+++ b/src/qml/jsruntime/qv4debugging.cpp
@@ -214,12 +214,11 @@ static void realDumpValue(QV4::Value v, QV4::ExecutionContext *ctx, std::string
cout << prefix << "tag: " << hex << v.tag << dec << endl << prefix << "\t-> ";
switch (v.type()) {
- case Value::Undefined_Type: cout << "Undefined" << endl; return;
- case Value::Null_Type: cout << "Null" << endl; return;
+ case Value::Undefined_Type: cout << "Undefined"; return;
+ case Value::Null_Type: cout << "Null"; return;
case Value::Boolean_Type: cout << "Boolean"; break;
case Value::Integer_Type: cout << "Integer"; break;
- case Value::Object_Type: cout << "Object"; break;
- case Value::String_Type: cout << "String"; break;
+ case Value::Managed_Type: cout << v.managed()->className().toUtf8().data(); break;
default: cout << "UNKNOWN" << endl; return;
}
cout << endl;