4 ms·
Thanks. Now searching through issues I see: https://github.com/ziglang/zig/issues/5246 https://github.com/ziglang/zig/issues/5246 and the most recent entry (S
by acqq 6y ago
Thanks. Now searching through issues I see:
https://github.com/ziglang/zig/issues/5246 https://github.com/ziglang/zig/issues/5246
and the most recent entry (Sep 2):
"The plan for this is now to, at some strategic moment, utilize the C backend of stage2 to do a one time thing where we delete stage1 and replace it with the C backend output of stage2. The reason this won't be problematic for bootstrapping (#853) is that we won't keep doing it. The new stage1 C code will then get manually cleaned up and reorganized, and start being manually maintained to keep up with stage2, therefore granting it "source" status rather than "generated file" status."
Can anybody explain in more words that paragraph? As far as I understand "stage1" is a minimal compiler, written in C, needed to compile the sources of the full-featured compiler (which is called stage2) which are written as zig sources? The minimal compiler doesn't have to produce optimal code but has to support all the features used in the sources of stage2. Is that correct? Effectively, all the functionality used by the zig stage2 would have to be maintained both as C and as zig (twice) (I refer to the "manually maintained" sentence)? Is that the correct interpretation? Wouldn't it be better to remove the duplication by keeping the "core of the core" "simply" in C sources?