| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_OPERATION_TYPER_H_ | 5 #ifndef V8_COMPILER_OPERATION_TYPER_H_ |
| 6 #define V8_COMPILER_OPERATION_TYPER_H_ | 6 #define V8_COMPILER_OPERATION_TYPER_H_ |
| 7 | 7 |
| 8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
| 9 #include "src/compiler/opcodes.h" | 9 #include "src/compiler/opcodes.h" |
| 10 | 10 |
| 11 namespace v8 { | 11 namespace v8 { |
| 12 namespace internal { | 12 namespace internal { |
| 13 | 13 |
| 14 // Forward declarations. |
| 15 class Factory; |
| 14 class Isolate; | 16 class Isolate; |
| 15 class RangeType; | 17 class RangeType; |
| 16 class Type; | 18 class Type; |
| 17 class TypeCache; | 19 class TypeCache; |
| 18 class Zone; | 20 class Zone; |
| 19 | 21 |
| 20 namespace compiler { | 22 namespace compiler { |
| 21 | 23 |
| 24 // Forward declarations. |
| 22 class Operator; | 25 class Operator; |
| 23 | 26 |
| 24 class OperationTyper { | 27 class OperationTyper { |
| 25 public: | 28 public: |
| 26 OperationTyper(Isolate* isolate, Zone* zone); | 29 OperationTyper(Isolate* isolate, Zone* zone); |
| 27 | 30 |
| 28 // Typing Phi. | 31 // Typing Phi. |
| 29 Type* Merge(Type* left, Type* right); | 32 Type* Merge(Type* left, Type* right); |
| 30 | 33 |
| 31 Type* ToPrimitive(Type* type); | 34 Type* ToPrimitive(Type* type); |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 Type* Invert(Type*); | 67 Type* Invert(Type*); |
| 65 Type* FalsifyUndefined(ComparisonOutcome); | 68 Type* FalsifyUndefined(ComparisonOutcome); |
| 66 | 69 |
| 67 Type* Rangify(Type*); | 70 Type* Rangify(Type*); |
| 68 Type* AddRanger(double lhs_min, double lhs_max, double rhs_min, | 71 Type* AddRanger(double lhs_min, double lhs_max, double rhs_min, |
| 69 double rhs_max); | 72 double rhs_max); |
| 70 Type* SubtractRanger(double lhs_min, double lhs_max, double rhs_min, | 73 Type* SubtractRanger(double lhs_min, double lhs_max, double rhs_min, |
| 71 double rhs_max); | 74 double rhs_max); |
| 72 Type* MultiplyRanger(Type* lhs, Type* rhs); | 75 Type* MultiplyRanger(Type* lhs, Type* rhs); |
| 73 | 76 |
| 77 Factory* factory() const; |
| 78 Isolate* isolate() const { return isolate_; } |
| 74 Zone* zone() const { return zone_; } | 79 Zone* zone() const { return zone_; } |
| 75 | 80 |
| 81 Isolate* const isolate_; |
| 76 Zone* const zone_; | 82 Zone* const zone_; |
| 77 TypeCache const& cache_; | 83 TypeCache const& cache_; |
| 78 | 84 |
| 79 Type* infinity_; | 85 Type* infinity_; |
| 80 Type* minus_infinity_; | 86 Type* minus_infinity_; |
| 81 Type* singleton_false_; | 87 Type* singleton_false_; |
| 82 Type* singleton_true_; | 88 Type* singleton_true_; |
| 83 Type* singleton_the_hole_; | 89 Type* singleton_the_hole_; |
| 84 Type* signed32ish_; | 90 Type* signed32ish_; |
| 85 Type* unsigned32ish_; | 91 Type* unsigned32ish_; |
| 86 }; | 92 }; |
| 87 | 93 |
| 88 } // namespace compiler | 94 } // namespace compiler |
| 89 } // namespace internal | 95 } // namespace internal |
| 90 } // namespace v8 | 96 } // namespace v8 |
| 91 | 97 |
| 92 #endif // V8_COMPILER_OPERATION_TYPER_H_ | 98 #endif // V8_COMPILER_OPERATION_TYPER_H_ |
| OLD | NEW |