[m-dev.] [reuse] diff: handle some-goal

Nancy Mazur Nancy.Mazur at cs.kuleuven.ac.be
Fri Oct 13 20:33:10 AEDT 2000


Hi,


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



Estimated hours taken: 0.5


pa_run.m:
sr_dead.m:
	Handle the some-goal. 
	The some is propagated as a normal goal. 


Index: pa_run.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/pa_run.m,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 pa_run.m
--- pa_run.m	2000/10/12 21:53:31	1.1.2.3
+++ pa_run.m	2000/10/13 09:32:00
@@ -338,8 +338,16 @@
 analyse_goal_expr( not(Goal), _Info, ProcInfo, HLDS , T0, T, A0, A ):-
 	analyse_goal( ProcInfo, HLDS, Goal, T0, T, A0, A).
 
-analyse_goal_expr( some(_Vars,_,_Goal), _Info, _, _ , T, T, _A, A):-
-	pa_alias_as__top("some not handled", A).
+analyse_goal_expr( some(Vars,_,Goal), _Info, ProcInfo, HLDS , T0, T, A0, A):-
+	(
+		Vars = []
+	->
+		% XXX
+		analyse_goal( ProcInfo, HLDS, Goal, T0, T, A0, A)
+	;
+		require__error("(pa_run) analyse_goal_expr: some should have empty vars.")
+	).
+	% pa_alias_as__top("some not handled", A).
 	% error( "(pa) some goal not handled") .
 
 analyse_goal_expr( if_then_else(_VARS, IF, THEN, ELSE, _SM), _Info, 
Index: sr_dead.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Attic/sr_dead.m,v
retrieving revision 1.1.2.3
diff -u -r1.1.2.3 sr_dead.m
--- sr_dead.m	2000/10/12 15:03:47	1.1.2.3
+++ sr_dead.m	2000/10/13 09:32:01
@@ -158,6 +158,14 @@
 			Unification0, Info, Alias0, Alias),
 		Expr = Expr0
 	;
+		Expr0 = some( A, B, SomeGoal0)
+	->
+		% XXX
+		annotate_goal(ProcInfo, HLDS, SomeGoal0, SomeGoal, Pool0, Pool, 
+				Alias0, Alias), 
+		Info = Info0, 
+		Expr = some(A, B, SomeGoal)
+	;
 		% * call --> do nothing 
 		% * generic_call
 		Expr = Expr0, 

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