[Pharo-dev] Critical ClassBuilder bug

Stéphane Ducasse stephane.ducasse at inria.fr
Wed Dec 25 16:50:12 EST 2013


Ok I do not understand why I just receive today these old mails :)

On 25 Dec 2013, at 20:53, Marcus Denker <marcus.denker at inria.fr> wrote:

> 
> On 25 Dec 2013, at 20:42, Stéphane Ducasse <stephane.ducasse at inria.fr> wrote:
> 
>> Guillermo
>> 
>> do you have a test because we should really cover the classBuilder with such 
>> scenario?
>> 
> 
> Yes, tests and the fix have been integrated last friday.
> 
>> Stef
>> On 17 Dec 2013, at 16:59, Guillermo Polito <guillermopolito at gmail.com> wrote:
>> 
>>> Hi!!
>>> 
>>> I started this afternoon to see a bug on class bindings on trait methods. This one: https://pharo.fogbugz.com/f/cases/11756/Reshaping-a-class-breaks-classBinding-identity
>>> 
>>> Now, after playing and moving around that, I noticed that the problem is worse:
>>> 
>>> 1)Create Class A.
>>> 2)Create method A>>m1.
>>> 3)Create method A>>m2.
>>> 4)reshape the class (e.g. add an inst var)
>>> 
>>> Then: (A>>#m2) classBinding == (A>>#m3) classBinding ==> false!!!
>>> 
>>> 
>>> The problem is caused because the recompilation of the methods is taking place in a class that is not yet installed in its environment (the Smalltalk system dictionary in this case). The installation of the class takes part after the reshaping+the recompilation. Then, when the methods are compiled, the binding is not available for them and new bindings are created.
>>> 
>>> Would someone with more idea on the new class builder give some advice? Cause I'm a bit lost in the new class builder code :)
>>> 
>>> Tx,
>>> Guille
>> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20131225/2a316e5e/attachment-0002.html>


More information about the Pharo-dev mailing list