4 ms·
One of the great things about icon is the wonderful book on implementing it! It gives a lot of detail into how interpreters work under the hood
by bodhiandphysics 5y ago
One of the great things about icon is the wonderful book on implementing it! It gives a lot of detail into how interpreters work under the hood
- twoodfin 5y agohttps://www.cs.arizona.edu/icon/ibsale.htm https://www.cs.arizona.edu/icon/ibsale.htm Thanks for the pointer. PL implementation books are my favorite sub-sub-genre.
- mindcrime 5y agoIf there isn't one already, somebody should start one of those Github "Awesome X" lists of "Awesome PL implementation books". Edit: there doesn't appear to be one for that specifically, but this list is kinda close. https://github.com/aalhour/awesome-compilers https://github.com/aalhour/awesome-compilers
- anamax 5y agoThe "everyone gets a stack" implementation feels awkward and limiting. One of the first non-trivial simulators that I wrote was an implementation of Icon's control structures using heap-allocated frames. While heap allocating a frame is more expensive than incrementing/decrementing a stack pointer, managing lots of heap-allocated execution contexts is faster than managing lots of execution stacks, especially in a 32 bit world. It had an ordinary stack for each thread, which was used mainly for running libc stuff.