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 4605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4616 }; | 4616 }; |
4617 | 4617 |
4618 | 4618 |
4619 class HStringAdd: public HBinaryOperation { | 4619 class HStringAdd: public HBinaryOperation { |
4620 public: | 4620 public: |
4621 HStringAdd(HValue* context, HValue* left, HValue* right) | 4621 HStringAdd(HValue* context, HValue* left, HValue* right) |
4622 : HBinaryOperation(context, left, right) { | 4622 : HBinaryOperation(context, left, right) { |
4623 set_representation(Representation::Tagged()); | 4623 set_representation(Representation::Tagged()); |
4624 SetFlag(kUseGVN); | 4624 SetFlag(kUseGVN); |
4625 SetGVNFlag(kDependsOnMaps); | 4625 SetGVNFlag(kDependsOnMaps); |
| 4626 SetGVNFlag(kChangesNewSpacePromotion); |
4626 } | 4627 } |
4627 | 4628 |
4628 virtual Representation RequiredInputRepresentation(int index) { | 4629 virtual Representation RequiredInputRepresentation(int index) { |
4629 return Representation::Tagged(); | 4630 return Representation::Tagged(); |
4630 } | 4631 } |
4631 | 4632 |
4632 virtual HType CalculateInferredType() { | 4633 virtual HType CalculateInferredType() { |
4633 return HType::String(); | 4634 return HType::String(); |
4634 } | 4635 } |
4635 | 4636 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4699 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode) | 4700 DECLARE_CONCRETE_INSTRUCTION(StringCharFromCode) |
4700 }; | 4701 }; |
4701 | 4702 |
4702 | 4703 |
4703 class HStringLength: public HUnaryOperation { | 4704 class HStringLength: public HUnaryOperation { |
4704 public: | 4705 public: |
4705 explicit HStringLength(HValue* string) : HUnaryOperation(string) { | 4706 explicit HStringLength(HValue* string) : HUnaryOperation(string) { |
4706 set_representation(Representation::Tagged()); | 4707 set_representation(Representation::Tagged()); |
4707 SetFlag(kUseGVN); | 4708 SetFlag(kUseGVN); |
4708 SetGVNFlag(kDependsOnMaps); | 4709 SetGVNFlag(kDependsOnMaps); |
4709 SetGVNFlag(kChangesNewSpacePromotion); | |
4710 } | 4710 } |
4711 | 4711 |
4712 virtual Representation RequiredInputRepresentation(int index) { | 4712 virtual Representation RequiredInputRepresentation(int index) { |
4713 return Representation::Tagged(); | 4713 return Representation::Tagged(); |
4714 } | 4714 } |
4715 | 4715 |
4716 virtual HType CalculateInferredType() { | 4716 virtual HType CalculateInferredType() { |
4717 STATIC_ASSERT(String::kMaxLength <= Smi::kMaxValue); | 4717 STATIC_ASSERT(String::kMaxLength <= Smi::kMaxValue); |
4718 return HType::Smi(); | 4718 return HType::Smi(); |
4719 } | 4719 } |
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5197 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); | 5197 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); |
5198 }; | 5198 }; |
5199 | 5199 |
5200 | 5200 |
5201 #undef DECLARE_INSTRUCTION | 5201 #undef DECLARE_INSTRUCTION |
5202 #undef DECLARE_CONCRETE_INSTRUCTION | 5202 #undef DECLARE_CONCRETE_INSTRUCTION |
5203 | 5203 |
5204 } } // namespace v8::internal | 5204 } } // namespace v8::internal |
5205 | 5205 |
5206 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 5206 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |