Files
mercury/tests/hard_coded/abstract_eqv.exp
Zoltan Somogyi 4d9f8b8250 Fix a bug introduced by Simon's changes to equivalence types, which prevented
Estimated hours taken: 6
Branches: main

Fix a bug introduced by Simon's changes to equivalence types, which prevented
the browser for compiling when the library was compiled without intermodule
optimization. The symptom was a link error caused by the unify and compare
predicates for io__stream being local to io.c. This is a problem because
even though io__stream is primate to io.m, the browser generates references
to its unify and compare predicates, because io__stream is on the right hand
side of private type equivalences for io__input_stream and io__output_stream,
which are exported by io.m, and we now expand those equivalences.

compiler/hlds_data.m:
	Add an extra field to type constructors' definitions, saying whether
	the type constructor occurs on the right hand side of an equivalence.

	Make the orders of some predicate declarations and definitions
	consistent.

compiler/make_hlds.m:
	Fill in this field with a placeholder value.

compiler/equiv_type_hlds.m:
	Set this field to true if it is appropriate.

compiler/type_ctor_info.m:
	Fill in this field for builtin types (for which its value is moot,
	since such types are always exported).

compiler/hlds_pred.m:
	Change the definition of procedure_is_exported to say that a procedure
	is exported if it is a declared mode (not a mode created on demand in
	the calling module) of a unify or compare predicate of a type
	constructor in which this flag is set. This required changing the
	interface of procedure_is_exported to include a module_info.

compiler/export.m:
compiler/ml_code_gen.m:
compiler/rtti.m:
	Pass the extra argument to procedure_is_exported.

tests/hard_coded/abstract_eqv.{m,exp}:
tests/hard_coded/abstract_eqv_1.m:
	A new test case to check for the bug fixed by this change.

tests/hard_coded/Mmakefile:
	Enable the new test case.
2004-03-24 00:39:36 +00:00

4 lines
38 B
Plaintext

a = b: false
a = b: false
b = b: true