Make a more correct implementation of unsigned arrays copyInto
Return the destination array instead of the destination storage array wrapped in a new unsigned array. The difference should be indistinguishable, however in JS, where inline classes are not inlined yet, it had resulted in an extra wrapper.
This commit is contained in:
@@ -517,7 +517,10 @@ object ArrayOps : TemplateGroupBase() {
|
||||
specialFor(ArraysOfUnsigned) {
|
||||
inlineOnly()
|
||||
body {
|
||||
"return SELF(storage.copyInto(destination.storage, destinationOffset, startIndex, endIndex))"
|
||||
"""
|
||||
storage.copyInto(destination.storage, destinationOffset, startIndex, endIndex)
|
||||
return destination
|
||||
"""
|
||||
}
|
||||
}
|
||||
specialFor(ArraysOfPrimitives, InvariantArraysOfObjects) {
|
||||
|
||||
Reference in New Issue
Block a user