about method annotations and trait fixes
Marcus Denker
denker at iam.unibe.ch
Mon Feb 6 17:19:39 UTC 2006
On 05.02.2006, at 19:42, Lukas Renggli wrote:
>>> I would like to know
>>> - when the annotations of lukas will be pushed in 3.9
>>
>> I should have already done it. But I didn't. As soon as I find the
>> energy and the time, I hope next week.
>
> I could provide a final and last change-set (this would be the 3rd
> attempt then), if we can finally decide on the design. After a lot of
> dicussion with Andreas and Marcus I would suggest the following
> implementation:
>
> - Every compiled method references an instance of MethodAnnotation, a
> class providing a place for instance-variables that should have been
> put into CompiledMethod if this was possible.
>
MethodExtension could be another name... don't really know if it is
better,
but it would community quite clearly that this is state that should
be in
the cm normally.
> - MethodAnnotation has got an inst-var called pragmas, that holds a
> collection of Pragmas that are added by the compiler at compile-time
> from constructs like <foo>, <foo: 1>, <foo: 1 bar: 2>, etc and that
> can be also reprinted to source when decompiling the CompiledMethod.
>
> - MethodAnnotation has got an inst-var called properties, that is
> initialized to nil but that might hold an identity-dictionary where
> any kind of properties can be stored (or cached), such as source,
> parse-tree, author initials, etc. The properties do not correspond to
> something in the source-code and therefor do not require a change to
> the parser/compiler/decompiler. Maybe this var could also be left-out
> and we ask people to add i-vars consuming much less memory.
>
I would like to have the properties... I guess mostly because adding
an instvars as an extension is not possible with MC... So for
experiments,
it would be simpler.
state that all instvars have (like selector) should definitly be in
an instVar.
> What do you think? Can everybody be happy with that?
>
Yes, sounds good.
> Should I now do it the last time?
>
Yes, would be nice!
Marcus
More information about the V3dot9
mailing list