| 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);
|
|
|