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

Unified Diff: src/ia32/codegen-ia32.cc

Issue 4746001: Add check for overflow after MUL operations in side-effect free int32 express... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 10 years, 1 month 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-927.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ia32/codegen-ia32.cc
===================================================================
--- src/ia32/codegen-ia32.cc (revision 5792)
+++ src/ia32/codegen-ia32.cc (working copy)
@@ -8578,9 +8578,11 @@
}
right.Unuse();
frame_->Push(&left);
- if (!node->to_int32()) {
- // If ToInt32 is called on the result of ADD, SUB, or MUL, we don't
+ if (!node->to_int32() || op == Token::MUL) {
+ // If ToInt32 is called on the result of ADD, SUB, we don't
// care about overflows.
+ // Result of MUL can be non-representable precisely in double so
+ // we have to check for overflow.
unsafe_bailout_->Branch(overflow);
}
break;
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-927.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698