diff options
author | Lars Knoll <lars.knoll@qt.io> | 2018-09-10 23:30:04 +0200 |
---|---|---|
committer | Lars Knoll <lars.knoll@qt.io> | 2018-09-16 17:00:22 +0000 |
commit | e436fb3569603bca8ad0a71fef67c03d2920aedc (patch) | |
tree | a8076925a788fd721c8b46119f0f13009ca882e8 /src/plugins | |
parent | 6982d0d6290c137468749bb8ab2f2e20dfa453fd (diff) |
Store InternalClass::nameMap in a MemberData
This helps make that memory known to the GC as well, and makes
marking of internal classes much more efficient, as we don't
mark the property keys repeatedly (even if they are shared
between different internal classes)
Change-Id: Ibb7e5383672d7657926bd08bf13f73f7680a9f31
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp | 2 | ||||
-rw-r--r-- | src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp index 5bfeca13e3..3dfb755936 100644 --- a/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp +++ b/src/plugins/qmltooling/qmldbg_debugger/qv4datacollector.cpp @@ -224,7 +224,7 @@ bool QV4DataCollector::collectScope(QJsonObject *dict, int frameNr, int scopeNr) QV4::ScopedValue v(scope); QV4::Heap::InternalClass *ic = ctxt->internalClass(); for (uint i = 0; i < ic->size; ++i) { - QString name = ic->nameMap[i].toQString(); + QString name = ic->keyAt(i); names.append(name); v = static_cast<QV4::Heap::CallContext *>(ctxt->d())->locals[i]; collectedRefs.append(addValueRef(v)); diff --git a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp index 3b47f73949..cda16207c2 100644 --- a/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp +++ b/src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp @@ -494,7 +494,7 @@ void NativeDebugger::handleVariables(QJsonObject *response, const QJsonObject &a QV4::Heap::InternalClass *ic = callContext->internalClass(); QV4::ScopedValue v(scope); for (uint i = 0; i < ic->size; ++i) { - QString name = ic->nameMap[i].toQString(); + QString name = ic->keyAt(i); v = callContext->d()->locals[i]; collector.collect(&output, QString(), name, v); } |