[m-dev.] [reuse] diff: sr_choice stratergy

Peter Ross petdr at miscrit.be
Tue Oct 10 03:43:34 AEDT 2000


Hi,


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


Estimated hours taken: 0.5

sr_choice.m:
    Divide the stratergy into two parts.  One a constraint on what cells
    are available for reuse and the second how you choose a cell for
    reuse once the constraint has been satisfied.


Index: sr_choice.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/sr_choice.m,v
retrieving revision 1.1.2.1
diff -u -r1.1.2.1 sr_choice.m
--- sr_choice.m	2000/10/04 13:00:04	1.1.2.1
+++ sr_choice.m	2000/10/09 16:41:54
@@ -21,7 +21,23 @@
 :- import_module list, std_util.
 
 :- type strategy
-	--->	same_cons_id.
+	--->	strategy(
+			constraint,
+			selection
+		).
+
+	% The constraint on the cells that we consider available for
+	% reuse.
+:- type constraint
+	--->	same_cons_id
+	.
+
+	% After the constraint has been applied to the set of cells
+	% which are available for reuse, determine which of that set we
+	% select.
+:- type selection
+	--->	lifo
+	.
 
 :- pred sr_choice__process_goal(strategy::in, hlds_goal::in, hlds_goal::out,
 		maybe(list(reuse_condition))::out) is det.

--------------------------------------------------------------------------
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