| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/type-hint-analyzer.h" | 5 #include "src/compiler/type-hint-analyzer.h" |
| 6 | 6 |
| 7 #include "src/assembler.h" | 7 #include "src/assembler.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/compiler/type-hints.h" | 9 #include "src/compiler/type-hints.h" |
| 10 #include "src/ic/ic-state.h" | 10 #include "src/ic/ic-state.h" |
| (...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 break; | 129 break; |
| 130 } | 130 } |
| 131 } | 131 } |
| 132 return new (zone()) TypeHintAnalysis(infos, zone()); | 132 return new (zone()) TypeHintAnalysis(infos, zone()); |
| 133 } | 133 } |
| 134 | 134 |
| 135 // Helper function to transform the feedback to BinaryOperationHint. | 135 // Helper function to transform the feedback to BinaryOperationHint. |
| 136 BinaryOperationHint BinaryOperationHintFromFeedback(int type_feedback) { | 136 BinaryOperationHint BinaryOperationHintFromFeedback(int type_feedback) { |
| 137 switch (type_feedback) { | 137 switch (type_feedback) { |
| 138 case BinaryOperationFeedback::kSignedSmall: | 138 case BinaryOperationFeedback::kSignedSmall: |
| 139 return BinaryOperationHint::kSigned32; | 139 return BinaryOperationHint::kSignedSmall; |
| 140 case BinaryOperationFeedback::kNumber: | 140 case BinaryOperationFeedback::kNumber: |
| 141 return BinaryOperationHint::kNumberOrOddball; | 141 return BinaryOperationHint::kNumberOrOddball; |
| 142 case BinaryOperationFeedback::kAny: | 142 case BinaryOperationFeedback::kAny: |
| 143 default: | 143 default: |
| 144 return BinaryOperationHint::kAny; | 144 return BinaryOperationHint::kAny; |
| 145 } | 145 } |
| 146 UNREACHABLE(); | 146 UNREACHABLE(); |
| 147 return BinaryOperationHint::kNone; | 147 return BinaryOperationHint::kNone; |
| 148 } | 148 } |
| 149 | 149 |
| 150 } // namespace compiler | 150 } // namespace compiler |
| 151 } // namespace internal | 151 } // namespace internal |
| 152 } // namespace v8 | 152 } // namespace v8 |
| OLD | NEW |