Index: src/heap/objects-visiting-inl.h |
diff --git a/src/heap/objects-visiting-inl.h b/src/heap/objects-visiting-inl.h |
index 21b770d8c5a174f71b2d7fb578a29187603510b7..c250561523ce491b7584ebf6024cd312cace5b0a 100644 |
--- a/src/heap/objects-visiting-inl.h |
+++ b/src/heap/objects-visiting-inl.h |
@@ -126,6 +126,17 @@ int StaticNewSpaceVisitor<StaticVisitor>::VisitJSDataView(Map* map, |
template <typename StaticVisitor> |
+int StaticNewSpaceVisitor<StaticVisitor>::VisitBytecodeArray( |
+ Map* map, HeapObject* object) { |
+ VisitPointers( |
+ map->GetHeap(), object, |
+ HeapObject::RawField(object, BytecodeArray::kConstantPoolOffset), |
+ HeapObject::RawField(object, BytecodeArray::kHeaderSize)); |
+ return reinterpret_cast<BytecodeArray*>(object)->BytecodeArraySize(); |
+} |
+ |
+ |
+template <typename StaticVisitor> |
void StaticMarkingVisitor<StaticVisitor>::Initialize() { |
table_.Register(kVisitShortcutCandidate, |
&FixedBodyVisitor<StaticVisitor, ConsString::BodyDescriptor, |
@@ -157,7 +168,7 @@ void StaticMarkingVisitor<StaticVisitor>::Initialize() { |
table_.Register(kVisitByteArray, &DataObjectVisitor::Visit); |
- table_.Register(kVisitBytecodeArray, &DataObjectVisitor::Visit); |
+ table_.Register(kVisitBytecodeArray, &VisitBytecodeArray); |
table_.Register(kVisitFreeSpace, &DataObjectVisitor::Visit); |
@@ -549,6 +560,16 @@ void StaticMarkingVisitor<StaticVisitor>::VisitJSDataView(Map* map, |
template <typename StaticVisitor> |
+void StaticMarkingVisitor<StaticVisitor>::VisitBytecodeArray( |
+ Map* map, HeapObject* object) { |
+ StaticVisitor::VisitPointers( |
+ map->GetHeap(), object, |
+ HeapObject::RawField(object, BytecodeArray::kConstantPoolOffset), |
+ HeapObject::RawField(object, BytecodeArray::kHeaderSize)); |
+} |
+ |
+ |
+template <typename StaticVisitor> |
void StaticMarkingVisitor<StaticVisitor>::MarkMapContents(Heap* heap, |
Map* map) { |
Object* raw_transitions = map->raw_transitions(); |