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

Unified Diff: src/objects.h

Issue 2083353002: Cache Object.create maps on the passed prototype's PrototypeInfo (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: properly set prototype Created 4 years, 6 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
« no previous file with comments | « src/contexts.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index d812c326297ebcf4c081af598dde69ee1da7a313..29aefb21eef0a30fcdb74dee546b75121ed56c0f 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -6304,6 +6304,13 @@ class PrototypeInfo : public Struct {
// [prototype_users]: WeakFixedArray containing maps using this prototype,
// or Smi(0) if uninitialized.
DECL_ACCESSORS(prototype_users, Object)
+
+ // [object_create_map]: A field caching the map for Object.create(prototype).
+ static inline void SetObjectCreateMap(Handle<PrototypeInfo> info,
+ Handle<Map> map);
+ inline Map* ObjectCreateMap();
+ inline bool HasObjectCreateMap();
+
// [registry_slot]: Slot in prototype's user registry where this user
// is stored. Returns UNREGISTERED if this prototype has not been registered.
inline int registry_slot() const;
@@ -6330,13 +6337,16 @@ class PrototypeInfo : public Struct {
static const int kPrototypeUsersOffset = HeapObject::kHeaderSize;
static const int kRegistrySlotOffset = kPrototypeUsersOffset + kPointerSize;
static const int kValidityCellOffset = kRegistrySlotOffset + kPointerSize;
- static const int kBitFieldOffset = kValidityCellOffset + kPointerSize;
+ static const int kObjectCreateMap = kValidityCellOffset + kPointerSize;
+ static const int kBitFieldOffset = kObjectCreateMap + kPointerSize;
static const int kSize = kBitFieldOffset + kPointerSize;
// Bit field usage.
static const int kShouldBeFastBit = 0;
private:
+ DECL_ACCESSORS(object_create_map, Object)
+
DISALLOW_IMPLICIT_CONSTRUCTORS(PrototypeInfo);
};
« no previous file with comments | « src/contexts.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698