[squeak-dev] Re: New weak finalization support. Implementation

Andreas Raab andreas.raab at gmx.de
Tue May 25 05:20:00 UTC 2010


On 5/24/2010 9:47 PM, Eliot Miranda wrote:
> Or store it in a flag in the image header flags word, accessed through
> vmParameterAt:put:. I would argue strongly that the VM should be
> backwards-compatible and the new mechanism is enabled by an image and
> that the enablement persists with the image rather than having to be
> reestablished on every startup.

I really don't like using header bits like that. Header bits are an 
*extremely* scarce resource since every new bit effectively cuts the 
image format version space in half. Once we have 32 header bits we can't 
use an image format identifier any longer because every possible 
combination of bits will be spoken for by some obscure combination of 
features.

Really, if you want to use header bits more regularly, then we should 
add a new image format that has room for header bits depending on image 
format version. That way you can add header bits and their meaning 
incrementally and when you've run out of space you're forced to update 
the image format version (which resets and accumulates previously 
optional features).

For the case at hand, what's wrong with simply requiring that the 
sizeof(splObjs) must be larger than 55 to enable the finalization 
scheme? That is backwards compatible and doesn't require fuzzing with 
header bits.

Cheers,
   - Andreas



More information about the Squeak-dev mailing list