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

Unified Diff: runtime/vm/flow_graph_builder.cc

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 | « runtime/vm/flow_graph_builder.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_builder.cc
===================================================================
--- runtime/vm/flow_graph_builder.cc (revision 35850)
+++ runtime/vm/flow_graph_builder.cc (working copy)
@@ -1037,11 +1037,6 @@
// <Expression> ::= Literal { literal: Instance }
void EffectGraphVisitor::VisitLiteralNode(LiteralNode* node) {
- return;
-}
-
-
-void ValueGraphVisitor::VisitLiteralNode(LiteralNode* node) {
ReturnDefinition(new ConstantInstr(node->literal()));
}
@@ -1423,28 +1418,6 @@
ReturnDefinition(new ConstantInstr(Bool::Get(!negate_result)));
return;
}
-
- // Eliminate the test if it can be performed successfully at compile time.
- if ((node->left() != NULL) &&
- node->left()->IsLiteralNode() &&
- type.IsInstantiated()) {
- const Instance& literal_value = node->left()->AsLiteralNode()->literal();
- ConstantInstr* result = NULL;
-
- Error& malformed_error = Error::Handle();
- if (literal_value.IsInstanceOf(type,
- TypeArguments::Handle(),
- &malformed_error)) {
- result = new ConstantInstr(Bool::Get(!negate_result));
- } else {
- result = new ConstantInstr(Bool::Get(negate_result));
- }
- ASSERT(malformed_error.IsNull());
-
- ReturnDefinition(result);
- return;
- }
-
ValueGraphVisitor for_left_value(owner());
node->left()->Visit(&for_left_value);
Append(for_left_value);
« no previous file with comments | « runtime/vm/flow_graph_builder.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698