| Index: src/objects.h
|
| ===================================================================
|
| --- src/objects.h (revision 5520)
|
| +++ src/objects.h (working copy)
|
| @@ -201,6 +201,14 @@
|
| };
|
|
|
|
|
| +// NormalizedMapSharingMode is used to specify whether a map may be shared
|
| +// by different objects with normalized properties.
|
| +enum NormalizedMapSharingMode {
|
| + UNIQUE_NORMALIZED_MAP,
|
| + SHARED_NORMALIZED_MAP
|
| +};
|
| +
|
| +
|
| // Instance size sentinel for objects of variable size.
|
| static const int kVariableSizeSentinel = 0;
|
|
|
| @@ -2480,12 +2488,8 @@
|
| public:
|
| static const int kEntries = 64;
|
|
|
| - static bool IsCacheable(JSObject* object);
|
| -
|
| Object* Get(JSObject* object, PropertyNormalizationMode mode);
|
|
|
| - bool Contains(Map* map);
|
| -
|
| void Clear();
|
|
|
| // Casting
|
| @@ -3141,6 +3145,13 @@
|
| return ((1 << kHasFastElements) & bit_field2()) != 0;
|
| }
|
|
|
| + // Tells whether the map is shared between objects that may have different
|
| + // behavior. If true, the map should never be modified, instead a clone
|
| + // should be created and modified.
|
| + inline void set_is_shared(bool value);
|
| +
|
| + inline bool is_shared();
|
| +
|
| // Tells whether the instance needs security checks when accessing its
|
| // properties.
|
| inline void set_is_access_check_needed(bool access_check_needed);
|
| @@ -3160,7 +3171,8 @@
|
|
|
| Object* CopyDropDescriptors();
|
|
|
| - Object* CopyNormalized(PropertyNormalizationMode mode);
|
| + Object* CopyNormalized(PropertyNormalizationMode mode,
|
| + NormalizedMapSharingMode sharing);
|
|
|
| // Returns a copy of the map, with all transitions dropped from the
|
| // instance descriptors.
|
| @@ -3224,7 +3236,7 @@
|
| #ifdef DEBUG
|
| void MapPrint();
|
| void MapVerify();
|
| - void NormalizedMapVerify();
|
| + void SharedMapVerify();
|
| #endif
|
|
|
| inline int visitor_id();
|
| @@ -3285,6 +3297,7 @@
|
| static const int kFunctionWithPrototype = 1;
|
| static const int kHasFastElements = 2;
|
| static const int kStringWrapperSafeForDefaultValueOf = 3;
|
| + static const int kIsShared = 5;
|
|
|
| // Layout of the default cache. It holds alternating name and code objects.
|
| static const int kCodeCacheEntrySize = 2;
|
|
|