| 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 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 // Typing Phi. | 26 // Typing Phi. |
| 27 Type* Merge(Type* left, Type* right); | 27 Type* Merge(Type* left, Type* right); |
| 28 | 28 |
| 29 Type* ToPrimitive(Type* type); | 29 Type* ToPrimitive(Type* type); |
| 30 | 30 |
| 31 // Helpers for number operation typing. | 31 // Helpers for number operation typing. |
| 32 Type* ToNumber(Type* type); | 32 Type* ToNumber(Type* type); |
| 33 Type* WeakenRange(Type* current_range, Type* previous_range); | 33 Type* WeakenRange(Type* current_range, Type* previous_range); |
| 34 | 34 |
| 35 Type* NumericAdd(Type* lhs, Type* rhs); | 35 Type* NumberAdd(Type* lhs, Type* rhs); |
| 36 Type* NumericSubtract(Type* lhs, Type* rhs); | 36 Type* NumberSubtract(Type* lhs, Type* rhs); |
| 37 Type* NumericMultiply(Type* lhs, Type* rhs); | 37 Type* NumberMultiply(Type* lhs, Type* rhs); |
| 38 Type* NumericDivide(Type* lhs, Type* rhs); | 38 Type* NumberDivide(Type* lhs, Type* rhs); |
| 39 Type* NumericModulus(Type* lhs, Type* rhs); | 39 Type* NumberModulus(Type* lhs, Type* rhs); |
| 40 |
| 41 Type* NumberAbs(Type* type); |
| 40 | 42 |
| 41 enum ComparisonOutcomeFlags { | 43 enum ComparisonOutcomeFlags { |
| 42 kComparisonTrue = 1, | 44 kComparisonTrue = 1, |
| 43 kComparisonFalse = 2, | 45 kComparisonFalse = 2, |
| 44 kComparisonUndefined = 4 | 46 kComparisonUndefined = 4 |
| 45 }; | 47 }; |
| 46 | 48 |
| 47 // Javascript binop typers. | 49 // Javascript binop typers. |
| 48 #define DECLARE_CASE(x) Type* Type##x(Type* lhs, Type* rhs); | 50 #define DECLARE_CASE(x) Type* Type##x(Type* lhs, Type* rhs); |
| 49 JS_SIMPLE_BINOP_LIST(DECLARE_CASE) | 51 JS_SIMPLE_BINOP_LIST(DECLARE_CASE) |
| (...skipping 25 matching lines...) Expand all Loading... |
| 75 Type* singleton_false_; | 77 Type* singleton_false_; |
| 76 Type* singleton_true_; | 78 Type* singleton_true_; |
| 77 Type* singleton_the_hole_; | 79 Type* singleton_the_hole_; |
| 78 }; | 80 }; |
| 79 | 81 |
| 80 } // namespace compiler | 82 } // namespace compiler |
| 81 } // namespace internal | 83 } // namespace internal |
| 82 } // namespace v8 | 84 } // namespace v8 |
| 83 | 85 |
| 84 #endif // V8_COMPILER_OPERATION_TYPER_H_ | 86 #endif // V8_COMPILER_OPERATION_TYPER_H_ |
| OLD | NEW |