[m-rev.] trivial diff: fix comment in ml_code_gen.m

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Nov 5 20:01:06 AEDT 2003


Estimated hours taken: 0.25
Branches: main

compiler/ml_call_gen.m:
	Fix an incorrect comment.

Workspace: /home/ceres/fjh/mercury
Index: compiler/ml_call_gen.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/ml_call_gen.m,v
retrieving revision 1.42
diff -u -d -u -1 -5 -r1.42 ml_call_gen.m
--- compiler/ml_call_gen.m	24 Oct 2003 06:17:42 -0000	1.42
+++ compiler/ml_call_gen.m	5 Nov 2003 08:56:03 -0000
@@ -370,35 +370,35 @@
 	% For example, if the callee is declared as
 	%
 	%	:- some [T2]
 	%	   pred callee(float::in, T1::in, float::out, T2::out, ...).
 	%
 	% then for a call `callee(Arg1, Arg2, Arg3, Arg4, ...)'
 	% with arguments of types `U1, float, U2, float, ...',
 	% we generate the following fragments:
 	%
 	% 	/* declarations of variables needed for boxing/unboxing */
 	%	Float conv_Arg3;
 	%	MR_Box conv_Arg4;
 	%	...
 	%
 	% 	/* code to call the function */
-	%	func(unbox(Arg1), box(Arg2), &boxed_Arg3, &unboxed_Arg4);
+	%	func(unbox(Arg1), box(Arg2), &unboxed_Arg3, &boxed_Arg4);
 	%
 	%	/* code to box/unbox the output arguments */
-	%	*Arg3 = unbox(boxed_Arg3);
-	%	*Arg4 = box(unboxed_Arg4);
+	%	*Arg3 = box(unboxed_Arg3);
+	%	*Arg4 = unbox(boxed_Arg4);
 	%	...
 	%
 	% Note that of course in general not every argument will need
 	% to be boxed/unboxed; for those where no conversion is required,
 	% we just pass the original argument unchanged.
 	%
 ml_gen_call(PredId, ProcId, ArgNames, ArgLvals, ActualArgTypes, CodeModel,
 		Context, ForClosureWrapper, MLDS_Decls, MLDS_Statements) -->
 	%
 	% Compute the function signature
 	%
 	=(MLDSGenInfo),
 	{ ml_gen_info_get_module_info(MLDSGenInfo, ModuleInfo) },
 	{ Params = ml_gen_proc_params(ModuleInfo, PredId, ProcId) },
 	{ Signature = mlds__get_func_signature(Params) },

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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