4 ms·
Tell me, how do you do mutual recursion in a single-pass define-before-use compiler?
by msla 9y ago
Tell me, how do you do mutual recursion in a single-pass define-before-use compiler?
- jfoutz 9y agoSingle 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.
- ruste 9y agoEasy, stack trampoline (or skyscraper a la cheney on the m.t.a)