| 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
|
|
|