tests/hard_coded/*.m:
Update programming style, unless doing so would change
the meaning of the test, in particular:
- use '.' as a module qualifier in place of '__'
- use {write,print}_line where appropriate
- use if-then-else in place of C -> T ; E
- use state variables in place of DCGs
tests/hard_coded/dir_test.m:
Document what the expected outputs correspond to.
Use a uniform module qualifier in the output.
tests/hard_coded/dir_test.exp*:
Conform to the above change.
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.
Estimated hours taken: 8
compiler/unify_proc.m:
Generate specialized comparison predicates for types with at most
N functors, for 0 <= N <= 3. This should speed up comparisons
on such types, and reduce code size, since we can dispense with
an if-then else, several calls (e.g. to index and error) and the
index predicate itself.
compiler/options.m:
Add the option that specifies N, the max number of function symbols
for which we will generate specialized comparison predicates.
compiler/handle_options.m:
Clip the value of this option to the maximum supported by unify_proc.m.
compiler/make_hlds.m:
Use the (clipped and therefore accurate) value of this option to decide
which types have specialized comparison predicates and thus can
dispense with an index predicate.
tests/hard_coded/comparison.{m,exp}:
A test case for specialized comparisons.
tests/hard_coded/Mmakefile:
Enable the test case, and sort the list of test cases.