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

Unified Diff: src/heap/objects-visiting.h

Issue 1422773007: Make JSFunction::BodyDescriptor the only single place that knows how to iterate JSFunction's body. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressing comments Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/heap/objects-visiting.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/heap/objects-visiting.h
diff --git a/src/heap/objects-visiting.h b/src/heap/objects-visiting.h
index 95cc80753a9daef391ec8d36211a13e81d751240..18f536b62ee1092b0d7c1f264425e95f7cc9800e 100644
--- a/src/heap/objects-visiting.h
+++ b/src/heap/objects-visiting.h
@@ -251,22 +251,15 @@ class StaticNewSpaceVisitor : public StaticVisitorBase {
for (Object** p = start; p < end; p++) StaticVisitor::VisitPointer(heap, p);
}
- private:
- INLINE(static int VisitJSFunction(Map* map, HeapObject* object)) {
- Heap* heap = map->GetHeap();
- VisitPointers(heap, object,
- HeapObject::RawField(object, JSFunction::kPropertiesOffset),
- HeapObject::RawField(object, JSFunction::kCodeEntryOffset));
-
- // Don't visit code entry. We are using this visitor only during scavenges.
-
- VisitPointers(
- heap, object, HeapObject::RawField(
- object, JSFunction::kCodeEntryOffset + kPointerSize),
- HeapObject::RawField(object, JSFunction::kNonWeakFieldsEndOffset));
- return JSFunction::kSize;
+ // Although we are using the JSFunction body descriptor which does not
+ // visit the code entry, compiler wants it to be accessible.
+ // See JSFunction::BodyDescriptorImpl.
+ INLINE(static void VisitCodeEntry(Heap* heap, HeapObject* object,
+ Address entry_address)) {
+ UNREACHABLE();
}
+ private:
INLINE(static int VisitByteArray(Map* map, HeapObject* object)) {
return reinterpret_cast<ByteArray*>(object)->ByteArraySize();
}
@@ -405,8 +398,8 @@ class StaticMarkingVisitor : public StaticVisitorBase {
// references to code objects either strongly or weakly.
static void VisitSharedFunctionInfoStrongCode(Heap* heap, HeapObject* object);
static void VisitSharedFunctionInfoWeakCode(Heap* heap, HeapObject* object);
- static void VisitJSFunctionStrongCode(Heap* heap, HeapObject* object);
- static void VisitJSFunctionWeakCode(Heap* heap, HeapObject* object);
+ static void VisitJSFunctionStrongCode(Map* map, HeapObject* object);
+ static void VisitJSFunctionWeakCode(Map* map, HeapObject* object);
class DataObjectVisitor {
public:
« no previous file with comments | « no previous file | src/heap/objects-visiting.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698