OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1454 // ensure the precondition that the object is (a) a heap object and (b) in | 1454 // ensure the precondition that the object is (a) a heap object and (b) in |
1455 // the heap's from space. | 1455 // the heap's from space. |
1456 static inline void ScavengePointer(HeapObject** p); | 1456 static inline void ScavengePointer(HeapObject** p); |
1457 static inline void ScavengeObject(HeapObject** p, HeapObject* object); | 1457 static inline void ScavengeObject(HeapObject** p, HeapObject* object); |
1458 | 1458 |
1459 enum ScratchpadSlotMode { | 1459 enum ScratchpadSlotMode { |
1460 IGNORE_SCRATCHPAD_SLOT, | 1460 IGNORE_SCRATCHPAD_SLOT, |
1461 RECORD_SCRATCHPAD_SLOT | 1461 RECORD_SCRATCHPAD_SLOT |
1462 }; | 1462 }; |
1463 | 1463 |
| 1464 // If an object has an AllocationMemento trailing it, return it, otherwise |
| 1465 // return NULL; |
| 1466 inline AllocationMemento* FindAllocationMemento(HeapObject* object); |
| 1467 |
1464 // An object may have an AllocationSite associated with it through a trailing | 1468 // An object may have an AllocationSite associated with it through a trailing |
1465 // AllocationMemento. Its feedback should be updated when objects are found | 1469 // AllocationMemento. Its feedback should be updated when objects are found |
1466 // in the heap. | 1470 // in the heap. |
1467 static inline void UpdateAllocationSiteFeedback( | 1471 static inline void UpdateAllocationSiteFeedback( |
1468 HeapObject* object, ScratchpadSlotMode mode); | 1472 HeapObject* object, ScratchpadSlotMode mode); |
1469 | 1473 |
1470 // Support for partial snapshots. After calling this we have a linear | 1474 // Support for partial snapshots. After calling this we have a linear |
1471 // space to write objects in each space. | 1475 // space to write objects in each space. |
1472 void ReserveSpace(int *sizes, Address* addresses); | 1476 void ReserveSpace(int *sizes, Address* addresses); |
1473 | 1477 |
(...skipping 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3063 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3067 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
3064 | 3068 |
3065 private: | 3069 private: |
3066 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3070 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
3067 }; | 3071 }; |
3068 #endif // DEBUG | 3072 #endif // DEBUG |
3069 | 3073 |
3070 } } // namespace v8::internal | 3074 } } // namespace v8::internal |
3071 | 3075 |
3072 #endif // V8_HEAP_H_ | 3076 #endif // V8_HEAP_H_ |
OLD | NEW |