Skip to content

Node copying from interpreter to host

Clean Importer requested to merge node-copy-camil into master

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 change HEAP_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 uses get_heap_address. It would be better if there would only ever be one CoercionEnvironment in the whole program, and the heap address is updated there directly (destructively).

Edited by Clean Importer

Merge request reports