Index: src/heap/scavenger.cc |
diff --git a/src/heap/scavenger.cc b/src/heap/scavenger.cc |
index e2ac8d4ffdfbed886b66dc568fa8fc0c87a63efa..25e1fc2d33a569cf221970b5307e1d0b30a29fbb 100644 |
--- a/src/heap/scavenger.cc |
+++ b/src/heap/scavenger.cc |
@@ -76,14 +76,7 @@ class ScavengingVisitor : public StaticVisitorBase { |
table_.Register(kVisitJSRegExp, |
&ObjectEvacuationStrategy<POINTER_OBJECT>::Visit); |
- if (marks_handling == IGNORE_MARKS) { |
- table_.Register( |
- kVisitJSFunction, |
- &ObjectEvacuationStrategy<POINTER_OBJECT>::template VisitSpecialized< |
- JSFunction::kSize>); |
- } else { |
- table_.Register(kVisitJSFunction, &EvacuateJSFunction); |
- } |
+ table_.Register(kVisitJSFunction, &EvacuateJSFunction); |
table_.RegisterSpecializations<ObjectEvacuationStrategy<DATA_OBJECT>, |
kVisitDataObject, kVisitDataObjectGeneric>(); |
@@ -242,8 +235,9 @@ class ScavengingVisitor : public StaticVisitorBase { |
static inline void EvacuateJSFunction(Map* map, HeapObject** slot, |
HeapObject* object) { |
- ObjectEvacuationStrategy<POINTER_OBJECT>::template VisitSpecialized< |
- JSFunction::kSize>(map, slot, object); |
+ ObjectEvacuationStrategy<POINTER_OBJECT>::Visit(map, slot, object); |
+ |
+ if (marks_handling == IGNORE_MARKS) return; |
MapWord map_word = object->map_word(); |
DCHECK(map_word.IsForwardingAddress()); |