Index: src/objects.h |
diff --git a/src/objects.h b/src/objects.h |
index cf60eb7ea2afdcc63d153d2a8794cb1dff0b621c..698efbc2e50e2926edd4accf2b13ded72bd3ca89 100644 |
--- a/src/objects.h |
+++ b/src/objects.h |
@@ -1397,6 +1397,14 @@ class JSReceiver: public HeapObject { |
Object* value); |
MUST_USE_RESULT MaybeObject* DeleteProperty(String* name, DeleteMode mode); |
+ MUST_USE_RESULT MaybeObject* DeleteElement(uint32_t index, DeleteMode mode); |
+ |
+ // Set the index'th array element. |
+ // Can cause GC, or return failure if GC is required. |
+ MUST_USE_RESULT MaybeObject* SetElement(uint32_t index, |
+ Object* value, |
+ StrictModeFlag strict_mode, |
+ bool check_prototype); |
// Returns the class name ([[Class]] property in the specification). |
String* class_name(); |
@@ -1413,6 +1421,7 @@ class JSReceiver: public HeapObject { |
// Can cause a GC. |
inline bool HasProperty(String* name); |
inline bool HasLocalProperty(String* name); |
+ inline bool HasElement(uint32_t index); |
// Return the object's prototype (might be Heap::null_value()). |
inline Object* GetPrototype(); |
@@ -1693,7 +1702,6 @@ class JSObject: public JSReceiver { |
bool CanConvertToFastDoubleElements(); |
// Tells whether the index'th element is present. |
- inline bool HasElement(uint32_t index); |
bool HasElementWithReceiver(JSReceiver* receiver, uint32_t index); |
// Computes the new capacity when expanding the elements of a JSObject. |
@@ -6594,6 +6602,7 @@ class JSProxy: public JSReceiver { |
static inline JSProxy* cast(Object* obj); |
bool HasPropertyWithHandler(String* name); |
+ bool HasElementWithHandler(uint32_t index); |
MUST_USE_RESULT MaybeObject* GetPropertyWithHandler( |
Object* receiver, |
@@ -6607,14 +6616,31 @@ class JSProxy: public JSReceiver { |
Object* value, |
PropertyAttributes attributes, |
StrictModeFlag strict_mode); |
+ MUST_USE_RESULT MaybeObject* SetElementWithHandler( |
+ uint32_t index, |
+ Object* value, |
+ StrictModeFlag strict_mode); |
+ |
+ MUST_USE_RESULT MaybeObject* SetPropertyWithHandlerDefiningSetter( |
Rico
2011/09/12 11:21:18
I am not to happy with this name since we don't kn
rossberg
2011/09/13 16:10:25
Done. Also changed the name to SetPropertyWithHand
|
+ String* name, |
+ Object* value, |
+ PropertyAttributes attributes, |
+ StrictModeFlag strict_mode, |
+ bool* found); |
MUST_USE_RESULT MaybeObject* DeletePropertyWithHandler( |
String* name, |
DeleteMode mode); |
+ MUST_USE_RESULT MaybeObject* DeleteElementWithHandler( |
+ uint32_t index, |
+ DeleteMode mode); |
MUST_USE_RESULT PropertyAttributes GetPropertyAttributeWithHandler( |
JSReceiver* receiver, |
String* name); |
+ MUST_USE_RESULT PropertyAttributes GetElementAttributeWithHandler( |
+ JSReceiver* receiver, |
+ uint32_t index); |
// Turn this into an (empty) JSObject. |
void Fix(); |