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

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

Issue 18173013: AllocationSite objects weakly linked for traversal (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed final nits Created 7 years, 5 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/heap.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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 V(InstanceOfKnownGlobal) \ 124 V(InstanceOfKnownGlobal) \
125 V(InstanceSize) \ 125 V(InstanceSize) \
126 V(InvokeFunction) \ 126 V(InvokeFunction) \
127 V(IsConstructCallAndBranch) \ 127 V(IsConstructCallAndBranch) \
128 V(IsObjectAndBranch) \ 128 V(IsObjectAndBranch) \
129 V(IsNumberAndBranch) \ 129 V(IsNumberAndBranch) \
130 V(IsStringAndBranch) \ 130 V(IsStringAndBranch) \
131 V(IsSmiAndBranch) \ 131 V(IsSmiAndBranch) \
132 V(IsUndetectableAndBranch) \ 132 V(IsUndetectableAndBranch) \
133 V(LeaveInlined) \ 133 V(LeaveInlined) \
134 V(LinkObjectInList) \
134 V(LoadContextSlot) \ 135 V(LoadContextSlot) \
135 V(LoadExternalArrayPointer) \ 136 V(LoadExternalArrayPointer) \
136 V(LoadFunctionPrototype) \ 137 V(LoadFunctionPrototype) \
137 V(LoadGlobalCell) \ 138 V(LoadGlobalCell) \
138 V(LoadGlobalGeneric) \ 139 V(LoadGlobalGeneric) \
139 V(LoadKeyed) \ 140 V(LoadKeyed) \
140 V(LoadKeyedGeneric) \ 141 V(LoadKeyedGeneric) \
141 V(LoadNamedField) \ 142 V(LoadNamedField) \
142 V(LoadNamedFieldPolymorphic) \ 143 V(LoadNamedFieldPolymorphic) \
143 V(LoadNamedGeneric) \ 144 V(LoadNamedGeneric) \
(...skipping 5175 matching lines...) Expand 10 before | Expand all | Expand 10 after
5319 } 5320 }
5320 5321
5321 static HObjectAccess ForArrayLength() { 5322 static HObjectAccess ForArrayLength() {
5322 return HObjectAccess(kArrayLengths, JSArray::kLengthOffset); 5323 return HObjectAccess(kArrayLengths, JSArray::kLengthOffset);
5323 } 5324 }
5324 5325
5325 static HObjectAccess ForAllocationSiteTransitionInfo() { 5326 static HObjectAccess ForAllocationSiteTransitionInfo() {
5326 return HObjectAccess(kInobject, AllocationSite::kTransitionInfoOffset); 5327 return HObjectAccess(kInobject, AllocationSite::kTransitionInfoOffset);
5327 } 5328 }
5328 5329
5330 static HObjectAccess ForAllocationSiteWeakNext() {
5331 return HObjectAccess(kInobject, AllocationSite::kWeakNextOffset);
5332 }
5333
5329 static HObjectAccess ForFixedArrayLength() { 5334 static HObjectAccess ForFixedArrayLength() {
5330 return HObjectAccess(kArrayLengths, FixedArray::kLengthOffset); 5335 return HObjectAccess(kArrayLengths, FixedArray::kLengthOffset);
5331 } 5336 }
5332 5337
5333 static HObjectAccess ForPropertiesPointer() { 5338 static HObjectAccess ForPropertiesPointer() {
5334 return HObjectAccess(kInobject, JSObject::kPropertiesOffset); 5339 return HObjectAccess(kInobject, JSObject::kPropertiesOffset);
5335 } 5340 }
5336 5341
5337 static HObjectAccess ForPrototypeOrInitialMap() { 5342 static HObjectAccess ForPrototypeOrInitialMap() {
5338 return HObjectAccess(kInobject, JSFunction::kPrototypeOrInitialMapOffset); 5343 return HObjectAccess(kInobject, JSFunction::kPrototypeOrInitialMapOffset);
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
5409 5414
5410 friend class HLoadNamedField; 5415 friend class HLoadNamedField;
5411 friend class HStoreNamedField; 5416 friend class HStoreNamedField;
5412 5417
5413 inline Portion portion() const { 5418 inline Portion portion() const {
5414 return PortionField::decode(value_); 5419 return PortionField::decode(value_);
5415 } 5420 }
5416 }; 5421 };
5417 5422
5418 5423
5424 class HLinkObjectInList: public HUnaryOperation {
5425 public:
5426 // There needs to be a mapping from every KnownList to an external reference
5427 enum KnownList {
5428 ALLOCATION_SITE_LIST
5429 };
5430
5431 HLinkObjectInList(HValue* object, HObjectAccess store_field,
5432 KnownList known_list)
5433 : HUnaryOperation(object),
5434 store_field_(store_field),
5435 known_list_(known_list) {
5436 set_representation(Representation::Tagged());
5437 }
5438
5439 HObjectAccess store_field() const { return store_field_; }
5440 KnownList known_list() const { return known_list_; }
5441
5442 virtual Representation RequiredInputRepresentation(int index) {
5443 return Representation::Tagged();
5444 }
5445
5446 virtual void PrintDataTo(StringStream* stream);
5447
5448 DECLARE_CONCRETE_INSTRUCTION(LinkObjectInList)
5449
5450 private:
5451 HObjectAccess store_field_;
5452 KnownList known_list_;
5453 };
5454
5455
5419 class HLoadNamedField: public HTemplateInstruction<2> { 5456 class HLoadNamedField: public HTemplateInstruction<2> {
5420 public: 5457 public:
5421 HLoadNamedField(HValue* object, 5458 HLoadNamedField(HValue* object,
5422 HObjectAccess access, 5459 HObjectAccess access,
5423 HValue* typecheck = NULL, 5460 HValue* typecheck = NULL,
5424 Representation field_representation 5461 Representation field_representation
5425 = Representation::Tagged()) 5462 = Representation::Tagged())
5426 : access_(access), 5463 : access_(access),
5427 field_representation_(field_representation) { 5464 field_representation_(field_representation) {
5428 ASSERT(object != NULL); 5465 ASSERT(object != NULL);
(...skipping 1209 matching lines...) Expand 10 before | Expand all | Expand 10 after
6638 virtual bool IsDeletable() const { return true; } 6675 virtual bool IsDeletable() const { return true; }
6639 }; 6676 };
6640 6677
6641 6678
6642 #undef DECLARE_INSTRUCTION 6679 #undef DECLARE_INSTRUCTION
6643 #undef DECLARE_CONCRETE_INSTRUCTION 6680 #undef DECLARE_CONCRETE_INSTRUCTION
6644 6681
6645 } } // namespace v8::internal 6682 } } // namespace v8::internal
6646 6683
6647 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 6684 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/heap.cc ('k') | src/hydrogen-instructions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698