rulox icon indicating copy to clipboard operation
rulox copied to clipboard

Treewalk interpreter should have a GC

Open mariosangiorgio opened this issue 5 years ago • 0 comments

jlox gets away with not implementing a GC because it relies on the one from the JVM.

We use ref-counted values which give us almost the behaviour we want except from when there are cycles in the dependency graph. In such cases we're going to leak memory :(

The bytecode-VM implementation will have a GC so it might be a good idea to make it general enough so that it can be ported back to the treewalk interpreter.

mariosangiorgio avatar Nov 02 '18 21:11 mariosangiorgio