Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Elements of Computing Systems Chapter 11
Clone this wiki locally
- Stop inlining all the things: reduce the amount of duplicated assembly we generate so that we don't overflow;
- Adjust assembler to allow compiling our VM output: add support for the mnemonics our VM translator generates and add strict checking if the generated program is too large.
This resulted in a victorious moment when we all got to play a thrilling game of Square Dance using Leo's
hack-js implementation. Once we were done with that, we moved onto Kevin's stellar work at completing the project from Chapter 10:
We discussed the first commit in particular detail which reverts our
peek-based approach (via a nifty Enumerator) to follow the book's contract more closely. This was a welcome change as it seemed strange to rely on
peek when the book makes no mention of such an API and was causing quite a few issues during implementation (where we had
peeked but forgot to
With the above pull requests merged, we could now move onto Chapter 11's project which began with a new
SymbolTable implementation in order to augment our glorious XML output before finally moving onto generating VM code.
We had quite a bit of back and forth about whether we should ditch the XML altogether (particularly as there didn't seem to be a natural mapping between the XML output and the VM code we will eventually be generating). At first, we attempted to extract an
XmlWriter dependency that we could inject into the existing
Parser—eventually hoping to inject a new
VMWriter—but after some baffling errors from
SimpleDelegator, we decided to drop this in favour of a wholly new
Parser once we start to emit VM code. This way, we can keep our passing XML-based tests but not be held back by remaining compatible with Builder's API.
We ended up with part of the
SymbolTable implemented in a WIP commit. It is currently missing support for new subroutines but is being used to generate extra identifier information in the
We had a brief detour looking into Ruby's regular expression character properties while investigating how GitHub diff XML documents in GitHub Markup. This also lead us to discover that Nokogiri takes a configuration block on initialize to customise how comparison is done.
Thanks to Leo and Geckoboard for hosting and thanks to Kevin's extracurricular work which meant we could move on from Chapter 10.