Changeset 15773 in project


Ignore:
Timestamp:
09/07/09 15:16:08 (10 years ago)
Author:
felix winkelmann
Message:

units used by default have been reduced to library and eval (expand); added -setup-mode option to compiler and interpreter

Location:
chicken/trunk
Files:
16 edited

Legend:

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

    r15770 r15773  
    217217    (when (and dynamic (memq 'unsafe-libraries options))
    218218      (set! emit-unsafe-marker #t) )
     219    (when (memq 'setup-mode options)
     220      (set! ##sys#setup-mode #t))
    219221    (when (memq 'disable-interrupts options) (set! insert-timer-checks #f))
    220222    (when (memq 'fixnum-arithmetic options) (set! number-type 'fixnum))
  • chicken/trunk/benchmarks/fib.scm

    r8361 r15773  
    66      (+ (fib (- n 1)) (fib (- n 2))) ) )
    77
    8 (time (pp (fib 30)))
     8(time (print (fib 30)))
  • chicken/trunk/c-platform.scm

    r15770 r15773  
    6464       ##sys#profile-entry ##sys#profile-exit) ) ) )
    6565
    66 (define units-used-by-default '(library eval data-structures ports extras srfi-69))
     66(define units-used-by-default '(library eval))
    6767(define words-per-flonum 4)
    6868(define parameter-limit 1024)
     
    8080
    8181(define valid-compiler-options
    82   '(-help h help version verbose explicit-use
    83           quiet                         ; DEPRECATED
    84           no-trace no-warnings unsafe block
     82  '(-help
     83    h help version verbose explicit-use
     84    quiet                               ; DEPRECATED
     85    no-trace no-warnings unsafe block
    8586    check-syntax to-stdout no-usual-integrations case-insensitive no-lambda-info
    8687    profile inline keep-shadowed-macros ignore-repository
     
    9192    analyze-only dynamic scrutinize no-argc-checks no-procedure-checks
    9293    no-bound-checks no-procedure-checks-for-usual-bindings no-compiler-syntax
    93     no-parentheses-synonyms no-symbol-escape r5rs-syntax emit-all-import-libraries) )
     94    no-parentheses-synonyms no-symbol-escape r5rs-syntax emit-all-import-libraries
     95    setup-mode) )
    9496
    9597(define valid-compiler-options-with-argument
    96   '(debug output-file include-path heap-size stack-size unit uses keyword-style require-extension
    97           inline-limit profile-name disable-warning parenthesis-synonyms
     98  '(debug
     99    output-file include-path heap-size stack-size unit uses keyword-style require-extension
     100    inline-limit profile-name disable-warning parenthesis-synonyms
    98101    prelude postlude prologue epilogue nursery extend feature types
    99102    emit-import-library emit-inline-file static-extension consult-inline-file
  • chicken/trunk/chicken-install.scm

    r15660 r15773  
    289289    (conc
    290290     *csi*
    291      " -bnq -e \"(require-library setup-api)\" -e \"(import setup-api)\""
     291     " -bnq -setup-mode -e \"(require-library setup-api)\" -e \"(import setup-api)\""
    292292     (sprintf " -e \"(extension-name-and-version '(\\\"~a\\\" \\\"~a\\\"))\"" (car e+d+v) (caddr e+d+v))
    293293     (if (sudo-install) " -e \"(sudo-install #t)\"" "")
  • chicken/trunk/chicken.scm

    r15580 r15773  
    2727
    2828(declare
    29   (uses chicken-syntax srfi-1 srfi-4 utils files support
     29  (uses chicken-syntax srfi-1 srfi-4 utils files extras data-structures support
    3030        compiler optimizer compiler-syntax scrutinizer driver platform backend
    3131        srfi-69)
  • chicken/trunk/csc.scm

    r15772 r15773  
    1 ;;;; csc.scm - Driver program for the CHICKEN compiler - felix -*- Scheme -*-
     1+;;;; csc.scm - Driver program for the CHICKEN compiler - felix -*- Scheme -*-
    22;
    33; Copyright (c) 2000-2007, Felix L. Winkelmann
     
    131131    -no-symbol-escape -no-parentheses-synonyms -r5rs-syntax
    132132    -no-argc-checks -no-bound-checks -no-procedure-checks -no-compiler-syntax
    133     -emit-all-import-libraries
     133    -emit-all-import-libraries -setup-mode
    134134    -no-procedure-checks-for-usual-bindings))
    135135
  • chicken/trunk/csi.scm

    r15700 r15773  
    2727
    2828(declare
    29   (uses chicken-syntax srfi-69 ports) ;XXX is here because a bootstrap from an older chicken may not make
    30   (usual-integrations)                ;    this used automatically
     29  (uses chicken-syntax srfi-69 ports extras)
     30  (usual-integrations)
    3131  (disable-interrupts)
    3232  (disable-warning var)
     
    109109        -sx PATHNAME              same as `-s', but print each expression
    110110                                   as it is evaluated
     111        -setup-mode               prefer the current directory when locating extensions
    111112    -R  -require-extension NAME   require extension and import before
    112113                                   executing code
     
    836837  '("-ss" "-sx" "-script" "-version" "-help" "--help" "-feature" "-eval"
    837838    "-case-insensitive" "-keyword-style" "-no-parentheses-synonyms" "-no-symbol-escape"
    838     "-r5rs-syntax"
     839    "-r5rs-syntax" "-setup-mode"
    839840    "-require-extension" "-batch" "-quiet" "-no-warnings" "-no-init"
    840841    "-include-path" "-release" "-print" "-pretty-print" "--") )
     
    865866(define-constant simple-options
    866867  '("--" "-b" "-batch" "-q" "-quiet" "-n" "-no-init" "-w" "-no-warnings" "-i" "-case-insensitive"
    867     "-no-parentheses-synonyms" "-no-symbol-escape" "-r5rs-syntax"
     868    "-no-parentheses-synonyms" "-no-symbol-escape" "-r5rs-syntax" "-setup-mode"
    868869    ; Not "simple" but processed early
    869870    "-ss" "-sx" "-s" "-script") )
     
    927928        (print-banner)
    928929        (exit 0) )
     930      (when (member "-setup-mode" args)
     931        (set! ##sys#setup-mode #t))
    929932      (when (member "-release" args)
    930933        (print (chicken-version))
     
    976979             (repl)
    977980             (##sys#write-char-0 #\newline ##sys#standard-output) ) )
    978         (let* ([arg (car args)]
    979                #;[len (string-length arg)] )
     981        (let* ((arg (car args)))
    980982          (cond ((member arg simple-options) )
    981983                ((member arg complex-options)
  • chicken/trunk/eval.scm

    r15700 r15773  
    11161116(define repository-path ##sys#repository-path)
    11171117
     1118(define ##sys#setup-mode #f)
     1119
    11181120(define ##sys#find-extension
    11191121  (let ((file-exists? file-exists?)
     
    11301132                 p0) ) )
    11311133          (let loop ((paths (##sys#append
     1134                             (if ##sys#setup-mode '(".") '())
    11321135                             (if rp (list rp) '())
    11331136                             (if inc? ##sys#include-pathnames '())
    1134                              '("."))) )
     1137                             (if ##sys#setup-mode '() '("."))) ))
    11351138            (and (pair? paths)
    11361139                 (let ((pa (##sys#slot paths 0)))
     
    12191222      (define (add-req id syntax?)
    12201223        (when comp?
    1221           (##sys#hash-table-update! ; assumes compiler has extras available - will break in the interpreter
     1224          (##sys#hash-table-update!
    12221225           ##compiler#file-requirements
    12231226           (if syntax? 'dynamic/syntax 'dynamic)
    1224            (cut lset-adjoin eq? <> id) 
     1227           (cut lset-adjoin eq? <> id)  ;XXX assumes compiler has srfi-1 loaded
    12251228           (lambda () (list id)))))
    12261229      (define (impform x id builtin?)
  • chicken/trunk/manual/Unit data-structures

    r15527 r15773  
    55
    66This unit contains a collection of procedures related to data
    7 structures.  This unit is used by default, unless the program is
    8 compiled with the {{-explicit-use}} option.
     7structures.
    98
    109
  • chicken/trunk/manual/Using the compiler

    r15770 r15773  
    189189; -require-extension NAME : Loads the extension {{NAME}} before the compilation process commences. This is identical to adding {{(require-extension NAME)}} at the start of the compiled program. If {{-uses NAME}} is also given on the command line, then any occurrences of {{-require-extension NAME}} are replaced with {{(declare (uses NAME))}}. Multiple names may be given and should be separated by {{,}}.
    190190
     191; -setup-mode : When locating extension, search the current directory first. By default, extensions are located first in the ''extension repository'', where {{chicken-install}} stores compiled extensions and their associated metadata.
     192
    191193; -scrutinize : Enable simple flow-analysis to catch common type errors and argument/result mismatches. You can also use the {{scrutinize}} declaration to enable scrutiny.
    192194
  • chicken/trunk/manual/Using the interpreter

    r15082 r15773  
    5757
    5858; -ss PATHNAME : The same as {{-s PATHNAME}} but invokes the procedure {{main}} with the value of {{(command-line-arguments)}} as its single argument. If the main procedure returns an integer result, then the interpreter is terminated, returning the integer as the status code back to the invoking process. Any other result terminates the interpreter with a zero exit status.
     59
     60; -setup-mode : When locating extension, search the current directory first. By default, extensions are located first in the ''extension repository'', where {{chicken-install}} stores compiled extensions and their associated metadata.
    5961
    6062; -R  -require-extension NAME : Equivalent to evaluating {{(require-extension NAME)}}.
  • chicken/trunk/setup-api.scm

    r15761 r15773  
    226226                   *chicken-bin-path*
    227227                   (cdr (assoc prg *installed-executables*))))
    228                  "-feature" "compiling-extension"
     228                 "-feature" "compiling-extension" "-setup-mode"
    229229                 (if (keep-intermediates) "-k" "")
    230230                 (if (host-extension) "-host" "")
  • chicken/trunk/support.scm

    r15770 r15773  
    12941294                                  declarations
    12951295    -ignore-repository           do not refer to repository for extensions
     1296    -setup-mode                  prefer the current directory when locating extensions
    12961297
    12971298EOF
  • chicken/trunk/tests/embedded2.scm

    r7172 r15773  
     1(use extras)
     2
    13#>
    24#include <assert.h>
  • chicken/trunk/tests/runtests.sh

    r15703 r15773  
    157157
    158158echo "======================================== r4rstest ..."
     159echo "(expect mult-float-print-test to fail)"
    159160$interpret -e '(set! ##sys#procedure->string (constantly "#<procedure>"))' \
    160161  -i -s r4rstest.scm >r4rstest.log
  • chicken/trunk/tests/syntax-tests.scm

    r15057 r15773  
    11;;;; mtest.scm - various macro tests
     2
     3
     4(use extras)
    25
    36
Note: See TracChangeset for help on using the changeset viewer.