[Pharo-project] Bug in #pointsTo: ?

Mariano Martinez Peck marianopeck at gmail.com
Sun Jan 8 12:16:08 CET 2012


>
> Of course, but I'd check for the class equality first, because it's faster
> (yeah, i know you turned off inlining of #class, but Cog doesn't care about
> that ;)).


Are you sure Cog doesn't care? I think it does. From what I can see in Cog
code the entry point to inline #class is from the bytecoodes. If you see
initializeBytecodeTableForClosureV3
...
#(1 199 199 genSpecialSelectorClass needsFrameNever: notMapped 0). "not
mapped because it is directly inlined (for now)"
...

so if you use a the normal bytecode for #class then I think #class is not
inlined in machine code. At least from my tests I noticed that.

Cheers



> Another thing that you should add (besides tests of course) is
> SmallInteger >> #pointsTo: which should return false. Also make sure that
> pointer tracing tools use #pointsTo:. In Squeak I found that some of them
> "reinvented" this method...
>
>
> Levente
>
>
>
>> cheers
>>
>> --
>> Mariano
>> http://marianopeck.wordpress.**com <http://marianopeck.wordpress.com>
>>
>>


-- 
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gforge.inria.fr/pipermail/pharo-project/attachments/20120108/4c7e306e/attachment.htm>


More information about the Pharo-project mailing list