diff options
| author | Lars Knoll <lars.knoll@qt.io> | 2017-10-17 13:02:17 +0200 |
|---|---|---|
| committer | Lars Knoll <lars.knoll@qt.io> | 2017-11-07 07:24:09 +0000 |
| commit | 1c3e1df2536712c7c2aef4ec5f68316a7e32e4ff (patch) | |
| tree | 503616ae443ed0e4386e92d67f94454efcc69fab /src/qml/compiler/qv4compileddata.cpp | |
| parent | 573ad68f8295e5b8e578bb6bad9d1ca932cccaf6 (diff) | |
Move a couple of data members required for new JIT
Mark CompilationUnit final and get rid of it's vtable.
Fix initializations with 0 instead of nullptr.
Change-Id: Ieec260bd45d8f08cf5d8964becd312b221cbb2a9
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
Diffstat (limited to 'src/qml/compiler/qv4compileddata.cpp')
| -rw-r--r-- | src/qml/compiler/qv4compileddata.cpp | 34 |
1 files changed, 12 insertions, 22 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp index ab47bf66f2..79a6018734 100644 --- a/src/qml/compiler/qv4compileddata.cpp +++ b/src/qml/compiler/qv4compileddata.cpp @@ -94,23 +94,10 @@ static QString cacheFilePath(const QUrl &url) } #endif -#ifndef V4_BOOTSTRAP CompilationUnit::CompilationUnit() - : data(0) - , engine(0) - , qmlEngine(0) - , runtimeLookups(0) - , runtimeRegularExpressions(0) - , runtimeClasses(0) - , constants(nullptr) - , totalBindingsCount(0) - , totalParserStatusCount(0) - , totalObjectCount(0) - , metaTypeId(-1) - , listMetaTypeId(-1) - , isRegisteredWithEngine(false) {} +#ifndef V4_BOOTSTRAP CompilationUnit::~CompilationUnit() { unlink(); @@ -269,14 +256,6 @@ void CompilationUnit::markObjects(QV4::MarkStack *markStack) } } -void CompilationUnit::destroy() -{ - if (qmlEngine) - QQmlEnginePrivate::deleteInEngineThread(qmlEngine, this); - else - delete this; -} - IdentifierHash<int> CompilationUnit::namedObjectsPerComponent(int componentObjectIndex) { auto it = namedObjectsPerComponentCache.find(componentObjectIndex); @@ -765,6 +744,17 @@ bool ResolvedTypeReferenceMap::addToHash(QCryptographicHash *hash, QQmlEngine *e #endif +void CompilationUnit::destroy() +{ +#if !defined(V4_BOOTSTRAP) + if (qmlEngine) + QQmlEnginePrivate::deleteInEngineThread(qmlEngine, this); + else +#endif + delete this; +} + + void Unit::generateChecksum() { #ifndef V4_BOOTSTRAP |
