zig/test
mlugg f2c8fa769a
Sema: refactor generic calls to interleave argument analysis and parameter type resolution
AstGen provides all function call arguments with a result location,
referenced through the call instruction index. The idea is that this
should be the parameter type, but for `anytype` parameters, we use
generic poison, which is required to be handled correctly.

Previously, generic instantiations and inline calls worked by evaluating
all args in advance, before resolving generic parameter types. This
means any generic parameter (not just `anytype` ones) had generic poison
result types. This caused missing result locations in some cases.

Additionally, the generic instantiation logic caused `zirParam` to
analyze the argument types a second time before coercion. This meant
that for nominal types (struct/enum/etc), a *new* type was created,
distinct to the result type which was previously forwarded to the
argument expression.

This commit fixes both of these issues. Generic parameter type
resolution is now interleaved with argument analysis, so that we don't
have unnecessary generic poison types, and generic instantiation logic
now handles parameters itself rather than falling through to the
standard zirParam logic, so avoids duplicating the types.

Resolves: #16566
Resolves: #16258
Resolves: #16753
2023-08-10 10:00:26 +01:00
..
behavior Sema: refactor generic calls to interleave argument analysis and parameter type resolution 2023-08-10 10:00:26 +01:00
c_abi c-abi: enable passing tests 2023-07-28 19:27:08 -04:00
cases compiler: fix crash on invalid result type for @splat 2023-08-09 19:46:58 +01:00
link std.zig.system.darwin: fix redundant names 2023-08-03 09:52:15 -07:00
src change uses of std.builtin.Mode to OptimizeMode (#16745) 2023-08-09 14:39:34 -04:00
standalone build system: follow-up enhancements regarding LazyPath 2023-07-30 11:19:32 -07:00
assemble_and_link.zig
behavior.zig behavior: add coverage for no longer reproducing issue 2023-07-29 09:00:23 -07:00
cases.zig llvm: fix data layout calculation for experimental llvm targets 2023-08-01 19:20:22 -07:00
cbe.zig std.cstr: deprecate namespace 2023-06-25 14:51:03 -07:00
compare_output.zig std.cstr: deprecate namespace 2023-06-25 14:51:03 -07:00
compile_errors.zig Sema: use the correct decl for generic argument source locations 2023-08-09 10:09:01 -04:00
gen_h.zig
link.zig link-test: add matching test case for unwind info when MH_SUBSECTIONS_VIA_SYMBOLS is not set 2023-08-02 22:12:26 +02:00
llvm_targets.zig llvm: fix data layout calculation for experimental llvm targets 2023-08-01 19:20:22 -07:00
nvptx.zig
run_translated_c.zig std.cstr: deprecate namespace 2023-06-25 14:51:03 -07:00
stack_traces.zig
standalone.zig build system: follow-up enhancements regarding LazyPath 2023-07-30 11:19:32 -07:00
tests.zig llvm: fix data layout calculation for experimental llvm targets 2023-08-01 19:20:22 -07:00
translate_c.zig translate-c: Use @constCast and @volatileCast to remove CV-qualifiers 2023-06-29 23:36:56 +03:00