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

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

Issue 14471012: Fix overflow check in mul-i which was missing since r14322 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 8 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-mul-canoverflow.js » ('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 1433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1444 1444
1445 HValue* HSub::Canonicalize() { 1445 HValue* HSub::Canonicalize() {
1446 if (IsIdentityOperation(left(), right(), 0)) return left(); 1446 if (IsIdentityOperation(left(), right(), 0)) return left();
1447 return HArithmeticBinaryOperation::Canonicalize(); 1447 return HArithmeticBinaryOperation::Canonicalize();
1448 } 1448 }
1449 1449
1450 1450
1451 HValue* HMul::Canonicalize() { 1451 HValue* HMul::Canonicalize() {
1452 if (IsIdentityOperation(left(), right(), 1)) return left(); 1452 if (IsIdentityOperation(left(), right(), 1)) return left();
1453 if (IsIdentityOperation(right(), left(), 1)) return right(); 1453 if (IsIdentityOperation(right(), left(), 1)) return right();
1454 return HArithmeticBinaryOperation::Canonicalize(); 1454 return this;
1455 } 1455 }
1456 1456
1457 1457
1458 HValue* HChange::Canonicalize() { 1458 HValue* HChange::Canonicalize() {
1459 return (from().Equals(to())) ? value() : this; 1459 return (from().Equals(to())) ? value() : this;
1460 } 1460 }
1461 1461
1462 1462
1463 HValue* HWrapReceiver::Canonicalize() { 1463 HValue* HWrapReceiver::Canonicalize() {
1464 if (HasNoUses()) return NULL; 1464 if (HasNoUses()) return NULL;
(...skipping 2139 matching lines...) Expand 10 before | Expand all | Expand 10 after
3604 3604
3605 3605
3606 void HCheckFunction::Verify() { 3606 void HCheckFunction::Verify() {
3607 HInstruction::Verify(); 3607 HInstruction::Verify();
3608 ASSERT(HasNoUses()); 3608 ASSERT(HasNoUses());
3609 } 3609 }
3610 3610
3611 #endif 3611 #endif
3612 3612
3613 } } // namespace v8::internal 3613 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | test/mjsunit/regress/regress-mul-canoverflow.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698