tests/declarative_debugger/*.m:
tests/exceptions/*.m:
tests/general/*.m:
tests/grade_subdirs/*.m:
tests/purity/*.m:
tests/submodules/*.m:
tests/typeclasses/*.m:
Update programming style.
tests/declarative_debugger/*.inp:
Update line numbers in breakpoint commands.
tests/declarative_debugger/*.exp:
Update expected line numbers.
tests/exceptions/Mercury.options:
tests/general/Mercury.options:
Disable some warnings that are irrelevant to the test.
library/*.m:
Specifically, delete any predicates and functions whose `pragma obsolete'
dates from 2018 or before. Keep the ones that were obsoleted
only this year or last year.
NEWS:
Announce the changes.
tests/debugger/io_tab_goto.m:
tests/debugger/tabled_read.m:
tests/declarative_debugger/io_stream_test.m:
tests/declarative_debugger/tabled_read_decl.m:
tests/declarative_debugger/tabled_read_decl_goto.m:
tests/general/array_test.m:
tests/hard_coded/mutable_init_impure.m:
tests/hard_coded/remove_file.m:
tests/tabling/mercury_java_parser_dead_proc_elim_bug.m:
tests/tabling/mercury_java_parser_dead_proc_elim_bug2.m:
tests/valid/mercury_java_parser_follow_code_bug.m:
Replace references to predicates and functions that this diff deletes
with their suggested replacements.
In several test cases, bring the programming style up to date.
tests/hard_coded/shift_test.{m,exp}:
Most of this test case tested the now-deleted legacy shift operations.
Replace these with tests of their non-legacy versions, including
testing for the expected exceptions.
tests/hard_coded/shift_test.{m,exp}:
Don't pass --no-warn-obsolete when compiling shift_test.m anymore.
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
Add a new function to the array module for creating a new array from
a list in reverse order.
Make the existing array.from_list/2 predicate more efficient.
library/array.m:
Add the function array.from_reverse_list/1.
Since array.from_list immediately fills in the elements
of a newly-created array with those of the lists, don't
bother initialising the array elements when the array
is allocated (except in debugging grades).
Generalise ML_unsafe_new_aray so that it can be used
for both the above.
tests/general/array_test.m:
tests/general/array_test.exp:
Test the new function.
Update syntax and formatting in this test case.
NEWS:
Announce the new function.
Branches: main
Change the order of predicate arguments in the array module to make them
more conducive to the use of state variable notation.
library/array.m:
As above.
Group clauses for functions with those of the corresponding
predicate.
library/svarray.m:
library/hash_table.m:
library/io.m:
library/random.m:
compiler/lambda.m:
deep_profiler/array_util.m:
deep_profiler/callgraph.m:
deep_profiler/canonical.m:
deep_profiler/cliques.m:
deep_profiler/dense_bitset.m:
deep_profiler/measurements.m:
deep_profiler/profile.m:
deep_profiler/read_profile.m:
deep_profiler/startup.m:
tests/general/array_test.m:
tests/general/mode_inf.m:
tests/hard_coded/array_test2.m:
tests/hard_coded/lp.m:
tests/hard_coded/reuse_array.m:
Conform to the above change and remove dependencies
on the svarray module.
tests/general/set_test.m:
Replace calls to set_bbbtree.size/2 with calls to
set_bbbtree.count/2.
NEWS:
Announce the above change.
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: 3
Branches: main
Deprecate old-style lambda expressions properly.
compiler/make_hlds.m:
Emit a warning if an old-style lambda expression is
encountered.
compiler/notes/todo.html:
Remove this from the TODO list.
compiler/base_typeclass_info.m:
compiler/mercury_to_mercury.m:
extras/odbc/odbc.m:
tests/*/*.m:
Replace old-style lambda expressions as necessary.
Estimated hours taken: 20
Branches: main
Add a new optimization, --use-local-vars, to the LLDS backend. This
optimization is intended to replace references to fake registers and stack
slots with references to temporary variables in C code, since accessing these
should be cheaper.
With this optimization and one for delaying construction unifications,
the eager code generator should generate code at least good as that produced by
the old value numbering pass. This should make it possible to get rid of value
numbering, which is much harder to maintain.
compiler/use_local_vars.m:
New module containing the optimization.
compiler/notes/compiler_design.html:
Mention the new module.
compiler/exprn_aux.m:
Add new utility predicates for use by use_local_vars.
If --debug-opt is specified, do not dump instruction sequences to
standard output. Instead, put them in separate files, where they can be
compared more easily.
compiler/options.m:
Add the --use-local-vars option to control whether the use_local_vars
pass gets run.
compiler/llds.m:
Add liveness information to the c_code and pragma_foreign_code LLDS
instructions, in order to allow use_local_vars to work in the presence
of automatically-generated C code (e.g. by debugging).
compiler/livemap.m:
Use the new liveness information to generate useful livemap information
even in the presence of automatically generated C code.
compiler/code_gen.m:
compiler/code_info.m:
compiler/dupelim.m:
compiler/frameopt.m:
compiler/llds_common.m:
compiler/llds_out.m:
compiler/middle_rec.m:
compiler/opt_debug.m:
compiler/opt_util.m:
compiler/pragma_c_gen.m:
compiler/trace.m:
compiler/vn_block.m:
compiler/vn_cost.m:
compiler/vn_filter.m:
compiler/vn_verify.m:
Provide and/or ignore this additional liveness information.
compiler/wrap_block.m:
The post_value_number pass wraps LLDS instruction sequences
using temporaries in a block instruction which actually declares
those temporaries. It used to be used only by value numbering;
it is now also used by use_local_vars. It has therefore been renamed
and put in its own file.
compiler/optimize.m:
Invoke use_local_vars if required, and call wrap_blocks instead of
post_value_number.
compiler/value_number.m:
Since the value numbering pass still cannot handle automatically
generated C code, check for it explicitly now that livemap carries out
only a weaker check.
compiler/basic_block.m:
Add a module qualification.
library/set.m:
library/set_bbbtree.m:
library/set_ordlist.m:
library/set_unordlist.m:
Add a new predicate, union_list, to each implementation of sets,
for use by some of the new code above.
tests/general/array_test.m:
Print out the result of each operation as soon as it is done, so that
if you get a seg fault, you know which operations have completed and
which haven't.
Estimated hours taken: 3
library/array.m:
Removed mergesort in favour of samsort which has much better
performance on mostly sorted data and is within a hair as
good on random data.
Estimated hours taken: 0.5
Changes to make array_test.m run under NU-Prolog.
tests/general/array_test.m:
Remove one function call (use the predicate version) and
replace calls to io__write with their typed versions.
Estimated hours taken: 6
The main purpose of this change is to rename array.m as bt_array.m, and
uniq_array.m as array.m. The interfaces of those two modules have grown
slightly so that they match a little more closely. Details are in the
file NEWS.
The implementation of bt_array (formerly array) has been changed to use
a slightly more efficient implementation.
NEWS:
Interface changes documented.
library/array.m:
library/bt_array.m:
Changes mentioned above and detailed in the NEWS file.
library/uniq_array.m:
Bereft of life and resting in peace.
library/io.m:
library/library.m:
library/std_util.m:
library/term.m:
compiler/base_type_layout.m:
runtime/deep_copy.c:
runtime/type_info.h:
Minor changes to fix the special case of base_type_layout
operations for arrays rather than uniq_arrays.
tests/hard_coded/write.exp:
tests/hard_coded/write.m:
Test writing of arrays.
tests/general/array_test.exp:
tests/general/array_test.m:
Test some array/bt_array operations.