Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index e89efdf471a5d624595e45acf7c074a824bc66a2..36c434f1b03683e3a91e8af1487aafd567b3c952 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -808,10 +808,10 @@ enum InstanceType { |
const int kExternalArrayTypeCount = |
LAST_EXTERNAL_ARRAY_TYPE - FIRST_EXTERNAL_ARRAY_TYPE + 1; |
-STATIC_CHECK(JS_OBJECT_TYPE == Internals::kJSObjectType); |
-STATIC_CHECK(FIRST_NONSTRING_TYPE == Internals::kFirstNonstringType); |
-STATIC_CHECK(ODDBALL_TYPE == Internals::kOddballType); |
-STATIC_CHECK(FOREIGN_TYPE == Internals::kForeignType); |
+STATIC_ASSERT(JS_OBJECT_TYPE == Internals::kJSObjectType); |
+STATIC_ASSERT(FIRST_NONSTRING_TYPE == Internals::kFirstNonstringType); |
+STATIC_ASSERT(ODDBALL_TYPE == Internals::kOddballType); |
+STATIC_ASSERT(FOREIGN_TYPE == Internals::kForeignType); |
#define FIXED_ARRAY_SUB_INSTANCE_TYPE_LIST(V) \ |
@@ -1744,7 +1744,7 @@ class HeapObject: public Object { |
static const int kMapOffset = Object::kHeaderSize; |
static const int kHeaderSize = kMapOffset + kPointerSize; |
- STATIC_CHECK(kMapOffset == Internals::kHeapObjectMapOffset); |
+ STATIC_ASSERT(kMapOffset == Internals::kHeapObjectMapOffset); |
protected: |
// helpers for calling an ObjectVisitor to iterate over pointers in the |
@@ -2653,7 +2653,7 @@ class JSObject: public JSReceiver { |
static const int kElementsOffset = kPropertiesOffset + kPointerSize; |
static const int kHeaderSize = kElementsOffset + kPointerSize; |
- STATIC_CHECK(kHeaderSize == Internals::kJSObjectHeaderSize); |
+ STATIC_ASSERT(kHeaderSize == Internals::kJSObjectHeaderSize); |
class BodyDescriptor : public FlexibleBodyDescriptor<kPropertiesOffset> { |
public: |
@@ -3035,7 +3035,7 @@ class FixedArray: public FixedArrayBase { |
Object* value); |
private: |
- STATIC_CHECK(kHeaderSize == Internals::kFixedArrayHeaderSize); |
+ STATIC_ASSERT(kHeaderSize == Internals::kFixedArrayHeaderSize); |
DISALLOW_IMPLICIT_CONSTRUCTORS(FixedArray); |
}; |
@@ -6555,7 +6555,7 @@ class Map: public HeapObject { |
static const int kBitFieldOffset = kInstanceAttributesOffset + 2; |
static const int kBitField2Offset = kInstanceAttributesOffset + 3; |
- STATIC_CHECK(kInstanceTypeOffset == Internals::kMapInstanceTypeOffset); |
+ STATIC_ASSERT(kInstanceTypeOffset == Internals::kMapInstanceTypeOffset); |
// Bit positions for bit field. |
static const int kHasNonInstancePrototype = 0; |
@@ -8784,7 +8784,7 @@ class Name: public HeapObject { |
static const int kArrayIndexLengthBits = |
kBitsPerInt - kArrayIndexValueBits - kNofHashBitFields; |
- STATIC_CHECK((kArrayIndexLengthBits > 0)); |
+ STATIC_ASSERT((kArrayIndexLengthBits > 0)); |
static const int kArrayIndexHashLengthShift = |
kArrayIndexValueBits + kNofHashBitFields; |
@@ -8797,7 +8797,7 @@ class Name: public HeapObject { |
// Check that kMaxCachedArrayIndexLength + 1 is a power of two so we |
// could use a mask to test if the length of string is less than or equal to |
// kMaxCachedArrayIndexLength. |
- STATIC_CHECK(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1)); |
+ STATIC_ASSERT(IS_POWER_OF_TWO(kMaxCachedArrayIndexLength + 1)); |
static const unsigned int kContainsCachedArrayIndexMask = |
(~kMaxCachedArrayIndexLength << kArrayIndexHashLengthShift) | |
@@ -9046,7 +9046,7 @@ class String: public Name { |
// Maximum number of characters to consider when trying to convert a string |
// value into an array index. |
static const int kMaxArrayIndexSize = 10; |
- STATIC_CHECK(kMaxArrayIndexSize < (1 << kArrayIndexLengthBits)); |
+ STATIC_ASSERT(kMaxArrayIndexSize < (1 << kArrayIndexLengthBits)); |
// Max char codes. |
static const int32_t kMaxOneByteCharCode = unibrow::Latin1::kMaxChar; |
@@ -9204,7 +9204,7 @@ class SeqOneByteString: public SeqString { |
// Maximal memory usage for a single sequential ASCII string. |
static const int kMaxSize = 512 * MB - 1; |
- STATIC_CHECK((kMaxSize - kHeaderSize) >= String::kMaxLength); |
+ STATIC_ASSERT((kMaxSize - kHeaderSize) >= String::kMaxLength); |
private: |
DISALLOW_IMPLICIT_CONSTRUCTORS(SeqOneByteString); |
@@ -9244,7 +9244,7 @@ class SeqTwoByteString: public SeqString { |
// Maximal memory usage for a single sequential two-byte string. |
static const int kMaxSize = 512 * MB - 1; |
- STATIC_CHECK(static_cast<int>((kMaxSize - kHeaderSize)/sizeof(uint16_t)) >= |
+ STATIC_ASSERT(static_cast<int>((kMaxSize - kHeaderSize)/sizeof(uint16_t)) >= |
String::kMaxLength); |
private: |
@@ -9373,7 +9373,7 @@ class ExternalString: public String { |
// Return whether external string is short (data pointer is not cached). |
inline bool is_short(); |
- STATIC_CHECK(kResourceOffset == Internals::kStringResourceOffset); |
+ STATIC_ASSERT(kResourceOffset == Internals::kStringResourceOffset); |
private: |
DISALLOW_IMPLICIT_CONSTRUCTORS(ExternalString); |
@@ -9643,9 +9643,9 @@ class Oddball: public HeapObject { |
kToNumberOffset + kPointerSize, |
kSize> BodyDescriptor; |
- STATIC_CHECK(kKindOffset == Internals::kOddballKindOffset); |
- STATIC_CHECK(kNull == Internals::kNullOddballKind); |
- STATIC_CHECK(kUndefined == Internals::kUndefinedOddballKind); |
+ STATIC_ASSERT(kKindOffset == Internals::kOddballKindOffset); |
+ STATIC_ASSERT(kNull == Internals::kNullOddballKind); |
+ STATIC_ASSERT(kUndefined == Internals::kUndefinedOddballKind); |
private: |
DISALLOW_IMPLICIT_CONSTRUCTORS(Oddball); |
@@ -9814,7 +9814,7 @@ class JSProxy: public JSReceiver { |
static const int kHeaderSize = kPaddingOffset; |
static const int kPaddingSize = kSize - kPaddingOffset; |
- STATIC_CHECK(kPaddingSize >= 0); |
+ STATIC_ASSERT(kPaddingSize >= 0); |
typedef FixedBodyDescriptor<kHandlerOffset, |
kPaddingOffset, |
@@ -9880,7 +9880,7 @@ class JSFunctionProxy: public JSProxy { |
static const int kSize = JSFunction::kSize; |
static const int kPaddingSize = kSize - kPaddingOffset; |
- STATIC_CHECK(kPaddingSize >= 0); |
+ STATIC_ASSERT(kPaddingSize >= 0); |
typedef FixedBodyDescriptor<kHandlerOffset, |
kConstructTrapOffset + kPointerSize, |
@@ -10254,7 +10254,7 @@ class Foreign: public HeapObject { |
static const int kForeignAddressOffset = HeapObject::kHeaderSize; |
static const int kSize = kForeignAddressOffset + kPointerSize; |
- STATIC_CHECK(kForeignAddressOffset == Internals::kForeignAddressOffset); |
+ STATIC_ASSERT(kForeignAddressOffset == Internals::kForeignAddressOffset); |
private: |
DISALLOW_IMPLICIT_CONSTRUCTORS(Foreign); |