| OLD | NEW | 
|---|
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 1013 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1024 | 1024 | 
| 1025   // The hidden_symbol is special because it is the empty string, but does | 1025   // The hidden_symbol is special because it is the empty string, but does | 
| 1026   // not match the empty string. | 1026   // not match the empty string. | 
| 1027   String* hidden_symbol() { return hidden_symbol_; } | 1027   String* hidden_symbol() { return hidden_symbol_; } | 
| 1028 | 1028 | 
| 1029   void set_global_contexts_list(Object* object) { | 1029   void set_global_contexts_list(Object* object) { | 
| 1030     global_contexts_list_ = object; | 1030     global_contexts_list_ = object; | 
| 1031   } | 1031   } | 
| 1032   Object* global_contexts_list() { return global_contexts_list_; } | 1032   Object* global_contexts_list() { return global_contexts_list_; } | 
| 1033 | 1033 | 
|  | 1034   // Number of mark-sweeps. | 
|  | 1035   int ms_count() { return ms_count_; } | 
|  | 1036 | 
| 1034   // Iterates over all roots in the heap. | 1037   // Iterates over all roots in the heap. | 
| 1035   void IterateRoots(ObjectVisitor* v, VisitMode mode); | 1038   void IterateRoots(ObjectVisitor* v, VisitMode mode); | 
| 1036   // Iterates over all strong roots in the heap. | 1039   // Iterates over all strong roots in the heap. | 
| 1037   void IterateStrongRoots(ObjectVisitor* v, VisitMode mode); | 1040   void IterateStrongRoots(ObjectVisitor* v, VisitMode mode); | 
| 1038   // Iterates over all the other roots in the heap. | 1041   // Iterates over all the other roots in the heap. | 
| 1039   void IterateWeakRoots(ObjectVisitor* v, VisitMode mode); | 1042   void IterateWeakRoots(ObjectVisitor* v, VisitMode mode); | 
| 1040 | 1043 | 
| 1041   // Iterate pointers to from semispace of new space found in memory interval | 1044   // Iterate pointers to from semispace of new space found in memory interval | 
| 1042   // from start to end. | 1045   // from start to end. | 
| 1043   void IterateAndMarkPointersToFromSpace(Address start, | 1046   void IterateAndMarkPointersToFromSpace(Address start, | 
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1236   // timing of the next GC also need to be adjusted downwards. | 1239   // timing of the next GC also need to be adjusted downwards. | 
| 1237   void LowerOldGenLimits(intptr_t adjustment) { | 1240   void LowerOldGenLimits(intptr_t adjustment) { | 
| 1238     size_of_old_gen_at_last_old_space_gc_ -= adjustment; | 1241     size_of_old_gen_at_last_old_space_gc_ -= adjustment; | 
| 1239     old_gen_promotion_limit_ = | 1242     old_gen_promotion_limit_ = | 
| 1240         OldGenPromotionLimit(size_of_old_gen_at_last_old_space_gc_); | 1243         OldGenPromotionLimit(size_of_old_gen_at_last_old_space_gc_); | 
| 1241     old_gen_allocation_limit_ = | 1244     old_gen_allocation_limit_ = | 
| 1242         OldGenAllocationLimit(size_of_old_gen_at_last_old_space_gc_); | 1245         OldGenAllocationLimit(size_of_old_gen_at_last_old_space_gc_); | 
| 1243   } | 1246   } | 
| 1244 | 1247 | 
| 1245   intptr_t OldGenPromotionLimit(intptr_t old_gen_size) { | 1248   intptr_t OldGenPromotionLimit(intptr_t old_gen_size) { | 
|  | 1249     const int divisor = FLAG_stress_compaction ? 10 : 3; | 
| 1246     intptr_t limit = | 1250     intptr_t limit = | 
| 1247         Max(old_gen_size + old_gen_size / 3, kMinimumPromotionLimit); | 1251         Max(old_gen_size + old_gen_size / divisor, kMinimumPromotionLimit); | 
| 1248     limit += new_space_.Capacity(); | 1252     limit += new_space_.Capacity(); | 
| 1249     limit *= old_gen_limit_factor_; | 1253     limit *= old_gen_limit_factor_; | 
| 1250     return limit; | 1254     return limit; | 
| 1251   } | 1255   } | 
| 1252 | 1256 | 
| 1253   intptr_t OldGenAllocationLimit(intptr_t old_gen_size) { | 1257   intptr_t OldGenAllocationLimit(intptr_t old_gen_size) { | 
|  | 1258     const int divisor = FLAG_stress_compaction ? 8 : 2; | 
| 1254     intptr_t limit = | 1259     intptr_t limit = | 
| 1255         Max(old_gen_size + old_gen_size / 2, kMinimumAllocationLimit); | 1260         Max(old_gen_size + old_gen_size / divisor, kMinimumAllocationLimit); | 
| 1256     limit += new_space_.Capacity(); | 1261     limit += new_space_.Capacity(); | 
| 1257     limit *= old_gen_limit_factor_; | 1262     limit *= old_gen_limit_factor_; | 
| 1258     return limit; | 1263     return limit; | 
| 1259   } | 1264   } | 
| 1260 | 1265 | 
| 1261   // Can be called when the embedding application is idle. | 1266   // Can be called when the embedding application is idle. | 
| 1262   bool IdleNotification(); | 1267   bool IdleNotification(); | 
| 1263 | 1268 | 
| 1264   // Declare all the root indices. | 1269   // Declare all the root indices. | 
| 1265   enum RootListIndex { | 1270   enum RootListIndex { | 
| (...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 2463 | 2468 | 
| 2464   DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 2469   DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 
| 2465 }; | 2470 }; | 
| 2466 #endif  // DEBUG || LIVE_OBJECT_LIST | 2471 #endif  // DEBUG || LIVE_OBJECT_LIST | 
| 2467 | 2472 | 
| 2468 } }  // namespace v8::internal | 2473 } }  // namespace v8::internal | 
| 2469 | 2474 | 
| 2470 #undef HEAP | 2475 #undef HEAP | 
| 2471 | 2476 | 
| 2472 #endif  // V8_HEAP_H_ | 2477 #endif  // V8_HEAP_H_ | 
| OLD | NEW | 
|---|