Estimated hours taken: 0.1
tools/test_mercury
Back out the addition of --intermod-unused-args to the
optimization flags on murlibobo until the installed compiler
contains the bug fixes I committed yesterday.
Estimated hours taken: 12
Bug fixes.
tests/term/arit_exp.m still fails with --intermodule-optimization
due to a slightly different (but correct) trans_opt file being produced.
compiler/simplify.m
Don't produce singleton disjunctions, since the code generator
barfs on them. Use a `some' instead.
Test case: tests/general/partition.m compiled with --deforestation.
compiler/unused_args.m
Deconstructions where the arguments included `any' insts were
not being handled correctly, due to inst_matches_binding
failing for any->any.
Test case: extras/trailed_update/samples/vqueens.m at -O3.
Don't warn about predicates from `.opt' files having unused
arguments, because in most cases the warning will be generated
when compiling the imported module.
compiler/higher_order.m
Fix a bug that caused compiler/modules.m to be miscompiled at
-O3 --intermodule-optimization, due to curried arguments for
multiple known higher-order arguments being passed to a
specialised version in the wrong order.
Test case: tests/hard_coded/ho_order2.m
compiler/mercury_compile.m
Call intermod__update_pred_import_status when compiling to
C at the same stage of the compilation as the `.opt' file
was written to ensure that the same information is being used.
Test case: tests/hard_coded/rational_test.m compiled with
--intermodule-optimization failed because of a link error.
Make sure polymorphism has been run before doing unused argument
checking with --errorcheck-only. Otherwise the argument indices
read in from `.opt' files are incorrect.
compiler/intermod.m
Use code_util__compiler_generated to test if a called predicate
is compiler generated, rather than looking for a call_unify_context
(function calls have a call_unify_context).
Add a progress message for updating the import status of predicates
exported to `.opt' files.
Fix a bug where the unused_args pragmas read in from the current
module's `.opt' file were given an import_status of `imported' rather
than `opt_imported' resulting in an error message from make_hlds.m.
compiler/dead_proc_elim.m
Ensure that predicates used by instance declarations and
`:- pragma export's are not eliminated by the dead_pred_elim
pass before typechecking.
Test case: most of the typeclass tests compiled with
--intermodule-optimization.
compiler/hlds_goal.m
Remove obsolete comments about the modes of a higher-order
unification being incorrect after polymorphism, since that
was fixed months ago.
compiler/options.m
Reenable deforestation.
Enable --intermodule-optimization and --intermod-unused-args
at -O5 so they get tested occasionally.
compiler/handle_options.m
Disable deforestation if --typeinfo-liveness is set, since
there are bugs in the folding code if extra typeinfos are
added to a new predicate's arguments by hlds_pred__define_new_pred.
Disable higher_order.m if --typeinfo-liveness is set, since
higher_order.m currently does not pass all necessary typeinfos
to specialised versions or update the typeinfo_varmap of
specialised versions.
Test case: tests/valid/agc_ho_pred.m
tests/hard_coded/ho_order2.m
tests/hard_coded/ho_order2.exp
Test case for higher_order.m.
tools/test_mercury
Added --intermod-unused-args to the options for murlibobo.
extras/trailed_update/{samples,tests}/Mmakefile
Add "-I.." to MGNUCFLAGS so gcc can find unsafe.h which
is #included in c_header_code read from unsafe.opt.
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: 0.25
tools/test_mercury:
tests/benchmark/poly.mprof-exp:
Change the existing test case for memory profiling so that it
actually checks the profile output, rather than just testing
that the profile can be created.
Estimated hours taken: 0.75
Add hydra to the nightly installation scripts.
tools/run_all_tests_from_cron:
tools/test_mercury:
Add hydra, using much the same options as mercury.
Estimated hours taken: 0.75
Add hydra to the nightly installation scripts.
tools/run_all_tests_from_cron:
tools/test_mercury:
Add hydra, using much the same options as mercury.
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.05
tools/binary:
Disable command echo in some more parts of the script where the
output is not informative but quite voluminous.
Estimated hours taken: 0.2
tools/binary:
Update to handle the changes in the development environment
over the last few months, e.g. the default removal of object
files from stage 2 directories, and the requirement for
the presence of the VERSION and library/debugger_interface.h
files.
Do not set up the stage 3 directory if it is not required.
Disable command echo in some parts of the script where the
output is not informative but quite voluminous.
Simplify the conditions of some if-then-elses.
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.5
tools/test_mercury:
extras/clpr/Mmakefile:
Fix a bug: when testing and installing the clpr stuff,
pass down the GRADE, EXTRA_CFLAGS, EXTRA_MCFLAGS variables.
extras/clpr/Mmakefile:
extras/clpr/samples/Mmakefile:
Delete the `--no-optimize-duplicate-calls' option; this
is no longer necessary now that we have `impure'.
Also don't set the grade explicitly, instead just use the
(less cryptic) `GRADEFLAGS = --use-trail'.
Estimated hours taken: 0.1
tools/install_webpage:
Use cvs co -kv to checkout the compiler/notes directory,
so the RCS tag names are removed from the final result
(gives neater looking "Last modified" bits).
The other webpage checkouts already do this.
Estimated hours taken: 1
tools/test_mercury:
- Delete special code to install `.tr' grades;
`.tr' grades are (now) included in the LIBGRADES computed by
configure.in, and so they are installed as part of the usual
`mmake install'.
- Test the `.memprof' grade on murlibobo.
Estimated hours taken: 1
extras/trailed_update/var.m:
Fix a bug (I had changed a function name in but forgotten
to change the caller).
extras/trailed_update/Mmakefile:
Add `-Werror' to MGNUCFLAGS, to prevent reoccurrence of bugs
like the one above.
Fix the rule for `mmake depend' so that it makes the
dependencies in the `samples' subdirectory too.
tools/test_mercury:
Test the trailed_update library.
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: 0.25
tools/test_mercury:
Install & test the `asm_fast.tr' grade on kryten and murlibobo
(previous we only did the `asm_fast.gc.tr' grade).
Install & test the `asm_fast.gc.tr' grade on mercury.
Estimated hours taken: 0.5
Split the distribution into
mercury-$VERSION.tar.gz (main distribution)
mercury-$VERSION-extras.tar.gz (extras directory)
Mmakefile:
Change rule for `tar' target to build
mercury-$(VERSION)-extras.tar.gz as well, and not put
extras in the main distribution.
tools/test_mercury:
Deal with extras tar files when creating stable releases, and
putting them on the ftp site.
Estimated hours taken: 0.25
tools/test_mercury:
Change the order in which things are tested: the CLP(R) stuff
requires Mmake.common to exist, so it needs to come before
we do `mmake realclean; mmake tar'.
Estimated hours taken: 0.25
tools/test_mercury:
Fix a bug in my previous change that caused /home/mercury
to become 100% full... I had put "fgrep '**' $logfile" into
the test_mercury script, whose output was fed back into the
logfile, leading to an infinite loop.
Estimated hours taken: 0.25
tools/test_mercury:
Checkout the `clpr' directory as mercury/extras/clpr on
murlibobo (so it will get included in the distribution)
and on kryten (so it can be tested).
On kryten, run the usual tests in the `asm_fast.gc.tr' grade,
and also test the `clpr' directory; change the optimization level
from `-O3' to `-O1', to reduce testing times (currently about
12 hrs on kryten).
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).