Lines Matching refs:del_count
198 function SparseSlice(array, start_i, del_count, len, deleted_elements) { argument
200 var indices = %GetArrayKeys(array, start_i + del_count);
226 function SparseMove(array, start_i, del_count, len, num_additional_args) { argument
228 if (num_additional_args === del_count) return;
232 MinSimple(len - del_count + num_additional_args, 0xffffffff));
243 for (var i = start_i + del_count; i < limit; ++i) {
246 new_array[i - del_count + num_additional_args] = current;
258 } else if (key >= start_i + del_count) {
261 var new_key = key - del_count + num_additional_args;
287 function SimpleSlice(array, start_i, del_count, len, deleted_elements) { argument
288 for (var i = 0; i < del_count; i++) {
298 function SimpleMove(array, start_i, del_count, len, num_additional_args) { argument
299 if (num_additional_args !== del_count) {
302 if (num_additional_args > del_count) {
303 for (var i = len - del_count; i > start_i; i--) {
304 var from_index = i + del_count - 1;
313 for (var i = start_i; i < len - del_count; i++) {
314 var from_index = i + del_count;
322 for (var i = len; i > len - del_count + num_additional_args; i--) {
645 var del_count = 0;
649 del_count = TO_INTEGER(delete_count);
650 if (del_count < 0)
653 if (del_count > len - start_i)
656 return del_count;
667 var del_count = ComputeSpliceDeleteCount(delete_count, num_arguments, len,
669 var deleted_elements = ArraySpeciesCreate(array, del_count);
670 deleted_elements.length = del_count;
673 if (del_count != num_elements_to_add && %object_is_sealed(array)) {
675 } else if (del_count > 0 && %object_is_frozen(array)) {
679 var changed_elements = del_count;
680 if (num_elements_to_add != del_count) {
683 changed_elements += len - start_i - del_count;
688 SparseSlice(array, start_i, del_count, len, deleted_elements);
689 SparseMove(array, start_i, del_count, len, num_elements_to_add);
691 SimpleSlice(array, start_i, del_count, len, deleted_elements);
692 SimpleMove(array, start_i, del_count, len, num_elements_to_add);
703 array.length = len - del_count + num_elements_to_add;