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

Side by Side Diff: src/compiler/ast-graph-builder.h

Issue 935033002: Simplify handling of stack overflows in AstGraphBuilder. (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 unified diff | Download patch
« no previous file with comments | « no previous file | src/compiler/ast-graph-builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_COMPILER_AST_GRAPH_BUILDER_H_ 5 #ifndef V8_COMPILER_AST_GRAPH_BUILDER_H_
6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_ 6 #define V8_COMPILER_AST_GRAPH_BUILDER_H_
7 7
8 #include "src/ast.h" 8 #include "src/ast.h"
9 #include "src/compiler/js-graph.h" 9 #include "src/compiler/js-graph.h"
10 10
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 class ControlScopeForFinally; 70 class ControlScopeForFinally;
71 class Environment; 71 class Environment;
72 friend class ControlBuilder; 72 friend class ControlBuilder;
73 73
74 Zone* local_zone_; 74 Zone* local_zone_;
75 CompilationInfo* info_; 75 CompilationInfo* info_;
76 JSGraph* jsgraph_; 76 JSGraph* jsgraph_;
77 Environment* environment_; 77 Environment* environment_;
78 AstContext* ast_context_; 78 AstContext* ast_context_;
79 79
80 bool CreateGraphBody();
81
82 // List of global declarations for functions and variables. 80 // List of global declarations for functions and variables.
83 ZoneVector<Handle<Object>> globals_; 81 ZoneVector<Handle<Object>> globals_;
84 82
85 // Stack of control scopes currently entered by the visitor. 83 // Stack of control scopes currently entered by the visitor.
86 ControlScope* execution_control_; 84 ControlScope* execution_control_;
87 85
88 // Stack of context objects pushed onto the chain by the visitor. 86 // Stack of context objects pushed onto the chain by the visitor.
89 ContextScope* execution_context_; 87 ContextScope* execution_context_;
90 88
91 // Nodes representing values in the activation record. 89 // Nodes representing values in the activation record.
(...skipping 30 matching lines...) Expand all
122 Scope* current_scope() const; 120 Scope* current_scope() const;
123 Node* current_context() const; 121 Node* current_context() const;
124 Node* exit_control() const { return exit_control_; } 122 Node* exit_control() const { return exit_control_; }
125 123
126 void set_environment(Environment* env) { environment_ = env; } 124 void set_environment(Environment* env) { environment_ = env; }
127 void set_ast_context(AstContext* ctx) { ast_context_ = ctx; } 125 void set_ast_context(AstContext* ctx) { ast_context_ = ctx; }
128 void set_execution_control(ControlScope* ctrl) { execution_control_ = ctrl; } 126 void set_execution_control(ControlScope* ctrl) { execution_control_ = ctrl; }
129 void set_execution_context(ContextScope* ctx) { execution_context_ = ctx; } 127 void set_execution_context(ContextScope* ctx) { execution_context_ = ctx; }
130 void set_exit_control(Node* exit) { exit_control_ = exit; } 128 void set_exit_control(Node* exit) { exit_control_ = exit; }
131 129
130 void CreateGraphBody();
131
132 // Node creation helpers. 132 // Node creation helpers.
133 Node* NewNode(const Operator* op, bool incomplete = false) { 133 Node* NewNode(const Operator* op, bool incomplete = false) {
134 return MakeNode(op, 0, static_cast<Node**>(NULL), incomplete); 134 return MakeNode(op, 0, static_cast<Node**>(NULL), incomplete);
135 } 135 }
136 136
137 Node* NewNode(const Operator* op, Node* n1) { 137 Node* NewNode(const Operator* op, Node* n1) {
138 return MakeNode(op, 1, &n1, false); 138 return MakeNode(op, 1, &n1, false);
139 } 139 }
140 140
141 Node* NewNode(const Operator* op, Node* n1, Node* n2) { 141 Node* NewNode(const Operator* op, Node* n1, Node* n2) {
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 466
467 // Prepare environment to be used as loop header. 467 // Prepare environment to be used as loop header.
468 void PrepareForLoop(BitVector* assigned, bool is_osr = false); 468 void PrepareForLoop(BitVector* assigned, bool is_osr = false);
469 }; 469 };
470 470
471 } // namespace compiler 471 } // namespace compiler
472 } // namespace internal 472 } // namespace internal
473 } // namespace v8 473 } // namespace v8
474 474
475 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ 475 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_
OLDNEW
« 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