OLD | NEW |
---|---|
1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1362 bool String::is_ascii_representation() { | 1362 bool String::is_ascii_representation() { |
1363 return is_ascii_representation_map(map()); | 1363 return is_ascii_representation_map(map()); |
1364 } | 1364 } |
1365 | 1365 |
1366 | 1366 |
1367 bool String::is_ascii_representation_map(Map* map) { | 1367 bool String::is_ascii_representation_map(Map* map) { |
1368 return (map->instance_type() & kStringEncodingMask) != 0; | 1368 return (map->instance_type() & kStringEncodingMask) != 0; |
1369 } | 1369 } |
1370 | 1370 |
1371 | 1371 |
1372 int String::full_representation_tag() { | |
Christian Plesner Hansen
2008/10/21 14:16:22
We have a lot of these methods with lower-case nam
Erik Corry
2008/10/22 11:59:48
This one is certainly trivial.
| |
1373 return map()->instance_type() & | |
1374 (kStringRepresentationMask | kStringEncodingMask); | |
1375 } | |
1376 | |
1377 | |
1372 StringRepresentationTag String::representation_tag() { | 1378 StringRepresentationTag String::representation_tag() { |
1373 return map_representation_tag(map()); | 1379 return map_representation_tag(map()); |
1374 } | 1380 } |
1375 | 1381 |
1376 | 1382 |
1377 StringRepresentationTag String::map_representation_tag(Map* map) { | 1383 StringRepresentationTag String::map_representation_tag(Map* map) { |
1378 uint32_t tag = map->instance_type() & kStringRepresentationMask; | 1384 uint32_t tag = map->instance_type() & kStringRepresentationMask; |
1379 return static_cast<StringRepresentationTag>(tag); | 1385 return static_cast<StringRepresentationTag>(tag); |
1380 } | 1386 } |
1381 | 1387 |
(...skipping 946 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2328 #undef WRITE_INT_FIELD | 2334 #undef WRITE_INT_FIELD |
2329 #undef READ_SHORT_FIELD | 2335 #undef READ_SHORT_FIELD |
2330 #undef WRITE_SHORT_FIELD | 2336 #undef WRITE_SHORT_FIELD |
2331 #undef READ_BYTE_FIELD | 2337 #undef READ_BYTE_FIELD |
2332 #undef WRITE_BYTE_FIELD | 2338 #undef WRITE_BYTE_FIELD |
2333 | 2339 |
2334 | 2340 |
2335 } } // namespace v8::internal | 2341 } } // namespace v8::internal |
2336 | 2342 |
2337 #endif // V8_OBJECTS_INL_H_ | 2343 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |