diff --git a/csug/system.stex b/csug/system.stex index 03fac9ee9b..ba426df45c 100644 --- a/csug/system.stex +++ b/csug/system.stex @@ -2404,6 +2404,18 @@ referenced libraries are known to be present and already invoked, and only when it's worth saving the small overhead of representing and running the check. +%---------------------------------------------------------------------------- +\entryheader +\formdef{compile-omit-concatenate-support}{\categorythreadparameter}{compile-omit-concatenate-support} +\listlibraries +\endentryheader + +\noindent +This boolean-valued parameter determines whether code compiled to a +file or port includes information needed to support +\scheme{concatenate-object-files}. Omitting the information can +provide minor space and load-time savings for small compiled objects. + \section{Source Directories and Files\label{SECTSYSTEMSOURCE}} diff --git a/s/back.ss b/s/back.ss index e7341caaf5..5ceeb067a1 100644 --- a/s/back.ss +++ b/s/back.ss @@ -214,6 +214,9 @@ [(maximum) (constant COMPRESS-MAX)] [else ($oops who "~s is not a supported level" x)]))])) +(define-who compile-omit-concatenate-support + ($make-thread-parameter #f (lambda (x) (and x #t)))) + (define-who debug-level ($make-thread-parameter 1 diff --git a/s/compile.ss b/s/compile.ss index 16ceb4a94f..751068a838 100644 --- a/s/compile.ss +++ b/s/compile.ss @@ -780,8 +780,11 @@ [(revisit-stuff) x (c-print-fasl x op (constant fasl-type-revisit))] [else (c-print-fasl x op (constant fasl-type-visit-revisit))])) final*)) - ; inserting #t after lpinfo as an end-of-header marker - (append lpinfo** (cons (list `(object #t)) final**))))))))) + (append lpinfo** + (if (compile-omit-concatenate-support) + final** + ;; inserting #t after lpinfo as an end-of-header marker + (cons (list `(object #t)) final**)))))))))) (define (new-extension new-ext fn) (let ([old-ext (path-extension fn)]) diff --git a/s/primdata.ss b/s/primdata.ss index 5539bb54bd..e7ca9c7dcf 100644 --- a/s/primdata.ss +++ b/s/primdata.ss @@ -1230,6 +1230,7 @@ (compile [sig [(sub-ptr) (sub-ptr environment) -> (ptr ...)]] [flags]) (compile-file [sig [(pathname) (pathname pathname) (pathname pathname sub-symbol) -> (void)]] [flags true]) (compile-library [sig [(pathname) (pathname pathname) (pathname pathname sub-symbol) -> (void)]] [flags true]) + (compile-omit-concatenate-support [sig [() -> (boolean)] [(ptr) -> (void)]] [flags unrestricted]) (compile-port [sig [(textual-input-port binary-output-port) (textual-input-port binary-output-port maybe-sfd) (textual-input-port binary-output-port maybe-sfd maybe-binary-output-port) (textual-input-port binary-output-port maybe-sfd maybe-binary-output-port maybe-textual-output-port) (textual-input-port binary-output-port maybe-sfd maybe-binary-output-port maybe-textual-output-port sub-symbol) (textual-input-port binary-output-port maybe-sfd maybe-binary-output-port maybe-textual-output-port sub-symbol maybe-binary-output-port) -> (void)]] [flags true]) (compile-program [sig [(pathname) (pathname pathname) (pathname pathname sub-symbol) -> (list)]] [flags true]) (compile-script [sig [(pathname) (pathname pathname) (pathname pathname sub-symbol) -> (void)]] [flags true])