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

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

Issue 2810363003: [builtins] Introduce DeleteProperty builtin (Closed)
Patch Set: fix CallableFor not to create handles Created 3 years, 8 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/interpreter/interpreter-generator.cc ('k') | src/property-details.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 (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 384 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 395
396 var array = TO_OBJECT(this); 396 var array = TO_OBJECT(this);
397 var n = TO_LENGTH(array.length); 397 var n = TO_LENGTH(array.length);
398 if (n == 0) { 398 if (n == 0) {
399 array.length = n; 399 array.length = n;
400 return; 400 return;
401 } 401 }
402 402
403 n--; 403 n--;
404 var value = array[n]; 404 var value = array[n];
405 %DeleteProperty_Strict(array, n); 405 delete array[n];
406 array.length = n; 406 array.length = n;
407 return value; 407 return value;
408 } 408 }
409 409
410 410
411 // Appends the arguments to the end of the array and returns the new 411 // Appends the arguments to the end of the array and returns the new
412 // length of the array. See ECMA-262, section 15.4.4.7. 412 // length of the array. See ECMA-262, section 15.4.4.7.
413 function ArrayPush() { 413 function ArrayPush() {
414 CHECK_OBJECT_COERCIBLE(this, "Array.prototype.push"); 414 CHECK_OBJECT_COERCIBLE(this, "Array.prototype.push");
415 415
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after
1453 "array_pop", ArrayPop, 1453 "array_pop", ArrayPop,
1454 "array_push", ArrayPush, 1454 "array_push", ArrayPush,
1455 "array_shift", ArrayShift, 1455 "array_shift", ArrayShift,
1456 "array_splice", ArraySplice, 1456 "array_splice", ArraySplice,
1457 "array_slice", ArraySlice, 1457 "array_slice", ArraySlice,
1458 "array_unshift", ArrayUnshift, 1458 "array_unshift", ArrayUnshift,
1459 "array_values_iterator", IteratorFunctions.values, 1459 "array_values_iterator", IteratorFunctions.values,
1460 ]); 1460 ]);
1461 1461
1462 }); 1462 });
OLDNEW
« no previous file with comments | « src/interpreter/interpreter-generator.cc ('k') | src/property-details.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698