diff: bug fix for TypeClassInfo variables.

Tyson Dowd trd at cs.mu.OZ.AU
Sat Aug 22 21:49:44 AEST 1998


Hi,

This is just a bug fix.

The test case is the CORBA examples.

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


Estimated hours taken: 1

Fix a bug that was causing generated TypeClassInfo variables in C code
to be incorrectly generated.  Sometimes input variables would be used
as outputs, and vice versa.

compiler/polymorphism.m:
	Generate the names of the variables in the same order as their
	types and modes.


Index: compiler/polymorphism.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/polymorphism.m,v
retrieving revision 1.144
diff -u -r1.144 polymorphism.m
--- polymorphism.m	1998/08/21 04:06:45	1.144
+++ polymorphism.m	1998/08/22 11:28:16
@@ -1122,9 +1122,9 @@
 	in_mode(In),
 	out_mode(Out),
 	polymorphism__c_code_add_typeclass_infos_2(ExtraVars0, ExtraVars1,
-		UnivCs, In, PredTypeVarSet, ArgInfo0, ArgInfo1),
+		ExistCs, In, PredTypeVarSet, ArgInfo0, ArgInfo1),
 	polymorphism__c_code_add_typeclass_infos_2(ExtraVars1, ExtraVars,
-		ExistCs, Out, PredTypeVarSet, ArgInfo1, ArgInfo).
+		UnivCs, Out, PredTypeVarSet, ArgInfo1, ArgInfo).
 
 :- pred polymorphism__c_code_add_typeclass_infos_2(list(var), list(var),
 		list(class_constraint), mode,


-- 
       Tyson Dowd           # There isn't any reason why Linux can't be
                            # implemented as an enterprise computing solution.
     trd at cs.mu.oz.au        # Find out what you've been missing while you've
http://www.cs.mu.oz.au/~trd # been rebooting Windows NT. -- InfoWorld, 1998.



More information about the developers mailing list