kotlinx-coroutines-core/native/src/internal/CopyOnWriteList.kt [24:32]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - override fun add(index: Int, element: E) { rangeCheck(index) val n = size val update = arrayOfNulls(n + 1) array.copyInto(destination = update, endIndex = index) update[index] = element array.copyInto(destination = update, destinationOffset = index + 1, startIndex = index, endIndex = n + 1) array = update } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - kotlinx-coroutines-core/wasmJs/src/internal/CopyOnWriteList.kt [18:26]: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - override fun add(index: Int, element: E) { rangeCheck(index) val n = size val update = arrayOfNulls(n + 1) array.copyInto(destination = update, endIndex = index) update[index] = element array.copyInto(destination = update, destinationOffset = index + 1, startIndex = index, endIndex = n + 1) array = update } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -