diff options
author | Allan Sandfeld Jensen <allan.jensen@digia.com> | 2013-09-13 12:51:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-09-19 20:50:05 +0200 |
commit | d441d6f39bb846989d95bcf5caf387b42414718d (patch) | |
tree | e367e64a75991c554930278175d403c072de6bb8 /Source/JavaScriptCore/runtime/IndexingHeader.h | |
parent | 0060b2994c07842f4c59de64b5e3e430525c4b90 (diff) | |
download | qtwebkit-d441d6f39bb846989d95bcf5caf387b42414718d.tar.gz |
Import Qt5x2 branch of QtWebkit for Qt 5.2
Importing a new snapshot of webkit.
Change-Id: I2d01ad12cdc8af8cb015387641120a9d7ea5f10c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Diffstat (limited to 'Source/JavaScriptCore/runtime/IndexingHeader.h')
-rw-r--r-- | Source/JavaScriptCore/runtime/IndexingHeader.h | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/Source/JavaScriptCore/runtime/IndexingHeader.h b/Source/JavaScriptCore/runtime/IndexingHeader.h index caa18183a..145b61876 100644 --- a/Source/JavaScriptCore/runtime/IndexingHeader.h +++ b/Source/JavaScriptCore/runtime/IndexingHeader.h @@ -44,25 +44,25 @@ public: static ptrdiff_t offsetOfIndexingHeader() { return -static_cast<ptrdiff_t>(sizeof(IndexingHeader)); } - static ptrdiff_t offsetOfPublicLength() { return OBJECT_OFFSETOF(IndexingHeader, m_publicLength); } - static ptrdiff_t offsetOfVectorLength() { return OBJECT_OFFSETOF(IndexingHeader, m_vectorLength); } + static ptrdiff_t offsetOfPublicLength() { return OBJECT_OFFSETOF(IndexingHeader, u.lengths.publicLength); } + static ptrdiff_t offsetOfVectorLength() { return OBJECT_OFFSETOF(IndexingHeader, u.lengths.vectorLength); } IndexingHeader() - : m_publicLength(0) - , m_vectorLength(0) { + u.lengths.publicLength = 0; + u.lengths.vectorLength = 0; } - uint32_t vectorLength() const { return m_vectorLength; } + uint32_t vectorLength() const { return u.lengths.vectorLength; } void setVectorLength(uint32_t length) { - ASSERT(length <= maximumLength); - m_vectorLength = length; + RELEASE_ASSERT(length <= maximumLength); + u.lengths.vectorLength = length; } - uint32_t publicLength() { return m_publicLength; } - void setPublicLength(uint32_t auxWord) { m_publicLength = auxWord; } + uint32_t publicLength() { return u.lengths.publicLength; } + void setPublicLength(uint32_t auxWord) { u.lengths.publicLength = auxWord; } static IndexingHeader* from(Butterfly* butterfly) { @@ -86,12 +86,12 @@ public: PropertyStorage propertyStorage() { - return reinterpret_cast<PropertyStorage>(this); + return reinterpret_cast_ptr<PropertyStorage>(this); } ConstPropertyStorage propertyStorage() const { - return reinterpret_cast<ConstPropertyStorage>(this); + return reinterpret_cast_ptr<ConstPropertyStorage>(this); } ArrayStorage* arrayStorage() @@ -111,9 +111,13 @@ public: private: friend class LLIntOffsetsExtractor; - - uint32_t m_publicLength; // The meaning of this field depends on the array type, but for all JSArrays we rely on this being the publicly visible length (array.length). - uint32_t m_vectorLength; // The length of the indexed property storage. The actual size of the storage depends on this, and the type. + + union { + struct { + uint32_t publicLength; // The meaning of this field depends on the array type, but for all JSArrays we rely on this being the publicly visible length (array.length). + uint32_t vectorLength; // The length of the indexed property storage. The actual size of the storage depends on this, and the type. + } lengths; + } u; }; } // namespace JSC |