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 #include "src/zone.h" | |
10 | 11 |
11 namespace v8 { | 12 namespace v8 { |
12 namespace internal { | 13 namespace internal { |
13 | 14 |
14 class Isolate; | 15 class Isolate; |
15 class RangeType; | 16 class RangeType; |
16 class Type; | 17 class Type; |
17 class TypeCache; | 18 class TypeCache; |
18 class Zone; | |
19 | 19 |
20 namespace compiler { | 20 namespace compiler { |
21 | 21 |
22 class OperationTyper { | 22 class OperationTyper : public ZoneObject { |
Benedikt Meurer
2016/06/22 03:49:49
Nit: This shouldn't be a ZoneObject. Just embed th
| |
23 public: | 23 public: |
24 OperationTyper(Isolate* isolate, Zone* zone); | 24 OperationTyper(Isolate* isolate, Zone* zone); |
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); |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
75 Type* singleton_false_; | 75 Type* singleton_false_; |
76 Type* singleton_true_; | 76 Type* singleton_true_; |
77 Type* singleton_the_hole_; | 77 Type* singleton_the_hole_; |
78 }; | 78 }; |
79 | 79 |
80 } // namespace compiler | 80 } // namespace compiler |
81 } // namespace internal | 81 } // namespace internal |
82 } // namespace v8 | 82 } // namespace v8 |
83 | 83 |
84 #endif // V8_COMPILER_OPERATION_TYPER_H_ | 84 #endif // V8_COMPILER_OPERATION_TYPER_H_ |
OLD | NEW |