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

Unified Diff: runtime/vm/ast.cc

Issue 16146008: Simplify AST by extending LetNode and replace CommaNode. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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
Index: runtime/vm/ast.cc
===================================================================
--- runtime/vm/ast.cc (revision 23667)
+++ runtime/vm/ast.cc (working copy)
@@ -77,7 +77,7 @@
: AstNode(token_pos),
vars_(1),
initializers_(1),
- body_(NULL) { }
+ nodes_(1) { }
LocalVariable* LetNode::AddInitializer(AstNode* node) {
@@ -97,7 +97,9 @@
for (intptr_t i = 0; i < num_temps(); ++i) {
initializers_[i]->Visit(visitor);
}
- body_->Visit(visitor);
+ for (intptr_t i = 0; i < nodes_.length(); ++i) {
+ nodes_[i]->Visit(visitor);
+ }
}
« no previous file with comments | « runtime/vm/ast.h ('k') | runtime/vm/ast_printer.cc » ('j') | runtime/vm/flow_graph_builder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698