bugKawa - Bugs: bug #19725, compile problems appearing in...

 
 

bug #19725: compile problems appearing in latest svn version (5971)

Submitted by:  tk <huh>
Submitted on:  Fri 27 Apr 2007 09:21:07 PM UTC  
 
Category: Code generationSeverity: 3 - Normal
Item Group: Compile-time exceptionStatus: Confirmed
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Thu 01 Nov 2007 04:18:54 AM UTC, comment #2:

The patch has been checked in for a while, and it seems right.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Sat 28 Apr 2007 09:30:10 PM UTC, comment #1:

I've uploaded a work-around, but I don't think it's really the correct patch. Need to think about it a bit more.

(file #12618)

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Fri 27 Apr 2007 09:21:07 PM UTC, original submission:

$ cat foo/f1.scm
(define (foo) #f)
$ cat foo/f2.scm
(define (bar) (foo))

;;; first case fails at compile time when gnu.expr.Compilation.moduleStatic == 0

$ rlwrap java -jar kawa/kawa-1.9.3.jar
#|kawa:1|# (compile-file "foo/f1.scm" "foo/f1.zip")
#|kawa:2|# (load "foo/f1.zip")
#|kawa:3|# (compile-file "foo/f2.scm" "foo/f2.zip")
java.lang.NullPointerException
at gnu.expr.Declaration.allocateVariable(Declaration.java:708)
at gnu.expr.Declaration.load(Declaration.java:245)
at gnu.expr.Declaration.loadOwningObject(Declaration.java:142)
at gnu.expr.Declaration.load(Declaration.java:205)
at gnu.expr.ReferenceExp.compile(ReferenceExp.java:152)
at gnu.expr.ApplyExp.compile(ApplyExp.java:338)
at gnu.expr.ApplyExp.compile(ApplyExp.java:110)
at gnu.expr.Expression.compileNotePosition(Expression.java:157)
at gnu.expr.Expression.compileWithPosition(Expression.java:143)
at gnu.expr.LambdaExp.compileBody(LambdaExp.java:1500)
at gnu.expr.LambdaExp.compileAsMethod(LambdaExp.java:1477)
at gnu.expr.LambdaExp.compileSetField(LambdaExp.java:627)
at gnu.expr.SetExp.compile(SetExp.java:170)
at gnu.expr.Expression.compileNotePosition(Expression.java:157)
at gnu.expr.Expression.compileWithPosition(Expression.java:143)
at gnu.expr.LambdaExp.compileBody(LambdaExp.java:1500)
at gnu.expr.Compilation.generateBytecode(Compilation.java:2017)
at gnu.expr.Compilation.process(Compilation.java:1891)
at gnu.expr.Compilation.compileToArchive(Compilation.java:990)
at kawa.lib.system.compileFile(system.scm:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at gnu.expr.PrimProcedure.apply(PrimProcedure.java:251)
at gnu.mapping.CallContext.runUntilDone(CallContext.java:251)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:303)
at kawa.Shell.run(Shell.java:260)
at kawa.Shell.run(Shell.java:185)
at kawa.Shell.run(Shell.java:166)
at kawa.repl.main(repl.java:870)
#|kawa:4|#
#|kawa:5|#
#|kawa:6|# (static-field <gnu.expr.Compilation> 'moduleStatic)
0

;;; with gnu.expr.Compilation.moduleStatic == 1, get a little further,
;;; but fails at runtime

#|kawa:7|# (set! (static-field <gnu.expr.Compilation> 'moduleStatic) 1)
#|kawa:8|#
#|kawa:9|# (compile-file "foo/f1.scm" "foo/f1.zip")
#|kawa:10|# (load "foo/f1.zip")
#|kawa:11|# (compile-file "foo/f2.scm" "foo/f2.zip")
#|kawa:12|#
#|kawa:13|# (load "foo/f2.zip")
#|kawa:14|# (foo)
#f
#|kawa:15|# (bar)
java.lang.NoClassDefFoundError: foo/f1
at foo.f2.bar(f2.scm:1)
at foo.f2.apply0(f2.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:303)
at kawa.Shell.run(Shell.java:260)
at kawa.Shell.run(Shell.java:185)
at kawa.Shell.run(Shell.java:166)
at kawa.repl.main(repl.java:870)

tk <huh>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #12618:  tr-loc.patch added by bothner (886B - text/x-patch - a work-around)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bothner (Updated the item)
  • -unavailable- added by huh (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 01 Nov 2007 04:18:53 AM UTCbothnerOpen/ClosedOpen=>Closed
    Sat 28 Apr 2007 09:30:10 PM UTCbothnerAttached File-=>Added tr-loc.patch, #12618
      StatusNone=>Confirmed
      Assigned toNone=>bothner

    Back to the top


    Powered by Savane 3.1-cleanup1