Changeset 15770 in project for chicken


Ignore:
Timestamp:
09/07/09 10:38:36 (10 years ago)
Author:
felix
Message:

added -emit-all-import-libraries

Location:
chicken/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/NEWS

    r15734 r15770  
    22
    33- 'create-directory' rewrite
     4
     5- added compiler option `-emit-all-import-libraries'
     6
    47
    584.1.8
  • chicken/trunk/batch-driver.scm

    r15543 r15770  
    185185                   (string-append il ".import.scm")))
    186186           (collect-options 'emit-import-library)))
     187    (when (and (memq 'emit-all-import-libraries options)
     188               (not a-only))
     189      (set! all-import-libraries #t))
    187190    (when (memq 'lambda-lift options) (set! do-lambda-lifting #t))
    188191    (when (memq 'scrutinize options) (set! do-scrutinize #t))
  • chicken/trunk/c-platform.scm

    r15543 r15770  
    9191    analyze-only dynamic scrutinize no-argc-checks no-procedure-checks
    9292    no-bound-checks no-procedure-checks-for-usual-bindings no-compiler-syntax
    93     no-parentheses-synonyms no-symbol-escape r5rs-syntax) )
     93    no-parentheses-synonyms no-symbol-escape r5rs-syntax emit-all-import-libraries) )
    9494
    9595(define valid-compiler-options-with-argument
  • chicken/trunk/compiler-namespace.scm

    r15543 r15770  
    2828 compiler
    2929 analyze-expression
     30 all-import-libraries
    3031 banner
    3132 basic-literal?
  • chicken/trunk/compiler.scm

    r15668 r15770  
    330330(define profiled-procedures #f)
    331331(define import-libraries '())
     332(define all-import-libraries #f)
    332333(define standalone-executable #t)
    333334(define local-definitions #f)
     
    483484        (##sys#current-meta-environment))
    484485       '() ) ))
     486
     487  (define (emit-import-lib name il)
     488    (let ((fname (if all-import-libraries
     489                     (string-append (symbol->string name) ".import.scm")
     490                     (cdr il))))
     491      (when verbose-mode
     492        (print "generating import library " fname " for module "
     493               name " ..."))
     494      (with-output-to-file fname
     495        (lambda ()
     496          (print ";;;; " fname " - GENERATED BY CHICKEN "
     497                 (chicken-version) " -*- Scheme -*-\n")
     498          (for-each
     499           pretty-print
     500           (##sys#compiled-module-registration
     501            (##sys#current-module)))
     502          (print "\n;; END OF FILE")))))
    485503
    486504  (define (walk x e se dest)
     
    799817                                                      (exit 1))
    800818                                                  (##sys#finalize-module (##sys#current-module)))
    801                                                 (cond ((assq name import-libraries) =>
     819                                                (cond ((or all-import-libraries
     820                                                           (assq name import-libraries) ) =>
    802821                                                       (lambda (il)
    803                                                          (when verbose-mode
    804                                                            (print "generating import library " (cdr il) " for module "
    805                                                                   name " ..."))
    806                                                          (with-output-to-file (cdr il)
    807                                                            (lambda ()
    808                                                              (print ";;;; " (cdr il) " - GENERATED BY CHICKEN "
    809                                                                     (chicken-version) " -*- Scheme -*-\n")
    810                                                              (for-each
    811                                                               pretty-print
    812                                                               (##sys#compiled-module-registration
    813                                                                (##sys#current-module)))
    814                                                              (print "\n;; END OF FILE")))
     822                                                         (emit-import-lib name il)
    815823                                                         (values
    816824                                                          (reverse xs)
  • chicken/trunk/csc.scm

    r15614 r15770  
    153153    (|-X| "-extend")
    154154    (|-N| "-no-usual-integrations")
     155    (|-J| "-emit-all-import-libraries")
    155156    (-x "-explicit-use")
    156157    (-u "-unsafe")
     
    315316    -j -emit-import-library MODULE write compile-time module information into
    316317                                    separate file
     318    -J -emit-all-import-libraries  emit import-libraries for all defined modules
    317319    -no-compiler-syntax            disable expansion of compiler-macros
    318320
  • chicken/trunk/manual/Acknowledgements

    r15562 r15770  
    2828Marti, Charles Martin, Bob McIsaac, Alain Mellan, Eric Merrit, Perry
    2929Metzger, Scott G. Miller, Mikael, Bruce Mitchener, Fadi Moukayed,
    30 Chris Moline, Eric E. Moore, Julian Morrison, Dan Muresan, Lars
    31 Nilsson, Ian Oversby, o.t., Gene Pavlovsky, Levi Pearson, Nicolas
    32 Pelletier, Carlos Pita, Robin Lee Powell, Pupeno, Davide Puricelli,
    33 presto, Doug Quale, Eric Raible, Ivan Raikov, Joel Reymont, Eric
    34 Rochester, Andreas Rottman, David Rush, Lars Rustemeier, Daniel
    35 Sadilek, Oskar Schirmer, Burton Samograd, Reed Sheridan, Ronald
     30Chris Moline, Eric E. Moore, Julian Morrison, Dan Muresan, David
     31N. Murray, Lars Nilsson, Ian Oversby, o.t., Gene Pavlovsky, Levi
     32Pearson, Nicolas Pelletier, Carlos Pita, Robin Lee Powell, Pupeno,
     33Davide Puricelli, presto, Doug Quale, Eric Raible, Ivan Raikov, Joel
     34Reymont, Eric Rochester, Andreas Rottman, David Rush, Lars Rustemeier,
     35Daniel Sadilek, Oskar Schirmer, Burton Samograd, Reed Sheridan, Ronald
    3636Schroeder, Spencer Schumann, Ivan Shcheklein, Alex Shinn, Ivan
    3737Shmakov, Shmul, Tony Sidaway, Jeffrey B. Siegal, Andrey Sidorenko,
  • chicken/trunk/manual/Using the compiler

    r15555 r15770  
    9595; -epilogue FILENAME : Includes the file named {{FILENAME}} at the end of the compiled source file. The include-path is not searched. This option may be given multiple times.
    9696
     97; -emit-all-import-libraries : emit import libraries for all modules defined in the current compulation unit (see also: {{-emit-import-library}}).
     98
    9799; -emit-external-prototypes-first : Emit prototypes for callbacks defined with {{define-external}} before any other foreign declarations. This is sometimes useful, when C/C++ code embedded into the a Scheme program has to access the callbacks. By default the prototypes are emitted after foreign declarations.
    98100
  • chicken/trunk/support.scm

    r15578 r15770  
    12111211    -emit-import-library MODULE  write compile-time module information into
    12121212                                  separate file
     1213    -emit-all-import-libraries   emit import-libraries for all defined modules
    12131214    -no-compiler-syntax          disable expansion of compiler-macros
    12141215
Note: See TracChangeset for help on using the changeset viewer.