| Index: src/objects.h
|
| ===================================================================
|
| --- src/objects.h (revision 11731)
|
| +++ src/objects.h (working copy)
|
| @@ -1353,6 +1353,13 @@
|
| FORCE_DELETION
|
| };
|
|
|
| + // A non-keyed store is of the form a.x = foo or a["x"] = foo whereas
|
| + // a keyed store is of the form a[expression] = foo.
|
| + enum StoreFromKeyed {
|
| + MAY_BE_STORE_FROM_KEYED,
|
| + CERTAINLY_NOT_STORE_FROM_KEYED
|
| + };
|
| +
|
| // Casting.
|
| static inline JSReceiver* cast(Object* obj);
|
|
|
| @@ -1362,15 +1369,19 @@
|
| PropertyAttributes attributes,
|
| StrictModeFlag strict_mode);
|
| // Can cause GC.
|
| - MUST_USE_RESULT MaybeObject* SetProperty(String* key,
|
| - Object* value,
|
| - PropertyAttributes attributes,
|
| - StrictModeFlag strict_mode);
|
| - MUST_USE_RESULT MaybeObject* SetProperty(LookupResult* result,
|
| - String* key,
|
| - Object* value,
|
| - PropertyAttributes attributes,
|
| - StrictModeFlag strict_mode);
|
| + MUST_USE_RESULT MaybeObject* SetProperty(
|
| + String* key,
|
| + Object* value,
|
| + PropertyAttributes attributes,
|
| + StrictModeFlag strict_mode,
|
| + StoreFromKeyed store_from_keyed = MAY_BE_STORE_FROM_KEYED);
|
| + MUST_USE_RESULT MaybeObject* SetProperty(
|
| + LookupResult* result,
|
| + String* key,
|
| + Object* value,
|
| + PropertyAttributes attributes,
|
| + StrictModeFlag strict_mode,
|
| + StoreFromKeyed store_from_keyed = MAY_BE_STORE_FROM_KEYED);
|
| MUST_USE_RESULT MaybeObject* SetPropertyWithDefinedSetter(JSReceiver* setter,
|
| Object* value);
|
|
|
| @@ -1524,7 +1535,8 @@
|
| String* key,
|
| Object* value,
|
| PropertyAttributes attributes,
|
| - StrictModeFlag strict_mode);
|
| + StrictModeFlag strict_mode,
|
| + StoreFromKeyed store_mode);
|
| MUST_USE_RESULT MaybeObject* SetPropertyWithFailedAccessCheck(
|
| LookupResult* result,
|
| String* name,
|
| @@ -1921,9 +1933,11 @@
|
| PropertyAttributes attributes);
|
|
|
| // Add a property to a fast-case object.
|
| - MUST_USE_RESULT MaybeObject* AddFastProperty(String* name,
|
| - Object* value,
|
| - PropertyAttributes attributes);
|
| + MUST_USE_RESULT MaybeObject* AddFastProperty(
|
| + String* name,
|
| + Object* value,
|
| + PropertyAttributes attributes,
|
| + StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED);
|
|
|
| // Add a property to a slow-case object.
|
| MUST_USE_RESULT MaybeObject* AddSlowProperty(String* name,
|
| @@ -1931,10 +1945,12 @@
|
| PropertyAttributes attributes);
|
|
|
| // Add a property to an object.
|
| - MUST_USE_RESULT MaybeObject* AddProperty(String* name,
|
| - Object* value,
|
| - PropertyAttributes attributes,
|
| - StrictModeFlag strict_mode);
|
| + MUST_USE_RESULT MaybeObject* AddProperty(
|
| + String* name,
|
| + Object* value,
|
| + PropertyAttributes attributes,
|
| + StrictModeFlag strict_mode,
|
| + StoreFromKeyed store_mode = MAY_BE_STORE_FROM_KEYED);
|
|
|
| // Convert the object to use the canonical dictionary
|
| // representation. If the object is expected to have additional properties
|
| @@ -2054,7 +2070,7 @@
|
| // Maximal number of fast properties for the JSObject. Used to
|
| // restrict the number of map transitions to avoid an explosion in
|
| // the number of maps for objects used as dictionaries.
|
| - inline bool TooManyFastProperties(int properties);
|
| + inline bool TooManyFastProperties(int properties, StoreFromKeyed store_mode);
|
|
|
| // Maximal number of elements (numbered 0 .. kMaxElementCount - 1).
|
| // Also maximal value of JSArray's length property.
|
| @@ -2077,7 +2093,7 @@
|
|
|
| static const int kInitialMaxFastElementArray = 100000;
|
| static const int kFastPropertiesSoftLimit = 12;
|
| - static const int kMaxFastProperties = 32;
|
| + static const int kMaxFastProperties = 64;
|
| static const int kMaxInstanceSize = 255 * kPointerSize;
|
| // When extending the backing storage for property values, we increase
|
| // its size by more than the 1 entry necessary, so sequentially adding fields
|
|
|