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/ic/ic-state.h" | 9 #include "src/ic/ic-state.h" |
10 #include "src/type-hints.h" | 10 #include "src/type-hints.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 case CompareICState::UNINITIALIZED: | 43 case CompareICState::UNINITIALIZED: |
44 return CompareOperationHint::kNone; | 44 return CompareOperationHint::kNone; |
45 case CompareICState::SMI: | 45 case CompareICState::SMI: |
46 return CompareOperationHint::kSignedSmall; | 46 return CompareOperationHint::kSignedSmall; |
47 case CompareICState::NUMBER: | 47 case CompareICState::NUMBER: |
48 return Token::IsOrderedRelationalCompareOp(op) | 48 return Token::IsOrderedRelationalCompareOp(op) |
49 ? CompareOperationHint::kNumberOrOddball | 49 ? CompareOperationHint::kNumberOrOddball |
50 : CompareOperationHint::kNumber; | 50 : CompareOperationHint::kNumber; |
51 case CompareICState::STRING: | 51 case CompareICState::STRING: |
52 case CompareICState::INTERNALIZED_STRING: | 52 case CompareICState::INTERNALIZED_STRING: |
| 53 return CompareOperationHint::kString; |
53 case CompareICState::UNIQUE_NAME: | 54 case CompareICState::UNIQUE_NAME: |
54 case CompareICState::RECEIVER: | 55 case CompareICState::RECEIVER: |
55 case CompareICState::KNOWN_RECEIVER: | 56 case CompareICState::KNOWN_RECEIVER: |
56 case CompareICState::BOOLEAN: | 57 case CompareICState::BOOLEAN: |
57 case CompareICState::GENERIC: | 58 case CompareICState::GENERIC: |
58 return CompareOperationHint::kAny; | 59 return CompareOperationHint::kAny; |
59 } | 60 } |
60 UNREACHABLE(); | 61 UNREACHABLE(); |
61 return CompareOperationHint::kNone; | 62 return CompareOperationHint::kNone; |
62 } | 63 } |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
119 break; | 120 break; |
120 } | 121 } |
121 } | 122 } |
122 return new (zone()) TypeHintAnalysis(infos, zone()); | 123 return new (zone()) TypeHintAnalysis(infos, zone()); |
123 } | 124 } |
124 | 125 |
125 | 126 |
126 } // namespace compiler | 127 } // namespace compiler |
127 } // namespace internal | 128 } // namespace internal |
128 } // namespace v8 | 129 } // namespace v8 |
OLD | NEW |