Remix.run Logo
oguz-ismail 3 days ago

Cool project. Unlike tcc and cproc though kefir doesn't seem very good at handling big arrays. This

    $ kefir -c - <<x
    int a[] = {
    $(seq 10000000 | tr '\n' ,)
    };
    x
allocates gigabytes of memory and eventually crashes WSL on my machine.
jprotopopov 3 days ago | parent [-]

I have addressed compiler inefficiency in the sibling comment. This is indeed a problem. Empty arrays of such size should be compile-able (there is sparse representation for arrays). However, I would say that this use case is not particularly practical, at least in none of the projects from my test suite this has been an issue.

oguz-ismail 3 days ago | parent [-]

Good work either way. Congrats!