Baby's Second Garbage Collector

matheusmoreira.com

19 points by matheusmoreira 3 days ago


mananaysiempre - a minute ago

TL;DR: Conservative collector. Not where I would have taken things, but valid.

Re forcing a register spill: assuming the GC is invoked via an ABI-compliant function call, you don’t actually need to save all the scalar registers manually, only the callee-save ones (as setjmp does). Alternatively, you can make the compiler do the spilling by inserting a function preserving no registers into the call chain—this is spelled __attribute__((preserve_none)) in sufficiently new Clang or GCC, but you can also accomplish this kind of thing on Watcom with #pragma aux, for example.

frutiger - an hour ago

I wanted to read this but I couldn’t because of all the allusions in the article that distracted me from the points the author was trying to make.