Andrew Kelley
e66190025f
frontend: make fn calls byval; fix false positive isNonErr
...
This commit does two things which seem unrelated at first, but,
together, solve a miscompilation, and potentially slightly speed up
compiler perf, at the expense of making #2765 trickier to implement in
the future.
Sema: avoid returning a false positive for whether an inferred error set
is comptime-known to be empty.
AstGen: mark function calls as not being interested in a result
location. This prevents the test case "ret_ptr doesn't cause own
inferred error set to be resolved" from being regressed. If we want to
accept and implement #2765 in the future, it will require solving this
problem a different way, but the principle of YAGNI tells us to go ahead
with this change.
Old ZIR looks like this:
%97 = ret_ptr()
%101 = store_node(%97, %100)
%102 = load(%97)
%103 = ret_is_non_err(%102)
New ZIR looks like this:
%97 = ret_type()
%101 = as_node(%97, %100)
%102 = ret_is_non_err(%101)
closes #15669
2023-07-27 10:12:08 -07:00
..
2023-06-25 19:14:03 -04: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-06-24 16:56:39 -07:00
2023-06-27 19:57:23 -04:00
2023-06-28 14:00:18 +03:00
2023-06-19 13:12:04 -07:00
2023-06-24 16:56:39 -07:00
2023-06-24 16:56:39 -07:00
2022-12-06 19:06:48 -07:00
2023-06-25 14:51:03 -07:00
2023-06-24 16:56:39 -07:00
2023-07-12 15:35:57 -07:00
2023-06-24 16:56:39 -07:00
2023-06-24 16:56:39 -07:00
2023-06-24 16:56:39 -07:00
2023-06-24 16:56:39 -07:00
2023-05-11 20:31:52 +02:00
2023-07-01 19:45:09 +02:00
2023-07-26 19:02:02 -07:00
2023-07-01 19:45:09 +02:00
2023-07-22 02:12:07 +02:00
2023-07-12 15:35:57 -07:00
2023-07-01 19:45:09 +02:00
2023-05-11 20:31:52 +02:00
2023-05-20 17:30:22 +02:00
2023-07-26 19:02:02 -07: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-31 18:04:33 +02:00
2023-07-01 19:45:09 +02:00
2023-07-27 10:12:08 -07:00
2023-07-26 17:21:20 -07:00
2023-06-19 12:34:42 -07:00
2023-06-24 16:56:39 -07:00
2023-06-13 23:46:58 +06:00
2023-06-24 16:56:39 -07:00
2023-05-20 17:30:22 +02:00
2023-06-24 16:56:39 -07:00
2023-06-24 16:56:39 -07:00
2023-07-26 22:19:30 -07:00
2023-07-23 17:47:18 -07:00
2021-05-08 14:45:21 -07:00
2022-03-11 12:59:20 -07:00
2023-06-27 19:57:23 -04:00
2022-01-07 00:06:06 -05:00
2022-12-10 21:51:46 +07:00
2023-06-19 12:34:42 -07:00
2023-06-24 16:56:39 -07:00
2023-05-15 03:07:51 -04:00
2023-06-13 23:46:58 +06:00
2023-05-11 20:31:52 +02:00
2023-05-11 20:31:52 +02:00
2023-07-12 15:35:57 -07:00
2023-07-01 19:45:09 +02:00
2023-05-20 12:27:48 -07:00
2023-06-24 16:56:39 -07:00
2023-05-19 20:22:45 +02:00
2023-05-11 20:31:52 +02:00
2023-06-13 23:46:58 +06:00
2022-03-17 11:39:56 -07:00
2023-06-13 23:46:58 +06:00
2023-06-13 23:46:58 +06:00
2023-06-24 16:56:39 -07:00
2023-07-26 19:02:02 -07:00
2023-06-24 16:56:39 -07:00
2023-06-24 16:56:39 -07:00
2023-05-11 20:31:52 +02:00
2023-07-26 19:02:02 -07:00
2023-07-01 19:45:09 +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-31 18:04:33 +02:00
2023-06-13 23:46:58 +06:00
2023-06-13 23:46:58 +06:00
2023-06-13 23:46:58 +06:00
2023-06-24 16:56:39 -07:00
2023-06-24 16:56:39 -07:00
2023-06-24 16:56:39 -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-07-10 19:17:50 +03:00
2023-05-11 20:31:52 +02:00
2023-05-11 20:31:52 +02:00
2023-07-26 19:02:02 -07:00
2023-05-20 17:30:22 +02:00
2023-06-25 19:14:03 -04:00
2022-09-10 01:50:17 +03:00
2022-11-03 14:07:00 +02:00
2023-06-24 16:56:39 -07:00
2023-06-24 16:56:39 -07:00
2023-06-13 23:46:58 +06:00
2023-07-25 21:45:33 -07:00
2023-06-24 16:56:39 -07:00
2023-07-25 16:19:08 -07:00
2023-07-25 16:19:08 -07:00
2023-06-24 16:56:39 -07: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-31 18:04:33 +02:00
2023-07-26 19:02:02 -07:00
2023-06-13 23:46:58 +06:00
2023-05-20 17:30:23 +02:00
2023-07-25 18:14:10 -07:00
2023-05-11 20:31:52 +02:00
2022-03-03 18:31:55 -07:00
2023-06-13 23:46:58 +06:00
2023-05-18 20:42:38 -04:00
2023-06-13 23:46:58 +06:00