OLD | NEW |
1 // Copyright 2017 the V8 project authors. All rights reserved. | 1 // Copyright 2017 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/js-type-hint-lowering.h" | 5 #include "src/compiler/js-type-hint-lowering.h" |
6 | 6 |
7 #include "src/compiler/js-graph.h" | 7 #include "src/compiler/js-graph.h" |
8 #include "src/compiler/operator-properties.h" | 8 #include "src/compiler/operator-properties.h" |
9 #include "src/compiler/simplified-operator.h" | 9 #include "src/compiler/simplified-operator.h" |
10 #include "src/feedback-vector.h" | 10 #include "src/feedback-vector.h" |
11 #include "src/type-hints.h" | 11 #include "src/type-hints.h" |
12 | 12 |
13 namespace v8 { | 13 namespace v8 { |
14 namespace internal { | 14 namespace internal { |
15 namespace compiler { | 15 namespace compiler { |
16 | 16 |
17 namespace { | 17 namespace { |
18 | 18 |
19 bool BinaryOperationHintToNumberOperationHint( | 19 bool BinaryOperationHintToNumberOperationHint( |
20 BinaryOperationHint binop_hint, NumberOperationHint* number_hint) { | 20 BinaryOperationHint binop_hint, NumberOperationHint* number_hint) { |
21 switch (binop_hint) { | 21 switch (binop_hint) { |
22 case BinaryOperationHint::kSignedSmall: | 22 case BinaryOperationHint::kSignedSmall: |
23 *number_hint = NumberOperationHint::kSignedSmall; | 23 *number_hint = NumberOperationHint::kSignedSmall; |
24 return true; | 24 return true; |
25 case BinaryOperationHint::kSigned32: | 25 case BinaryOperationHint::kSigned32: |
26 *number_hint = NumberOperationHint::kSigned32; | 26 *number_hint = NumberOperationHint::kSigned32; |
27 return true; | 27 return true; |
| 28 case BinaryOperationHint::kNumber: |
| 29 *number_hint = NumberOperationHint::kNumber; |
| 30 return true; |
28 case BinaryOperationHint::kNumberOrOddball: | 31 case BinaryOperationHint::kNumberOrOddball: |
29 *number_hint = NumberOperationHint::kNumberOrOddball; | 32 *number_hint = NumberOperationHint::kNumberOrOddball; |
30 return true; | 33 return true; |
31 case BinaryOperationHint::kAny: | 34 case BinaryOperationHint::kAny: |
32 case BinaryOperationHint::kNone: | 35 case BinaryOperationHint::kNone: |
33 case BinaryOperationHint::kString: | 36 case BinaryOperationHint::kString: |
34 break; | 37 break; |
35 } | 38 } |
36 return false; | 39 return false; |
37 } | 40 } |
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 Node* frame_state = NodeProperties::FindFrameStateBefore(deoptimize); | 323 Node* frame_state = NodeProperties::FindFrameStateBefore(deoptimize); |
321 deoptimize->ReplaceInput(0, frame_state); | 324 deoptimize->ReplaceInput(0, frame_state); |
322 return deoptimize; | 325 return deoptimize; |
323 } | 326 } |
324 return nullptr; | 327 return nullptr; |
325 } | 328 } |
326 | 329 |
327 } // namespace compiler | 330 } // namespace compiler |
328 } // namespace internal | 331 } // namespace internal |
329 } // namespace v8 | 332 } // namespace v8 |
OLD | NEW |