Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(19)

Side by Side Diff: src/heap/objects-visiting-inl.h

Issue 1906823002: Move of the type feedback vector to the closure. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/heap/heap.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/array-buffer-tracker.h" 8 #include "src/heap/array-buffer-tracker.h"
9 #include "src/heap/objects-visiting.h" 9 #include "src/heap/objects-visiting.h"
10 #include "src/ic/ic-state.h" 10 #include "src/ic/ic-state.h"
(...skipping 441 matching lines...) Expand 10 before | Expand all | Expand 10 after
452 452
453 453
454 template <typename StaticVisitor> 454 template <typename StaticVisitor>
455 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo( 455 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo(
456 Map* map, HeapObject* object) { 456 Map* map, HeapObject* object) {
457 Heap* heap = map->GetHeap(); 457 Heap* heap = map->GetHeap();
458 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object); 458 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object);
459 if (shared->ic_age() != heap->global_ic_age()) { 459 if (shared->ic_age() != heap->global_ic_age()) {
460 shared->ResetForNewContext(heap->global_ic_age()); 460 shared->ResetForNewContext(heap->global_ic_age());
461 } 461 }
462 if (FLAG_cleanup_code_caches_at_gc) {
463 shared->ClearTypeFeedbackInfoAtGCTime();
464 }
465 if (FLAG_flush_optimized_code_cache) { 462 if (FLAG_flush_optimized_code_cache) {
466 if (!shared->OptimizedCodeMapIsCleared()) { 463 if (!shared->OptimizedCodeMapIsCleared()) {
467 // Always flush the optimized code map if requested by flag. 464 // Always flush the optimized code map if requested by flag.
468 shared->ClearOptimizedCodeMap(); 465 shared->ClearOptimizedCodeMap();
469 } 466 }
470 } 467 }
471 MarkCompactCollector* collector = heap->mark_compact_collector(); 468 MarkCompactCollector* collector = heap->mark_compact_collector();
472 if (collector->is_code_flushing_enabled()) { 469 if (collector->is_code_flushing_enabled()) {
473 if (IsFlushable(heap, shared)) { 470 if (IsFlushable(heap, shared)) {
474 // This function's code looks flushable. But we have to postpone 471 // This function's code looks flushable. But we have to postpone
(...skipping 10 matching lines...) Expand all
485 } 482 }
486 VisitSharedFunctionInfoStrongCode(heap, object); 483 VisitSharedFunctionInfoStrongCode(heap, object);
487 } 484 }
488 485
489 486
490 template <typename StaticVisitor> 487 template <typename StaticVisitor>
491 void StaticMarkingVisitor<StaticVisitor>::VisitJSFunction(Map* map, 488 void StaticMarkingVisitor<StaticVisitor>::VisitJSFunction(Map* map,
492 HeapObject* object) { 489 HeapObject* object) {
493 Heap* heap = map->GetHeap(); 490 Heap* heap = map->GetHeap();
494 JSFunction* function = JSFunction::cast(object); 491 JSFunction* function = JSFunction::cast(object);
492 if (FLAG_cleanup_code_caches_at_gc) {
493 function->ClearTypeFeedbackInfoAtGCTime();
494 }
495 MarkCompactCollector* collector = heap->mark_compact_collector(); 495 MarkCompactCollector* collector = heap->mark_compact_collector();
496 if (collector->is_code_flushing_enabled()) { 496 if (collector->is_code_flushing_enabled()) {
497 if (IsFlushable(heap, function)) { 497 if (IsFlushable(heap, function)) {
498 // This function's code looks flushable. But we have to postpone 498 // This function's code looks flushable. But we have to postpone
499 // the decision until we see all functions that point to the same 499 // the decision until we see all functions that point to the same
500 // SharedFunctionInfo because some of them might be optimized. 500 // SharedFunctionInfo because some of them might be optimized.
501 // That would also make the non-optimized version of the code 501 // That would also make the non-optimized version of the code
502 // non-flushable, because it is required for bailing out from 502 // non-flushable, because it is required for bailing out from
503 // optimized code. 503 // optimized code.
504 collector->code_flusher()->AddCandidate(function); 504 collector->code_flusher()->AddCandidate(function);
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, 732 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode,
733 void> JSFunctionWeakCodeBodyVisitor; 733 void> JSFunctionWeakCodeBodyVisitor;
734 JSFunctionWeakCodeBodyVisitor::Visit(map, object); 734 JSFunctionWeakCodeBodyVisitor::Visit(map, object);
735 } 735 }
736 736
737 737
738 } // namespace internal 738 } // namespace internal
739 } // namespace v8 739 } // namespace v8
740 740
741 #endif // V8_OBJECTS_VISITING_INL_H_ 741 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/ia32/macro-assembler-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698