[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-kawa] [bugs #11577] gnu.mapping.InheritingEnvironment not seeing sy
From: |
tk |
Subject: |
[Bug-kawa] [bugs #11577] gnu.mapping.InheritingEnvironment not seeing symbols in parent environment |
Date: |
Thu, 13 Jan 2005 00:11:45 +0000 |
User-agent: |
Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en) AppleWebKit/125.5.5 (KHTML, like Gecko) Safari/125.12 |
This is an automated notification sent by Savannah.
It relates to:
bugs #11577, project Kawa
==============================================================================
OVERVIEW of bugs #11577:
==============================================================================
URL:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=11577>
Summary: gnu.mapping.InheritingEnvironment not seeing
symbols in parent environment
Project: Kawa
Submitted by: huh
Submitted on: Thu 01/13/2005 at 00:11
Category: Scheme language
Severity: 5 - Average
Item Group: Unexpected result
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
_______________________________________________________
in the current cvs version, sharing environments doesn't seem to
be working properly.
it appears that baseTimestamp in gnu/mapping/InheritingEnvironment.java
is never initialized, so the following test in lookupInherited (starting
at line 68) will always be false.
NamedLocation loc = inherited[i].lookup(sym, prop, hash);
if (loc != null && loc.isBound())
{
if (! (loc instanceof SharedLocation)
|| ((SharedLocation) loc).timestamp < baseTimestamp)
return loc;
}
the following change seems to be an incomplete fix:
$ cvs diff Environment.java
Index: Environment.java
===================================================================
RCS file: /cvs/kawa/kawa/gnu/mapping/Environment.java,v
retrieving revision 1.26
diff -r1.26 Environment.java
342c342,344
< return new InheritingEnvironment(name, parent);
---
> InheritingEnvironment env = new InheritingEnvironment(name, parent);
> env.baseTimestamp = ((SimpleEnvironment)parent).currentTimestamp;
> return env;
the condition can be reproduced as follows:
$ CLASSPATH=lib/kawa.jar rlwrap java kawa.repl
#|kawa:1|# (make <java.lang.Integer> 1)
1
#|kawa:2|# (define foo 1)
#|kawa:3|# (scheme-window #t)
kawa.GuiConsole[frame0,100,50,700x500,layout=java.awt.BorderLayout,title=Kawa,resizable,normal]
#|kawa:4|#
;;; in the window:
#|kawa:1|# foo
gnu.mapping.UnboundLocationException: unbound location foo
at gnu.expr.ReferenceExp.eval(ReferenceExp.java:108)
at gnu.expr.Expression.eval(Expression.java:21)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:189)
at kawa.Shell.run(Shell.java:231)
at kawa.Shell.run(Shell.java:177)
at kawa.Shell.run(Shell.java:164)
at kawa.repl.apply0(repl.java:27)
at gnu.mapping.Future.run(Future.java:47)
#|kawa:2|# (make <java.lang.Integer> 1)
gnu.mapping.UnboundLocationException: unbound location <java.lang.Integer>
at gnu.expr.ReferenceExp.eval(ReferenceExp.java:108)
at gnu.expr.ApplyExp.eval(ApplyExp.java:69)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:189)
at kawa.Shell.run(Shell.java:231)
at kawa.Shell.run(Shell.java:177)
at kawa.Shell.run(Shell.java:164)
at kawa.repl.apply0(repl.java:27)
at gnu.mapping.Future.run(Future.java:47)
#|kawa:3|#
==============================================================================
This item URL is:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=11577>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-kawa] [bugs #11577] gnu.mapping.InheritingEnvironment not seeing symbols in parent environment,
tk <=