mlugg
4976b58ab1
Prevent analysis of functions only referenced at comptime
...
The idea here is that there are two ways we can reference a function at runtime:
* Through a direct call, i.e. where the function is comptime-known
* Through a function pointer
This means we can easily perform a form of rudimentary escape analysis
on functions. If we ever see a `decl_ref` or `ref` of a function, we
have a function pointer, which could "leak" into runtime code, so we
emit the function; but for a plain `decl_val`, there's no need to.
This change means that `comptime { _ = f; }` no longer forces a function
to be emitted, which was used for some things (mainly tests). These use
sites have been replaced with `_ = &f;`, which still triggers analysis
of the function body, since you're taking a pointer to the function.
Resolves : #6256
Resolves : #15353
2023-05-29 23:06:08 +01:00
..
2023-05-29 13:01:11 +03:00
2021-04-29 15:54:04 -07:00
2021-04-29 15:54:04 -07:00
2021-04-29 15:54:04 -07:00
2021-04-29 15:54:04 -07:00
2022-12-10 21:51:46 +07:00
2023-05-20 17:30:23 +02:00
2022-12-27 21:17:52 +08:00
2023-05-20 17:30:22 +02:00
2023-05-20 17:30:22 +02:00
2022-12-06 19:06:48 -07:00
2023-05-20 17:30:22 +02:00
2022-12-06 19:06:48 -07:00
2023-05-20 17:30:22 +02:00
2023-05-11 20:31:52 +02:00
2023-05-20 17:30:22 +02:00
2023-05-20 17:30:22 +02:00
2023-05-24 00:01:48 +00:00
2023-05-18 17:00:35 -04:00
2023-05-11 20:31:52 +02:00
2023-05-11 20:31:52 +02:00
2023-05-20 17:30:23 +02:00
2023-05-11 20:31:52 +02:00
2023-05-20 17:30:23 +02:00
2023-05-08 10:59:06 +03:00
2023-05-11 20:31:52 +02:00
2023-05-20 17:30:22 +02:00
2023-05-20 17:30:22 +02:00
2023-05-20 17:30:22 +02:00
2022-12-23 23:10:04 +02:00
2022-12-23 23:10:04 +02:00
2023-05-11 20:31:52 +02:00
2023-05-11 20:31:52 +02:00
2023-05-20 13:54:01 -07:00
2023-05-20 17:30:23 +02:00
2023-05-20 17:30:23 +02:00
2022-10-25 05:11:28 -04:00
2023-03-21 15:04:39 +02:00
2023-05-15 03:07:51 -04:00
2023-05-20 17:30:23 +02:00
2023-05-20 17:30:22 +02:00
2023-05-20 17:30:22 +02:00
2023-05-20 17:30:23 +02:00
2023-05-20 17:30:23 +02:00
2023-05-20 17:30:23 +02:00
2021-05-08 14:45:21 -07:00
2022-03-11 12:59:20 -07:00
2023-05-20 17:30:22 +02:00
2022-01-07 00:06:06 -05:00
2022-12-10 21:51:46 +07:00
2023-05-11 20:31:52 +02:00
2023-05-19 20:20:29 +02:00
2023-05-15 03:07:51 -04:00
2023-04-02 04:49:53 -04:00
2023-05-20 17:30:22 +02:00
2023-05-11 20:31:52 +02:00
2023-05-11 20:31:52 +02:00
2023-05-20 13:54:01 -07:00
2023-05-29 11:32:13 -07:00
2023-05-20 12:27:48 -07:00
2023-05-24 14:29:15 +03:00
2023-05-19 20:22:45 +02:00
2023-05-11 20:31:52 +02:00
2023-05-11 20:31:52 +02:00
2022-03-17 11:39:56 -07:00
2023-05-11 20:31:52 +02:00
2023-05-20 17:30:23 +02:00
2023-05-11 20:31:52 +02:00
2023-05-20 17:30:23 +02:00
2023-05-20 17:30:23 +02:00
2023-05-11 20:31:52 +02:00
2023-05-11 20:31:52 +02:00
2023-05-11 20:31:52 +02:00
2023-05-20 18:43:26 +03:30
2023-05-20 17:30:22 +02:00
2023-05-20 17:30:22 +02:00
2023-05-11 20:31:52 +02:00
2023-05-18 20:42:38 -04:00
2023-05-11 20:31:52 +02:00
2023-05-11 20:31:52 +02:00
2023-05-29 23:06:08 +01:00
2021-06-21 17:03:03 -07:00
2023-05-20 13:54:01 -07:00
2023-05-11 20:31:52 +02:00
2023-05-11 20:31:52 +02:00
2023-05-11 20:31:52 +02:00
2023-05-20 17:30:23 +02:00
2023-05-11 20:31:52 +02:00
2023-05-11 20:31:52 +02:00
2023-05-20 17:30:23 +02:00
2023-05-20 17:30:22 +02:00
2023-05-20 17:30:23 +02:00
2022-09-10 01:50:17 +03:00
2022-11-03 14:07:00 +02:00
2023-05-15 03:07:51 -04:00
2023-05-18 20:42:38 -04:00
2023-05-11 20:31:52 +02:00
2023-05-11 20:31:52 +02:00
2023-05-15 03:07:51 -04:00
2023-05-20 17:30:23 +02:00
2023-05-20 17:30:22 +02:00
2023-05-11 20:31:52 +02:00
2023-05-20 17:30:22 +02:00
2023-05-11 20:31:52 +02:00
2023-05-11 20:31:52 +02:00
2023-05-20 17:30:22 +02:00
2023-05-11 20:31:52 +02:00
2023-05-20 17:30:23 +02:00
2023-05-25 18:49:18 +03:00
2023-05-11 20:31:52 +02:00
2022-03-03 18:31:55 -07:00
2023-05-20 17:30:23 +02:00
2023-05-18 20:42:38 -04:00
2022-01-29 18:12:28 +02:00