Re:Teal – A statically-typed dialect of Lua
by ufo on Friday May 16, 2025 @03:48PM
(#44009170)
Alas, as of last month we changed Pallene's compiler and it now generates C gotos for control flow. ( ^ _ ^ メ ) It helped with certain optimizations...
[ Parent
| on HN ]
Ha! Called it again!
But why gotos instead of proper control flow? Is it just easier to emit?
We switched from a hierarchical internal representation to a flat one, with gotos. Made it easier to write textbook otimization algorithms. In theory we could try to reconstruct the if and while statements when it's time to emit C, but gotos are more straightforward now.