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_SIMPLIFIED_OPERATOR_REDUCER_H_ | 5 #ifndef V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_ |
6 #define V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_ | 6 #define V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_ |
7 | 7 |
8 #include "src/compiler/graph-reducer.h" | 8 #include "src/compiler/graph-reducer.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
11 namespace internal { | 11 namespace internal { |
12 | 12 |
13 // Forward declarations. | 13 // Forward declarations. |
14 class TypeCache; | 14 class TypeCache; |
15 | 15 |
16 namespace compiler { | 16 namespace compiler { |
17 | 17 |
18 // Forward declarations. | 18 // Forward declarations. |
19 class JSGraph; | 19 class JSGraph; |
20 class MachineOperatorBuilder; | 20 class MachineOperatorBuilder; |
21 class SimplifiedOperatorBuilder; | 21 class SimplifiedOperatorBuilder; |
22 | 22 |
23 | 23 class SimplifiedOperatorReducer final : public AdvancedReducer { |
24 class SimplifiedOperatorReducer final : public Reducer { | |
25 public: | 24 public: |
26 explicit SimplifiedOperatorReducer(JSGraph* jsgraph); | 25 SimplifiedOperatorReducer(Editor* editor, JSGraph* jsgraph); |
27 ~SimplifiedOperatorReducer() final; | 26 ~SimplifiedOperatorReducer() final; |
28 | 27 |
29 Reduction Reduce(Node* node) final; | 28 Reduction Reduce(Node* node) final; |
30 | 29 |
31 private: | 30 private: |
32 Reduction ReduceReferenceEqual(Node* node); | 31 Reduction ReduceReferenceEqual(Node* node); |
33 Reduction ReduceTypeGuard(Node* node); | 32 Reduction ReduceTypeGuard(Node* node); |
34 | 33 |
35 Reduction Change(Node* node, const Operator* op, Node* a); | 34 Reduction Change(Node* node, const Operator* op, Node* a); |
36 Reduction ReplaceBoolean(bool value); | 35 Reduction ReplaceBoolean(bool value); |
(...skipping 14 matching lines...) Expand all Loading... |
51 TypeCache const& type_cache_; | 50 TypeCache const& type_cache_; |
52 | 51 |
53 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorReducer); | 52 DISALLOW_COPY_AND_ASSIGN(SimplifiedOperatorReducer); |
54 }; | 53 }; |
55 | 54 |
56 } // namespace compiler | 55 } // namespace compiler |
57 } // namespace internal | 56 } // namespace internal |
58 } // namespace v8 | 57 } // namespace v8 |
59 | 58 |
60 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_ | 59 #endif // V8_COMPILER_SIMPLIFIED_OPERATOR_REDUCER_H_ |
OLD | NEW |