| 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 1234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1245 void CollectAllAvailableGarbage(const char* gc_reason = NULL); | 1245 void CollectAllAvailableGarbage(const char* gc_reason = NULL); |
| 1246 | 1246 |
| 1247 // Check whether the heap is currently iterable. | 1247 // Check whether the heap is currently iterable. |
| 1248 bool IsHeapIterable(); | 1248 bool IsHeapIterable(); |
| 1249 | 1249 |
| 1250 // Ensure that we have swept all spaces in such a way that we can iterate | 1250 // Ensure that we have swept all spaces in such a way that we can iterate |
| 1251 // over all objects. May cause a GC. | 1251 // over all objects. May cause a GC. |
| 1252 void EnsureHeapIsIterable(); | 1252 void EnsureHeapIsIterable(); |
| 1253 | 1253 |
| 1254 // Notify the heap that a context has been disposed. | 1254 // Notify the heap that a context has been disposed. |
| 1255 int NotifyContextDisposed(); | 1255 int NotifyContextDisposed() { |
| 1256 flush_monomorphic_ics_ = true; |
| 1257 return ++contexts_disposed_; |
| 1258 } |
| 1256 | 1259 |
| 1257 // Utility to invoke the scavenger. This is needed in test code to | 1260 // Utility to invoke the scavenger. This is needed in test code to |
| 1258 // ensure correct callback for weak global handles. | 1261 // ensure correct callback for weak global handles. |
| 1259 void PerformScavenge(); | 1262 void PerformScavenge(); |
| 1260 | 1263 |
| 1261 inline void increment_scan_on_scavenge_pages() { | 1264 inline void increment_scan_on_scavenge_pages() { |
| 1262 scan_on_scavenge_pages_++; | 1265 scan_on_scavenge_pages_++; |
| 1263 if (FLAG_gc_verbose) { | 1266 if (FLAG_gc_verbose) { |
| 1264 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_); | 1267 PrintF("Scan-on-scavenge pages: %d\n", scan_on_scavenge_pages_); |
| 1265 } | 1268 } |
| (...skipping 1773 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3039 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. | 3042 DisallowHeapAllocation no_allocation; // i.e. no gc allowed. |
| 3040 | 3043 |
| 3041 private: | 3044 private: |
| 3042 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); | 3045 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); |
| 3043 }; | 3046 }; |
| 3044 #endif // DEBUG | 3047 #endif // DEBUG |
| 3045 | 3048 |
| 3046 } } // namespace v8::internal | 3049 } } // namespace v8::internal |
| 3047 | 3050 |
| 3048 #endif // V8_HEAP_H_ | 3051 #endif // V8_HEAP_H_ |
| OLD | NEW |