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 7486 matching lines...) Loading... |
7497 HForInCacheArray* index_cache_; | 7497 HForInCacheArray* index_cache_; |
7498 }; | 7498 }; |
7499 | 7499 |
7500 | 7500 |
7501 class HLoadFieldByIndex V8_FINAL : public HTemplateInstruction<2> { | 7501 class HLoadFieldByIndex V8_FINAL : public HTemplateInstruction<2> { |
7502 public: | 7502 public: |
7503 HLoadFieldByIndex(HValue* object, | 7503 HLoadFieldByIndex(HValue* object, |
7504 HValue* index) { | 7504 HValue* index) { |
7505 SetOperandAt(0, object); | 7505 SetOperandAt(0, object); |
7506 SetOperandAt(1, index); | 7506 SetOperandAt(1, index); |
| 7507 SetChangesFlag(kNewSpacePromotion); |
7507 set_representation(Representation::Tagged()); | 7508 set_representation(Representation::Tagged()); |
7508 } | 7509 } |
7509 | 7510 |
7510 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 7511 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
7511 return Representation::Tagged(); | 7512 return Representation::Tagged(); |
7512 } | 7513 } |
7513 | 7514 |
7514 HValue* object() { return OperandAt(0); } | 7515 HValue* object() { return OperandAt(0); } |
7515 HValue* index() { return OperandAt(1); } | 7516 HValue* index() { return OperandAt(1); } |
7516 | 7517 |
7517 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 7518 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
7518 | 7519 |
7519 virtual HType CalculateInferredType() V8_OVERRIDE { | 7520 virtual HType CalculateInferredType() V8_OVERRIDE { |
7520 return HType::Tagged(); | 7521 return HType::Tagged(); |
7521 } | 7522 } |
7522 | 7523 |
7523 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); | 7524 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); |
7524 | 7525 |
7525 private: | 7526 private: |
7526 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7527 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7527 }; | 7528 }; |
7528 | 7529 |
7529 | 7530 |
7530 #undef DECLARE_INSTRUCTION | 7531 #undef DECLARE_INSTRUCTION |
7531 #undef DECLARE_CONCRETE_INSTRUCTION | 7532 #undef DECLARE_CONCRETE_INSTRUCTION |
7532 | 7533 |
7533 } } // namespace v8::internal | 7534 } } // namespace v8::internal |
7534 | 7535 |
7535 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7536 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |