There is currently a lot of global state in the Nga C implementation. To facilitate some things (better multitasking, cleaner internal api), it would be beneficial to reduce this.
As multitasking becomes more integrated, there may be a need for "task local" variables. This is something I've been thinking a lot about lately, especially with regard to how
hook
s would work in a heavily multitasked VM.
The global state is now removed, and all state is in a single struct which is passed between functions.