This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: kawa hanging while running input-parse.scm
- From: Seth Alves <alves at hungry dot com>
- To: kawa at sourceware dot org
- Date: Sat, 20 Dec 2014 10:44:04 -0800
- Subject: Re: kawa hanging while running input-parse.scm
- Authentication-results: sourceware.org; auth=none
- References: <5481BB29 dot 8070601 at hungry dot com> <54820E5D dot 905 at bothner dot com> <54821A52 dot 6000801 at hungry dot com> <5482369B dot 9010407 at bothner dot com> <54823904 dot 1030902 at hungry dot com> <54823D68 dot 3060005 at bothner dot com> <5482446D dot 8020200 at hungry dot com> <5495279E dot 60903 at bothner dot com>
That definitely changed something. It may be fixed, but I'm not sure,
because I'm hitting another (unrelated?) problem in the same code. See
attached for another boiled-down nonsense snippet.
Exception in thread "main" java.lang.InternalError
at gnu.bytecode.Label.setTypes(Label.java:103)
at gnu.bytecode.CodeAttr.emitGoto(CodeAttr.java:1609)
at gnu.bytecode.CodeAttr.emitTailCall(CodeAttr.java:2498)
at gnu.expr.ApplyExp.compile(ApplyExp.java:511)
at gnu.expr.ApplyExp.compile(ApplyExp.java:190)
at gnu.expr.Expression.compileNotePosition(Expression.java:158)
at gnu.expr.Expression.compileWithPosition(Expression.java:129)
at gnu.expr.ExitExp.compile(ExitExp.java:42)
at gnu.expr.Expression.compileWithPosition(Expression.java:132)
at gnu.expr.IfExp.compile(IfExp.java:125)
at gnu.expr.IfExp.compile(IfExp.java:54)
at gnu.kawa.functions.CompileMisc.compileConvert(CompileMisc.java:220)
at gnu.expr.ApplyExp.inlineCompile(ApplyExp.java:693)
at gnu.expr.ApplyExp.compile(ApplyExp.java:244)
...
-seth
On 12/19/2014 11:39 PM, Per Bothner wrote:
On 12/05/2014 03:49 PM, Seth Alves wrote:
It seems to be happening in FindCapturedVars.java line 274 in
static Expression checkInlineable (LambdaExp current,
java.util.Set<LambdaExp> seen)
{
...
else if (r == null)
{
r = t;
if (current.inlineHome == null)
current.inlineHome = current.nestedIn(p) ? p :
p.inlineHome;
}
...
}
I checked in a fix for this. (I hope - I find this kind of code
difficult.)
Basically, I don't set inlineHome here, instead deferring doing so to
visitLambdaExp.
#! /bin/sh
#| -*- scheme -*-
exec /usr/local/bin/kawa $0 "$@"
|#
(define-library (hmm)
(export)
(import (scheme base))
(begin
(define (blerg)
(lambda (s)
(let loop ()
(cond ((and #t (positive? 1))
(loop))
(else #f)))))
(define hmm (blerg))))
(import (scheme base)
(scheme write))
(display "ok\n")