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 default: | 131 default: |
132 // Ignore the remaining code objects. | 132 // Ignore the remaining code objects. |
133 break; | 133 break; |
134 } | 134 } |
135 } | 135 } |
136 return new (zone()) TypeHintAnalysis(infos, zone()); | 136 return new (zone()) TypeHintAnalysis(infos, zone()); |
137 } | 137 } |
138 | 138 |
| 139 // Helper function to transform the feedback to BinaryOperationHints |
| 140 BinaryOperationHints::Hint BinaryOperationHintFromFeedback(int type_feedback) { |
| 141 switch (type_feedback) { |
| 142 case BinaryOperationFeedback::kSignedSmall: |
| 143 return BinaryOperationHints::kSigned32; |
| 144 case BinaryOperationFeedback::kNumber: |
| 145 return BinaryOperationHints::kNumberOrOddball; |
| 146 case BinaryOperationFeedback::kAny: |
| 147 default: |
| 148 return BinaryOperationHints::kAny; |
| 149 } |
| 150 return BinaryOperationHints::kAny; |
| 151 } |
| 152 |
139 } // namespace compiler | 153 } // namespace compiler |
140 } // namespace internal | 154 } // namespace internal |
141 } // namespace v8 | 155 } // namespace v8 |
OLD | NEW |