[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

new feature in TC 1.3



The following feature of TC 1.3 was not described in the release notice.

The syntax of (ENV ...) clauses in (HERALD ...) forms has been extended
so that support files may be "cached."  This should make compilation somewhat
faster, because now support files need only be loaded once when starting up
a compiler, instead of for each file to be compiled.

(HERALD file-identifier
	...
	(ENV env-identifier . other-required-support)
	...)

"Env-identifier" names a "support environment".  Support environments
contain macro definitions and early binding information.  Initially
there is one support environment called T which defines macros and early
bindings for the basic T language.  Other such support environments may
be created as described below.  When a file is compiled, a support
environment is created which consists of the environment named by
"env-identifier" overlaid with support obtained from the
"other-required-support" files.  This environment is used during
compilation to obtain macros and early bindings.

To create a new support environment, evaluate the following in the compiler,
e.g. at the read-eval-print loop or in a "tcinit.t":

(*DEFINE-SUPPORT-ENV name support-list)

E.g.

> (*DEFINE-SUPPORT-ENV 'FOO '((FOO BAR) (FOO BAZ)))

The procedure *DEFINE-SUPPORT-ENV will create a support file, make it
accessible by the name FOO, and load support files BAR and BAZ from
logical directory name FOO into it.  In this context the following
HERALD forms will be equivalent:

(HERALD FILE (ENV T (FOO BAR) (FOO BAZ)))

(HERALD FILE (ENV FOO))

but the second will take a lot less time to process.

Please note again that we are aware that this system of support files
etc. is something of a kludge.  We are planning to design and implement
something more reasonable in the way of source control this summer or
fall.