The current handling of locals, globals and temporaries is a mess. This became clear with a10b45a.
An entire re-design should be considered.
Some bad things to be resolved:
[x] Scope handling in compiler is ugly (started with #132)
[ ] Temporaries should be locals (on stack!)
[ ] Globals should not be defined by compiler.local() on global scope
[ ] ImlValue might not be the right choice for variables, maybe ImlVariable as internal information structure, to be used by e.g. compiler.temp() and compiler.untemp()?
The current handling of locals, globals and temporaries is a mess. This became clear with a10b45a. An entire re-design should be considered.
Some bad things to be resolved: