Chromium Code Reviews| Index: src/objects.h |
| diff --git a/src/objects.h b/src/objects.h |
| index 2cc232c50a75147c2c82bf17619c48ebd8562073..cf4382b46f740f7a130cc3180394d824c96fc560 100644 |
| --- a/src/objects.h |
| +++ b/src/objects.h |
| @@ -7474,11 +7474,10 @@ enum AllocationSiteMode { |
| class AllocationSite: public Struct { |
| public: |
| - static const int kTransitionInfoOffset = HeapObject::kHeaderSize; |
| - static const int kSize = kTransitionInfoOffset + kPointerSize; |
| static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024; |
| DECL_ACCESSORS(transition_info, Object) |
| + DECL_ACCESSORS(weak_next, Object) |
| void Initialize() { |
| SetElementsKind(GetInitialFastElementsKind()); |
| @@ -7508,6 +7507,17 @@ class AllocationSite: public Struct { |
| ElementsKind boilerplate_elements_kind); |
| static inline AllocationSiteMode GetMode(ElementsKind from, ElementsKind to); |
| + // Dispatched behavior. |
| + inline void AllocationSiteIterateBody(ObjectVisitor* v); |
| + |
| + static const int kTransitionInfoOffset = HeapObject::kHeaderSize; |
| + static const int kWeakNextOffset = kTransitionInfoOffset + kPointerSize; |
| + static const int kSize = kWeakNextOffset + kPointerSize; |
| + |
| + typedef FixedBodyDescriptor<HeapObject::kHeaderSize, |
| + kTransitionInfoOffset + kPointerSize, |
| + kSize> BodyDescriptor; |
| + |
| private: |
| DISALLOW_IMPLICIT_CONSTRUCTORS(AllocationSite); |
| }; |
| @@ -9745,6 +9755,10 @@ class ObjectVisitor BASE_EMBEDDED { |
| // Visits a global property cell reference in the instruction stream. |
| virtual void VisitCell(RelocInfo* rinfo); |
| + virtual void VisitAllocationSite(HeapObject* site) { |
|
Michael Starzinger
2013/07/17 08:48:57
As discussed offline: It should be possible to get
mvstanton
2013/07/17 09:56:16
Done.
|
| + AllocationSite::BodyDescriptor::IterateBody(site, this); |
| + } |
| + |
| // Visits a runtime entry in the instruction stream. |
| virtual void VisitRuntimeEntry(RelocInfo* rinfo) {} |