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

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

Issue 1483003002: Revert of Introduce instance type for transition arrays. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/objects-visiting.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 #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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
172 // Registration for kVisitJSRegExp is done by StaticVisitor. 172 // Registration for kVisitJSRegExp is done by StaticVisitor.
173 173
174 table_.Register( 174 table_.Register(
175 kVisitCell, 175 kVisitCell,
176 &FixedBodyVisitor<StaticVisitor, Cell::BodyDescriptor, void>::Visit); 176 &FixedBodyVisitor<StaticVisitor, Cell::BodyDescriptor, void>::Visit);
177 177
178 table_.Register(kVisitPropertyCell, &VisitPropertyCell); 178 table_.Register(kVisitPropertyCell, &VisitPropertyCell);
179 179
180 table_.Register(kVisitWeakCell, &VisitWeakCell); 180 table_.Register(kVisitWeakCell, &VisitWeakCell);
181 181
182 table_.Register(kVisitTransitionArray, &VisitTransitionArray);
183
184 table_.template RegisterSpecializations<DataObjectVisitor, kVisitDataObject, 182 table_.template RegisterSpecializations<DataObjectVisitor, kVisitDataObject,
185 kVisitDataObjectGeneric>(); 183 kVisitDataObjectGeneric>();
186 184
187 table_.template RegisterSpecializations<JSObjectVisitor, kVisitJSObject, 185 table_.template RegisterSpecializations<JSObjectVisitor, kVisitJSObject,
188 kVisitJSObjectGeneric>(); 186 kVisitJSObjectGeneric>();
189 187
190 table_.template RegisterSpecializations<StructObjectVisitor, kVisitStruct, 188 table_.template RegisterSpecializations<StructObjectVisitor, kVisitStruct,
191 kVisitStructGeneric>(); 189 kVisitStructGeneric>();
192 } 190 }
193 191
(...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // closure. 335 // closure.
338 weak_cell->set_next(heap->encountered_weak_cells(), 336 weak_cell->set_next(heap->encountered_weak_cells(),
339 UPDATE_WEAK_WRITE_BARRIER); 337 UPDATE_WEAK_WRITE_BARRIER);
340 heap->set_encountered_weak_cells(weak_cell); 338 heap->set_encountered_weak_cells(weak_cell);
341 } 339 }
342 } 340 }
343 } 341 }
344 342
345 343
346 template <typename StaticVisitor> 344 template <typename StaticVisitor>
347 void StaticMarkingVisitor<StaticVisitor>::VisitTransitionArray(
348 Map* map, HeapObject* object) {
349 typedef FlexibleBodyVisitor<StaticVisitor, TransitionArray::BodyDescriptor,
350 int> TransitionArrayBodyVisitor;
351 TransitionArray* array = TransitionArray::cast(object);
352 // Enqueue the array in linked list of encountered transition arrays if it is
353 // not already in the list.
354 if (array->next_link()->IsUndefined()) {
355 Heap* heap = map->GetHeap();
356 array->set_next_link(heap->encountered_transition_arrays(),
357 UPDATE_WEAK_WRITE_BARRIER);
358 heap->set_encountered_transition_arrays(array);
359 }
360 // TODO(ulan): Move MarkTransitionArray logic here.
361 TransitionArrayBodyVisitor::Visit(map, object);
362 }
363
364
365 template <typename StaticVisitor>
366 void StaticMarkingVisitor<StaticVisitor>::VisitAllocationSite( 345 void StaticMarkingVisitor<StaticVisitor>::VisitAllocationSite(
367 Map* map, HeapObject* object) { 346 Map* map, HeapObject* object) {
368 Heap* heap = map->GetHeap(); 347 Heap* heap = map->GetHeap();
369 348
370 StaticVisitor::VisitPointers( 349 StaticVisitor::VisitPointers(
371 heap, object, 350 heap, object,
372 HeapObject::RawField(object, AllocationSite::kPointerFieldsBeginOffset), 351 HeapObject::RawField(object, AllocationSite::kPointerFieldsBeginOffset),
373 HeapObject::RawField(object, AllocationSite::kPointerFieldsEndOffset)); 352 HeapObject::RawField(object, AllocationSite::kPointerFieldsEndOffset));
374 } 353 }
375 354
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
773 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode, 752 typedef FlexibleBodyVisitor<StaticVisitor, JSFunction::BodyDescriptorWeakCode,
774 void> JSFunctionWeakCodeBodyVisitor; 753 void> JSFunctionWeakCodeBodyVisitor;
775 JSFunctionWeakCodeBodyVisitor::Visit(map, object); 754 JSFunctionWeakCodeBodyVisitor::Visit(map, object);
776 } 755 }
777 756
778 757
779 } // namespace internal 758 } // namespace internal
780 } // namespace v8 759 } // namespace v8
781 760
782 #endif // V8_OBJECTS_VISITING_INL_H_ 761 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/heap/objects-visiting.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698