Chromium Code Reviews| Index: src/objects-inl.h |
| diff --git a/src/objects-inl.h b/src/objects-inl.h |
| index 0a5215cb405164a8df8044ac986fb5dda4288796..fa8476d1d77aba785ed2ac4bd58a63dd2b754d41 100644 |
| --- a/src/objects-inl.h |
| +++ b/src/objects-inl.h |
| @@ -221,9 +221,8 @@ bool Object::IsSpecFunction() { |
| bool Object::IsInternalizedString() { |
| if (!this->IsHeapObject()) return false; |
| uint32_t type = HeapObject::cast(this)->map()->instance_type(); |
| - STATIC_ASSERT(kInternalizedTag != 0); |
| - return (type & (kIsNotStringMask | kIsInternalizedMask)) == |
| - (kInternalizedTag | kStringTag); |
| + STATIC_ASSERT(kNotInternalizedTag != 0); |
| + return type < kNotInternalizedTag; |
|
Yang
2013/07/19 09:52:18
I kinda prefer the bit-masking way, since it doesn
mvstanton
2013/07/19 11:07:42
I wondered about that too, it's better to be symme
|
| } |
| @@ -319,9 +318,8 @@ StringShape::StringShape(InstanceType t) |
| bool StringShape::IsInternalized() { |
| ASSERT(valid()); |
| - STATIC_ASSERT(kInternalizedTag != 0); |
| - return (type_ & (kIsNotStringMask | kIsInternalizedMask)) == |
| - (kInternalizedTag | kStringTag); |
| + STATIC_ASSERT(kNotInternalizedTag != 0); |
| + return type_ < kNotInternalizedTag; |
|
mvstanton
2013/07/19 11:07:42
I restored this one too.
|
| } |