diff options
author | Simon Hausmann <simon.hausmann@qt.io> | 2018-01-22 09:40:52 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-01-22 09:21:38 +0000 |
commit | 1ab5d14615f713a87141b66675521d702542d3a6 (patch) | |
tree | 83ab229fbbd08d39cfb4637240008bf012c10491 /src | |
parent | f562a7d99aeaff85f964b0ad75f94fb85e3ddd11 (diff) |
Minor data structure cleanup
The cache files are architecture and ABI independent, so we can remove
any associated field/code as well as the workaround for Android.
Change-Id: Ia52a5be886fc22a2105460e003e7a76af7dc1818
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/compiler/qv4compileddata.cpp | 18 | ||||
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 6 | ||||
-rw-r--r-- | src/qml/compiler/qv4compiler.cpp | 2 | ||||
-rw-r--r-- | src/qml/compiler/qv4compilercontext_p.h | 1 |
4 files changed, 2 insertions, 25 deletions
diff --git a/src/qml/compiler/qv4compileddata.cpp b/src/qml/compiler/qv4compileddata.cpp index e98cb32250..889e755682 100644 --- a/src/qml/compiler/qv4compileddata.cpp +++ b/src/qml/compiler/qv4compileddata.cpp @@ -354,24 +354,6 @@ bool CompilationUnit::loadFromDisk(const QUrl &url, const QDateTime &sourceTimeS return false; } - { - const QString foundArchitecture = stringAt(data->architectureIndex); - const QString expectedArchitecture = QSysInfo::buildAbi(); - if (foundArchitecture != expectedArchitecture) { - *errorString = QString::fromUtf8("Architecture mismatch. Found %1 expected %2").arg(foundArchitecture).arg(expectedArchitecture); - return false; - } - } - - { - const QString foundCodeGenerator = stringAt(data->codeGeneratorIndex); - const QString expectedCodeGenerator = QStringLiteral("moth"); // ### - if (foundCodeGenerator != expectedCodeGenerator) { - *errorString = QString::fromUtf8("Code generator mismatch. Found code generated by %1 but expected %2").arg(foundCodeGenerator).arg(expectedCodeGenerator); - return false; - } - } - dataPtrChange.commit(); free(const_cast<Unit*>(oldDataPtr)); backingFile.reset(cacheFile.take()); diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index bf3901a501..faa2d9bcb4 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -72,7 +72,7 @@ QT_BEGIN_NAMESPACE // Bump this whenever the compiler data structures change in an incompatible way. -#define QV4_DATA_STRUCTURE_VERSION 0x15 +#define QV4_DATA_STRUCTURE_VERSION 0x16 class QIODevice; class QQmlPropertyCache; @@ -691,8 +691,6 @@ struct Unit char md5Checksum[16]; // checksum of all bytes following this field. void generateChecksum(); - quint32_le architectureIndex; // string index to QSysInfo::buildAbi() - quint32_le codeGeneratorIndex; char dependencyMD5Checksum[16]; enum : unsigned int { @@ -790,7 +788,7 @@ struct Unit } }; -static_assert(sizeof(Unit) == 144, "Unit structure needs to have the expected size to be binary compatible on disk when generated by host compiler and loaded by target"); +static_assert(sizeof(Unit) == 136, "Unit structure needs to have the expected size to be binary compatible on disk when generated by host compiler and loaded by target"); struct TypeReference { diff --git a/src/qml/compiler/qv4compiler.cpp b/src/qml/compiler/qv4compiler.cpp index 96c9307513..3be34720fa 100644 --- a/src/qml/compiler/qv4compiler.cpp +++ b/src/qml/compiler/qv4compiler.cpp @@ -394,8 +394,6 @@ QV4::CompiledData::Unit QV4::Compiler::JSUnitGenerator::generateHeader(QV4::Comp unit.version = QV4_DATA_STRUCTURE_VERSION; unit.qtVersion = QT_VERSION; memset(unit.md5Checksum, 0, sizeof(unit.md5Checksum)); - unit.architectureIndex = registerString(module->targetABI.isEmpty() ? QSysInfo::buildAbi() : module->targetABI); - unit.codeGeneratorIndex = registerString(codeGeneratorName); memset(unit.dependencyMD5Checksum, 0, sizeof(unit.dependencyMD5Checksum)); quint32 nextOffset = sizeof(CompiledData::Unit); diff --git a/src/qml/compiler/qv4compilercontext_p.h b/src/qml/compiler/qv4compilercontext_p.h index 3db30ea23d..52a4bb9159 100644 --- a/src/qml/compiler/qv4compilercontext_p.h +++ b/src/qml/compiler/qv4compilercontext_p.h @@ -95,7 +95,6 @@ struct Module { QDateTime sourceTimeStamp; uint unitFlags = 0; // flags merged into CompiledData::Unit::flags bool debugMode = false; - QString targetABI; // ### seems unused currently }; |