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

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

Issue 21345002: Get rid of HLinkObjectInList. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 4 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
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 V(InstanceOfKnownGlobal) \ 128 V(InstanceOfKnownGlobal) \
129 V(InstanceSize) \ 129 V(InstanceSize) \
130 V(InvokeFunction) \ 130 V(InvokeFunction) \
131 V(IsConstructCallAndBranch) \ 131 V(IsConstructCallAndBranch) \
132 V(IsObjectAndBranch) \ 132 V(IsObjectAndBranch) \
133 V(IsNumberAndBranch) \ 133 V(IsNumberAndBranch) \
134 V(IsStringAndBranch) \ 134 V(IsStringAndBranch) \
135 V(IsSmiAndBranch) \ 135 V(IsSmiAndBranch) \
136 V(IsUndetectableAndBranch) \ 136 V(IsUndetectableAndBranch) \
137 V(LeaveInlined) \ 137 V(LeaveInlined) \
138 V(LinkObjectInList) \
139 V(LoadContextSlot) \ 138 V(LoadContextSlot) \
140 V(LoadExternalArrayPointer) \ 139 V(LoadExternalArrayPointer) \
141 V(LoadFieldByIndex) \ 140 V(LoadFieldByIndex) \
142 V(LoadFunctionPrototype) \ 141 V(LoadFunctionPrototype) \
143 V(LoadGlobalCell) \ 142 V(LoadGlobalCell) \
144 V(LoadGlobalGeneric) \ 143 V(LoadGlobalGeneric) \
145 V(LoadKeyed) \ 144 V(LoadKeyed) \
146 V(LoadKeyedGeneric) \ 145 V(LoadKeyedGeneric) \
147 V(LoadNamedField) \ 146 V(LoadNamedField) \
148 V(LoadNamedFieldPolymorphic) \ 147 V(LoadNamedFieldPolymorphic) \
(...skipping 5471 matching lines...) Expand 10 before | Expand all | Expand 10 after
5620 } 5619 }
5621 5620
5622 static HObjectAccess ForAllocationSiteTransitionInfo() { 5621 static HObjectAccess ForAllocationSiteTransitionInfo() {
5623 return HObjectAccess(kInobject, AllocationSite::kTransitionInfoOffset); 5622 return HObjectAccess(kInobject, AllocationSite::kTransitionInfoOffset);
5624 } 5623 }
5625 5624
5626 static HObjectAccess ForAllocationSiteWeakNext() { 5625 static HObjectAccess ForAllocationSiteWeakNext() {
5627 return HObjectAccess(kInobject, AllocationSite::kWeakNextOffset); 5626 return HObjectAccess(kInobject, AllocationSite::kWeakNextOffset);
5628 } 5627 }
5629 5628
5629 static HObjectAccess ForAllocationSiteList() {
5630 return HObjectAccess(kExternalMemory, 0, Representation::Tagged());
5631 }
5632
5630 static HObjectAccess ForFixedArrayLength() { 5633 static HObjectAccess ForFixedArrayLength() {
5631 return HObjectAccess( 5634 return HObjectAccess(
5632 kArrayLengths, 5635 kArrayLengths,
5633 FixedArray::kLengthOffset, 5636 FixedArray::kLengthOffset,
5634 FLAG_track_fields ? Representation::Smi() : Representation::Tagged()); 5637 FLAG_track_fields ? Representation::Smi() : Representation::Tagged());
5635 } 5638 }
5636 5639
5637 static HObjectAccess ForPropertiesPointer() { 5640 static HObjectAccess ForPropertiesPointer() {
5638 return HObjectAccess(kInobject, JSObject::kPropertiesOffset); 5641 return HObjectAccess(kInobject, JSObject::kPropertiesOffset);
5639 } 5642 }
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
5726 5729
5727 friend class HLoadNamedField; 5730 friend class HLoadNamedField;
5728 friend class HStoreNamedField; 5731 friend class HStoreNamedField;
5729 5732
5730 inline Portion portion() const { 5733 inline Portion portion() const {
5731 return PortionField::decode(value_); 5734 return PortionField::decode(value_);
5732 } 5735 }
5733 }; 5736 };
5734 5737
5735 5738
5736 class HLinkObjectInList: public HUnaryOperation {
5737 public:
5738 // There needs to be a mapping from every KnownList to an external reference
5739 enum KnownList {
5740 ALLOCATION_SITE_LIST
5741 };
5742
5743 HLinkObjectInList(HValue* object, HObjectAccess store_field,
5744 KnownList known_list)
5745 : HUnaryOperation(object),
5746 store_field_(store_field),
5747 known_list_(known_list) {
5748 set_representation(Representation::Tagged());
5749 }
5750
5751 HObjectAccess store_field() const { return store_field_; }
5752 KnownList known_list() const { return known_list_; }
5753
5754 virtual Representation RequiredInputRepresentation(int index) {
5755 return Representation::Tagged();
5756 }
5757
5758 virtual void PrintDataTo(StringStream* stream);
5759
5760 DECLARE_CONCRETE_INSTRUCTION(LinkObjectInList)
5761
5762 private:
5763 HObjectAccess store_field_;
5764 KnownList known_list_;
5765 };
5766
5767
5768 class HLoadNamedField: public HTemplateInstruction<2> { 5739 class HLoadNamedField: public HTemplateInstruction<2> {
5769 public: 5740 public:
5770 HLoadNamedField(HValue* object, 5741 HLoadNamedField(HValue* object,
5771 HObjectAccess access, 5742 HObjectAccess access,
5772 HValue* typecheck = NULL) 5743 HValue* typecheck = NULL)
5773 : access_(access) { 5744 : access_(access) {
5774 ASSERT(object != NULL); 5745 ASSERT(object != NULL);
5775 SetOperandAt(0, object); 5746 SetOperandAt(0, object);
5776 SetOperandAt(1, typecheck != NULL ? typecheck : object); 5747 SetOperandAt(1, typecheck != NULL ? typecheck : object);
5777 5748
(...skipping 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
6990 virtual bool IsDeletable() const { return true; } 6961 virtual bool IsDeletable() const { return true; }
6991 }; 6962 };
6992 6963
6993 6964
6994 #undef DECLARE_INSTRUCTION 6965 #undef DECLARE_INSTRUCTION
6995 #undef DECLARE_CONCRETE_INSTRUCTION 6966 #undef DECLARE_CONCRETE_INSTRUCTION
6996 6967
6997 } } // namespace v8::internal 6968 } } // namespace v8::internal
6998 6969
6999 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6970 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/code-stubs-hydrogen.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698