Changeset 14828 in project for chicken


Ignore:
Timestamp:
05/29/09 14:44:07 (10 years ago)
Author:
felix winkelmann
Message:

merged scrutiny branch

Location:
chicken/trunk
Files:
4 added
24 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/Makefile

    r12937 r14828  
    8181bench:
    8282        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) bench
     83scrutiny:
     84        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) scrutiny
    8385endif
  • chicken/trunk/README

    r14706 r14828  
    44  (c) 2008-2009, The Chicken Team
    55
    6   version 4.0.5
     6  version 4.0.6
    77
    88
  • chicken/trunk/TODO

    r14705 r14828  
    124124*** document qs, normalize-pathname
    125125
     126** scrutiny
     127*** allow giving toplevel procedure names to `scrutinize' option?
     128*** write test file to trigger every type of warning (diff with result file in test-suite)
     129
    126130
    127131* wiki
  • chicken/trunk/batch-driver.scm

    r14779 r14828  
    6464  default-declarations units-used-by-default words-per-flonum default-debugging-declarations
    6565  default-profiling-declarations default-optimization-passes
    66   file-requirements import-libraries inline-globally enable-inline-files
     66  file-requirements import-libraries inline-globally scrutinize do-scrutinize enable-inline-files
    6767  foreign-string-result-reserve parameter-limit eq-inline-operator optimizable-rest-argument-operators
    6868  membership-test-operators membership-unfold-limit valid-compiler-options valid-compiler-options-with-argument
     
    7070  generate-code make-variable-list make-argument-list generate-foreign-stubs foreign-type-declaration
    7171  do-lambda-lifting compiler-warning emit-global-inline-file load-inline-file
    72   foreign-argument-conversion foreign-result-conversion)
     72  foreign-argument-conversion foreign-result-conversion
     73  load-identifier-database load-type-database)
    7374
    7475
     
    8283(define user-preprocessor-pass (make-parameter #f))
    8384(define user-pass (make-parameter #f))
    84 (define user-pass-2 (make-parameter #f))
    8585(define user-post-analysis-pass (make-parameter #f))
    8686
     
    229229           (collect-options 'emit-import-library)))
    230230    (when (memq 'lambda-lift options) (set! do-lambda-lifting #t))
     231    (when (memq 'scrutinize options) (set! do-scrutinize #t))
    231232    (when (memq 't debugging-chicken) (##sys#start-timer))
    232233    (when (memq 'b debugging-chicken) (set! time-breakdown #t))
     
    378379
    379380    ;;*** hardcoded "modules.db" is bad (also used in chicken-install.scm)
    380     (and-let* ((rp (repository-path))
    381                (dbfile (file-exists? (make-pathname rp "modules.db"))))
    382       (dribble "loading database ~a ..." dbfile)
    383       (for-each
    384        (lambda (e)
    385          (##sys#put!
    386           (car e) '##core#db
    387           (append (or (##sys#get (car e) '##core#db) '()) (list (cdr e))) ))
    388        (read-file dbfile)))
     381    (load-identifier-database "modules.db")
    389382
    390383    (cond ((memq 'version options)
     
    502495                 (end-time "user pass") ) )
    503496
    504              (let* ([node0 (make-node
    505                             'lambda '(())
    506                             (list (build-node-graph
    507                                    (canonicalize-begin-body exps) ) ) ) ]
    508                     [proc (user-pass-2)] )
    509                (when proc
    510                  (dribble "Secondary user pass...")
     497             (let ((node0 (make-node
     498                           'lambda '(())
     499                           (list (build-node-graph
     500                                  (canonicalize-begin-body exps) ) ) ) )
     501                   (db #f))
     502
     503               (when do-scrutinize
     504                 ;;;*** hardcoded database file name
     505                 (unless (memq 'ignore-repository options)
     506                   (load-type-database "types.db"))
     507                 (for-each (cut load-type-database <> #f) (collect-options 'types))
    511508                 (begin-time)
    512509                 (set! first-analysis #f)
    513                  (let ([db (analyze 'user node0)])
    514                    (print-db "analysis (u)" '|0| db 0)
    515                    (end-time "pre-analysis (u)")
    516                    (begin-time)
    517                    (proc node0)
    518                    (end-time "secondary user pass")
    519                    (print-node "secondary user pass" '|U| node0) )
     510                 (set! db (analyze 'scrutiny node0))
     511                 (print-db "analysis" '|0| db 0)
     512                 (end-time "pre-analysis")
     513                 (begin-time)
     514                 (debugging 'p "performing scrutiny")
     515                 (scrutinize node0 db)
     516                 (end-time "scrutiny")
    520517                 (set! first-analysis #t) )
    521518
    522519               (when do-lambda-lifting
    523520                 (begin-time)
    524                  (set! first-analysis #f)
    525                  (let ([db (analyze 'lift node0)])
     521                 (unless do-scrutinize  ; no need to do analysis if already done above
     522                   (set! first-analysis #f)
     523                   (set! db (analyze 'lift node0))
    526524                   (print-db "analysis" '|0| db 0)
    527                    (end-time "pre-analysis")
    528                    (begin-time)
    529                    (perform-lambda-lifting! node0 db)
    530                    (end-time "lambda lifting")
    531                    (print-node "lambda lifted" '|L| node0) )
     525                   (end-time "pre-analysis"))
     526                 (begin-time)
     527                 (perform-lambda-lifting! node0 db)
     528                 (end-time "lambda lifting")
     529                 (print-node "lambda lifted" '|L| node0)
    532530                 (set! first-analysis #t) )
    533531
  • chicken/trunk/buildversion

    r14706 r14828  
    1 4.0.5
     14.0.6
  • chicken/trunk/c-platform.scm

    r13713 r14828  
    123123    disable-stack-overflow-checks disable-c-syntax-checks unsafe-libraries raw
    124124    emit-external-prototypes-first release local inline-global
    125     analyze-only dynamic
     125    analyze-only dynamic scrutinize
    126126    no-parentheses-synonyms no-symbol-escape r5rs-syntax) )
    127127
     
    129129  '(debug output-file include-path heap-size stack-size unit uses keyword-style require-extension
    130130          inline-limit profile-name disable-warning parenthesis-synonyms
    131     prelude postlude prologue epilogue nursery extend feature
     131    prelude postlude prologue epilogue nursery extend feature types
    132132    emit-import-library emit-inline-file static-extension
    133133    heap-growth heap-shrinkage heap-initial-size ffi-define ffi-include-path) )
  • chicken/trunk/chicken.scm

    r12937 r14828  
    2727
    2828(declare
    29   (uses chicken-syntax srfi-1 srfi-4 utils files support compiler optimizer driver
     29  (uses chicken-syntax srfi-1 srfi-4 utils files support compiler optimizer scrutinizer driver
    3030        platform backend srfi-69)
    3131  (run-time-macros) )                   ;*** later: compile-syntax
  • chicken/trunk/compiler.scm

    r14781 r14828  
    6969; (safe-globals)
    7070; (separate)
     71; (type (<symbol> <typespec>) ...)
    7172; (unit <unitname>)
    7273; (unsafe)
    7374; (unused <symbol> ...)
    7475; (uses {<unitname>})
     76; (scrutinize)
    7577;
    7678;   <type> = fixnum | generic
     
    295297  make-random-name final-foreign-type real-name-table real-name set-real-name! safe-globals-flag
    296298  location-pointer-map literal-rewrite-hook inline-globally enable-inline-files
    297   local-definitions export-variable variable-mark intrinsic?
     299  local-definitions export-variable variable-mark intrinsic? do-scrutinize
    298300  undefine-shadowed-macros process-lambda-documentation emit-syntax-trace-info
    299301  generate-code make-variable-list make-argument-list generate-foreign-stubs foreign-type-declaration
     
    375377(define inline-locally #f)
    376378(define inline-output-file #f)
     379(define do-scrutinize #f)
    377380(define enable-inline-files #f)
    378381
     
    14821485             (cut mark-variable <> '##compiler#inline-global 'yes)
    14831486             (stripa (cdr spec)))))
     1487       ((type)
     1488        (for-each
     1489         (lambda (spec)
     1490           (cond ((and (list? spec) (symbol? (car spec)) (= 2 (length spec)))
     1491                  (##sys#put! (car spec) '##core#type (cadr spec))
     1492                  (##sys#put! (car spec) '##core#declared-type #t))
     1493                 (else
     1494                  (compiler-warning 'syntax "illegal `type' declaration item `~s'" spec))))
     1495         (cdr spec)))
     1496       ((scrutinize)
     1497        (set! do-scrutinize #t))
    14841498       (else (compiler-warning 'syntax "illegal declaration specifier `~s'" spec)) )
    14851499     '(##core#undefined) ) ) )
  • chicken/trunk/csc.scm

    r14565 r14828  
    127127    -check-syntax -case-insensitive -benchmark-mode -shared -compile-syntax -no-lambda-info
    128128    -lambda-lift -dynamic -disable-stack-overflow-checks -local
    129     -emit-external-prototypes-first -inline -release
     129    -emit-external-prototypes-first -inline -release -scrutinize
    130130    -analyze-only -keep-shadowed-macros -inline-global -ignore-repository
    131131    -no-symbol-escape -no-parentheses-synonyms -r5rs-syntax))
     
    134134  '(-debug -output-file -heap-size -nursery -stack-size -compiler -unit -uses -keyword-style
    135135    -optimize-level -include-path -database-size -extend -prelude -postlude -prologue -epilogue
    136     -inline-limit -profile-name -disable-warning -emit-inline-file
     136    -inline-limit -profile-name -disable-warning -emit-inline-file -types
    137137    -feature -debug-level -heap-growth -heap-shrinkage -heap-initial-size
    138138    -emit-import-library -static-extension))
     
    141141  '((-h "-help")
    142142    (-s "-shared")
     143    (-S "-scrutinize")
    143144    (|-P| "-check-syntax")
    144145    (|-V| "-version")
     
    157158
    158159(define short-options
    159   (string->list "PHhsfiENxubvwAOeWkctg") )
     160  (string->list "PHhsfiENxubvwAOeWkctgS") )
    160161
    161162
     
    332333    -profile-name FILENAME         name of the generated profile information
    333334                                    file
     335    -S  -scrutinize                perform local flow analysis
     336    -types FILENAME                load additional type database
    334337
    335338  Optimization options:
  • chicken/trunk/defaults.make

    r13948 r14828  
    105105INSTALL_PROGRAM ?= xcopy
    106106MAKEDIR_COMMAND ?= -mkdir
     107XHERE ?=
    107108else
    108109INSTALL_PROGRAM ?= install
    109110MAKEDIR_COMMAND ?= mkdir
     111XHERE ?= $(SRCDIR)scripts/xhere
    110112endif
    111113POSTINSTALL_STATIC_LIBRARY ?= true
     
    273275
    274276CHICKEN ?= chicken$(EXE)
     277XCHICKEN ?= $(XHERE) $(CHICKEN)
    275278
    276279# interpreter for scripts
     
    280283# Scheme compiler flags
    281284
    282 CHICKEN_OPTIONS = \
    283         -no-trace -optimize-level 2 \
    284         -include-path . -include-path $(SRCDIR)
     285CHICKEN_OPTIONS = -no-trace -optimize-level 2 -include-path . -include-path $(SRCDIR)
    285286ifdef DEBUGBUILD
    286287CHICKEN_OPTIONS += -feature debugbuild
     
    289290CHICKEN_PROGRAM_OPTIONS = $(CHICKEN_OPTIONS) -no-lambda-info -inline -local
    290291CHICKEN_COMPILER_OPTIONS = $(CHICKEN_PROGRAM_OPTIONS) -extend private-namespace.scm
     292CHICKEN_SCRUTINY_OPTIONS = -types $(SRCDIR)types.db -analyze-only -scrutinize -ignore-repository
    291293CHICKEN_UNSAFE_OPTIONS = -unsafe -no-lambda-info
    292294CHICKEN_DYNAMIC_OPTIONS = $(CHICKEN_OPTIONS) -feature chicken-compile-shared -dynamic
     
    306308        regex srfi-14 tcp foreign compiler scheme srfi-18 utils csi irregex
    307309IMPORT_LIBRARIES += setup-api setup-download
     310SCRUTINIZED_LIBRARIES = library eval data-structures ports files extras lolevel utils tcp srfi-1 srfi-4 srfi-13 \
     311       srfi-14 srfi-18 srfi-69 $(POSIXFILE) regex scheduler \
     312       profiler stub expand chicken-syntax
    308313
    309314ifdef STATICBUILD
  • chicken/trunk/distribution/manifest

    r13962 r14828  
    6464lolevel.c
    6565optimizer.c
     66scrutinizer.c
    6667regex.c
    6768posixunix.c
     
    178179lolevel.scm
    179180optimizer.scm
     181scrutinizer.scm
    180182regex.scm
    181183irregex.scm
     
    328330setup-api.import.c
    329331setup-download.import.c
     332types.db
  • chicken/trunk/eval.scm

    r14781 r14828  
    13081308           ((number? x) (##sys#number->string x))
    13091309           (else (error "invalid extension version" x)) ) )
    1310    (if (and (list spec) (fx= 3 (length spec)))
     1310   (if (and (list? spec) (fx= 3 (length spec)))
    13111311       (let* ((info (extension-information (cadr spec)))
    13121312              (vv (and info (assq 'version info))) )
  • chicken/trunk/manual/Declarations

    r14511 r14828  
    252252
    253253
     254=== scrutinize
     255
     256 [declaration specifier] (scrutinize)
     257
     258Enables scrutiny. This is equivalent to passing the {{-scrutinize}} option to the compiler.
     259
     260
    254261=== standard-bindings
    255262
     
    261268then all but the given standard bindings are assumed to be never
    262269redefined.
     270
     271
     272=== type
     273
     274  [declaration specifier] (type (SYMBOL TYPESPEC) ...)
     275
     276Declares toplevel procedures to have a specific type for scrutiny. {{SYMBOL}} should name
     277a toplevel variable and {{TYPESPEC}} should be a type specification, following the syntax
     278given here:
     279
     280  TYPESPEC --> *
     281            |  ( VAL1 ... )
     282 
     283  VAL --> (or VAL1 ...)
     284       |  (struct NAME)
     285       |  (procedure (VAL1 ... [#!optional VALOPT1 ...] [#!rest [VAL]]) . RESULTS)
     286       |  BASIC
     287       |  deprecated
     288 
     289  BASIC --> *
     290         |  string
     291         |  symbol
     292         |  char
     293         |  number
     294         |  boolean
     295         |  list
     296         |  pair
     297         |  procedure
     298         |  vector
     299         |  null
     300         |  eof
     301         |  port
     302         |  blob
     303         |  pointer
     304         |  locative
     305         |  fixnum
     306         |  float
     307 
     308  RESULTS --> *
     309           |  (RVAL1 ...)
     310
     311  RVAL --> undefined
     312        |  noreturn
     313
     314A type-declaration overrides any previous declaration for the same identifier.
    263315
    264316
  • chicken/trunk/manual/The User's Manual

    r14706 r14828  
    55== The CHICKEN User's Manual
    66
    7 This is the user's manual for the Chicken Scheme compiler, version 4.0.5
     7This is the user's manual for the Chicken Scheme compiler, version 4.0.6
    88
    99; [[Getting started]] : What is CHICKEN and how do I use it?
  • chicken/trunk/manual/Unit data-structures

    r13831 r14828  
    122122
    123123Returns {{LIST}} with its elements sorted in a random order given by
    124 procedure RANDOM.
     124procedure {{RANDOM}}.
    125125
    126126
  • chicken/trunk/manual/Using the compiler

    r14779 r14828  
    177177; -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 {{,}}.
    178178
     179; -scrutinize : Enable simple flow-analysis to catch common type errors and argument/result mismatches. You can also use the {{scrutinize}} declaration to enable scrutiny.
     180
    179181; -static-extension NAME : similar to {{-require-extension NAME}}, but links extension statically (also applies for an explicit {{(require-extension NAME)}}).
     182
     183; -types FILENAME : load additional type database from {{FILENAME}}. Type-definitions in {{FILENAME}} will override previous type-definitions.
    180184
    181185; -compile-syntax : Makes macros also available at run-time. By default macros are not available at run-time.
     
    367371or compiled code specified using the {{-extend}} option are loaded
    368372and evaluated.  The parameters {{user-options-pass, user-read-pass,
    369 user-preprocessor-pass, user-pass, user-pass-2}} and {{user-post-analysis-pass}} can be set
     373user-preprocessor-pass, user-pass}} and {{user-post-analysis-pass}} can be set
    370374to procedures that are called to perform certain compilation passes
    371375instead of the usual processing (for more information about parameters
  • chicken/trunk/optimizer.scm

    r12948 r14828  
    300300                                        (kvar (first (node-parameters k)))
    301301                                        (lval (and (not (test kvar 'unknown)) (test kvar 'value)))
    302                                         (eq? '##core#lambda (node-class lval))
     302                                        ((eq? '##core#lambda (node-class lval)))
    303303                                        (llist (third (node-parameters lval)))
    304304                                        ((or (test (car llist) 'unused)
  • chicken/trunk/posixunix.scm

    r14779 r14828  
    22082208(define process-run
    22092209  (let ([process-fork process-fork]
    2210         [process-execute process-execute]
    2211         [getenv getenv] )
     2210        [process-execute process-execute])
    22122211    (lambda (f . args)
    22132212      (let ([args (if (pair? args) (car args) #f)]
  • chicken/trunk/regex.import.scm

    r12937 r14828  
    3030   glob?
    3131   grep
    32    regex-chardef-table
    33    regex-chardef-table?
    3432   regexp
    3533   regexp-escape
  • chicken/trunk/rules.make

    r13888 r14828  
    5151
    5252COMPILER_OBJECTS_1 = \
    53        chicken batch-driver compiler optimizer support \
     53       chicken batch-driver compiler optimizer scrutinizer support \
    5454       c-platform c-backend
    5555COMPILER_OBJECTS        = $(COMPILER_OBJECTS_1:=$(O))
     
    584584          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< \
    585585          $(C_COMPILER_OUTPUT)
     586scrutinizer$(O): scrutinizer.c chicken.h $(CHICKEN_CONFIG_H)
     587        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
     588          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $(C_COMPILER_SHARED_OPTIONS) $< \
     589          $(C_COMPILER_OUTPUT)
    586590chicken$(O): chicken.c chicken.h $(CHICKEN_CONFIG_H)
    587591        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
     
    624628          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
    625629optimizer-static$(O): optimizer.c chicken.h $(CHICKEN_CONFIG_H)
     630        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
     631          $(C_COMPILER_STATIC_OPTIONS) \
     632          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
     633scrutinizer-static$(O): scrutinizer.c chicken.h $(CHICKEN_CONFIG_H)
    626634        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) \
    627635          $(C_COMPILER_STATIC_OPTIONS) \
     
    927935        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) $(SRCDIR)csibatch.bat $(DESTDIR)$(IBINDIR)
    928936endif
     937        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)types.db $(DESTDIR)$(IEGGDIR)
    929938endif
    930939
     
    11671176optimizer.c: $(SRCDIR)optimizer.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    11681177        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
     1178scrutinizer.c: $(SRCDIR)scrutinizer.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
     1179        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    11691180batch-driver.c: $(SRCDIR)batch-driver.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    11701181        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
     
    12081219        usrfi-18.c usrfi-69.c uposixunix.c uposixwin.c uregex.c \
    12091220        chicken-profile.c chicken-install.c chicken-uninstall.c chicken-status.c \
    1210         csc.c csi.c chicken.c batch-driver.c compiler.c optimizer.c support.c \
     1221        csc.c csi.c chicken.c batch-driver.c compiler.c optimizer.c scrutinizer.c support.c \
    12111222        c-platform.c c-backend.c chicken-bug.c $(IMPORT_LIBRARIES:=.import.c)
    12121223
     
    12291240endif
    12301241
    1231 clean:
     1242clean: scrutiny-clean
    12321243        -$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) chicken$(EXE) csi$(EXE) csc$(EXE) \
    12331244          chicken-profile$(EXE) csi-static$(EXE) \
     
    12361247          $(LIBCHICKEN_SO_FILE) $(LIBUCHICKEN_SO_FILE) $(LIBCHICKENGUI_SO_FILE) \
    12371248          libchicken$(A) libuchicken$(A) libchickengui$(A) libchicken$(SO) $(PROGRAM_IMPORT_LIBRARIES) \
    1238           $(IMPORT_LIBRARIES:=.import.so) $(LIBCHICKEN_IMPORT_LIBRARY) $(LIBUCHICKEN_IMPORT_LIBRARY) $(LIBCHICKENGUI_IMPORT_LIBRARY)  \
     1249          $(IMPORT_LIBRARIES:=.import.so) $(LIBCHICKEN_IMPORT_LIBRARY) $(LIBUCHICKEN_IMPORT_LIBRARY) \
     1250          $(LIBCHICKENGUI_IMPORT_LIBRARY)  \
    12391251          $(MSVC_CHICKEN_EXPORT_FILES) $(CLEAN_MINGW_LIBS) \
    12401252          $(CLEAN_MANIFESTS)
     
    12521264          usrfi-18.c usrfi-69.c uposixunix.c uposixwin.c uregex.c chicken-profile.c chicken-bug.c \
    12531265          csc.c csi.c chicken-install.c chicken-uninstall.c chicken-status.c \
    1254           chicken.c batch-driver.c compiler.c optimizer.c support.c \
     1266          chicken.c batch-driver.c compiler.c optimizer.c scrutinizer.c support.c \
    12551267          c-platform.c c-backend.c \
    12561268          $(IMPORT_LIBRARIES:=.import.c)
     
    13161328        LD_LIBRARY_PATH=$$here DYLD_LIBRARY_PATH=$$here PATH=$$here:$$PATH \
    13171329        $(CSI) -s cscbench.scm $(BENCHMARK_OPTIONS)
     1330
     1331
     1332# scrutiny
     1333
     1334.PHONY: scrutiny scrutiny-clean
     1335
     1336scrutiny: $(SCRUTINIZED_LIBRARIES:=.scrutiny1) $(COMPILER_OBJECTS_1:=.scrutiny2)
     1337
     1338%.scrutiny1: $(SRCDIR)%.scm
     1339        $(XCHICKEN) $< $(CHICKEN_SCRUTINY_OPTIONS) $(CHICKEN_LIBRARY_OPTIONS) 2>&1 | tee $@
     1340
     1341%.scrutiny2: $(SRCDIR)%.scm
     1342        $(XCHICKEN) $< $(CHICKEN_SCRUTINY_OPTIONS) $(CHICKEN_COMPILER_OPTIONS) 2>&1 | tee $@
     1343
     1344scrutiny-clean:
     1345        rm *.scrutiny[12]
  • chicken/trunk/srfi-4.import.scm

    r12937 r14828  
    4343   blob->u8vector
    4444   blob->u8vector/shared
    45    byte-vector->f32vector
    46    byte-vector->f64vector
    47    byte-vector->s16vector
    48    byte-vector->s32vector
    49    byte-vector->s8vector
    50    byte-vector->u16vector
    51    byte-vector->u32vector
    52    byte-vector->u8vector
    5345   f32vector
    5446   f32vector->blob
  • chicken/trunk/support.scm

    r14799 r14828  
    6969  constant-declarations process-lambda-documentation big-fixnum? sort-symbols llist-length
    7070  export-dump-hook intrinsic? node->sexpr emit-global-inline-file inline-max-size
    71   make-random-name foreign-type-convert-result foreign-type-convert-argument)
     71  make-random-name foreign-type-convert-result foreign-type-convert-argument
     72  load-identifier-database)
    7273
    7374
     
    12921293                                  append mode
    12931294    -no-lambda-info              omit additional procedure-information
     1295    -scrutinize                  perform local flow analysis
     1296    -types FILENAME              load additional type database
    12941297
    12951298  Optimization options:
     
    15321535(define cdb-get get)
    15331536(define cdb-put! put!)
     1537
     1538
     1539;;; Load support files
     1540
     1541(define (load-identifier-database name)
     1542  (and-let* ((rp (repository-path))
     1543             (dbfile (file-exists? (make-pathname rp name))))
     1544    (when verbose-mode
     1545      (printf "loading identifier database ~a ...~%" dbfile))
     1546    (for-each
     1547     (lambda (e)
     1548       (##sys#put!
     1549        (car e) '##core#db
     1550        (append (or (##sys#get (car e) '##core#db) '()) (list (cdr e))) ))
     1551     (read-file dbfile))))
  • chicken/trunk/tests/runtests.sh

    r13870 r14828  
    1818
    1919echo "======================================== compiler tests ..."
    20 $compile compiler-tests.scm && ./a.out
     20$compile compiler-tests.scm
     21./a.out
    2122
    2223echo "======================================== compiler tests (2) ..."
    23 $compile compiler-tests.scm -lambda-lift && ./a.out
     24$compile compiler-tests.scm -lambda-lift
     25./a.out
     26
     27echo "======================================== scrutiny tests ..."
     28$compile scrutiny-tests.scm -scrutinize -analyze-only -ignore-repository -types ../types.db 2>scrutiny.out
     29diff -u scrutiny.out scrutiny.expected || exit 1
    2430
    2531echo "======================================== runtime tests ..."
    2632$interpret -s apply-test.scm
    27 $compile test-gc-hooks.scm && ./a.out
     33$compile test-gc-hooks.scm
     34./a.out
    2835
    2936echo "======================================== library tests ..."
     
    3441
    3542echo "======================================== syntax tests (compiled) ..."
    36 $compile syntax-tests.scm && ./a.out
     43$compile syntax-tests.scm
     44./a.out
    3745
    3846echo "======================================== syntax tests (2, compiled) ..."
    39 $compile syntax-tests-2.scm && ./a.out
     47$compile syntax-tests-2.scm
     48./a.out
    4049
    4150#echo "======================================== meta-syntax tests ..."
     
    5160$compile_s -s foo.import.scm -o foo.import.so
    5261$interpret -s import-library-test2.scm
    53 $compile import-library-test2.scm && ./a.out
     62$compile import-library-test2.scm
     63./a.out
    5464
    5565echo "======================================== syntax tests (matchable) ..."
     
    6676
    6777echo "======================================== module tests (compiled) ..."
    68 $compile module-tests-compiled.scm && ./a.out
     78$compile module-tests-compiled.scm
     79./a.out
    6980
    7081echo "======================================== module tests (chained) ..."
     
    8293$compile_s ec.import.scm -o ec.import.so
    8394$interpret -bnq ec.so ec-tests.scm
    84 # $compile ec-tests.scm && ./a.out        # takes ages to compile
     95# $compile ec-tests.scm
     96# ./a.out        # takes ages to compile
    8597
    8698echo "======================================== hash-table tests ..."
     
    94106
    95107echo "======================================== fixnum tests ..."
    96 $compile fixnum-tests.scm && ./a.out
     108$compile fixnum-tests.scm
     109./a.out
    97110
    98111echo "======================================== srfi-18 tests ..."
     
    101114
    102115echo "======================================== path tests ..."
    103 $compile path-tests.scm && ./a.out
     116$compile path-tests.scm
     117./a.out
    104118
    105119echo "======================================== regular expression tests ..."
     
    127141
    128142echo "======================================== finalizer tests (2) ..."
    129 $compile test-finalizers-2.scm && ./a.out
     143$compile test-finalizers-2.scm
     144./a.out
    130145
    131146echo "======================================== locative stress test ..."
    132 $compile locative-stress-test.scm && ./a.out
     147$compile locative-stress-test.scm
     148./a.out
    133149
    134150echo "======================================== embedding (1) ..."
    135 $compile embedded1.c && ./a.out
     151$compile embedded1.c
     152./a.out
    136153
    137154echo "======================================== embedding (2) ..."
    138 $compile -e embedded2.scm && ./a.out
     155$compile -e embedded2.scm
     156./a.out
    139157
    140158echo "======================================== benchmarks ..."
  • chicken/trunk/version.scm

    r14706 r14828  
    1 (define-constant +build-version+ "4.0.5")
     1(define-constant +build-version+ "4.0.6")
Note: See TracChangeset for help on using the changeset viewer.