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: 5.5
Branches: main
Implement compare_representation/3, which is like compare except that it
is cc_multi, and it doesn't abort on non-canonical types. The implementation
only works for the LLDS backend; in other cases, the runtime aborts with
a "sorry" message. For this reason, it is not officially part of the
standard library yet.
library/std_util.m:
Add the new predicate, which is implemented via "external".
runtime/mercury_ho_call.c:
Implement compare_representation/3, and also a C version.
runtime/mercury_unify_compare_body.h:
Implement the body of compare_representation/3. When the macro
include_compare_rep_code is defined comparison of preds and
funcs doesn't abort, the code that is used for MR_COMPARE_BY_RTTI
is enabled, and usereq types are treated as normal types.
runtime/mercury_conf_param.h:
Document the fact that calls to compare_representation are
counted as calls to compare for the purposes of MR_TYPE_CTOR_STATS.
runtime/Mmakefile:
Bug fix: add missing pic_o versions of the explicit dependencies.
Use variables for the suffixes in these dependencies.
runtime/mercury.c:
runtime/mercury.h:
Supply a HIGHLEVEL_CODE version of the new predicate. This just
gives a "Sorry, not implemented" message and aborts.
tests/hard_coded/Mmakefile:
tests/hard_coded/compare_rep_usereq.exp:
tests/hard_coded/compare_rep_usereq.m:
tests/hard_coded/compare_representation.exp:
tests/hard_coded/compare_representation.m:
Test cases.
tests/hard_coded/compare_rep_array.m:
A test case which doesn't work yet.