summaryrefslogtreecommitdiff
path: root/deps/v8/src/elements.h
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-12-14 15:02:32 -0800
committerRyan Dahl <ry@tinyclouds.org>2011-12-14 15:02:32 -0800
commitb3a7de15b7f06e11bd326b60b0e5ffd762ae71c5 (patch)
tree5bd6feac02a7c9eed1fbc03fc678e952ab3a852f /deps/v8/src/elements.h
parentbe23c51f6979ef5fd519069a62648d81f25b2ec0 (diff)
downloadnode-new-b3a7de15b7f06e11bd326b60b0e5ffd762ae71c5.tar.gz
Upgrade V8 to 3.8.0
Diffstat (limited to 'deps/v8/src/elements.h')
-rw-r--r--deps/v8/src/elements.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/deps/v8/src/elements.h b/deps/v8/src/elements.h
index ed1ca5e58e..a2a184d52c 100644
--- a/deps/v8/src/elements.h
+++ b/deps/v8/src/elements.h
@@ -44,11 +44,24 @@ class ElementsAccessor {
JSObject* holder,
Object* receiver) = 0;
- // Modifies the length data property as specified for JSArrays and resizes
- // the underlying backing store accordingly.
+ // Modifies the length data property as specified for JSArrays and resizes the
+ // underlying backing store accordingly. The method honors the semantics of
+ // changing array sizes as defined in EcmaScript 5.1 15.4.5.2, i.e. array that
+ // have non-deletable elements can only be shrunk to the size of highest
+ // element that is non-deletable.
virtual MaybeObject* SetLength(JSObject* holder,
Object* new_length) = 0;
+ // Modifies both the length and capacity of a JSArray, resizing the underlying
+ // backing store as necessary. This method does NOT honor the semantics of
+ // EcmaScript 5.1 15.4.5.2, arrays can be shrunk beyond non-deletable
+ // elements. This method should only be called for array expansion OR by
+ // runtime JavaScript code that use InternalArrays and don't care about
+ // EcmaScript 5.1 semantics.
+ virtual MaybeObject* SetCapacityAndLength(JSArray* array,
+ int capacity,
+ int length) = 0;
+
virtual MaybeObject* Delete(JSObject* holder,
uint32_t key,
JSReceiver::DeleteMode mode) = 0;