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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 23604024: Fix a compiler bug caused by Utils::IsPowerOfTwo treating zero as a power of two. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 3 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/platform/utils.h ('k') | runtime/vm/intermediate_language.cc » ('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 27015)
+++ runtime/vm/flow_graph_optimizer.cc (working copy)
@@ -1230,7 +1230,7 @@
const Object& obj = right->AsConstant()->value();
if (!obj.IsSmi()) return false;
const intptr_t value = Smi::Cast(obj).Value();
- if ((value <= 0) || !Utils::IsPowerOfTwo(value)) return false;
+ if (!Utils::IsPowerOfTwo(value)) return false;
// Insert smi check and attach a copy of the original environment
// because the smi operation can still deoptimize.
« no previous file with comments | « runtime/platform/utils.h ('k') | runtime/vm/intermediate_language.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698