[m-rev.] for review: analysis file caching

Julien Fischer juliensf at csse.unimelb.edu.au
Thu Jul 24 22:03:36 AEST 2008


On Wed, 23 Jul 2008, Peter Wang wrote:

> Branches: main
>
> Add a caching feature for `mmc --make' so as to avoid reparsing the same
> `.analysis' files repeatedly when many modules in the program or library
> import similar sets of modules.
>
> An `.analysis_cache' file contains a binary representation of the parsed
> information in its corresponding `.analysis' file.  These can be faster to
> load, under certain conditions.  Cache files are stored in
> `Mercury/analysis_cache' or `Mercury/<grade>/<arch>/Mercury/analysis_cache'
> for the duration of a single make target.  Afterwards the directory is
> deleted.  This avoids stale cache files lying around which are incompatible
> between different versions of the compiler, host platform, etc.
>
> compiler/libs.m:
> compiler/pickle.m:
> 	Add a module in libs to un/serialise arbitrary data structures.
>
> compiler/options.m:
> 	Add `--analysis-file-cache' and `--analysis-file-cache-dir <dir>'
> 	(internal option).
>
> compiler/analysis.file.m:
> 	Read and write analysis cache files if the cache directory is set.
> 	Cache files are written after `.analysis' files are written (if
> 	changed) or after an `.analysis' file is read (if it didn't exist).
>
> compiler/make.program_target.m:
> 	For certain targets, set up the analysis cache directory before
> 	running the build procedure, and remove it afterwards.
>
> compiler/module_cmds.m:
> 	Add a version of update_interface that returns whether the
> 	interface file changed.
>
> doc/user_guide.texi:
> 	Add commented out documentation for `--analysis-file-cache'.

That looks okay.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list