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_BUILTIN_REDUCER_H_ | 5 #ifndef V8_COMPILER_JS_BUILTIN_REDUCER_H_ |
6 #define V8_COMPILER_JS_BUILTIN_REDUCER_H_ | 6 #define V8_COMPILER_JS_BUILTIN_REDUCER_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 | 10 |
11 namespace v8 { | 11 namespace v8 { |
12 namespace internal { | 12 namespace internal { |
13 | 13 |
14 // Forward declarations. | 14 // Forward declarations. |
15 class CompilationDependencies; | 15 class CompilationDependencies; |
16 class Factory; | 16 class Factory; |
17 | 17 |
18 namespace compiler { | 18 namespace compiler { |
19 | 19 |
20 // Forward declarations. | 20 // Forward declarations. |
21 class CommonOperatorBuilder; | 21 class CommonOperatorBuilder; |
22 struct FieldAccess; | 22 struct FieldAccess; |
23 class JSGraph; | 23 class JSGraph; |
| 24 class JSOperatorBuilder; |
24 class SimplifiedOperatorBuilder; | 25 class SimplifiedOperatorBuilder; |
25 class TypeCache; | 26 class TypeCache; |
26 | 27 |
27 class JSBuiltinReducer final : public AdvancedReducer { | 28 class JSBuiltinReducer final : public AdvancedReducer { |
28 public: | 29 public: |
29 // Flags that control the mode of operation. | 30 // Flags that control the mode of operation. |
30 enum Flag { | 31 enum Flag { |
31 kNoFlags = 0u, | 32 kNoFlags = 0u, |
32 kDeoptimizationEnabled = 1u << 0, | 33 kDeoptimizationEnabled = 1u << 0, |
33 }; | 34 }; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 Reduction ReduceMathTanh(Node* node); | 80 Reduction ReduceMathTanh(Node* node); |
80 Reduction ReduceMathTrunc(Node* node); | 81 Reduction ReduceMathTrunc(Node* node); |
81 Reduction ReduceNumberIsFinite(Node* node); | 82 Reduction ReduceNumberIsFinite(Node* node); |
82 Reduction ReduceNumberIsInteger(Node* node); | 83 Reduction ReduceNumberIsInteger(Node* node); |
83 Reduction ReduceNumberIsNaN(Node* node); | 84 Reduction ReduceNumberIsNaN(Node* node); |
84 Reduction ReduceNumberIsSafeInteger(Node* node); | 85 Reduction ReduceNumberIsSafeInteger(Node* node); |
85 Reduction ReduceNumberParseInt(Node* node); | 86 Reduction ReduceNumberParseInt(Node* node); |
86 Reduction ReduceStringCharAt(Node* node); | 87 Reduction ReduceStringCharAt(Node* node); |
87 Reduction ReduceStringCharCodeAt(Node* node); | 88 Reduction ReduceStringCharCodeAt(Node* node); |
88 Reduction ReduceStringFromCharCode(Node* node); | 89 Reduction ReduceStringFromCharCode(Node* node); |
| 90 Reduction ReduceStringIteratorNext(Node* node); |
89 Reduction ReduceArrayBufferViewAccessor(Node* node, | 91 Reduction ReduceArrayBufferViewAccessor(Node* node, |
90 InstanceType instance_type, | 92 InstanceType instance_type, |
91 FieldAccess const& access); | 93 FieldAccess const& access); |
92 | 94 |
93 Node* ToNumber(Node* value); | 95 Node* ToNumber(Node* value); |
94 Node* ToUint32(Node* value); | 96 Node* ToUint32(Node* value); |
95 | 97 |
96 Flags flags() const { return flags_; } | 98 Flags flags() const { return flags_; } |
97 Graph* graph() const; | 99 Graph* graph() const; |
98 Factory* factory() const; | 100 Factory* factory() const; |
99 JSGraph* jsgraph() const { return jsgraph_; } | 101 JSGraph* jsgraph() const { return jsgraph_; } |
100 Isolate* isolate() const; | 102 Isolate* isolate() const; |
101 CommonOperatorBuilder* common() const; | 103 CommonOperatorBuilder* common() const; |
102 SimplifiedOperatorBuilder* simplified() const; | 104 SimplifiedOperatorBuilder* simplified() const; |
| 105 JSOperatorBuilder* javascript() const; |
103 CompilationDependencies* dependencies() const { return dependencies_; } | 106 CompilationDependencies* dependencies() const { return dependencies_; } |
104 | 107 |
105 CompilationDependencies* const dependencies_; | 108 CompilationDependencies* const dependencies_; |
106 Flags const flags_; | 109 Flags const flags_; |
107 JSGraph* const jsgraph_; | 110 JSGraph* const jsgraph_; |
108 TypeCache const& type_cache_; | 111 TypeCache const& type_cache_; |
109 }; | 112 }; |
110 | 113 |
111 DEFINE_OPERATORS_FOR_FLAGS(JSBuiltinReducer::Flags) | 114 DEFINE_OPERATORS_FOR_FLAGS(JSBuiltinReducer::Flags) |
112 | 115 |
113 } // namespace compiler | 116 } // namespace compiler |
114 } // namespace internal | 117 } // namespace internal |
115 } // namespace v8 | 118 } // namespace v8 |
116 | 119 |
117 #endif // V8_COMPILER_JS_BUILTIN_REDUCER_H_ | 120 #endif // V8_COMPILER_JS_BUILTIN_REDUCER_H_ |
OLD | NEW |