diff options
Diffstat (limited to 'src/qml/compiler/qv4compileddata_p.h')
-rw-r--r-- | src/qml/compiler/qv4compileddata_p.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/qml/compiler/qv4compileddata_p.h b/src/qml/compiler/qv4compileddata_p.h index bf6794e182..2c0a46f3c5 100644 --- a/src/qml/compiler/qv4compileddata_p.h +++ b/src/qml/compiler/qv4compileddata_p.h @@ -148,7 +148,8 @@ struct Unit enum { IsJavascript = 0x1, IsQml = 0x2, - StaticData = 0x4 // Unit data persistent in memory? + StaticData = 0x4, // Unit data persistent in memory? + IsSingleton = 0x8 }; quint32 flags; uint stringTableSize; @@ -414,7 +415,6 @@ struct Import Location location; }; - struct QmlUnit { Unit header; @@ -433,6 +433,10 @@ struct QmlUnit const uint offset = offsetTable[idx]; return reinterpret_cast<const Object*>(reinterpret_cast<const char*>(this) + offset); } + + bool isSingleton() const { + return header.flags & Unit::IsSingleton; + } }; // This is how this hooks into the existing structures: |