Yes Now this is the choice of veronica to know how many classes she wants because in addition to class/instance there is also compiledMethod methodDefinition.... Stef On Dec 12, 2010, at 1:47 PM, Igor Stasenko wrote:
On 12 December 2010 08:41, Stéphane Ducasse <stephane.ducasse@inria.fr> wrote:
On Dec 11, 2010, at 8:35 PM, Igor Stasenko wrote:
CompiledMethod>>#methodNode is a conversion method and as any conversion i would prefer it be prefixed with 'as' , i.e. #asMethodNode
#stringVersion is used only in MessageTrace in my image.
Concerning #stringVersion: i really don't have an idea what this stuff doing there? Why a method reference allows putting an arbitrary data (strings) there by various tools?
:)
because it was handy and cool to have a holder of anything from the tools point of view. And this is why we will clean that :)
Then maybe better call it 'annotation' , and correspondingly #defaultAnnotation, so we will know that this field used for annotations by different tools?
About #isMeta and friends: they serve nothing , but introducing a lot of ad-hoc logic with code branches all over the places. We should learn how to use message dispatching better :)
this is not always that simple.
IMO, the 'theClass' ivar should be capable answering this message, along with #name, which gives the name of a class. Method reference in its 'theClass' ivar instead of symbol, should hold either real class object (or metaclass object),
No because you can be analysing an off-image code or not yet installed code. So you cannot rely on the fact that the real class is reachable.
i see no problem with offline representation. You still won't need 'isMeta' in method definition, because you have a following model:
instance side method ref -> some class proxy class side method ref -> some metaclass proxy
sure you can leave #isMeta in method reference which simply redirects the request to its 'theClass' variable:
isMeta ^ theClass isMeta
voila.
A CompiledMethod makes no difference between class/metaclass, its only holds a reference to the behavior it installed in:
method := (Object class>>#initialize).
method methodClass ---> Object class method methodClass isMeta ---> true (Object class>>#initialize) methodClass name ---> 'Object class'
So, since method references representing the CompiledMethod, they should not care as well.
or a proxy (in same way as method reference is a proxy by itself).
-- Best regards, Igor Stasenko AKA sig.
-- Best regards, Igor Stasenko AKA sig.