... provided the source file map in Mercury.modules records this fact.
compiler/read_modules.m:
When asked to compile a given file, look up the name of the module
that we expect to find in that file in Mercury.modules, if it exists,
instead of just assuming that it corresponds *exactly* to the filename.
compiler/source_file_map.m:
Provide a predicate to provide the filename-to-modulename lookup
now needed by read_modules.m. (Previously, we had only modulename-to-
filename lookup.)
Make the code constructing some error messages easier to read.
tools/make_arena:
Copy compiler/Mercury.modules to the arena along with compiler/*.m.
(The motivation for this change was that I wanted to profile the
.profdeep compiler in workspace N by simply invoking "lmcN -C *.m"
in the arena directory.)
Estimated hours taken: 2
Branches: main
Move the intermodule analysis framework into the `compiler' directory, in
preparation for making it specific to the Mercury compiler, rather than having
it generic in case some fictional being might want to use it with a .NET
compiler one day. This will make it easier to use and modify.
compiler/analysis.file.m:
compiler/analysis.m:
Copy these files from the `analysis' directory.
compiler/top_level.m:
Include analysis.m as a new package.
compiler/Mercury.options:
Add a bug workaround line from analysis/Mercury.options.
analysis/Mercury.options:
analysis/Mmakefile:
analysis/analysis.file.m:
analysis/analysis.m:
analysis/mer_analysis.m:
Replace the contents of these files with comments that the analysis
framework is now in the `compiler' directory. We don't actually
delete them so their histories remain easily accessible.
analysis/README:
Mention that the code has been moved.
compiler/notes/compiler_design.html:
compiler/notes/overall_design.html:
Update documentation.
Mmake.workspace:
Mmakefile:
configure.in:
compiler/.mgnuc_copts:
compiler/COMP_FLAGS.in:
compiler/Mmakefile:
deep_profiler/.mgnuc_copts:
scripts/Mmake.vars.in:
scripts/c2init.in:
scripts/mercury_config.in:
scripts/prepare_tmp_dir_fixed_part.in:
tools/binary:
tools/binary_step:
tools/bootcheck:
tools/lmc.in:
tools/make_arena:
compiler/notes/coding_standards.html:
Remove references to the `analysis' directory and `libmer_analysis'.
Estimated hours taken: 12
Branches: main
Move the mdbcomp library to its own directory. To make this change less painful
to test, improve the way we handle installs.
browser/mdbcomp.m:
browser/mer_mdbcomp.m:
browser/prim_data.m:
browser/program_representation.m:
browser/trace_counts.m:
Move these files to the mdbcomp directory.
browser/Mmakefile:
browser/Mercury.options:
mdbcomp/Mmakefile:
mdbcomp/Mercury.options:
Split the contents of the old Mmakefile and Mercury.options file
in the browser directory between these files as appropriate.
Simplify away the stuff not needed now that there is only one library
per directory. Make the browser directory see the relevant files
from the mdbcomp directory.
Mmake.common.in:
Separate out the prefixes allowed in the browser and the mdbcomp
directories.
Mmake.workspace:
Set up a make variable to refer to the mdbcomp directory.
Adjust references to the mdbcomp library to point to its new location.
Mmakefile:
Make invocations visit the mdbcomp library as necessary.
Improve the way we install grades. Making temporary backups of the
directories modified by the install process is unsatisfactory for two
reasons. First, if the install fails, the cleanup script, which is
necessary for user friendliness, destroys any evidence of the cause.
Second, the restore of the backup wasn't perfect, e.g. it left the
.d files modified to depend on .mih files, which don't exist in
LLDS grades, and also left altered timestamps.
This diff changes the install process to make a single tmp_dir
subdirectory of the workspace, with all the work of install_grade
being done inside tmp_dir. The original directories aren't touched
at all.
*/Mmakefile:
Adjust references to the browser directory to refer to the mdbcomp
directory instead or as well.
scripts/Mmake.rules:
*/Mmakefile:
Make it easier to debug Mmakefiles. Previously, creating a
Mmake.makefile with mmake -s and invoking "make -d" ignored the
most fundamental rules of mmake, because Mmake.rules was treating
an unset MMAKE_USE_MMC_MAKE as if it were set to "yes", simply because
it was different from "no". This diff changes it to treat an unset
MMAKE_USE_MMC_MAKE as if it were set to "no", which is a more
sensible default.
scripts/prepare_tmp_dir_fixed_part.in:
scripts/scripts/prepare_tmp_dir_grade_part:
Two new scripts that each do half the work of preparing tmp_dir for
the real work of the install_grade make target. The fixed_part script
prepares the parts of tmp_dir that are grade-independent, while the
grade_part scripts prepares the parts that are grade-dependent.
configure.in:
Test C files in the mdbcomp directory to see whether they need to
be recompiled after reconfiguration.
Create prepare_tmp_dir_fixed_part from prepare_tmp_dir_fixed_part.in.
compiler/*.m:
runtime/mercury_wrapper.c:
Update the references to the moved files.
compiler/notes/overall_design.html:
Mention the new directory.
Estimated hours taken: 0.2
Branches: main
tools/speedtest:
Make the default test the compilation of the six biggest modules in the
compiler, since this is now needed for reasonable runtimes.
Make the compilation grade explicit, since different machines have
different defaults.
tools/make_arena:
Make the six biggest modules available in the arena.
Estimated hours taken: 2
Delete the trial directory, since its contents cannot be compiled anymore.
trial/*:
Delete these files.
tools/make_arena:
A new shell script that creates a directory "arena" that contains
some compiler source files and the interface files you need to compile
them. You can now do speed tests in this directory.
tools/speedtest:
Do speed tests in the arena directory, not the trial directory.