bugKawa - Bugs: bug #35555, Tail-call in syntax-case

 
 

bug #35555: Tail-call in syntax-case

Submitter:  Helmut Eller <ellerh>
Submitted:  Fri 17 Feb 2012 03:48:45 PM UTC
   
 
Category:  Code generation Severity:  3 - Normal
Item Group:  Compile-time exception Status:  Fixed
Privacy:  Public Assigned to:  bothner
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 23 Apr 2012 05:27:40 AM UTC, comment #1: 

Thanks!  I checked in a fix and the testcase.

Per Bothner <bothner>
Group administrator
Fri 17 Feb 2012 03:48:45 PM UTC, original submission:  

Compiling this code confuses the compiler:

(define (foo forms)
  (syntax-case forms ()
    (((x . y)  . rest)
     (foo #'rest))
    (_ #f)))



kawa --version -C x.scm
Kawa 1.12 (revision 7170M)
Copyright (C) 2011 Per Bothner
(compiling x.scm to x)
x.scm:3: internal error while compiling x.scm
java.lang.InternalError
        at gnu.bytecode.Label.setTypes(Label.java:101)
        at gnu.bytecode.Label.define(Label.java:220)
        at gnu.expr.BlockExp.compile(BlockExp.java:80)
        at gnu.expr.Expression.compileWithPosition(Expression.java:130)
        at gnu.expr.LetExp.compile(LetExp.java:195)
        at gnu.expr.Expression.compileWithPosition(Expression.java:130)
        at gnu.expr.LetExp.compile(LetExp.java:195)
        at gnu.expr.Expression.compileNotePosition(Expression.java:156)
        at gnu.expr.Expression.compileWithPosition(Expression.java:142)
        at gnu.expr.LambdaExp.compileBody(LambdaExp.java:1649)
        at gnu.expr.LambdaExp.compileAsMethod(LambdaExp.java:1625)
        at gnu.expr.LambdaExp.compileSetField(LambdaExp.java:675)
        at gnu.expr.SetExp.compile(SetExp.java:171)
        at gnu.expr.Expression.compileNotePosition(Expression.java:156)
        at gnu.expr.Expression.compileWithPosition(Expression.java:142)
        at gnu.expr.LambdaExp.compileBody(LambdaExp.java:1649)
        at gnu.expr.Compilation.generateBytecode(Compilation.java:2041)
        at gnu.expr.Compilation.process(Compilation.java:1919)
        at gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:305)
        at gnu.expr.ModuleInfo.loadByStages(ModuleInfo.java:290)
        at kawa.repl.compileFiles(repl.java:817)
        at kawa.repl.processArgs(repl.java:444)
        at kawa.repl.main(repl.java:863)



Helmut Eller <ellerh>

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by bothner (Posted a comment)
  • -email is unavailable- added by ellerh (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2012-04-23 bothner Open/ClosedOpen Closed
    2012-04-23 bothner CategoryNone Code generation
        Item GroupNone Compile-time exception
        StatusNone Fixed
        Assigned toNone bothner

    Back to the top

    Powered by Savane 3.13-4b48.
    Corresponding source code