OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_CALL_REDUCER_H_ | 5 #ifndef V8_COMPILER_JS_CALL_REDUCER_H_ |
6 #define V8_COMPILER_JS_CALL_REDUCER_H_ | 6 #define V8_COMPILER_JS_CALL_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 |
(...skipping 20 matching lines...) Expand all Loading... |
31 JSCallReducer(Editor* editor, JSGraph* jsgraph, | 31 JSCallReducer(Editor* editor, JSGraph* jsgraph, |
32 Handle<Context> native_context, | 32 Handle<Context> native_context, |
33 CompilationDependencies* dependencies) | 33 CompilationDependencies* dependencies) |
34 : AdvancedReducer(editor), | 34 : AdvancedReducer(editor), |
35 jsgraph_(jsgraph), | 35 jsgraph_(jsgraph), |
36 native_context_(native_context), | 36 native_context_(native_context), |
37 dependencies_(dependencies) {} | 37 dependencies_(dependencies) {} |
38 | 38 |
39 Reduction Reduce(Node* node) final; | 39 Reduction Reduce(Node* node) final; |
40 | 40 |
| 41 // Processes the waitlist gathered while the reducer was running, |
| 42 // and does a final attempt to reduce the nodes in the waitlist. |
| 43 void Finalize() final; |
| 44 |
41 private: | 45 private: |
42 Reduction ReduceArrayConstructor(Node* node); | 46 Reduction ReduceArrayConstructor(Node* node); |
43 Reduction ReduceBooleanConstructor(Node* node); | 47 Reduction ReduceBooleanConstructor(Node* node); |
44 Reduction ReduceCallApiFunction( | 48 Reduction ReduceCallApiFunction( |
45 Node* node, Handle<FunctionTemplateInfo> function_template_info); | 49 Node* node, Handle<FunctionTemplateInfo> function_template_info); |
46 Reduction ReduceNumberConstructor(Node* node); | 50 Reduction ReduceNumberConstructor(Node* node); |
47 Reduction ReduceFunctionPrototypeApply(Node* node); | 51 Reduction ReduceFunctionPrototypeApply(Node* node); |
48 Reduction ReduceFunctionPrototypeCall(Node* node); | 52 Reduction ReduceFunctionPrototypeCall(Node* node); |
49 Reduction ReduceFunctionPrototypeHasInstance(Node* node); | 53 Reduction ReduceFunctionPrototypeHasInstance(Node* node); |
50 Reduction ReduceObjectGetPrototype(Node* node, Node* object); | 54 Reduction ReduceObjectGetPrototype(Node* node, Node* object); |
(...skipping 21 matching lines...) Expand all Loading... |
72 Handle<Context> native_context() const { return native_context_; } | 76 Handle<Context> native_context() const { return native_context_; } |
73 Handle<JSGlobalProxy> global_proxy() const; | 77 Handle<JSGlobalProxy> global_proxy() const; |
74 CommonOperatorBuilder* common() const; | 78 CommonOperatorBuilder* common() const; |
75 JSOperatorBuilder* javascript() const; | 79 JSOperatorBuilder* javascript() const; |
76 SimplifiedOperatorBuilder* simplified() const; | 80 SimplifiedOperatorBuilder* simplified() const; |
77 CompilationDependencies* dependencies() const { return dependencies_; } | 81 CompilationDependencies* dependencies() const { return dependencies_; } |
78 | 82 |
79 JSGraph* const jsgraph_; | 83 JSGraph* const jsgraph_; |
80 Handle<Context> const native_context_; | 84 Handle<Context> const native_context_; |
81 CompilationDependencies* const dependencies_; | 85 CompilationDependencies* const dependencies_; |
| 86 std::set<Node*> waitlist_; |
82 }; | 87 }; |
83 | 88 |
84 } // namespace compiler | 89 } // namespace compiler |
85 } // namespace internal | 90 } // namespace internal |
86 } // namespace v8 | 91 } // namespace v8 |
87 | 92 |
88 #endif // V8_COMPILER_JS_CALL_REDUCER_H_ | 93 #endif // V8_COMPILER_JS_CALL_REDUCER_H_ |
OLD | NEW |