Changeset 15246 in project for chicken/trunk


Ignore:
Timestamp:
07/22/09 12:54:00 (10 years ago)
Author:
felix winkelmann
Message:

-debug v; compile-file; all namespace decls in one file

Location:
chicken/trunk
Files:
1 added
15 edited

Legend:

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

    r15119 r15246  
    3030  (disable-warning var))
    3131
    32 
    33 (private
    34  compiler
    35   compiler-arguments process-command-line dump-nodes dump-undefined-globals
    36   default-standard-bindings default-extended-bindings
    37   foldable-bindings dump-defined-globals
    38   compiler-cleanup-hook disabled-warnings local-definitions inline-output-file
    39   file-io-only undefine-shadowed-macros profiled-procedures
    40   unit-name insert-timer-checks used-units inline-max-size mark-variable inline-locally
    41   debugging perform-lambda-lifting! disable-stack-overflow-checking
    42   foreign-declarations emit-trace-info block-compilation line-number-database-size
    43   target-heap-size target-stack-size target-heap-growth target-heap-shrinkage
    44   default-default-target-heap-size default-default-target-stack-size verbose-mode original-program-size
    45   target-initial-heap-size postponed-initforms
    46   current-program-size line-number-database-2 foreign-lambda-stubs immutable-constants foreign-variables
    47   rest-parameters-promoted-to-vector inline-table inline-table-used constant-table constants-used
    48   broken-constant-nodes inline-substitutions-enabled compiler-syntax-statistics
    49   emit-profile profile-lambda-list profile-lambda-index profile-info-vector-name
    50   direct-call-ids foreign-type-table first-analysis emit-closure-info
    51   initialize-compiler canonicalize-expression expand-foreign-lambda update-line-number-database scan-toplevel-assignments
    52   perform-cps-conversion analyze-expression simplifications perform-high-level-optimizations perform-pre-optimization!
    53   reorganize-recursive-bindings substitution-table simplify-named-call emit-unsafe-marker
    54   perform-closure-conversion prepare-for-code-generation compiler-source-file create-foreign-stub expand-foreign-lambda*
    55   transform-direct-lambdas! source-filename standalone-executable compiler-syntax-enabled
    56   debugging-chicken bomb check-signature posq stringify symbolify build-lambda-list
    57   string->c-identifier c-ify-string words check-and-open-input-file close-checked-input-file fold-inner constant?
    58   collapsable-literal? immediate? canonicalize-begin-body extract-mutable-constants string->expr get get-all
    59   put! collect! count! get-line get-line-2 find-lambda-container display-analysis-database varnode qnode
    60   build-node-graph build-expression-tree fold-boolean inline-lambda-bindings match-node expression-has-side-effects?
    61   simple-lambda-node? compute-database-statistics print-program-statistics output gen gen-list external-protos-first
    62   pprint-expressions-to-file foreign-type-check estimate-foreign-result-size scan-used-variables scan-free-variables
    63   topological-sort print-version print-usage initialize-analysis-database dump-exported-globals
    64   default-declarations units-used-by-default words-per-flonum default-debugging-declarations
    65   default-profiling-declarations default-optimization-passes
    66   file-requirements import-libraries inline-globally scrutinize do-scrutinize enable-inline-files
    67   foreign-string-result-reserve parameter-limit eq-inline-operator optimizable-rest-argument-operators
    68   membership-test-operators membership-unfold-limit valid-compiler-options valid-compiler-options-with-argument
    69   chop-separator chop-extension display-real-name-table display-line-number-database explicit-use-flag
    70   generate-code make-variable-list make-argument-list generate-foreign-stubs foreign-type-declaration
    71   do-lambda-lifting compiler-warning emit-global-inline-file load-inline-file
    72   foreign-argument-conversion foreign-result-conversion
    73   load-identifier-database load-type-database
    74   no-bound-checks no-argc-checks no-procedure-checks)
    75 
    76 
     32(include "compiler-namespace")
    7733(include "tweaks")
    7834
     
    602558                         (dump-undefined-globals db))
    603559                       (when (memq 'd debugging-chicken)
    604                          (dump-defined-globals db)) )
     560                         (dump-defined-globals db))
     561                       (when (memq 'v debugging-chicken)
     562                         (dump-global-refs db)) )
    605563                     (set! first-analysis #f)
    606564                     (end-time "analysis")
  • chicken/trunk/c-backend.scm

    r14799 r15246  
    2929
    3030
    31 (private compiler
    32   compiler-arguments process-command-line find-early-refs
    33   default-standard-bindings default-extended-bindings
    34   foldable-bindings
    35   installation-home optimization-iterations debugging cleanup
    36   file-io-only
    37   unit-name insert-timer-checks used-units inlining external-variables
    38   foreign-declarations emit-trace-info block-compilation line-number-database-size
    39   target-heap-size target-stack-size target-heap-growth target-heap-shrinkage
    40   default-default-target-heap-size default-default-target-stack-size verbose-mode original-program-size
    41   target-initial-heap-size disable-stack-overflow-checking
    42   current-program-size line-number-database-2 foreign-lambda-stubs immutable-constants
    43   rest-parameters-promoted-to-vector inline-table inline-table-used constant-table constants-used
    44   encode-literal
    45   broken-constant-nodes inline-substitutions-enabled
    46   direct-call-ids foreign-type-table first-analysis block-variable-literal?
    47   initialize-compiler canonicalize-expression expand-foreign-lambda update-line-number-database
    48   scan-toplevel-assignments
    49   perform-cps-conversion analyze-expression simplifications perform-high-level-optimizations
    50   perform-pre-optimization!
    51   reorganize-recursive-bindings substitution-table simplify-named-call find-inlining-candidates perform-inlining!
    52   perform-closure-conversion prepare-for-code-generation compiler-source-file create-foreign-stub
    53   expand-foreign-lambda*
    54   transform-direct-lambdas! target-include-file emit-unsafe-marker
    55   debugging-chicken bomb check-signature posq stringify symbolify build-lambda-list
    56   string->c-identifier c-ify-string words check-and-open-input-file close-checked-input-file fold-inner constant?
    57   collapsable-literal? immediate? canonicalize-begin-body extract-mutable-constants string->expr get get-all
    58   put! collect! count! get-line get-line-2 find-lambda-container display-analysis-database varnode qnode
    59   build-node-graph build-expression-tree fold-boolean inline-lambda-bindings match-node
    60   expression-has-side-effects? source-info->string
    61   simple-lambda-node? compute-database-statistics print-program-statistics output gen gen-list
    62   pprint-expressions-to-file foreign-type-check estimate-foreign-result-size scan-used-variables
    63   scan-free-variables external-protos-first emit-closure-info
    64   topological-sort print-version print-usage initialize-analysis-database
    65   generate-external-variables real-name real-name2 unique-id
    66   default-declarations units-used-by-default words-per-flonum big-fixnum?
    67   foreign-string-result-reserve parameter-limit eq-inline-operator optimizable-rest-argument-operators
    68   membership-test-operators membership-unfold-limit valid-compiler-options valid-compiler-options-with-argument
    69   default-optimization-iterations generate-foreign-callback-header generate-foreign-callback-stub-prototypes
    70   generate-code make-variable-list make-argument-list generate-foreign-stubs foreign-type-declaration
    71   foreign-argument-conversion foreign-result-conversion)
    72 
     31(include "compiler-namespace")
    7332(include "tweaks")
    7433
  • chicken/trunk/c-platform.scm

    r15243 r15246  
    2929
    3030
    31 (private compiler
    32   compiler-arguments process-command-line
    33   default-standard-bindings default-extended-bindings
    34   foldable-bindings non-foldable-bindings
    35   installation-home debugging intrinsic?
    36   dump-nodes unlikely-variables
    37   unit-name insert-timer-checks used-units inlining
    38   foreign-declarations block-compilation line-number-database-size
    39   target-heap-size target-stack-size
    40   default-default-target-heap-size default-default-target-stack-size verbose-mode original-program-size
    41   current-program-size line-number-database-2 foreign-lambda-stubs immutable-constants foreign-variables
    42   rest-parameters-promoted-to-vector inline-table inline-table-used constant-table constants-used
    43   broken-constant-nodes inline-substitutions-enabled
    44   direct-call-ids foreign-type-table first-analysis
    45   initialize-compiler canonicalize-expression expand-foreign-lambda update-line-number-database scan-toplevel-assignments
    46   perform-cps-conversion analyze-expression simplifications perform-high-level-optimizations perform-pre-optimization!
    47   reorganize-recursive-bindings substitution-table simplify-named-call find-inlining-candidates perform-inlining!
    48   perform-closure-conversion prepare-for-code-generation compiler-source-file create-foreign-stub expand-foreign-lambda*
    49   transform-direct-lambdas! decompose-lambda-list rewrite
    50   debugging-chicken bomb check-signature posq stringify symbolify build-lambda-list
    51   string->c-identifier c-ify-string words check-and-open-input-file close-checked-input-file fold-inner constant?
    52   collapsable-literal? immediate? canonicalize-begin-body extract-mutable-constants string->expr get get-all
    53   put! collect! count! get-line get-line-2 find-lambda-container display-analysis-database varnode qnode
    54   build-node-graph build-expression-tree fold-boolean inline-lambda-bindings match-node expression-has-side-effects?
    55   simple-lambda-node? compute-database-statistics print-program-statistics output gen gen-list
    56   pprint-expressions-to-file foreign-type-check estimate-foreign-result-size scan-used-variables scan-free-variables
    57   topological-sort print-version print-usage initialize-analysis-database
    58   default-declarations default-debugging-declarations units-used-by-default words-per-flonum
    59   parameter-limit eq-inline-operator optimizable-rest-argument-operators
    60   membership-test-operators membership-unfold-limit valid-compiler-options valid-compiler-options-with-argument
    61   target-include-file default-profiling-declarations
    62   default-optimization-passes internal-bindings big-fixnum?
    63   generate-code make-variable-list make-argument-list generate-foreign-stubs foreign-type-declaration
    64   foreign-argument-conversion foreign-result-conversion)
    65 
    66 
     31(include "compiler-namespace")
    6732(include "tweaks")
    6833
  • chicken/trunk/chicken.scm

    r15119 r15246  
    2929  (uses chicken-syntax srfi-1 srfi-4 utils files support compiler optimizer scrutinizer driver
    3030        platform backend srfi-69)
    31   (run-time-macros) )                   ;*** later: compile-syntax
     31  (compile-syntax) )                   
    3232
    3333
    34 (private compiler
    35   compiler-arguments
    36   default-standard-bindings default-extended-bindings
    37   foldable-bindings
    38   installation-home optimization-iterations process-command-line
    39   file-io-only nonwinding-call/cc debugging
    40   unit-name insert-timer-checks used-units zap-strings-flag
    41   foreign-declarations debugging-executable block-compilation line-number-database-size
    42   target-heap-size target-stack-size
    43   default-default-target-heap-size default-default-target-stack-size verbose-mode original-program-size
    44   current-program-size line-number-database-2 foreign-lambda-stubs immutable-constants foreign-variables
    45   rest-parameters-promoted-to-vector inline-table inline-table-used constant-table constants-used
    46   broken-constant-nodes inline-substitutions-enabled compiler-warning
    47   direct-call-ids foreign-type-table first-analysis
    48   initialize-compiler canonicalize-expression expand-foreign-lambda update-line-number-database scan-toplevel-assignments
    49   perform-cps-conversion analyze-expression simplifications perform-high-level-optimizations perform-pre-optimization!
    50   reorganize-recursive-bindings substitution-table simplify-named-call
    51   perform-closure-conversion prepare-for-code-generation compiler-source-file create-foreign-stub expand-foreign-lambda*
    52   transform-direct-lambdas!
    53   debugging-chicken bomb check-signature posq stringify symbolify build-lambda-list
    54   string->c-identifier c-ify-string words check-and-open-input-file close-checked-input-file fold-inner constant?
    55   collapsable-literal? immediate? canonicalize-begin-body extract-mutable-constants string->expr get get-all
    56   put! collect! count! get-line get-line-2 find-lambda-container display-analysis-database varnode qnode
    57   build-node-graph build-expression-tree fold-boolean inline-lambda-bindings match-node expression-has-side-effects?
    58   simple-lambda-node? compute-database-statistics print-program-statistics output gen gen-list
    59   pprint-expressions-to-file foreign-type-check estimate-foreign-result-size scan-used-variables scan-free-variables
    60   topological-sort print-version print-usage initialize-analysis-database
    61   default-declarations units-used-by-default words-per-flonum
    62   foreign-string-result-reserve parameter-limit default-output-filename eq-inline-operator optimizable-rest-argument-operators
    63   membership-test-operators membership-unfold-limit valid-compiler-options valid-compiler-options-with-argument
    64   generate-code make-variable-list make-argument-list generate-foreign-stubs foreign-type-declaration
    65   foreign-argument-conversion foreign-result-conversion)
    66 
    67 
     34(include "compiler-namespace")
    6835(include "tweaks")
    6936
  • chicken/trunk/compiler.scm

    r15234 r15246  
    259259
    260260
    261 (private compiler
    262   compiler-arguments process-command-line explicit-use-flag
    263   default-standard-bindings default-extended-bindings
    264   foldable-bindings llist-length
    265   installation-home decompose-lambda-list external-to-pointer defconstant-bindings constant-declarations
    266   copy-node! error-is-extended-binding toplevel-scope toplevel-lambda-id
    267   unit-name insert-timer-checks used-units external-variables require-imports-flag
    268   profile-info-vector-name finish-foreign-result pending-canonicalizations
    269   foreign-declarations emit-trace-info block-compilation line-number-database-size
    270   make-block-variable-literal block-variable-literal? block-variable-literal-name
    271   target-heap-size target-stack-size valid-c-identifier? profiled-procedures standalone-executable
    272   target-initial-heap-size internal-bindings source-filename dump-nodes source-info->string
    273   default-default-target-heap-size default-default-target-stack-size verbose-mode original-program-size
    274   current-program-size line-number-database-2 foreign-lambda-stubs immutable-constants foreign-variables
    275   rest-parameters-promoted-to-vector inline-table inline-table-used constant-table constants-used
    276   broken-constant-nodes inline-substitutions-enabled loop-lambda-names expand-profile-lambda
    277   profile-lambda-list profile-lambda-index emit-profile expand-profile-lambda
    278   direct-call-ids foreign-type-table first-analysis callback-names disabled-warnings
    279   initialize-compiler canonicalize-expression expand-foreign-lambda update-line-number-database! scan-toplevel-assignments
    280   compiler-warning variable-visible? hide-variable mark-variable inline-locally
    281   perform-cps-conversion analyze-expression simplifications perform-high-level-optimizations perform-pre-optimization!
    282   reorganize-recursive-bindings substitution-table simplify-named-call inline-max-size
    283   perform-closure-conversion prepare-for-code-generation compiler-source-file create-foreign-stub
    284   expand-foreign-lambda* data-declarations emit-control-file-item expand-foreign-primitive
    285   process-declaration external-protos-first basic-literal? rewrite
    286   transform-direct-lambdas! expand-foreign-callback-lambda* debugging emit-unsafe-marker
    287   debugging-chicken bomb check-signature posq stringify symbolify build-lambda-list
    288   string->c-identifier c-ify-string words check-and-open-input-file close-checked-input-file fold-inner constant?
    289   collapsable-literal? immediate? canonicalize-begin-body extract-mutable-constants string->expr get get-all
    290   put! collect! count! get-line get-line-2 find-lambda-container display-analysis-database varnode qnode
    291   build-node-graph build-expression-tree fold-boolean inline-lambda-bindings match-node expression-has-side-effects?
    292   simple-lambda-node? compute-database-statistics print-program-statistics output gen gen-list
    293   pprint-expressions-to-file foreign-type-check estimate-foreign-result-size scan-used-variables scan-free-variables
    294   topological-sort print-version print-usage initialize-analysis-database csc-control-file
    295   estimate-foreign-result-location-size inline-output-file compiler-syntax-enabled
    296   expand-foreign-callback-lambda default-optimization-passes default-optimization-passes-when-trying-harder
    297   units-used-by-default words-per-flonum disable-stack-overflow-checking
    298   parameter-limit eq-inline-operator optimizable-rest-argument-operators postponed-initforms
    299   membership-test-operators membership-unfold-limit valid-compiler-options valid-compiler-options-with-argument
    300   make-random-name final-foreign-type real-name-table real-name set-real-name! safe-globals-flag
    301   location-pointer-map inline-globally enable-inline-files
    302   local-definitions export-variable variable-mark intrinsic? do-scrutinize
    303   undefine-shadowed-macros process-lambda-documentation emit-syntax-trace-info
    304   generate-code make-variable-list make-argument-list generate-foreign-stubs foreign-type-declaration
    305   do-lambda-lifting file-requirements emit-closure-info
    306   foreign-argument-conversion foreign-result-conversion foreign-type-convert-argument foreign-type-convert-result
    307   big-fixnum? import-libraries unlikely-variables)
    308 
     261(include "compiler-namespace")
    309262
    310263(define (d arg1 . more)
     
    20121965                    (cond (assigned
    20131966                           (debugging
    2014                             'i "global inline candidate was assigned and will not be inlined"
     1967                            'i "global inlining candidate was assigned and will not be inlined"
    20151968                            sym)
    20161969                           (mark-variable sym '##compiler#inline-global 'no))
    20171970                          (else
    20181971                           (let ((lparams (node-parameters n)))
    2019                              (put! db (first lparams) 'simple #t)
     1972                             (put! db (first lparams) 'simple #t) ;XXX hack
    20201973                             (quick-put! plist 'inlinable #t)
    20211974                             (quick-put! plist 'local-value n))))))))
  • chicken/trunk/distribution/manifest

    r15077 r15246  
    258258defaults.make
    259259private-namespace.scm
     260compiler-namespace.scm
    260261scripts/scheme
    261262scripts/tools.scm
  • chicken/trunk/manual/Unit utils

    r15077 r15246  
    7777
    7878
     79=== Dynamic compilation
     80
     81==== compile-file
     82
     83 [procedure] (compile-file FILENAME [OPTION ...])
     84
     85Compiles the Scheme source file {{FILENAME}} into a dynamically
     86loadable library by invoking the {{csc}} compiler driver, and if the
     87library can be successfully created, loads the compiled code into the
     88running process. {{OPTION ...}} may be one or more strings with are
     89passed as additional command line options to {{csc}}. The compiled
     90file is stored in a temporary location and will be deleted when
     91the process exits successfully.
     92
     93Note that this procedure is compatible to the {{scheme-compile-file}}
     94command in {{emacs}}' {{scheme-mode}}.
     95
     96 [parameter] compile-file-options
     97
     98A parameter that holds a list of default options that should be given
     99to {{csc}} after invocation of the {{compile-file}} procedure.
     100The initial default options are {{-scrutinize -O2 -d1}}.
     101
     102
    79103---
    80104Previous: [[Unit posix]]
  • chicken/trunk/manual/Using the compiler

    r15016 r15246  
    5252     u          lists all unassigned global variable references
    5353     d          lists all assigned global variables
     54     v          lists used global variables and their reference count
    5455     x          display information about experimental features
    5556     D          when printing nodes, use node-tree output
  • chicken/trunk/optimizer.scm

    r15243 r15246  
    2828(declare (unit optimizer))
    2929
    30 (private compiler
    31   compiler-arguments process-command-line perform-lambda-lifting!
    32   default-standard-bindings default-extended-bindings
    33   foldable-bindings llist-length r-c-s compile-format-string
    34   installation-home decompose-lambda-list external-to-pointer
    35   copy-node! variable-visible? mark-variable intrinsic?
    36   unit-name insert-timer-checks used-units external-variables hide-variable
    37   debug-info-index debug-info-vector-name profile-info-vector-name
    38   foreign-declarations emit-trace-info block-compilation line-number-database-size
    39   make-block-variable-literal block-variable-literal? block-variable-literal-name
    40   target-heap-size target-stack-size constant-declarations variable-mark
    41   default-default-target-heap-size default-default-target-stack-size verbose-mode original-program-size
    42   current-program-size line-number-database-2 foreign-lambda-stubs immutable-constants foreign-variables
    43   rest-parameters-promoted-to-vector inline-table inline-table-used constant-table constants-used
    44   broken-constant-nodes inline-substitutions-enabled loop-lambda-names expand-profile-lambda
    45   profile-lambda-list profile-lambda-index emit-profile expand-profile-lambda
    46   direct-call-ids foreign-type-table first-analysis expand-debug-lambda expand-debug-assignment expand-debug-call
    47   initialize-compiler canonicalize-expression expand-foreign-lambda update-line-number-database! scan-toplevel-assignments
    48   perform-cps-conversion analyze-expression simplifications perform-high-level-optimizations perform-pre-optimization!
    49   reorganize-recursive-bindings substitution-table simplify-named-call compiler-warning
    50   perform-closure-conversion prepare-for-code-generation compiler-source-file create-foreign-stub expand-foreign-lambda*
    51   transform-direct-lambdas! expand-foreign-callback-lambda* debug-lambda-list debug-variable-list debugging
    52   debugging-chicken bomb check-signature posq stringify symbolify build-lambda-list
    53   string->c-identifier c-ify-string words check-and-open-input-file close-checked-input-file fold-inner constant?
    54   collapsable-literal? immediate? canonicalize-begin-body extract-mutable-constants string->expr get get-all
    55   put! collect! count! get-line get-line-2 find-lambda-container display-analysis-database varnode qnode
    56   build-node-graph build-expression-tree fold-boolean inline-lambda-bindings match-node expression-has-side-effects?
    57   simple-lambda-node? compute-database-statistics print-program-statistics output gen gen-list
    58   pprint-expressions-to-file foreign-type-check estimate-foreign-result-size scan-used-variables scan-free-variables
    59   topological-sort print-version print-usage initialize-analysis-database
    60   expand-foreign-callback-lambda default-optimization-passes default-optimization-passes-when-trying-harder
    61   units-used-by-default words-per-flonum rewrite inline-locally compiler-syntax-statistics
    62   parameter-limit eq-inline-operator optimizable-rest-argument-operators
    63   membership-test-operators membership-unfold-limit valid-compiler-options valid-compiler-options-with-argument
    64   make-random-name final-foreign-type inline-max-size simplified-ops
    65   generate-code make-variable-list make-argument-list generate-foreign-stubs foreign-type-declaration
    66   foreign-argument-conversion foreign-result-conversion foreign-type-convert-argument foreign-type-convert-result)
    67 
    68 
     30
     31(include "compiler-namespace")
    6932(include "tweaks")
    7033
  • chicken/trunk/rules.make

    r15171 r15246  
    11451145          -ignore-repository -output-file $@
    11461146
    1147 chicken.c: $(SRCDIR)chicken.scm $(SRCDIR)chicken-ffi-syntax.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
     1147chicken.c: $(SRCDIR)chicken.scm $(SRCDIR)chicken-ffi-syntax.scm $(SRCDIR)compiler-namespace.scm \
     1148          $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    11481149        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    1149 support.c: $(SRCDIR)support.scm $(SRCDIR)banner.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
     1150support.c: $(SRCDIR)support.scm $(SRCDIR)banner.scm $(SRCDIR)compiler-namespace.scm \
     1151          $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    11501152        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    1151 compiler.c: $(SRCDIR)compiler.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
     1153compiler.c: $(SRCDIR)compiler.scm $(SRCDIR)compiler-namespace.scm \
     1154          $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    11521155        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    1153 optimizer.c: $(SRCDIR)optimizer.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
     1156optimizer.c: $(SRCDIR)optimizer.scm $(SRCDIR)compiler-namespace.scm \
     1157          $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    11541158        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    1155 scrutinizer.c: $(SRCDIR)scrutinizer.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
     1159scrutinizer.c: $(SRCDIR)scrutinizer.scm $(SRCDIR)compiler-namespace.scm \
     1160          $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    11561161        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    1157 batch-driver.c: $(SRCDIR)batch-driver.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
     1162batch-driver.c: $(SRCDIR)batch-driver.scm $(SRCDIR)compiler-namespace.scm \
     1163          $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    11581164        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    1159 c-platform.c: $(SRCDIR)c-platform.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
     1165c-platform.c: $(SRCDIR)c-platform.scm $(SRCDIR)compiler-namespace.scm \
     1166          $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    11601167        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    1161 c-backend.c: $(SRCDIR)c-backend.scm $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
     1168c-backend.c: $(SRCDIR)c-backend.scm $(SRCDIR)compiler-namespace.scm \
     1169          $(SRCDIR)private-namespace.scm $(SRCDIR)tweaks.scm
    11621170        $(CHICKEN) $< $(CHICKEN_COMPILER_OPTIONS) -output-file $@
    11631171
  • chicken/trunk/scripts/test-dist.sh

    r15084 r15246  
    55
    66set -e
    7 set -x
    87
    98pwdopts=
     
    3837# bootstrap, if desired
    3938prefix=`pwd $pwdopts`/tmp-test-dist
     39
     40if test \! -x "$prefix/bin/csi"; then
     41    echo "no csi at ${prefix} - please build and install chicken first"
     42    exit 1
     43fi
     44
     45for ext in htmlprag matchable; do
     46    if test `$prefix/bin/csi -p "(extension-information '${ext})"` == "#f"; then
     47        $prefix/bin/chicken-install $ext
     48    fi
     49done
    4050
    4151if test -n "$bootstrap"; then
  • chicken/trunk/scrutinizer.scm

    r15021 r15246  
    2727(declare (unit scrutinizer))
    2828
    29 (private compiler
    30   compiler-arguments process-command-line perform-lambda-lifting!
    31   default-standard-bindings default-extended-bindings
    32   foldable-bindings llist-length
    33   installation-home decompose-lambda-list external-to-pointer
    34   copy-node! variable-visible? mark-variable intrinsic?
    35   unit-name insert-timer-checks used-units external-variables hide-variable
    36   debug-info-index debug-info-vector-name profile-info-vector-name
    37   foreign-declarations emit-trace-info block-compilation line-number-database-size
    38   make-block-variable-literal block-variable-literal? block-variable-literal-name
    39   target-heap-size target-stack-size constant-declarations variable-mark
    40   default-default-target-heap-size default-default-target-stack-size verbose-mode original-program-size
    41   current-program-size line-number-database-2 foreign-lambda-stubs immutable-constants foreign-variables
    42   rest-parameters-promoted-to-vector inline-table inline-table-used constant-table constants-used
    43   broken-constant-nodes inline-substitutions-enabled loop-lambda-names expand-profile-lambda
    44   profile-lambda-list profile-lambda-index emit-profile expand-profile-lambda
    45   direct-call-ids foreign-type-table first-analysis expand-debug-lambda expand-debug-assignment expand-debug-call
    46   initialize-compiler canonicalize-expression expand-foreign-lambda update-line-number-database! scan-toplevel-assignments
    47   perform-cps-conversion analyze-expression simplifications perform-high-level-optimizations perform-pre-optimization!
    48   reorganize-recursive-bindings substitution-table simplify-named-call compiler-warning real-name
    49   perform-closure-conversion prepare-for-code-generation compiler-source-file create-foreign-stub expand-foreign-lambda*
    50   transform-direct-lambdas! expand-foreign-callback-lambda* debug-lambda-list debug-variable-list debugging
    51   debugging-chicken bomb check-signature posq stringify symbolify build-lambda-list
    52   string->c-identifier c-ify-string words check-and-open-input-file close-checked-input-file fold-inner constant?
    53   collapsable-literal? immediate? canonicalize-begin-body extract-mutable-constants string->expr get get-all
    54   put! collect! count! get-line get-line-2 find-lambda-container display-analysis-database varnode qnode
    55   build-node-graph build-expression-tree fold-boolean inline-lambda-bindings match-node expression-has-side-effects?
    56   simple-lambda-node? compute-database-statistics print-program-statistics output gen gen-list
    57   pprint-expressions-to-file foreign-type-check estimate-foreign-result-size scan-used-variables scan-free-variables
    58   topological-sort print-version print-usage initialize-analysis-database
    59   expand-foreign-callback-lambda default-optimization-passes default-optimization-passes-when-trying-harder
    60   units-used-by-default words-per-flonum rewrite inline-locally
    61   parameter-limit eq-inline-operator optimizable-rest-argument-operators
    62   membership-test-operators membership-unfold-limit valid-compiler-options valid-compiler-options-with-argument
    63   make-random-name final-foreign-type inline-max-size simplified-ops
    64   generate-code make-variable-list make-argument-list generate-foreign-stubs foreign-type-declaration
    65   foreign-argument-conversion foreign-result-conversion foreign-type-convert-argument foreign-type-convert-result
    66   scrutinize load-type-database source-info->line)
    67 
    68 
     29
     30(include "compiler-namespace")
    6931(include "tweaks")
    7032
  • chicken/trunk/support.scm

    r15234 r15246  
    2929
    3030
    31 (private compiler
    32   compiler-arguments process-command-line dump-nodes dump-undefined-globals
    33   default-standard-bindings default-extended-bindings
    34   foldable-bindings dump-defined-globals
    35   installation-home optimization-iterations compiler-cleanup-hook decompose-lambda-list
    36   file-io-only banner disabled-warnings internal-bindings
    37   unit-name insert-timer-checks used-units source-filename pending-canonicalizations
    38   foreign-declarations block-compilation line-number-database-size node->sexpr sexpr->node
    39   target-heap-size target-stack-size variable-visible? hide-variable export-variable
    40   default-default-target-heap-size default-default-target-stack-size verbose-mode original-program-size
    41   current-program-size line-number-database-2 foreign-lambda-stubs immutable-constants foreign-variables
    42   rest-parameters-promoted-to-vector inline-table inline-table-used constant-table constants-used
    43   dependency-list broken-constant-nodes inline-substitutions-enabled emit-syntax-trace-info
    44   block-variable-literal? copy-node! valid-c-identifier? tree-copy copy-node-tree-and-rename
    45   direct-call-ids foreign-type-table first-analysis scan-sharp-greater-string
    46   make-block-variable-literal block-variable-literal-name variable-mark
    47   expand-profile-lambda profile-lambda-list profile-lambda-index profile-info-vector-name
    48   initialize-compiler canonicalize-expression expand-foreign-lambda update-line-number-database scan-toplevel-assignments
    49   perform-cps-conversion analyze-expression simplifications perform-high-level-optimizations perform-pre-optimization!
    50   reorganize-recursive-bindings substitution-table simplify-named-call
    51   perform-closure-conversion prepare-for-code-generation compiler-source-file create-foreign-stub expand-foreign-lambda*
    52   transform-direct-lambdas! finish-foreign-result csc-control-file
    53   debugging-chicken bomb check-signature posq stringify symbolify build-lambda-list
    54   string->c-identifier c-ify-string words words->bytes check-and-open-input-file close-checked-input-file fold-inner
    55   constant? basic-literal? source-info->string mark-variable load-inline-file
    56   collapsable-literal? immediate? canonicalize-begin-body string->expr get get-all
    57   put! collect! count! get-line get-line-2 find-lambda-container display-analysis-database varnode qnode
    58   build-node-graph build-expression-tree fold-boolean inline-lambda-bindings match-node expression-has-side-effects?
    59   simple-lambda-node? compute-database-statistics print-program-statistics output gen gen-list
    60   pprint-expressions-to-file foreign-type-check estimate-foreign-result-size scan-used-variables scan-free-variables
    61   topological-sort print-version print-usage initialize-analysis-database estimate-foreign-result-location-size
    62   real-name real-name-table set-real-name! real-name2 display-real-name-table display-line-number-database
    63   default-declarations units-used-by-default words-per-flonum emit-control-file-item compiler-warning
    64   foreign-string-result-reserve parameter-limit eq-inline-operator optimizable-rest-argument-operators
    65   membership-test-operators membership-unfold-limit valid-compiler-options valid-compiler-options-with-argument
    66   default-optimization-iterations chop-separator chop-extension follow-without-loop
    67   generate-code make-variable-list make-argument-list generate-foreign-stubs foreign-type-declaration
    68   foreign-argument-conversion foreign-result-conversion final-foreign-type debugging source-info->line
    69   constant-declarations process-lambda-documentation big-fixnum? sort-symbols llist-length
    70   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
    72   load-identifier-database)
    73 
    74 
     31(include "compiler-namespace")
    7532(include "tweaks")
    7633(include "banner")
     
    819776       (write sym)
    820777       (newline) ) )
     778   db) )
     779
     780(define (dump-global-refs db)
     781  (##sys#hash-table-for-each
     782   (lambda (sym plist)
     783     (when (assq 'global plist)
     784       (let ((a (assq 'references plist)))
     785         (write (list sym (if a (length (cdr a)) 0)))
     786         (newline) ) ) )
    821787   db) )
    822788
  • chicken/trunk/types.db

    r15119 r15246  
    13701370(system* (procedure system* (string #!rest) undefined))
    13711371(qs (procedure qs (string) string))
     1372(compile-file (procedure compile-file (string #!rest string) undefined))
     1373(compile-file-options (procedure compile-file-options (#!optional list) list))
    13721374
    13731375;; missing: setup-api, setup-download
  • chicken/trunk/utils.scm

    r13677 r15246  
    2828(declare
    2929  (unit utils)
    30   (uses extras srfi-13)
     30  (uses extras srfi-13 posix files)
    3131  (usual-integrations)
    3232  (fixnum)
     
    120120                     (string c)))
    121121               (string->list str)))))))
     122
     123
     124;;; Compile and load file
     125
     126(define compile-file-options (make-parameter '("-S" "-O2" "-d1")))
     127
     128(define compile-file
     129  (let ((csc (foreign-value "C_CSC_PROGRAM" c-string))
     130        (path (foreign-value "C_INSTALL_BIN_HOME" c-string)) )
     131    (lambda (filename . options)
     132      (let ((cscpath (or (file-exists? (make-pathname path csc)) "csc"))
     133            (tmpfile (create-temporary-file "so")))
     134        (print "; compiling " filename " ...")
     135        (system*
     136         "~a -s ~a ~a -o ~a"
     137         (qs cscpath)
     138         (string-intersperse (append (compile-file-options) options) " ")
     139         (qs filename)
     140         (qs tmpfile))
     141        (on-exit (cut delete-file* tmpfile))
     142        (load tmpfile))) ) )
Note: See TracChangeset for help on using the changeset viewer.