Changeset 12104 in project


Ignore:
Timestamp:
10/02/08 20:08:20 (12 years ago)
Author:
felix winkelmann
Message:

fixed let-location expansion bug reported by Joerg Wittenberger

Location:
chicken/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/TODO

    r12101 r12104  
    11TODO for trunk                                          -*- Outline -*-
    22
    3 * macros
     3* expander
    44** at some stage disable debug-output in expand.scm
    55
    66* bugs
    77** compiler
    8 *** declarations that refer to identifiers may only be partially stripped
    9     strip-syntax only declaration-specifier, not arguments
     8*** lambda-lifting breaks in ##sys#read (r-spaces), reported by Joerg Wittenberger
     9    in rev. 12103
    1010*** pre-optimization
    1111**** changes call-sites and makes them invalid for later pre-optimization
    12 ** macros
     12** scheduler
     13*** apply srfi
     14** expander
    1315*** expansion of r5rs_pitfall 4.2 incorrect
    1416    possibly due to a non-aliased implicit "begin" somewhere
     
    4042*** emit <sourcefile>.inline file with "-inline-global" (?)
    4143*** "-inline-global" slurps *.inline files include-path (?)
     44*** would inline in other compilation units, but not in current (sort of confusing)
    4245** remove "custom-declare" + stuff?
    4346
     
    6770* documentation
    6871** document ("HI/LO") expander (-> wiki, internals)
     72   will we ever have the time for that?
    6973** document new .meta entries
    7074   depends, test-depends
     
    7276* build
    7377** chicken.texi needs to be regenerated
     78** rules.make should really be generated by a script
    7479
    7580* syntax-error
  • chicken/trunk/compiler.scm

    r12102 r12104  
    890890                                        (let ([type (second fv)]
    891891                                              [tmp (gensym)] )
    892                                           `(let ([,tmp ,(foreign-type-convert-argument val type)])
    893                                              (##core#inline_update
    894                                               (,(third fv) ,type)
    895                                               ,(foreign-type-check tmp type) ) ) ) ) )
     892                                          (walk
     893                                           `(let ([,tmp ,(foreign-type-convert-argument val type)])
     894                                              (##core#inline_update
     895                                               (,(third fv) ,type)
     896                                               ,(foreign-type-check tmp type) ) )
     897                                           se #f))))
    896898                                 ((assq var location-pointer-map)
    897899                                  => (lambda (a)
    898900                                       (let* ([type (third a)]
    899901                                              [tmp (gensym)] )
    900                                          `(let ([,tmp ,(foreign-type-convert-argument val type)])
    901                                             (##core#inline_loc_update
    902                                              (,type)
    903                                              ,(second a)
    904                                              ,(foreign-type-check tmp type) ) ) ) ) )
     902                                         (walk
     903                                          `(let ([,tmp ,(foreign-type-convert-argument val type)])
     904                                             (##core#inline_loc_update
     905                                              (,type)
     906                                              ,(second a)
     907                                              ,(foreign-type-check tmp type) ) )
     908                                          se #f))))
    905909                                 (else `(set! ,var ,val)))))
    906910
     
    13231327       ((not)
    13241328        (check-decl spec 1)
    1325         (case (strip (second spec))
     1329        (case (##sys#strip-syntax (second spec)) ; strip all
    13261330          [(standard-bindings)
    13271331           (if (null? (cddr spec))
     
    13561360               [(safe) (set! unsafe #t)]
    13571361               [else (compiler-warning 'syntax "illegal declaration specifier `~s'" id)]))]))
    1358        ((compile-syntax)
     1362       ((compile-syntax
     1363         run-time-macros)               ; DEPRECATED
    13591364        (set! ##sys#enable-runtime-macros #t))
    13601365       ((block-global hide)
  • chicken/trunk/tests/compiler-tests.scm

    r12102 r12104  
    88
    99(assert (not (##sys#symbol-has-toplevel-binding? 'foo#bar)))
     10
     11
     12;;; rev. 12103 (reported by Joerg Wittenberger)
     13;
     14; - canonicalization of assignment to location didn't walk expansion recursively
     15
     16(define test-location
     17 (let-location
     18  ((again bool #f))
     19  (lambda ()
     20     ((foreign-lambda*
     21       int
     22       (((c-pointer bool) again))
     23       "*again=1; return(1);")
     24      (location again))
     25     again)))
     26
     27(print (test-location))
Note: See TracChangeset for help on using the changeset viewer.