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

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

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