| 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 4954 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4965 } | 4965 } |
| 4966 } | 4966 } |
| 4967 return false; | 4967 return false; |
| 4968 } | 4968 } |
| 4969 | 4969 |
| 4970 virtual Range* InferRange(Zone* zone); | 4970 virtual Range* InferRange(Zone* zone); |
| 4971 | 4971 |
| 4972 virtual void UpdateRepresentation(Representation new_rep, | 4972 virtual void UpdateRepresentation(Representation new_rep, |
| 4973 HInferRepresentationPhase* h_infer, | 4973 HInferRepresentationPhase* h_infer, |
| 4974 const char* reason) { | 4974 const char* reason) { |
| 4975 if (new_rep.IsSmi()) new_rep = Representation::Integer32(); | 4975 if (new_rep.IsSmi() && !right()->IsConstant()) { |
| 4976 new_rep = Representation::Integer32(); |
| 4977 } |
| 4976 HBitwiseBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); | 4978 HBitwiseBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); |
| 4977 } | 4979 } |
| 4978 | 4980 |
| 4979 DECLARE_CONCRETE_INSTRUCTION(Sar) | 4981 DECLARE_CONCRETE_INSTRUCTION(Sar) |
| 4980 | 4982 |
| 4981 protected: | 4983 protected: |
| 4982 virtual bool DataEquals(HValue* other) { return true; } | 4984 virtual bool DataEquals(HValue* other) { return true; } |
| 4983 | 4985 |
| 4984 private: | 4986 private: |
| 4985 HSar(HValue* context, HValue* left, HValue* right) | 4987 HSar(HValue* context, HValue* left, HValue* right) |
| (...skipping 1965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6951 virtual bool IsDeletable() const { return true; } | 6953 virtual bool IsDeletable() const { return true; } |
| 6952 }; | 6954 }; |
| 6953 | 6955 |
| 6954 | 6956 |
| 6955 #undef DECLARE_INSTRUCTION | 6957 #undef DECLARE_INSTRUCTION |
| 6956 #undef DECLARE_CONCRETE_INSTRUCTION | 6958 #undef DECLARE_CONCRETE_INSTRUCTION |
| 6957 | 6959 |
| 6958 } } // namespace v8::internal | 6960 } } // namespace v8::internal |
| 6959 | 6961 |
| 6960 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6962 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |