help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-smalltalk] Re: STCompiler ignores current namespace change for var


From: Stephen Compall
Subject: [Help-smalltalk] Re: STCompiler ignores current namespace change for var lookup in evals
Date: Mon, 04 Dec 2006 18:14:45 -0600
User-agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.0.8) Gecko/20061030 SeaMonkey/1.0.6

Paolo Bonzini wrote:
It is.  The attached patch should fix the problem, but I have not
tested it, nor applied it yet.  If you get back to me before 2.3, I
will include it (very safe, applies only to compiler), but otherwise I
won't.

While this fixes STCompiler>>#evaluate:parser:, STFileInParser>>#evaluate: doesn't use that method, and can't unless you want to expand the protocol of Behavior>>#compilerClass's answer. OTOH, I think it would be less than ideal to add the current namespace to the symbol table in compile:asMethodOf:classified:parser:.

Using STCompiler>>#evaluate:parser: in the valueWithUnwind'd block would also subtly change STFileInParser>>#evaluate:'s meaning -- because compiler errors wouldn't cause exceptions that could escape the evaluate: context.

(tested; same as before)

--
Stephen Compall
http://scompall.nocandysw.com/blog
##smalltalk,#gnu-smalltalk on Freenode IRC




reply via email to

[Prev in Thread] Current Thread [Next in Thread]