diff: polymorphism.m: specialize typeclass method calls

David Glen JEFFERY dgj at cs.mu.OZ.AU
Wed Jan 28 10:13:23 AEDT 1998


On 27-Jan-1998, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> Hi,
> 
> David, can you please review this one?
> 
> Estimated hours taken: 4 (plus 1 or 2 from dgj)
> 
> compiler/polymorphism.m:	
> 	For calls to class methods, if the particular class instance is
> 	known at the call site, then specialize the code by generating
> 	a direct call to the method for that instance.
> 
> tests/invalid/Mmakefile:
> tests/invalid/typeclass_test_{1,2,3,4}.m:
> tests/invalid/typeclass_test_{1,2,3,4}.exp:
> tests/hard_coded/Mmakefile:
> tests/hard_coded/typeclass_test_{5,6}.m:
> tests/hard_coded/typeclass_test_{5,6}.exp:
> 	Some test cases for type classes, including one for the above change.
> 
>  
> +		% The PredProcId is set to `yes(_)' for the first call only,
> +		% because we can only specialize method calls if we know the
> +		% which instance of the method's type class it is; knowing

s/know the/know

Otherwise, that's fine. Thanks Fergus.


love and cuddles,
dgj
-- 
David Jeffery (dgj at cs.mu.oz.au) |  Marge: Did you just call everyone "chicken"?
MEngSc student,                 |  Homer: Noooo.  I swear on this Bible!
Department of Computer Science  |  Marge: That's not a Bible; that's a book of
University of Melbourne         |         carpet samples!
Australia                       |  Homer: Ooooh... Fuzzy.



More information about the developers mailing list