Index: src/objects-visiting-inl.h |
diff --git a/src/objects-visiting-inl.h b/src/objects-visiting-inl.h |
index f83f00fd5d139574a9ccc2a3ab9ae09456794f0d..829eab809ffce26eefab95c94621a767711a6acc 100644 |
--- a/src/objects-visiting-inl.h |
+++ b/src/objects-visiting-inl.h |
@@ -79,6 +79,10 @@ void StaticNewSpaceVisitor<StaticVisitor>::Initialize() { |
table_.Register(kVisitJSFunction, &VisitJSFunction); |
+ table_.Register(kVisitJSArrayBuffer, &VisitJSArrayBuffer); |
+ |
+ table_.Register(kVisitJSTypedArray, &VisitJSTypedArray); |
+ |
table_.Register(kVisitFreeSpace, &VisitFreeSpace); |
table_.Register(kVisitJSWeakMap, &JSObjectVisitor::Visit); |
@@ -99,6 +103,43 @@ void StaticNewSpaceVisitor<StaticVisitor>::Initialize() { |
template<typename StaticVisitor> |
+int StaticNewSpaceVisitor<StaticVisitor>::VisitJSArrayBuffer( |
+ Map* map, HeapObject* object) { |
+ Heap* heap = map->GetHeap(); |
+ |
+ STATIC_ASSERT( |
+ JSArrayBuffer::kWeakFirstArrayOffset == |
+ JSArrayBuffer::kWeakNextOffset + kPointerSize); |
+ VisitPointers( |
+ heap, |
+ HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset), |
+ HeapObject::RawField(object, JSArrayBuffer::kWeakNextOffset)); |
+ VisitPointers( |
+ heap, |
+ HeapObject::RawField(object, |
+ JSArrayBuffer::kWeakNextOffset + 2 * kPointerSize), |
+ HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields)); |
+ return JSArrayBuffer::kSizeWithInternalFields; |
+} |
+ |
+ |
+template<typename StaticVisitor> |
+int StaticNewSpaceVisitor<StaticVisitor>::VisitJSTypedArray( |
+ Map* map, HeapObject* object) { |
+ VisitPointers( |
+ map->GetHeap(), |
+ HeapObject::RawField(object, JSTypedArray::BodyDescriptor::kStartOffset), |
+ HeapObject::RawField(object, JSTypedArray::kWeakNextOffset)); |
+ VisitPointers( |
+ map->GetHeap(), |
+ HeapObject::RawField(object, |
+ JSTypedArray::kWeakNextOffset + kPointerSize), |
+ HeapObject::RawField(object, JSTypedArray::kSize)); |
+ return JSTypedArray::kSize; |
+} |
+ |
+ |
+template<typename StaticVisitor> |
void StaticMarkingVisitor<StaticVisitor>::Initialize() { |
table_.Register(kVisitShortcutCandidate, |
&FixedBodyVisitor<StaticVisitor, |
@@ -149,6 +190,10 @@ void StaticMarkingVisitor<StaticVisitor>::Initialize() { |
table_.Register(kVisitJSFunction, &VisitJSFunction); |
+ table_.Register(kVisitJSArrayBuffer, &VisitJSArrayBuffer); |
+ |
+ table_.Register(kVisitJSTypedArray, &VisitJSTypedArray); |
+ |
// Registration for kVisitJSRegExp is done by StaticVisitor. |
table_.Register(kVisitPropertyCell, |
@@ -401,6 +446,41 @@ void StaticMarkingVisitor<StaticVisitor>::VisitJSRegExp( |
template<typename StaticVisitor> |
+void StaticMarkingVisitor<StaticVisitor>::VisitJSArrayBuffer( |
+ Map* map, HeapObject* object) { |
+ Heap* heap = map->GetHeap(); |
+ |
+ STATIC_ASSERT( |
+ JSArrayBuffer::kWeakFirstArrayOffset == |
+ JSArrayBuffer::kWeakNextOffset + kPointerSize); |
+ StaticVisitor::VisitPointers( |
+ heap, |
+ HeapObject::RawField(object, JSArrayBuffer::BodyDescriptor::kStartOffset), |
+ HeapObject::RawField(object, JSArrayBuffer::kWeakNextOffset)); |
+ StaticVisitor::VisitPointers( |
+ heap, |
+ HeapObject::RawField(object, |
+ JSArrayBuffer::kWeakNextOffset + 2 * kPointerSize), |
+ HeapObject::RawField(object, JSArrayBuffer::kSizeWithInternalFields)); |
+} |
+ |
+ |
+template<typename StaticVisitor> |
+void StaticMarkingVisitor<StaticVisitor>::VisitJSTypedArray( |
+ Map* map, HeapObject* object) { |
+ StaticVisitor::VisitPointers( |
+ map->GetHeap(), |
+ HeapObject::RawField(object, JSTypedArray::BodyDescriptor::kStartOffset), |
+ HeapObject::RawField(object, JSTypedArray::kWeakNextOffset)); |
+ StaticVisitor::VisitPointers( |
+ map->GetHeap(), |
+ HeapObject::RawField(object, |
+ JSTypedArray::kWeakNextOffset + kPointerSize), |
+ HeapObject::RawField(object, JSTypedArray::kSize)); |
+} |
+ |
+ |
+template<typename StaticVisitor> |
void StaticMarkingVisitor<StaticVisitor>::MarkMapContents( |
Heap* heap, Map* map) { |
// Make sure that the back pointer stored either in the map itself or |