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

Unified Diff: src/hydrogen.cc

Issue 98623004: Fix invalid assertion with OSR in BuildBinaryOperation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years 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 | test/mjsunit/regress/regress-3032.js » ('j') | 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 76c5ca0a4df7835fcf4489500c7f5afd229ee54f..900e07ecdf9fa68a32540fc76be401d0b064a343 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -8858,8 +8858,10 @@ HValue* HGraphBuilder::BuildBinaryOperation(
case Token::MOD: {
if (fixed_right_arg.has_value) {
if (right->IsConstant()) {
- ASSERT_EQ(fixed_right_arg.value,
- HConstant::cast(right)->Integer32Value());
+ HConstant* c_right = HConstant::cast(right);
+ if (c_right->HasInteger32Value()) {
+ ASSERT_EQ(fixed_right_arg.value, c_right->Integer32Value());
+ }
} else {
HConstant* fixed_right = Add<HConstant>(
static_cast<int>(fixed_right_arg.value));
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-3032.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698