[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-kawa] [bug #22299] function misnaming with moduleStatic > 0
From: |
tk |
Subject: |
[Bug-kawa] [bug #22299] function misnaming with moduleStatic > 0 |
Date: |
Tue, 12 Feb 2008 23:50:49 +0000 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.12) Gecko/20080207 Ubuntu/7.10 (gutsy) Firefox/2.0.0.12 |
URL:
<http://savannah.gnu.org/bugs/?22299>
Summary: function misnaming with moduleStatic > 0
Project: Kawa
Submitted by: huh
Submitted on: Tuesday 02/12/2008 at 23:50
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:
svn 6049
when compiling with moduleStatic > 0, compiler is generating
incorrect name to refer to function in another module.
following example illustrates the error:
$ cat a.scm
(define (foo-a)
(foo-b))
$ cat b.scm
(define (foo-b)
(format #t "foo-b here~%"))
$ rlwrap java -jar kawa-1.9.3.jar
#|kawa:1|# (set! (static-field <gnu.expr.Compilation> 'moduleStatic) 1)
#|kawa:2|# (compile-file "b.scm" "b.zip")
#|kawa:3|# (load"b.zip")
#|kawa:4|# (compile-file "a.scm" "a.zip")
#|kawa:5|# (load"a.zip")
#|kawa:6|# (foo-b)
foo-b here
#|kawa:7|# (foo-a)
java.lang.NoClassDefFoundError: b
at a.fooA(a.scm:1)
at a.apply0(a.scm:1)
at gnu.expr.ModuleMethod.apply0(ModuleMethod.java:176)
at gnu.expr.ModuleMethod.apply(ModuleMethod.java:150)
at gnu.mapping.CallContext.runUntilDone(CallContext.java:251)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:309)
at kawa.Shell.run(Shell.java:275)
at kawa.Shell.run(Shell.java:186)
at kawa.Shell.run(Shell.java:167)
at kawa.repl.main(repl.java:870)
Caused by: java.lang.ClassNotFoundException: b
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:289)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at gnu.bytecode.ZipLoader.loadClass(ZipLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
... 10 more
from disassembly of the class for a.scm, it appears that
the name of the file is being prepended to the function name:
public static java.lang.Object fooA();
Code:
0: getstatic #12; //Field b.foo$Mnb:Lgnu/expr/ModuleMethod;
3: invokevirtual #18; //Method
gnu/mapping/Procedure.apply0:()Ljava/lang/Object;
6: areturn
bug was introduced sometime after svn 5959
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?22299>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Bug-kawa] [bug #22299] function misnaming with moduleStatic > 0,
tk <=