OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 279 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
290 return (type_ & kStringRepresentationMask) == kSeqStringTag; | 290 return (type_ & kStringRepresentationMask) == kSeqStringTag; |
291 } | 291 } |
292 | 292 |
293 | 293 |
294 StringRepresentationTag StringShape::representation_tag() { | 294 StringRepresentationTag StringShape::representation_tag() { |
295 uint32_t tag = (type_ & kStringRepresentationMask); | 295 uint32_t tag = (type_ & kStringRepresentationMask); |
296 return static_cast<StringRepresentationTag>(tag); | 296 return static_cast<StringRepresentationTag>(tag); |
297 } | 297 } |
298 | 298 |
299 | 299 |
| 300 uint32_t StringShape::encoding_tag() { |
| 301 return type_ & kStringEncodingMask; |
| 302 } |
| 303 |
| 304 |
300 uint32_t StringShape::full_representation_tag() { | 305 uint32_t StringShape::full_representation_tag() { |
301 return (type_ & (kStringRepresentationMask | kStringEncodingMask)); | 306 return (type_ & (kStringRepresentationMask | kStringEncodingMask)); |
302 } | 307 } |
303 | 308 |
304 | 309 |
305 STATIC_CHECK((kStringRepresentationMask | kStringEncodingMask) == | 310 STATIC_CHECK((kStringRepresentationMask | kStringEncodingMask) == |
306 Internals::kFullStringRepresentationMask); | 311 Internals::kFullStringRepresentationMask); |
307 | 312 |
308 | 313 |
309 bool StringShape::IsSequentialAscii() { | 314 bool StringShape::IsSequentialAscii() { |
(...skipping 4298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4608 #undef WRITE_INT_FIELD | 4613 #undef WRITE_INT_FIELD |
4609 #undef READ_SHORT_FIELD | 4614 #undef READ_SHORT_FIELD |
4610 #undef WRITE_SHORT_FIELD | 4615 #undef WRITE_SHORT_FIELD |
4611 #undef READ_BYTE_FIELD | 4616 #undef READ_BYTE_FIELD |
4612 #undef WRITE_BYTE_FIELD | 4617 #undef WRITE_BYTE_FIELD |
4613 | 4618 |
4614 | 4619 |
4615 } } // namespace v8::internal | 4620 } } // namespace v8::internal |
4616 | 4621 |
4617 #endif // V8_OBJECTS_INL_H_ | 4622 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |