library/version_array2d.m:
For every predicate or function that takes an integer argument,
if that integer is required to be non-negative, add an unsigned version.
Add bounds checks to lookup (read) and set (write) operations.
Improve the documentation of the exported operations.
Add a new implementation of the function that returns the rows
of the array as a list of lists.
Improve variable names in operations that have new unsigned versions.
NEWS.md:
Announce the new operations.
tests/hard_coded/version_array2d_test.{m,exp}:
New test case to test the operation of version_array2d.m.
It is based on the applicable parts of version_array_test.m,
but with somewhat improved organization.
tests/hard_coded/Mmakefile:
Enable the new test case.
tests/hard_coded/version_array_test.m:
Minor style fixes.
library/version_array.m:
For every predicate or function that takes an integer argument,
if that integer is required to be non-negative, add an unsigned version.
Improve the documentation of the exported operations.
Improve variable names in operations that have new unsigned versions.
NEWS.md:
Announce the new operations.
tests/hard_coded/version_array_test.m:
Modify this test case to test the new operations.
List the top modules of the make.m package first,
and the utility and data structure modules last.
Mention the deleted backends.
Improve wording in several places.
Fix some cut-and-paste errors.
Documentation/README.MSYS2.md:
Provide an overview of the different MSYS2 environments and what
they provide from the perspective of installing and using Mercury.
Describe how to install and use Mercury in the MSYS environment.
Describe how to install Mercury in the CLANG64 environment.
Extend the coverage of running Mercury at the Windows Command Prompt, to
cover Mercury compilers built in the CLANG64 and MINGW32 environments.
Describe installation prefix path problems in more detail.
Lots of minor improvements.
compiler/switch_detection.m:
Add conditionally-enabled code to gather statistics about
what happens when a switch candidate has disjuncts left over,
and we test whether these leftovers form a switch on another variable.
(The results show that after 99.91% of switch candidates,
there are *no* disjuncts left over.)
compiler/mercury_compile_main.m:
Invoke the predicate that writes out any statistics we gathered.
tools/switch_depth:
This new summarizes the results.
compiler/switch_candidates.m:
Some ways of transforming disjunctions into switches call for
duplicating code. Any variables local to duplicated code must be
renamed apart by quantification. We used to set a flag calling for
the requantification of the procedure body when finding a switch
candidate that calls for such code duplication. However, this is wrong:
we only need to requantify the procedure body if such a switch candidate
is *actually selected*. Fix this, mostly to clarify the code, though
the avoiding unneeded requantification is also a (minor) performance win.
compiler/switch_detection.m:
Record *with each switch candidate* whether it calls for requantifying
the procedure body if it is selected.
Documentation/README.Docker:
Rename -> README.Docker.md. This file was already in Markdown
format.
Adjust heading levels.
Fix a broken link.
README.md:
Conform to the above change.
Use the latest revisions of the GPL version 2 and LGPL version 2 text from the
FSF. This replaces out-of-date addresses and the assumption that the year
begins with 19.
COPYING:
COPYING.LIB:
As above.
Documentation/README.x86.md:
As above.
Move the the bit about x86-64 not being affected by the issue
described in this file from the bottom to the top.
Documentation/README.Linux.md:
Add a pointer to the README.x86.md file.
README.md:
Conform to the above change.
Documentation/README.Linux-m68k.md:
As above.
Mention that this port has not been tested (to the best of my knowledge)
since 1998.
Documentation/README.Linux.md:
Add a link to the Linux/m68k README.
README.md:
Update a link.
The compiler has had no code to set it from its default value of "yes"
to "no" since the Erlang backend was deleted in October 2020.
compiler/options.m:
Delete the option.
compiler/handle_options.m:
Delete an (incorrect) reference to the option.
compiler/switch_detection.m:
Stop paying attention to the option.
tests/warnings/help_text.err_exp:
Stop expecting documentation of the option.
Documentation/README.Linux-PPC:
Rename -> README.Linux-PPC.md:
Convert this file to Markdown.
Make the note at the head of this file a bit stronger.
Delete a dead link.
README.md:
Documentation/README.Linux:
Conform to the above change.
The --with-msvcrt option was intended for selecting between the older Microsoft
C runtime (crtdll.dll) and the Microsoft Visual C runtime (msvcrt.dll). This is
all now ancient history, since the MSVCRT itself has been superseded by the
Universal C runtime since Windows 10. Delete the --with-msvcrt option and all
uses of it.
configure.ac:
Delete the --with-msvcrt option.
scripts/mgnuc.in
scripts/ml.in:
Delete uses of the above configuration value.
Documentation/README.MS-VisualC.md:
Delete references to --with-msvcrt.
If the compiler decides that a du type should use the direct-arg
representation for some of its constructors, it must include information
about that into the .opt file of the module defining the type, in the
form of `where direct_arg is' clauses, which will be used by modules
opt-importing that module and that type. That information was not being
included for du types defined in the *interface* section of a module.
Also fix a related issue that was uncovered: a word_aligned_pointer
assertion on a foreign_type definition would have no effect if there is
a no-tag du type definition for the same type constructor.
compiler/intermod.m:
compler/intermod_decide.m:
Make should_opt_export_type_defn and some_type_needs_to_be_written
succeed for `status_exported' du type definitions with direct-arg
constructors. While `status_exported' suggests those type
definitions would be redundant in .opt files, the information about
the direct-arg constructors is not redundant.
compiler/du_type_layout.m:
Add a is_word_aligned_ptr() value to the ComponentTypeMap if a
no-tag du type also has a foreign_type definition for the current
target language with a word_aligned_pointer assertion. Previously,
this was only being done for single ctor NON no-tag du types.
Add a XXX mentioning that we silently ignore word_aligned_pointer
assertions in other cases.
tests/hard_coded/Mercury.options:
tests/hard_coded/Mmakefile:
tests/hard_coded/direct_arg_opt.m:
tests/hard_coded/direct_arg_opt_helper_1.m:
tests/hard_coded/direct_arg_opt_helper_1.direct_arg_opt_helper_2.m:
tests/hard_coded/direct_arg_opt.exp:
Add a test case.
compiler/hlds_goal.m:
Document that all goals inside from_ground_term_deconstruct scopes
are not just unifications, but unifications whose right hand sides
are rhs_functors.
compiler/constraint.m:
Fix a potential problem, which is that pushing a constraint into
from_ground_term_{deconstruct,other) scopes can invalidate
their invariants.
compiler/goal_refs.m:
Fix a comment.
compiler/lco.m:
Qualify a call.
compiler/modecheck_goal.m:
Fix a misleading predicate name, and typos.
compiler/try_expand.m:
Exploit the newly-documented invariant about from_ground_term_deconstruct
scopes.
Simplify the interfaces between the new modules and switch_detection.m.
compiler/scout_disjunctions.m:
New module containing the part of the old switch_detection.m
that scouts disjunctions ahead of the main pass in bulk.
compiler/find_bind_var.m:
New module containing the part of the old switch_detection.m
that scouts disjunctions as *part* of the main pass, piecemeal.
compiler/switch_candidates.m:
New module containing the part of the old switch_detection.m
that recognizes candidate switches, and chooses the best switch
if there is more than one candidate.
compiler/switch_detection.m:
Delete the moved code. Conform to the interface simplifications.
compiler/check_hlds.m:
compiler/notes/compiler_design.html:
Add and document the new modules.
compiler/cse_detection.m:
Conform to the changes above.
compiler/hlds_out_goal.m:
Add the capability to format a case as a string.
tests/invalid_nodepend/Mercury.options:
Prevent two test cases, fundeps_vars and require_tailrec_invalid,
from stopping after the creation of their .int files finds errors.
Continue on to the code generation stage, where the errors that
these test cases for are detected. (The fix is needed only for
bootchecks that use mmc --make.)
tests/EXPECT_FAIL_TESTS.csharp:
Recognize that hard_coded/functor_ho_inst_excp_1 is expected to fail
in C# grades. This test case was already on the expected-to-fail list,
but under its old name, functor_ho_inst_excp, which was not updated
when the name was changed.
library/array.m:
Add uint versions of most of this module's operations.
NEWS.md:
Mention the new operations.
library/edit_distance.m:
Use the new array operations to eliminate some casts.
library/edit_seq.m:
Minor style fix.
tests/hard_coded/array_gen.{m,exp}:
tests/hard_coded/array_test_2.{m,exp}:
Extend the tests of array.m's operations to the corresponding uint
versions. Expect the output for the new versions.
tests/hard_coded/array_resize.m:
tests/hard_coded/array_shrink.m:
Extend the tests of array.m's operations to the corresponding uint
versions, but generate output only if their results differ from the
original int versions. (They don't differ.)
tests/hard_coded/array_primitives.m:
Style fixes.
The changes to file copying in the compiler in early 2024 mean that we no
longer encounter the same performance problems these workarounds were put
in place to avoid.
compiler/Mmakefile:
library/Mmakefile:
As above.