OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #ifndef V8_COMPILER_REPRESENTATION_CHANGE_H_ | 5 #ifndef V8_COMPILER_REPRESENTATION_CHANGE_H_ |
6 #define V8_COMPILER_REPRESENTATION_CHANGE_H_ | 6 #define V8_COMPILER_REPRESENTATION_CHANGE_H_ |
7 | 7 |
8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.h" |
9 #include "src/compiler/simplified-operator.h" | 9 #include "src/compiler/simplified-operator.h" |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 } | 28 } |
29 | 29 |
30 // Queries. | 30 // Queries. |
31 bool IsUnused() const { return kind_ == TruncationKind::kNone; } | 31 bool IsUnused() const { return kind_ == TruncationKind::kNone; } |
32 bool IsUsedAsWord32() const { | 32 bool IsUsedAsWord32() const { |
33 return LessGeneral(kind_, TruncationKind::kWord32); | 33 return LessGeneral(kind_, TruncationKind::kWord32); |
34 } | 34 } |
35 bool IsUsedAsFloat64() const { | 35 bool IsUsedAsFloat64() const { |
36 return LessGeneral(kind_, TruncationKind::kFloat64); | 36 return LessGeneral(kind_, TruncationKind::kFloat64); |
37 } | 37 } |
| 38 bool IdentifiesMinusZeroAndZero() { |
| 39 return LessGeneral(kind_, TruncationKind::kWord32) || |
| 40 LessGeneral(kind_, TruncationKind::kBool); |
| 41 } |
38 bool IdentifiesNaNAndZero() { | 42 bool IdentifiesNaNAndZero() { |
39 return LessGeneral(kind_, TruncationKind::kWord32) || | 43 return LessGeneral(kind_, TruncationKind::kWord32) || |
40 LessGeneral(kind_, TruncationKind::kBool); | 44 LessGeneral(kind_, TruncationKind::kBool); |
41 } | 45 } |
42 bool IdentifiesUndefinedAndNaNAndZero() { | 46 bool IdentifiesUndefinedAndNaNAndZero() { |
43 return LessGeneral(kind_, TruncationKind::kFloat64) || | 47 return LessGeneral(kind_, TruncationKind::kFloat64) || |
44 LessGeneral(kind_, TruncationKind::kWord64); | 48 LessGeneral(kind_, TruncationKind::kWord64); |
45 } | 49 } |
46 | 50 |
47 // Operators. | 51 // Operators. |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
276 Factory* factory() const { return isolate()->factory(); } | 280 Factory* factory() const { return isolate()->factory(); } |
277 SimplifiedOperatorBuilder* simplified() { return jsgraph()->simplified(); } | 281 SimplifiedOperatorBuilder* simplified() { return jsgraph()->simplified(); } |
278 MachineOperatorBuilder* machine() { return jsgraph()->machine(); } | 282 MachineOperatorBuilder* machine() { return jsgraph()->machine(); } |
279 }; | 283 }; |
280 | 284 |
281 } // namespace compiler | 285 } // namespace compiler |
282 } // namespace internal | 286 } // namespace internal |
283 } // namespace v8 | 287 } // namespace v8 |
284 | 288 |
285 #endif // V8_COMPILER_REPRESENTATION_CHANGE_H_ | 289 #endif // V8_COMPILER_REPRESENTATION_CHANGE_H_ |
OLD | NEW |