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

Side by Side Diff: src/array.js

Issue 1224523002: Avoid converting key to string for deleting of elements (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 unified diff | Download patch
« no previous file with comments | « src/api.cc ('k') | src/messages.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 var $arrayConcat; 5 var $arrayConcat;
6 var $arrayPush; 6 var $arrayPush;
7 var $arrayPop; 7 var $arrayPop;
8 var $arrayShift; 8 var $arrayShift;
9 var $arraySlice; 9 var $arraySlice;
10 var $arraySplice; 10 var $arraySplice;
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 if (n == 0) { 471 if (n == 0) {
472 array.length = n; 472 array.length = n;
473 return; 473 return;
474 } 474 }
475 475
476 if (%IsObserved(array)) 476 if (%IsObserved(array))
477 return ObservedArrayPop.call(array, n); 477 return ObservedArrayPop.call(array, n);
478 478
479 n--; 479 n--;
480 var value = array[n]; 480 var value = array[n];
481 Delete(array, $toName(n), true); 481 Delete(array, n, true);
482 array.length = n; 482 array.length = n;
483 return value; 483 return value;
484 } 484 }
485 485
486 486
487 function ObservedArrayPush() { 487 function ObservedArrayPush() {
488 var n = TO_UINT32(this.length); 488 var n = TO_UINT32(this.length);
489 var m = %_ArgumentsLength(); 489 var m = %_ArgumentsLength();
490 490
491 try { 491 try {
(...skipping 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
1696 1696
1697 $arrayConcat = ArrayConcatJS; 1697 $arrayConcat = ArrayConcatJS;
1698 $arrayPush = ArrayPush; 1698 $arrayPush = ArrayPush;
1699 $arrayPop = ArrayPop; 1699 $arrayPop = ArrayPop;
1700 $arrayShift = ArrayShift; 1700 $arrayShift = ArrayShift;
1701 $arraySlice = ArraySlice; 1701 $arraySlice = ArraySlice;
1702 $arraySplice = ArraySplice; 1702 $arraySplice = ArraySplice;
1703 $arrayUnshift = ArrayUnshift; 1703 $arrayUnshift = ArrayUnshift;
1704 1704
1705 }); 1705 });
OLDNEW
« no previous file with comments | « src/api.cc ('k') | src/messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698