Chromium Code Reviews| Index: src/objects.h |
| =================================================================== |
| --- src/objects.h (revision 2749) |
| +++ src/objects.h (working copy) |
| @@ -1234,6 +1234,10 @@ |
| static const int kMapOffset = Object::kHeaderSize; |
| static const int kHeaderSize = kMapOffset + kPointerSize; |
| + // This constant is also hardcoded in the api so if one changes the |
| + // other also has to. |
|
Mads Ager (chromium)
2009/08/26 06:22:20
Maybe add this comment for the other STATIC_CHECKs
Christian Plesner Hansen
2009/08/26 10:31:06
Removed it instead. It's pretty easy to see what'
|
| + STATIC_CHECK(kMapOffset == Internals::kHeapObjectMapOffset); |
| + |
| protected: |
| // helpers for calling an ObjectVisitor to iterate over pointers in the |
| // half-open range [start, end) specified as integer offsets |
| @@ -1664,6 +1668,8 @@ |
| static const int kElementsOffset = kPropertiesOffset + kPointerSize; |
| static const int kHeaderSize = kElementsOffset + kPointerSize; |
| + STATIC_CHECK(kHeaderSize == Internals::kJSObjectHeaderSize); |
| + |
| Object* GetElementWithInterceptor(JSObject* receiver, uint32_t index); |
| private: |
| @@ -2897,6 +2903,8 @@ |
| static const int kBitFieldOffset = kInstanceAttributesOffset + 2; |
| static const int kBitField2Offset = kInstanceAttributesOffset + 3; |
| + STATIC_CHECK(kInstanceTypeOffset == Internals::kMapInstanceTypeOffset); |
| + |
| // Bit positions for bit field. |
| static const int kUnused = 0; // To be used for marking recently used maps. |
| static const int kHasNonInstancePrototype = 1; |
| @@ -4128,6 +4136,8 @@ |
| static const int kResourceOffset = POINTER_SIZE_ALIGN(String::kSize); |
| static const int kSize = kResourceOffset + kPointerSize; |
| + STATIC_CHECK(kResourceOffset == Internals::kStringResourceOffset); |
| + |
| private: |
| DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalString); |
| }; |
| @@ -4341,6 +4351,8 @@ |
| static const int kProxyOffset = HeapObject::kHeaderSize; |
| static const int kSize = kProxyOffset + kPointerSize; |
| + STATIC_CHECK(kProxyOffset == Internals::kProxyProxyOffset); |
| + |
| private: |
| DISALLOW_IMPLICIT_CONSTRUCTORS(Proxy); |
| }; |