Dana Jansens
4416f3525b
Canonicalize generated functions for Core witnesses ( #7729 )
...
Use a single `SemIR::Function` per `Core` interface method, whether it's
generated locally or imported. This prevents generating duplicate
functions, which lead to different types when the witness appears in a
`FacetValue` as part of a specific for a class.
We use a `CanonicalValueStore` of `GeneratedFunction` objects that allow
finding an existing FunctionId for a `Generated` special function before
(re-)generating it. Mangling for `Generated` functions is also moved to
use the values from the `GeneratedFunction`'s canonicalization key, so
that we have a consistent source of truth for the unique ID of a
`Generated` function across all files.
New tests are in
`toolchain/check/testdata/impl/custom_witness/destroy.carbon`.
2026-09-15 16:02:13 +00:00
..
2026-09-15 16:02:13 +00:00
2025-02-20 22:42:47 +00:00
2026-09-15 16:02:13 +00:00
2026-09-08 18:39:57 +00:00
2026-09-10 22:33:50 +00:00
2026-08-06 13:32:37 +00:00
2026-09-15 16:02:13 +00:00
2026-04-29 18:33:53 +00:00
2025-01-27 23:48:44 +00:00
2026-08-11 21:06:17 +00:00
2026-08-06 13:32:37 +00:00
2026-08-06 13:32:37 +00:00
2026-08-06 13:32:37 +00:00
2026-09-02 20:28:05 +00:00
2026-05-18 20:09:17 +00:00
2026-07-29 16:25:23 +00:00
2026-09-15 16:02:13 +00:00
2026-07-16 15:12:39 +00:00
2026-07-16 15:12:39 +00:00
2026-09-10 19:29:24 +00:00
2026-06-10 15:30:43 +00:00
2025-12-11 21:41:47 +00:00
2026-08-07 16:10:01 +00:00
2025-12-11 21:41:47 +00:00
2026-09-15 16:02:13 +00:00
2026-09-15 16:02:13 +00:00
2026-05-18 20:09:17 +00:00
2026-07-11 01:22:44 +00:00
2026-07-11 01:22:44 +00:00
2026-08-24 15:54:21 +00:00
2026-07-09 20:38:56 +00:00
2025-06-10 22:09:31 +00:00
2026-06-09 21:10:18 +00:00
2026-07-31 20:09:03 +00:00
2026-02-04 17:24:55 +00:00
2026-02-25 15:15:29 +00:00
2026-09-15 16:02:13 +00:00
2026-09-15 16:02:13 +00:00
2026-09-11 00:22:27 +00:00
2026-09-15 16:02:13 +00:00
2026-09-03 17:06:22 +00:00
2026-07-29 16:25:23 +00:00
2026-09-15 16:02:13 +00:00
2026-07-08 19:33:46 +00:00
2026-09-08 20:41:58 +00:00
2026-09-08 20:41:58 +00:00
2026-08-24 21:15:50 +00:00
2026-02-19 16:24:07 +00:00
2026-07-11 01:22:44 +00:00
2026-09-11 16:58:05 +00:00
2026-08-21 18:34:21 +00:00
2026-09-01 16:12:34 +00:00
2026-05-18 20:09:17 +00:00
2026-07-16 19:00:06 +00:00
2025-04-28 19:06:24 +00:00
2026-07-22 16:45:00 +00:00
2025-12-30 19:18:34 +00:00
2026-06-29 17:41:23 +00:00
2026-08-25 18:43:52 +00:00
2026-07-16 15:12:39 +00:00
2025-04-28 19:06:24 +00:00
2026-07-16 15:12:39 +00:00
2024-07-12 22:38:06 +00:00
2026-03-06 17:35:48 +00:00
2026-09-11 18:22:33 +00:00
2026-07-14 00:59:22 +00:00
2026-07-16 15:12:39 +00:00
2026-09-01 16:12:34 +00:00
2026-03-31 22:27:43 +00:00
2026-02-09 22:00:21 +00:00
2026-05-21 21:21:50 +00:00
2026-08-25 18:43:52 +00:00
2026-01-14 16:58:15 +00:00
2026-08-17 20:49:23 +00:00
2026-06-11 16:45:39 +00:00
2026-08-21 04:09:16 +00:00
2026-07-13 19:14:38 +00:00
2026-03-10 20:04:28 +00:00
2026-05-18 20:09:17 +00:00
2026-06-13 00:22:00 +00:00
2026-08-25 18:43:52 +00:00
2026-05-21 00:02:29 +00:00
2024-12-18 00:19:12 +00:00
2026-07-08 17:07:10 +00:00
2026-09-10 15:07:31 +00:00
2024-07-12 22:38:06 +00:00
2026-09-08 20:41:58 +00:00
2026-09-03 19:06:20 +00:00
2026-07-20 19:15:09 +00:00
2024-07-12 22:38:06 +00:00
2026-05-02 01:09:50 +00:00
2026-02-09 22:00:21 +00:00
2026-07-31 20:17:06 +00:00
2025-06-10 22:09:31 +00:00
2026-07-31 20:17:06 +00:00
2026-07-29 16:25:23 +00:00
2026-07-27 14:49:06 +00:00
2025-05-22 18:58:47 +00:00
2026-09-09 19:35:43 +00:00
2026-07-30 19:59:10 +00:00
2026-09-15 16:02:13 +00:00
2025-09-10 21:40:27 +00:00
2026-06-29 17:41:23 +00:00
2026-03-24 20:56:44 +00:00
2025-03-21 23:09:37 +00:00
2025-11-11 16:36:15 +00:00
2026-08-24 18:05:15 +00:00
2026-06-13 00:22:00 +00:00
2026-08-25 18:43:52 +00:00
2026-02-19 16:24:07 +00:00
2025-09-12 22:59:37 +00:00
2026-07-13 19:14:38 +00:00
2026-02-19 23:33:36 +00:00
2026-06-05 22:33:30 +00:00
2026-02-26 20:10:50 +00:00
2026-08-20 15:45:02 +00:00
2026-02-25 15:15:29 +00:00
2026-09-15 16:02:13 +00:00
2026-08-25 18:43:52 +00:00
2026-08-17 20:49:23 +00:00
2026-08-17 20:49:23 +00:00
2026-09-01 16:12:34 +00:00
2026-09-01 16:12:34 +00:00
2026-07-20 19:15:09 +00:00
2026-05-13 17:16:02 +00:00
2025-12-09 20:38:50 +00:00
2025-12-09 20:38:50 +00:00
2025-06-10 22:09:31 +00:00
2025-06-10 22:09:31 +00:00
2026-01-14 19:32:03 +00:00
2026-09-04 01:22:16 +00:00
2026-07-11 01:22:44 +00:00
2026-02-25 15:15:29 +00:00
2025-02-25 02:07:43 +00:00
2026-09-10 22:33:50 +00:00
2026-06-13 00:22:00 +00:00
2026-09-02 20:28:05 +00:00
2026-07-01 19:15:34 +00:00
2026-05-04 21:50:13 +00:00
2026-07-29 16:25:23 +00:00
2026-07-11 01:22:44 +00:00
2025-05-01 22:17:55 +00:00
2025-05-01 22:17:55 +00:00
2026-03-28 00:06:06 +00:00
2026-03-26 15:26:56 +00:00
2026-03-26 15:26:56 +00:00
2026-07-14 00:59:22 +00:00
2026-02-19 23:33:36 +00:00
2025-11-14 13:50:56 +00:00
2026-07-16 15:12:39 +00:00
2026-07-16 15:12:39 +00:00
2026-07-20 19:15:09 +00:00
2026-07-07 13:23:47 +00:00
2026-09-01 16:12:34 +00:00
2026-07-24 18:43:12 +00:00
2026-09-08 20:41:58 +00:00
2026-07-29 16:25:23 +00:00
2026-05-11 14:17:18 +00:00
2026-05-07 22:33:47 +00:00
2026-09-09 23:05:48 +00:00
2026-07-20 19:15:09 +00:00
2026-02-26 18:57:15 +00:00
2026-02-19 23:33:36 +00:00