nsensfel / tonkadur

Narrative scripting/programming tool. Write stories in your favorite editor using a feature-rich language, compile them into a very small and simple language to easily integrate them into your game.
https://tonkadur.of.tacticians.online
Apache License 2.0
3 stars 0 forks source link

Polymorphic registers #12

Closed nsensfel closed 4 years ago

nsensfel commented 4 years ago

I don't think the restriction of registers to a single type across uses is warranted, and removing it would greatly improve memory usage.

nsensfel commented 4 years ago

Register re-use served no purpose other than the economy of a few instructions. The new register management strategy removes and creates new registers as they are needed, which does add a load of instructions to the code, but greatly reduces memory usage and removes the need for polymorphic registers.