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

Unified Diff: src/objects.h

Issue 18173013: AllocationSite objects weakly linked for traversal (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review ready 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 side-by-side diff with in-line comments
Download patch
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 2cc232c50a75147c2c82bf17619c48ebd8562073..63966fc55b4f375ecd28d11cfefc691f62929196 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -7475,10 +7475,17 @@ enum AllocationSiteMode {
class AllocationSite: public Struct {
public:
static const int kTransitionInfoOffset = HeapObject::kHeaderSize;
- static const int kSize = kTransitionInfoOffset + kPointerSize;
+ static const int kWeakNextOffset = kTransitionInfoOffset + kPointerSize;
+ static const int kSize = kWeakNextOffset + kPointerSize;
Michael Starzinger 2013/07/16 18:14:46 nit: The offset and size calculation should go to
mvstanton 2013/07/16 19:34:57 Hmm. I actually moved these constants to the top o
+
static const uint32_t kMaximumArrayBytesToPretransition = 8 * 1024;
+ typedef FixedBodyDescriptor<HeapObject::kHeaderSize,
+ kTransitionInfoOffset + kPointerSize,
+ kSize> BodyDescriptor;
+
DECL_ACCESSORS(transition_info, Object)
+ DECL_ACCESSORS(weak_next, Object)
void Initialize() {
SetElementsKind(GetInitialFastElementsKind());
@@ -7508,6 +7515,9 @@ class AllocationSite: public Struct {
ElementsKind boilerplate_elements_kind);
static inline AllocationSiteMode GetMode(ElementsKind from, ElementsKind to);
+ // Dispatched behavior.
+ inline void AllocationSiteIterateBody(ObjectVisitor* v);
+
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) {
+ AllocationSite::BodyDescriptor::IterateBody(site, this);
+ }
+
// Visits a runtime entry in the instruction stream.
virtual void VisitRuntimeEntry(RelocInfo* rinfo) {}

Powered by Google App Engine
This is Rietveld 408576698