Closed nsensfel closed 2 years ago
Possible solution:
next_allocable_address
is a computation returning an unused address. Multiple calls to this computation may yield the same result, as long as the address is still unused.
(set! reg0 (new <TYPE>))
is then:
(set! reg0 (next_allocable_address))
(initialize! reg0 <TYPE>)
Similarly to https://github.com/nsensfel/tonkadur/issues/18, the
new
computation in Wyrd should be converted to an instruction. This makes the interpreter much simpler to implement when not relying on global variable or class members, and is just better design overall.