Summary

Overhaul c-backend.scm

Metadata

Description

The C code generation stuff is a terrible, rotten mess. It's incomprehensible and making changes in the code has become rather difficult. I have a "backend" branch that uses an intermediate representation (S-expressions, roughly C-like), originally intended for an alternative backend ("qbe") that seems to work, at least for the core system + tests.

I can try to bring it up to date and present it once it is ready.

Changes and comments

[2020-01-25 17:02:33 UTC] felix wrote:

I've pushed the current state with all changes from master to the branch "backend". I'll need to do some more tests and then we can decide how to go on. Comments are welcome.

[2021-04-12 13:22:10 UTC] sjamaan changed milestone from 5.3 to 5.4

[2021-04-12 13:22:10 UTC] sjamaan wrote:

Looks like we can make this work for 5.4; too big a change for 5.3

[2021-04-26 20:16:13 UTC] felix wrote:

It"s nearly working. There is still a problem with `foreign-type-size` that needs to be solved.

[2023-11-06 22:09:50 UTC] felix changed milestone from 5.4 to someday

[2026-07-04 20:37:37 UTC] felix wrote:

too much work for too little gain. CHICKEN is tied to C in deep ways, and the backend is working well enough as it is, even though the code is rather dense.

[2026-07-04 20:37:38 UTC] felix changed status from assigned to closed

[2026-07-04 20:37:38 UTC] felix set resolution to wontfix