[squeak-dev] Re: About typeOfClass
eliot.miranda at gmail.com
Fri Jul 25 15:22:13 UTC 2008
On Fri, Jul 25, 2008 at 2:46 AM, Paolo Bonzini <bonzini at gnu.org> wrote:
> Stéphane Ducasse wrote:
>> I was happily browsing code when I suddenly encountered that method
>> Does anybody know what it measn to return #compiledMethod?
> That you have half literals (pointers) and half bytecodes (bytes) in the
> indexed instance variables. This was probably done in the blue book for
> size optimization, but it is much less relevant today.
I disagree that its less relevant. These hybrid things are more compact and
faster to interpret. That can still be useful, e.g. on pocket phones. See
my blog post that discusses this in some detail.
>> "Answer a symbol uniquely describing the type of the receiver"
>> self instSpec = CompiledMethod instSpec ifTrue:[^#compiledMethod].
>> "Very special!"
>> self isBytes ifTrue:[^#bytes].
>> (self isWords and:[self isPointers not]) ifTrue:[^#words].
>> self isWeak ifTrue:[^#weak].
>> self isVariable ifTrue:[^#variable].
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Squeak-dev