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

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

Issue 1466643002: [turbofan] Initial support for Array constructor specialization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Addressed Michi's comments. 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/bytecode-graph-builder.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 cc909f882cc3bbebcfbe3b861047b6c2298be72d..93eb14c370e146c933d2c36a199c9436a1320db3 100644
--- a/src/compiler/js-call-reducer.h
+++ b/src/compiler/js-call-reducer.h
@@ -16,11 +16,10 @@ namespace compiler {
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.
+// Performs strength reduction on {JSCallConstruct} and {JSCallFunction} nodes,
+// which might allow inlining or other optimizations to be performed afterwards.
class JSCallReducer final : public Reducer {
public:
// Flags that control the mode of operation.
@@ -30,26 +29,32 @@ class JSCallReducer final : public Reducer {
};
typedef base::Flags<Flag> Flags;
- JSCallReducer(JSGraph* jsgraph, Flags flags)
- : jsgraph_(jsgraph), flags_(flags) {}
+ JSCallReducer(JSGraph* jsgraph, Flags flags,
+ MaybeHandle<Context> native_context)
+ : jsgraph_(jsgraph), flags_(flags), native_context_(native_context) {}
Reduction Reduce(Node* node) final;
private:
+ Reduction ReduceArrayConstructor(Node* node);
Reduction ReduceFunctionPrototypeApply(Node* node);
Reduction ReduceFunctionPrototypeCall(Node* node);
+ Reduction ReduceJSCallConstruct(Node* node);
Reduction ReduceJSCallFunction(Node* node);
+ MaybeHandle<Context> GetNativeContext(Node* node);
+
Graph* graph() const;
Flags flags() const { return flags_; }
JSGraph* jsgraph() const { return jsgraph_; }
Isolate* isolate() const;
+ MaybeHandle<Context> native_context() const { return native_context_; }
CommonOperatorBuilder* common() const;
JSOperatorBuilder* javascript() const;
- SimplifiedOperatorBuilder* simplified() const;
JSGraph* const jsgraph_;
Flags const flags_;
+ MaybeHandle<Context> const native_context_;
};
DEFINE_OPERATORS_FOR_FLAGS(JSCallReducer::Flags)
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/compiler/js-call-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698