hax icon indicating copy to clipboard operation
hax copied to clipboard

Optimize the resulting code object.

Open brandtbucher opened this issue 5 years ago • 1 comments

Currently, the code object we generate has too big of a stack, extra names/constants, and a ton of NOPs. We should take a page out of peephole.c’s playbook and optimize this stuff. We do need to be careful, though, to not change any of the legitimate generated instructions (including user-specified NOPs, which could be tricky).

Because this would make jumps basically impossible to write, #1 would most likely need to happen first.

brandtbucher avatar Oct 16 '19 16:10 brandtbucher

This is mostly done! All that's left is compressing lnotab, and being smarter about our stack size calculations.

brandtbucher avatar Oct 25 '19 06:10 brandtbucher