Index: src/heap.h |
diff --git a/src/heap.h b/src/heap.h |
index 3192630a012d682635b2a960cfed04ae7ad4c6d5..34d4c35061b7ef0e135fb1533c5f0aff09c1347a 100644 |
--- a/src/heap.h |
+++ b/src/heap.h |
@@ -1873,7 +1873,7 @@ class Heap { |
enum { |
FIRST_CODE_KIND_SUB_TYPE = LAST_TYPE + 1, |
FIRST_FIXED_ARRAY_SUB_TYPE = |
- FIRST_CODE_KIND_SUB_TYPE + Code::LAST_CODE_KIND + 1, |
+ FIRST_CODE_KIND_SUB_TYPE + Code::NUMBER_OF_KINDS, |
OBJECT_STATS_COUNT = |
FIRST_FIXED_ARRAY_SUB_TYPE + LAST_FIXED_ARRAY_SUB_TYPE + 1 |
}; |
@@ -1885,7 +1885,7 @@ class Heap { |
object_sizes_[type] += size; |
} else { |
if (type == CODE_TYPE) { |
- ASSERT(sub_type <= Code::LAST_CODE_KIND); |
+ ASSERT(sub_type < Code::NUMBER_OF_KINDS); |
object_counts_[FIRST_CODE_KIND_SUB_TYPE + sub_type]++; |
object_sizes_[FIRST_CODE_KIND_SUB_TYPE + sub_type] += size; |
} else if (type == FIXED_ARRAY_TYPE) { |