Improve handling of registers in compiler
Brought to you by:
fnch
At the moment the way registers are associated and accounted for is inefficient and partly broken. There are two main things to do:
- change box/registers.c so that register can be referenced (many times) and unreferenced rather than occupied and released.
- change box/registers.c so that it uses a pool, rather than having to alloc/free a new register frame for every couple of square brackets the user uses in the code.
- change box/value.c so that a Value holds a reference to a register, rather than referencing Value-s directly. Registers (rather than Value-s) are what makes sense to reference.