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 2230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2241 Representation rep = representation(); | 2241 Representation rep = representation(); |
2242 for (int i = 1; i <= 2; ++i) { | 2242 for (int i = 1; i <= 2; ++i) { |
2243 Representation input_rep = observed_input_representation(i); | 2243 Representation input_rep = observed_input_representation(i); |
2244 if (input_rep.is_more_general_than(rep)) rep = input_rep; | 2244 if (input_rep.is_more_general_than(rep)) rep = input_rep; |
2245 } | 2245 } |
2246 // If any of the actual input representation is more general than what we | 2246 // If any of the actual input representation is more general than what we |
2247 // have so far but not Tagged, use that representation instead. | 2247 // have so far but not Tagged, use that representation instead. |
2248 Representation left_rep = left()->representation(); | 2248 Representation left_rep = left()->representation(); |
2249 Representation right_rep = right()->representation(); | 2249 Representation right_rep = right()->representation(); |
2250 | 2250 |
2251 if (left_rep.is_more_general_than(rep) && | 2251 if (left_rep.is_more_general_than(rep) && !left_rep.IsTagged()) { |
2252 left()->CheckFlag(kFlexibleRepresentation)) { | |
2253 rep = left_rep; | 2252 rep = left_rep; |
2254 } | 2253 } |
2255 if (right_rep.is_more_general_than(rep) && | 2254 if (right_rep.is_more_general_than(rep) && !right_rep.IsTagged()) { |
2256 right()->CheckFlag(kFlexibleRepresentation)) { | |
2257 rep = right_rep; | 2255 rep = right_rep; |
2258 } | 2256 } |
2259 // Consider observed output representation, but ignore it if it's Double, | 2257 // Consider observed output representation, but ignore it if it's Double, |
2260 // this instruction is not a division, and all its uses are truncating | 2258 // this instruction is not a division, and all its uses are truncating |
2261 // to Integer32. | 2259 // to Integer32. |
2262 if (observed_output_representation_.is_more_general_than(rep) && | 2260 if (observed_output_representation_.is_more_general_than(rep) && |
2263 !IgnoreObservedOutputRepresentation(rep)) { | 2261 !IgnoreObservedOutputRepresentation(rep)) { |
2264 rep = observed_output_representation_; | 2262 rep = observed_output_representation_; |
2265 } | 2263 } |
2266 return rep; | 2264 return rep; |
(...skipping 1341 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3608 | 3606 |
3609 | 3607 |
3610 void HCheckFunction::Verify() { | 3608 void HCheckFunction::Verify() { |
3611 HInstruction::Verify(); | 3609 HInstruction::Verify(); |
3612 ASSERT(HasNoUses()); | 3610 ASSERT(HasNoUses()); |
3613 } | 3611 } |
3614 | 3612 |
3615 #endif | 3613 #endif |
3616 | 3614 |
3617 } } // namespace v8::internal | 3615 } } // namespace v8::internal |
OLD | NEW |