[m-dev.] diff: existential types using the MLDS

Peter Ross peter.ross at miscrit.be
Fri Jul 28 01:13:11 AEST 2000


Hi,


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


Estimated hours taken: 4

compiler/ml_code_util.m:
    Fix a bug introduced in fjh's changed to use generalised code for
    boxing/unboxing existentially typed output arguments in the MLDS:
    we now need to add existentially typed output args to the list of
    output variables of a procedure.

Index: compiler/ml_code_util.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ml_code_util.m,v
retrieving revision 1.17
diff -u -r1.17 ml_code_util.m
--- compiler/ml_code_util.m	2000/06/06 05:45:19	1.17
+++ compiler/ml_code_util.m	2000/07/27 11:55:52
@@ -1472,19 +1472,8 @@
 		OutputVars = []
 	; HeadVars = [Var|Vars], HeadModes = [Mode|Modes] ->
 		map__lookup(VarTypes, Var, VarType),
-		map__lookup(HeadVarTypes, Var, HeadType),
 		(
-			\+ mode_to_arg_mode(ModuleInfo, Mode, VarType, top_in),
-			%
-			% if this argument is an existentially typed output
-			% that we need to box, then don't include it in the
-			% output_vars; ml_gen_box_existential_outputs
-			% will handle these outputs separately.
-			%
-			\+ (
-				HeadType = term__variable(_),
-				VarType = term__functor(_, _, _)
-			)
+			\+ mode_to_arg_mode(ModuleInfo, Mode, VarType, top_in)
 		->
 			OutputVars1 = select_output_vars(ModuleInfo,
 					Vars, Modes, HeadVarTypes, VarTypes),

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