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

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

Issue 1178403003: Revert of Keep track of array buffers in new space separately (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: 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/objects.cc » ('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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 78
79 template <typename StaticVisitor> 79 template <typename StaticVisitor>
80 int StaticNewSpaceVisitor<StaticVisitor>::VisitJSArrayBuffer( 80 int StaticNewSpaceVisitor<StaticVisitor>::VisitJSArrayBuffer(
81 Map* map, HeapObject* object) { 81 Map* map, HeapObject* object) {
82 Heap* heap = map->GetHeap(); 82 Heap* heap = map->GetHeap();
83 83
84 VisitPointers( 84 VisitPointers(
85 heap, 85 heap,
86 HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset), 86 HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset),
87 HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields)); 87 HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields));
88 if (!JSArrayBuffer::cast(object)->is_external()) {
89 heap->RegisterLiveArrayBuffer(true,
90 JSArrayBuffer::cast(object)->backing_store());
91 }
92 return JSArrayBuffer::kSizeWithInternalFields; 88 return JSArrayBuffer::kSizeWithInternalFields;
93 } 89 }
94 90
95 91
96 template <typename StaticVisitor> 92 template <typename StaticVisitor>
97 int StaticNewSpaceVisitor<StaticVisitor>::VisitJSTypedArray( 93 int StaticNewSpaceVisitor<StaticVisitor>::VisitJSTypedArray(
98 Map* map, HeapObject* object) { 94 Map* map, HeapObject* object) {
99 VisitPointers( 95 VisitPointers(
100 map->GetHeap(), 96 map->GetHeap(),
101 HeapObject::RawField(object, JSTypedArray::BodyDescriptor::kStartOffset), 97 HeapObject::RawField(object, JSTypedArray::BodyDescriptor::kStartOffset),
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
501 template <typename StaticVisitor> 497 template <typename StaticVisitor>
502 void StaticMarkingVisitor<StaticVisitor>::VisitJSArrayBuffer( 498 void StaticMarkingVisitor<StaticVisitor>::VisitJSArrayBuffer(
503 Map* map, HeapObject* object) { 499 Map* map, HeapObject* object) {
504 Heap* heap = map->GetHeap(); 500 Heap* heap = map->GetHeap();
505 501
506 StaticVisitor::VisitPointers( 502 StaticVisitor::VisitPointers(
507 heap, 503 heap,
508 HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset), 504 HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset),
509 HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields)); 505 HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields));
510 if (!JSArrayBuffer::cast(object)->is_external()) { 506 if (!JSArrayBuffer::cast(object)->is_external()) {
511 heap->RegisterLiveArrayBuffer(heap->InNewSpace(object), 507 heap->RegisterLiveArrayBuffer(JSArrayBuffer::cast(object)->backing_store());
512 JSArrayBuffer::cast(object)->backing_store());
513 } 508 }
514 } 509 }
515 510
516 511
517 template <typename StaticVisitor> 512 template <typename StaticVisitor>
518 void StaticMarkingVisitor<StaticVisitor>::VisitJSTypedArray( 513 void StaticMarkingVisitor<StaticVisitor>::VisitJSTypedArray(
519 Map* map, HeapObject* object) { 514 Map* map, HeapObject* object) {
520 StaticVisitor::VisitPointers( 515 StaticVisitor::VisitPointers(
521 map->GetHeap(), 516 map->GetHeap(),
522 HeapObject::RawField(object, JSTypedArray::BodyDescriptor::kStartOffset), 517 HeapObject::RawField(object, JSTypedArray::BodyDescriptor::kStartOffset),
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 831
837 RelocIterator it(this, mode_mask); 832 RelocIterator it(this, mode_mask);
838 for (; !it.done(); it.next()) { 833 for (; !it.done(); it.next()) {
839 it.rinfo()->template Visit<StaticVisitor>(heap); 834 it.rinfo()->template Visit<StaticVisitor>(heap);
840 } 835 }
841 } 836 }
842 } 837 }
843 } // namespace v8::internal 838 } // namespace v8::internal
844 839
845 #endif // V8_OBJECTS_VISITING_INL_H_ 840 #endif // V8_OBJECTS_VISITING_INL_H_
OLDNEW
« no previous file with comments | « src/heap/mark-compact.cc ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698