| 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 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 HeapObject::RawField(object, AllocationSite::kPointerFieldsBeginOffset), | 421 HeapObject::RawField(object, AllocationSite::kPointerFieldsBeginOffset), |
| 422 HeapObject::RawField(object, AllocationSite::kPointerFieldsEndOffset)); | 422 HeapObject::RawField(object, AllocationSite::kPointerFieldsEndOffset)); |
| 423 } | 423 } |
| 424 | 424 |
| 425 | 425 |
| 426 template<typename StaticVisitor> | 426 template<typename StaticVisitor> |
| 427 void StaticMarkingVisitor<StaticVisitor>::VisitCode( | 427 void StaticMarkingVisitor<StaticVisitor>::VisitCode( |
| 428 Map* map, HeapObject* object) { | 428 Map* map, HeapObject* object) { |
| 429 Heap* heap = map->GetHeap(); | 429 Heap* heap = map->GetHeap(); |
| 430 Code* code = Code::cast(object); | 430 Code* code = Code::cast(object); |
| 431 if (FLAG_cleanup_code_caches_at_gc) { | |
| 432 code->ClearTypeFeedbackInfo(heap); | |
| 433 } | |
| 434 if (FLAG_age_code && !Serializer::enabled()) { | 431 if (FLAG_age_code && !Serializer::enabled()) { |
| 435 code->MakeOlder(heap->mark_compact_collector()->marking_parity()); | 432 code->MakeOlder(heap->mark_compact_collector()->marking_parity()); |
| 436 } | 433 } |
| 437 code->CodeIterateBody<StaticVisitor>(heap); | 434 code->CodeIterateBody<StaticVisitor>(heap); |
| 438 } | 435 } |
| 439 | 436 |
| 440 | 437 |
| 441 template<typename StaticVisitor> | 438 template<typename StaticVisitor> |
| 442 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo( | 439 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo( |
| 443 Map* map, HeapObject* object) { | 440 Map* map, HeapObject* object) { |
| 444 Heap* heap = map->GetHeap(); | 441 Heap* heap = map->GetHeap(); |
| 445 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object); | 442 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object); |
| 446 if (shared->ic_age() != heap->global_ic_age()) { | 443 if (shared->ic_age() != heap->global_ic_age()) { |
| 447 shared->ResetForNewContext(heap->global_ic_age()); | 444 shared->ResetForNewContext(heap->global_ic_age()); |
| 448 } | 445 } |
| 446 if (FLAG_cleanup_code_caches_at_gc) { |
| 447 shared->ClearTypeFeedbackInfo(heap); |
| 448 } |
| 449 if (FLAG_cache_optimized_code && | 449 if (FLAG_cache_optimized_code && |
| 450 FLAG_flush_optimized_code_cache && | 450 FLAG_flush_optimized_code_cache && |
| 451 !shared->optimized_code_map()->IsSmi()) { | 451 !shared->optimized_code_map()->IsSmi()) { |
| 452 // Always flush the optimized code map if requested by flag. | 452 // Always flush the optimized code map if requested by flag. |
| 453 shared->ClearOptimizedCodeMap(); | 453 shared->ClearOptimizedCodeMap(); |
| 454 } | 454 } |
| 455 MarkCompactCollector* collector = heap->mark_compact_collector(); | 455 MarkCompactCollector* collector = heap->mark_compact_collector(); |
| 456 if (collector->is_code_flushing_enabled()) { | 456 if (collector->is_code_flushing_enabled()) { |
| 457 if (FLAG_cache_optimized_code && !shared->optimized_code_map()->IsSmi()) { | 457 if (FLAG_cache_optimized_code && !shared->optimized_code_map()->IsSmi()) { |
| 458 // Add the shared function info holding an optimized code map to | 458 // Add the shared function info holding an optimized code map to |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 954 RelocIterator it(this, mode_mask); | 954 RelocIterator it(this, mode_mask); |
| 955 for (; !it.done(); it.next()) { | 955 for (; !it.done(); it.next()) { |
| 956 it.rinfo()->template Visit<StaticVisitor>(heap); | 956 it.rinfo()->template Visit<StaticVisitor>(heap); |
| 957 } | 957 } |
| 958 } | 958 } |
| 959 | 959 |
| 960 | 960 |
| 961 } } // namespace v8::internal | 961 } } // namespace v8::internal |
| 962 | 962 |
| 963 #endif // V8_OBJECTS_VISITING_INL_H_ | 963 #endif // V8_OBJECTS_VISITING_INL_H_ |
| OLD | NEW |