Index: src/heap/mark-compact.cc |
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
index 49bf1040b0bbc8270470717cb2ed9878042a6e07..6a0c9d58cd3d852f7a8f4228d339b3127a1e99fa 100644 |
--- a/src/heap/mark-compact.cc |
+++ b/src/heap/mark-compact.cc |
@@ -1337,7 +1337,7 @@ class MarkCompactMarkingVisitor |
// Set a number in the 0-255 range to guarantee no smi overflow. |
re->SetDataAt(JSRegExp::code_index(is_one_byte), |
- Smi::FromInt(heap->sweep_generation() & 0xff)); |
+ Smi::FromInt(heap->ms_count() & 0xff)); |
} else if (code->IsSmi()) { |
int value = Smi::cast(code)->value(); |
// The regexp has not been compiled yet or there was a compilation error. |
@@ -1347,7 +1347,7 @@ class MarkCompactMarkingVisitor |
} |
// Check if we should flush now. |
- if (value == ((heap->sweep_generation() - kRegExpCodeThreshold) & 0xff)) { |
+ if (value == ((heap->ms_count() - kRegExpCodeThreshold) & 0xff)) { |
re->SetDataAt(JSRegExp::code_index(is_one_byte), |
Smi::FromInt(JSRegExp::kUninitializedValue)); |
re->SetDataAt(JSRegExp::saved_code_index(is_one_byte), |