Recompiling the class CompiledMethod
Andreas Raab
andreas.raab at gmx.de
Fri Dec 12 14:19:28 UTC 2003
> 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 ;-) 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
|