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

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

Issue 1563213002: Type Feedback Vector lives in the closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Exclude an ignition test. Created 4 years, 11 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/builtins-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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 439
440 440
441 template <typename StaticVisitor> 441 template <typename StaticVisitor>
442 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo( 442 void StaticMarkingVisitor<StaticVisitor>::VisitSharedFunctionInfo(
443 Map* map, HeapObject* object) { 443 Map* map, HeapObject* object) {
444 Heap* heap = map->GetHeap(); 444 Heap* heap = map->GetHeap();
445 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object); 445 SharedFunctionInfo* shared = SharedFunctionInfo::cast(object);
446 if (shared->ic_age() != heap->global_ic_age()) { 446 if (shared->ic_age() != heap->global_ic_age()) {
447 shared->ResetForNewContext(heap->global_ic_age()); 447 shared->ResetForNewContext(heap->global_ic_age());
448 } 448 }
449 if (FLAG_cleanup_code_caches_at_gc) {
450 shared->ClearTypeFeedbackInfoAtGCTime();
451 }
452 if (FLAG_flush_optimized_code_cache) { 449 if (FLAG_flush_optimized_code_cache) {
453 if (!shared->OptimizedCodeMapIsCleared()) { 450 if (!shared->OptimizedCodeMapIsCleared()) {
454 // Always flush the optimized code map if requested by flag. 451 // Always flush the optimized code map if requested by flag.
455 shared->ClearOptimizedCodeMap(); 452 shared->ClearOptimizedCodeMap();
456 } 453 }
457 } 454 }
458 MarkCompactCollector* collector = heap->mark_compact_collector(); 455 MarkCompactCollector* collector = heap->mark_compact_collector();
459 if (collector->is_code_flushing_enabled()) { 456 if (collector->is_code_flushing_enabled()) {
460 if (IsFlushable(heap, shared)) { 457 if (IsFlushable(heap, shared)) {
461 // This function's code looks flushable. But we have to postpone 458 // This function's code looks flushable. But we have to postpone
(...skipping 10 matching lines...) Expand all
472 } 469 }
473 VisitSharedFunctionInfoStrongCode(heap, object); 470 VisitSharedFunctionInfoStrongCode(heap, object);
474 } 471 }
475 472
476 473
477 template <typename StaticVisitor> 474 template <typename StaticVisitor>
478 void StaticMarkingVisitor<StaticVisitor>::VisitJSFunction(Map* map, 475 void StaticMarkingVisitor<StaticVisitor>::VisitJSFunction(Map* map,
479 HeapObject* object) { 476 HeapObject* object) {
480 Heap* heap = map->GetHeap(); 477 Heap* heap = map->GetHeap();
481 JSFunction* function = JSFunction::cast(object); 478 JSFunction* function = JSFunction::cast(object);
479 if (FLAG_cleanup_code_caches_at_gc) {
480 function->ClearTypeFeedbackInfoAtGCTime();
481 }
482
482 MarkCompactCollector* collector = heap->mark_compact_collector(); 483 MarkCompactCollector* collector = heap->mark_compact_collector();
483 if (collector->is_code_flushing_enabled()) { 484 if (collector->is_code_flushing_enabled()) {
484 if (IsFlushable(heap, function)) { 485 if (IsFlushable(heap, function)) {
485 // This function's code looks flushable. But we have to postpone 486 // This function's code looks flushable. But we have to postpone
486 // the decision until we see all functions that point to the same 487 // the decision until we see all functions that point to the same
487 // SharedFunctionInfo because some of them might be optimized. 488 // SharedFunctionInfo because some of them might be optimized.
488 // That would also make the non-optimized version of the code 489 // That would also make the non-optimized version of the code
489 // non-flushable, because it is required for bailing out from 490 // non-flushable, because it is required for bailing out from
490 // optimized code. 491 // optimized code.
491 collector->code_flusher()->AddCandidate(function); 492 collector->code_flusher()->AddCandidate(function);
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
719 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, 720 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode,
720 void> JSFunctionWeakCodeBodyVisitor; 721 void> JSFunctionWeakCodeBodyVisitor;
721 JSFunctionWeakCodeBodyVisitor::Visit(map, object); 722 JSFunctionWeakCodeBodyVisitor::Visit(map, object);
722 } 723 }
723 724
724 725
725 } // namespace internal 726 } // namespace internal
726 } // namespace v8 727 } // namespace v8
727 728
728 #endif // V8_OBJECTS_VISITING_INL_H_ 729 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698