3 ms·
I'm curious how it implements GC but compiles to C source. Does it just emit the source for the entire VM as part of the output?
by rcthompson 5y ago
I'm curious how it implements GC but compiles to C source. Does it just emit the source for the entire VM as part of the output?
- convolvatron 5y agoVM? if you use your own allocator its pretty straightforward to run C code on a GC. there is of course Boehm, but its .. really slow and pretty fussy. since you own the compiler in this case you can even support object relocation (compaction) which does really* help a lot in total performance as well as footprint.
- jb1991 5y agoI think the popular Nim language also does this.
- klyrs 5y agoIf you use Cython to compile vanilla Python, it implements GC in the C source without the VM. I don't find that especially noteworthy... though I do wonder about the particulars of their GC implementation (though... ick, GC).