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

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

Issue 525343002: Do not clear weak monomorphic IC after context disposal. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 template <typename StaticVisitor> 254 template <typename StaticVisitor>
255 void StaticMarkingVisitor<StaticVisitor>::VisitCodeTarget(Heap* heap, 255 void StaticMarkingVisitor<StaticVisitor>::VisitCodeTarget(Heap* heap,
256 RelocInfo* rinfo) { 256 RelocInfo* rinfo) {
257 DCHECK(RelocInfo::IsCodeTarget(rinfo->rmode())); 257 DCHECK(RelocInfo::IsCodeTarget(rinfo->rmode()));
258 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); 258 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address());
259 // Monomorphic ICs are preserved when possible, but need to be flushed 259 // Monomorphic ICs are preserved when possible, but need to be flushed
260 // when they might be keeping a Context alive, or when the heap is about 260 // when they might be keeping a Context alive, or when the heap is about
261 // to be serialized. 261 // to be serialized.
262 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub() && 262 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub() &&
263 (target->ic_state() == MEGAMORPHIC || target->ic_state() == GENERIC || 263 (target->ic_state() == MEGAMORPHIC || target->ic_state() == GENERIC ||
264 target->ic_state() == POLYMORPHIC || heap->flush_monomorphic_ics() || 264 target->ic_state() == POLYMORPHIC ||
265 (heap->flush_monomorphic_ics() && !target->is_weak_stub()) ||
265 heap->isolate()->serializer_enabled() || 266 heap->isolate()->serializer_enabled() ||
266 target->ic_age() != heap->global_ic_age() || 267 target->ic_age() != heap->global_ic_age() ||
267 target->is_invalidated_weak_stub())) { 268 target->is_invalidated_weak_stub())) {
268 IC::Clear(heap->isolate(), rinfo->pc(), rinfo->host()->constant_pool()); 269 IC::Clear(heap->isolate(), rinfo->pc(), rinfo->host()->constant_pool());
269 target = Code::GetCodeFromTargetAddress(rinfo->target_address()); 270 target = Code::GetCodeFromTargetAddress(rinfo->target_address());
270 } 271 }
271 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target); 272 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target);
272 StaticVisitor::MarkObject(heap, target); 273 StaticVisitor::MarkObject(heap, target);
273 } 274 }
274 275
(...skipping 648 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 924
924 RelocIterator it(this, mode_mask); 925 RelocIterator it(this, mode_mask);
925 for (; !it.done(); it.next()) { 926 for (; !it.done(); it.next()) {
926 it.rinfo()->template Visit<StaticVisitor>(heap); 927 it.rinfo()->template Visit<StaticVisitor>(heap);
927 } 928 }
928 } 929 }
929 } 930 }
930 } // namespace v8::internal 931 } // namespace v8::internal
931 932
932 #endif // V8_OBJECTS_VISITING_INL_H_ 933 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698