[FIX] RE: [BUG] CompiledMethod>>sourceClass (was: RE: [BUG] "debug it"notworking)

Anthony Hannan ajh18 at cornell.edu
Sat Dec 13 23:41:43 UTC 2003


"Andreas Raab" <andreas.raab at gmx.de> wrote:
> > We can remove sourceClass if you want, or fix it up so it confirms it
> > has the right class by checking the class's methodDict.  We just can't
> > pass a nil class into #parse:class:.
> 
> Thanks for the info. I've been thinking about it again and I'm kinda leaning
> to simply change the "order of operation" here. E.g., instead of "self
> sourceClass ifNil:[aClass]" make it "aClass ifNil:[self sourceClass]" which
> effectively means that if you can tell the class beforehand we use it
> (trusting the caller to hand us "the right one" of course) but if the caller
> doesn't know about it (and doesn't want to enumerate the entire system to
> find out) go to the source code since that'll be faster than the
> alternatives.
> 
> What do you think?

Sounds good.  Attached is the fix for you're (and the harvester's)
convenience.

Cheers,
Anthony
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CorrectUseOfSourceClass-ajh.1.cs
Type: application/octet-stream
Size: 766 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20031213/65e944eb/CorrectUseOfSourceClass-ajh.1.obj


More information about the Squeak-dev mailing list