[m-rev.] for review: automatically generate all type_ctor_infos on non C backends

Peter Ross pro at missioncriticalit.com
Thu Nov 20 01:18:12 AEDT 2003


Hi,

For zs or fjh to review.

This change is currently bootstrapping, but you guys can look at it
while I am sleeping so here it is.


===================================================================


Estimated hours taken: 32
Branches: main

Get the compiler to generate the type_ctor_infos for all the types
which were previously defined by hand.

This change completes the removal of all the MC++ from the compiler.
 
compiler/make_hlds.m:
	Remove the builtin qualifier from the builtin types, before
	processing them.
	
compiler/mlds_to_il.m:
	Remove the special code which handled those type_ctor_infos
	which where defined in MC++.

compiler/special_pred.m:
	Add a routine compiler_generated_rtti_for_the_builtins which
	returns if the compiler generates RTTI for builtin types, or
	they are hand-coded.  It returns true for the non-C backends.
	Change can_generate_special_pred_clauses_for_type so that it
	returns true for the builtin types whose body is defined in
	Mercury in private_builtin.m.

compiler/type_ctor_info.m:
	Generate a type_ctor_info for the builtin types if needed.

compiler/type_util.m:
	Add a utility predicate to remove the builtin qualifier from
	the builtin types.

compiler/unify_proc.m:
	Generate calls to unification and comparison predicates defined
	in private_builtin.m.
	
library/Mmakefile:
library/builtin.m:
library/private_builtin.m:
library/type_desc.m:
	Remove the final MC++ code and rename some of the code to use
	the name which the Mercury compiler generates.

Index: compiler/make_hlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/make_hlds.m,v
retrieving revision 1.451
diff -u -r1.451 make_hlds.m
--- compiler/make_hlds.m	6 Nov 2003 11:11:43 -0000	1.451
+++ compiler/make_hlds.m	19 Nov 2003 14:12:26 -0000
@@ -3743,8 +3743,9 @@
 		)
 	).
 
-add_special_pred_for_real(SpecialPredId, TVarSet, Type, TypeCtor,
+add_special_pred_for_real(SpecialPredId, TVarSet, Type0, TypeCtor,
 		TypeBody, Context, Status0, !Module) :-
+	Type = remove_qualifiers_from_the_builtin_types(Type0),
 	adjust_special_pred_status(Status0, SpecialPredId, Status),
 	module_info_get_special_pred_map(!.Module, SpecialPredMap0),
 	( map__contains(SpecialPredMap0, SpecialPredId - TypeCtor) ->
Index: compiler/mlds_to_il.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mlds_to_il.m,v
retrieving revision 1.135
diff -u -r1.135 mlds_to_il.m
--- compiler/mlds_to_il.m	15 Nov 2003 12:57:32 -0000	1.135
+++ compiler/mlds_to_il.m	19 Nov 2003 14:12:28 -0000
@@ -3352,61 +3352,11 @@
 		SymName = mlds_module_name_to_sym_name(ModuleName0),
 		SymName = qualified(qualified(unqualified("mercury"),
 			LibModuleName0), wrapper_class_name),
-		(
-			DataName = rtti(RttiId),
-			RttiId = ctor_rtti_id(RttiTypeCtor, RttiName),
-			RttiTypeCtor = rtti_type_ctor(_, Name, Arity),
-
-			% Only the type_ctor_infos for the following
-			% RTTI names are defined in MC++.
-			(
-				RttiName = type_ctor_info
-			;
-				RttiName = type_info(TypeInfo),
-				TypeInfo = plain_arity_zero_type_info(
-					RttiTypeCtor)
-			;
-				RttiName = pseudo_type_info(PseudoTypeInfo),
-				PseudoTypeInfo =
-					plain_arity_zero_pseudo_type_info(
-						RttiTypeCtor)
-			),
-			( LibModuleName0 = "builtin",
-				(
-				  Name = "int", Arity = 0
-				; Name = "string", Arity = 0
-				; Name = "float", Arity = 0
-				; Name = "character", Arity = 0
-				; Name = "void", Arity = 0
-				; Name = "c_pointer", Arity = 0
-				; Name = "pred", Arity = 0
-				; Name = "func", Arity = 0
-				; Name = "tuple", Arity = 0
-				)
-			; LibModuleName0 = "type_desc",
-				(
-				  Name = "type_desc", Arity = 0
-				; Name = "type_ctor_desc", Arity = 0
-				)
-			; LibModuleName0 = "private_builtin",
-				(
-				  Name = "type_ctor_info", Arity = 1
-				; Name = "type_info", Arity = 1
-				; Name = "base_typeclass_info", Arity = 1
-				; Name = "typeclass_info", Arity = 1
-				; Name = "heap_pointer", Arity = 0
-				; Name = "ref", Arity = 1
-				)
-			),
-			CodeString = "__cpp_code"
-		;
-			DataName = var(_),
-			LibModuleName0 = "private_builtin",
-			CodeString = "__csharp_code"
-		)
+		DataName = var(_),
+		LibModuleName0 = "private_builtin",
+		CodeString = "__csharp_code"
 	->
-		string__append(LibModuleName0, CodeString,
-			LibModuleName),
+		string__append(LibModuleName0, CodeString, LibModuleName),
 		ModuleName = mercury_module_name_to_mlds(
 			qualified(qualified(unqualified("mercury"),
 			LibModuleName), wrapper_class_name))
Index: compiler/special_pred.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/special_pred.m,v
retrieving revision 1.42
diff -u -r1.42 special_pred.m
--- compiler/special_pred.m	31 Oct 2003 14:27:23 -0000	1.42
+++ compiler/special_pred.m	19 Nov 2003 14:12:28 -0000
@@ -108,6 +108,10 @@
 		hlds_type_body).
 :- mode can_generate_special_pred_clauses_for_type(in, in, in) is semidet.
 
+	% Does the compiler generate the RTTI for the builtin types, or is
+	% it hand-coded?
+:- pred compiler_generated_rtti_for_the_builtins(module_info::in) is semidet.
+
 :- implementation.
 
 :- import_module check_hlds__mode_util.
@@ -227,9 +231,35 @@
 	).
 
 can_generate_special_pred_clauses_for_type(ModuleInfo, TypeCtor, Body) :-
-	Body \= abstract_type(_),
+	(
+		Body \= abstract_type(_)
+	;
+		% Only the types which have a unification defined in
+		% private_builtin.m
+		compiler_generated_rtti_for_the_builtins(ModuleInfo),
+		Builtin = mercury_public_builtin_module,
+		( TypeCtor = qualified(Builtin, "int") - 0
+		; TypeCtor = qualified(Builtin, "string") - 0
+		; TypeCtor = qualified(Builtin, "character") - 0
+		; TypeCtor = qualified(Builtin, "float") - 0
+		; TypeCtor = qualified(Builtin, "pred") - 0
+		)
+	),
 	\+ type_ctor_has_hand_defined_rtti(TypeCtor, Body),
 	\+ type_body_has_user_defined_equality_pred(ModuleInfo, Body,
 		abstract_noncanonical_type).
 
+
+
+%-----------------------------------------------------------------------------%
+
+	% The compiler generates the rtti for the builtins when we are
+	% on the non C backends.
+compiler_generated_rtti_for_the_builtins(ModuleInfo) :-
+	module_info_globals(ModuleInfo, Globals),
+	globals__get_target(Globals, Target),
+	( Target = il ; Target = java ).
+
+%-----------------------------------------------------------------------------%
+%-----------------------------------------------------------------------------%
 %-----------------------------------------------------------------------------%
Index: compiler/type_ctor_info.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/type_ctor_info.m,v
retrieving revision 1.46
diff -u -r1.46 type_ctor_info.m
--- compiler/type_ctor_info.m	31 Oct 2003 03:27:30 -0000	1.46
+++ compiler/type_ctor_info.m	19 Nov 2003 14:12:28 -0000
@@ -111,10 +111,23 @@
 			TypeModuleName = ModuleName,
 			map__lookup(TypeTable, TypeCtor, TypeDefn),
 			hlds_data__get_type_defn_body(TypeDefn, TypeBody),
-			TypeBody \= abstract_type(_),
-			\+ type_ctor_has_hand_defined_rtti(TypeCtor, TypeBody),
-			( are_equivalence_types_expanded(ModuleInfo)
-				=> TypeBody \= eqv_type(_) )
+			(
+				TypeBody \= abstract_type(_),
+				\+ type_ctor_has_hand_defined_rtti(TypeCtor,
+					TypeBody),
+				( are_equivalence_types_expanded(ModuleInfo)
+					=> TypeBody \= eqv_type(_) )
+			;
+				compiler_generated_rtti_for_the_builtins(
+					ModuleInfo),
+				TypeModuleName = unqualified(ModuleNameString),
+				( builtin_type_ctor(ModuleNameString,
+					TypeName, TypeArity, _)
+				; impl_type_ctor(ModuleNameString,
+					TypeName, TypeArity, _),
+				  TypeName \= "ticket"
+				)
+			)
 		->
 			type_ctor_info__gen_type_ctor_gen_info(TypeCtor,
 				TypeName, TypeArity, TypeDefn,
@@ -216,63 +229,84 @@
 	module_info_globals(ModuleInfo, Globals),
 	hlds_data__get_type_defn_body(HldsDefn, TypeBody),
 	Version = type_ctor_info_rtti_version,
+
+	% It is an error for a type body to be an abstract type unless
+	% we are generating the RTTI for builtins
 	(
 		TypeBody = abstract_type(_),
-		error("type_ctor_info__gen_type_ctor_data: abstract_type")
+		\+ compiler_generated_rtti_for_the_builtins(ModuleInfo)
+	->
+		error(
+		    "type_ctor_info__gen_type_ctor_data: abstract_type")
 	;
-		TypeBody = foreign_type(_, _),
-		(
-			ModuleName = unqualified(ModuleStr1),
-			builtin_type_ctor(ModuleStr1, TypeName, TypeArity,
-				BuiltinCtor)
-		->
-			Details = builtin(BuiltinCtor)
-		;
-			ModuleName = unqualified(ModuleStr),
-			impl_type_ctor(ModuleStr, TypeName, TypeArity,
-				ImplCtor)
-		->
-			Details = impl_artifact(ImplCtor)
-		;
-			Details = foreign
-		)
+		true
+	),
+
+	% We check for hand-coded definitions before inspecting the
+	% type-bodys as some type definitions have fake bodies,
+	% eg private_builtin.typeclass_info
+	(
+		ModuleName = unqualified(ModuleStr1),
+		builtin_type_ctor(ModuleStr1, TypeName, TypeArity,
+			BuiltinCtor)
+	->
+		Details = builtin(BuiltinCtor)
+
 	;
-		TypeBody = eqv_type(Type),
-			% There can be no existentially typed args to an
-			% equivalence.
-		UnivTvars = TypeArity,
-		ExistTvars = [],
-		pseudo_type_info__construct_maybe_pseudo_type_info(Type,
-			UnivTvars, ExistTvars, MaybePseudoTypeInfo),
-		Details = eqv(MaybePseudoTypeInfo)
+		ModuleName = unqualified(ModuleStr),
+		impl_type_ctor(ModuleStr, TypeName, TypeArity,
+			ImplCtor)
+	->
+		Details = impl_artifact(ImplCtor)
 	;
-		TypeBody = du_type(Ctors, ConsTagMap, Enum, EqualityPred,
-			ReservedTag, _, _),
 		(
-			EqualityPred = yes(_),
-			EqualityAxioms = user_defined
+			TypeBody = abstract_type(_),
+			error(
+			    "type_ctor_info__gen_type_ctor_data: abstract_type")
 		;
-			EqualityPred = no,
-			EqualityAxioms = standard
-		),
-		(
-			Enum = yes,
-			type_ctor_info__make_enum_details(Ctors, ConsTagMap,
-				ReservedTag, EqualityAxioms, Details)
+			TypeBody = foreign_type(_, _),
+			Details = foreign
+		;
+			TypeBody = eqv_type(Type),
+				% There can be no existentially typed args to
+				% an equivalence.
+			UnivTvars = TypeArity,
+			ExistTvars = [],
+			pseudo_type_info__construct_maybe_pseudo_type_info(Type,
+				UnivTvars, ExistTvars, MaybePseudoTypeInfo),
+			Details = eqv(MaybePseudoTypeInfo)
 		;
-			Enum = no,
+			TypeBody = du_type(Ctors, ConsTagMap, Enum, EqualityPred,
+				ReservedTag, _, _),
 			(
-				type_constructors_should_be_no_tag(Ctors, 
-					ReservedTag, Globals, Name, ArgType,
-					MaybeArgName)
-			->
-				type_ctor_info__make_notag_details(TypeArity,
-					Name, ArgType, MaybeArgName,
+				EqualityPred = yes(_),
+				EqualityAxioms = user_defined
+			;
+				EqualityPred = no,
+				EqualityAxioms = standard
+			),
+			(
+				Enum = yes,
+				type_ctor_info__make_enum_details(Ctors,
+					ConsTagMap, ReservedTag,
 					EqualityAxioms, Details)
 			;
-				type_ctor_info__make_du_details(Ctors,
-					ConsTagMap, TypeArity, EqualityAxioms,
-					ModuleInfo, Details)
+				Enum = no,
+				(
+					type_constructors_should_be_no_tag(
+						Ctors, ReservedTag, Globals,
+						Name, ArgType, MaybeArgName)
+				->
+					type_ctor_info__make_notag_details(
+						TypeArity, Name, ArgType,
+						MaybeArgName, EqualityAxioms,
+						Details)
+				;
+					type_ctor_info__make_du_details(Ctors,
+						ConsTagMap, TypeArity,
+						EqualityAxioms, ModuleInfo,
+						Details)
+				)
 			)
 		)
 	),
@@ -880,6 +914,7 @@
 	),
 	Vector = Vector0 \/ (1 << BitNum).
 
+%---------------------------------------------------------------------------%
 %---------------------------------------------------------------------------%
 
 :- func this_file = string.
Index: compiler/type_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/type_util.m,v
retrieving revision 1.130
diff -u -r1.130 type_util.m
--- compiler/type_util.m	5 Nov 2003 03:17:44 -0000	1.130
+++ compiler/type_util.m	19 Nov 2003 14:12:28 -0000
@@ -180,6 +180,9 @@
 	;	void_type
 	;	user_ctor_type.
 
+	% Remove any of the qualifiers from the builtin types.
+:- func remove_qualifiers_from_the_builtin_types(type) = (type).
+
 	% Given a non-variable type, return its type-id and argument types.
 
 :- pred type_to_ctor_and_args(type, type_ctor, list(type)).
@@ -699,6 +702,26 @@
 		TypeCategory = enum_type
 	;
 		TypeCategory = user_ctor_type
+	).
+
+remove_qualifiers_from_the_builtin_types(Type) = NormalizedType :-
+	( type_to_ctor_and_args(Type, TypeCtor, []) ->
+		Builtin = mercury_public_builtin_module,
+		(
+			TypeCtor = qualified(Builtin, Name) - 0,
+			( Name = "int"
+			; Name = "string"
+			; Name = "character"
+			; Name = "float"
+			; Name = "pred"
+			)
+		->
+			construct_type(unqualified(Name) - 0, [], NormalizedType)
+		;
+			NormalizedType = Type
+		)
+	;
+		NormalizedType = Type
 	).
 
 type_is_higher_order(Type, Purity, PredOrFunc, EvalMethod, PredArgTypes) :-
