Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1337)

Unified Diff: src/compiler/type-hint-analyzer.cc

Issue 2286273002: [interpreter] Make the comparison bytecode handlers collect type feedback. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix. Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « src/compiler/type-hint-analyzer.h ('k') | src/globals.h » ('j') | src/globals.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698