tests/invalid/*.{m,err_exp}:
tests/misc_tests/*.m:
tests/mmc_make/*.m:
tests/par_conj/*.m:
tests/purity/*.m:
tests/stm/*.m:
tests/string_format/*.m:
tests/structure_reuse/*.m:
tests/submodules/*.m:
tests/tabling/*.m:
tests/term/*.m:
tests/trailing/*.m:
tests/typeclasses/*.m:
tests/valid/*.m:
tests/warnings/*.{m,exp}:
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 tests
that check compiler error messages, expect the new line numbers.
browser/cterm.m:
browser/tree234_cc.m:
Import only one module per line.
tests/hard_coded/boyer.m:
Fix something I missed.
Estimated hours taken: 10
Fix a performance problem reported by Tom Conway,
that caused the compiler to take forever when compiling
very simple test cases making use of user-defined insts.
compiler/inst_match.m:
compiler/inst_util.m:
In the implementation of the procedures that traverse insts, e.g.
inst_matches_initial, inst_matches_final, inst_is_ground, etc., ensure
that we thread the set of already processed inst names through the
code, i.e. pass it both in and out, rather than just passing it in.
This ensures that we don't traverse the same inst name more than once
for each call to one of those top-level procedures.
The previous algorithm lead to an exponential performance
blow-out.
Also change mode_list_contains_inst_var so that it does not
expand modes or defined_insts, but instead just returns the
inst_vars that the mode list contains directly.
tests/valid/Mmakefile:
tests/valid/inst_perf_bug_1.m:
tests/valid/inst_perf_bug_2.m:
Add a couple of regression tests, one for the performance bug
that this change fixes, one for a similar performance bug that
still remains even after this change. For now only the first
one is enabled.