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 #ifndef V8_HEAP_HEAP_H_ | 5 #ifndef V8_HEAP_HEAP_H_ |
6 #define V8_HEAP_HEAP_H_ | 6 #define V8_HEAP_HEAP_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 1240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1251 IncrementalMarking* incremental_marking() { return incremental_marking_; } | 1251 IncrementalMarking* incremental_marking() { return incremental_marking_; } |
1252 | 1252 |
1253 // =========================================================================== | 1253 // =========================================================================== |
1254 // Concurrent marking API. =================================================== | 1254 // Concurrent marking API. =================================================== |
1255 // =========================================================================== | 1255 // =========================================================================== |
1256 | 1256 |
1257 ConcurrentMarking* concurrent_marking() { return concurrent_marking_; } | 1257 ConcurrentMarking* concurrent_marking() { return concurrent_marking_; } |
1258 | 1258 |
1259 // The runtime uses this function to notify potentially unsafe object layout | 1259 // The runtime uses this function to notify potentially unsafe object layout |
1260 // changes that require special synchronization with the concurrent marker. | 1260 // changes that require special synchronization with the concurrent marker. |
1261 // A layout change is unsafe if | |
1262 // - it removes a tagged in-object field. | |
1263 // - it replaces a tagged in-objects field with an untagged in-object field. | |
1264 void NotifyObjectLayoutChange(HeapObject* object, | 1261 void NotifyObjectLayoutChange(HeapObject* object, |
1265 const DisallowHeapAllocation&); | 1262 const DisallowHeapAllocation&); |
| 1263 |
1266 #ifdef VERIFY_HEAP | 1264 #ifdef VERIFY_HEAP |
1267 // This function checks that either | 1265 // This function checks that either |
1268 // - the map transition is safe, | 1266 // - the map transition is safe, |
1269 // - or it was communicated to GC using NotifyObjectLayoutChange. | 1267 // - or it was communicated to GC using NotifyObjectLayoutChange. |
1270 void VerifyObjectLayoutChange(HeapObject* object, Map* new_map); | 1268 void VerifyObjectLayoutChange(HeapObject* object, Map* new_map); |
1271 #endif | 1269 #endif |
1272 | 1270 |
1273 // =========================================================================== | 1271 // =========================================================================== |
1274 // Embedder heap tracer support. ============================================= | 1272 // Embedder heap tracer support. ============================================= |
1275 // =========================================================================== | 1273 // =========================================================================== |
(...skipping 1371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2647 friend class PagedSpace; | 2645 friend class PagedSpace; |
2648 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); | 2646 DISALLOW_COPY_AND_ASSIGN(AllocationObserver); |
2649 }; | 2647 }; |
2650 | 2648 |
2651 V8_EXPORT_PRIVATE const char* AllocationSpaceName(AllocationSpace space); | 2649 V8_EXPORT_PRIVATE const char* AllocationSpaceName(AllocationSpace space); |
2652 | 2650 |
2653 } // namespace internal | 2651 } // namespace internal |
2654 } // namespace v8 | 2652 } // namespace v8 |
2655 | 2653 |
2656 #endif // V8_HEAP_HEAP_H_ | 2654 #endif // V8_HEAP_HEAP_H_ |
OLD | NEW |