Index: compiler/unify_proc.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/unify_proc.m,v
retrieving revision 1.127
diff -u -r1.127 unify_proc.m
--- compiler/unify_proc.m	31 Oct 2003 03:27:30 -0000	1.127
+++ compiler/unify_proc.m	19 Nov 2003 14:12:30 -0000
@@ -691,7 +691,7 @@
 	unify_proc__make_fresh_named_vars_from_types(ArgTypes, "HeadVar__", 1,
 		Args, VarTypeInfo0, VarTypeInfo1),
 	( SpecialPredId = unify, Args = [H1, H2] ->
-		unify_proc__generate_unify_clauses(ModuleInfo, TypeBody,
+		unify_proc__generate_unify_clauses(ModuleInfo, Type, TypeBody,
 			H1, H2, Context, Clauses, VarTypeInfo1, VarTypeInfo)
 	; SpecialPredId = index, Args = [X, Index] ->
 		unify_proc__generate_index_clauses(ModuleInfo, TypeBody,
@@ -711,11 +711,11 @@
 	ClauseInfo = clauses_info(VarSet, Types, TVarNameMap, Types, Args,
 		Clauses, TI_VarMap, TCI_VarMap, HasForeignClauses).
 
-:- pred unify_proc__generate_unify_clauses(module_info::in, hlds_type_body::in,
-	prog_var::in, prog_var::in, prog_context::in, list(clause)::out,
-	unify_proc_info::in, unify_proc_info::out) is det.
+:- pred unify_proc__generate_unify_clauses(module_info::in, (type)::in,
+	hlds_type_body::in, prog_var::in, prog_var::in, prog_context::in,
+	list(clause)::out, unify_proc_info::in, unify_proc_info::out) is det.
 
-unify_proc__generate_unify_clauses(ModuleInfo, TypeBody,
+unify_proc__generate_unify_clauses(ModuleInfo, Type, TypeBody,
 		H1, H2, Context, Clauses, !Info) :-
 	(
 		type_body_has_user_defined_equality_pred(ModuleInfo,
@@ -757,10 +757,58 @@
 				H1, H2, Context, Clauses, !Info)
 		;
 			TypeBody = abstract_type(_),
-			error("trying to create unify proc for abstract type")
+			( compiler_generated_rtti_for_the_builtins(ModuleInfo) ->
+				TypeCategory = classify_type(ModuleInfo, Type),
+				generate_builtin_unify(TypeCategory,
+						H1, H2, Context,
+						Clauses, !Info)
+			;
+				error(
+				"trying to create unify proc for abstract type")
+			)
+			
 		)
 	).
 
+:- pred generate_builtin_unify((type_category)::in,
+	prog_var::in, prog_var::in, prog_context::in, list(clause)::out,
+	unify_proc_info::in, unify_proc_info::out) is det.
+
+generate_builtin_unify(TypeCategory, H1, H2, Context, Clauses, !Info) :-
+	ArgVars = [H1, H2],
+	( TypeCategory = int_type,
+		Name = "builtin_unify_int"
+	; TypeCategory = char_type,
+		Name = "builtin_unify_character"
+	; TypeCategory = str_type,
+		Name = "builtin_unify_string"
+	; TypeCategory = float_type,
+		Name = "builtin_unify_float"
+	; TypeCategory = higher_order_type,
+		Name = "builtin_unify_pred"
+	; TypeCategory = tuple_type,
+		error("generate_builtin_unify: tuple")
+	; TypeCategory = enum_type,
+		error("generate_builtin_unify: enum")
+	; TypeCategory = variable_type,
+		error("generate_builtin_unify: variable type")
+	; TypeCategory = type_info_type,
+		error("generate_builtin_unify: type_info type")
+	; TypeCategory = type_ctor_info_type,
+		error("generate_builtin_unify: type_ctor_info type")
+	; TypeCategory = typeclass_info_type,
+		error("generate_builtin_unify: typeclass_info type")
+	; TypeCategory = base_typeclass_info_type,
+		error("generate_builtin_unify: base_typeclass_info type")
+	; TypeCategory = void_type,
+		error("generate_builtin_unify: void type")
+	; TypeCategory = user_ctor_type,
+		error("generate_builtin_unify: user_ctor type")
+	),
+	unify_proc__build_call(Name,
+			ArgVars, Context, UnifyGoal, !Info),
+	quantify_clauses_body(ArgVars, UnifyGoal, Context, Clauses, !Info).
+
 :- pred unify_proc__generate_user_defined_unify_clauses(unify_compare::in,
 	prog_var::in, prog_var::in, prog_context::in, list(clause)::out,
 	unify_proc_info::in, unify_proc_info::out) is det.
@@ -959,9 +1007,56 @@
 				Res, H1, H2, Context, Clauses, !Info)
 		;
 			TypeBody = abstract_type(_),
-			error("trying to create compare proc for abstract type")
+			( compiler_generated_rtti_for_the_builtins(ModuleInfo) ->
+				TypeCategory = classify_type(ModuleInfo, Type),
+				generate_builtin_compare(TypeCategory,
+						Res, H1, H2, Context,
+						Clauses, !Info)
+			;
+				error("trying to create compare proc for abstract type")
+			)
 		)
 	).
