Index: src/heap/mark-compact.cc |
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
index ffda9f159d263d2c40e22c3c013881ef1be7f106..31edbaadc5f92cf4d7736e7ddc8c19c37f1a3c06 100644 |
--- a/src/heap/mark-compact.cc |
+++ b/src/heap/mark-compact.cc |
@@ -919,7 +919,7 @@ void CodeFlusher::ProcessJSFunctionCandidates() { |
PrintF(" - age: %d]\n", code->GetAge()); |
} |
// Always flush the optimized code map if there is one. |
- if (!shared->optimized_code_map()->IsSmi()) { |
+ if (!shared->OptimizedCodeMapIsCleared()) { |
shared->ClearOptimizedCodeMap(); |
} |
shared->set_code(lazy_compile); |
@@ -966,7 +966,7 @@ void CodeFlusher::ProcessSharedFunctionInfoCandidates() { |
PrintF(" - age: %d]\n", code->GetAge()); |
} |
// Always flush the optimized code map if there is one. |
- if (!candidate->optimized_code_map()->IsSmi()) { |
+ if (!candidate->OptimizedCodeMapIsCleared()) { |
candidate->ClearOptimizedCodeMap(); |
} |
candidate->set_code(lazy_compile); |
@@ -2125,10 +2125,10 @@ void MarkCompactCollector::AfterMarking() { |
void MarkCompactCollector::ProcessAndClearOptimizedCodeMaps() { |
SharedFunctionInfo::Iterator iterator(isolate()); |
while (SharedFunctionInfo* shared = iterator.Next()) { |
- if (shared->optimized_code_map()->IsSmi()) continue; |
+ if (shared->OptimizedCodeMapIsCleared()) continue; |
// Process context-dependent entries in the optimized code map. |
- FixedArray* code_map = FixedArray::cast(shared->optimized_code_map()); |
+ FixedArray* code_map = shared->optimized_code_map(); |
int new_length = SharedFunctionInfo::kEntriesStart; |
int old_length = code_map->length(); |
for (int i = SharedFunctionInfo::kEntriesStart; i < old_length; |