library/random.system_rng.m:
Better document the error behaviour of some predicates in this module.
Adjust the header comment to group the description of what happens
on Cygwin with the rest of the Windows description.
Adjust a comment.
compiler/unused_args_analysis.m:
New module containing the parts of the old unused_args.m
that deal with the intermodule analysis framework.
compiler/unused_args_base_ops.m:
New module containing the parts of the old unused_args.m
that define and operate on the main data structure we use
to find out which variables are unused.
compiler/unused_args_optimize.m:
New module containing the parts of the old unused_args.m
that "optimize out" unused arguments.
compiler/unused_args_warn_pragma.m:
New module containing the parts of the old unused_args.m
that generate warnings about unused arguments, and that generate
unused_args pragmas for .opt files. The module contains both
because they share the same test for whether we want to ignore
any unused arguments in a predicate.
compiler/unused_args.m:
Delete the moved code.
compiler/transform_hlds.m:
compiler/notes/compiler_design.html:
Include and document the new modules.
compiler/mercury_compile_middle_passes.m:
compiler/mmc_analysis.m:
Conform to the changes above.
library/*.m:
Remove tabled_for_io attributes from C# and Java foreign_procs.
I/O tabling is not supported by those backends.
Remove will_not_modify_trail attributes from C# and Java foreign_procs,
and from predicates that do I/O. They have no effect in the former and
cannot affect anything with the latter.
Fix a spot a where will_not_modify_trail was given, but
will_not_call_mercury was meant.
library/term_io.m:
foramt_term_nl/5 should call format_term_nl_with_op_table/6, *not*
format_term_with_op_table/6, otherwise the terminating ".\n" will
not be written.
tests/hard_coded/Mmakefile:
tests/hard_coded/format_term_nl.{exp,m}:
Add a regression test.
These were inadvertently broken by updates to programming style in
commit 185443d79.
library/rbree.m:
In the implementation of ucount, increment the count for the
current node.
tests/hard_coded/Mmakefile:
tests/hard_coded/rbtree_count.{m,exp}:
Add a regression test.
compiler/unused_args.m:
Rename the "usage_info" type to "required_by". Document the meaning
of its contents.
Rename the low-level predicates that operate on this data structure
accordingly. Make them fit consistently into the same pattern:
X_{is,are}_required_by_Y.
In the argument lists of these predicates, pass values of arg_var_in_proc
as a unit, instead of passing them as two separate components, one of which
was easily confusable with another argument that has the opposite role.
To make this possible *and* non-misleading, reorder arguments as needed.
In one case, replace a call to list.foldl with an explicit loop
to make the reordering possible.
Give the high-level predicates that operate on this data structure
more descriptive names as well. Document the logic behind the fixpoint
iteration.
compiler/unused_args.m:
Replace "fixup_x" naming scheme with "delete_unused_args_in_x".
Fix some misleading comments.
Add some comments on not-chosen alternative approaches.
Move a utility predicate to the end of the module,
and give it a simpler interface.
library/array.m:
library/builtin.m:
library/construct.m:
Fix copy-and-paste errors.
library/arrayd2d.m:
Use the mode array2d_di instead of array_di in a spot.
Delete an extra space from an exception message.
library/bimap.m:
Fix formatting.
library/bit_buffer.m:
Fix inverted argument types.
library/dir.m:
Say that make_single_directory/4 returns an error rather
than saying that it fails.
library/io.m:
Fix errors in obsolete pragmas.
library/assoc_list.m:
library/bag.m:
library/cord.m:
library/deconstruct.m:
library/enum.m:
library/fat_sparse_bitset.m:
library/getopt*.m:
library/int*.m:
library/io*.m:
library/type_desc.m:
Fix documentation errors.
tests/hard_coded/array2d_from_array.exp:
Conform to the changed exception message in array2d.m.
library/char.m:
Fix description of character ranges recognised by hex_digit_to_int/2.
library/pretty_printer.m:
Fix a copy-and-paste error.
library/string.m:
Fix errors in predicate descriptions.
Fix obsolete pragmas that specified the replacement predicate to
be the target of the pragma.
compiler/higher_order.specialize_in_module.m:
Document the meaning of a field.
compiler/add_pragma_type_spec.m:
compiler/hlds_module.m:
Change the code filling and using that field to avoid misleading
variable and predicate names. Add some extra documentation
where that can help.
compiler/add_pragma_decl.m:
compiler/add_pragma_gen.m:
compiler/add_pragma_impl.m:
These three new modules add declarative pragmas, implementation pragmas,
and compiler-generated pragmas to the HLDS respectively.
compiler/add_pragma_util.m:
This new module contains the parts of the old add_pragma.m
that are needed by more than one of the three modules above.
compiler/add_pragma.m:
Delete this module.
compiler/notes/compiler_design.html:
Update the relevant documentation.
compiler/add_pragma_tabling.m:
Use standard length section dividers.
compiler/make_hlds.m:
Include the new modules.
compiler/make_hlds_passes.m:
Import the new modules.
... out of add_pragma_type_spec.m.
compiler/add_pragma_type_spec.m:
compiler/add_pragma_type_spec_constr.m:
As above.
compiler/add_pragma.m:
Import the new module.
compiler/make_hlds.m:
Include the new module.
compiler/notes/compiler_design.html:
Document the new module.
I seem to have been broken it on Aug 18 with the move to associate
a option with every severity_informational spec. The code added then
treated all these options as bool options, but one is not.
compiler/error_util.m:
Allow a severity_informational spec to depend on an accumulating
option, which --show-pred-movability is.
As far as I can see, it is the only non-bool option used
in such messages, but since we don't have a database of
options named in severity_informational specs, I can't be sure.
compiler/hlds_call_tree.m:
Avoid printing a sentence when its subject is moot.
tests/valid/show_movability.m:
New test case to test the --show-pred-movability option.
tests/valid/Mercury.options:
Specify the option for the new test case.