OLD | NEW |
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 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 || | 264 target->ic_state() == POLYMORPHIC || |
265 (heap->flush_monomorphic_ics() && !target->is_weak_stub()) || | 265 (heap->flush_monomorphic_ics() && !target->is_weak_stub()) || |
266 heap->isolate()->serializer_enabled() || | 266 heap->isolate()->serializer_enabled() || |
267 target->ic_age() != heap->global_ic_age() || | 267 target->ic_age() != heap->global_ic_age() || |
268 target->is_invalidated_weak_stub())) { | 268 target->is_invalidated_weak_stub())) { |
269 IC::Clear(heap->isolate(), rinfo->pc(), rinfo->host()->constant_pool()); | 269 ICUtility::Clear(heap->isolate(), rinfo->pc(), |
| 270 rinfo->host()->constant_pool()); |
270 target = Code::GetCodeFromTargetAddress(rinfo->target_address()); | 271 target = Code::GetCodeFromTargetAddress(rinfo->target_address()); |
271 } | 272 } |
272 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target); | 273 heap->mark_compact_collector()->RecordRelocSlot(rinfo, target); |
273 StaticVisitor::MarkObject(heap, target); | 274 StaticVisitor::MarkObject(heap, target); |
274 } | 275 } |
275 | 276 |
276 | 277 |
277 template <typename StaticVisitor> | 278 template <typename StaticVisitor> |
278 void StaticMarkingVisitor<StaticVisitor>::VisitCodeAgeSequence( | 279 void StaticMarkingVisitor<StaticVisitor>::VisitCodeAgeSequence( |
279 Heap* heap, RelocInfo* rinfo) { | 280 Heap* heap, RelocInfo* rinfo) { |
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
924 | 925 |
925 RelocIterator it(this, mode_mask); | 926 RelocIterator it(this, mode_mask); |
926 for (; !it.done(); it.next()) { | 927 for (; !it.done(); it.next()) { |
927 it.rinfo()->template Visit<StaticVisitor>(heap); | 928 it.rinfo()->template Visit<StaticVisitor>(heap); |
928 } | 929 } |
929 } | 930 } |
930 } | 931 } |
931 } // namespace v8::internal | 932 } // namespace v8::internal |
932 | 933 |
933 #endif // V8_OBJECTS_VISITING_INL_H_ | 934 #endif // V8_OBJECTS_VISITING_INL_H_ |
OLD | NEW |