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

Unified Diff: runtime/vm/flow_graph_builder.h

Issue 269273002: Remove optimization in unoptimized code that leave the graph in bad state (type test). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.h
===================================================================
--- runtime/vm/flow_graph_builder.h (revision 35850)
+++ runtime/vm/flow_graph_builder.h (working copy)
@@ -452,7 +452,11 @@
// Specify a definition of the final result. Adds the definition to
// the graph, but normally overridden in subclasses.
virtual void ReturnDefinition(Definition* definition) {
- Do(definition);
+ // Constants have no effect, do not add them to graph otherwise SSA
+ // builder will get confused.
+ if (!definition->IsConstant()) {
+ Do(definition);
+ }
}
// Shared global state.
@@ -475,7 +479,6 @@
: EffectGraphVisitor(owner), value_(NULL) { }
// Visit functions overridden by this class.
- virtual void VisitLiteralNode(LiteralNode* node);
virtual void VisitAssignableNode(AssignableNode* node);
virtual void VisitConstructorCallNode(ConstructorCallNode* node);
virtual void VisitBinaryOpNode(BinaryOpNode* node);
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698