bugKawa - Bugs: bug #14640, internal compile error when using...

 
 

bug #14640: internal compile error when using "location"

Submitted by:  None
Submitted on:  Sun 25 Sep 2005 06:53:18 PM UTC  
 
Category: Code generationSeverity: 3 - Normal
Item Group: Compile-time exceptionStatus: Fixed
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.

 

Wed 28 Sep 2005 05:56:19 AM UTC, comment #1:

Thanks for the bug report.
I checked in a fix a cvs. Please let me know how it works.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Sun 25 Sep 2005 06:53:18 PM UTC, original submission:

I am using the latest Kawa from CVS.

I wrote a file named p1.scm which contains:

(define numbers ())

Then in macros.scm I have:

(define-macro (push! value where)
(let ((val-name (gentemp))
(loc-name (gentemp)))
`(let ((,val-name ,value)
(,loc-name (location ,where)))
(set! (,loc-name) (cons ,val-name (,loc-name))))))

Then I have another file p2.scm with:

(require <p1>)

(push! 10 numbers)

And I use these commands to compile them:

kawa -C p1.scm
kawa -f macros.scm -C p2.scm

And I get this error:

(compiling p2.scm)
<unknown>: internal compile error - caught java.lang.NullPointerException
java.lang.NullPointerException
at gnu.bytecode.CodeAttr.emitLoad(CodeAttr.java:1170)
at gnu.expr.Declaration.load(Declaration.java:219)
at gnu.expr.ReferenceExp.compile(ReferenceExp.java:113)
at gnu.expr.Expression.compileNotePosition(Expression.java:127)
at gnu.expr.PrimProcedure.compileArgs(PrimProcedure.java:385)
at gnu.expr.PrimProcedure.compile(PrimProcedure.java:420)
at gnu.expr.PrimProcedure.compile(PrimProcedure.java:411)
at gnu.expr.ApplyExp.compile(ApplyExp.java:167)
at gnu.expr.ApplyExp.compile(ApplyExp.java:117)
at gnu.expr.LetExp.compile(LetExp.java:128)
at gnu.expr.Expression.compileWithPosition(Expression.java:101)
at gnu.kawa.functions.AppendValues.compile(AppendValues.java:49)
at gnu.expr.ApplyExp.compile(ApplyExp.java:167)
at gnu.expr.ApplyExp.compile(ApplyExp.java:117)
at gnu.expr.Expression.compileWithPosition(Expression.java:116)
at gnu.expr.LambdaExp.compileBody(LambdaExp.java:1438)
at gnu.expr.Compilation.addClass(Compilation.java:1891)
at gnu.expr.Compilation.compile(Compilation.java:915)
at gnu.expr.Compilation.compileToFiles(Compilation.java:953)
at kawa.lang.CompileFile.compile_to_files(CompileFile.java:70)
at kawa.repl.processArgs(repl.java:407)
at kawa.repl.main(repl.java:728)

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

CC list is empty

 

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 3 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Wed 28 Sep 2005 05:56:19 AM UTCbothnerStatusNone=>Fixed
  Assigned toNone=>bothner
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1