[Vm-dev] Compact class question

Bert Freudenberg bert at freudenbergs.de
Mon Dec 6 14:31:12 UTC 2010


On 06.12.2010, at 14:19, Gabriel Hernán Barbuto wrote:

> 
> Hi
> 
> I am working on writing an image to disk. If I understand correctly,
> the size in words field in the one word header must take into account
> the word for the header. I have a CompiledMethod instance that has 63
> words of content plus at least one header word for a total of 64
> words.
> 
> I think that I should write a three word header for this instance even
> though its class is compact. Is this correct? Is it fine to have an
> instance of compact class that doesn't have a one word header?

I think it must have a one-word header.

Are you using MicroSqueak for writing the image? It works fine, including writing compact classes. But be aware John's code had a bug when writing methods that were exactly 63 bytes long. I sent him a fix in the mean time.

- Bert -



More information about the Vm-dev mailing list