Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(429)

Side by Side Diff: src/hydrogen-instructions.h

Issue 303583002: Small changes in preparation for Hydrogen-generated KeyedLoadGeneric (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ 6 #define V8_HYDROGEN_INSTRUCTIONS_H_
7 7
8 #include "v8.h" 8 #include "v8.h"
9 9
10 #include "allocation.h" 10 #include "allocation.h"
(...skipping 7758 matching lines...) Expand 10 before | Expand all | Expand 10 after
7769 set_representation(Representation::Tagged()); 7769 set_representation(Representation::Tagged());
7770 } 7770 }
7771 7771
7772 int idx_; 7772 int idx_;
7773 HForInCacheArray* index_cache_; 7773 HForInCacheArray* index_cache_;
7774 }; 7774 };
7775 7775
7776 7776
7777 class HLoadFieldByIndex V8_FINAL : public HTemplateInstruction<2> { 7777 class HLoadFieldByIndex V8_FINAL : public HTemplateInstruction<2> {
7778 public: 7778 public:
7779 DECLARE_INSTRUCTION_FACTORY_P2(HLoadFieldByIndex, HValue*, HValue*);
7780
7779 HLoadFieldByIndex(HValue* object, 7781 HLoadFieldByIndex(HValue* object,
7780 HValue* index) { 7782 HValue* index) {
7781 SetOperandAt(0, object); 7783 SetOperandAt(0, object);
7782 SetOperandAt(1, index); 7784 SetOperandAt(1, index);
7783 SetChangesFlag(kNewSpacePromotion); 7785 SetChangesFlag(kNewSpacePromotion);
7784 set_representation(Representation::Tagged()); 7786 set_representation(Representation::Tagged());
7785 } 7787 }
7786 7788
7787 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE { 7789 virtual Representation RequiredInputRepresentation(int index) V8_OVERRIDE {
7788 return Representation::Tagged(); 7790 if (index == 1) {
7791 return Representation::Smi();
7792 } else {
7793 return Representation::Tagged();
7794 }
7789 } 7795 }
7790 7796
7791 HValue* object() { return OperandAt(0); } 7797 HValue* object() { return OperandAt(0); }
7792 HValue* index() { return OperandAt(1); } 7798 HValue* index() { return OperandAt(1); }
7793 7799
7794 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE; 7800 virtual void PrintDataTo(StringStream* stream) V8_OVERRIDE;
7795 7801
7796 virtual HType CalculateInferredType() V8_OVERRIDE { 7802 virtual HType CalculateInferredType() V8_OVERRIDE {
7797 return HType::Tagged(); 7803 return HType::Tagged();
7798 } 7804 }
7799 7805
7800 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); 7806 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex);
7801 7807
7802 private: 7808 private:
7803 virtual bool IsDeletable() const V8_OVERRIDE { return true; } 7809 virtual bool IsDeletable() const V8_OVERRIDE { return true; }
7804 }; 7810 };
7805 7811
7806 7812
7807 #undef DECLARE_INSTRUCTION 7813 #undef DECLARE_INSTRUCTION
7808 #undef DECLARE_CONCRETE_INSTRUCTION 7814 #undef DECLARE_CONCRETE_INSTRUCTION
7809 7815
7810 } } // namespace v8::internal 7816 } } // namespace v8::internal
7811 7817
7812 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7818 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698