Estimated hours taken: 0.25
tools/bootcheck:
Pass the value of the --use-subdirs option down to
subprocesses via the MMAKE_USE_SUBDIRS environment variable.
This ensures that `tools/bootcheck --use-subdirs' actually
uses `--use-subdirs' when building the stage2 and stage3
compilers and when running the test suite.
Estimated hours taken: 6
Fix various invasions of the user's namespace by `mercury_builtin.m',
by splitting mercury_builtin.m into two modules, called builtin.m and
private_builtin.m, and ensuring that the latter is imported as if
by `:- use_module' rather than `:- import_module'.
library/builtin.m:
library/private_builtin.m:
Split mercury_builtin.m into two modules, builtin.m,
which contains stuff intended to be public,
and private_builtin.m, which contains implementation
details that are not supposed to be public.
library/mercury_builtin.m:
Add a comment saying that this module is no longer used, and
should eventually be removed. I have not removed it yet, since
that would prevent bootstrapping with the current compiler. It
will be removed as a seperate change later, once all the
changes have propagated.
compiler/prog_util.m:
Change the definition of mercury_private_builtin_module/1 and
mercury_public_builtin_module so that instead of automatically
importing mercury_builtin.m as if by `import_module', the
copiler will now automatically import builtin.m as if by
`import_module' and private_builtin.m as if by `use_module'.
compiler/polymorphism.m:
Change a call to mercury_private_builtin_module/1 for
unsafe_promise_unique to instead call mercury_public_builtin_module/1.
compiler/unify_proc.m:
Avoid hard-coding "mercury_builtin" by instead
calling one of mercury_{private,public}_builtin_module/1.
runtime/mercury_type_info.[ch]:
library/term.m:
library/std_util.m:
compiler/code_util.m:
Change a few hard-coded instances of "mercury_builtin"
to "builtin" or "private_builtin" as appropriate.
runtime/mercury_trace_util.c:
runtime/mercury_trace_internal.c:
library/prolog.m:
compiler/*.m:
Update comments that refer to "mercury_builtin" to instead
refer to either "builtin" or "private_builtin".
doc/Mmakefile:
Don't include the interface to private_builtin.m in the
library reference manual.
tools/bootcheck:
Add `-p'/`--copy-profiler' option. This is needed to get
the above changes to bootstrap.
tools/test_mercury:
Pass `-p' to tools/bootcheck.
tests/term/*.trans_opt_exp:
s/mercury_builtin/builtin/g
Estimated hours taken: 1
tools/bootcheck:
If we can't make stage 1, try again after doing "mmake depend"
in the library and the compiler directories. This cuts down
on the number of times when
you finish work on something
you do a cvs update
you fix the conflicts
you set off an overnight bootcheck
in the morning you find out that you should have done
an mmake depend because the update added a new file
tools/test_mercury:
Now that runtests does mmake realclean instead of mmake clean in
the benchmark directory if the tests succeed, recreate the .dep
files explicitly before doing the profiling test.
Estimated hours taken: 0.2
tools/bootcheck:
Add a new option, -d <dir> or --test-dir <dir>, which runs tests
only in the named directory. This is most useful in conjunction
with -T, when you want to know whether a change in the runtime
or test setup is sufficient to cure a problem in a given test dir.
Reorder option handling to be alphabetical.
When -T is given, and the script does not do a bootstrap check,
do not treat this as the failure of the bootstrap check.
tools/binary_step:
Simplify the code a bit.
Estimated hours taken: 0.1
tools/bootcheck:
Do not copy the stage 1 compiler into a separate directory,
use the existing copy in the compiler directory.
Estimated hours taken: 0.1
tools/bootcheck:
Remove the stage 2 object files as soon as the stage 2 executable
has been successfully created, unless the new -k/--keep-obj option
is given. (We still keep them if stage 2 fails, since they may
be useful in analyzing why.)
This will help us make the most of our limited disk resources,
so we can waste them more productively :-)
Estimated hours taken: 6
Fix some problems with the `--use-subdirs' option.
The compiler itself now compiles and bootstraps fine with --use-subdirs.
compiler/modules.m:
Put `.h' files in the source directory, rather than
in the `Mercury/hs' subdirectory.
compiler/mercury_compile.m:
scripts/Mmake.rules:
If `--use-subdirs' is enabled, pass `-I.' to the C compiler,
so that #include statements work relative to the source directory
rather than relative to the `Mercury/cs' subdirectory.
scripts/Mmake.vars.in:
Define $(cs_subdir), $(os_subdir) etc. variables;
these are set to the directory to use for .c, .o, etc. files,
(including the trailing `/'), or to the empty string,
if --use-subdirs is not set.
scripts/Mmake.rules:
Use $(cs_subdir), $(os_subdir) etc. to avoid the code
duplication created by my previous change to handle
--use-subdirs.
Also add lots of comments, and reorder the code
in a more logical order.
Mmakefile:
library/Mmakefile:
compiler/Mmakefile:
profiler/Mmakefile:
tests/term/Mmakefile:
tests/valid/Mmakefile:
Use $(cs_subdir), $(os_subdir) etc. to fix a few hard-coded
file-names (e.g. *.dep, *_init.[co], tree234.o) that were
used in some of the rules.
library/Mmakefile:
Add `rm -f tags' to the rule for `mmake realclean'.
tools/bootcheck:
Add `--use-subdirs' option (defaults to setting of the
MMAKE_USE_SUBDIRS environment variable).
Change the code which compares the stage2 & stage3 C files
to use the appropriate location for them based on the
setting of this option.
Estimated hours taken: 0.1
tools/bootcheck:
Generalize the code that standardizes path names by recognizing some
more names under which /home/mercury* can be mounted. This allows
bootchecks on mundook.
Make sure that when we remove the stage2 or stage3 directory contents,
we also remove files whose names start with a period.
Estimated hours taken: 0.5
tools/bootcheck:
Fix a bug: to make all the interface files in the library
directory, it needs to do `mmake all-ints', not `mmake ints'.
(This caused problems with library.int3; previously it happened
to work becaused that file used to get made from the compiler
directory, but that doesn't work anymore, because we don't
allow path names in command-line arguments anymore.)
Estimated hours taken: 1
scripts/mgnuc.in:
Use a new environment variable MERCURY_ALL_C_INCL_DIRS, which may
be defined by the user as a list of -I<dir> options, whose default
value is -I$MERCURY_C_INCL_DIR. This replaces MERCURY_GC_INCL_DIR.
The advantage of the new arrangement is that it allows the garbage
collector header files to be in more than one directory, as they
are with the Boehm collector (the file gc_inl.h, which is needed at
-O6, is in boehm_gc/include, while the usual gc.h is in boehm_gc).
tools/bootcheck:
Set up MERCURY_ALL_C_INCL_DIRS instead of MERCURY_GC_INCL_DIR.
Tidy some other parts of the script.
doc/user_guide.texi:
Document the change.
Estimated hours taken: 0.5
tools/bootcheck:
Set things up so that the test suite is not just compiled
with the stage2 compiler and libraries, but also with the
stage 2 header files, runtime system garbage collector
and utility programs.
Add a new option, -T, that tells bootcheck not to create stages
2 & 3, and instead runs only the test suite. This is now different
from simply invoking runtests, since that would not set up
the environment to test stage 2. This option is useful if
you find a problem with the tests themselves and want to see
whether a modification you made to them fixes the problem.
Estimated hours taken: 0.25
.README.in:
Mmakefile:
bindist/Mmakefile:
bindist/bindist.Makefile.in:
tools/bootcheck:
Delete all references to `lp_solve'. It is not needed anymore,
now that we have written our own solver.
Estimated hours taken: 0.25
tools/bootcheck:
Link the `lp_solve' directory into the stage2, stage3,
and stage2sicstus directories, so that `mmake all' works.
Estimated hours taken: 1
Fix a bug that was stopping the compiler from being installed correctly.
tools/bootcheck:
Create links to library.nu.nl.in in the stage 2 and 3 directories.
(Remove old links to library.m.in at the same time, as it no
longer exists).
These missing links were causing the install to fail, because
the test_mercury script installs from the stage 2 directory.
(This was in turn leading to an out-of-date compiler being use
for the tests, so that newly modified test cases would fail
by giving the old behaviour).
Estimated hours taken: 0.1
Localize the definition of the version number into a single file.
Automate the building of releases, including daily "rotd"
(release-of-the-day) releases.
tools/bootcheck:
Link .README.in and .INSTALL.in into the stage2 & stage3 directories,
since they're need by the `all' target.
Estimated hours taken: 0.25
Localize the definition of the version number into a single file.
Automate the building of releases, including daily "rotd"
(release-of-the-day) releases.
tools/bootcheck:
When creating the stage2 and stage3 directories,
link in the VERSION and library/library.m.in files.
clashing with the default rule for creating a `.init' file
in the automatically-generated `library/library.dep' file.
The initialization for the library is different to the
standard automatically-generated initialization, because
the library contains C code that needs explicit initialization.
(because it has BEGIN_MODULE ... END_MODULE macros in it); this
C code hence has `INIT blah' comments in it naming functions that
need to be inserted in the `.init' file so that they will be called
at initialization time.
Mmakefile:
library/Mmakefile:
compiler/Mmakefile:
profiler/Mmakefile:
tools/bootcheck:
tools/linear:
tools/binary:
s/library.init/libmercury.init/g
Estimated hours taken: 1
tools/bootcheck:
Implement the following new options:
-s, --sicstus
As well as running the normal bootcheck, also
build a SICStus Prolog version of the compiler
and check it against the stage 2 directory.
--keep-stage-2-sicstus
Don't rebuild the SICStus stage 2 directory
from scratch after building stage 1. Instead
use the existing SICStus stage 2 directory.
Also a few other minor changes:
- use `&&' rather than `;'
- avoid problems with symbolic links to /mount/munkora/...
not working on mundook, by setting root=$trueroot.
Estimated hours taken: 1
Link against the stage 2 libraries when running tests, so that
binary incompatabilities don't fail tests that they will pass when
the libraries are installed.
tools/bootcheck:
Add and export MERCURY_LIBS=... before running tests.
Estimated hours taken: 1.5
binary, bootcheck:
If the environment variable RMSTAGECMD is defined, use it as a prefix
on commands to remove stages. This enables those with munkora accounts,
i.e. me :-) and noone else :-( to execute the rm command on munkora,
which is faster than removing large numbers of files across NFS.
bootcheck:
Exit with a non-zero status if the tests directory can't be found.
This should encourage people to run the tests.
optstages:
A script to break up the output of mc --debug-opt into several files,
each containing the output of one optimization stage. This makes it
easier to run diff and see what has changed.
Estimated hours taken: 0.1
bootcheck:
Since we now remove stage3 after success of the bootstrap, use the
stage2 library for the tests. (We used to use the stage3 library.)
Estimated hours taken: 0.1
tools/bootcheck:
If the stage2 and stage3 directories compare OK, then remove
the stage3 directory. This avoids unnecessary disk usage.
Estimated hours taken: 3
These changes have 2 parts:
* Fix a bug in unify_gen triggered by zoltans fix to a
bug triggered by dmo's graphics project and add a test
case for it.
* Fix a couple of small bugs in the testing procedures where
they required you to have . in your path.
mercury/compiler/code_exprn.m,
mercury/compiler/code_info.m:
add the predicate
code_{exprn,info}__materialize_vars_in_rval/5
which generates code to materialize the vars in an rval and
updates the exprn info appropriately.
This predicate was added because it is needed for generating
the sub-unifications where a deconstruction has assignments
into the term (ie field(....) = var; rather than the other
way around).
mercury/compiler/exprn_aux.m:
export exprn_aux__vars_in_rval.
mercury/compiler/follow_vars.m:
fix a singleton variable warning.
mercury/compiler/unify_gen.m:
When generating code to assign into the fields of a term
within a deconstruction, materialize any variables in the
the field expression (into which you are going to assign)
before doing the assignment. Before this fix, the code generator
was emitting code that contained var(M), which with certain
combinations of opt flags was causing an abort in llds_out.
tests/runtests:
tiny bugfix so that runtests works for people who don't have `.'
in their path.
tests/valid/Mmake:
enable `two_way_unif' which tests the bugfix in unify_gen shown above
mercury/tools/bootcheck:
tiny bugfix so that runtests works for people who don't have `.'
in their path.
Estimated hours taken: 2
bootcheck:
By default, execute all the tests after verifying that the compiler
compiles itself to a fix point. Don't execute the tests if called
with the -t option.
makebatch:
Pass the -t option to bootcheck if makebatch is itself called with -t.
test_mercury:
Run the tests on the bootstrapped compiler *before* installing it,
and don't install it unless it passes all the tests.
Cycle through a list of different parameter settings, so that
in general different nightly runs use different sets of options.
Call bootcheck with -r, since some of these options may cause
a compilation model difference between the current and new compiler.
list.*:
Lists of parameter settings for various machines.
expand_params:
Expand the paramater settings from one line of a list.x file
into a Mmake.param file
cur_param:
Report which line in a list.x file is the current one.
next_param:
Advance the current line in a list.x file. When we reach the end,
we start again at the start.
Estimated hours taken: 0.1
bootcheck:
Remove library and compiler subdirectories of stage[23] in parallel
to minimize the impact of single-threaded rm commands across NFS.
Estimated hours taken: 0.25
tools/bootcheck:
When creating the stage2 & stage3 directories, link the `.nl'
files from the library subdirectory. (Zoltan commented those
links out in his last change, but they're necessary for
`make install' in the stage 2 directory to work.)
Estimated hours taken: 0.1
bootcheck:
Link a smaller number of modules at a time to the stage2 directories.
This ought to fix the problem with muse's argument vector overflowing.
test_mercury:
Fix a comment.
Estimated hours taken: 2
bootcheck, binary, linear:
Link to absolute, not relative path names, since relative path names
do not work back across symbolic links.
binary, linear:
Allow the user to give an initial list of suspects.
assemble, binary, linear:
Allow negative searches, i.e. searches in which the base version is
the bad version and we want to see which module "fixes" the problem
caused by the other modules, as opposed to normal searches in which
we are looking for the module that introduces the problem.
Estimated hours taken: 0.5
I moved the scripts bootcheck, binary, binary_step, divide and assemble
into the tools subdirectory from the main mercury directory.
I also added the auxiliary scripts appears, cleanint and half.
I modified binary and binary_step to compare stage3 with stage2.ok,
and only pass a stage2 compiler if the comparison finds no differences.
This requires that the Mmake.params files be copied, not linked, from
the top level's Mmake.stage2.params. The old behavior (no comparison)
is still available; just specify -c (compile-only).
Estimated hours taken: 0.1
NEWS:
Mention --inlining.
bootcheck:
If there is a file named Mmake.stage.params in the top-level directory,
copy this to become Mmake.params in the stage[23] directories. This
makes it much easier to have the stage1 compiler compiled with
different optimization levels (or other options) than you want to
use for a bootcheck.
Estimated hours taken: 6
configure.in:
Rename BRANCH_DELAY_SLOT to HAVE_DELAY_SLOT.
bootcheck:
Add a new option, -r. If given, this makes a copy of the runtime
directory instead of linking to it in stage[23]. This allows the
stage[23] versions to use a different grade than stage1.
Another change is that we now remake only the library and compiler
dependencies, but not the profiler dependencies.
binary:
A shell script to find code generation and optimization bugs by
performing binary search. It depends on the existence of two
directories, stage2.ok and stage2.bad, containing correct and buggy
versions of stage2, and tries different mixes of .c code from each
until it locates the offending part of the offending .c file.
Note that this script has so far been tested only in pieces.
binary_step:
Check whether a particular mix of .c files from the ok and bad
directories is able to build a stage3 compiler. It doesn't check
for differences from stage2, since stage2 is a patchwork.
divide:
Divide a .c file into its parts.
assemble:
Assemble a .c file, with the specified parts coming from the .c file
in stage2.bad and the others from stage2.ok.
NOTE: these scripts require some other auxiliary scripts. I will put these
into /usr/local/contrib when it is created on cyclone. In the meantime,
they are in ~zs/bin/script.
Estimated hours taken: 0.1
mercury/bootcheck:
Change it so that it doesn't output some of the less useful but
more verbose trace messages when linking the stage[23] directories.
Estimated hours taken: 0.15
mercury/bootcheck:
Use relative symbolic links, rather than absolute ones.
This avoids overflowing limits on command line lengths on IRIX 5.3.
automatically generated `.c' files lying around. (The aim of this
change is to cut down on disk space usage!)
mercury/bootcheck:
Pass `RM_C=:' to mmake when making the stage2 compiler, so
that the intermediate `.c' files don't get removed.
reason mercury_profiler.dep was getting the wrong contents every time.
Avoid linking *.m.in to the new library directories, since there are
no files matching this pattern there, and sh mishandles filename expansion
in such circumstances.
bootcheck:
Don't use `getopts' since it isn't portable.
Add long versions of all the options.
Add a -h/--help option and improve the help message.
Add new --keep-stage-2 and --keep-stage-3 options.
bootcheck:
Use "$0" rather than "bcheck" in usage message.
Also link library.init into the stage2 & stage3 directories,
since it is used to create mercury_compile_init.c now.