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

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

Issue 687103004: Minor cleanup using BooleanConstant in graph builder. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 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 unified diff | Download patch | Annotate | Revision Log
« 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/v8.h" 8 #include "src/v8.h"
9 9
10 #include "src/ast.h" 10 #include "src/ast.h"
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
129 // Stack of breakable statements entered by the visitor. 129 // Stack of breakable statements entered by the visitor.
130 BreakableScope* breakable_; 130 BreakableScope* breakable_;
131 131
132 // Stack of context objects pushed onto the chain by the visitor. 132 // Stack of context objects pushed onto the chain by the visitor.
133 ContextScope* execution_context_; 133 ContextScope* execution_context_;
134 134
135 // Nodes representing values in the activation record. 135 // Nodes representing values in the activation record.
136 SetOncePointer<Node> function_closure_; 136 SetOncePointer<Node> function_closure_;
137 SetOncePointer<Node> function_context_; 137 SetOncePointer<Node> function_context_;
138 138
139 // Result of loop assignment analysis performed before graph creation.
139 LoopAssignmentAnalysis* loop_assignment_analysis_; 140 LoopAssignmentAnalysis* loop_assignment_analysis_;
140 141
141 CompilationInfo* info() const { return info_; } 142 CompilationInfo* info() const { return info_; }
142 inline StrictMode strict_mode() const; 143 inline StrictMode strict_mode() const;
143 JSGraph* jsgraph() { return jsgraph_; } 144 JSGraph* jsgraph() { return jsgraph_; }
144 JSOperatorBuilder* javascript() { return jsgraph_->javascript(); } 145 JSOperatorBuilder* javascript() { return jsgraph_->javascript(); }
145 ZoneList<Handle<Object> >* globals() { return &globals_; } 146 ZoneList<Handle<Object> >* globals() { return &globals_; }
146 147
147 // Current scope during visitation. 148 // Current scope during visitation.
148 inline Scope* current_scope() const; 149 inline Scope* current_scope() const;
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 void VisitArithmeticExpression(BinaryOperation* expr); 183 void VisitArithmeticExpression(BinaryOperation* expr);
183 184
184 // Dispatched from VisitForInStatement. 185 // Dispatched from VisitForInStatement.
185 void VisitForInAssignment(Expression* expr, Node* value); 186 void VisitForInAssignment(Expression* expr, Node* value);
186 187
187 // Builds deoptimization for a given node. 188 // Builds deoptimization for a given node.
188 void PrepareFrameState( 189 void PrepareFrameState(
189 Node* node, BailoutId ast_id, 190 Node* node, BailoutId ast_id,
190 OutputFrameStateCombine combine = OutputFrameStateCombine::Ignore()); 191 OutputFrameStateCombine combine = OutputFrameStateCombine::Ignore());
191 192
192 OutputFrameStateCombine StateCombineFromAstContext();
193
194 BitVector* GetVariablesAssignedInLoop(IterationStatement* stmt); 193 BitVector* GetVariablesAssignedInLoop(IterationStatement* stmt);
195 194
196 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS(); 195 DEFINE_AST_VISITOR_SUBCLASS_MEMBERS();
197 DISALLOW_COPY_AND_ASSIGN(AstGraphBuilder); 196 DISALLOW_COPY_AND_ASSIGN(AstGraphBuilder);
198 }; 197 };
199 198
200 199
201 // The abstract execution environment for generated code consists of 200 // The abstract execution environment for generated code consists of
202 // parameter variables, local variables and the operand stack. The 201 // parameter variables, local variables and the operand stack. The
203 // environment will perform proper SSA-renaming of all tracked nodes 202 // environment will perform proper SSA-renaming of all tracked nodes
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
432 private: 431 private:
433 AstGraphBuilder* owner_; 432 AstGraphBuilder* owner_;
434 ContextScope* next_; 433 ContextScope* next_;
435 Node* outer_; 434 Node* outer_;
436 Scope* scope_; 435 Scope* scope_;
437 }; 436 };
438 437
439 Scope* AstGraphBuilder::current_scope() const { 438 Scope* AstGraphBuilder::current_scope() const {
440 return execution_context_->scope(); 439 return execution_context_->scope();
441 } 440 }
442 } 441
443 } 442 } // namespace compiler
444 } // namespace v8::internal::compiler 443 } // namespace internal
444 } // namespace v8
445 445
446 #endif // V8_COMPILER_AST_GRAPH_BUILDER_H_ 446 #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