Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index 6fe18fa54d2d686afe68162114a7ae7ed0369fc9..1c415d720b83b22180116dbfce9db6063f656368 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -2339,24 +2339,10 @@ class JSObject: public JSReceiver { |
AccessorPair* GetLocalPropertyAccessorPair(Name* name); |
AccessorPair* GetLocalElementAccessorPair(uint32_t index); |
- MUST_USE_RESULT MaybeObject* SetFastElement(uint32_t index, |
- Object* value, |
- StrictModeFlag strict_mode, |
- bool check_prototype); |
- |
- MUST_USE_RESULT MaybeObject* SetDictionaryElement( |
- uint32_t index, |
- Object* value, |
- PropertyAttributes attributes, |
- StrictModeFlag strict_mode, |
- bool check_prototype, |
- SetPropertyMode set_mode = SET_PROPERTY); |
- |
- MUST_USE_RESULT MaybeObject* SetFastDoubleElement( |
- uint32_t index, |
- Object* value, |
- StrictModeFlag strict_mode, |
- bool check_prototype = true); |
+ static Handle<Object> SetFastElement(Handle<JSObject> object, uint32_t index, |
+ Handle<Object> value, |
+ StrictModeFlag strict_mode, |
+ bool check_prototype); |
static Handle<Object> SetOwnElement(Handle<JSObject> object, |
uint32_t index, |
@@ -2368,15 +2354,6 @@ class JSObject: public JSReceiver { |
Handle<JSObject> object, |
uint32_t index, |
Handle<Object> value, |
- PropertyAttributes attr, |
- StrictModeFlag strict_mode, |
- bool check_prototype = true, |
- SetPropertyMode set_mode = SET_PROPERTY); |
- |
- // A Failure object is returned if GC is needed. |
- MUST_USE_RESULT MaybeObject* SetElement( |
- uint32_t index, |
- Object* value, |
PropertyAttributes attributes, |
StrictModeFlag strict_mode, |
bool check_prototype = true, |
@@ -2393,6 +2370,11 @@ class JSObject: public JSReceiver { |
kDontAllowSmiElements |
}; |
+ static Handle<FixedArray> SetFastElementsCapacityAndLength( |
+ Handle<JSObject> object, |
+ int capacity, |
+ int length, |
+ SetFastElementsCapacitySmiMode smi_mode); |
// Replace the elements' backing store with fast elements of the given |
// capacity. Update the length for JSArrays. Returns the new backing |
// store. |
@@ -2400,6 +2382,10 @@ class JSObject: public JSReceiver { |
int capacity, |
int length, |
SetFastElementsCapacitySmiMode smi_mode); |
+ static void SetFastDoubleElementsCapacityAndLength( |
+ Handle<JSObject> object, |
+ int capacity, |
+ int length); |
MUST_USE_RESULT MaybeObject* SetFastDoubleElementsCapacityAndLength( |
int capacity, |
int length); |
@@ -2469,7 +2455,6 @@ class JSObject: public JSReceiver { |
ElementsKind to_kind); |
MUST_USE_RESULT MaybeObject* TransitionElementsKind(ElementsKind to_kind); |
- MUST_USE_RESULT MaybeObject* UpdateAllocationSite(ElementsKind to_kind); |
// TODO(mstarzinger): Both public because of ConvertAnsSetLocalProperty(). |
static void MigrateToMap(Handle<JSObject> object, Handle<Map> new_map); |
@@ -2660,6 +2645,10 @@ class JSObject: public JSReceiver { |
friend class JSReceiver; |
friend class Object; |
+ static void UpdateAllocationSite(Handle<JSObject> object, |
+ ElementsKind to_kind); |
+ MUST_USE_RESULT MaybeObject* UpdateAllocationSite(ElementsKind to_kind); |
+ |
// Used from Object::GetProperty(). |
static Handle<Object> GetPropertyWithFailedAccessCheck( |
Handle<JSObject> object, |
@@ -2687,25 +2676,42 @@ class JSObject: public JSReceiver { |
Handle<Object> value, |
Handle<JSObject> holder, |
StrictModeFlag strict_mode); |
- MUST_USE_RESULT MaybeObject* SetElementWithInterceptor( |
+ static Handle<Object> SetElementWithInterceptor( |
+ Handle<JSObject> object, |
uint32_t index, |
- Object* value, |
+ Handle<Object> value, |
PropertyAttributes attributes, |
StrictModeFlag strict_mode, |
bool check_prototype, |
SetPropertyMode set_mode); |
- MUST_USE_RESULT MaybeObject* SetElementWithoutInterceptor( |
+ static Handle<Object> SetElementWithoutInterceptor( |
+ Handle<JSObject> object, |
uint32_t index, |
- Object* value, |
+ Handle<Object> value, |
PropertyAttributes attributes, |
StrictModeFlag strict_mode, |
bool check_prototype, |
SetPropertyMode set_mode); |
- MUST_USE_RESULT MaybeObject* SetElementWithCallbackSetterInPrototypes( |
+ static Handle<Object> SetElementWithCallbackSetterInPrototypes( |
+ Handle<JSObject> object, |
uint32_t index, |
- Object* value, |
+ Handle<Object> value, |
bool* found, |
StrictModeFlag strict_mode); |
+ static Handle<Object> SetDictionaryElement( |
+ Handle<JSObject> object, |
+ uint32_t index, |
+ Handle<Object> value, |
+ PropertyAttributes attributes, |
+ StrictModeFlag strict_mode, |
+ bool check_prototype, |
+ SetPropertyMode set_mode = SET_PROPERTY); |
+ static Handle<Object> SetFastDoubleElement( |
+ Handle<JSObject> object, |
+ uint32_t index, |
+ Handle<Object> value, |
+ StrictModeFlag strict_mode, |
+ bool check_prototype = true); |
// Searches the prototype chain for property 'name'. If it is found and |
// has a setter, invoke it and set '*done' to true. If it is found and is |
@@ -3967,6 +3973,11 @@ class SeededNumberDictionary |
// Type specific at put (default NONE attributes is used when adding). |
MUST_USE_RESULT MaybeObject* AtNumberPut(uint32_t key, Object* value); |
+ MUST_USE_RESULT static Handle<SeededNumberDictionary> AddNumberEntry( |
+ Handle<SeededNumberDictionary> dictionary, |
+ uint32_t key, |
+ Handle<Object> value, |
+ PropertyDetails details); |
MUST_USE_RESULT MaybeObject* AddNumberEntry(uint32_t key, |
Object* value, |
PropertyDetails details); |
@@ -4591,6 +4602,10 @@ class ExternalByteArray: public ExternalArray { |
MUST_USE_RESULT inline MaybeObject* get(int index); |
inline void set(int index, int8_t value); |
+ static Handle<Object> SetValue(Handle<ExternalByteArray> array, |
+ uint32_t index, |
+ Handle<Object> value); |
+ |
// This accessor applies the correct conversion from Smi, HeapNumber |
// and undefined. |
MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); |
@@ -4614,6 +4629,10 @@ class ExternalUnsignedByteArray: public ExternalArray { |
MUST_USE_RESULT inline MaybeObject* get(int index); |
inline void set(int index, uint8_t value); |
+ static Handle<Object> SetValue(Handle<ExternalUnsignedByteArray> array, |
+ uint32_t index, |
+ Handle<Object> value); |
+ |
// This accessor applies the correct conversion from Smi, HeapNumber |
// and undefined. |
MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); |
@@ -4637,6 +4656,10 @@ class ExternalShortArray: public ExternalArray { |
MUST_USE_RESULT inline MaybeObject* get(int index); |
inline void set(int index, int16_t value); |
+ static Handle<Object> SetValue(Handle<ExternalShortArray> array, |
+ uint32_t index, |
+ Handle<Object> value); |
+ |
// This accessor applies the correct conversion from Smi, HeapNumber |
// and undefined. |
MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); |
@@ -4660,6 +4683,10 @@ class ExternalUnsignedShortArray: public ExternalArray { |
MUST_USE_RESULT inline MaybeObject* get(int index); |
inline void set(int index, uint16_t value); |
+ static Handle<Object> SetValue(Handle<ExternalUnsignedShortArray> array, |
+ uint32_t index, |
+ Handle<Object> value); |
+ |
// This accessor applies the correct conversion from Smi, HeapNumber |
// and undefined. |
MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); |
@@ -4683,6 +4710,10 @@ class ExternalIntArray: public ExternalArray { |
MUST_USE_RESULT inline MaybeObject* get(int index); |
inline void set(int index, int32_t value); |
+ static Handle<Object> SetValue(Handle<ExternalIntArray> array, |
+ uint32_t index, |
+ Handle<Object> value); |
+ |
// This accessor applies the correct conversion from Smi, HeapNumber |
// and undefined. |
MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); |
@@ -4706,6 +4737,10 @@ class ExternalUnsignedIntArray: public ExternalArray { |
MUST_USE_RESULT inline MaybeObject* get(int index); |
inline void set(int index, uint32_t value); |
+ static Handle<Object> SetValue(Handle<ExternalUnsignedIntArray> array, |
+ uint32_t index, |
+ Handle<Object> value); |
+ |
// This accessor applies the correct conversion from Smi, HeapNumber |
// and undefined. |
MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); |
@@ -4729,6 +4764,10 @@ class ExternalFloatArray: public ExternalArray { |
MUST_USE_RESULT inline MaybeObject* get(int index); |
inline void set(int index, float value); |
+ static Handle<Object> SetValue(Handle<ExternalFloatArray> array, |
+ uint32_t index, |
+ Handle<Object> value); |
+ |
// This accessor applies the correct conversion from Smi, HeapNumber |
// and undefined. |
MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); |
@@ -4752,6 +4791,10 @@ class ExternalDoubleArray: public ExternalArray { |
MUST_USE_RESULT inline MaybeObject* get(int index); |
inline void set(int index, double value); |
+ static Handle<Object> SetValue(Handle<ExternalDoubleArray> array, |
+ uint32_t index, |
+ Handle<Object> value); |
+ |
// This accessor applies the correct conversion from Smi, HeapNumber |
// and undefined. |
MUST_USE_RESULT MaybeObject* SetValue(uint32_t index, Object* value); |
@@ -9752,6 +9795,10 @@ class JSArray: public JSObject { |
// is set to a smi. This matches the set function on FixedArray. |
inline void set_length(Smi* length); |
+ static void JSArrayUpdateLengthFromIndex(Handle<JSArray> array, |
+ uint32_t index, |
+ Handle<Object> value); |
+ |
MUST_USE_RESULT MaybeObject* JSArrayUpdateLengthFromIndex(uint32_t index, |
Object* value); |