[squeak-dev] Re: Class>>binding broken

Andreas Raab andreas.raab at gmx.de
Wed Feb 3 06:34:01 UTC 2010


Igor Stasenko wrote:
> - a compiled method's methodClass should always point to a class
> object, which owns a method dict where that method installed to. There
> should be no excuses in what shape a class object currently are (like
> transition from old class shape to a new one),
> because assignment of wrong methodClass could lead to fatal error(s) in VM.
> 
> So, i assume that current implementation is incorrect, because it
> installs a method and violates that rule.
> Please, no deferring, because it causing more problems (leads to more
> complex code as well as putting extra responsibility on tools, which
> loading the code to take care of this issue).

That's exactly what I ended up doing, for just these reasons. It turns 
out that the lack of sharing is easily worked around by installing a 
common binding (if necessary) after a full recompilation. This not only 
fixes that issue for classes, but also for Metaclasses which previously 
had separate bindings. So it's a win-win situation - it's correct *and* 
less wasteful as a result.

Cheers,
   - Andreas



More information about the Squeak-dev mailing list