About the new compiler, Part I
s11 at member.fsf.org
Sun Jan 20 20:54:54 UTC 2008
On Sun, 2008-01-20 at 10:34 -0600, John Brant wrote:
> Since this is not a message, we cannot use it in a cascaded
> message, so in VW (I don't know about other implementations), we print
> an error message to the transcript and we ignore the rewrite for this
> node. The error message is "Cannot replace message node inside of
> cascaded node with non-message node."
The current behavior of GNU Smalltalk is to do the same, signalling a
Warning instead. I'm not in favor of allowing the replacement.
However, lookForMoreMatchesInContext: is sent before this determination
is made, so the rewrite is not truly "ignored" because recursive rewrite
is invoked on the parts of the match that matched ``-variables, in some
cases mutating those parts with the results.
After rejection, rewriting naturally proceeds into the subnodes of the
original message node, whereupon rewrite rules are applied to parts of
the tree that were already rewritten. GNU Smalltalk prevents this
double-application by deepcopying the ``-variable values in the context
But you know how reluctant paranormal phenomena are to reveal
themselves when skeptics are present. --Robert Sheaffer, SkI 9/2003
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20080120/d599137b/attachment.pgp
More information about the Squeak-dev