[squeak-dev] #instSize in Squeak 5 seems to be broken for Traits

Max Leske maxleske at gmail.com
Fri Aug 21 15:57:53 UTC 2015

Hi folks

I’ve been trying to load Fuel into Squeak 5 but can’t because I get errors when loading Traits (they have not instance variables). The reason for this error seems to be that #instSize answers 2 for Traits when it should answer 0.

The current implementation is:

^format bitAnd: 16rFFFF

The comment in the 4.6 version says:

	NOTE: This code supports the backward-compatible extension to 8 bits of instSize.
	When we revise the image format, it should become...
	^ ((format bitShift: -1) bitAnd: 16rFF) - 1
	Note also that every other method in this category will require
	2 bits more of right shift after the change.

When I use that version in TraitBehaviour>>instSize in Squeak 5 I get 0 as expected and I can load Fuel without problems.


More information about the Squeak-dev mailing list