| ... | ... | @@ -320,11 +320,7 @@ pub fn MultiArrayList(comptime S: type) type { |
| 320 | 320 | inline for (fields) |field_info, i| { |
| 321 | 321 | if (@sizeOf(field_info.field_type) != 0) { |
| 322 | 322 | const field = @intToEnum(Field, i); |
| 323 | | // TODO we should be able to use std.mem.copy here but it causes a |
| 324 | | // test failure on aarch64 with -OReleaseFast |
| 325 | | const src_slice = mem.sliceAsBytes(self_slice.items(field)); |
| 326 | | const dst_slice = mem.sliceAsBytes(other_slice.items(field)); |
| 327 | | @memcpy(dst_slice.ptr, src_slice.ptr, src_slice.len); |
| 323 | mem.copy(field_info.field_type, other_slice.items(field), self_slice.items(field)); |
| 328 | 324 | } |
| 329 | 325 | } |
| 330 | 326 | gpa.free(self.allocatedBytes()); |
| ... | ... | @@ -388,11 +384,7 @@ pub fn MultiArrayList(comptime S: type) type { |
| 388 | 384 | inline for (fields) |field_info, i| { |
| 389 | 385 | if (@sizeOf(field_info.field_type) != 0) { |
| 390 | 386 | const field = @intToEnum(Field, i); |
| 391 | | // TODO we should be able to use std.mem.copy here but it causes a |
| 392 | | // test failure on aarch64 with -OReleaseFast |
| 393 | | const src_slice = mem.sliceAsBytes(self_slice.items(field)); |
| 394 | | const dst_slice = mem.sliceAsBytes(other_slice.items(field)); |
| 395 | | @memcpy(dst_slice.ptr, src_slice.ptr, src_slice.len); |
| 387 | mem.copy(field_info.field_type, other_slice.items(field), self_slice.items(field)); |
| 396 | 388 | } |
| 397 | 389 | } |
| 398 | 390 | gpa.free(self.allocatedBytes()); |
| ... | ... | @@ -411,11 +403,7 @@ pub fn MultiArrayList(comptime S: type) type { |
| 411 | 403 | inline for (fields) |field_info, i| { |
| 412 | 404 | if (@sizeOf(field_info.field_type) != 0) { |
| 413 | 405 | const field = @intToEnum(Field, i); |
| 414 | | // TODO we should be able to use std.mem.copy here but it causes a |
| 415 | | // test failure on aarch64 with -OReleaseFast |
| 416 | | const src_slice = mem.sliceAsBytes(self_slice.items(field)); |
| 417 | | const dst_slice = mem.sliceAsBytes(result_slice.items(field)); |
| 418 | | @memcpy(dst_slice.ptr, src_slice.ptr, src_slice.len); |
| 406 | mem.copy(field_info.field_type, result_slice.items(field), self_slice.items(field)); |
| 419 | 407 | } |
| 420 | 408 | } |
| 421 | 409 | return result; |