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 298 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 Heap* heap = map->GetHeap(); | 309 Heap* heap = map->GetHeap(); |
310 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object); | 310 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object); |
311 if (shared->ic_age() != heap->global_ic_age()) { | 311 if (shared->ic_age() != heap->global_ic_age()) { |
312 shared->ResetForNewContext(heap->global_ic_age()); | 312 shared->ResetForNewContext(heap->global_ic_age()); |
313 } | 313 } |
314 if (FLAG_cache_optimized_code) { | 314 if (FLAG_cache_optimized_code) { |
315 // Flush optimized code map on major GC. | 315 // Flush optimized code map on major GC. |
316 // TODO(mstarzinger): We may experiment with rebuilding it or with | 316 // TODO(mstarzinger): We may experiment with rebuilding it or with |
317 // retaining entries which should survive as we iterate through | 317 // retaining entries which should survive as we iterate through |
318 // optimized functions anyway. | 318 // optimized functions anyway. |
319 shared->ClearOptimizedCodeMap(); | 319 shared->ClearOptimizedCodeMap("during full gc"); |
320 } | 320 } |
321 MarkCompactCollector* collector = heap->mark_compact_collector(); | 321 MarkCompactCollector* collector = heap->mark_compact_collector(); |
322 if (collector->is_code_flushing_enabled()) { | 322 if (collector->is_code_flushing_enabled()) { |
323 if (IsFlushable(heap, shared)) { | 323 if (IsFlushable(heap, shared)) { |
324 // This function's code looks flushable. But we have to postpone | 324 // This function's code looks flushable. But we have to postpone |
325 // the decision until we see all functions that point to the same | 325 // the decision until we see all functions that point to the same |
326 // SharedFunctionInfo because some of them might be optimized. | 326 // SharedFunctionInfo because some of them might be optimized. |
327 // That would also make the non-optimized version of the code | 327 // That would also make the non-optimized version of the code |
328 // non-flushable, because it is required for bailing out from | 328 // non-flushable, because it is required for bailing out from |
329 // optimized code. | 329 // optimized code. |
(...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
725 RelocIterator it(this, mode_mask); | 725 RelocIterator it(this, mode_mask); |
726 for (; !it.done(); it.next()) { | 726 for (; !it.done(); it.next()) { |
727 it.rinfo()->template Visit<StaticVisitor>(heap); | 727 it.rinfo()->template Visit<StaticVisitor>(heap); |
728 } | 728 } |
729 } | 729 } |
730 | 730 |
731 | 731 |
732 } } // namespace v8::internal | 732 } } // namespace v8::internal |
733 | 733 |
734 #endif // V8_OBJECTS_VISITING_INL_H_ | 734 #endif // V8_OBJECTS_VISITING_INL_H_ |
OLD | NEW |