[M3devel] garbage collector compacting and volatile?
jay.krell at cornell.edu
Fri Jan 24 11:38:01 CET 2014
Is our garbage collector compacting?
In particular, what model do we need for "volatile" in codegen?
Does the compactor read the registers or just the stack?
Update references anywhere? Just the stack? Also context?
There are tradeoffs either way.
If it is not compacting and only reads the stack, then it can be more
portable, but every write of a collected type/pointer would have to be volatile.
Or is that what the barriers are for?
If we update values on the stack, then there is some portability,
but reads and writes would have to be volatile.
If we read and write registers in the collector, then nothing has to be volatile.
Should this all be parameters passed to the backend?
And/or preserved via #ifdef in the C backend?
That last part is easy enough, for generated C to take #ifdefs
indicating if reads and/or writes should be volatile.
If the collector is not compacting, then it need not update
stack or register values, just possibly read them.
I recall reading that it is compacting.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the M3devel