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 1456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1467 void TracePathToObjectFrom(Object* target, Object* root); | 1467 void TracePathToObjectFrom(Object* target, Object* root); |
1468 void TracePathToObject(Object* target); | 1468 void TracePathToObject(Object* target); |
1469 void TracePathToGlobal(); | 1469 void TracePathToGlobal(); |
1470 #endif | 1470 #endif |
1471 | 1471 |
1472 // Callback function passed to Heap::Iterate etc. Copies an object if | 1472 // Callback function passed to Heap::Iterate etc. Copies an object if |
1473 // necessary, the object might be promoted to an old space. The caller must | 1473 // necessary, the object might be promoted to an old space. The caller must |
1474 // ensure the precondition that the object is (a) a heap object and (b) in | 1474 // ensure the precondition that the object is (a) a heap object and (b) in |
1475 // the heap's from space. | 1475 // the heap's from space. |
1476 static inline void ScavengePointer(HeapObject** p); | 1476 static inline void ScavengePointer(HeapObject** p); |
1477 static inline void ScavengeObject(HeapObject** p, HeapObject* object); | 1477 |
| 1478 // p is the slot pointing to the object in new space |
| 1479 // object ist the object in new space |
| 1480 // old_object is not used in the ScavengeObject callback |
| 1481 static inline void ScavengeObject(HeapObject** p, |
| 1482 HeapObject* object, |
| 1483 Object* old_object = NULL); |
1478 | 1484 |
1479 enum ScratchpadSlotMode { | 1485 enum ScratchpadSlotMode { |
1480 IGNORE_SCRATCHPAD_SLOT, | 1486 IGNORE_SCRATCHPAD_SLOT, |
1481 RECORD_SCRATCHPAD_SLOT | 1487 RECORD_SCRATCHPAD_SLOT |
1482 }; | 1488 }; |
1483 | 1489 |
1484 // An object may have an AllocationSite associated with it through a trailing | 1490 // An object may have an AllocationSite associated with it through a trailing |
1485 // AllocationMemento. Its feedback should be updated when objects are found | 1491 // AllocationMemento. Its feedback should be updated when objects are found |
1486 // in the heap. | 1492 // in the heap. |
1487 static inline void UpdateAllocationSiteFeedback( | 1493 static inline void UpdateAllocationSiteFeedback( |
(...skipping 1596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3084 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3090 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
3085 | 3091 |
3086 private: | 3092 private: |
3087 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3093 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
3088 }; | 3094 }; |
3089 #endif // DEBUG | 3095 #endif // DEBUG |
3090 | 3096 |
3091 } } // namespace v8::internal | 3097 } } // namespace v8::internal |
3092 | 3098 |
3093 #endif // V8_HEAP_H_ | 3099 #endif // V8_HEAP_H_ |
OLD | NEW |