| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef V8_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
| 6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/assert-scope.h" | 10 #include "src/assert-scope.h" |
| (...skipping 1469 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1480 // View this map word as a map pointer. | 1480 // View this map word as a map pointer. |
| 1481 inline Map* ToMap(); | 1481 inline Map* ToMap(); |
| 1482 | 1482 |
| 1483 | 1483 |
| 1484 // Scavenge collection: the map word of live objects in the from space | 1484 // Scavenge collection: the map word of live objects in the from space |
| 1485 // contains a forwarding address (a heap object pointer in the to space). | 1485 // contains a forwarding address (a heap object pointer in the to space). |
| 1486 | 1486 |
| 1487 // True if this map word is a forwarding address for a scavenge | 1487 // True if this map word is a forwarding address for a scavenge |
| 1488 // collection. Only valid during a scavenge collection (specifically, | 1488 // collection. Only valid during a scavenge collection (specifically, |
| 1489 // when all map words are heap object pointers, i.e. not during a full GC). | 1489 // when all map words are heap object pointers, i.e. not during a full GC). |
| 1490 inline bool IsForwardingAddress(); | 1490 inline bool IsForwardingAddress() const; |
| 1491 | 1491 |
| 1492 // Create a map word from a forwarding address. | 1492 // Create a map word from a forwarding address. |
| 1493 static inline MapWord FromForwardingAddress(HeapObject* object); | 1493 static inline MapWord FromForwardingAddress(HeapObject* object); |
| 1494 | 1494 |
| 1495 // View this map word as a forwarding address. | 1495 // View this map word as a forwarding address. |
| 1496 inline HeapObject* ToForwardingAddress(); | 1496 inline HeapObject* ToForwardingAddress(); |
| 1497 | 1497 |
| 1498 static inline MapWord FromRawValue(uintptr_t value) { | 1498 static inline MapWord FromRawValue(uintptr_t value) { |
| 1499 return MapWord(value); | 1499 return MapWord(value); |
| 1500 } | 1500 } |
| (...skipping 9269 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10770 } | 10770 } |
| 10771 return value; | 10771 return value; |
| 10772 } | 10772 } |
| 10773 }; | 10773 }; |
| 10774 | 10774 |
| 10775 | 10775 |
| 10776 } // NOLINT, false-positive due to second-order macros. | 10776 } // NOLINT, false-positive due to second-order macros. |
| 10777 } // NOLINT, false-positive due to second-order macros. | 10777 } // NOLINT, false-positive due to second-order macros. |
| 10778 | 10778 |
| 10779 #endif // V8_OBJECTS_H_ | 10779 #endif // V8_OBJECTS_H_ |
| OLD | NEW |