Index: src/compiler/type-hint-analyzer.cc |
diff --git a/src/compiler/type-hint-analyzer.cc b/src/compiler/type-hint-analyzer.cc |
index 8e7a0f3eae5c7e8095332358ad07bc879044abac..235ea1295f8d99e938227213c6fa5aba238b3aca 100644 |
--- a/src/compiler/type-hint-analyzer.cc |
+++ b/src/compiler/type-hint-analyzer.cc |
@@ -147,6 +147,18 @@ BinaryOperationHint BinaryOperationHintFromFeedback(int type_feedback) { |
return BinaryOperationHint::kNone; |
} |
+// Helper function to transform the feedback to CompareOperationHint. |
+CompareOperationHint CompareOperationHintFromFeedback(int type_feedback) { |
+ switch (type_feedback) { |
+ case CompareOperationFeedback::kSignedSmall: |
+ return CompareOperationHint::kSignedSmall; |
+ case CompareOperationFeedback::kNumber: |
+ return CompareOperationHint::kNumber; |
+ default: |
+ return CompareOperationHint::kAny; |
+ } |
+} |
+ |
} // namespace compiler |
} // namespace internal |
} // namespace v8 |