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

Paul DeBruicker pdebruic at gmail.com
Fri Aug 21 22:37:13 UTC 2015


Hi Eliot,

I'm looking at this too.  The error arises when loading the Fuel package
through with the Metacello configuration here:

MCHttpRepository
	location: 'http://smalltalkhub.com/mc/Pharo/Fuel/main'
	user: ''
	password: ''


Not when loading classes from a .fuel file.  

The compiler is compiling 

'fuelAccept: aGeneralMapper
	^self explicitRequirement.'

in the class TApplyingOnClassSide


Does that help with diagnosis?


Paul




Eliot Miranda-2 wrote
> Hi Max,
> 
> On Fri, Aug 21, 2015 at 8:57 AM, Max Leske <

> maxleske@

> > wrote:
> 
>> 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.
>>
> 
> So Spur has a different layout for format than V3.  The above
> implementation (format bitAnd: 16rFFFF) is correct for Spur.  In loading
> classes or traits via Fuel from 4.6 to 5.0 you're going to have to convert
> the format inst var to reflect its usage in Spur.  So we need to be clear
> here.
> 
> Is the issue that you're trying to load classes and/or traits from a Fuel
> file written by 4.6 or is it that as part of the Fuel load a new Trait
> gets
> created which has a format of 2?
> 
> 
>> Cheers,
>> Max
>>
> 
> 
> 
> -- 
> _,,,^..^,,,_
> best, Eliot





--
View this message in context: http://forum.world.st/instSize-in-Squeak-5-seems-to-be-broken-for-Traits-tp4844835p4844914.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.


More information about the Squeak-dev mailing list