Stop inlining all the things #2
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Took a look at this today and figured out why we're getting the verbose output which I mentioned in computationclub/hack-assembler#3. With this patch, I've verified that running the square game through the reference jack compiler, then through our vm-translation and assembler, we get a brilliant game that runs (at least on the rust simulator, have not verified elsewhere).
A load of generated assembly will be the same for many scenarios due to being relative to the stack pointer, so we can just codegen it one time and call it (without a full stackframe setup cycle, which is
actually one of the most verbose parts of our old codegen).
This is a requirement if we are looking to fit all our instructions into the 32k provided by the hack hardware.
For reference: SquareGame ends up around 25k instructions, so there's probably still some places we could cut, but I'm happy to leave it until we encounter issues again.