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

Side by Side Diff: src/js/array.js

Issue 1502593002: [API] GetOwnPropertyDescriptor: use C++ implementation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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/contexts.h ('k') | src/js/proxy.js » ('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 (function(global, utils, extrasUtils) { 5 (function(global, utils, extrasUtils) {
6 6
7 "use strict"; 7 "use strict";
8 8
9 %CheckIsBootstrapping(); 9 %CheckIsBootstrapping();
10 10
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 if (n == 0) { 483 if (n == 0) {
484 array.length = n; 484 array.length = n;
485 return; 485 return;
486 } 486 }
487 487
488 if (%IsObserved(array)) 488 if (%IsObserved(array))
489 return ObservedArrayPop.call(array, n); 489 return ObservedArrayPop.call(array, n);
490 490
491 n--; 491 n--;
492 var value = array[n]; 492 var value = array[n];
493 // TODO(jkummerow): Use %DeleteProperty_Strict instead, delete "Delete".
493 Delete(array, n, true); 494 Delete(array, n, true);
494 array.length = n; 495 array.length = n;
495 return value; 496 return value;
496 } 497 }
497 498
498 499
499 function ObservedArrayPush() { 500 function ObservedArrayPush() {
500 var n = TO_LENGTH_OR_UINT32(this.length); 501 var n = TO_LENGTH_OR_UINT32(this.length);
501 var m = %_ArgumentsLength(); 502 var m = %_ArgumentsLength();
502 503
(...skipping 1419 matching lines...) Expand 10 before | Expand all | Expand 10 after
1922 %InstallToContext([ 1923 %InstallToContext([
1923 "array_pop", ArrayPop, 1924 "array_pop", ArrayPop,
1924 "array_push", ArrayPush, 1925 "array_push", ArrayPush,
1925 "array_shift", ArrayShift, 1926 "array_shift", ArrayShift,
1926 "array_splice", ArraySplice, 1927 "array_splice", ArraySplice,
1927 "array_slice", ArraySlice, 1928 "array_slice", ArraySlice,
1928 "array_unshift", ArrayUnshift, 1929 "array_unshift", ArrayUnshift,
1929 ]); 1930 ]);
1930 1931
1931 }); 1932 });
OLDNEW
« no previous file with comments | « src/contexts.h ('k') | src/js/proxy.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698