| 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 4774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4785 | 4785 |
| 4786 virtual Representation observed_input_representation(int index) { | 4786 virtual Representation observed_input_representation(int index) { |
| 4787 return RequiredInputRepresentation(index); | 4787 return RequiredInputRepresentation(index); |
| 4788 } | 4788 } |
| 4789 | 4789 |
| 4790 virtual void InferRepresentation(HInferRepresentationPhase* h_infer); | 4790 virtual void InferRepresentation(HInferRepresentationPhase* h_infer); |
| 4791 | 4791 |
| 4792 virtual Representation RepresentationFromInputs() { | 4792 virtual Representation RepresentationFromInputs() { |
| 4793 Representation left_rep = left()->representation(); | 4793 Representation left_rep = left()->representation(); |
| 4794 Representation right_rep = right()->representation(); | 4794 Representation right_rep = right()->representation(); |
| 4795 Representation result = Representation::Smi(); | 4795 // TODO(verwaest): Initialize to Smi once lithium-codegen has been fixed. |
| 4796 Representation result = Representation::Integer32(); |
| 4796 result = result.generalize(left_rep); | 4797 result = result.generalize(left_rep); |
| 4797 result = result.generalize(right_rep); | 4798 result = result.generalize(right_rep); |
| 4798 if (result.IsTagged()) return Representation::Double(); | 4799 if (result.IsTagged()) return Representation::Double(); |
| 4799 return result; | 4800 return result; |
| 4800 } | 4801 } |
| 4801 | 4802 |
| 4802 virtual bool IsCommutative() const { return true; } | 4803 virtual bool IsCommutative() const { return true; } |
| 4803 | 4804 |
| 4804 Operation operation() { return operation_; } | 4805 Operation operation() { return operation_; } |
| 4805 | 4806 |
| (...skipping 2141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6947 virtual bool IsDeletable() const { return true; } | 6948 virtual bool IsDeletable() const { return true; } |
| 6948 }; | 6949 }; |
| 6949 | 6950 |
| 6950 | 6951 |
| 6951 #undef DECLARE_INSTRUCTION | 6952 #undef DECLARE_INSTRUCTION |
| 6952 #undef DECLARE_CONCRETE_INSTRUCTION | 6953 #undef DECLARE_CONCRETE_INSTRUCTION |
| 6953 | 6954 |
| 6954 } } // namespace v8::internal | 6955 } } // namespace v8::internal |
| 6955 | 6956 |
| 6956 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6957 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |