diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-02-15 22:35:50 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-02-15 22:36:46 -0700 |
| commit | 4006a3afb31f89be28721bdcd50fa64de63d6cbb (patch) | |
| tree | c18eb51e9a24550554dbe39b0d66aea6e22afa27 /src/codegen | |
| parent | bbf5a4d7c5726baf933e303e6c61c6bba38b694b (diff) | |
| download | zig-4006a3afb31f89be28721bdcd50fa64de63d6cbb.tar.gz zig-4006a3afb31f89be28721bdcd50fa64de63d6cbb.zip | |
astgen: update more expression types to new mem layout
additionally introduce a new file to centralize all the data about
builtin functions that we have, including:
* enum tag identifying the builtin function
* number of parameters.
* whether the expression may need a memory location.
* whether the expression allows an lvalue (currently only true for
`@field`).
Now there is only one ComptimeStringMap that has this data as the value,
and we dispatch on the enum tag in order to asgen the builtin function.
In particular this simplifies the logic for checking the number of
parameters.
This removes some untested code paths from if and while, which need to
be restored with #7929 in mind.
After this there are only a handful left of expression types to rework
to the new memory layout, and then it will be only compile errors left
to solve.
Diffstat (limited to 'src/codegen')
0 files changed, 0 insertions, 0 deletions
