[m-dev.] [reuse] diff: sr_direct

Peter Ross petdr at miscrit.be
Tue Oct 10 23:42:26 AEDT 2000


Hi,


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


Estimated hours taken: 0.1

sr_direct.m:
    Update all construction unifications with choice data.


Index: sr_direct.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/sr_direct.m,v
retrieving revision 1.1.2.4
diff -u -r1.1.2.4 sr_direct.m
--- sr_direct.m	2000/10/10 12:03:56	1.1.2.4
+++ sr_direct.m	2000/10/10 12:36:00
@@ -260,16 +260,9 @@
 	;
 		Unification = construct(_, CONS_ID, _, _, _, _, _)
 	->
-		(
-			dead_cell_pool_try_to_reuse( CONS_ID, 
-					Pool0, ReuseVarsConds)
-		->
-			goal_info_set_reuse(Info0, 
-				choice(construct(ReuseVarsConds)),
-				Info)
-		;
-			Info = Info0
-		),
+		dead_cell_pool_try_to_reuse( CONS_ID, Pool0, ReuseVarsConds),
+		goal_info_set_reuse(Info0, choice(construct(ReuseVarsConds)),
+				Info),
 		Pool = Pool0
 	;
 		% assign
@@ -339,7 +332,7 @@
 
 :- pred dead_cell_pool_try_to_reuse( cons_id, dead_cell_pool, 
 		set(pair(prog_var, reuse_condition))).
-:- mode dead_cell_pool_try_to_reuse( in, in, out) is semidet.
+:- mode dead_cell_pool_try_to_reuse( in, in, out) is det.
 		
 dead_cell_pool_init( HVS, Pool ):- 
 	map__init(Map),
@@ -447,7 +440,6 @@
 		cons_can_reuse( Arity ), 
 		AssocList, 
 		CellsThatCanBeReused),
-	CellsThatCanBeReused \= [],
 	list__map(
 		to_pair_var_condition, 
 		CellsThatCanBeReused,

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