Files
mercury/tests/hard_coded/compare_rep_usereq.exp
Mark Brown 56e818af67 Implement compare_representation/3, which is like compare except that it
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.
2002-04-25 09:31:59 +00:00

9 lines
66 B
Plaintext

aa : foo
aa : foo
Result = '='.
aa : foo
bb : foo
Result = '<'.