>From fb0b329dedf759e2f2c2693cb35c9b1dbe461a45 Mon Sep 17 00:00:00 2001 From: Evan Hanson Date: Sat, 28 Apr 2018 23:20:49 +0200 Subject: [PATCH] Rename -emit/consult-type-file flags to -emit/consult-types-file (with an "s") The file extension is "types", so these flags should use "types" too. Leave aliases in place so we don't break things. --- batch-driver.scm | 6 +++--- c-platform.scm | 2 +- chicken.mdoc | 2 +- csc.mdoc | 2 +- csc.scm | 15 +++++++++------ egg-compile.scm | 4 ++-- scrutinizer.scm | 6 +++--- support.scm | 4 ++-- tests/runtests.bat | 2 +- tests/runtests.sh | 2 +- 10 files changed, 24 insertions(+), 21 deletions(-) diff --git a/batch-driver.scm b/batch-driver.scm index 44ab36d1..fc7afb04 100644 --- a/batch-driver.scm +++ b/batch-driver.scm @@ -382,7 +382,7 @@ (set! inline-locally #t) ; otherwise this option makes no sense (set! local-definitions #t) (set! inline-output-file (option-arg ifile))) - (and-let* ((tfile (memq 'emit-type-file options))) + (and-let* ((tfile (memq 'emit-types-file options))) (set! type-output-file (option-arg tfile))) (and-let* ([inlimit (memq 'inline-limit options)]) (set! inline-max-size @@ -696,7 +696,7 @@ (lambda (fn) (or (load-type-database fn enable-specialization #f) (quit-compiling "type-database `~a' not found" fn))) - (collect-options 'consult-type-file)) + (collect-options 'consult-types-file)) (for-each (lambda (id) (load-type-database @@ -751,7 +751,7 @@ ;; do this here, because we must make sure we have a db (when type-output-file (dribble "generating type file `~a' ..." type-output-file) - (emit-type-file filename type-output-file db block-compilation))) + (emit-types-file filename type-output-file db block-compilation))) (set! first-analysis #f) (end-time "analysis") (print-db "analysis" '|4| db i) diff --git a/c-platform.scm b/c-platform.scm index 0dc2cd50..35a327cc 100644 --- a/c-platform.scm +++ b/c-platform.scm @@ -110,7 +110,7 @@ keyword-style require-extension inline-limit profile-name prelude postlude prologue epilogue nursery extend feature no-feature emit-inline-file consult-inline-file - emit-type-file consult-type-file + emit-types-file consult-types-file emit-import-library)) diff --git a/chicken.mdoc b/chicken.mdoc index 8e7132bc..3a8042ec 100644 --- a/chicken.mdoc +++ b/chicken.mdoc @@ -144,7 +144,7 @@ Executable emits profiling information in append mode. Omit additional procedure-information. .It Fl types Ar FILENAME Load additional type database. -.It Fl emit-type-file Ar FILENAME +.It Fl emit-types-file Ar FILENAME Write type-declaration information into file. .El .Pp diff --git a/csc.mdoc b/csc.mdoc index 2cce6b3b..83b6a3e7 100644 --- a/csc.mdoc +++ b/csc.mdoc @@ -180,7 +180,7 @@ Generate file with globally inlinable procedures .Po implies Fl inline Fl local Pc . .It Fl consult-inline-file Ar FILENAME Explicitly load inline file. -.It Fl ot Ar FILENAME , Fl emit-type-file Ar FILENAME +.It Fl ot Ar FILENAME , Fl emit-types-file Ar FILENAME Write type-declaration information into file. .It Fl no-argc-checks Disable argument count checks. diff --git a/csc.scm b/csc.scm index 25694f4a..96f49eb3 100644 --- a/csc.scm +++ b/csc.scm @@ -158,7 +158,7 @@ -optimize-level -include-path -database-size -extend -prelude -postlude -prologue -epilogue -emit-link-file -inline-limit -profile-name -emit-inline-file -consult-inline-file - -emit-type-file -consult-type-file + -emit-types-file -consult-types-file -feature -debug-level -emit-import-library -module -link @@ -180,7 +180,10 @@ (-u "-unsafe") (-j "-emit-import-library") (-b "-block") - (-types "-consult-type-file"))) + (-types "-consult-types-file") + ;; deprecated flag names: + (-emit-type-file "-emit-types-file") + (-consult-type-file "-consult-types-file"))) (define short-options (string->list "PHhsfiENxubvwAOeWkctgSJM") ) @@ -377,7 +380,7 @@ Usage: #{csc} [OPTION ...] [FILENAME ...] append mode -profile-name FILENAME name of the generated profile information file - -consult-type-file FILENAME load additional type database + -consult-types-file FILENAME load additional type database Optimization options: @@ -396,10 +399,10 @@ Usage: #{csc} [OPTION ...] [FILENAME ...] -inline-limit LIMIT set inlining threshold -inline-global enable cross-module inlining -specialize perform type-based specialization of primitive calls - -oi -emit-inline-file FILENAME generate file with globally inlinable + -oi -emit-inline-file FILENAME generate file with globally inlinable procedures (implies -inline -local) -consult-inline-file FILENAME explicitly load inline file - -ot -emit-type-file FILENAME write type-declaration information into file + -ot -emit-types-file FILENAME write type-declaration information into file -no-argc-checks disable argument count checks -no-bound-checks disable bound variable checks -no-procedure-checks disable procedure call checks @@ -747,7 +750,7 @@ EOF (set! rest (cdr rest))) ((-ot) (check s rest) - (t-options "-emit-type-file" (car rest)) + (t-options "-emit-types-file" (car rest)) (set! rest (cdr rest))) [(-) (set! scheme-files (append scheme-files '("-"))) diff --git a/egg-compile.scm b/egg-compile.scm index 2e22fdfe..53e8213d 100644 --- a/egg-compile.scm +++ b/egg-compile.scm @@ -454,7 +454,7 @@ options) (if (and types-file (not predefined-types)) - (list "-emit-type-file" + (list "-emit-types-file" (quotearg (prefix srcdir (conc types-file ".types")))) '()) (if inline-file @@ -493,7 +493,7 @@ options) (if (and types-file (not predefined-types)) - (list "-emit-type-file" + (list "-emit-types-file" (quotearg (prefix srcdir (conc types-file ".types")))) '()) (if inline-file diff --git a/scrutinizer.scm b/scrutinizer.scm index a330d4e0..4869cc6b 100644 --- a/scrutinizer.scm +++ b/scrutinizer.scm @@ -29,7 +29,7 @@ (uses data-structures expand extras pathname port support internal)) (module chicken.compiler.scrutinizer - (scrutinize load-type-database emit-type-file + (scrutinize load-type-database emit-types-file validate-type check-and-validate-type install-specializations ;; Exported for use in the tests: match-types refine-types type<=?) @@ -1769,8 +1769,8 @@ (call-with-input-file dbfile read-expressions)) #t))) -(define (emit-type-file source-file type-file db block-compilation) - (with-output-to-file type-file +(define (emit-types-file source-file types-file db block-compilation) + (with-output-to-file types-file (lambda () (print "; GENERATED BY CHICKEN " (chicken-version) " FROM " source-file "\n") diff --git a/support.scm b/support.scm index 9136c35c..8d9baac2 100644 --- a/support.scm +++ b/support.scm @@ -1746,8 +1746,8 @@ Usage: chicken FILENAME [OPTION ...] -accumulate-profile executable emits profiling information in append mode -no-lambda-info omit additional procedure-information - -emit-type-file FILENAME write type-declaration information into file - -consult-type-file FILENAME load additional type database + -emit-types-file FILENAME write type-declaration information into file + -consult-types-file FILENAME load additional type database Optimization options: diff --git a/tests/runtests.bat b/tests/runtests.bat index bfc245e5..67fd2e6f 100644 --- a/tests/runtests.bat +++ b/tests/runtests.bat @@ -103,7 +103,7 @@ if errorlevel 1 exit /b 1 echo ======================================== specialization tests ... del /f /q foo.types foo.import.* -%compile% specialization-test-1.scm -emit-type-file foo.types -specialize -debug ox -emit-import-library foo +%compile% specialization-test-1.scm -emit-types-file foo.types -specialize -debug ox -emit-import-library foo if errorlevel 1 exit /b 1 a.out if errorlevel 1 exit /b 1 diff --git a/tests/runtests.sh b/tests/runtests.sh index 75807689..04a8ade3 100755 --- a/tests/runtests.sh +++ b/tests/runtests.sh @@ -127,7 +127,7 @@ $compile scrutiny-tests-strict.scm -strict-types -specialize echo "======================================== specialization tests ..." rm -f foo.types foo.import.* -$compile specialization-test-1.scm -emit-type-file foo.types -specialize \ +$compile specialization-test-1.scm -emit-types-file foo.types -specialize \ -debug ox -emit-import-library foo ./a.out $compile specialization-test-2.scm -types foo.types -types specialization-test-2.types -specialize -debug ox -- 2.11.0