On 04/03/2011 02:29 PM, Alexandre Bergel wrote:
I guess that what Stef meant is the following:
One of the problems when sharing code among mixin and stateful-trait
application is that the physical layout of instances varies between mixin
applications. (Section 6.5 of
http://bergel.eu/download/papers/Berg07e-StatefulTraits.pdf)
So as your paper states ... methods may have to be copied down if the
layout is different. In the case of traits you always flatten out
methods; and the default traits implementation for Pharo ALWAYS
recompiles the methods when copying them. I just make sure they get
recompiled in the installed trait's scope.
Of course in our case there is no such thing as "copying down", since
traits are flattened, and not part of the hierarchy, such as is the case
for mixins. So no difficult transformations are required, recompiling is
good enough.
It would be faster to just update the bytecode indices by decompiling
and recompiling; but as said before ... that's just work I can't really
afford at this very moment.
cheers,
Toon