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 1455 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1466 Address HeapObject::address() { | 1466 Address HeapObject::address() { |
1467 return reinterpret_cast<Address>(this) - kHeapObjectTag; | 1467 return reinterpret_cast<Address>(this) - kHeapObjectTag; |
1468 } | 1468 } |
1469 | 1469 |
1470 | 1470 |
1471 int HeapObject::Size() { | 1471 int HeapObject::Size() { |
1472 return SizeFromMap(map()); | 1472 return SizeFromMap(map()); |
1473 } | 1473 } |
1474 | 1474 |
1475 | 1475 |
1476 bool HeapObject::MayContainNewSpacePointers() { | 1476 bool HeapObject::MayContainRawValues() { |
1477 InstanceType type = map()->instance_type(); | 1477 InstanceType type = map()->instance_type(); |
1478 if (type <= LAST_NAME_TYPE) { | 1478 if (type <= LAST_NAME_TYPE) { |
1479 if (type == SYMBOL_TYPE) { | 1479 if (type == SYMBOL_TYPE) { |
1480 return true; | 1480 return true; |
1481 } | 1481 } |
1482 DCHECK(type < FIRST_NONSTRING_TYPE); | 1482 DCHECK(type < FIRST_NONSTRING_TYPE); |
1483 // There are four string representations: sequential strings, external | 1483 // There are four string representations: sequential strings, external |
1484 // strings, cons strings, and sliced strings. | 1484 // strings, cons strings, and sliced strings. |
1485 // Only the latter two contain non-map-word pointers to heap objects. | 1485 // Only the latter two contain non-map-word pointers to heap objects. |
1486 return ((type & kIsIndirectStringMask) == kIsIndirectStringTag); | 1486 return ((type & kIsIndirectStringMask) == kIsIndirectStringTag); |
(...skipping 5760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7247 #undef READ_SHORT_FIELD | 7247 #undef READ_SHORT_FIELD |
7248 #undef WRITE_SHORT_FIELD | 7248 #undef WRITE_SHORT_FIELD |
7249 #undef READ_BYTE_FIELD | 7249 #undef READ_BYTE_FIELD |
7250 #undef WRITE_BYTE_FIELD | 7250 #undef WRITE_BYTE_FIELD |
7251 #undef NOBARRIER_READ_BYTE_FIELD | 7251 #undef NOBARRIER_READ_BYTE_FIELD |
7252 #undef NOBARRIER_WRITE_BYTE_FIELD | 7252 #undef NOBARRIER_WRITE_BYTE_FIELD |
7253 | 7253 |
7254 } } // namespace v8::internal | 7254 } } // namespace v8::internal |
7255 | 7255 |
7256 #endif // V8_OBJECTS_INL_H_ | 7256 #endif // V8_OBJECTS_INL_H_ |
OLD | NEW |