+
+:- pred generate_builtin_compare(type_category::in,
+	prog_var::in, prog_var::in, prog_var::in,
+	prog_context::in, list(clause)::out,
+	unify_proc_info::in, unify_proc_info::out) is det.
+
+generate_builtin_compare(TypeCategory, Res, H1, H2, Context, Clauses, !Info) :-
+	ArgVars = [Res, H1, H2],
+	( TypeCategory = int_type,
+		Name = "builtin_compare_int"
+	; TypeCategory = char_type,
+		Name = "builtin_compare_character"
+	; TypeCategory = str_type,
+		Name = "builtin_compare_string"
+	; TypeCategory = float_type,
+		Name = "builtin_compare_float"
+	; TypeCategory = higher_order_type,
+		Name = "builtin_compare_pred"
+	; TypeCategory = tuple_type,
+		Name = "builtin_compare_tuple",
+		error("generate_builtin_compare: tuple type")
+	; TypeCategory = enum_type,
+		error("generate_builtin_compare: enum type")
+	; TypeCategory = variable_type,
+		error("generate_builtin_compare: variable type")
+	; TypeCategory = type_info_type,
+		error("generate_builtin_compare: type_info type")
+	; TypeCategory = type_ctor_info_type,
+		error("generate_builtin_compare: type_ctor_info type")
+	; TypeCategory = typeclass_info_type,
+		error("generate_builtin_compare: typeclass_info type")
+	; TypeCategory = base_typeclass_info_type,
+		error("generate_builtin_compare: base_typeclass_info type")
+	; TypeCategory = void_type,
+		error("generate_builtin_compare: void type")
+	; TypeCategory = user_ctor_type,
+		error("generate_builtin_compare: user_ctor type")
+	),
+	unify_proc__build_call(Name, ArgVars, Context, CompareGoal, !Info),
+	quantify_clauses_body(ArgVars, CompareGoal, Context, Clauses, !Info).
 
 :- pred generate_user_defined_compare_clauses(unify_compare::in,
 	prog_var::in, prog_var::in, prog_var::in,
Index: library/Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/library/Mmakefile,v
retrieving revision 1.124
diff -u -r1.124 Mmakefile
--- library/Mmakefile	15 Nov 2003 08:11:33 -0000	1.124
+++ library/Mmakefile	19 Nov 2003 14:12:30 -0000
@@ -287,14 +287,12 @@
 CSHARP_MODULES = array builtin char construct dir exception float int io \
 		library math private_builtin rtti_implementation std_util \
 		string time type_desc
-CPP_MODULES = builtin private_builtin type_desc
+CPP_MODULES = 
 
 CSHARP_DLLS = $(CSHARP_MODULES:%=%__csharp_code.dll)
 CPP_DLLS = $(CPP_MODULES:%=%__cpp_code.dll)
 
 $(CSHARP_DLLS) $(CPP_DLLS) : $(RUNTIME_DLLS)
-
-builtin__cpp_code.dll : builtin__csharp_code.dll
 
 endif
 #-----------------------------------------------------------------------------#
Index: library/builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/builtin.m,v
retrieving revision 1.95
diff -u -r1.95 builtin.m
--- library/builtin.m	14 Nov 2003 16:02:21 -0000	1.95
+++ library/builtin.m	19 Nov 2003 14:12:30 -0000
@@ -550,88 +550,21 @@
 
 ").
 
-:- pragma foreign_code("MC++", "
+% These abstract type delcarations are needed so that the type_ctor
+% is generated for these types.
+:- type int.
+:- type string.
+:- type character.
+:- type float.
+:- type (pred).
+:- type (func).
+:- type void.
+:- type tuple.
 
-MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, int, 0, MR_TYPECTOR_REP_INT) 
-MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, character, 0, MR_TYPECTOR_REP_CHAR) 
-MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, string, 0, MR_TYPECTOR_REP_STRING) 
-MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, c_pointer, 0,
-	MR_TYPECTOR_REP_C_POINTER) 
-MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, void, 0, MR_TYPECTOR_REP_VOID) 
-MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, float, 0, MR_TYPECTOR_REP_FLOAT) 
-MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, func, 0, MR_TYPECTOR_REP_FUNC) 
-MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, pred, 0, MR_TYPECTOR_REP_PRED) 
-MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, tuple, 0, MR_TYPECTOR_REP_TUPLE) 
-
-").
 :- pragma foreign_code("C#", "
 	
-/* XXX these macros need to be defined in C#
-// MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, int, 0, MR_TYPECTOR_REP_INT) 
-public static object[] __type_ctor_info_int_0;
-public static object[] builtin__type_ctor_info_int_0;
-
-// MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, character, 0, MR_TYPECTOR_REP_CHAR) 
-public static object[] __type_ctor_info_character_0;
-public static object[] builtin__type_ctor_info_character_0;
-
-// MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, string, 0, MR_TYPECTOR_REP_STRING) 
-public static object[] __type_ctor_info_string_0;
-public static object[] builtin__type_ctor_info_string_0;
-
-// MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, c_pointer, 0,
-// 						MR_TYPECTOR_REP_C_POINTER) 
-public static object[] __type_ctor_info_c_pointer_0;
-public static object[] builtin__type_ctor_info_c_pointer_0;
-
-// MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, void, 0, MR_TYPECTOR_REP_VOID) 
-public static object[] __type_ctor_info_void_0;
-public static object[] builtin__type_ctor_info_void_0;
-
-// MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, float, 0, MR_TYPECTOR_REP_FLOAT) 
-public static object[] __type_ctor_info_float_0;
-public static object[] builtin__type_ctor_info_float_0;
-
-// MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, func, 0, MR_TYPECTOR_REP_FUNC) 
-public static object[] __type_ctor_info_func_0;
-public static object[] builtin__type_ctor_info_func_0;
-
-// MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, pred, 0, MR_TYPECTOR_REP_PRED) 
-public static object[] __type_ctor_info_pred_0;
-public static object[] builtin__type_ctor_info_pred_0;
-
-// MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(builtin, tuple, 0, MR_TYPECTOR_REP_TUPLE) 
-public static object[] __type_ctor_info_tuple_0;
-public static object[] builtin__type_ctor_info_tuple_0;
-*/
-
 public static bool
-__Unify____int_0_0(int x, int y)
-{
-	return x == y;
-}
-
-public static bool
-__Unify____string_0_0(string x, string y)
-{
-	return System.String.Equals(x, y);
-}
-
-public static bool
-__Unify____character_0_0(char x, char y)
-{
-	return x == y;
-}
-
-public static bool
-__Unify____float_0_0(double x, double y)
-{
-	return x == y;
-}
-
-public static bool
-__Unify____void_0_0(object[] x, object[] y)
+special__Unify____void_0_0(object[] x, object[] y)
 {
 	mercury.runtime.Errors.fatal_error(
 		""called unify for type `void'"");
@@ -639,7 +572,7 @@
 }
 
 public static bool
-__Unify____c_pointer_0_0(object[] x, object[] y)
+special___Unify___c_pointer_0_0(object[] x, object[] y)
 {
 	mercury.runtime.Errors.fatal_error(
 		""called unify for type `c_pointer'"");
@@ -647,7 +580,7 @@
 }
 
 public static bool
-__Unify____func_0_0(object[] x, object[] y)
+special__Unify____func_0_0(object[] x, object[] y)
 {
 	mercury.runtime.Errors.fatal_error(
 		""called unify for `func' type"");
@@ -655,15 +588,7 @@
 }
 
 public static bool
-__Unify____pred_0_0(object[] x, object[] y)
-{
-	mercury.runtime.Errors.fatal_error(
-		""called unify for `pred' type"");
-	return false;
-}
-
-public static bool
-__Unify____tuple_0_0(object[] x, object[] y)
+special__Unify____tuple_0_0(object[] x, object[] y)
 {
 	mercury.runtime.Errors.fatal_error(
 		""called unify for `tuple' type"");
@@ -671,71 +596,7 @@
 }
 
 public static void
-__Compare____int_0_0(ref object[] result, int x, int y)
-{
-	int r;
-	if (x > y) {
-		r = 2;
-	} else if (x == y) {
-		r = 0;
-	} else {
-		r = 1;
-	}
-	result = mercury.runtime.LowLevelData.make_enum(r);
-}
-
-public static void
-__Compare____float_0_0(ref object[] result, double x, double y)
-{
-	int r;
-	if (x > y) {
-		r = 2;
-	} else if (x == y) {
-		r = 0;
-	} else if (x < y) {
-		r = 1;
-	} else {
-		mercury.runtime.Errors.fatal_error(
-			""incomparable floats in compare/3"");
-		r = -1;
-	}
-	result = mercury.runtime.LowLevelData.make_enum(r);
-}
-
-
-public static void
-__Compare____string_0_0(ref object[] result, string x, string y)
-{
-	int r;
-	int res = System.String.Compare(x, y);
-	if (res > 0) {
-		r = 2;
-	} else if (res == 0) {
-		r = 0;
-	} else {
-		r = 1;
-	}
-	result = mercury.runtime.LowLevelData.make_enum(r);
-}
-
-public static void
-__Compare____character_0_0(
-	ref object[] result, char x, char y)
-{
-	int r;
-	if (x > y) {
-		r = 2;
-	} else if (x == y) {
-		r = 0;
-	} else {
-		r = 1;
-	}
-	result = mercury.runtime.LowLevelData.make_enum(r);
-}
-
-public static void
-__Compare____void_0_0(ref object[] result,
+special__Compare____void_0_0(ref object[] result,
 	object[] x, object[] y)
 {
 	mercury.runtime.Errors.fatal_error(
@@ -743,7 +604,7 @@
 }
 
 public static void
-__Compare____c_pointer_0_0(
+special__Compare____c_pointer_0_0(
 	ref object[] result, object[] x, object[] y)
 {
 	mercury.runtime.Errors.fatal_error(
@@ -751,7 +612,7 @@
 }
 
 public static void
-__Compare____func_0_0(ref object[] result,
+special__Compare____func_0_0(ref object[] result,
 	object[] x, object[] y)
 {
 	mercury.runtime.Errors.fatal_error(
@@ -759,163 +620,11 @@
 }
 
 public static void
-__Compare____pred_0_0(ref object[] result,
-	object[] x, object[] y)
-{
-	mercury.runtime.Errors.fatal_error(
-		""called compare/3 for `pred' type"");
-}
-
-public static void
-__Compare____tuple_0_0(ref object[] result,
+special__Compare____tuple_0_0(ref object[] result,
 	object[] x, object[] y)
 {
 	mercury.runtime.Errors.fatal_error(
-		""called compare/3 for `pred' type"");
-}
-
-/*
-** Unification procedures with the arguments boxed.
-** These are just wrappers which call the unboxed version.
-*/
-
-public static bool
-do_unify__int_0_0(object x, object y)
-{
-	return __Unify____int_0_0(
-		System.Convert.ToInt32(x), 
-		System.Convert.ToInt32(y)); 
-}
-
-public static bool
-do_unify__string_0_0(object x, object y)
-{
-	return __Unify____string_0_0((string) x, (string) y);
-}
-
-public static bool
-do_unify__float_0_0(object x, object y)
-{
-	return __Unify____float_0_0(
-		System.Convert.ToDouble(x), 
-		System.Convert.ToDouble(y)); 
-}
-
-public static bool
-do_unify__character_0_0(object x, object y)
-{
-	return __Unify____character_0_0(
-		System.Convert.ToChar(x), 
-		System.Convert.ToChar(y)); 
-}
-
-public static bool
-do_unify__void_0_0(object x, object y)
-{
-	mercury.runtime.Errors.fatal_error(
-		""called unify for type `void'"");
-	return false;
-}
-
-public static bool
-do_unify__c_pointer_0_0(object x, object y)
-{
-	return __Unify____c_pointer_0_0((object[]) x, (object[]) y); 
-}
-
-public static bool
-do_unify__func_0_0(object x, object y)
-{
-	mercury.runtime.Errors.fatal_error(
-		""called unify for `func' type"");
-	return false;
-}
-
-public static bool
-do_unify__pred_0_0(object x, object y)
-{
-	mercury.runtime.Errors.fatal_error(
-		""called unify for `pred' type"");
-	return false;
-}
-
-public static bool
-do_unify__tuple_0_0(object x, object y)
-{
-	mercury.runtime.Errors.fatal_error(
-		""called unify for `tuple' type"");
-	return false;
-}
-
-/*
-** Comparison procedures with the arguments boxed.
-** These are just wrappers which call the unboxed version.
-*/
-
-public static void
-do_compare__int_0_0(ref object[] result, object x, object y)
-{
-	__Compare____int_0_0(ref result,
-		System.Convert.ToInt32(x), 
-		System.Convert.ToInt32(y)); 
-}
-
-public static void
-do_compare__string_0_0(ref object[] result, object x, object y)
-{
-	__Compare____string_0_0(ref result, (string) x, (string) y);
-}
-
-public static void
-do_compare__float_0_0(ref object[] result, object x, object y)
-{
-	__Compare____float_0_0(ref result,
-		System.Convert.ToDouble(x), 
-		System.Convert.ToDouble(y)); 
-}
-
-public static void
-do_compare__character_0_0(
-	ref object[] result, object x, object y)
-{
-	__Compare____character_0_0(ref result, 
-		System.Convert.ToChar(x), 
-		System.Convert.ToChar(y)); 
-}
-
-public static void
-do_compare__void_0_0(ref object[] result, object x, object y)
-{
-	mercury.runtime.Errors.fatal_error(
-		""called compare/3 for type `void'"");
-}
-
-public static void
-do_compare__c_pointer_0_0(
-	ref object[] result, object x, object y)
-{
-	__Compare____c_pointer_0_0(ref result, (object[]) x, (object[]) y);
-}
-
-public static void
-do_compare__func_0_0(ref object[] result, object x, object y)
-{
-	mercury.runtime.Errors.fatal_error(
-		""called compare/3 for func type"");
-}
-
-public static void
-do_compare__pred_0_0(ref object[] result, object x, object y)
-{
-	mercury.runtime.Errors.fatal_error(
-		""called compare/3 for pred type"");
-}
-
-public static void
-do_compare__tuple_0_0(ref object[] result, object x, object y)
-{
-	mercury.runtime.Errors.fatal_error(
-		""called compare/3 for tuple type"");
+		""called compare/3 for `tuple' type"");
 }
 
 ").
Index: library/private_builtin.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/private_builtin.m,v
retrieving revision 1.129
diff -u -r1.129 private_builtin.m
--- library/private_builtin.m	14 Nov 2003 16:02:22 -0000	1.129
+++ library/private_builtin.m	19 Nov 2003 14:12:32 -0000
@@ -115,16 +115,6 @@
 public static object[] dummy_var;
 
 ").
-:- pragma foreign_code("MC++", "
-
-// The dummy_var is used to represent io__states and other Mercury
-// parameters that are not really passed around.  Occasionally a dummy variable
-// will be used by the code generator as an lval, so we use
-// private_builtin:dummy_var as that lval.
-
-static MR_Word dummy_var;
-
-").
 
 :- pragma inline(builtin_compare_int/3).
 :- pragma inline(builtin_compare_character/3).
@@ -389,41 +379,8 @@
 
 ").
 
-:- pragma foreign_code("MC++", "
-
-MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(private_builtin, type_ctor_info, 1,
-	MR_TYPECTOR_REP_TYPECTORINFO) 
-MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(private_builtin, type_info, 1,
-	MR_TYPECTOR_REP_TYPEINFO) 
-MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(private_builtin, base_typeclass_info, 1,
-	MR_TYPECTOR_REP_BASETYPECLASSINFO) 
-MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(private_builtin, typeclass_info, 1,
-	MR_TYPECTOR_REP_TYPECLASSINFO) 
-").
 :- pragma foreign_code("C#", "
 
-/* XXX these macros need to be defined in C#
-// MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(private_builtin, type_ctor_info, 1,
-//	MR_TYPECTOR_REP_TYPECTORINFO) 
-public static object[] __type_ctor_info_type_ctor_info_1;
-public static object[] private_builtin__type_ctor_info_type_ctor_info_1;
-
-// MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(private_builtin, type_info, 1,
-//	MR_TYPECTOR_REP_TYPEINFO) 
-public static object[] __type_ctor_info_type_info_1;
-public static object[] private_builtin__type_ctor_info_type_info_1;
-
-// MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(private_builtin, base_typeclass_info, 1,
-//	MR_TYPECTOR_REP_BASETYPECLASSINFO) 
-public static object[] __type_ctor_info_base_typeclass_info_1;
-public static object[] private_builtin__type_ctor_info_base_typeclass_info_1;
-
-// MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(private_builtin, typeclass_info, 1,
-//	MR_TYPECTOR_REP_TYPECLASSINFO) 
-public static object[] __type_ctor_info_typeclass_info_1;
-public static object[] private_builtin__type_ctor_info_typeclass_info_1;
-*/
-
 	// XXX These static constants are duplicated both here and in
 	// mercury_dotnet.cs.in.
 
@@ -483,7 +440,7 @@
 public static int MR_SECTAG_VARIABLE				= 3;
 
 public static bool
-__Unify____type_info_1_0(
+special__Unify____type_info_1_0(
 	object[] type_info, object[] x, object[] y)
 {
 	mercury.runtime.Errors.SORRY(""unify for type_info"");
@@ -491,7 +448,7 @@
 }
 
 public static bool
-__Unify____typeclass_info_1_0(
+special__Unify____typeclass_info_1_0(
 	object[] type_info, object[] x, object[] y)
 {
 	mercury.runtime.Errors.SORRY(""unify for typeclass_info"");
@@ -499,7 +456,7 @@
 }
 
 public static bool
-__Unify____base_typeclass_info_1_0(
+special__Unify____base_typeclass_info_1_0(
 	object[] type_info, object[] x, object[] y)
 {
 	mercury.runtime.Errors.SORRY(""unify for base_typeclass_info"");
@@ -507,7 +464,7 @@
 }
 
 public static bool
-__Unify____type_ctor_info_1_0(
+special__Unify____type_ctor_info_1_0(
 	object[] type_info, object[] x, object[] y)
 {
 	mercury.runtime.Errors.SORRY(""unify for type_ctor_info"");
@@ -515,92 +472,33 @@
 }
 
 public static void
-__Compare____type_ctor_info_1_0(
+special__Compare____type_ctor_info_1_0(
 	object[] type_info, ref object[] result, object[] x, object[] y)
 {
 	mercury.runtime.Errors.SORRY(""compare for type_ctor_info"");
 }
 
 public static void
-__Compare____type_info_1_0(
+special__Compare____type_info_1_0(
 	object[] type_info, ref object[] result, object[] x, object[] y)
 {
 	mercury.runtime.Errors.SORRY(""compare for type_info"");
 }
 
 public static void
-__Compare____typeclass_info_1_0(
+special__Compare____typeclass_info_1_0(
 	object[] type_info, ref object[] result, object[] x, object[] y)
 {
 	mercury.runtime.Errors.SORRY(""compare for typeclass_info"");
 }
 
 public static void
-__Compare____base_typeclass_info_1_0(
+special__Compare____base_typeclass_info_1_0(
 	object[] type_info, ref object[] result, object[] x, object[] y)
 {
 	mercury.runtime.Errors.SORRY(""compare for base_typeclass_info"");
 }
 
-public static bool
-do_unify__type_ctor_info_1_0(object[] type_info, object x, object y)
-{
-	return __Unify____type_ctor_info_1_0(type_info, 
-		(object[]) x, (object[]) y);
-}
-
-public static bool
-do_unify__type_info_1_0(object[] type_info, object x, object y)
-{
-	return __Unify____type_info_1_0(type_info, (object[]) x, (object[]) y);
-}
-
-public static bool
-do_unify__typeclass_info_1_0(object[] type_info, object x, object y)
-{
-	return __Unify____typeclass_info_1_0(type_info, 
-		(object[]) x, (object[]) y);
-}
-
-public static bool
-do_unify__base_typeclass_info_1_0(object[] type_info, object x, object y)
-{
-	return __Unify____base_typeclass_info_1_0(type_info,
-		(object[]) x, (object[]) y);
-}
-
-public static void
-do_compare__type_ctor_info_1_0(
-	object[] type_info, ref object[] result, object x, object y)
-{
-	__Compare____type_ctor_info_1_0(
-		type_info, ref result, (object[]) x, (object[]) y);
-}
-
-public static void
-do_compare__type_info_1_0(
-	object[] type_info, ref object[] result, object x, object y)
-{
-	__Compare____type_info_1_0(type_info, ref result,
-		(object[]) x, (object[]) y);
-}
-
-public static void
-do_compare__typeclass_info_1_0(
-	object[] type_info, ref object[] result, object x, object y)
-{
-	__Compare____typeclass_info_1_0(type_info, ref result,
-		(object[]) x, (object[]) y);
-}
-
-public static void
-do_compare__base_typeclass_info_1_0(
-	object[] type_info, ref object[] result, object x, object y)
-{
-	__Compare____base_typeclass_info_1_0(type_info, ref result,
-		(object[]) x, (object[]) y);
-}
-
 ").
 
 :- pragma foreign_proc("C",
@@ -1031,24 +929,10 @@
 % Code to define the `heap_pointer' and `ref' types for the .NET back-end.
 % (For the C back-ends, they're defined in runtime/mercury_builtin_types.[ch].)
 
-:- pragma foreign_code("MC++", "
-	
-MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(private_builtin, heap_pointer, 0,
-	MR_TYPECTOR_REP_HP) 
-MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(private_builtin, ref, 1,
-	MR_TYPECTOR_REP_REFERENCE) 
-").
 :- pragma foreign_code("C#", "
 	
-/* XXX these macros need to be defined in C#
-// MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(private_builtin, heap_pointer, 0,
-//	MR_TYPECTOR_REP_HP) 
-*/
-public static object[] __type_ctor_info_heap_pointer_0;
-public static object[] private_builtin__type_ctor_info_heap_pointer_0;
-
 public static bool
-__Unify__private_builtin__heap_pointer_0_0(object[] x, object[] y)
+special__Unify__private_builtin__heap_pointer_0_0(object[] x, object[] y)
 {
 	mercury.runtime.Errors.fatal_error(
 		""called unify for type `private_builtin:heap_pointer'"");
@@ -1056,7 +940,7 @@
 }
 
 public static void
-__Compare__private_builtin__heap_pointer_0_0(
+special__Compare__private_builtin__heap_pointer_0_0(
 	ref object[] result, object[] x, object[] y)
 {
 	mercury.runtime.Errors.fatal_error(
@@ -1064,51 +948,15 @@
 }
 
 public static bool
-do_unify__heap_pointer_0_0(object x, object y)
-{
-	mercury.runtime.Errors.fatal_error(
-		""called unify for type `private_builtin:heap_pointer'"");
-	return false;
-}
-
-public static void
-do_compare__heap_pointer_0_0(
-	ref object[] result, object x, object y)
-{
-	mercury.runtime.Errors.fatal_error(
-		""called compare/3 for type `private_builtin:heap_pointer'"");
-}
-
-/* XXX these macros need to be defined in C#
-// MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(private_builtin, ref, 1,
-//	MR_TYPECTOR_REP_REFERENCE) 
-public static object[] __type_ctor_info_ref_1;
-public static object[] private_builtin__type_ctor_info_ref_1;
-*/
-
-public static bool
-__Unify__private_builtin__ref_1_0(object[] type_info, object[] x, object[] y)
-{
-	return x == y;
-}
-
-public static bool
-do_unify__ref_1_0(object[] type_info, object x, object y)
+special__Unify__private_builtin__ref_1_0(
+	object[] type_info, object[] x, object[] y)
 {
 	return x == y;
 }
 
 public static void
-__Compare__private_builtin__ref_1_0(
+special__Compare__private_builtin__ref_1_0(
 	object[] type_info, ref object[] result, object[] x, object[] y)
-{
-	mercury.runtime.Errors.fatal_error(
-		""called compare/3 for type `private_builtin.ref'"");
-}
-
-public static void
-do_compare__ref_1_0(
-	object[] type_info, ref object[] result, object x, object y)
 {
 	mercury.runtime.Errors.fatal_error(
 		""called compare/3 for type `private_builtin.ref'"");
Index: library/type_desc.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/type_desc.m,v
retrieving revision 1.21
diff -u -r1.21 type_desc.m
--- library/type_desc.m	14 Nov 2003 16:02:22 -0000	1.21
+++ library/type_desc.m	19 Nov 2003 14:12:32 -0000
@@ -168,60 +168,22 @@
 call_rtti_compare_type_infos(Res, T1, T2) :-
 	rtti_implementation__compare_type_infos(Res, T1, T2).
 
-:- pragma foreign_code("MC++", "
-
-MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(type_desc, type_ctor_desc, 0, 
-	MR_TYPECTOR_REP_TYPECTORDESC)
-MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(type_desc, type_desc, 0, 
-	MR_TYPECTOR_REP_TYPEDESC)
-
-").
 :- pragma foreign_code("C#", "
 
-/* XXX These macros need to be defined in C#
-// MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(type_desc, type_ctor_desc, 0, 
-//	MR_TYPECTOR_REP_TYPECTORDESC)
-public static object[] __type_ctor_info_type_ctor_desc_0;
-public static object[] type_desc__type_ctor_info_type_ctor_desc_0;
-
-// MR_DEFINE_BUILTIN_TYPE_CTOR_INFO(type_desc, type_desc, 0, 
-//	MR_TYPECTOR_REP_TYPEDESC)
-public static object[] __type_ctor_info_type_desc_0;
-public static object[] type_desc__type_ctor_info_type_desc_0;
-*/
-
-
 public static int MR_compare_type_info(object[] t1, object[] t2) {
 	object[] res = null;
 
 	mercury.type_desc.mercury_code.ML_call_rtti_compare_type_infos(
 		ref res, t1, t2);
-/*
-#ifdef MR_HIGHLEVEL_DATA
-	return res-> data_tag;
-#else
-*/
+// currently comparison_results are always builting using low-level data.
+//#ifdef MR_HIGHLEVEL_DATA
+//	return res.data_tag;
+//#else
 	return System.Convert.ToInt32(res[0]);
 // #endif
 }
 
 public static void
-__Compare____type_ctor_desc_0_0(
-	ref object[] result, object[] x, object[] y)
-{
-	mercury.runtime.Errors.SORRY(
-		""foreign code for comparing type_ctor_descs"");
-}
-
-public static bool
-__Unify____type_ctor_desc_0_0(object[] x, object[] y)
-{
-	mercury.runtime.Errors.SORRY(
-		""foreign code for unifying type_ctor_descs"");
-	return false;
-}
-
-public static void
 special___Compare___type_ctor_desc_0_0(
 	ref object[] result, object[] x, object[] y)
 {
@@ -237,31 +199,6 @@
 	return false;
 }
 
-public static bool
-do_unify__type_ctor_desc_0_0(object x, object y)
-{
-	return __Unify____type_ctor_desc_0_0((object[]) x, (object[]) y);
-}
-
-public static void
-do_compare__type_ctor_desc_0_0(ref object[] result, object x, object y)
-{
-	__Compare____type_ctor_desc_0_0(ref result, (object[]) x, (object[]) y);
-}
-
-public static void
-__Compare____type_desc_0_0(ref object[] result, object[] x, object[] y)
-{
-	mercury.type_desc.mercury_code.ML_call_rtti_compare_type_infos(
-		ref result, x, y);
-}
-
-public static bool
-__Unify____type_desc_0_0(object[] x, object[] y)
-{
-	return (MR_compare_type_info(x, y) == 0);
-}
-
 public static void
 special___Compare___type_desc_0_0(
 	ref object[] result, object[] x, object[] y)
@@ -274,19 +211,6 @@
 special___Unify___type_desc_0_0(object[] x, object[] y)
 {
 	return (MR_compare_type_info(x, y) == 0);
-}
-
-public static bool
-do_unify__type_desc_0_0(object x, object y)
-{
-	return __Unify____type_desc_0_0((object[]) x, (object[]) y);
-}
-
-public static void
-do_compare__type_desc_0_0(
-	ref object[] result, object x, object y)
-{
-	__Compare____type_desc_0_0(ref result, (object[]) x, (object[]) y);
 }
 
 ").


-- 
Peter Ross		
Software Engineer                                (Work)   +32 2 757 10 15
Mission Critical                                 (Mobile) +32 485 482 559
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list