3 ms·
One of my seminal experiences in hacking on languages was working on a VM for a garbage collected language written in C++. I wrote a Cheney style copying collec
by munificent 10y ago
One of my seminal experiences in hacking on languages was working on a VM for a garbage collected language written in C++. I wrote a Cheney style copying collector to avoid fragmentation. Meanwhile, I used C++ inheritance and vtables to implement the different kinds of objects supported by the runtime.
I thought it was a really cool system until I realized that the GC could move the object pointed to by `this` in the middle of a method. Ouch. :(