| 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 4390 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4401 virtual HValue* Canonicalize(); | 4401 virtual HValue* Canonicalize(); |
| 4402 | 4402 |
| 4403 // Only commutative if it is certain that not two objects are multiplicated. | 4403 // Only commutative if it is certain that not two objects are multiplicated. |
| 4404 virtual bool IsCommutative() const { | 4404 virtual bool IsCommutative() const { |
| 4405 return !representation().IsTagged(); | 4405 return !representation().IsTagged(); |
| 4406 } | 4406 } |
| 4407 | 4407 |
| 4408 virtual void UpdateRepresentation(Representation new_rep, | 4408 virtual void UpdateRepresentation(Representation new_rep, |
| 4409 HInferRepresentationPhase* h_infer, | 4409 HInferRepresentationPhase* h_infer, |
| 4410 const char* reason) { | 4410 const char* reason) { |
| 4411 if (new_rep.IsSmi()) new_rep = Representation::Integer32(); | |
| 4412 HArithmeticBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); | 4411 HArithmeticBinaryOperation::UpdateRepresentation(new_rep, h_infer, reason); |
| 4413 } | 4412 } |
| 4414 | 4413 |
| 4415 DECLARE_CONCRETE_INSTRUCTION(Mul) | 4414 DECLARE_CONCRETE_INSTRUCTION(Mul) |
| 4416 | 4415 |
| 4417 protected: | 4416 protected: |
| 4418 virtual bool DataEquals(HValue* other) { return true; } | 4417 virtual bool DataEquals(HValue* other) { return true; } |
| 4419 | 4418 |
| 4420 virtual Range* InferRange(Zone* zone); | 4419 virtual Range* InferRange(Zone* zone); |
| 4421 | 4420 |
| (...skipping 2356 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6778 virtual bool IsDeletable() const { return true; } | 6777 virtual bool IsDeletable() const { return true; } |
| 6779 }; | 6778 }; |
| 6780 | 6779 |
| 6781 | 6780 |
| 6782 #undef DECLARE_INSTRUCTION | 6781 #undef DECLARE_INSTRUCTION |
| 6783 #undef DECLARE_CONCRETE_INSTRUCTION | 6782 #undef DECLARE_CONCRETE_INSTRUCTION |
| 6784 | 6783 |
| 6785 } } // namespace v8::internal | 6784 } } // namespace v8::internal |
| 6786 | 6785 |
| 6787 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 6786 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |