Index: src/type-feedback-vector.cc |
diff --git a/src/type-feedback-vector.cc b/src/type-feedback-vector.cc |
index 45308fc79b04e28c02cdd067399d03ceae8e7851..ea675804cf14460717853c4ce0285679a91b5750 100644 |
--- a/src/type-feedback-vector.cc |
+++ b/src/type-feedback-vector.cc |
@@ -5,7 +5,7 @@ |
#include "src/type-feedback-vector.h" |
#include "src/code-stubs.h" |
-#include "src/ic/ic.h" |
+#include "src/ic/ic-inl.h" |
#include "src/ic/ic-state.h" |
#include "src/objects.h" |
#include "src/type-feedback-vector-inl.h" |
@@ -851,17 +851,10 @@ int GetStepSize(FixedArray* array, Isolate* isolate) { |
DCHECK(array->length() >= 2); |
Object* second = array->get(1); |
if (second->IsWeakCell() || second->IsUndefined(isolate)) return 3; |
- DCHECK(second->IsCode() || second->IsSmi()); |
+ DCHECK(IC::IsHandler(second)); |
return 2; |
} |
-#ifdef DEBUG // Only used by DCHECKs below. |
-bool IsHandler(Object* object) { |
- return object->IsSmi() || |
- (object->IsCode() && Code::cast(object)->is_handler()); |
-} |
-#endif |
- |
} // namespace |
int FeedbackNexus::ExtractMaps(MapHandleList* maps) const { |
@@ -914,7 +907,7 @@ MaybeHandle<Object> FeedbackNexus::FindHandlerForMap(Handle<Map> map) const { |
Map* array_map = Map::cast(cell->value()); |
if (array_map == *map) { |
Object* code = array->get(i + increment - 1); |
- DCHECK(IsHandler(code)); |
+ DCHECK(IC::IsHandler(code)); |
return handle(code, isolate); |
} |
} |
@@ -925,7 +918,7 @@ MaybeHandle<Object> FeedbackNexus::FindHandlerForMap(Handle<Map> map) const { |
Map* cell_map = Map::cast(cell->value()); |
if (cell_map == *map) { |
Object* code = GetFeedbackExtra(); |
- DCHECK(IsHandler(code)); |
+ DCHECK(IC::IsHandler(code)); |
return handle(code, isolate); |
} |
} |
@@ -952,7 +945,7 @@ bool FeedbackNexus::FindHandlers(List<Handle<Object>>* code_list, |
// Be sure to skip handlers whose maps have been cleared. |
if (!cell->cleared()) { |
Object* code = array->get(i + increment - 1); |
- DCHECK(IsHandler(code)); |
+ DCHECK(IC::IsHandler(code)); |
code_list->Add(handle(code, isolate)); |
count++; |
} |
@@ -961,7 +954,7 @@ bool FeedbackNexus::FindHandlers(List<Handle<Object>>* code_list, |
WeakCell* cell = WeakCell::cast(feedback); |
if (!cell->cleared()) { |
Object* code = GetFeedbackExtra(); |
- DCHECK(IsHandler(code)); |
+ DCHECK(IC::IsHandler(code)); |
code_list->Add(handle(code, isolate)); |
count++; |
} |