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

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

Issue 1451273002: [turbofan] Move JSCallFunction specialization to JSCallReducer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix arm64 failures. 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/arm64/code-stubs-arm64.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
index 04fc8b0c5ca6c43cc4072580d80eccd93839564c..cc909f882cc3bbebcfbe3b861047b6c2298be72d 100644
--- a/src/compiler/js-call-reducer.h
+++ b/src/compiler/js-call-reducer.h
@@ -5,6 +5,7 @@
#ifndef V8_COMPILER_JS_CALL_REDUCER_H_
#define V8_COMPILER_JS_CALL_REDUCER_H_
+#include "src/base/flags.h"
#include "src/compiler/graph-reducer.h"
namespace v8 {
@@ -12,30 +13,47 @@ namespace internal {
namespace compiler {
// Forward declarations.
+class CommonOperatorBuilder;
class JSGraph;
class JSOperatorBuilder;
+class SimplifiedOperatorBuilder;
// 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) {}
+ // Flags that control the mode of operation.
+ enum Flag {
+ kNoFlags = 0u,
+ kDeoptimizationEnabled = 1u << 0,
+ };
+ typedef base::Flags<Flag> Flags;
+
+ JSCallReducer(JSGraph* jsgraph, Flags flags)
+ : jsgraph_(jsgraph), flags_(flags) {}
Reduction Reduce(Node* node) final;
private:
Reduction ReduceFunctionPrototypeApply(Node* node);
Reduction ReduceFunctionPrototypeCall(Node* node);
+ Reduction ReduceJSCallFunction(Node* node);
Graph* graph() const;
+ Flags flags() const { return flags_; }
JSGraph* jsgraph() const { return jsgraph_; }
Isolate* isolate() const;
+ CommonOperatorBuilder* common() const;
JSOperatorBuilder* javascript() const;
+ SimplifiedOperatorBuilder* simplified() const;
JSGraph* const jsgraph_;
+ Flags const flags_;
};
+DEFINE_OPERATORS_FOR_FLAGS(JSCallReducer::Flags)
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « src/arm64/code-stubs-arm64.cc ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698