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 3674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3685 | 3685 |
3686 virtual Representation RequiredInputRepresentation(int index) { | 3686 virtual Representation RequiredInputRepresentation(int index) { |
3687 return index == 0 ? Representation::Tagged() | 3687 return index == 0 ? Representation::Tagged() |
3688 : representation(); | 3688 : representation(); |
3689 } | 3689 } |
3690 | 3690 |
3691 virtual Representation observed_input_representation(int index) { | 3691 virtual Representation observed_input_representation(int index) { |
3692 return RequiredInputRepresentation(index); | 3692 return RequiredInputRepresentation(index); |
3693 } | 3693 } |
3694 | 3694 |
| 3695 virtual void InferRepresentation(HInferRepresentation* h_infer); |
| 3696 |
3695 virtual Representation RepresentationFromInputs() { | 3697 virtual Representation RepresentationFromInputs() { |
3696 Representation left_rep = left()->representation(); | 3698 Representation left_rep = left()->representation(); |
3697 Representation right_rep = right()->representation(); | 3699 Representation right_rep = right()->representation(); |
3698 if ((left_rep.IsNone() || left_rep.IsInteger32()) && | 3700 if ((left_rep.IsNone() || left_rep.IsInteger32()) && |
3699 (right_rep.IsNone() || right_rep.IsInteger32())) { | 3701 (right_rep.IsNone() || right_rep.IsInteger32())) { |
3700 return Representation::Integer32(); | 3702 return Representation::Integer32(); |
3701 } | 3703 } |
3702 return Representation::Double(); | 3704 return Representation::Double(); |
3703 } | 3705 } |
3704 | 3706 |
(...skipping 1713 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5418 virtual bool IsDeletable() const { return true; } | 5420 virtual bool IsDeletable() const { return true; } |
5419 }; | 5421 }; |
5420 | 5422 |
5421 | 5423 |
5422 #undef DECLARE_INSTRUCTION | 5424 #undef DECLARE_INSTRUCTION |
5423 #undef DECLARE_CONCRETE_INSTRUCTION | 5425 #undef DECLARE_CONCRETE_INSTRUCTION |
5424 | 5426 |
5425 } } // namespace v8::internal | 5427 } } // namespace v8::internal |
5426 | 5428 |
5427 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 5429 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |