Changeset 12114 in project


Ignore:
Timestamp:
10/06/08 22:53:40 (12 years ago)
Author:
felix winkelmann
Message:

fixed lambda-lifting (actually analyzer) bug reported by Joerg Wittenberger

Location:
chicken/trunk
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/compiler.scm

    r12104 r12114  
    9191; ([##core#]lambda <variable> <body>)
    9292; ([##core#]lambda ({<variable>}+ [. <variable>]) <body>)
    93 ; (set! <variable> <exp>)
    94 ; (##core#set! <variable> <exp>)
     93; ([##core#]set! <variable> <exp>)
    9594; (##core#named-lambda <name> <llist> <body>)
    9695; (##core#loop-lambda <llist> <body>)
     
    16701669               (grow 1)
    16711670               (cond ((memq var env) (put! db var 'captured #t))
    1672                      ((not (get db var 'global)) (put! db var 'global #t) ) ) ) ) )
     1671                     ((not (get db var 'global))
     1672                      (put! db var 'global #t) ) ) ) ) )
    16731673         
    16741674          ((##core#global-ref)
     
    17001700             (walkeach (cdr subs) env localenv here #f) ) )
    17011701
    1702           ((let)
     1702          ((let ##core#let)
    17031703           (let ([env2 (append params localenv env)])
    17041704             (let loop ([vars params] [vals subs])
     
    17121712                     (loop (cdr vars) (cdr vals)) ) ) ) ) )
    17131713
    1714           #;((lambda)                   ;*** will this actually be ever used? aren't all lambdas now ##core#lambdas?
     1714          ((lambda)
    17151715           (grow 1)
    17161716           (decompose-lambda-list
     
    17551755                  (set-car! (cdddr (node-parameters n)) (- current-program-size size0)) ) ) ) ) )
    17561756         
    1757           ((set!)
     1757          ((set! ##core#set!)
    17581758           (let* ([var (first params)]
    17591759                  [val (car subs)] )
  • chicken/trunk/tests/compiler-tests.scm

    r12104 r12114  
    1010
    1111
    12 ;;; rev. 12103 (reported by Joerg Wittenberger)
     12;;; rev. 12104 (reported by Joerg Wittenberger)
    1313;
    1414; - canonicalization of assignment to location didn't walk expansion recursively
  • chicken/trunk/tests/runtests.sh

    r12102 r12114  
    1212echo "======================================== compiler tests ..."
    1313$compile compiler-tests.scm && ./a.out
     14
     15echo "======================================== compiler tests (2) ..."
     16$compile compiler-tests.scm -lambda-lift && ./a.out
    1417
    1518echo "======================================== runtime tests ..."
Note: See TracChangeset for help on using the changeset viewer.