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 // TODO(verwaest): Initialize to Smi once lithium-codegen has been fixed. | 4795 Representation result = Representation::Smi(); |
4796 Representation result = Representation::Integer32(); | |
4797 result = result.generalize(left_rep); | 4796 result = result.generalize(left_rep); |
4798 result = result.generalize(right_rep); | 4797 result = result.generalize(right_rep); |
4799 if (result.IsTagged()) return Representation::Double(); | 4798 if (result.IsTagged()) return Representation::Double(); |
4800 return result; | 4799 return result; |
4801 } | 4800 } |
4802 | 4801 |
4803 virtual bool IsCommutative() const { return true; } | 4802 virtual bool IsCommutative() const { return true; } |
4804 | 4803 |
4805 Operation operation() { return operation_; } | 4804 Operation operation() { return operation_; } |
4806 | 4805 |
(...skipping 2141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6948 virtual bool IsDeletable() const { return true; } | 6947 virtual bool IsDeletable() const { return true; } |
6949 }; | 6948 }; |
6950 | 6949 |
6951 | 6950 |
6952 #undef DECLARE_INSTRUCTION | 6951 #undef DECLARE_INSTRUCTION |
6953 #undef DECLARE_CONCRETE_INSTRUCTION | 6952 #undef DECLARE_CONCRETE_INSTRUCTION |
6954 | 6953 |
6955 } } // namespace v8::internal | 6954 } } // namespace v8::internal |
6956 | 6955 |
6957 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6956 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |