[ANN] IvapParser (on SqueakMap)

Stephen Pair spair at acm.org
Sat Dec 7 02:09:59 UTC 2002


Sort of feels like you're a bull in china shop doesn't it?  ;)

Anyway, yes I did something very similar in Kats...I overrode the
fundamental methods, and added #tx* variants of them (to Object) that I
could use when I didn't want the special behavior.  As for the reshaping
problem, I override #newInstanceFrom:variable:size:map: in the classes
that have the special behavior (wrt to inst var accessing that is).

This is a little different than introducing #basicInstVarAt:put:, but
there were a lot of methods that I had to be concerned about...actually
here a list of them: 

	at: at:put: basicAt: basicAt:put: basicSize become:
becomeForward: clone inspect instVarAt: instVarAt:put: longPrintOn:
shallowCopy size

As you can see, I went for the whole gusto (gee...I really wanted to
make things transparent didn't I...I probably need to back off a bit).
Anyway, changing the existing tools to use new methods was not my idea
of fun...so I avoided that.

What I've really wanted to do for a long time is create a Mirror object
that is used for reflecting on objects...and change the tools to use the
Mirrors.  You would then have one place where all of the tools would
look when they need to inspect an object's belly button.  You would also
be moving in the direction of a real meta-object protocol.  I went a
little ways on this with the delegation stuff
(http://spair.swiki.net/21), but it was in the context of Self like
prototype objects (but my prototype inspectors did work on objects
through a mirror...I must say, it seemed much more comfortable having
the mirror there).

- Stephen

> -----Original Message-----
> From: squeak-dev-admin at lists.squeakfoundation.org 
> [mailto:squeak-dev-admin at lists.squeakfoundation.org] On 
> Behalf Of Avi Bryant
> Sent: Friday, December 06, 2002 8:48 PM
> To: squeak-dev at lists.squeakfoundation.org
> Subject: RE: [ANN] IvapParser (on SqueakMap)
> 
> 
> 
> On Fri, 6 Dec 2002, Stephen Pair wrote:
> 
> > Well, yes and no...if you override certain key methods (like 
> > instVarAt: and instVarAt:put:) you can easily handle the 
> inspector and 
> > debugger...
> 
> After trashing a few images, I remember now why I didn't do 
> that. ClassBuilder uses instVarAt:put: to reshape instances 
> when you add instance variables; having that method 
> overridden forces you to be extremely careful when making 
> such modifications.
> 
> Perhaps we should introduce a basicInstVarAt:[put:] that 
> *really* low level tools can use, so the normal instVarAt can 
> be overridden?
> 
> 
> 




More information about the Squeak-dev mailing list