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_JS_TYPED_LOWERING_H_ | 5 #ifndef V8_COMPILER_JS_TYPED_LOWERING_H_ |
6 #define V8_COMPILER_JS_TYPED_LOWERING_H_ | 6 #define V8_COMPILER_JS_TYPED_LOWERING_H_ |
7 | 7 |
8 #include "src/base/flags.h" | 8 #include "src/base/flags.h" |
9 #include "src/compiler/graph-reducer.h" | 9 #include "src/compiler/graph-reducer.h" |
10 #include "src/compiler/opcodes.h" | 10 #include "src/compiler/opcodes.h" |
11 | 11 |
12 namespace v8 { | 12 namespace v8 { |
13 namespace internal { | 13 namespace internal { |
14 | 14 |
15 // Forward declarations. | 15 // Forward declarations. |
16 class CompilationDependencies; | 16 class CompilationDependencies; |
17 class Factory; | 17 class Factory; |
18 class TypeCache; | |
19 | |
20 | 18 |
21 namespace compiler { | 19 namespace compiler { |
22 | 20 |
23 // Forward declarations. | 21 // Forward declarations. |
24 class CommonOperatorBuilder; | 22 class CommonOperatorBuilder; |
25 class JSGraph; | 23 class JSGraph; |
26 class JSOperatorBuilder; | 24 class JSOperatorBuilder; |
27 class MachineOperatorBuilder; | 25 class MachineOperatorBuilder; |
28 class SimplifiedOperatorBuilder; | 26 class SimplifiedOperatorBuilder; |
29 | 27 class TypeCache; |
30 | 28 |
31 // Lowers JS-level operators to simplified operators based on types. | 29 // Lowers JS-level operators to simplified operators based on types. |
32 class JSTypedLowering final : public AdvancedReducer { | 30 class JSTypedLowering final : public AdvancedReducer { |
33 public: | 31 public: |
34 // Flags that control the mode of operation. | 32 // Flags that control the mode of operation. |
35 enum Flag { | 33 enum Flag { |
36 kNoFlags = 0u, | 34 kNoFlags = 0u, |
37 kDeoptimizationEnabled = 1u << 0, | 35 kDeoptimizationEnabled = 1u << 0, |
38 }; | 36 }; |
39 typedef base::Flags<Flag> Flags; | 37 typedef base::Flags<Flag> Flags; |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 TypeCache const& type_cache_; | 96 TypeCache const& type_cache_; |
99 }; | 97 }; |
100 | 98 |
101 DEFINE_OPERATORS_FOR_FLAGS(JSTypedLowering::Flags) | 99 DEFINE_OPERATORS_FOR_FLAGS(JSTypedLowering::Flags) |
102 | 100 |
103 } // namespace compiler | 101 } // namespace compiler |
104 } // namespace internal | 102 } // namespace internal |
105 } // namespace v8 | 103 } // namespace v8 |
106 | 104 |
107 #endif // V8_COMPILER_JS_TYPED_LOWERING_H_ | 105 #endif // V8_COMPILER_JS_TYPED_LOWERING_H_ |
OLD | NEW |