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

Unified Diff: runtime/vm/flow_graph_builder.cc

Issue 15935005: Remove pseudo-node from LoadLocalNode and replace it with a proper AST node. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 7 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/flow_graph_builder.cc
===================================================================
--- runtime/vm/flow_graph_builder.cc (revision 23217)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -2647,16 +2647,11 @@
// <Expression> ::= LoadLocal { local: LocalVariable }
void EffectGraphVisitor::VisitLoadLocalNode(LoadLocalNode* node) {
- if (node->HasPseudo()) {
- EffectGraphVisitor for_pseudo(owner(), temp_index());
- node->pseudo()->Visit(&for_pseudo);
- Append(for_pseudo);
- }
+ // Nothing to do.
}
void ValueGraphVisitor::VisitLoadLocalNode(LoadLocalNode* node) {
- EffectGraphVisitor::VisitLoadLocalNode(node);
Definition* load = BuildLoadLocal(node->local());
ReturnDefinition(load);
}
@@ -3147,6 +3142,29 @@
}
+void EffectGraphVisitor::VisitCommaNode(CommaNode* node) {
+ EffectGraphVisitor for_effect_first(owner(), temp_index());
Kevin Millikin (Google) 2013/05/28 09:13:26 Here and below: a loop over the children if you su
+ node->first()->Visit(&for_effect_first);
+ Append(for_effect_first);
+
+ EffectGraphVisitor for_effect_second(owner(), temp_index());
+ node->second()->Visit(&for_effect_second);
+ Append(for_effect_second);
+}
+
+
+void ValueGraphVisitor::VisitCommaNode(CommaNode* node) {
+ EffectGraphVisitor for_effect(owner(), temp_index());
+ node->first()->Visit(&for_effect);
+ Append(for_effect);
+
+ ValueGraphVisitor for_value(owner(), temp_index());
+ node->second()->Visit(&for_value);
+ Append(for_value);
+ ReturnValue(for_value.value());
+}
+
+
void EffectGraphVisitor::VisitTryCatchNode(TryCatchNode* node) {
InlineBailout("EffectGraphVisitor::VisitTryCatchNode (exception)");
intptr_t old_try_index = owner()->try_index();
« runtime/vm/ast.h ('K') | « runtime/vm/flow_graph_builder.h ('k') | runtime/vm/parser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698