Node copying from interpreter to host
Incorporates and therefore closes !45 (closed).
See #27 (closed).
To be done:
-
After some time, the host may have several references to the interpreter. When the interpreter starts the garbage collector, all these references have to be updated. reverse (take 100 primes)
is a good test case for this; it will keep references to all elements of the list simultaneously in memory. Take 100 larger, or changeHEAP_SIZE
, to trigger garbage collection. -
The interpreter garbage collector should not remove nodes which are referenced from the host. (This means keeping track of what nodes are referenced from the host, and hence removing the reference when host references are garbage collected.) -
The coerce
function usesget_heap_address
. It would be better if there would only ever be oneCoercionEnvironment
in the whole program, and the heap address is updated there directly (destructively).