Class format

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Class format

Michael van der Gulik-2
 
Hi.

Are there really 14 bits free in the Class "format" field?

The comment for Class>>format:

--
http://gulik.pbwiki.com/
Reply | Threaded
Open this post in threaded view
|

Re: Class format

Igor Stasenko
 
On 25 August 2011 23:26, Michael van der Gulik <[hidden email]> wrote:
>
> Hi.
>
> Are there really 14 bits free in the Class "format" field?
>
> The comment for Class>>format:
>

probably yes.
There are 12 bits are for identity hash (and 2 more?),
and since every instance has own hash value, these bits in format
field of class is not used.


> --
> http://gulik.pbwiki.com/
>



--
Best regards,
Igor Stasenko AKA sig.
Reply | Threaded
Open this post in threaded view
|

Re: Class format

Michael van der Gulik-2
 
On Sat, Aug 27, 2011 at 12:30 AM, Igor Stasenko <[hidden email]> wrote:

>
> On 25 August 2011 23:26, Michael van der Gulik <[hidden email]> wrote:
>>
>> Hi.
>>
>> Are there really 14 bits free in the Class "format" field?
>>
>> The comment for Class>>format:
>>
>
> probably yes.
> There are 12 bits are for identity hash (and 2 more?),
> and since every instance has own hash value, these bits in format
> field of class is not used.

Thanks.

Sorry about that email - my hand slipped and it got sent before I was finished.

Michael.


--
http://gulik.pbwiki.com/
Reply | Threaded
Open this post in threaded view
|

Re: Class format

Mariano Martinez Peck
In reply to this post by Igor Stasenko
 


On Fri, Aug 26, 2011 at 2:30 PM, Igor Stasenko <[hidden email]> wrote:

On 25 August 2011 23:26, Michael van der Gulik <[hidden email]> wrote:
>
> Hi.
>
> Are there really 14 bits free in the Class "format" field?
>
> The comment for Class>>format:
>

probably yes.
There are 12 bits are for identity hash (and 2 more?),
and since every instance has own hash value, these bits in format
field of class is not used.


I didn't understand. Why you say there are 14 free bits in the instVar 'format' of a class?  I was checking the method #format: nInstVars variable: isVar words: isWords pointers: isPointers weak: isWeak

and I don't understand that.

Thanks



--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: Class format

Igor Stasenko

On 31 August 2011 12:50, Mariano Martinez Peck <[hidden email]> wrote:

>
>
>
> On Fri, Aug 26, 2011 at 2:30 PM, Igor Stasenko <[hidden email]> wrote:
>>
>> On 25 August 2011 23:26, Michael van der Gulik <[hidden email]> wrote:
>> >
>> > Hi.
>> >
>> > Are there really 14 bits free in the Class "format" field?
>> >
>> > The comment for Class>>format:
>> >
>>
>> probably yes.
>> There are 12 bits are for identity hash (and 2 more?),
>> and since every instance has own hash value, these bits in format
>> field of class is not used.
>>
>
> I didn't understand. Why you say there are 14 free bits in the instVar 'format' of a class?  I was checking the method #format: nInstVars variable: isVar words: isWords pointers: isPointers weak: isWeak
>
> and I don't understand that.
>
This information serves as a template header for creating new
instances of a class. And since all object headers contain 12 bits
hash, which are generated during instance creation, it means that at
least those 12 bits
in 'format' value are unused.

> Thanks
>
>
>
> --
> Mariano
> http://marianopeck.wordpress.com
>
>
>



--
Best regards,
Igor Stasenko AKA sig.