This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: define-syntax code generation bug


Hi,

I experimented a little more and found a variation of the code generation bug, now generating a file-compiler internal error:

file patches2.scm:
(require <gnu.brl.stringfun>)		;brl-string
(require <gnu.brl.sqlfun>)		;sql-repeat etc.

(define sql-repeat-orig sql-repeat)

(define-syntax jch-sql-repeat2
  (syntax-rules ()
   ((jch-sql-repeat2 stmt formals (query-string) body-expr ...)
    (let ((l (sql-statement-results stmt query-string)))
      ;;(write (list (quote (lambda formals body-expr ...)) l))(newline)
      ;;(for-each (lambda formals body-expr ...) l)
      (length l)
      ))
))

java -cp ...... kawa.repl -P jch. -C patches2.scm
(compiling patches2.scm)
Internal error while compiling patches2.scm
java.lang.Error: attempting to push dead variable
	at gnu.bytecode.CodeAttr.emitLoad(CodeAttr.java:1047)
	at gnu.expr.Declaration.load(Declaration.java:139)
	at gnu.expr.Declaration.loadOwningObject(Declaration.java:102)
	at gnu.expr.Declaration.load(Declaration.java:114)
	at gnu.expr.ReferenceExp.compile(ReferenceExp.java:118)
	at gnu.expr.Expression.compile(Expression.java:108)
	at gnu.expr.BindingInitializer.emit(BindingInitializer.java:57)
	at gnu.expr.Compilation.generateConstructor(Compilation.java:1008)
	at gnu.expr.LambdaExp.compileEnd(LambdaExp.java:496)
	at gnu.expr.Compilation.addClass(Compilation.java:1515)
	at gnu.expr.Compilation.compile(Compilation.java:799)
	at gnu.expr.Compilation.compileToFiles(Compilation.java:846)
	at kawa.lang.CompileFile.compile_to_files(CompileFile.java:92)
	at kawa.repl.processArgs(repl.java:389)
	at kawa.repl.main(repl.java:593)

Uncommenting the write or for-each lines doesn't change the error.

Regards,
	Jorg Hohle


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]