[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-kawa] [bug #32999] Eval doesn't resolve symbols when compiled
From: |
anonymous |
Subject: |
[Bug-kawa] [bug #32999] Eval doesn't resolve symbols when compiled |
Date: |
Tue, 05 Apr 2011 07:55:00 +0000 |
User-agent: |
Mozilla/5.0 (compatible; Konqueror/4.5; Linux) KHTML/4.5.1 (like Gecko) Kubuntu |
URL:
<http://savannah.gnu.org/bugs/?32999>
Summary: Eval doesn't resolve symbols when compiled
Project: Kawa
Submitted by: None
Submitted on: Tue 05 Apr 2011 07:55:00 AM UTC
Category: Code generation
Severity: 3 - Normal
Item Group: Run-time exception
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
There appears to be an issue with symbol resolution when using eval with
compiled code.
Test case:
(define func (lambda (x) (+ x 5)))
((eval (string->symbol "func")) 5) ; Expected result 10
The above code, when run through the kawa interpreter, correctly returns 10.
When compiled with
kawa --main --module-static -C tst.scm
where tst.scm contains the above test, the resulting class produces:
unbound location func
at gnu.mapping.Location.get(Location.java:67)
at atEvalLevel$1.run(<eval>)
at gnu.expr.ModuleExp.evalModule2(ModuleExp.java:286)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:187)
at kawa.lang.Eval.evalBody(Eval.java:103)
at kawa.lang.Eval.eval(Eval.java:31)
at kawa.lang.Eval.eval(Eval.java:59)
at kawa.lang.Eval.apply1(Eval.java:118)
at tst.run(tst.scm:3)
at gnu.expr.ModuleBody.run(ModuleBody.java:44)
at gnu.expr.ModuleBody.run(ModuleBody.java:32)
at gnu.expr.ModuleBody.runAsMain(ModuleBody.java:145)
at tst.main(tst.scm)
The above test case was tested against trunk on 5 Apr 2011
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?32999>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Bug-kawa] [bug #32999] Eval doesn't resolve symbols when compiled,
anonymous <=