Lines Matching refs:del_count
206 function SmartSlice(array, start_i, del_count, len, deleted_elements) { argument
208 var indices = %GetArrayKeys(array, start_i + del_count);
236 function SmartMove(array, start_i, del_count, len, num_additional_args) { argument
238 var new_array = new InternalArray(len - del_count + num_additional_args);
248 for (var i = start_i + del_count; i < limit; ++i) {
251 new_array[i - del_count + num_additional_args] = current;
264 } else if (key >= start_i + del_count) {
267 new_array[key - del_count + num_additional_args] = current;
281 function SimpleSlice(array, start_i, del_count, len, deleted_elements) { argument
282 for (var i = 0; i < del_count; i++) {
295 function SimpleMove(array, start_i, del_count, len, num_additional_args) { argument
296 if (num_additional_args !== del_count) {
299 if (num_additional_args > del_count) {
300 for (var i = len - del_count; i > start_i; i--) {
301 var from_index = i + del_count - 1;
314 for (var i = start_i; i < len - del_count; i++) {
315 var from_index = i + del_count;
327 for (var i = len; i > len - del_count + num_additional_args; i--) {
715 var del_count = 0;
719 del_count = TO_INTEGER(delete_count);
720 if (del_count < 0)
723 if (del_count > len - start_i)
726 return del_count;
734 var del_count = ComputeSpliceDeleteCount(delete_count, num_arguments, len,
737 deleted_elements.length = del_count;
743 SimpleSlice(this, start_i, del_count, len, deleted_elements);
744 SimpleMove(this, start_i, del_count, len, num_elements_to_add);
754 this.length = len - del_count + num_elements_to_add;
781 var del_count = ComputeSpliceDeleteCount(delete_count, num_arguments, len,
784 deleted_elements.length = del_count;
787 if (del_count != num_elements_to_add && ObjectIsSealed(array)) {
790 } else if (del_count > 0 && ObjectIsFrozen(array)) {
795 var changed_elements = del_count;
796 if (num_elements_to_add != del_count) {
799 changed_elements += len - start_i - del_count;
804 SmartSlice(array, start_i, del_count, len, deleted_elements);
805 SmartMove(array, start_i, del_count, len, num_elements_to_add);
807 SimpleSlice(array, start_i, del_count, len, deleted_elements);
808 SimpleMove(array, start_i, del_count, len, num_elements_to_add);
819 array.length = len - del_count + num_elements_to_add;