Changeset 12227 in project for chicken/trunk


Ignore:
Timestamp:
10/21/08 20:42:22 (12 years ago)
Author:
felix winkelmann
Message:
  • added helpful script for testing in build dir
  • chicken-install checks for TCP timeouts and handles multiple default sources to download from
  • alias-global-hook is saved and restored when loading compiler extensions
  • making bootstrap automaticaly makes confclean
Location:
chicken/trunk
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/TODO

    r12217 r12227  
    4444
    4545* optimizations
     46** allocation-estimation in conditionals should take max of both branches, not sum
    4647** self-recursion optimization
    4748   what MacScheme called "benchmark-mode" (assume self-calls are recursion)
     
    4950** when inlining, consing arg-list with "list" may make get-keyword possible foldable
    5051** local flow analysis
    51 ** lambda-fusion
     52** lambda-fusion / "fuse-and-dispatch" (suggested by Alex)
     53   convert groups of local lambdas referenced to only in operator-position into
     54   looping lambda + dispatch (static variable can be used), otherwise similar to
     55   a conditional
     56*** new forms (after optimization, prepared language)
     57    [##core#dispatch LAMBDABODY1 ... BODY]
     58    [##core#call/dispatch {INDEX} ARGUMENT1 ...}
    5259** handle optional ags primitively
    5360   for example, set to distinguished val (checking argc) on C level, core
  • chicken/trunk/batch-driver.scm

    r12088 r12227  
    299299        (printf "Loading compiler extensions...~%~!")
    300300        (load-verbose #t) )
    301       (for-each (lambda (f) (load (##sys#resolve-include-filename f #f #t))) extends) )
     301      ;; rebind a-g-h to allow extensions in source files to use private-namespace.scm
     302      (fluid-let ((##sys#alias-global-hook ##sys#alias-global-hook))
     303        (for-each
     304         (lambda (f) (load (##sys#resolve-include-filename f #f #t)))
     305         extends) ) )
    302306    (set! ##sys#features (delete #:compiler-extension ##sys#features eq?))
    303307
  • chicken/trunk/chicken-install.scm

    r11989 r12227  
    5454         (else (foreign-value "C_INSTALL_BIN_HOME" c-string) ) )) )
    5555
    56   (define *default-transport* #f)
    57   (define *default-location* #f)
    5856  (define *keep* #f)
    5957  (define *force* #f)
     
    6664  (define *username* #f)
    6765  (define *password* #f)
     66  (define *default-sources* '())
     67  (define *default-location* #f)
     68  (define *default-transport* 'http)
    6869
    6970  (define (load-defaults)
    70     (let* ((deff (make-pathname (repository-path) "setup.defaults"))
    71            (def (cond ((file-exists? deff)
    72                        (with-input-from-file deff read))
    73                       (else '())))
    74            (loc (assq 'location def))
    75            (tr (assq 'transport def)))
    76       (when loc (set! *default-location* (cadr loc)))
    77       (when tr (set! *default-transport* (cadr tr)))
    78       (pair? def)))
     71    (let ((deff (make-pathname (repository-path) "setup.defaults")))
     72      (cond ((not (file-exists? deff)) '())
     73            (else
     74             (set! *default-sources* (read-file deff))
     75             (pair? *default-sources*)))))
    7976
    8077  (define (deps key meta)
     
    137134    (define *checked* '())
    138135
     136    (define (try name version)
     137      (let loop ((defs (if (and *default-location* *default-transport*)
     138                           `(((location ,*default-location*)
     139                              (transport ,*default-transport*)))
     140                           *default-sources*)))
     141        (and (pair? defs)
     142             (let* ((def (car defs))
     143                    (loc (cadr (or (assq 'location def)
     144                                   (error "missing location entry" def))))
     145                    (trans (cadr (or (assq 'transport def)
     146                                     (error "missing transport entry" def)))))
     147               (or (condition-case
     148                       (retrieve-extension
     149                        name trans loc
     150                        version: version
     151                        destination: (and *retrieve-only* (current-directory))
     152                        tests: *run-tests*
     153                        username: *username*
     154                        password: *password*)
     155                     ((exn net)
     156                      (print "TCP connect timeout")
     157                      #f)
     158                     (e () (abort e)))
     159                   (loop (cdr defs)))))))
     160
    139161    (define (retrieve eggs)
    140162      (print "retrieving ...")
     
    148170                (let* ((name (if (pair? egg) (car egg) egg))
    149171                       (version (and (pair? egg) (cdr egg)))
    150                        (dir (retrieve-extension
    151                              name *default-transport* *default-location*
    152                              version: version
    153                              destination: (and *retrieve-only* (current-directory))
    154                              tests: *run-tests*
    155                              username: *username*
    156                              password: *password*)))
     172                       (dir (try name version)))
    157173                  (unless dir
    158174                    (error "extension or version not found"))
     
    241257
    242258  (define (usage code)
    243     (print #<#EOF
     259    (print #<<EOF
    244260usage: chicken-install [OPTION | EXTENSION[:VERSION]] ...
    245261
     
    248264       -force                   don't ask, install even if versions don't match
    249265  -k   -keep                    keep temporary files
    250   -l   -location LOCATION       install from given location instead of default (#{*default-location*})
    251   -t   -transport TRANSPORT     use given transport instead of default (#{*default-transport*})
     266  -l   -location LOCATION       install from given location instead of default
     267  -t   -transport TRANSPORT     use given transport instead of default
    252268  -s   -sudo                    use sudo(1) for installing or removing files
    253269  -r   -retrieve                only retrieve egg into current directory, don't install
  • chicken/trunk/compiler.scm

    r12201 r12227  
    177177; [##core#call {<safe-flag> [<debug-info> [<call-id> <customizable-flag>]]} <exp-f> <exp>...]
    178178; [##core#callunit {<unitname>} <exp>...]
     179; [##core#cond <exp> <exp> <exp>]
    179180; [##core#local {<index>}]
    180181; [##core#setlocal {<index>} <exp>]
     
    25102511                   (else (make-node '##core#literal (list (literal c)) '())) ) ) )
    25112512
     2513          ;;*** conditionals (if + ##core#cond) are missing here: allocation
     2514          ;; calculation should use max of both branches, not sum.
     2515
    25122516          (else (make-node class params (mapwalk subs e here boxes)) ) ) ) )
    25132517   
  • chicken/trunk/manual/Unit tcp

    r5945 r12227  
    5252and {{tcp-write-timeout}}, respectively, to determine the maximal
    5353number of milliseconds to wait for input/output before a timeout
    54 error is signalled.
     54error is signalled by raising an exception of the kinds {{(exn i/o net)}}.
    5555
    5656Note: this operation and any I/O on the ports returned will not block
     
    9494{{tcp-write-timeout}}, respectively, to determine the maximal number
    9595of milliseconds to wait for input/output before a timeout error is
    96 signalled.
     96signalled by raising an exception of the kinds {{(exn i/o net)}}.
    9797
    9898If the {{TCPPORT}} is omitted, the port is parsed from the {{HOSTNAME}} string.  The format expected is {{HOSTNAME:PORT}}.  The {{PORT}} can either be a string representation of an integer or a service name which is translated to an integer using the POSIX function [[http://www.opengroup.org/onlinepubs/009695399/functions/getservbyname.html|{{getservbyname}}]].
  • chicken/trunk/rules.make

    r12117 r12227  
    13241324          $(MSVC_CHICKEN_EXPORT_FILES) chicken.info $(CLEAN_PCRE) $(CLEAN_MINGW_LIBS) \
    13251325          $(CLEAN_MANIFESTS)
     1326
    13261327confclean:
    13271328        -$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) chicken-config.h chicken-defaults.h buildsvnrevision
     
    13811382        cp chicken$(EXE) chicken-boot$(EXE)
    13821383        touch *.scm
     1384        $(MAKE) PLATFORM=$(PLATFORM) confclean
    13831385
    13841386$(SRCDIR)bootstrap.tar.gz: distfiles
  • chicken/trunk/setup-download.scm

    r11966 r12227  
    3838  (import extras regex posix utils setup-utils srfi-1 data-structures tcp
    3939          srfi-13 files)
     40
     41  (tcp-connect-timeout 10000)           ; 10 seconds
     42  (tcp-read-timeout 10000)
     43  (tcp-write-timeout 10000)
    4044
    4145  (define *quiet* #f)
     
    133137                     "")))
    134138           (eggdir (make-pathname tmpdir egg)))
    135       (create-directory eggdir)
     139      (unless (file-exists? eggdir)
     140        (create-directory eggdir))
    136141      (http-fetch host port loc eggdir)
    137142      eggdir))
Note: See TracChangeset for help on using the changeset viewer.