Lines Matching refs:del_count

272 function SparseSlice(array, start_i, del_count, len, deleted_elements) {  argument
274 var indices = %GetArrayKeys(array, start_i + del_count);
302 function SparseMove(array, start_i, del_count, len, num_additional_args) { argument
304 if (num_additional_args === del_count) return;
308 MinSimple(len - del_count + num_additional_args, 0xffffffff));
319 for (var i = start_i + del_count; i < limit; ++i) {
322 new_array[i - del_count + num_additional_args] = current;
335 } else if (key >= start_i + del_count) {
338 var new_key = key - del_count + num_additional_args;
365 function SimpleSlice(array, start_i, del_count, len, deleted_elements) { argument
367 for (var i = 0; i < del_count; i++) {
377 function SimpleMove(array, start_i, del_count, len, num_additional_args) { argument
379 if (num_additional_args !== del_count) {
382 if (num_additional_args > del_count) {
383 for (var i = len - del_count; i > start_i; i--) {
384 var from_index = i + del_count - 1;
393 for (var i = start_i; i < len - del_count; i++) {
394 var from_index = i + del_count;
402 for (var i = len; i > len - del_count + num_additional_args; i--) {
820 var del_count = 0;
824 del_count = TO_INTEGER(delete_count);
825 if (del_count < 0)
828 if (del_count > len - start_i)
831 return del_count;
839 var del_count = ComputeSpliceDeleteCount(delete_count, num_arguments, len,
842 deleted_elements.length = del_count;
848 SimpleSlice(this, start_i, del_count, len, deleted_elements);
849 SimpleMove(this, start_i, del_count, len, num_elements_to_add);
859 this.length = len - del_count + num_elements_to_add;
886 var del_count = ComputeSpliceDeleteCount(delete_count, num_arguments, len,
888 var deleted_elements = ArraySpeciesCreate(array, del_count);
889 deleted_elements.length = del_count;
892 if (del_count != num_elements_to_add && %object_is_sealed(array)) {
894 } else if (del_count > 0 && %object_is_frozen(array)) {
898 var changed_elements = del_count;
899 if (num_elements_to_add != del_count) {
902 changed_elements += len - start_i - del_count;
907 SparseSlice(array, start_i, del_count, len, deleted_elements);
908 SparseMove(array, start_i, del_count, len, num_elements_to_add);
910 SimpleSlice(array, start_i, del_count, len, deleted_elements);
911 SimpleMove(array, start_i, del_count, len, num_elements_to_add);
922 array.length = len - del_count + num_elements_to_add;