Index: src/mark-compact.cc |
diff --git a/src/mark-compact.cc b/src/mark-compact.cc |
index b82c76aa830bcb249f919419e99e46b2c6f7410e..d8dab7c8a7f0dc2ef22672f6f670d5053b7acfd9 100644 |
--- a/src/mark-compact.cc |
+++ b/src/mark-compact.cc |
@@ -1060,9 +1060,8 @@ void MarkCompactCollector::MarkUnmarkedObject(HeapObject* object) { |
map->ClearCodeCache(heap()); |
} |
SetMark(map); |
- if (FLAG_collect_maps && |
- map->instance_type() >= FIRST_JS_OBJECT_TYPE && |
- map->instance_type() <= JS_FUNCTION_TYPE) { |
+ ASSERT(LAST_TYPE == LAST_CALLABLE_SPEC_OBJECT_TYPE); |
+ if (FLAG_collect_maps && map->instance_type() >= FIRST_JS_RECEIVER_TYPE) { |
MarkMapContents(map); |
} else { |
marking_stack_.Push(map); |
@@ -1139,8 +1138,8 @@ void MarkCompactCollector::CreateBackPointers() { |
next_object != NULL; next_object = iterator.next()) { |
if (next_object->IsMap()) { // Could also be ByteArray on free list. |
Map* map = Map::cast(next_object); |
- if (map->instance_type() >= FIRST_JS_OBJECT_TYPE && |
- map->instance_type() <= JS_FUNCTION_TYPE) { |
+ ASSERT(LAST_TYPE == LAST_CALLABLE_SPEC_OBJECT_TYPE); |
+ if (map->instance_type() >= FIRST_JS_RECEIVER_TYPE) { |
map->CreateBackPointers(); |
} else { |
ASSERT(map->instance_descriptors() == heap()->empty_descriptor_array()); |
@@ -1516,8 +1515,8 @@ void MarkCompactCollector::ClearNonLiveTransitions() { |
ASSERT(SafeIsMap(map)); |
// Only JSObject and subtypes have map transitions and back pointers. |
- if (map->instance_type() < FIRST_JS_OBJECT_TYPE) continue; |
- if (map->instance_type() > JS_FUNCTION_TYPE) continue; |
+ ASSERT(LAST_TYPE == LAST_CALLABLE_SPEC_OBJECT_TYPE); |
+ if (map->instance_type() < FIRST_JS_RECEIVER_TYPE) continue; |
if (map->IsMarked() && map->attached_to_shared_function_info()) { |
// This map is used for inobject slack tracking and has been detached |