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

 
 

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

Submitter:  tk <huh>
Submitted:  Fri 27 Apr 2007 09:21:07 PM UTC
   
 
Category:  Code generation Severity:  3 - Normal
Item Group:  Compile-time exception Status:  Confirmed
Privacy:  Public Assigned to:  bothner
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group administrator
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>
Group administrator
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 Files:
   
   
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
  • -email is unavailable- added by bothner (Updated the item)
  • -email is unavailable- added by huh (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-11-01 bothner Open/ClosedOpen Closed
    2007-04-28 bothner Attached File- Added tr-loc.patch, #12618
        StatusNone Confirmed
        Assigned toNone bothner

    Back to the top

    Powered by Savane 3.13-0329.
    Corresponding source code