ringabout
2b2872928b
fixes #25469 ; Conversion from distinct in for forces a copy of underlying instance ( #25746 )
...
fixes #25469
This pull request introduces an important fix to argument handling in
the compiler's transformation logic and adds a new test to verify
correct behavior with distinct types and ARC memory management.
### Compiler transformation improvements
* Updated `putArgInto` in `compiler/transf.nim` to handle
`nkHiddenStdConv`, `nkHiddenSubConv`, and `nkConv` nodes more
accurately. Now, if the types match (ignoring distinctness and shallow
range differences), the argument is recursively processed; otherwise, it
falls back to a fast assignment. This prevents incorrect assignments
when dealing with type conversions and distinct types.
### Testing for distinct types and ARC
* Added a new test `tdistinct_for_nodup.nim` to ensure correct iteration
and memory management for distinct sequences of large arrays under ARC.
The test checks that the sequence length remains unchanged during
iteration, helping catch regressions related to ARC and distinct types.
2026-04-17 09:59:22 +02:00
..
2020-07-25 20:35:20 +02:00
2020-07-07 22:43:36 +02:00
2020-07-07 22:43:36 +02:00
2024-12-13 15:04:49 +01:00
2025-04-12 06:47:57 +02:00
2024-12-13 15:04:49 +01:00
2024-12-13 15:04:49 +01:00
2024-12-13 15:04:49 +01:00
2024-12-13 15:04:49 +01:00
2020-07-07 22:43:36 +02:00
2020-11-12 09:28:32 +01:00
2020-11-18 23:28:52 +01:00
2022-02-11 11:16:27 +01:00
2022-09-28 13:59:27 +02:00
2021-02-17 14:17:35 +01:00
2021-03-04 19:33:16 +01:00
2023-07-06 15:15:50 +02:00
2022-10-03 16:12:23 +02:00
2021-10-29 19:55:48 +02:00
2023-03-16 16:06:26 +01:00
2022-10-05 10:35:40 +02:00
2024-12-13 15:04:49 +01:00
2022-09-27 20:07:26 +02:00
2022-09-27 20:07:26 +02:00
2022-04-25 11:07:55 +02:00
2025-04-16 22:51:12 +02:00
2024-12-13 15:04:49 +01:00
2022-10-02 06:44:10 +02:00
2023-03-23 16:10:14 +01:00
2022-12-28 16:23:37 +01:00
2024-01-18 21:47:13 +01:00
2023-07-10 10:31:13 +02:00
2024-12-13 15:04:49 +01:00
2024-12-13 15:04:49 +01:00
2025-06-12 21:47:41 +08:00
2024-11-12 22:57:31 +01:00
2025-09-22 10:50:57 +02:00
2025-04-12 06:47:57 +02:00
2025-04-03 12:54:00 +02:00
2024-12-13 15:04:49 +01:00
2024-12-13 15:04:49 +01:00
2020-07-25 20:35:20 +02:00
2024-02-01 16:51:07 +01:00
2024-12-13 15:04:49 +01:00
2025-10-21 16:59:22 +02:00
2021-08-01 12:52:24 +01:00
2021-02-08 09:46:07 +01:00
2020-10-15 09:42:43 +02:00
2020-11-26 10:24:52 +01:00
2024-12-22 07:56:22 +01:00
2020-10-19 22:25:43 +02:00
2026-03-07 07:39:57 +01:00
2024-12-13 15:04:49 +01:00
2020-07-27 13:07:09 +02:00
2023-11-02 11:14:50 +01:00
2023-11-02 11:14:50 +01:00
2021-10-31 06:22:00 +01:00
2023-06-30 14:54:46 +02:00
2024-12-13 15:04:49 +01:00
2024-12-13 15:04:49 +01:00
2022-06-29 22:37:24 +08:00
2024-12-13 15:04:49 +01:00
2024-12-13 15:04:49 +01:00
2024-12-13 15:04:49 +01:00
2025-07-18 23:02:16 +08:00
2026-04-17 09:59:22 +02:00
2024-12-13 15:04:49 +01:00
2020-03-09 15:32:38 +01:00
2020-05-12 19:19:31 +02:00
2022-10-17 23:48:51 +02:00
2024-12-13 15:04:49 +01:00
2026-01-07 09:32:25 +01:00
2024-12-13 15:04:49 +01:00
2020-04-22 17:34:35 +02:00
2024-12-13 15:04:49 +01:00
2024-12-13 15:04:49 +01:00
2020-09-11 01:50:42 +02:00
2020-03-18 14:25:10 +01:00
2025-04-18 05:32:49 +02:00
2024-08-20 19:09:06 +08:00
2021-07-27 09:36:19 +02:00
2023-06-13 12:03:20 +02:00
2024-12-13 15:04:49 +01:00
2024-12-13 15:04:49 +01:00
2024-12-13 15:04:49 +01:00
2022-01-04 13:29:50 +01:00
2021-05-18 21:45:37 +02:00
2026-04-12 07:05:48 +02:00
2025-02-19 23:03:58 +01:00
2020-09-24 15:41:45 +02:00
2024-07-10 17:25:34 +02:00
2024-12-13 15:04:49 +01:00
2025-04-08 23:54:31 +08:00
2025-04-08 23:54:31 +08:00
2023-03-02 05:29:40 +01:00
2024-12-13 15:04:49 +01:00
2020-09-20 22:47:48 +02:00
2020-11-15 15:47:42 +01:00
2026-02-23 13:39:55 +01:00
2024-12-13 15:04:49 +01:00
2025-05-15 09:32:10 +02:00
2025-05-15 09:32:10 +02:00
2024-11-16 10:48:01 +01:00
2024-11-16 10:48:01 +01:00
2022-09-28 13:59:27 +02:00
2024-12-13 15:04:49 +01:00
2024-12-13 15:04:49 +01:00
2024-12-13 15:04:49 +01:00
2020-11-28 09:09:31 +01:00
2024-09-08 20:17:26 +02:00
2020-07-04 07:37:24 +02:00
2021-07-27 14:32:56 +02:00
2025-02-18 17:24:41 +01:00
2024-12-13 15:04:49 +01:00
2024-12-13 15:04:49 +01:00
2022-10-11 09:17:09 +02:00