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

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

Issue 2221833002: [Interpreter] Collect type feedback for subtract operation and pass it to turbofan. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed comments from Ross. 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
« no previous file with comments | « src/compiler/type-hint-analyzer.h ('k') | src/globals.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/type-hint-analyzer.cc
diff --git a/src/compiler/type-hint-analyzer.cc b/src/compiler/type-hint-analyzer.cc
index e3cafb4112deb29f7d0fd586c4c164ab9e76a41a..fb3b3c79d86e97508ffa5efe9daa01cf6dd4dece 100644
--- a/src/compiler/type-hint-analyzer.cc
+++ b/src/compiler/type-hint-analyzer.cc
@@ -136,6 +136,20 @@ TypeHintAnalysis* TypeHintAnalyzer::Analyze(Handle<Code> code) {
return new (zone()) TypeHintAnalysis(infos, zone());
}
+// Helper function to transform the feedback to BinaryOperationHints
+BinaryOperationHints::Hint BinaryOperationHintFromFeedback(int type_feedback) {
+ switch (type_feedback) {
+ case BinaryOperationFeedback::kSignedSmall:
+ return BinaryOperationHints::kSigned32;
+ case BinaryOperationFeedback::kNumber:
+ return BinaryOperationHints::kNumberOrOddball;
+ case BinaryOperationFeedback::kAny:
+ default:
+ return BinaryOperationHints::kAny;
+ }
+ return BinaryOperationHints::kAny;
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « src/compiler/type-hint-analyzer.h ('k') | src/globals.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698