Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(119)

Unified Diff: src/compiler/js-call-reducer.h

Issue 1445513002: [turbofan] Introduce JSCallReducer to strength reduce JSCallFunction nodes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Comment. Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/js-builtin-reducer.cc ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-call-reducer.h
diff --git a/src/compiler/js-call-reducer.h b/src/compiler/js-call-reducer.h
new file mode 100644
index 0000000000000000000000000000000000000000..04fc8b0c5ca6c43cc4072580d80eccd93839564c
--- /dev/null
+++ b/src/compiler/js-call-reducer.h
@@ -0,0 +1,43 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_COMPILER_JS_CALL_REDUCER_H_
+#define V8_COMPILER_JS_CALL_REDUCER_H_
+
+#include "src/compiler/graph-reducer.h"
+
+namespace v8 {
+namespace internal {
+namespace compiler {
+
+// Forward declarations.
+class JSGraph;
+class JSOperatorBuilder;
+
+
+// Performs strength reduction on {JSCallFunction} nodes, which might allow
+// inlining or other optimizations to be performed afterwards.
+class JSCallReducer final : public Reducer {
+ public:
+ explicit JSCallReducer(JSGraph* jsgraph) : jsgraph_(jsgraph) {}
+
+ Reduction Reduce(Node* node) final;
+
+ private:
+ Reduction ReduceFunctionPrototypeApply(Node* node);
+ Reduction ReduceFunctionPrototypeCall(Node* node);
+
+ Graph* graph() const;
+ JSGraph* jsgraph() const { return jsgraph_; }
+ Isolate* isolate() const;
+ JSOperatorBuilder* javascript() const;
+
+ JSGraph* const jsgraph_;
+};
+
+} // namespace compiler
+} // namespace internal
+} // namespace v8
+
+#endif // V8_COMPILER_JS_CALL_REDUCER_H_
« no previous file with comments | « src/compiler/js-builtin-reducer.cc ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698