| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 277df06ccac555344997191744076506f6e2ee20..07b86cfa75dc583518dd256783d6cbaf8cf30292 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -143,6 +143,7 @@
|
| // - DebugInfo
|
| // - BreakPointInfo
|
| // - CodeCache
|
| +// - WeakCell
|
| //
|
| // Formats of Object*:
|
| // Smi: [31 bit signed int] 0
|
| @@ -425,6 +426,7 @@ const int kStubMinorKeyBits = kSmiValueSize - kStubMajorKeyBits - 1;
|
| V(FIXED_DOUBLE_ARRAY_TYPE) \
|
| V(CONSTANT_POOL_ARRAY_TYPE) \
|
| V(SHARED_FUNCTION_INFO_TYPE) \
|
| + V(WEAK_CELL_TYPE) \
|
| \
|
| V(JS_MESSAGE_OBJECT_TYPE) \
|
| \
|
| @@ -721,6 +723,7 @@ enum InstanceType {
|
| FIXED_ARRAY_TYPE,
|
| CONSTANT_POOL_ARRAY_TYPE,
|
| SHARED_FUNCTION_INFO_TYPE,
|
| + WEAK_CELL_TYPE,
|
|
|
| // All the following types are subtypes of JSReceiver, which corresponds to
|
| // objects in the JS sense. The first and the last type in this range are
|
| @@ -984,6 +987,7 @@ template <class C> inline bool Is(Object* obj);
|
| V(AccessCheckNeeded) \
|
| V(Cell) \
|
| V(PropertyCell) \
|
| + V(WeakCell) \
|
| V(ObjectHashTable) \
|
| V(WeakHashTable) \
|
| V(OrderedHashTable)
|
| @@ -9556,6 +9560,32 @@ class PropertyCell: public Cell {
|
| };
|
|
|
|
|
| +class WeakCell : public HeapObject {
|
| + public:
|
| + inline HeapObject* value() const;
|
| +
|
| + // This should not be called by anyone except GC.
|
| + inline void update_value_from_gc(HeapObject* val);
|
| +
|
| + DECL_ACCESSORS(next, Object)
|
| +
|
| + DECLARE_CAST(WeakCell)
|
| +
|
| + DECLARE_PRINTER(WeakCell)
|
| + DECLARE_VERIFIER(WeakCell)
|
| +
|
| + // Layout description.
|
| + static const int kValueOffset = HeapObject::kHeaderSize;
|
| + static const int kNextOffset = kValueOffset + kPointerSize;
|
| + static const int kSize = kNextOffset + kPointerSize;
|
| +
|
| + typedef FixedBodyDescriptor<kValueOffset, kSize, kSize> BodyDescriptor;
|
| +
|
| + private:
|
| + DISALLOW_IMPLICIT_CONSTRUCTORS(WeakCell);
|
| +};
|
| +
|
| +
|
| // The JSProxy describes EcmaScript Harmony proxies
|
| class JSProxy: public JSReceiver {
|
| public:
|
|
|