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

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

Issue 1179873003: Serializer: support all alignment kinds. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix assertion conditional Created 5 years, 6 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
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/snapshot/serialize.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/objects-visiting.h" 8 #include "src/heap/objects-visiting.h"
9 9
10 namespace v8 { 10 namespace v8 {
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 HeapObject::RawField(object, PropertyCell::kPointerFieldsBeginOffset), 322 HeapObject::RawField(object, PropertyCell::kPointerFieldsBeginOffset),
323 HeapObject::RawField(object, PropertyCell::kPointerFieldsEndOffset)); 323 HeapObject::RawField(object, PropertyCell::kPointerFieldsEndOffset));
324 } 324 }
325 325
326 326
327 template <typename StaticVisitor> 327 template <typename StaticVisitor>
328 void StaticMarkingVisitor<StaticVisitor>::VisitWeakCell(Map* map, 328 void StaticMarkingVisitor<StaticVisitor>::VisitWeakCell(Map* map,
329 HeapObject* object) { 329 HeapObject* object) {
330 Heap* heap = map->GetHeap(); 330 Heap* heap = map->GetHeap();
331 WeakCell* weak_cell = reinterpret_cast<WeakCell*>(object); 331 WeakCell* weak_cell = reinterpret_cast<WeakCell*>(object);
332 Object* undefined = heap->undefined_value(); 332 Object* the_hole = heap->the_hole_value();
333 // Enqueue weak cell in linked list of encountered weak collections. 333 // Enqueue weak cell in linked list of encountered weak collections.
334 // We can ignore weak cells with cleared values because they will always 334 // We can ignore weak cells with cleared values because they will always
335 // contain smi zero. 335 // contain smi zero.
336 if (weak_cell->next() == undefined && !weak_cell->cleared()) { 336 if (weak_cell->next() == the_hole && !weak_cell->cleared()) {
337 weak_cell->set_next(heap->encountered_weak_cells(), 337 weak_cell->set_next(heap->encountered_weak_cells(),
338 UPDATE_WEAK_WRITE_BARRIER); 338 UPDATE_WEAK_WRITE_BARRIER);
339 heap->set_encountered_weak_cells(weak_cell); 339 heap->set_encountered_weak_cells(weak_cell);
340 } 340 }
341 } 341 }
342 342
343 343
344 template <typename StaticVisitor> 344 template <typename StaticVisitor>
345 void StaticMarkingVisitor<StaticVisitor>::VisitAllocationSite( 345 void StaticMarkingVisitor<StaticVisitor>::VisitAllocationSite(
346 Map* map, HeapObject* object) { 346 Map* map, HeapObject* object) {
(...skipping 489 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 836
837 RelocIterator it(this, mode_mask); 837 RelocIterator it(this, mode_mask);
838 for (; !it.done(); it.next()) { 838 for (; !it.done(); it.next()) {
839 it.rinfo()->template Visit<StaticVisitor>(heap); 839 it.rinfo()->template Visit<StaticVisitor>(heap);
840 } 840 }
841 } 841 }
842 } 842 }
843 } // namespace v8::internal 843 } // namespace v8::internal
844 844
845 #endif // V8_OBJECTS_VISITING_INL_H_ 845 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/snapshot/serialize.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698