summaryrefslogtreecommitdiff
path: root/deps/v8/src/array.js
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2011-02-02 11:44:25 -0800
committerRyan Dahl <ry@tinyclouds.org>2011-02-02 11:44:25 -0800
commitee092f62caeae1acd088e2707fe15e18b992d17c (patch)
treea002983ec7742dd7eabe3e6e86ba17eb8b0c768a /deps/v8/src/array.js
parentf86ec1366f71f33f3b39b769238076ca898fc619 (diff)
downloadnode-new-ee092f62caeae1acd088e2707fe15e18b992d17c.tar.gz
Upgrade V8 to 3.1.1
Diffstat (limited to 'deps/v8/src/array.js')
-rw-r--r--deps/v8/src/array.js14
1 files changed, 8 insertions, 6 deletions
diff --git a/deps/v8/src/array.js b/deps/v8/src/array.js
index 0d7a7cbc85..a0e3e0bb4e 100644
--- a/deps/v8/src/array.js
+++ b/deps/v8/src/array.js
@@ -171,8 +171,9 @@ function Join(array, length, separator, convert) {
}
return %StringBuilderConcat(elements, length2, '');
} finally {
- // Make sure to pop the visited array no matter what happens.
- if (is_array) visited_arrays.pop();
+ // Make sure to remove the last element of the visited array no
+ // matter what happens.
+ if (is_array) visited_arrays.length = visited_arrays.length - 1;
}
}
@@ -603,16 +604,17 @@ function ArraySplice(start, delete_count) {
}
// SpiderMonkey, TraceMonkey and JSC treat the case where no delete count is
- // given differently from when an undefined delete count is given.
+ // given as a request to delete all the elements from the start.
+ // And it differs from the case of undefined delete count.
// This does not follow ECMA-262, but we do the same for
// compatibility.
var del_count = 0;
- if (num_arguments > 1) {
+ if (num_arguments == 1) {
+ del_count = len - start_i;
+ } else {
del_count = TO_INTEGER(delete_count);
if (del_count < 0) del_count = 0;
if (del_count > len - start_i) del_count = len - start_i;
- } else {
- del_count = len - start_i;
}
var deleted_elements = [];