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...) Expand 10 before | Expand all | Expand 10 after 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); | |
7508 set_representation(Representation::Tagged()); | 7507 set_representation(Representation::Tagged()); |
7509 } | 7508 } |
7510 | 7509 |
7511 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { | 7510 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { |
7512 return Representation::Tagged(); | 7511 return Representation::Tagged(); |
7513 } | 7512 } |
7514 | 7513 |
7515 HValue* object() { return OperandAt(0); } | 7514 HValue* object() { return OperandAt(0); } |
7516 HValue* index() { return OperandAt(1); } | 7515 HValue* index() { return OperandAt(1); } |
7517 | 7516 |
7518 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; | 7517 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; |
7519 | 7518 |
7520 virtual HType CalculateInferredType() V8_OVERRIDE { | 7519 virtual HType CalculateInferredType() V8_OVERRIDE { |
7521 return HType::Tagged(); | 7520 return HType::Tagged(); |
7522 } | 7521 } |
7523 | 7522 |
7524 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); | 7523 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); |
7525 | 7524 |
7526 private: | 7525 private: |
7527 virtual bool IsDeletable() const V8_OVERRIDE { return true; } | 7526 virtual bool IsDeletable() const V8_OVERRIDE { return true; } |
7528 }; | 7527 }; |
7529 | 7528 |
7530 | 7529 |
7531 #undef DECLARE_INSTRUCTION | 7530 #undef DECLARE_INSTRUCTION |
7532 #undef DECLARE_CONCRETE_INSTRUCTION | 7531 #undef DECLARE_CONCRETE_INSTRUCTION |
7533 | 7532 |
7534 } } // namespace v8::internal | 7533 } } // namespace v8::internal |
7535 | 7534 |
7536 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7535 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |