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

Unified Diff: src/data-flow.h

Issue 668257: Have the flow graph builder collect definitions. (Closed)
Patch Set: Created 10 years, 9 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/data-flow.cc » ('j') | src/data-flow.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/data-flow.h
diff --git a/src/data-flow.h b/src/data-flow.h
index 30c0336114a3bc31a6d3a78fcf1ad38b4c35b439..aec995b06a2b5685beee3773b1545d6bc0ff6a1f 100644
--- a/src/data-flow.h
+++ b/src/data-flow.h
@@ -363,7 +363,12 @@ class JoinNode: public Node {
// traversal orders as a byproduct.
class FlowGraphBuilder: public AstVisitor {
public:
- FlowGraphBuilder() : global_exit_(NULL), preorder_(4), postorder_(4) {}
+ FlowGraphBuilder()
+ : global_exit_(NULL),
+ preorder_(4),
+ postorder_(4),
+ definitions_(4) {
+ }
void Build(FunctionLiteral* lit);
@@ -384,6 +389,11 @@ class FlowGraphBuilder: public AstVisitor {
ZoneList<Node*> preorder_;
ZoneList<Node*> postorder_;
+ // The flow graph builder collects a list of definitions (assignments and
+ // count operations) to stack-allocated variables to use for reaching
+ // definitions analysis.
+ ZoneList<AstNode*> definitions_;
+
DISALLOW_COPY_AND_ASSIGN(FlowGraphBuilder);
};
« no previous file with comments | « no previous file | src/data-flow.cc » ('j') | src/data-flow.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698