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

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

Issue 279423005: Customized support for feedback on calls to Array. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 7 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
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 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 280
281 template<typename StaticVisitor> 281 template<typename StaticVisitor>
282 void StaticMarkingVisitor<StaticVisitor>::VisitCodeTarget( 282 void StaticMarkingVisitor<StaticVisitor>::VisitCodeTarget(
283 Heap* heap, RelocInfo* rinfo) { 283 Heap* heap, RelocInfo* rinfo) {
284 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode())); 284 ASSERT(RelocInfo::IsCodeTarget(rinfo->rmode()));
285 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address()); 285 Code* target = Code::GetCodeFromTargetAddress(rinfo->target_address());
286 // Monomorphic ICs are preserved when possible, but need to be flushed 286 // Monomorphic ICs are preserved when possible, but need to be flushed
287 // when they might be keeping a Context alive, or when the heap is about 287 // when they might be keeping a Context alive, or when the heap is about
288 // to be serialized. 288 // to be serialized.
289 289
290 // TODO(mvstanton): CALL_IC in monomorphic state needs to be cleared because
291 // it's state is synced with a type feedback slot, which is always cleared on
292 // gc. If we leave it alone, we'll end up in a hybrid of (cleared feedback
293 // slot but monomorphic IC), which is complex.
290 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub() 294 if (FLAG_cleanup_code_caches_at_gc && target->is_inline_cache_stub()
291 && (target->ic_state() == MEGAMORPHIC || target->ic_state() == GENERIC || 295 && (target->ic_state() == MEGAMORPHIC || target->ic_state() == GENERIC ||
292 target->ic_state() == POLYMORPHIC || heap->flush_monomorphic_ics() || 296 target->ic_state() == POLYMORPHIC || heap->flush_monomorphic_ics() ||
297 (target->ic_state() == MONOMORPHIC &&
298 target->kind() == Code::CALL_IC) ||
danno 2014/05/16 16:34:11 This code can be removed.
mvstanton 2014/05/19 13:45:24 Done.
293 Serializer::enabled(heap->isolate()) || 299 Serializer::enabled(heap->isolate()) ||
294 target->ic_age() != heap->global_ic_age() || 300 target->ic_age() != heap->global_ic_age() ||
295 target->is_invalidated_weak_stub())) { 301 target->is_invalidated_weak_stub())) {
296 IC::Clear(heap->isolate(), rinfo->pc(), rinfo->host()->constant_pool()); 302 IC::Clear(heap->isolate(), rinfo->pc(), rinfo->host()->constant_pool());
297 target = Code::GetCodeFromTargetAddress(rinfo->target_address()); 303 target = Code::GetCodeFromTargetAddress(rinfo->target_address());
298 } 304 }
299 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target); 305 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target);
300 StaticVisitor::MarkObject(heap, target); 306 StaticVisitor::MarkObject(heap, target);
301 } 307 }
302 308
(...skipping 629 matching lines...) Expand 10 before | Expand all | Expand 10 after
932 RelocIterator it(this, mode_mask); 938 RelocIterator it(this, mode_mask);
933 for (; !it.done(); it.next()) { 939 for (; !it.done(); it.next()) {
934 it.rinfo()->template Visit<StaticVisitor>(heap); 940 it.rinfo()->template Visit<StaticVisitor>(heap);
935 } 941 }
936 } 942 }
937 943
938 944
939 } } // namespace v8::internal 945 } } // namespace v8::internal
940 946
941 #endif // V8_OBJECTS_VISITING_INL_H_ 947 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698