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

Unified Diff: src/compiler/ast-graph-builder.h

Issue 934293002: [turbofan] Simply context specialization and fix for OSR. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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 | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/ast-graph-builder.h
diff --git a/src/compiler/ast-graph-builder.h b/src/compiler/ast-graph-builder.h
index 515283fc8a48fabde62cce0b7959e3e1552b98fa..ebeb6c613c9c817d10f01927970a5067eec77e87 100644
--- a/src/compiler/ast-graph-builder.h
+++ b/src/compiler/ast-graph-builder.h
@@ -31,7 +31,7 @@ class AstGraphBuilder : public AstVisitor {
LoopAssignmentAnalysis* loop_assignment = NULL);
// Creates a graph by visiting the entire AST.
- bool CreateGraph();
+ bool CreateGraph(bool constant_context);
// Helpers to create new control nodes.
Node* NewIfTrue() { return NewNode(common()->IfTrue()); }
@@ -51,12 +51,6 @@ class AstGraphBuilder : public AstVisitor {
// Visiting function for declarations list is overridden.
void VisitDeclarations(ZoneList<Declaration*>* declarations) OVERRIDE;
- // Get the node that represents the outer function context.
- Node* GetFunctionContext();
-
- // Get the node that represents the outer function closure.
- Node* GetFunctionClosure();
-
private:
class AstContext;
class AstEffectContext;
@@ -88,7 +82,7 @@ class AstGraphBuilder : public AstVisitor {
// Nodes representing values in the activation record.
SetOncePointer<Node> function_closure_;
- Node* function_context_;
+ SetOncePointer<Node> function_context_;
// Temporary storage for building node input lists.
int input_buffer_size_;
@@ -127,8 +121,15 @@ class AstGraphBuilder : public AstVisitor {
void set_execution_context(ContextScope* ctx) { execution_context_ = ctx; }
void set_exit_control(Node* exit) { exit_control_ = exit; }
+ // Create the main graph body by visiting the AST.
void CreateGraphBody();
+ // Create the node that represents the outer context of the function.
+ void CreateFunctionContext(bool constant_context);
+
+ // Get or create the node that represents the outer function closure.
+ Node* GetFunctionClosure();
+
// Node creation helpers.
Node* NewNode(const Operator* op, bool incomplete = false) {
return MakeNode(op, 0, static_cast<Node**>(NULL), incomplete);
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698