Reviewers: Sven Panne,

Message:
PTAL

Description:
Check that constant is an integer before getting its value in
HGraphBuilder::MatchRotateRight.

BUG=351263
LOG=N
TEST=mjsunit/regress/regress-351263

Please review this at https://codereview.chromium.org/197803005/

SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge

Affected files (+1, -0 lines):
  M src/hydrogen.cc


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) {
     return false;
   }


--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to