tests/accumulator/*.m:
tests/analysis_*/*.m:
tests/benchmarks*/*.m:
tests/debugger*/*.{m,exp,inp}:
tests/declarative_debugger*/*.{m,exp,inp}:
tests/dppd*/*.m:
tests/exceptions*/*.m:
tests/general*/*.m:
tests/grade_subdirs*/*.m:
tests/hard_coded*/*.m:
Make these tests use four-space indentation, and ensure that
each module is imported on its own line. (I intend to use the latter
to figure out which subdirectories' tests can be executed in parallel.)
These changes usually move code to different lines. For the debugger tests,
specify the new line numbers in .inp files and expect them in .exp files.
Branches: main
Change the argument order of many of the predicates in the map, bimap, and
multi_map modules so they are more conducive to the use of state variable
notation, i.e. make the order the same as in the sv* modules.
Prepare for the deprecation of the sv{bimap,map,multi_map} modules by
removing their use throughout the system.
library/bimap.m:
library/map.m:
library/multi_map.m:
As above.
NEWS:
Announce the change.
Separate out the "highlights" from the "detailed listing" for
the post-11.01 NEWS.
Reorganise the announcement of the Unicode support.
benchmarks/*/*.m:
browser/*.m:
compiler/*.m:
deep_profiler/*.m:
extras/*/*.m:
mdbcomp/*.m:
profiler/*.m:
tests/*/*.m:
ssdb/*.m:
samples/*/*.m
slice/*.m:
Conform to the above change.
Remove any dependencies on the sv{bimap,map,multi_map} modules.
Estimated hours taken: 18
Branches: main
Move the univ, maybe, pair and unit types from std_util into their own
modules. std_util still contains the general purpose higher-order programming
constructs.
library/std_util.m:
Move univ, maybe, pair and unit (plus any other related types
and procedures) into their own modules.
library/maybe.m:
New module. This contains the maybe and maybe_error types and
the associated procedures.
library/pair.m:
New module. This contains the pair type and associated procedures.
library/unit.m:
New module. This contains the types unit/0 and unit/1.
library/univ.m:
New module. This contains the univ type and associated procedures.
library/library.m:
Add the new modules.
library/private_builtin.m:
Update the declaration of the type_ctor_info struct for univ.
runtime/mercury.h:
Update the declaration for the type_ctor_info struct for univ.
runtime/mercury_mcpp.h:
runtime/mercury_hlc_types.h:
Update the definition of MR_Univ.
runtime/mercury_init.h:
Fix a comment: ML_type_name is now exported from type_desc.m.
compiler/mlds_to_il.m:
Update the the name of the module that defines univs (which are
handled specially by the il code generator.)
library/*.m:
compiler/*.m:
browser/*.m:
mdbcomp/*.m:
profiler/*.m:
deep_profiler/*.m:
Conform to the above changes. Import the new modules where they
are needed; don't import std_util where it isn't needed.
Fix formatting in lots of modules. Delete duplicate module
imports.
tests/*:
Update the test suite to confrom to the above changes.
Estimated hours taken: 12
Branches: main
Add two modules that implement sets using balanced trees. At the moment,
one of those modules is used in llds_out, and this speeds up the compiler
by about one percent when using the LLDS backend. (When generating code
using an MLDS backend, the speed is not affected.)
I have tried out replacing set_ordlist with set_ctree234 as the default
implementation of sets, but this slowed down the compiler by about 9%
in the usual case, which is too much, although it did improve its performance
slightly on some inputs with large predicates, which are a kind of worst-case
situation for sets implemented as lists. Accordingly, I won't commit any
changes to set.m. However, to make such changes easier in the future, I have
removed the dependence of some test cases on the fact that sets are currently
implemented as sorted lists.
library/set_tree234.m:
Add this module, which implements sets as 2-3-4 trees. The
implementation is patterned after tree234.m, but stored only
single elements in nodes instead of key-value pairs. It has
better worst-case behavior than our current standard implementation
of sets, set_ordlist (in particular it has logarithmic search time),
but worse constant factors.
library/set_ctree234.m:
Add this module, which implements sets as 2-3-4 trees augmented with
set cardinality. This has the same virtues as set_tree234.m, but also
allows it to be linear in the smaller input for operations such as
union that must be linear in the size of one input set or the other.
library/library.m:
NEWS:
Mention the new modules.
compiler/llds_out.m:
Use set_tree234.m instead of a map with dummy values.
compiler/mercury_compile.m:
Delete an unnecessary import.
tests/hard_coded/relation_test.{m,exp}:
Change this test case to convert sets to ordered lists before printing
them out, to make the test independent of the representation of sets.
tests/hard_coded/string_alignment_bug.m:
Change this test case to use set_ordlist instead of plain sets.
Estimated hours taken: 2
Fix a bug where copy/2 was returning bogus data when copying string literals.
runtime/mercury_deep_copy_body.h:
Change the code so that it doesn't assume that string literals
must be aligned, since currently they aren't.
tests/hard_coded/Mmakefile:
tests/hard_coded/string_alignment_bug.m:
tests/hard_coded/string_alignment_bug.exp:
Add a regression test.