| ... | @@ -320,11 +320,7 @@ pub fn MultiArrayList(comptime S: type) type { | ... | @@ -320,11 +320,7 @@ pub fn MultiArrayList(comptime S: type) type { |
| 320 | inline for (fields) |field_info, i| { | 320 | inline for (fields) |field_info, i| { |
| 321 | if (@sizeOf(field_info.field_type) != 0) { | 321 | if (@sizeOf(field_info.field_type) != 0) { |
| 322 | const field = @intToEnum(Field, i); | 322 | const field = @intToEnum(Field, i); |
| 323 | // TODO we should be able to use std.mem.copy here but it causes a | 323 | mem.copy(field_info.field_type, other_slice.items(field), self_slice.items(field)); |
| 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); | | |
| 328 | } | 324 | } |
| 329 | } | 325 | } |
| 330 | gpa.free(self.allocatedBytes()); | 326 | gpa.free(self.allocatedBytes()); |
| ... | @@ -388,11 +384,7 @@ pub fn MultiArrayList(comptime S: type) type { | ... | @@ -388,11 +384,7 @@ pub fn MultiArrayList(comptime S: type) type { |
| 388 | inline for (fields) |field_info, i| { | 384 | inline for (fields) |field_info, i| { |
| 389 | if (@sizeOf(field_info.field_type) != 0) { | 385 | if (@sizeOf(field_info.field_type) != 0) { |
| 390 | const field = @intToEnum(Field, i); | 386 | const field = @intToEnum(Field, i); |
| 391 | // TODO we should be able to use std.mem.copy here but it causes a | 387 | mem.copy(field_info.field_type, other_slice.items(field), self_slice.items(field)); |
| 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); | | |
| 396 | } | 388 | } |
| 397 | } | 389 | } |
| 398 | gpa.free(self.allocatedBytes()); | 390 | gpa.free(self.allocatedBytes()); |
| ... | @@ -411,11 +403,7 @@ pub fn MultiArrayList(comptime S: type) type { | ... | @@ -411,11 +403,7 @@ pub fn MultiArrayList(comptime S: type) type { |
| 411 | inline for (fields) |field_info, i| { | 403 | inline for (fields) |field_info, i| { |
| 412 | if (@sizeOf(field_info.field_type) != 0) { | 404 | if (@sizeOf(field_info.field_type) != 0) { |
| 413 | const field = @intToEnum(Field, i); | 405 | const field = @intToEnum(Field, i); |
| 414 | // TODO we should be able to use std.mem.copy here but it causes a | 406 | mem.copy(field_info.field_type, result_slice.items(field), self_slice.items(field)); |
| 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); | | |
| 419 | } | 407 | } |
| 420 | } | 408 | } |
| 421 | return result; | 409 | return result; |