[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-kawa] [bug #36863] then clause grows stack with no else clause
From: |
Helmut Eller |
Subject: |
[Bug-kawa] [bug #36863] then clause grows stack with no else clause |
Date: |
Tue, 17 Jul 2012 13:50:56 +0000 |
User-agent: |
Opera/9.80 (X11; Linux i686; U; en) Presto/2.10.289 Version/12.00 |
URL:
<http://savannah.gnu.org/bugs/?36863>
Summary: then clause grows stack with no else clause
Project: Kawa
Submitted by: ellerh
Submitted on: Tue 17 Jul 2012 01:50:55 PM GMT
Category: Code generation
Severity: 3 - Normal
Item Group: Compile-time exception
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
This example
(define (first (iterable java.lang.Iterable))
(let ((f (lambda (x) #t))
(iter (iterable:iterator)))
(let loop ()
(if (iter:hasNext)
(let ((item (iter:next)))
(if (f item)
item
(loop)))
#f))))
causes this error:
shell> kawa --version -C x.scm
Kawa 1.12.1 (revision 7274M)
Copyright (C) 2011 Per Bothner
(compiling x.scm to x)
x.scm:7: internal error while compiling x.scm
java.lang.Error: at PC 30 then clause grows stack with no else clause
at gnu.bytecode.CodeAttr.emitFi(CodeAttr.java:1902)
at gnu.expr.IfExp.compile(IfExp.java:138)
at gnu.expr.IfExp.compile(IfExp.java:52)
at gnu.expr.Expression.compileNotePosition(Expression.java:156)
at gnu.expr.Expression.compileWithPosition(Expression.java:127)
at gnu.expr.LetExp.compile(LetExp.java:193)
at gnu.expr.Expression.compileNotePosition(Expression.java:156)
at gnu.expr.Expression.compileWithPosition(Expression.java:127)
at gnu.expr.IfExp.compile(IfExp.java:123)
at gnu.expr.IfExp.compile(IfExp.java:52)
at gnu.expr.Expression.compileNotePosition(Expression.java:156)
at gnu.expr.Expression.compileWithPosition(Expression.java:127)
at gnu.expr.ApplyExp.compile(ApplyExp.java:327)
at gnu.expr.ApplyExp.compile(ApplyExp.java:126)
at gnu.expr.Expression.compileNotePosition(Expression.java:156)
at gnu.expr.Expression.compileWithPosition(Expression.java:127)
at gnu.expr.BeginExp.compile(BeginExp.java:153)
at gnu.expr.Expression.compileNotePosition(Expression.java:156)
at gnu.expr.Expression.compileWithPosition(Expression.java:127)
at gnu.expr.LetExp.compile(LetExp.java:193)
at gnu.expr.Expression.compileNotePosition(Expression.java:156)
at gnu.expr.Expression.compileWithPosition(Expression.java:127)
at gnu.expr.LetExp.compile(LetExp.java:193)
at gnu.expr.Expression.compileNotePosition(Expression.java:156)
at gnu.expr.Expression.compileWithPosition(Expression.java:142)
at gnu.expr.LambdaExp.compileBody(LambdaExp.java:1671)
at gnu.expr.LambdaExp.compileAsMethod(LambdaExp.java:1647)
at gnu.expr.LambdaExp.compileSetField(LambdaExp.java:689)
at gnu.expr.SetExp.compile(SetExp.java:170)
at gnu.expr.Expression.compileNotePosition(Expression.java:156)
at gnu.expr.Expression.compileWithPosition(Expression.java:142)
at gnu.expr.LambdaExp.compileBody(LambdaExp.java:1671)
at gnu.expr.Compilation.generateBytecode(Compilation.java:2074)
at gnu.expr.Compilation.process(Compilation.java:1952)
at gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:305)
at gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:290)
at kawa.repl.compileFiles(repl.java:824)
at kawa.repl.processArgs(repl.java:444)
at kawa.repl.main(repl.java:870)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?36863>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Bug-kawa] [bug #36863] then clause grows stack with no else clause,
Helmut Eller <=