| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 0a1e39458bd99f1a95818424201ca0d62a3782a1..0d1eac17a780a8c400e3e644b53b4dfd98f4bf38 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -6222,6 +6222,11 @@ class Map: public HeapObject {
|
| static const int kPrototypeChainValid = 0;
|
| static const int kPrototypeChainInvalid = 1;
|
|
|
| + // Returns a WeakCell object containing given prototype. The cell is cached
|
| + // in PrototypeInfo which is created lazily.
|
| + static Handle<WeakCell> GetOrCreatePrototypeWeakCell(
|
| + Handle<JSObject> prototype, Isolate* isolate);
|
| +
|
| Map* FindRootMap();
|
| Map* FindFieldOwner(int descriptor);
|
|
|
| @@ -6823,6 +6828,9 @@ class PrototypeInfo : public Struct {
|
| public:
|
| static const int UNREGISTERED = -1;
|
|
|
| + // [weak_cell]: A WeakCell containing this prototype. ICs cache the cell here.
|
| + DECL_ACCESSORS(weak_cell, Object)
|
| +
|
| // [prototype_users]: WeakFixedArray containing maps using this prototype,
|
| // or Smi(0) if uninitialized.
|
| DECL_ACCESSORS(prototype_users, Object)
|
| @@ -6856,7 +6864,8 @@ class PrototypeInfo : public Struct {
|
| DECLARE_PRINTER(PrototypeInfo)
|
| DECLARE_VERIFIER(PrototypeInfo)
|
|
|
| - static const int kPrototypeUsersOffset = HeapObject::kHeaderSize;
|
| + static const int kWeakCellOffset = HeapObject::kHeaderSize;
|
| + static const int kPrototypeUsersOffset = kWeakCellOffset + kPointerSize;
|
| static const int kRegistrySlotOffset = kPrototypeUsersOffset + kPointerSize;
|
| static const int kValidityCellOffset = kRegistrySlotOffset + kPointerSize;
|
| static const int kObjectCreateMap = kValidityCellOffset + kPointerSize;
|
|
|