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

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

Issue 1115043005: Revert of Remove the weak list of array buffers (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« 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 8
9 namespace v8 { 9 namespace v8 {
10 namespace internal { 10 namespace internal {
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 table_.template RegisterSpecializations<StructVisitor, kVisitStruct, 73 table_.template RegisterSpecializations<StructVisitor, kVisitStruct,
74 kVisitStructGeneric>(); 74 kVisitStructGeneric>();
75 } 75 }
76 76
77 77
78 template <typename StaticVisitor> 78 template <typename StaticVisitor>
79 int StaticNewSpaceVisitor<StaticVisitor>::VisitJSArrayBuffer( 79 int StaticNewSpaceVisitor<StaticVisitor>::VisitJSArrayBuffer(
80 Map* map, HeapObject* object) { 80 Map* map, HeapObject* object) {
81 Heap* heap = map->GetHeap(); 81 Heap* heap = map->GetHeap();
82 82
83 VisitPointers(heap, HeapObject::RawField(
84 object, JSArrayBuffer::BodyDescriptor::kStartOffset),
85 HeapObject::RawField(object, JSArrayBuffer::kWeakNextOffset));
83 VisitPointers( 86 VisitPointers(
84 heap, 87 heap, HeapObject::RawField(object,
85 HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset), 88 JSArrayBuffer::kWeakNextOffset + kPointerSize),
86 HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields)); 89 HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields));
87 return JSArrayBuffer::kSizeWithInternalFields; 90 return JSArrayBuffer::kSizeWithInternalFields;
88 } 91 }
89 92
90 93
91 template <typename StaticVisitor> 94 template <typename StaticVisitor>
92 int StaticNewSpaceVisitor<StaticVisitor>::VisitJSTypedArray( 95 int StaticNewSpaceVisitor<StaticVisitor>::VisitJSTypedArray(
93 Map* map, HeapObject* object) { 96 Map* map, HeapObject* object) {
94 VisitPointers( 97 VisitPointers(
95 map->GetHeap(), 98 map->GetHeap(),
(...skipping 427 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 526
524 527
525 template <typename StaticVisitor> 528 template <typename StaticVisitor>
526 void StaticMarkingVisitor<StaticVisitor>::VisitJSArrayBuffer( 529 void StaticMarkingVisitor<StaticVisitor>::VisitJSArrayBuffer(
527 Map* map, HeapObject* object) { 530 Map* map, HeapObject* object) {
528 Heap* heap = map->GetHeap(); 531 Heap* heap = map->GetHeap();
529 532
530 StaticVisitor::VisitPointers( 533 StaticVisitor::VisitPointers(
531 heap, 534 heap,
532 HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset), 535 HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset),
536 HeapObject::RawField(object, JSArrayBuffer::kWeakNextOffset));
537 StaticVisitor::VisitPointers(
538 heap, HeapObject::RawField(object,
539 JSArrayBuffer::kWeakNextOffset + kPointerSize),
533 HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields)); 540 HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields));
534 if (!JSArrayBuffer::cast(object)->is_external()) {
535 heap->RegisterLiveArrayBuffer(JSArrayBuffer::cast(object)->backing_store());
536 }
537 } 541 }
538 542
539 543
540 template <typename StaticVisitor> 544 template <typename StaticVisitor>
541 void StaticMarkingVisitor<StaticVisitor>::VisitJSTypedArray( 545 void StaticMarkingVisitor<StaticVisitor>::VisitJSTypedArray(
542 Map* map, HeapObject* object) { 546 Map* map, HeapObject* object) {
543 StaticVisitor::VisitPointers( 547 StaticVisitor::VisitPointers(
544 map->GetHeap(), 548 map->GetHeap(),
545 HeapObject::RawField(object, JSTypedArray::BodyDescriptor::kStartOffset), 549 HeapObject::RawField(object, JSTypedArray::BodyDescriptor::kStartOffset),
546 HeapObject::RawField(object, JSTypedArray::kSizeWithInternalFields)); 550 HeapObject::RawField(object, JSTypedArray::kSizeWithInternalFields));
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
870 874
871 RelocIterator it(this, mode_mask); 875 RelocIterator it(this, mode_mask);
872 for (; !it.done(); it.next()) { 876 for (; !it.done(); it.next()) {
873 it.rinfo()->template Visit<StaticVisitor>(heap); 877 it.rinfo()->template Visit<StaticVisitor>(heap);
874 } 878 }
875 } 879 }
876 } 880 }
877 } // namespace v8::internal 881 } // namespace v8::internal
878 882
879 #endif // V8_OBJECTS_VISITING_INL_H_ 883 #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