OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |