about method annotations and trait fixes

Lukas Renggli renggli at gmail.com
Sun Feb 5 18:42:46 UTC 2006


> > 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.

- 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.

What do you think? Can everybody be happy with that?

Should I now do it the last time?

Lukas

--
Lukas Renggli
http://www.lukas-renggli.ch



More information about the V3dot9 mailing list