[m-dev.] Re: intermod and IL grades

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Aug 10 02:39:04 AEST 2001


On 09-Aug-2001, Tyson Dowd <trd at miscrit.be> wrote:
> It's possible to get missing method exceptions if intermodule
> optimization is turned of with the IL grade.  For example, if an
> function takes an abstract type "foo" which is equivalent to "int",
> the callee will use "int" while the caller uses "object[]".

Yes.  That's the same problem with abstract equivalence types
that causes trouble if you use --high-level-data.

> I think we *have* to turn intermodule optimization on in the IL grades
> for correctness (and not just for high level data).

Yes.

> Do you think this is right?  Should we just make grade ilc and il imply
> intermodule optimization somehow?

Yes, at least for now.

Even that is not quite sufficient, though.  To make things work properly,
we also need to read .opt files transitively, which currently the compiler
doesn't do.  I did a bit of work on that, but it turned out to be a bit
harder than I first expected.

Unfortunately the progress that I did make was lying around in a diff file in
one of my workspaces on /home/mars and although I backed up most of my stuff
from /home/mars before it died, I unfortunately didn't back up that one.

Still, I think this is not urgent, because the work-around is fairly easy --
just add additional "import_module" declarations.

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