diff options
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index ae8677138e..90cbe04505 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -71,7 +71,7 @@ QT_BEGIN_NAMESPACE // Bump this whenever the compiler data structures change in an incompatible way. -#define QV4_DATA_STRUCTURE_VERSION 0x04 +#define QV4_DATA_STRUCTURE_VERSION 0x07 class QIODevice; class QQmlPropertyCache; @@ -202,6 +202,8 @@ struct String } }; +// Function is aligned on an 8-byte boundary to make sure there are no bus errors or penalties +// for unaligned access. The ordering of the fields is also from largest to smallest. struct Function { enum Flags : unsigned int { @@ -212,6 +214,11 @@ struct Function HasCatchOrWith = 0x10 }; + // Absolute offset into file where the code for this function is located. Only used when the function + // is serialized. + LEUInt64 codeOffset; + LEUInt64 codeSize; + LEUInt32 nameIndex; LEUInt32 nFormals; LEUInt32 formalsOffset; @@ -229,11 +236,6 @@ struct Function LEUInt32 dependingScopePropertiesOffset; // Array of int pairs (property index and notify index) // Qml Extensions End - // Absolute offset into file where the code for this function is located. Only used when the function - // is serialized. - LEUInt64 codeOffset; - LEUInt64 codeSize; - // quint32 formalsIndex[nFormals] // quint32 localsIndex[nLocals] // quint32 offsetForInnerFunctions[nInnerFunctions] @@ -585,7 +587,7 @@ struct Import ImportFile = 0x2, ImportScript = 0x3 }; - quint8 type; + LEUInt32 type; LEUInt32 uriIndex; LEUInt32 qualifierIndex; @@ -610,6 +612,9 @@ struct Unit LEUInt32 unitSize; // Size of the Unit and any depending data. // END DO NOT CHANGE THESE FIELDS EVER + char md5Checksum[16]; // checksum of all bytes following this field. + void generateChecksum(); + LEUInt32 architectureIndex; // string index to QSysInfo::buildAbi() LEUInt32 codeGeneratorIndex; char dependencyMD5Checksum[16]; @@ -725,7 +730,7 @@ struct TypeReference bool errorWhenNotFound: 1; }; -// map from name index to location of first use +// Map from name index to location of first use. struct TypeReferenceMap : QHash<int, TypeReference> { TypeReference &add(int nameIndex, const Location &loc) { @@ -789,6 +794,7 @@ struct ResolvedTypeReference QQmlPropertyCache *propertyCache() const; QQmlPropertyCache *createPropertyCache(QQmlEngine *); + bool addToHash(QCryptographicHash *hash, QQmlEngine *engine); void doDynamicTypeCheck(); }; |