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

Unified Diff: src/compiler/js-context-specialization.h

Issue 1218873005: [turbofan] Context specialization is the job of the JSContextSpecialization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix mini-nit. Created 5 years, 5 months 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/ast-graph-builder.cc ('k') | src/compiler/js-context-specialization.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-context-specialization.h
diff --git a/src/compiler/js-context-specialization.h b/src/compiler/js-context-specialization.h
index 1f0c2b817ad3ebcbcf83df508fb6f31414db820c..2ede6b5e1767f163396c057fc5fbe6ad1061d7ad 100644
--- a/src/compiler/js-context-specialization.h
+++ b/src/compiler/js-context-specialization.h
@@ -18,25 +18,28 @@ class JSOperatorBuilder;
// Specializes a given JSGraph to a given context, potentially constant folding
// some {LoadContext} nodes or strength reducing some {StoreContext} nodes.
-class JSContextSpecializer : public AdvancedReducer {
+class JSContextSpecialization final : public AdvancedReducer {
public:
- JSContextSpecializer(Editor* editor, JSGraph* jsgraph)
- : AdvancedReducer(editor), jsgraph_(jsgraph) {}
+ JSContextSpecialization(Editor* editor, JSGraph* jsgraph,
+ MaybeHandle<Context> context)
+ : AdvancedReducer(editor), jsgraph_(jsgraph), context_(context) {}
- Reduction Reduce(Node* node) override;
+ Reduction Reduce(Node* node) final;
- // Visible for unit testing.
+ private:
+ Reduction ReduceParameter(Node* node);
Reduction ReduceJSLoadContext(Node* node);
Reduction ReduceJSStoreContext(Node* node);
- private:
Isolate* isolate() const;
JSOperatorBuilder* javascript() const;
JSGraph* jsgraph() const { return jsgraph_; }
+ MaybeHandle<Context> context() const { return context_; }
JSGraph* const jsgraph_;
+ MaybeHandle<Context> context_;
- DISALLOW_COPY_AND_ASSIGN(JSContextSpecializer);
+ DISALLOW_COPY_AND_ASSIGN(JSContextSpecialization);
};
} // namespace compiler
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | src/compiler/js-context-specialization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698