~ chicken-core (chicken-5) d390148915b98e635732efab5528a0222a19ec9d
commit d390148915b98e635732efab5528a0222a19ec9d Author: Evan Hanson <evhan@foldling.org> AuthorDate: Sat Jan 2 13:22:14 2016 +1300 Commit: Evan Hanson <evhan@foldling.org> CommitDate: Tue Mar 8 22:52:32 2016 +1300 Add "-consult-type-file" flag for consistency with inline feature diff --git a/batch-driver.scm b/batch-driver.scm index 1befcae0..3d07046b 100644 --- a/batch-driver.scm +++ b/batch-driver.scm @@ -677,7 +677,7 @@ (lambda (fn) (or (load-type-database fn enable-specialization #f) (quit-compiling "type-database `~a' not found" fn))) - (collect-options 'types)) + (collect-options 'consult-type-file)) (for-each (lambda (id) (load-type-database diff --git a/c-platform.scm b/c-platform.scm index 267e07e6..1419de4b 100644 --- a/c-platform.scm +++ b/c-platform.scm @@ -108,8 +108,9 @@ output-file include-path heap-size stack-size unit uses module keyword-style require-extension inline-limit profile-name prelude postlude prologue epilogue nursery extend feature no-feature - consult-inline-file types - emit-import-library emit-inline-file emit-type-file)) + emit-inline-file consult-inline-file + emit-type-file consult-type-file + emit-import-library)) ;;; Standard and extended bindings: diff --git a/csc.scm b/csc.scm index ffbe6469..4bc5900c 100644 --- a/csc.scm +++ b/csc.scm @@ -167,9 +167,9 @@ '(-debug -heap-size -nursery -stack-size -compiler -unit -uses -keyword-style -optimize-level -include-path -database-size -extend -prelude -postlude -prologue -epilogue -inline-limit -profile-name - -emit-inline-file -types -emit-type-file - -feature -debug-level - -consult-inline-file + -emit-inline-file -consult-inline-file + -emit-type-file -consult-type-file + -feature -debug-level -emit-import-library -module -no-feature)) @@ -189,7 +189,8 @@ (-u "-unsafe") (-j "-emit-import-library") (-n "-emit-inline-file") ; DEPRECATED - (-b "-block") ) ) + (-b "-block") + (-types "-consult-type-file"))) (define short-options (string->list "PHhsfiENxubvwAOeWkctgSJM") ) @@ -386,7 +387,7 @@ Usage: #{csc} FILENAME | OPTION ... append mode -profile-name FILENAME name of the generated profile information file - -types FILENAME load additional type database + -consult-type-file FILENAME load additional type database Optimization options: diff --git a/defaults.make b/defaults.make index 4da9a76a..d771c8fc 100644 --- a/defaults.make +++ b/defaults.make @@ -246,7 +246,7 @@ else CHICKEN_OPTIONS += -no-warnings endif ifndef BUILDING_CHICKEN_BOOT -CHICKEN_OPTIONS += -specialize -types $(SRCDIR)types.db +CHICKEN_OPTIONS += -specialize -consult-type-file $(SRCDIR)types.db endif CHICKEN_OPTIONS += $(EXTRA_CHICKEN_OPTIONS) CHICKEN_LIBRARY_OPTIONS = $(CHICKEN_OPTIONS) -explicit-use -no-trace diff --git a/manual/Types b/manual/Types index 74460d86..6d5de107 100644 --- a/manual/Types +++ b/manual/Types @@ -237,9 +237,9 @@ the type declarations retained in this manner: {{-emit-type-file FILENAME}} writes the type-information for all declared definitions in an internal format to {{FILENAME}}. -{{-types FILENAME}} loads and registers the type-information in -{{FILENAME}} which should be a file generated though a previous use of -{{-emit-type-file}}. +{{-consult-type-file FILENAME}} loads and registers the type-information +in {{FILENAME}} which should be a file generated though a previous use +of {{-emit-type-file}}. If library code is used with {{require-extension}} or {{(declare (unit ...))}} and a {{.types}} file of the same name exists in the diff --git a/manual/Using the compiler b/manual/Using the compiler index 8655fb8f..93700f33 100644 --- a/manual/Using the compiler +++ b/manual/Using the compiler @@ -58,7 +58,7 @@ the source text should be read from standard input. ; -emit-inline-file FILENAME : Write procedures that can be globally inlined in internal form to {{FILENAME}}, if global inlining is enabled. Implies {{-inline -local}}. If the inline-file would be empty (because no procedure would be inlinable) no file is generated and any existing inline-file with that name is deleted. -; -emit-type-file FILENAME : Write type-information for declarations of user-defined and globally visible variables to a file of the given name. The generated file is suitable for use with the {{-types}} option. +; -emit-type-file FILENAME : Write type-information for declarations of user-defined and globally visible variables to a file of the given name. The generated file is suitable for use with the {{-consult-type-file}} option. ; -explicit-use : Disables automatic use of the units {{library, eval}} and {{expand}}. Use this option if compiling a library unit instead of an application unit. @@ -155,7 +155,7 @@ the source text should be read from standard input. ; -strict-types : Assume that the type of variables is not changed by assignments. This gives more type-information during specialization, but violating this assumption will result in unsafe and incorrectly behaving code. -; -types FILENAME : load additional type database from {{FILENAME}}. Type-definitions in {{FILENAME}} will override previous type-definitions. +; -consult-type-file FILENAME : load additional type database from {{FILENAME}}. Type-definitions in {{FILENAME}} will override previous type-definitions. ; -compile-syntax : Makes macros also available at run-time. By default macros are not available at run-time. diff --git a/support.scm b/support.scm index 89538b6a..81944765 100644 --- a/support.scm +++ b/support.scm @@ -1714,8 +1714,8 @@ Usage: chicken FILENAME OPTION ... -accumulate-profile executable emits profiling information in append mode -no-lambda-info omit additional procedure-information - -types FILENAME load additional type database -emit-type-file FILENAME write type-declaration information into file + -consult-type-file FILENAME load additional type database Optimization options:Trap