Trail segments have been the default in trailing grades since Mercury 20.06.
Delete the trseg grade components and --trail-segment option since apart from
acting as synonyms for the tr component and --use-trail option repsectively,
they no longer do anything.
compiler/compute_grade.m:
compiler/handle_options.m:
compiler/options.m:
doc/user_guide.texi:
grade_lib/grade_vars.m:
scripts/parse_grade_option.sh-subr:
grade_lib/grade_string.m:
grade_lib/grade_vars.m:
Delete the trseg grade component and --trail-segments option.
compiler/add_pragma.m:
Update the wording of an error message.
NEWS:
Announce the above.
extras/trail/Mercury.options:
extras/trailed_update/Mmakefile:
extras/references/Mercury.options:
tests/invalid/test_feature_set.err_exp:
Conform to the above changes
Discussion of these changes can be found on the Mercury developers
mailing list archives from June 2018.
COPYING.LIB:
Add a special linking exception to the LGPL.
*:
Update references to COPYING.LIB.
Clean up some minor errors that have accumulated in copyright
messages.
This file-specific setting will override a default setting of expandtabs
in $HOME/.vimrc.
*/Makefile:
*/Mmakefile:
As above.
tests/hard_coded/.gitignore:
Don't ignore the purity subdir. This ignore must have been left over
from when purity.m was a test in hard_coded, not hard_coded/purity,
and it ignored an executable, not a directory.
Branches: main
Fix bitrot in extras/trailed_update.
extras/trailed_updated/var.m:
Don't specify an initialisation predicated for the solver type var/1.
extras/trailed_updated/samples/interpreter.m:
Conform with the change that added an extra argument to the variable/2
constructor of the standard library type term/1.
extras/trailed_update/tests/var_test.m:
Use up-to-date syntax for modes.
extras/trailed_update/Mmakefile:
extras/trailed_update/samples/Mmakefile:
extras/trailed_update/tests/var_test.m:
Use trail segments since that's what you get in an installation by
default.
extras/trailed_update/*.m:
Update syntax and formatting to conform more closely to our
current coding standards.
Add require_feature_set pragmas for trailing.
Estimated hours taken: 0.5
Branches: main
Fix up some minor things in the extras distribution.
extras/cgi/Mmakefile:
Don't warn about mercury_www not exporting anything.
extras/complex_numbers/*.m:
Replace `:' as the module qualifier.
Use float.float/1 instead of the now obsolete
int.to_float/2.
extras/concurrency/midimon.m:
Replace `:' as the module qualifier.
extras/trailed_update/Mmakefile:
Don't warn about trailed_update not exporting anything.
extras/xml/*.m:
Replace `:' as the module qualifier.
Remove some unnecessary imports.
Put an underscore in front of an unused variable.
Estimated hours taken: 0.5
Branches: main
Remove the RM_C mmake variable, which controlled whether the intermediate
`.c' files were removed (now they never are).
The implementation was buggy (it didn't work with parallel makes), and
made it difficult to avoid always recompiling the `.c' file with smart
recompilation.
Mmake.common.in:
configure.in:
README.AIX:
bindist/bindist.build_vars.in:
bindist/bindist.configure.in:
scripts/Mmake.vars.in:
scripts/Mmake.rules:
compiler/modules.m:
tools/bootcheck:
tools/binary_step:
*/Mmakefile:
Remove references to RM_C, DEFAULT_RM_C and LIBRARY_RM_C.
compiler/modules.m:
The `.o' and `.pic_o' file now depends only on the `.c' file,
not on everthing the `.c' file depends on. The extra dependencies
were only needed because the intermediate `.c' file could
be removed by RM_C. This change is needed to avoid recompiling
unchanged `.c' files with smart recompilation.
Estimated hours taken: 4
Optionally test the extras directory during bootchecks.
tools/bootcheck
Add an option, -e, for testing the extras directory. Rename the
-T/--test-only option as -n/--no-bootcheck, since it does not prevent
the testing of the extras.
Bootcheck only test the subdirectories in extras which have an
Mmakefile and which can be tested in all grades and in all setups.
extras/*/Mmakefile:
Updates to include extras/Mmake.params if it exists (to get the
parameters, including grades, of the bootcheck) and to add a check
target, which in most cases does not do anything yet (which means
that the only testing we do is checking that the program compiles
all right). Making "mmake check" do something meaningful will be
up to the authors of the various subdirectories involved.
In many cases, add .PHONY annotations on the relevant targets,
and copyright notices.
extras/aditi/NOBOOTTEST:
Prevent the automatic testing of the aditi subdirectory from
bootcheck, since this can be done only on a machine with Aditi
installed.
extras/aditi/NOBOOTTEST:
Prevent the automatic testing of the aditi subdirectory from
bootcheck, since this can be done only on a machine with Aditi
installed.
extras/aditi/NOBOOTTEST:
Prevent the automatic testing of this subdirectory from bootcheck,
since this can be done only on a machine with Aditi installed.
extras/dynamic_linking/NOBOOTTEST:
Prevent the automatic testing of this subdirectory from bootcheck,
since this can be done only on a machine with the dl library already
installed.
extras/logged_out/NOBOOTTEST:
Prevent the automatic testing of this subdirectory from bootcheck,
since this can be done only in grades with the right kind of stream
support.
extras/odbc/NOBOOTTEST:
Prevent the automatic testing of this subdirectory from bootcheck,
since this can be done only on a machine with ODBC installed.
extras/references/NOBOOTTEST:
extras/trailed_update/NOBOOTTEST:
Prevent the automatic testing of this subdirectory from bootcheck,
since this can be done only in trailing grades.
extras/*/.nocopyright:
Mention the NOBOOTTEST files in the relevant .nocopyright files.
Estimated hours taken: 0.25
extras/trailed_update/Mmakefile:
Don't use the gcc `-Werror' option (treat warnings as errors)
in CFLAGS, since on some systems you get spurious warnings in
system header files which cannot easily be fixed.
Estimated hours taken: 1
tools/test_mercury:
Fix a bug: use different options for building and
installing the compiler and libraries than we use
for running the tests. We want to specify `--pic-reg'
for building the tests, so that they can use shared libraries,
but we can't use that when building the library,
because that would break the static versions of the
library.
Simplify the code a little, by putting the options
for building the extras in a file extras/Mmake.params.
Change the work-around that we use for profiling on
alphas: use the LD_BIND_NOW environment variable
rather than using static linking.
(Using static linking could conflict with the options
specified for building the tests.)
extras/clpr/Mmakefile:
extras/trailed_update/Mmakefile:
Include extras/Mmake.params.
Estimated hours taken: 0.25
extras/trailed_update/Mmakefile:
Add rules for `mmake clean' and `mmake realclean'
which invoke the respective targets in the subdirectories.
This should hopefully avoid some failures in the
trailed_update/tests subdirectory caught by the nightly test
script that were due to trying to rebuild in a different grade
without having done `mmake clean' in that subdirectory.
Estimated hours taken: 4.5
Fix some bugs in code generation for nondet disjunctions and
if-then-elses. The compiler was incorrectly releasing the temp stack
slots used to save the heap pointer and trail pointer at the start
of the else or the last clauses, thus allowing them to be reused not
only in the else case or the last clause, but also by goals following the
disjunction or if-then-else, even though the values in these slots might
be needed again on backtracking into the condition or the earlier
disjunctions.
Thanks to Warwick Harvey for reporting this bug.
compiler/code_info.m:
Add new predicate `code_info__maybe_reset_and_pop_ticket',
which is like `code_info__maybe_reset_and_discard_ticket',
except that it does not release the temp stack slot.
compiler/disj_gen.m:
compiler/ite_gen.m:
When generating code for nondet goals that save
and restore the hp and trail, if the saved
values might be needed again on backtracking
into the current goal from one that follows
(i.e. in nondet disjunctions and in if-then-elses
with nondet conditions), make sure we use
`code_info__maybe_reset_and_pop_ticket' and
`code_info__reset_hp' instead of
`code_info__maybe_reset_and_discard_ticket' and
`code_info__reset_and_discard_hp'.
compiler/code_info.m:
Include the temp_avail_slots in the set of things
that slap_code_info does not update. Temp slots
that were acquired (and not released) in one branch
of a branched goal need to be still reserved at the
end of the branched goal.
extras/trailed_update/Mmakefile:
extras/trailed_update/samples/Mmakefile:
extras/trailed_update/samples/tests.m:
extras/trailed_update/samples/tests.exp:
extras/trailed_update/tests/Mmakefile:
extras/trailed_update/tests/var_test.m:
extras/trailed_update/tests/var_test.exp:
Add a new subdirectory `tests' in extras/trailed_update,
and move the test case `tests.{m,exp}' from the samples
subdirectory into the tests subdirectory, at the same
time renaming it as `var_test.{m,exp}'.
extras/trailed_update/tests/Mmakefile:
extras/trailed_update/tests/func_trail_test.m:
extras/trailed_update/tests/func_trail_test.exp:
extras/trailed_update/tests/func_trail_test_2.m:
extras/trailed_update/tests/func_trail_test_2.exp:
Add a couple of regression tests for the bug mentioned above.
These tests need to go here rather than somewhere in the
main `tests' directory (e.g. `tests/hard_coded'), because
they only work in trailing grades, and the normal tests are
compiled in lots of grades, many of which don't have
corresponding trailing grades installed.
(I suppose we could put them in the main `tests' directory,
and only enable them for trailing grades, but it just seemed
easier to put them here.)
Estimated hours taken: 0.25
extras/clpr/Mmakefile:
extras/clpr/samples/Mmakefile:
extras/trailed_update/Mmakefile:
extras/trailed_update/samples/Mmakefile:
Use `GRADEFLAGS += --use-trail' instead of `GRADEFLAGS = --use-trail',
so that the definition of GRADEFLAGS doesn't override the default
definition `GRADEFLAGS = --use-grade $(GRADE)'. This means that
the specified GRADEFLAGS will modify the GRADE, rather than
replacing it.
Estimated hours taken: 0.1
extras/trailed_update/Mmakefile:
extras/trailed_update/samples/Mmakefile:
Use `GRADEFLAGS = --use-trail' rather than `GRADE=asm_fast.gc.tr'.
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: 3
extras/trailed_update/var.m:
Fix a bug in the code for detecting floundering.
Improve the error message for floundering slightly
(print out how many floundered goals there are).
extras/trailed_update/Mmakefile:
Add an `mmake check' target.
extras/trailed_update/samples/tests.exp:
Update the expected test output to reflect the new
floundering error message.
Estimated hours taken: 6
Various bug fixes and enhancements to var.m and other stuff in
extras/trailed_update.
extras/trailed_update/var.m:
Add code to detect floundering.
Change the code for debug_freeze/3 to avoid a floundering warning.
Add new predicates debug_freeze/4 (to go with debug_freeze/3)
and dump_var/3.
Fix a bug in freeze/3 (higher-order terms are monomorphic, so
there is no need to explicitly pass type-infos when calling them).
Fix a bug in wakeup_delayed_goals/2 (we need to set the binding
to ground _before_ waking up the goals).
extras/trailed_update/Mmakefile:
Add `ML = ml --mercury-libs shared', so that it will work on Linux.
extras/trailed_update/samples/Mmakefile:
Make it work with shared libraries on Linux.
extras/trailed_update/samples/tests.m:
extras/trailed_update/samples/tests.exp:
Some test cases for var.m.
extras/trailed_update/tr_store.m:
Add a prototype for ML_compare_typeinfo().
extras/trailed_update/unsafe.m:
Change the C code for unsafe_perform_io to match the new
interface for exported Mercury procedures that do I/O --
there is no longer any need to pass dummy io__state arguments
in the C code.