| 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_H_ | 5 #ifndef V8_HEAP_H_ |
| 6 #define V8_HEAP_H_ | 6 #define V8_HEAP_H_ |
| 7 | 7 |
| 8 #include <cmath> | 8 #include <cmath> |
| 9 | 9 |
| 10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
| (...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1193 void UpdateNewSpaceReferencesInExternalStringTable( | 1193 void UpdateNewSpaceReferencesInExternalStringTable( |
| 1194 ExternalStringTableUpdaterCallback updater_func); | 1194 ExternalStringTableUpdaterCallback updater_func); |
| 1195 | 1195 |
| 1196 void UpdateReferencesInExternalStringTable( | 1196 void UpdateReferencesInExternalStringTable( |
| 1197 ExternalStringTableUpdaterCallback updater_func); | 1197 ExternalStringTableUpdaterCallback updater_func); |
| 1198 | 1198 |
| 1199 void ProcessWeakReferences(WeakObjectRetainer* retainer); | 1199 void ProcessWeakReferences(WeakObjectRetainer* retainer); |
| 1200 | 1200 |
| 1201 void VisitExternalResources(v8::ExternalResourceVisitor* visitor); | 1201 void VisitExternalResources(v8::ExternalResourceVisitor* visitor); |
| 1202 | 1202 |
| 1203 // Helper function that governs the promotion policy from new space to | 1203 // An object should be promoted if the object has survived a |
| 1204 // old. If the object's old address lies below the new space's age | 1204 // scavenge operation. |
| 1205 // mark or if we've already filled the bottom 1/16th of the to space, | |
| 1206 // we try to promote this object. | |
| 1207 inline bool ShouldBePromoted(Address old_address, int object_size); | 1205 inline bool ShouldBePromoted(Address old_address, int object_size); |
| 1208 | 1206 |
| 1209 void ClearJSFunctionResultCaches(); | 1207 void ClearJSFunctionResultCaches(); |
| 1210 | 1208 |
| 1211 void ClearNormalizedMapCaches(); | 1209 void ClearNormalizedMapCaches(); |
| 1212 | 1210 |
| 1213 GCTracer* tracer() { return tracer_; } | 1211 GCTracer* tracer() { return tracer_; } |
| 1214 | 1212 |
| 1215 // Returns the size of objects residing in non new spaces. | 1213 // Returns the size of objects residing in non new spaces. |
| 1216 intptr_t PromotedSpaceSizeOfObjects(); | 1214 intptr_t PromotedSpaceSizeOfObjects(); |
| (...skipping 1562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2779 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 2777 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 2780 | 2778 |
| 2781 private: | 2779 private: |
| 2782 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2780 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 2783 }; | 2781 }; |
| 2784 #endif // DEBUG | 2782 #endif // DEBUG |
| 2785 | 2783 |
| 2786 } } // namespace v8::internal | 2784 } } // namespace v8::internal |
| 2787 | 2785 |
| 2788 #endif // V8_HEAP_H_ | 2786 #endif // V8_HEAP_H_ |
| OLD | NEW |