[m-rev.] diff: update Aditi interface

Simon Taylor stayl at cs.mu.OZ.AU
Sun Aug 24 00:00:21 AEST 2003


Estimated hours taken: 0.1
Branches: main

compiler/aditi_builtin_ops.m:
	Fix a mode error in the generated HLDS.

Index: aditi_builtin_ops.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/aditi_builtin_ops.m,v
retrieving revision 1.3
diff -u -u -r1.3 aditi_builtin_ops.m
--- aditi_builtin_ops.m	23 Aug 2003 13:31:03 -0000	1.3
+++ aditi_builtin_ops.m	23 Aug 2003 13:56:25 -0000
@@ -225,9 +225,11 @@
 			"do_call_returning_relation"), NumBuiltinArgs) },
 	{ Rhs = functor(Functor, no, BuiltinArgs) },
 
-	% XXX This is wrong - closure is not ground.
-	{ UniMode = ((free_inst - ground_inst) ->
-			(ground_inst - ground_inst)) },
+	{ CastInputInst = ground(shared,
+			higher_order(pred_inst_info(predicate,
+				[aditi_ui_mode, out_mode], det))) },
+	{ UniMode = ((free_inst - CastInputInst) ->
+			(CastInputInst - CastInputInst)) },
 	{ list__duplicate(NumBuiltinArgs, UniMode, UniModes) },
 	{ BuiltinConsId = pred_const(BuiltinPredId, BuiltinProcId, normal) },
 	{ ExprnId = no },
@@ -283,10 +285,6 @@
 	{ CastOutputInst = ground(shared,
 			higher_order(pred_inst_info(CalleePredOrFunc,
 				NonCurriedArgModes, CalleeDetism))) },
-
-	{ CastInputInst = ground(shared,
-			higher_order(pred_inst_info(predicate,
-				[aditi_ui_mode, out_mode], det))) },
 	{ CastModes = [(CastInputInst -> CastInputInst),
 			(free_inst -> CastOutputInst)] },
 	{ CastGoal = generic_call(unsafe_cast, [NewVar, Var],
--------------------------------------------------------------------------
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