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

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

Issue 941503003: Revert "Remove IC age from Code." (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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/objects.h » ('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 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 255
256 template <typename StaticVisitor> 256 template <typename StaticVisitor>
257 void StaticMarkingVisitor<StaticVisitor>::VisitCodeTarget(Heap* heap, 257 void StaticMarkingVisitor<StaticVisitor>::VisitCodeTarget(Heap* heap,
258 RelocInfo* rinfo) { 258 RelocInfo* rinfo) {
259 DCHECK(RelocInfo::IsCodeTarget(rinfo->rmode())); 259 DCHECK(RelocInfo::IsCodeTarget(rinfo->rmode()));
260 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); 260 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address());
261 // Monomorphic ICs are preserved when possible, but need to be flushed 261 // Monomorphic ICs are preserved when possible, but need to be flushed
262 // when they might be keeping a Context alive, or when the heap is about 262 // when they might be keeping a Context alive, or when the heap is about
263 // to be serialized. 263 // to be serialized.
264 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub() && 264 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub() &&
265 !target->is_call_stub() && heap->isolate()->serializer_enabled()) { 265 !target->is_call_stub() && (heap->isolate()->serializer_enabled() ||
266 target->ic_age() != heap->global_ic_age())) {
266 ICUtility::Clear(heap->isolate(), rinfo->pc(), 267 ICUtility::Clear(heap->isolate(), rinfo->pc(),
267 rinfo->host()->constant_pool()); 268 rinfo->host()->constant_pool());
268 target = Code::GetCodeFromTargetAddress(rinfo->target_address()); 269 target = Code::GetCodeFromTargetAddress(rinfo->target_address());
269 } 270 }
270 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target); 271 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target);
271 StaticVisitor::MarkObject(heap, target); 272 StaticVisitor::MarkObject(heap, target);
272 } 273 }
273 274
274 275
275 template <typename StaticVisitor> 276 template <typename StaticVisitor>
(...skipping 624 matching lines...) Expand 10 before | Expand all | Expand 10 after
900 901
901 RelocIterator it(this, mode_mask); 902 RelocIterator it(this, mode_mask);
902 for (; !it.done(); it.next()) { 903 for (; !it.done(); it.next()) {
903 it.rinfo()->template Visit<StaticVisitor>(heap); 904 it.rinfo()->template Visit<StaticVisitor>(heap);
904 } 905 }
905 } 906 }
906 } 907 }
907 } // namespace v8::internal 908 } // namespace v8::internal
908 909
909 #endif // V8_OBJECTS_VISITING_INL_H_ 910 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/heap/heap.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698