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_OBJECTS_VISITING_INL_H_ | 5 #ifndef V8_OBJECTS_VISITING_INL_H_ |
6 #define V8_OBJECTS_VISITING_INL_H_ | 6 #define V8_OBJECTS_VISITING_INL_H_ |
7 | 7 |
8 #include "src/heap/objects-visiting.h" | 8 #include "src/heap/objects-visiting.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
402 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo( | 402 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo( |
403 Map* map, HeapObject* object) { | 403 Map* map, HeapObject* object) { |
404 Heap* heap = map->GetHeap(); | 404 Heap* heap = map->GetHeap(); |
405 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object); | 405 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object); |
406 if (shared->ic_age() != heap->global_ic_age()) { | 406 if (shared->ic_age() != heap->global_ic_age()) { |
407 shared->ResetForNewContext(heap->global_ic_age()); | 407 shared->ResetForNewContext(heap->global_ic_age()); |
408 } | 408 } |
409 if (FLAG_cleanup_code_caches_at_gc) { | 409 if (FLAG_cleanup_code_caches_at_gc) { |
410 shared->ClearTypeFeedbackInfoAtGCTime(); | 410 shared->ClearTypeFeedbackInfoAtGCTime(); |
411 } | 411 } |
412 if (FLAG_flush_optimized_code_cache && | 412 if ((FLAG_flush_optimized_code_cache || |
| 413 heap->isolate()->serializer_enabled()) && |
413 !shared->optimized_code_map()->IsSmi()) { | 414 !shared->optimized_code_map()->IsSmi()) { |
414 // Always flush the optimized code map if requested by flag. | 415 // Always flush the optimized code map if requested by flag. |
415 shared->ClearOptimizedCodeMap(); | 416 shared->ClearOptimizedCodeMap(); |
416 } | 417 } |
417 MarkCompactCollector* collector = heap->mark_compact_collector(); | 418 MarkCompactCollector* collector = heap->mark_compact_collector(); |
418 if (collector->is_code_flushing_enabled()) { | 419 if (collector->is_code_flushing_enabled()) { |
419 if (!shared->optimized_code_map()->IsSmi()) { | 420 if (!shared->optimized_code_map()->IsSmi()) { |
420 // Add the shared function info holding an optimized code map to | 421 // Add the shared function info holding an optimized code map to |
421 // the code flusher for processing of code maps after marking. | 422 // the code flusher for processing of code maps after marking. |
422 collector->code_flusher()->AddOptimizedCodeMap(shared); | 423 collector->code_flusher()->AddOptimizedCodeMap(shared); |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
835 | 836 |
836 RelocIterator it(this, mode_mask); | 837 RelocIterator it(this, mode_mask); |
837 for (; !it.done(); it.next()) { | 838 for (; !it.done(); it.next()) { |
838 it.rinfo()->template Visit<StaticVisitor>(heap); | 839 it.rinfo()->template Visit<StaticVisitor>(heap); |
839 } | 840 } |
840 } | 841 } |
841 } | 842 } |
842 } // namespace v8::internal | 843 } // namespace v8::internal |
843 | 844 |
844 #endif // V8_OBJECTS_VISITING_INL_H_ | 845 #endif // V8_OBJECTS_VISITING_INL_H_ |
OLD | NEW |