Changeset 14870 in project for chicken


Ignore:
Timestamp:
06/03/09 08:53:07 (10 years ago)
Author:
felix winkelmann
Message:
  • added new options to option table in c-platform.scm
  • started with rewrite pass (not implemented yet)
  • removed "compiler" import library
  • added `-consult-inline-file FILENAME'
  • slight scrutiny improvement (real-name for let bindings)
Location:
chicken/trunk
Files:
2 deleted
9 edited

Legend:

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

    r14864 r14870  
    542542                   (set! db (analyze 'lift node0))
    543543                   (print-db "analysis" '|0| db 0)
    544                    (end-time "pre-analysis"))
     544                   (end-time "pre-analysis (lambda-lift)"))
    545545                 (begin-time)
    546546                 (perform-lambda-lifting! node0 db)
    547547                 (end-time "lambda lifting")
    548548                 (print-node "lambda lifted" '|L| node0)
     549                 (set! first-analysis #t) )
     550
     551               (when (memq 'rewrite options)
     552                 (begin-time)
     553                 (set! first-analysis #f)
     554                 (set! db (analyze 'rewrite node0))
     555                 (print-db "analysis" '|0| db 0)
     556                 (end-time "pre-analysis (rewrite)")
     557                 (begin-time)
     558                 (apply-rewrite-rules! node0 db)
     559                 (end-time "applying rewrite rules")
     560                 (print-node "applied rewrite rules" '|R| node0)
    549561                 (set! first-analysis #t) )
    550562
     
    561573                        (dribble "Loading inline file ~a ..." ifile)
    562574                        (load-inline-file ifile)))
    563                     (concatenate (map cdr req)))))
     575                    (concatenate (map cdr req))) )
     576                 (for-each
     577                  (lambda (ilf)
     578                    (dribble "Loading inline file ~a ..." ilf)
     579                    (load-inline-file ilf) )
     580                  (collect-options 'consult-inline-file)))
    564581
    565582               (set! ##sys#line-number-database #f)
  • chicken/trunk/c-platform.scm

    r14828 r14870  
    116116  '(-help h help version verbose explicit-use
    117117          quiet                         ; DEPRECATED
    118           no-trace no-warnings unsafe block
     118          no-trace no-warnings unsafe block
     119          rewrite
    119120    check-syntax to-stdout no-usual-integrations case-insensitive no-lambda-info
    120121    profile inline keep-shadowed-macros ignore-repository
     
    123124    disable-stack-overflow-checks disable-c-syntax-checks unsafe-libraries raw
    124125    emit-external-prototypes-first release local inline-global
    125     analyze-only dynamic scrutinize
     126    analyze-only dynamic scrutinize no-argc-checks no-procedure-checks
     127    no-bound-checks no-procedure-checks-for-usual-bindings
    126128    no-parentheses-synonyms no-symbol-escape r5rs-syntax) )
    127129
     
    130132          inline-limit profile-name disable-warning parenthesis-synonyms
    131133    prelude postlude prologue epilogue nursery extend feature types
    132     emit-import-library emit-inline-file static-extension
     134    emit-import-library emit-inline-file static-extension consult-inline-file
    133135    heap-growth heap-shrinkage heap-initial-size ffi-define ffi-include-path) )
    134136
  • chicken/trunk/chicken-install.scm

    r14779 r14870  
    498498
    499499  (register-feature! 'chicken-install)
    500   (define ##compiler#compiler-macro-environment '()) ; only to make `compiler' import work
    501500
    502501  (handle-exceptions ex
  • chicken/trunk/compiler.scm

    r14828 r14870  
    144144; (define-compiled-syntax (<symbol> . <llist>) <expr> ...)
    145145; (##core#module <symbol> #t | (<name> | (<name> ...) ...) <body>)
    146 ; (##core#define-rewrite-rule <symbol> <expr>)
    147146
    148147; - Core language:
     
    296295  membership-test-operators membership-unfold-limit valid-compiler-options valid-compiler-options-with-argument
    297296  make-random-name final-foreign-type real-name-table real-name set-real-name! safe-globals-flag
    298   location-pointer-map literal-rewrite-hook inline-globally enable-inline-files
     297  location-pointer-map inline-globally enable-inline-files
    299298  local-definitions export-variable variable-mark intrinsic? do-scrutinize
    300299  undefine-shadowed-macros process-lambda-documentation emit-syntax-trace-info
     
    425424(define file-requirements #f)
    426425(define postponed-initforms '())
    427 (define literal-rewrite-hook #f)
    428426
    429427
     
    787785                              ,body)) ;*** possibly wrong se?
    788786                           e se dest)))
    789 
    790                        ((##core#define-rewrite-rule)
    791                         (let ((name (##sys#strip-syntax (cadr x) se #t))
    792                               (re (caddr x)))
    793                           (##sys#put! name '##compiler#intrinsic 'rewrite)
    794                           (rewrite
    795                            name 8
    796                            (eval/meta re))
    797                           '(##core#undefined)))
    798787
    799788                       ((##core#module)
  • chicken/trunk/csc.scm

    r14864 r14870  
    137137    -optimize-level -include-path -database-size -extend -prelude -postlude -prologue -epilogue
    138138    -inline-limit -profile-name -disable-warning -emit-inline-file -types
    139     -feature -debug-level -heap-growth -heap-shrinkage -heap-initial-size
     139    -feature -debug-level -heap-growth -heap-shrinkage -heap-initial-size -consult-inline-file
    140140    -emit-import-library -static-extension))
    141141
     
    361361    -n -emit-inline-file FILENAME  generate file with globally inlinable
    362362                                    procedures (implies -inline -local)
     363    -consult-inline-file FILENAME  explicitly load inline file
    363364    -no-argc-checks                disable argument count checks
    364365    -no-bound-checks               disable bound variable checks
  • chicken/trunk/manual/Using the compiler

    r14828 r14870  
    3434
    3535; -check-syntax : Aborts compilation process after macro-expansion and syntax checks.
     36
     37; -consult-inline-file FILENAME : load file with definitions for cross-module inlining generated by a previous compiloer invocation via {{-emit-inline-file}}.
    3638
    3739; -debug MODES : Enables one or more compiler debugging modes. {{MODES}} is a string of characters that select debugging information about the compiler that will be printed to standard output.
  • chicken/trunk/rules.make

    r14859 r14870  
    532532          $(HOST_C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(HOST_C_COMPILER_OUTPUT)
    533533foreign.import$(O): foreign.import.c chicken.h $(CHICKEN_CONFIG_H)
    534         $(HOST_C_COMPILER) $(HOST_C_COMPILER_OPTIONS) $(HOST_C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) -DC_SHARED \
    535           $(HOST_C_COMPILER_COMPILE_OPTION) $(HOST_C_COMPILER_OPTIMIZATION_OPTIONS) $(HOST_C_COMPILER_SHARED_OPTIONS) \
    536           $(HOST_C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(HOST_C_COMPILER_OUTPUT)
    537 compiler.import$(O): compiler.import.c chicken.h $(CHICKEN_CONFIG_H)
    538534        $(HOST_C_COMPILER) $(HOST_C_COMPILER_OPTIONS) $(HOST_C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) -DC_SHARED \
    539535          $(HOST_C_COMPILER_COMPILE_OPTION) $(HOST_C_COMPILER_OPTIMIZATION_OPTIONS) $(HOST_C_COMPILER_SHARED_OPTIONS) \
     
    895891        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/tcp.import.so
    896892        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/foreign.import.so
    897         $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/compiler.import.so
    898893        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/scheme.import.so
    899894        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/csi.import.so
     
    957952        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) tcp.import.scm $(DESTDIR)$(IEGGDIR)
    958953        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) foreign.import.scm $(DESTDIR)$(IEGGDIR)
    959         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) compiler.import.scm $(DESTDIR)$(IEGGDIR)
    960954        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) srfi-18.import.scm $(DESTDIR)$(IEGGDIR)
    961955        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) utils.import.scm $(DESTDIR)$(IEGGDIR)
     
    982976        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) tcp.import.so $(DESTDIR)$(IEGGDIR)
    983977        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) foreign.import.so $(DESTDIR)$(IEGGDIR)
    984         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) compiler.import.so $(DESTDIR)$(IEGGDIR)
    985978        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) srfi-18.import.so $(DESTDIR)$(IEGGDIR)
    986979        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) utils.import.so $(DESTDIR)$(IEGGDIR)
     
    11511144foreign.import.c: $(SRCDIR)foreign.import.scm
    11521145        $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
    1153 compiler.import.c: $(SRCDIR)compiler.import.scm
    1154         $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
    11551146scheme.import.c: $(SRCDIR)scheme.import.scm
    11561147        $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
  • chicken/trunk/scrutinizer.scm

    r14860 r14870  
    577577                      (walk (car body) (append e2 e) loc dest)
    578578                      (let ((t (single
    579                                 (sprintf "in `let' binding of `~a'" (car vars))
     579                                (sprintf "in `let' binding of `~a'" (real-name (car vars)))
    580580                                (walk (car body) e loc (car vars)) loc)))
    581581                        (loop (cdr vars) (cdr body) (alist-cons (car vars) t e2))))))
  • chicken/trunk/support.scm

    r14864 r14870  
    3232  compiler-arguments process-command-line dump-nodes dump-undefined-globals
    3333  default-standard-bindings default-extended-bindings
    34   foldable-bindings compiler-macro-environment dump-defined-globals
     34  foldable-bindings dump-defined-globals
    3535  installation-home optimization-iterations compiler-cleanup-hook decompose-lambda-list
    3636  file-io-only banner disabled-warnings internal-bindings
     
    13171317    -emit-inline-file FILENAME   generate file with globally inlinable
    13181318                                  procedures (implies -inline -local)
     1319    -consult-inline-file FILENAME  explicitly load inline file
    13191320    -no-argc-checks              disable argument count checks
    13201321    -no-bound-checks             disable bound variable checks
     
    15221523
    15231524
    1524 ;;; compiler-specific syntax
    1525 
    1526 (define compiler-macro-environment
    1527   (let ((me0 (##sys#macro-environment)))
    1528     (##sys#extend-macro-environment
    1529      'define-rewrite-rule
    1530      '()
    1531      (##sys#er-transformer
    1532       (lambda (form r c)
    1533         (##sys#check-syntax 'define-rewrite-rule form '(_ (symbol . _) . #(_ 1)))
    1534         `(##core#define-rewrite-rule
    1535           ,(caadr form) (,(r 'lambda) ,(cdadr form) ,@(cddr form))))))
    1536     (##sys#macro-subset me0)))
    1537 
    1538 
    1539 ;;; not qualified, for use in `define-rewrite-rule'
    1540 
    1541 (define cdb-get get)
    1542 (define cdb-put! put!)
    1543 
    1544 
    15451525;;; Load support files
    15461526
Note: See TracChangeset for help on using the changeset viewer.