| 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 815 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 826 return GetUnderlying()->IsTwoByteRepresentation(); | 826 return GetUnderlying()->IsTwoByteRepresentation(); |
| 827 } | 827 } |
| 828 } | 828 } |
| 829 | 829 |
| 830 bool String::HasOnlyOneByteChars() { | 830 bool String::HasOnlyOneByteChars() { |
| 831 uint32_t type = map()->instance_type(); | 831 uint32_t type = map()->instance_type(); |
| 832 return (type & kOneByteDataHintMask) == kOneByteDataHintTag || | 832 return (type & kOneByteDataHintMask) == kOneByteDataHintTag || |
| 833 IsOneByteRepresentation(); | 833 IsOneByteRepresentation(); |
| 834 } | 834 } |
| 835 | 835 |
| 836 bool StringShape::HasOnlyOneByteChars() { |
| 837 return (type_ & kStringEncodingMask) == kOneByteStringTag || |
| 838 (type_ & kOneByteDataHintMask) == kOneByteDataHintTag; |
| 839 } |
| 840 |
| 836 bool StringShape::IsCons() { | 841 bool StringShape::IsCons() { |
| 837 return (type_ & kStringRepresentationMask) == kConsStringTag; | 842 return (type_ & kStringRepresentationMask) == kConsStringTag; |
| 838 } | 843 } |
| 839 | 844 |
| 840 bool StringShape::IsThin() { | 845 bool StringShape::IsThin() { |
| 841 return (type_ & kStringRepresentationMask) == kThinStringTag; | 846 return (type_ & kStringRepresentationMask) == kThinStringTag; |
| 842 } | 847 } |
| 843 | 848 |
| 844 bool StringShape::IsSliced() { | 849 bool StringShape::IsSliced() { |
| 845 return (type_ & kStringRepresentationMask) == kSlicedStringTag; | 850 return (type_ & kStringRepresentationMask) == kSlicedStringTag; |
| (...skipping 7490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 8336 #undef WRITE_BYTE_FIELD | 8341 #undef WRITE_BYTE_FIELD |
| 8337 #undef NOBARRIER_READ_BYTE_FIELD | 8342 #undef NOBARRIER_READ_BYTE_FIELD |
| 8338 #undef NOBARRIER_WRITE_BYTE_FIELD | 8343 #undef NOBARRIER_WRITE_BYTE_FIELD |
| 8339 | 8344 |
| 8340 } // namespace internal | 8345 } // namespace internal |
| 8341 } // namespace v8 | 8346 } // namespace v8 |
| 8342 | 8347 |
| 8343 #include "src/objects/object-macros-undef.h" | 8348 #include "src/objects/object-macros-undef.h" |
| 8344 | 8349 |
| 8345 #endif // V8_OBJECTS_INL_H_ | 8350 #endif // V8_OBJECTS_INL_H_ |
| OLD | NEW |