Changeset 15117 in project for chicken


Ignore:
Timestamp:
06/30/09 10:18:43 (10 years ago)
Author:
felix winkelmann
Message:

added -no-compiler-syntax; compiler syntax used by optimizer respects standard-/extended-bindings decl

Location:
chicken/trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/batch-driver.scm

    r15061 r15117  
    5353  reorganize-recursive-bindings substitution-table simplify-named-call emit-unsafe-marker
    5454  perform-closure-conversion prepare-for-code-generation compiler-source-file create-foreign-stub expand-foreign-lambda*
    55   transform-direct-lambdas! source-filename standalone-executable
     55  transform-direct-lambdas! source-filename standalone-executable compiler-syntax-enabled
    5656  debugging-chicken bomb check-signature posq stringify symbolify build-lambda-list
    5757  string->c-identifier c-ify-string words check-and-open-input-file close-checked-input-file fold-inner constant?
     
    241241    (when (memq 'no-lambda-info options)
    242242      (set! emit-closure-info #f) )
     243    (when (memq 'no-compiler-syntax options)
     244      (set! compiler-syntax-enabled #f))
    243245    (when (memq 'local options)
    244246      (set! local-definitions #t))
     
    526528
    527529               (print-node "initial node tree" '|T| node0)
     530               (initialize-analysis-database)
    528531
    529532               (when do-scrutinize
  • chicken/trunk/c-platform.scm

    r15047 r15117  
    125125    emit-external-prototypes-first release local inline-global
    126126    analyze-only dynamic scrutinize no-argc-checks no-procedure-checks
    127     no-bound-checks no-procedure-checks-for-usual-bindings
     127    no-bound-checks no-procedure-checks-for-usual-bindings no-compiler-syntax
    128128    no-parentheses-synonyms no-symbol-escape r5rs-syntax) )
    129129
     
    179179    u8vector-set! s8vector-set! u16vector-set! s16vector-set! u32vector-set! s32vector-set!
    180180    locative-ref locative-set! locative->object locative? global-ref
    181     null-pointer? pointer->object flonum? finite?) )
     181    null-pointer? pointer->object flonum? finite?
     182    printf sprintf format) )
    182183
    183184(define internal-bindings
  • chicken/trunk/compiler.scm

    r15100 r15117  
    293293  pprint-expressions-to-file foreign-type-check estimate-foreign-result-size scan-used-variables scan-free-variables
    294294  topological-sort print-version print-usage initialize-analysis-database csc-control-file
    295   estimate-foreign-result-location-size inline-output-file
     295  estimate-foreign-result-location-size inline-output-file compiler-syntax-enabled
    296296  expand-foreign-callback-lambda default-optimization-passes default-optimization-passes-when-trying-harder
    297297  units-used-by-default words-per-flonum disable-stack-overflow-checking
     
    382382(define do-scrutinize #f)
    383383(define enable-inline-files #f)
     384(define compiler-syntax-enabled #t)
    384385
    385386
     
    550551             (let* ((name0 (lookup (car x) se))
    551552                    (name (or (and (symbol? name0) (##sys#get name0 '##core#primitive)) name0))
    552                     (xexpanded (##sys#expand x se #t)))
     553                    (xexpanded (##sys#expand x se compiler-syntax-enabled)))
    553554               (cond ((not (eq? x xexpanded))
    554555                      (walk xexpanded e se dest))
     
    641642                                     (list alias (walk (cadr b) e se (car b))) )
    642643                                   aliases bindings)
    643                              ,(walk (##sys#canonicalize-body (cddr x) se2 #t)
     644                             ,(walk (##sys#canonicalize-body (cddr x) se2 compiler-syntax-enabled)
    644645                                    (append aliases e)
    645646                                    se2 dest) ) ) )
     
    674675                              (let* ((aliases (map gensym vars))
    675676                                     (se2 (append (map cons vars aliases) se))
    676                                      (body0 (##sys#canonicalize-body obody se2 #t))
     677                                     (body0 (##sys#canonicalize-body obody se2 compiler-syntax-enabled))
    677678                                     (body (walk body0 (append aliases e) se2 #f))
    678679                                     (llist2
     
    718719                                     se) ) )
    719720                           (walk
    720                             (##sys#canonicalize-body (cddr x) se2 #t)
     721                            (##sys#canonicalize-body (cddr x) se2 compiler-syntax-enabled)
    721722                            e se2
    722723                            dest) ) )
     
    737738                           ms)
    738739                          (walk
    739                            (##sys#canonicalize-body (cddr x) se2 #t)
     740                           (##sys#canonicalize-body (cddr x) se2 compiler-syntax-enabled)
    740741                           e se2 dest)))
    741742                               
     
    803804                              (lambda ()
    804805                                (walk
    805                                  (##sys#canonicalize-body (cddr x) se #t)
     806                                 (##sys#canonicalize-body (cddr x) se compiler-syntax-enabled)
    806807                                 e se dest) )
    807808                              (lambda ()
     
    908909                               [body
    909910                                (walk
    910                                  (##sys#canonicalize-body obody se2 #t)
     911                                 (##sys#canonicalize-body obody se2 compiler-syntax-enabled)
    911912                                 (append aliases e)
    912913                                 se2 #f) ] )
     
    19131914                 (any (lambda (id2) (contains? id2 other-ids)) clist) ) ) ) )
    19141915
    1915     ;; Initialize database:
    1916     (initialize-analysis-database db)
    1917 
    19181916    ;; Walk toplevel expression-node:
    19191917    (debugging 'p "analysis traversal phase...")
  • chicken/trunk/csc.scm

    r14995 r15117  
    130130    -analyze-only -keep-shadowed-macros -inline-global -ignore-repository
    131131    -no-symbol-escape -no-parentheses-synonyms -r5rs-syntax
    132     -no-argc-checks -no-bound-checks -no-procedure-checks
     132    -no-argc-checks -no-bound-checks -no-procedure-checks -no-compiler-syntax
    133133    -no-procedure-checks-for-usual-bindings))
    134134
     
    315315    -j -emit-import-library MODULE write compile-time module information into
    316316                                    separate file
     317    -no-compiler-syntax            disable expansion of compiler-macros
    317318
    318319  Translation options:
  • chicken/trunk/expand.scm

    r15082 r15117  
    5656
    5757(begin
    58   (define-syntax dd (syntax-rules () ((_ . _) (void))))
     58  #;(define-syntax dd (syntax-rules () ((_ . _) (void))))
    5959  (define-syntax dm (syntax-rules () ((_ . _) (void))))
    60   (define-syntax dc (syntax-rules () ((_ . _) (void)))) )
     60  #;(define-syntax dc (syntax-rules () ((_ . _) (void)))) )
    6161
    6262
  • chicken/trunk/optimizer.scm

    r15085 r15117  
    18311831         (%begin (r 'begin))
    18321832         (%pair? (r 'pair?)))
    1833      (if (= 3 (length x))
     1833     (if (and (memq 'for-each standard-bindings) ; we have to check this because the db (and thus
     1834              (= 3 (length x)))                  ; intrinsic marks) isn't set up yet
    18341835         `(,%let ,%loop ((,%lst ,(caddr x)))
    18351836                 (,%if (,%pair? ,%lst)
     
    18911892   (lambda (return)
    18921893     (and (>= (length args) 1)
     1894          (memq func extended-bindings) ; s.a.
    18931895          (or (string? (car args))
    18941896              (and (list? (car args))
  • chicken/trunk/support.scm

    r14874 r15117  
    338338(define initialize-analysis-database
    339339  (let ((initial #t))
    340     (lambda (db)
     340    (lambda ()
    341341      (when initial
    342342        (for-each
    343          (lambda (s) 
     343         (lambda (s)
    344344           (mark-variable s '##compiler#intrinsic 'standard)
    345345           (when (memq s foldable-bindings)
     
    12701270    -emit-import-library MODULE  write compile-time module information into
    12711271                                  separate file
     1272    -no-compiler-syntax          disable expansion of compiler-macros
    12721273
    12731274  Translation options:
Note: See TracChangeset for help on using the changeset viewer.