Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(918)

Unified Diff: src/array.js

Issue 23890030: Rollback trunk to 3.21.15. (Closed) Base URL: https://v8.googlecode.com/svn/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/ast.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/array.js
diff --git a/src/array.js b/src/array.js
index 4a7aea5e1d9fd358cd679ae0f534e8d6bed1f257..5f89ebb7a6b6c4cfea2b66df051e918e95a74c0d 100644
--- a/src/array.js
+++ b/src/array.js
@@ -399,13 +399,14 @@ function ObservedArrayPop(n) {
n--;
var value = this[n];
+ EnqueueSpliceRecord(this, n, [value], 0);
+
try {
BeginPerformSplice(this);
delete this[n];
this.length = n;
} finally {
EndPerformSplice(this);
- EnqueueSpliceRecord(this, n, [value], 0);
}
return value;
@@ -440,6 +441,8 @@ function ObservedArrayPush() {
var n = TO_UINT32(this.length);
var m = %_ArgumentsLength();
+ EnqueueSpliceRecord(this, n, [], m);
+
try {
BeginPerformSplice(this);
for (var i = 0; i < m; i++) {
@@ -448,7 +451,6 @@ function ObservedArrayPush() {
this.length = n + m;
} finally {
EndPerformSplice(this);
- EnqueueSpliceRecord(this, n, [], m);
}
return this.length;
@@ -579,13 +581,14 @@ function ArrayReverse() {
function ObservedArrayShift(len) {
var first = this[0];
+ EnqueueSpliceRecord(this, 0, [first], 0);
+
try {
BeginPerformSplice(this);
SimpleMove(this, 0, 1, len, 0);
this.length = len - 1;
} finally {
EndPerformSplice(this);
- EnqueueSpliceRecord(this, 0, [first], 0);
}
return first;
@@ -624,6 +627,8 @@ function ObservedArrayUnshift() {
var len = TO_UINT32(this.length);
var num_arguments = %_ArgumentsLength();
+ EnqueueSpliceRecord(this, 0, [], num_arguments);
+
try {
BeginPerformSplice(this);
SimpleMove(this, 0, 0, len, num_arguments);
@@ -633,7 +638,6 @@ function ObservedArrayUnshift() {
this.length = len + num_arguments;
} finally {
EndPerformSplice(this);
- EnqueueSpliceRecord(this, 0, [], num_arguments);
}
return len + num_arguments;
« no previous file with comments | « src/arm/stub-cache-arm.cc ('k') | src/ast.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698