OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // Review notes: | 5 // Review notes: |
6 // | 6 // |
7 // - The use of macros in these inline functions may seem superfluous | 7 // - The use of macros in these inline functions may seem superfluous |
8 // but it is absolutely needed to make sure gcc generates optimal | 8 // but it is absolutely needed to make sure gcc generates optimal |
9 // code. gcc is not happy when attempting to inline too deep. | 9 // code. gcc is not happy when attempting to inline too deep. |
10 // | 10 // |
(...skipping 813 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
824 return GetUnderlying()->IsTwoByteRepresentation(); | 824 return GetUnderlying()->IsTwoByteRepresentation(); |
825 } | 825 } |
826 } | 826 } |
827 | 827 |
828 bool String::HasOnlyOneByteChars() { | 828 bool String::HasOnlyOneByteChars() { |
829 uint32_t type = map()->instance_type(); | 829 uint32_t type = map()->instance_type(); |
830 return (type & kOneByteDataHintMask) == kOneByteDataHintTag || | 830 return (type & kOneByteDataHintMask) == kOneByteDataHintTag || |
831 IsOneByteRepresentation(); | 831 IsOneByteRepresentation(); |
832 } | 832 } |
833 | 833 |
| 834 bool StringShape::HasOnlyOneByteChars() { |
| 835 return (type_ & kStringEncodingMask) == kOneByteStringTag || |
| 836 (type_ & kOneByteDataHintMask) == kOneByteDataHintTag; |
| 837 } |
| 838 |
834 bool StringShape::IsCons() { | 839 bool StringShape::IsCons() { |
835 return (type_ & kStringRepresentationMask) == kConsStringTag; | 840 return (type_ & kStringRepresentationMask) == kConsStringTag; |
836 } | 841 } |
837 | 842 |
838 bool StringShape::IsThin() { | 843 bool StringShape::IsThin() { |
839 return (type_ & kStringRepresentationMask) == kThinStringTag; | 844 return (type_ & kStringRepresentationMask) == kThinStringTag; |
840 } | 845 } |
841 | 846 |
842 bool StringShape::IsSliced() { | 847 bool StringShape::IsSliced() { |
843 return (type_ & kStringRepresentationMask) == kSlicedStringTag; | 848 return (type_ & kStringRepresentationMask) == kSlicedStringTag; |
(...skipping 7426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8270 #undef WRITE_BYTE_FIELD | 8275 #undef WRITE_BYTE_FIELD |
8271 #undef NOBARRIER_READ_BYTE_FIELD | 8276 #undef NOBARRIER_READ_BYTE_FIELD |
8272 #undef NOBARRIER_WRITE_BYTE_FIELD | 8277 #undef NOBARRIER_WRITE_BYTE_FIELD |
8273 | 8278 |
8274 } // namespace internal | 8279 } // namespace internal |
8275 } // namespace v8 | 8280 } // namespace v8 |
8276 | 8281 |
8277 #include "src/objects/object-macros-undef.h" | 8282 #include "src/objects/object-macros-undef.h" |
8278 | 8283 |
8279 #endif // V8_OBJECTS_INL_H_ | 8284 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |