Recompiling the class CompiledMethod

ducasse ducasse at iam.unibe.ch
Fri Dec 12 15:18:11 UTC 2003


On 12 déc. 03, at 15:19, Andreas Raab wrote:

>> Does anybody know why this is?
>
> Yup. The short answer is "don't do it" (I can give you a full 
> explanation
> over a beer ;-)

Ok I will pay you this beer.

Because I want to know. We found another way to
do what we wanted to know. But now from a reflective kernel point of 
view
I feel that I have been fooled because the classBuilder cannot work well
with CompiledMethod. (ok may be we are only a couple to want/be aware 
of that. still).

Setef

>  If you want to add a class variable do it via:
>
> CompiledMethod addClassVarName: 'Frobler'.
>
> This will work.
>
> Cheers,
>   - Andreas
>
>> -----Original Message-----
>> From: squeak-dev-bounces at lists.squeakfoundation.org
>> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On
>> Behalf Of Nathanael Schärli
>> Sent: Friday, December 12, 2003 3:15 PM
>> To: 'The general-purpose Squeak developers list'
>> Subject: Recompiling the class CompiledMethod
>>
>>
>> Hi
>>
>> I tried to add a class variable to the class CompiledMethod, but
>> unfortunately, the class fails to be recompiled. The problem
>> is that the
>> ClassBuilder needs to recreate all the instances of the old class so
>> that they are instances of the new class. But this does not
>> work because
>> CompiledMethod overrides basicNew: so that it cannot be
>> executed (i.e.,
>> shouldNotImplement).
>>
>> Even after I fixed this (i.e., after making sure that equivalent
>> CompiledMethods with a new class can be created), it was still not
>> possible to add a new class variable to CompiledMethod, because the
>> ClassBuilder crashed the VM.
>>
>> Does anybody know why this is?
>>
>> Nathanael
>>
>>
>>
>
>
>




More information about the Squeak-dev mailing list