diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2022-02-17 22:20:49 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2022-02-18 16:56:12 -0700 |
| commit | 32edb9b55d0e41a58a11e0437149c4a9705c4699 (patch) | |
| tree | c0497c52c28ae9f97a9fcb5c57fa89e33838f5bd /src/codegen.zig | |
| parent | dee96e2e2f464c3b8edc8ec3a63cd3b1860e3a9d (diff) | |
| download | zig-32edb9b55d0e41a58a11e0437149c4a9705c4699.tar.gz zig-32edb9b55d0e41a58a11e0437149c4a9705c4699.zip | |
stage2: eliminate ZIR arg instruction references to ZIR
Prior to this commit, the AIR arg instruction kept a reference to a ZIR
string index for the corresponding parameter name. This is used by DWARF
emitting code. However, this is a design flaw because we want AIR
objects to be independent from ZIR.
This commit saves the parameter names into memory managed by
`Module.Fn`. This is sub-optimal because we should be able to get the
parameter names from the ZIR for a function without having them
redundantly stored along with `Fn` memory. However the current way that
ZIR param instructions are encoded does not support this case. They
appear in the same ZIR body as the function instruction, just before it.
Instead, they should be embedded within the function instruction, which
will allow this TODO to be solved. That improvement is too big for this
commit, however.
After this there is one last dependency to untangle, which is for inline
assembly. The issue for that is #10784.
Diffstat (limited to 'src/codegen.zig')
0 files changed, 0 insertions, 0 deletions
