Why does Squeak what it does when a method references a non-existing ivar?

Klaus D. Witzel klaus.witzel at cobss.com
Sat Nov 12 07:46:26 UTC 2005


Oops, s/Undefined/Undeclared/. Must drink more coffee in the morning :)

On Sat, 12 Nov 2005 08:35:20 +0100, Klaus D. Witzel  
<klaus.witzel at cobss.com> wrote:

> Hi Cees,
>
> you should have seen the missing ivar mentioned as 'missingIvar is  
> Undefined' in the Transcript, AFAIK this is so for some decades now. And  
> Undefined is the developer's (not the compiler's) responsibility ;)
>
> In this case the storeIntoLit: opcode refers to the association  
> missingIvar -> nil in Undefined.
>
> /Klaus
>
> On Sat, 12 Nov 2005 01:43:05 +0100, Cees De Groot <cdegroot at gmail.com>  
> wrote:
>
>> I had a funny problem with Seaside where a child component behaved in
>> a funny way, which turned out to be caused by the ivar representing
>> the child component not being present in the class.
>>
>> On investigation, it turns out that when the class is recompiled,
>> methods that had e.g. a storeIntoRcvr: opcode to write the now-absent
>> ivar get recompiled with a storeIntoLit: opcode.
>>
>> Shouldn't the compiler throw an error instead? This can result in very
>> hard-to-track bugs...
>>
>>
>
>
>
>





More information about the Squeak-dev mailing list