I’m a better coder than when I woke up this morning, even if I don’t have anything substantive (like an improved virtual machine) to show for it. For example, I now know:
- gcc lets you get the address of a local label by saying “&&labelname”.
- gcc lets you jump to an address (“calculated goto”) stored in a void pointer by saying “goto *ptr”.
- gcc lets you define nested C functions.
- Visual Studio doesn’t let you do any of these things – but you can work around that with inline assembly.
It’s all Joe Eager’s fault (I kid, I kid). Joe mentioned something about threaded code this morning, and soon enough one thing led to another and I was making proof-of-concept virtual machines to test out threaded code with local label jumps – this in contrast to my current “one big switch” architecture and my old threaded code with function pointers.
