[m-rev.] for review: enable pragma memos in term_to_xml

Ian MacLarty maclarty at cs.mu.OZ.AU
Sat Jan 22 15:24:49 AEDT 2005


Estimated hours taken: 0.5
Branche: main

Enable pragma memos in term_to_xml.  Only memos that had a significant effect
with a small benchmark were enabled.

library/term_to_xml.m
	Enable certain pragma memos and remove ones that didn't have a 
	significant effect.

Index: library/term_to_xml.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/term_to_xml.m,v
retrieving revision 1.4
diff -u -r1.4 term_to_xml.m
--- library/term_to_xml.m	15 Dec 2004 04:40:23 -0000	1.4
+++ library/term_to_xml.m	20 Dec 2004 11:22:31 -0000
@@ -512,9 +512,7 @@
 :- pred make_unique_element(type_desc.type_desc::in, maybe_functor_info::in,
 	string::out, list(attribute)::out) is det.
 
-% XXX This should be uncommented once memoing can be switched off for grades
-% which don't support it.
-% :- pragma memo(make_unique_element/4).
+:- pragma memo(make_unique_element/4).
 
 make_unique_element(TypeDesc, du_functor(Functor, Arity), Element,
 		all_attributes) :-
@@ -550,10 +548,6 @@
 :- pred make_simple_element(type_desc.type_desc::in, maybe_functor_info::in,
 	string::out, list(attribute)::out) is det.
 
-% XXX This should be uncommented once memoing can be switched off for grades
-% which don't support it.
-% :- pragma memo(make_simple_element/4).
-
 make_simple_element(_, du_functor(Functor, _), Element, all_attributes) :-
 	(
 		common_mercury_functor(Functor, ReservedElement)
@@ -705,10 +699,6 @@
 	list(maybe(int))::out, list(list(type_desc.pseudo_type_desc))::out, 
 	list(list(attribute))::out) is det.
 
-% XXX This should be uncommented once memoing can be switched off for grades
-% which don't support it.
-% :- pragma memo(get_elements_and_args/7).
-
 get_elements_and_args(MakeElement, TypeDesc, Elements, MaybeFunctors, 
 		MaybeArities, ArgTypeLists, AttributeLists) :-
 	(
@@ -858,9 +848,7 @@
 :- func get_field_names(type_desc.type_desc, string, int)
 	= list(maybe(string)).
 
-% XXX This should be uncommented once memoing can be switched off for grades
-% which don't support it.
-% :- pragma memo(get_field_names/3).
+:- pragma memo(get_field_names/3).
 
 get_field_names(TypeDesc, Functor, Arity) = MaybeFields :-
 	(
--------------------------------------------------------------------------
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