Index: src/objects-inl.h |
diff --git a/src/objects-inl.h b/src/objects-inl.h |
index aeded64a892aee49504144471c4f6ede80dafd22..7cfcf9b59846de06e50c4e04e54e05c248cd3673 100644 |
--- a/src/objects-inl.h |
+++ b/src/objects-inl.h |
@@ -5486,7 +5486,24 @@ ACCESSORS(AccessorInfo, data, Object, kDataOffset) |
ACCESSORS(Box, value, Object, kValueOffset) |
+Map* PrototypeInfo::ObjectCreateMap() { |
+ return Map::cast(WeakCell::cast(object_create_map())->value()); |
+} |
+ |
+// static |
+void PrototypeInfo::SetObjectCreateMap(Handle<PrototypeInfo> info, |
+ Handle<Map> map) { |
+ Handle<WeakCell> cell = Map::WeakCellForMap(map); |
+ info->set_object_create_map(*cell); |
+} |
+ |
+bool PrototypeInfo::HasObjectCreateMap() { |
+ Object* cache = object_create_map(); |
+ return cache->IsWeakCell() && !WeakCell::cast(cache)->cleared(); |
+} |
+ |
ACCESSORS(PrototypeInfo, prototype_users, Object, kPrototypeUsersOffset) |
+ACCESSORS(PrototypeInfo, object_create_map, Object, kObjectCreateMap) |
SMI_ACCESSORS(PrototypeInfo, registry_slot, kRegistrySlotOffset) |
ACCESSORS(PrototypeInfo, validity_cell, Object, kValidityCellOffset) |
SMI_ACCESSORS(PrototypeInfo, bit_field, kBitFieldOffset) |