2009/10/7 Johan Brichau <[email protected]>:
>
> On 07 Oct 2009, at 15:19, Igor Stasenko wrote:
>>
>> Maybe its worth to change #literalsDo: method to not iterate over
>> class and method selector?
>> And then use it in #refersToLiteral: ?
>
> Actually, I just noticed after publishing the fix that the last-but-
> one position can contain either the method selector -or- the method's
> pragma (which in turn will hold the method's selector).
>
> So, since the #refersToLiteral: method is supposed to return also
> references to literals from the pragma's (see somment) I had to adapt
> the fix to take the last-but-one position as a special case... rather
> than simply excluding it.
>

Okay, if you need to visit pragmas as well, then why don't do it:

CompiledMethod>>refersToLiteral: aLiteral

  self literalsDo: [ blablah ].
  self pragmas do: [ blah blah ]

       ^ false

which makes this method immune from any future changes in CompiledMethod format.
So, we don't need to think about 'fixing' it again and again, each
time we need to hack things.

> ----------------------------
> Johan Brichau
> [email protected]
>
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [email protected]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



-- 
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[email protected]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project

Reply via email to