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" |
(...skipping 16 matching lines...) Expand all Loading... |
27 class SimplifiedOperatorBuilder; | 27 class SimplifiedOperatorBuilder; |
28 | 28 |
29 | 29 |
30 // Lowers JS-level operators to simplified operators based on types. | 30 // Lowers JS-level operators to simplified operators based on types. |
31 class JSTypedLowering final : public AdvancedReducer { | 31 class JSTypedLowering final : public AdvancedReducer { |
32 public: | 32 public: |
33 // Flags that control the mode of operation. | 33 // Flags that control the mode of operation. |
34 enum Flag { | 34 enum Flag { |
35 kNoFlags = 0u, | 35 kNoFlags = 0u, |
36 kDeoptimizationEnabled = 1u << 0, | 36 kDeoptimizationEnabled = 1u << 0, |
37 kDisableIntegerBinaryOpReduction = 1u << 1, | |
38 }; | 37 }; |
39 typedef base::Flags<Flag> Flags; | 38 typedef base::Flags<Flag> Flags; |
40 | 39 |
41 JSTypedLowering(Editor* editor, CompilationDependencies* dependencies, | 40 JSTypedLowering(Editor* editor, CompilationDependencies* dependencies, |
42 Flags flags, JSGraph* jsgraph, Zone* zone); | 41 Flags flags, JSGraph* jsgraph, Zone* zone); |
43 ~JSTypedLowering() final {} | 42 ~JSTypedLowering() final {} |
44 | 43 |
45 Reduction Reduce(Node* node) final; | 44 Reduction Reduce(Node* node) final; |
46 | 45 |
47 private: | 46 private: |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
110 TypeCache const& type_cache_; | 109 TypeCache const& type_cache_; |
111 }; | 110 }; |
112 | 111 |
113 DEFINE_OPERATORS_FOR_FLAGS(JSTypedLowering::Flags) | 112 DEFINE_OPERATORS_FOR_FLAGS(JSTypedLowering::Flags) |
114 | 113 |
115 } // namespace compiler | 114 } // namespace compiler |
116 } // namespace internal | 115 } // namespace internal |
117 } // namespace v8 | 116 } // namespace v8 |
118 | 117 |
119 #endif // V8_COMPILER_JS_TYPED_LOWERING_H_ | 118 #endif // V8_COMPILER_JS_TYPED_LOWERING_H_ |
OLD | NEW |