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

Side by Side Diff: src/hydrogen-instructions.cc

Issue 11618017: Deopt on overflow in integer mod. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1335 } 1335 }
1336 1336
1337 1337
1338 Range* HMod::InferRange(Zone* zone) { 1338 Range* HMod::InferRange(Zone* zone) {
1339 if (representation().IsInteger32()) { 1339 if (representation().IsInteger32()) {
1340 Range* a = left()->range(); 1340 Range* a = left()->range();
1341 Range* result = new(zone) Range(); 1341 Range* result = new(zone) Range();
1342 if (a->CanBeMinusZero() || a->CanBeNegative()) { 1342 if (a->CanBeMinusZero() || a->CanBeNegative()) {
1343 result->set_can_be_minus_zero(true); 1343 result->set_can_be_minus_zero(true);
1344 } 1344 }
1345
1346 if (right()->range()->Includes(-1) && left()->range()->Includes(kMinInt)) {
1347 SetFlag(HValue::kCanOverflow);
1348 }
1349
1345 if (!right()->range()->CanBeZero()) { 1350 if (!right()->range()->CanBeZero()) {
1346 ClearFlag(HValue::kCanBeDivByZero); 1351 ClearFlag(HValue::kCanBeDivByZero);
1347 } 1352 }
1348 return result; 1353 return result;
1349 } else { 1354 } else {
1350 return HValue::InferRange(zone); 1355 return HValue::InferRange(zone);
1351 } 1356 }
1352 } 1357 }
1353 1358
1354 1359
(...skipping 1426 matching lines...) Expand 10 before | Expand all | Expand 10 after
2781 2786
2782 2787
2783 void HCheckFunction::Verify() { 2788 void HCheckFunction::Verify() {
2784 HInstruction::Verify(); 2789 HInstruction::Verify();
2785 ASSERT(HasNoUses()); 2790 ASSERT(HasNoUses());
2786 } 2791 }
2787 2792
2788 #endif 2793 #endif
2789 2794
2790 } } // namespace v8::internal 2795 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/ia32/lithium-codegen-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698