bugKawa - Bugs: bug #11508, syntax transformer exception

 
 

bug #11508: syntax transformer exception

Submitted by:  tk <huh>
Submitted on:  Thu 06 Jan 2005 06:17:13 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.

 

Sun 09 Jan 2005 12:10:37 AM UTC, comment #2:

I also checked in the testcase.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Sat 08 Jan 2005 11:40:16 PM UTC, comment #1:

I just checked in a fix for this.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Thu 06 Jan 2005 06:17:13 PM UTC, original submission:

this exception occurs when evaluating a syntax transformer, but only
in the case where the code is compiled with module-static => #f
(unlike the problem in #11491, which occurs only with module-static => #t)

following was run in most recent cvs revision from 1/6/2005

;;; file foo2.scm:

(define-syntax make-array
(syntax-rules ()
((make-array len type)
((primitive-array-new type) len))
((make-array len)
((primitive-array-new <java.lang.Object>) len))))

(define (foo n)
(make-array n))

;;; transcript:

#|kawa:4|# (set! (static-field <gnu.expr.Compilation> 'moduleStatic) 0)
#|kawa:5|# (compile-file "foo2.scm" "foo2.zip")
gnu.mapping.UnboundLocationException: unbound location $this$
at gnu.expr.ReferenceExp.eval(ReferenceExp.java:108)
at gnu.expr.ApplyExp.eval(ApplyExp.java:59)
at kawa.lang.Translator.rewrite_pair(Translator.java:361)
at kawa.lang.Translator.rewrite_with_position(Translator.java:847)
at kawa.lang.Translator.rewrite(Translator.java:631)
at kawa.lang.Translator.rewriteInBody(Translator.java:495)
at kawa.lang.Translator.rewriteBody(Translator.java:1043)
at kawa.lang.Translator.makeBody(Translator.java:1059)
at kawa.lang.Translator.rewrite_body(Translator.java:1018)
at kawa.lang.Lambda.rewriteBody(Lambda.java:533)
at kawa.standard.define.rewriteForm(define.java:140)
at kawa.lang.Translator.apply_rewrite(Translator.java:121)
at kawa.lang.Translator.rewrite_pair(Translator.java:307)
at kawa.lang.Translator.rewrite_with_position(Translator.java:847)
at kawa.lang.Translator.rewrite(Translator.java:631)
at kawa.lang.Translator.rewriteInBody(Translator.java:495)
at kawa.lang.Translator.rewriteBody(Translator.java:1052)
at kawa.lang.Translator.makeBody(Translator.java:1059)
at kawa.lang.Translator.finishModule(Translator.java:1173)
at gnu.kawa.lispexpr.LispInterpreter.parse(LispInterpreter.java:52)
at gnu.expr.Interpreter.parse(Interpreter.java:404)
at kawa.lang.CompileFile.read(CompileFile.java:38)
at kawa.lang.CompileFile.read(CompileFile.java:21)
at kawa.lib.system.compileFile(system.scm:84)
at kawa.lib.system.apply2(system.scm:81)
at gnu.expr.ModuleMethod.apply2(ModuleMethod.java:189)
at gnu.expr.ModuleMethod.apply(ModuleMethod.java:157)
at gnu.mapping.CallContext.runUntilDone(CallContext.java:240)
at gnu.expr.ModuleExp.evalModule(ModuleExp.java:247)
at kawa.Shell.run(Shell.java:231)
at kawa.Shell.run(Shell.java:177)
at kawa.Shell.run(Shell.java:164)
at kawa.Shell.run(Shell.java:151)
at kawa.repl.main(repl.java:672)
foo2.scm:10:3: unable to evaluate macro for make-array
#|kawa:6|# (set! (static-field <gnu.expr.Compilation> 'moduleStatic) 1)
#|kawa:7|# (compile-file "foo2.scm" "foo2.zip")
#|kawa:8|#

tk <huh>

 

(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
Sat 08 Jan 2005 11:40:16 PM UTCbothnerStatusNone=>Fixed
  Assigned toNone=>bothner
  Open/ClosedOpen=>Closed

Back to the top


Powered by Savane 3.1-cleanup1