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

Of course you can do all of this! After all, the sources of e.g. Wirth's Modula-2 single-pass compiler for the Macintosh (that generates native MC68000 code) have survived, and it doesn't use "stack of addresses": it uses "fixup()" calls when compiling conditions, loops, references to (imported) global variables etc. and, surely enough, calls to functions. It even has "CheckUDProc()" call at the end of the module-translation procedure to check whether there are any undefined procedures left in the symbol table.

It would be entirely possible to treat calls to undefined functions as implicit forward declarations; he simply never chose to do so.



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

Search: