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

Unified Diff: src/hydrogen.cc

Issue 197803005: Check that constant is an integer before getting its value in HGraphBuilder::MatchRotateRight. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 9 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index ce5ad80b11ca44f026650735d637e66effce8d34..5cd0b6c47fcc3193df23fdee8f37283bfa1d572c 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -8935,6 +8935,7 @@ static bool ShiftAmountsAllowReplaceByRotate(HValue* sa,
if (sa != sub->right()) return false;
HValue* const32 = sub->left();
if (!const32->IsConstant() ||
+ !HConstant::cast(const32)->HasInteger32Value() ||
HConstant::cast(const32)->Integer32Value() != 32) {
Sven Panne 2014/03/13 09:36:40 Simplify this brain teaser to return sub->left()-
return false;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698