Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Tell me, how do you do mutual recursion in a single-pass define-before-use compiler?


Single pass generally means one crack at each compilation unit. it's ok to keep a list of unresolved forward references and go back and inject (fix-up) the address once it's known. I mean, that would still count as a single pass. If they're not in the same file, the linker does it.


Easy, stack trampoline (or skyscraper a la cheney on the m.t.a)




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: