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 #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 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 if (array->HasPrototypeTransitions()) { | 378 if (array->HasPrototypeTransitions()) { |
379 StaticVisitor::VisitPointer(heap, array, | 379 StaticVisitor::VisitPointer(heap, array, |
380 array->GetPrototypeTransitionsSlot()); | 380 array->GetPrototypeTransitionsSlot()); |
381 } | 381 } |
382 int num_transitions = TransitionArray::NumberOfTransitions(array); | 382 int num_transitions = TransitionArray::NumberOfTransitions(array); |
383 for (int i = 0; i < num_transitions; ++i) { | 383 for (int i = 0; i < num_transitions; ++i) { |
384 StaticVisitor::VisitPointer(heap, array, array->GetKeySlot(i)); | 384 StaticVisitor::VisitPointer(heap, array, array->GetKeySlot(i)); |
385 } | 385 } |
386 // Enqueue the array in linked list of encountered transition arrays if it is | 386 // Enqueue the array in linked list of encountered transition arrays if it is |
387 // not already in the list. | 387 // not already in the list. |
388 if (array->next_link()->IsUndefined()) { | 388 if (array->next_link()->IsUndefined(heap->isolate())) { |
389 Heap* heap = map->GetHeap(); | 389 Heap* heap = map->GetHeap(); |
390 array->set_next_link(heap->encountered_transition_arrays(), | 390 array->set_next_link(heap->encountered_transition_arrays(), |
391 UPDATE_WEAK_WRITE_BARRIER); | 391 UPDATE_WEAK_WRITE_BARRIER); |
392 heap->set_encountered_transition_arrays(array); | 392 heap->set_encountered_transition_arrays(array); |
393 } | 393 } |
394 } | 394 } |
395 | 395 |
396 | 396 |
397 template <typename StaticVisitor> | 397 template <typename StaticVisitor> |
398 void StaticMarkingVisitor<StaticVisitor>::VisitAllocationSite( | 398 void StaticMarkingVisitor<StaticVisitor>::VisitAllocationSite( |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, | 732 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, |
733 void> JSFunctionWeakCodeBodyVisitor; | 733 void> JSFunctionWeakCodeBodyVisitor; |
734 JSFunctionWeakCodeBodyVisitor::Visit(map, object); | 734 JSFunctionWeakCodeBodyVisitor::Visit(map, object); |
735 } | 735 } |
736 | 736 |
737 | 737 |
738 } // namespace internal | 738 } // namespace internal |
739 } // namespace v8 | 739 } // namespace v8 |
740 | 740 |
741 #endif // V8_OBJECTS_VISITING_INL_H_ | 741 #endif // V8_OBJECTS_VISITING_INL_H_ |
OLD | NEW |