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: 0.5
Branches: main
library/eqvclass.m:
Add a function for use by the scanner generator.
library/multi_map.m:
Fix typo in comment.
NEWS:
Mention the new function.
Estimated hours taken: 1
Branches: main
library/*.m:
Replace __ with . as the module qualifier everywhere.
tests/hard_coded/test_injection.exp:
Replace __ with . as the module qualifier in expected exceptions.
Estimated hours taken: 4
Branches: main
library/*.m:
Convert to four-space indentation most of the library modules that
weren't already indented that way. Use predmode syntax where possible.
In some modules, shorten long lines by deleting module name prefixes.
Fix departures from our coding standards.
In some modules, simplify code, mostly using field names and/or state
variables.
There are no changes in algorithms, except for neg_list in integer.m.
Estimated hours taken: 0.5
Branches: main, release
library/svmulti_map.m:
Add a module with versions of the multi_map predicates
that are conducive to the use of state variables.
library/multi_map.m:
Fix up some minor problems with the documentation.
library/library.m:
NEWS:
Mention the above addition.
Estimated hours taken: 3
Branches: main, version-0_12-branch
library/array.m:
library/array2d.m:
library/assoc_list.m:
library/bag.m:
library/benchmarking.m:
library/bimap.m:
library/bintree_set.m:
library/bitmap.m:
library/bool.m:
library/builtin.m:
library/cord.m:
library/float.m:
library/graph.m:
library/group.m:
library/hash_table.m:
library/int.m:
library/lexer.m:
library/list.m:
library/map.m:
library/math.m:
library/multi_map.m:
library/ops.m:
library/parser.m:
library/rbtree.m:
library/set.m:
library/stack.m:
library/store.m:
library/string.m:
library/time.m:
Minor reformatting; added some renamed preds and funcs to improve
consistency of naming in the library; removed some preds and types that
have been marked obsolete since 0.11.
Estimated hours taken: 0.2
Branches: main
Fix some documentation in the multi_map module.
library/multi_map.m:
Fix the documentation for multi_map.merge which was incomplete.
s/implemention/implementation.
Estimated hours taken: 3.5
Branches: main
Make the positioning of descriptive comments conform
to the coding standard for the following library modules.
Convert preds to predmode syntax where possible.
Make the ordering of related predicates and functions
conform to the coding standard, where the descriptive
comment makes it possible to do that.
Other minor changes are listed below.
library/bimap.m:
Fix capitalisation of a few comments.
library/dir.m:
s/throw an exception/throws an exception/.
library/exception.m:
Fix the comment about the exception_result/1 type.
There is only one type and an inst following the comment.
library/map.m:
Remove the unique modes for map.set/4, map.delete/3 and
map.delete_list/3.
library/rbtree.m:
Remove the unique modes for rbtree.set/4, rbtree.delete/3,
rbtree.remove/4, rbtree.remove_smallest/4 and rbtree.remove_largest/4.
library/tree234.m:
Remove left over unique modes for preds.
library/set.m:
XXX the ordering of procedures in this module is a bit strange.
library/set_bbbtree.m:
library/set_unordlist.m:
Remove various unique modes for set operations like
delete/3. (Some of these were commented out anyway).
library/term_to_xml.m:
Fix a spot where line width exceeded 79 characters.
library/array.m:
library/assoc_list.m:
library/random.m:
library/multi_map.m:
library/pqueue.m:
library/queue.m:
library/bool.m:
library/char.m:
library/construct.m:
library/counter.m:
library/deconstruct.m:
library/eqvclass.m:
library/gc.m:
library/io.m:
library/sparse_bitset.m:
library/stack.m:
library/std_util.m:
library/store.m:
library/string.m:
library/term.m:
library/term_io.m:
library/type_desc.m:
library/varset.m:
As above.
Estimated hours taken: 8
Branches: main
Reduce the size of compiler-generated C source files even further. The
reduction is 3 to 6% in non-debug LLDS grades, but 25 to 35% in debug grades.
Together with my previous change, the size of parse_tree.modules.c has gone
from more than 25 Mb to less than 8 Mb.
The changes to the header files will be committed first, followed some days
later by the changes to the compiler to generate the new macros. This gives
time for people to "cvs update" their workspaces at their own pace before
a change in the installed compiler forces them to do so.
compiler/llds_out.m:
Group the declarations of common_data structures, so that a single
mention of the type name can be amortized over the declaration of many
structures.
Do not emit macro invocations needed only by time profiling unless
we are doing time profiling.
When emitting rvals, look for special cases in which we can emit
shorter code: references to common_data structures and to
type_ctor_info structures. Both occur a lot in the data structures
the compiler generates in debugging grades.
Record which type names have been declared, so we don't declare them
twice.
Convert some affected predicates to state variable syntax.
compiler/layout_out.m:
When possible, emit a shorthand macro that declares a label as it
defines its label layout structure.
compiler/rtti_out.m:
Group the declarations of rtti data structures, so that a single
mention of the type name can be amortized over the declaration of many
structures.
compiler/llds.m:
Put common_data structures into a separate type, to allow them to be
manipulated independently.
Add a helper predicate.
compiler/global_data.m:
Conform to the changed types in llds.m.
compiler/name_mangle.m:
Add some helper predicates for use in llds_out.m and rtti_out.m.
Reorder some predicate definitions for consistency with their
declarations.
compiler/rtti.m:
Add a helper predicate.
compiler/trace.m:
Instead of generating long canned code fragments, generate calls to
macros that expand to those canned code fragments.
library/multi_map.m:
Add function forms of the predicates in this module, for use in the
modified compiler modules.
runtime/mercury_misc.h:
runtime/mercury_stack_layout.h:
runtime/mercury_trace_base.h:
runtime/mercury_type_info.h:
Define the macros that the compiler now generates.
runtime/mercury_goto.h:
Define macros used to implement the macros in the above four header
files.
runtime/mercury_bootstrap.h:
Move the definitions of bool, TRUE and FALSE to the section where they
are defined only if the user asks for them. This is to avoid conflict
with the module name "bool".
tests/hard_coded/pragma_import.m:
Rename bool to MR_bool.
Estimated hours taken: 8
Branches: main
library/*.m:
Bring these modules up to date with our current style guidelines.
Use predmode declarations where appropriate. Use state variable syntax
where appropriate. Reorder arguments where this makes it possible to
to use state variable syntax. Standardize format of predicate
description comments. Standardize indentation.
Estimated hours taken: 0.25
Branches: main
NEWS:
library/multi_map.m:
Add predicates multi_map.to_flat_assoc_list
and multi_map.from_flat_assoc_list, which use
assoc_lists containing one element per key-value
pair, not one element per key and all its values.
Estimated hours taken: 0.25
Branches: main, release
library/multi_map.m:
Fix multi_map__from_corresponding_lists so that it works as
expected if a key appears more than once in the key list.
tests/hard_coded/Mmakefile:
tests/hard_coded/multi_map_test.exp:
tests/hard_coded/multi_map_test.m:
Test case.
Estimated hours taken: 0.5
Make {multi_,}map__is_empty more efficient.
library/tree234.m:
Add a tree234__is_empty predicate.
library/map.m:
library/multi_map.m:
Call tree234__is_empty instead of tree234__init, since this does not
require a complicated unification.
Estimated hours taken: 0.5
library/*.m:
compiler/*.m:
Undo Zoltan's bogus update of all the copyright dates.
The dates in the copyright header should reflect the years
in which the file was modified (and no, changes to the
copyright header itself don't count as modifications).
Estimated hours taken: 3
Enable --warn-interface-imports by default. This was turned off while
list and term were defined in mercury_builtin.m, since it caused many
warnings.
Fix all the unused interface imports that have been added since then.
compiler/options.m:
Enable --warn-interface-imports by default.
compiler/module_qual.m:
Fix formatting inconsistencies with module names in warning
messages. (".m" was not appended to module names if there was
only one module).
compiler/*.m:
library/*.m:
tests/invalid/type_loop.m:
tests/warnings/*.m:
Remove usused interface imports, or move them into
implementation (mostly bool, list and std_util).
Estimated hours taken: _3___
A new library file based on map.m, where the data-type is a list of things.
This gives a vague one-to-many storage class. It's based on map for
flexability, and doesn't achieve much more than map and list together, but
it is nice. It is also completely untested. I'm adding it now, because I
disappear for 12 months in 4 days time.
library/multi_map.m
added this file.