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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 16780009: When canonicalize instances check if all fields are canonical. If a field is a non-canonical number… (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
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_optimizer.cc
===================================================================
--- runtime/vm/flow_graph_optimizer.cc (revision 23933)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -5430,7 +5430,8 @@
case Token::kMOD: {
Instance& result = Integer::ZoneHandle(
left_int.ArithmeticOp(op_kind, right_int));
- result = result.Canonicalize();
+ result = result.CheckAndCanonicalize(NULL);
+ ASSERT(!result.IsNull());
SetValue(instr, result);
break;
}
@@ -5439,7 +5440,8 @@
if (left.IsSmi() && right.IsSmi()) {
Instance& result = Integer::ZoneHandle(
Smi::Cast(left_int).ShiftOp(op_kind, Smi::Cast(right_int)));
- result = result.Canonicalize();
+ result = result.CheckAndCanonicalize(NULL);
+ ASSERT(!result.IsNull());
SetValue(instr, result);
} else {
SetValue(instr, non_constant_);
@@ -5450,7 +5452,8 @@
case Token::kBIT_XOR: {
Instance& result = Integer::ZoneHandle(
left_int.BitOp(op_kind, right_int));
- result = result.Canonicalize();
+ result = result.CheckAndCanonicalize(NULL);
+ ASSERT(!result.IsNull());
SetValue(instr, result);
break;
}
« no previous file with comments | « runtime/vm/dart_entry.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698