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

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

Issue 11467021: Make sure HMathMinMax always has a supported representation (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 | « src/hydrogen-instructions.h ('k') | no next file » | 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 1671 matching lines...) Expand 10 before | Expand all | Expand 10 after
1682 return rep; 1682 return rep;
1683 } 1683 }
1684 1684
1685 1685
1686 void HBinaryOperation::AssumeRepresentation(Representation r) { 1686 void HBinaryOperation::AssumeRepresentation(Representation r) {
1687 set_observed_input_representation(r, r); 1687 set_observed_input_representation(r, r);
1688 HValue::AssumeRepresentation(r); 1688 HValue::AssumeRepresentation(r);
1689 } 1689 }
1690 1690
1691 1691
1692 void HMathMinMax::InferRepresentation(HInferRepresentation* h_infer) {
1693 ASSERT(CheckFlag(kFlexibleRepresentation));
1694 Representation new_rep = RepresentationFromInputs();
1695 UpdateRepresentation(new_rep, h_infer, "inputs");
1696 // Do not care about uses.
1697 }
1698
1699
1692 Range* HBitwise::InferRange(Zone* zone) { 1700 Range* HBitwise::InferRange(Zone* zone) {
1693 if (op() == Token::BIT_XOR) return HValue::InferRange(zone); 1701 if (op() == Token::BIT_XOR) return HValue::InferRange(zone);
1694 const int32_t kDefaultMask = static_cast<int32_t>(0xffffffff); 1702 const int32_t kDefaultMask = static_cast<int32_t>(0xffffffff);
1695 int32_t left_mask = (left()->range() != NULL) 1703 int32_t left_mask = (left()->range() != NULL)
1696 ? left()->range()->Mask() 1704 ? left()->range()->Mask()
1697 : kDefaultMask; 1705 : kDefaultMask;
1698 int32_t right_mask = (right()->range() != NULL) 1706 int32_t right_mask = (right()->range() != NULL)
1699 ? right()->range()->Mask() 1707 ? right()->range()->Mask()
1700 : kDefaultMask; 1708 : kDefaultMask;
1701 int32_t result_mask = (op() == Token::BIT_AND) 1709 int32_t result_mask = (op() == Token::BIT_AND)
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
2765 2773
2766 2774
2767 void HCheckFunction::Verify() { 2775 void HCheckFunction::Verify() {
2768 HInstruction::Verify(); 2776 HInstruction::Verify();
2769 ASSERT(HasNoUses()); 2777 ASSERT(HasNoUses());
2770 } 2778 }
2771 2779
2772 #endif 2780 #endif
2773 2781
2774 } } // namespace v8::internal 2782 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698