[m-dev.] diff: MLDS backend: improve conjunctions

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Nov 9 12:35:31 AEDT 1999


Estimated hours taken: 0.25

compiler/ml_code_gen.m:
	Handle singleton conjunctions seperately,
	because this leads to better code when generating
	model_semi and model_non conjunctions.

Workspace: /d-drive/home/hg/fjh/mercury
Index: compiler/ml_code_gen.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ml_code_gen.m,v
retrieving revision 1.13
diff -u -d -r1.13 ml_code_gen.m
--- compiler/ml_code_gen.m	1999/11/08 22:27:51	1.13
+++ compiler/ml_code_gen.m	1999/11/09 00:33:29
@@ -1966,8 +1966,12 @@
 
 ml_gen_conj([], CodeModel, Context, [], MLDS_Statements) -->
 	ml_gen_success(CodeModel, Context, MLDS_Statements).
+ml_gen_conj([SingleGoal], CodeModel, _Context,
+		MLDS_Decls, MLDS_Statements) -->
+	ml_gen_goal(CodeModel, SingleGoal, MLDS_Decls, MLDS_Statements).
 ml_gen_conj([First | Rest], CodeModel, Context,
 		MLDS_Decls, MLDS_Statements) -->
+	{ Rest = [_ | _] },
 	{ First = _ - FirstGoalInfo },
 	{ goal_info_get_code_model(FirstGoalInfo, FirstCodeModel) },
 	(

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- 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