Elektrine lite

← Feed

@pervognsen@mastodon.social

Post #1985382

2026-04-28 04:18 UTC

Example: In C, ? : is annoying in a single-pass compiler because you have to go back and insert an int-to-double conversion at the end of the basic block, or more likely you use a shim basic block just for that conversion (which I believe is what tcc does), once you determine that the overall expression has type double. You have the same problems (and same solutions) when single-pass compiling the equivalent case with let assignments.

Replies (1)

  • @zeux@mastodon.gamedev.place 2026-04-28 04:21

    @pervognsen I continue to think single pass compilers are just a bad idea. They were a good idea in the 80s when you literally didn't have enough RAM. Now you can surely afford to do a second pass.

    Open ##1985383