GSOC | Extending Common Lisp support
Jamison Hope
jrh@theptrgroup.com
Wed Jun 6 20:34:00 GMT 2012
On Jun 6, 2012, at 3:56 PM, Per Bothner wrote:
> On 06/06/2012 12:11 PM, Jamison Hope wrote:
>> I'll continue to poke around with The Bug a little more, looking for
>> where these two diverge:
>>
>>> ; This is erroneous.
>>> (define (foo) 'a)
>>> (define x foo)
>>> (let ((x (lambda () 'b))) (display (x)) (display x) (display (foo)))
>>> (newline)
>>> ;; Output: b #<procedure x> b
>>
>>
>>> ; This is correct.
>>> (define (foo) 'a)
>>> (define y foo)
>>> (let ((x (lambda () 'b))) (display (x)) (display x) (display (foo)))
>>> (newline)
>>> ;; Output: b #<procedure x> a
>
> I think the problem is where LambdaExp#compile calls
> emitLoadModuleMethod.
> I don't think the branch at line 780 should be taken, or if it
> should be,
> we should not rebind the outer procedure (see the comment in
> ProcInitializer#emitLoadModuleMethod line 35).
Yup, just found that. We need a check something like that the outer
procedure's original declaration is within the same enclosing LetExp
that we're in now? Or maybe that we're within a SetExp? Is it ever
correct to do a rebinding outside of a set?
Thanks, Per!
-Jamie
--
Jamison Hope
The PTR Group
www.theptrgroup.com
More information about the Kawa
mailing list