[m-dev.] diff: handle no_tag arg_name RTTI for MLDS

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Jan 16 14:24:10 AEDT 2001


Estimated hours taken: 0.5

compiler/rtti_to_mlds.m:
	Fill in the arg_name field for no_tag functor descriptors.
	Zoltan added this field recently, and added code to rtti_out
	to output it for the LLDS back-end, but the code here was
	just ignoring it, rather than outputting it.

Workspace: /home/hg/fjh/gcc-cvs/gcc/mercury
Index: compiler/rtti_to_mlds.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/rtti_to_mlds.m,v
retrieving revision 1.10
diff -u -d -r1.10 rtti_to_mlds.m
--- compiler/rtti_to_mlds.m	2000/12/18 07:40:33	1.10
+++ compiler/rtti_to_mlds.m	2001/01/15 10:43:01
@@ -149,11 +149,12 @@
 		gen_init_int(Ordinal)
 	]).
 gen_init_rtti_data_defn(notag_functor_desc(_RttiTypeId, FunctorName, ArgType,
-		_MaybeArgName), ModuleName, _, Init, []) :-
+		MaybeArgName), ModuleName, _, Init, []) :-
 	Init = init_struct([
 		gen_init_string(FunctorName),
 		gen_init_cast_rtti_data(mlds__pseudo_type_info_type,
-			ModuleName, ArgType)
+			ModuleName, ArgType),
+		gen_init_maybe(ml_string_type, gen_init_string, MaybeArgName)
 	]).
 gen_init_rtti_data_defn(du_functor_desc(RttiTypeId, FunctorName, Ptag, Stag,
 		Locn, Ordinal, Arity, ContainsVarBitVector, MaybeArgTypes,
@@ -246,6 +247,9 @@
 	]).
 gen_init_rtti_data_defn(pseudo_type_info(Pseudo), ModuleName, _, Init, []) :-
 	Init = gen_init_pseudo_type_info_defn(Pseudo, ModuleName).
+
+:- func ml_string_type = mlds__type.
+ml_string_type = mercury_type(string_type, str_type).
 
 :- func gen_init_functors_info(type_ctor_functors_info, module_name,
 		rtti_type_id) = mlds__initializer.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list