[m-dev.] Extra HLDS pass..

Robert Ernst Johann JESCHOFNIK rejj at students.cs.mu.oz.au
Tue Mar 7 11:12:14 AEDT 2000


On Tue, 7 Mar 2000, Fergus Henderson wrote:

> On 01-Mar-2000, Robert Ernst Johann JESCHOFNIK <rejj at students.cs.mu.oz.au> wrote:
> > However, I have presently broken code generation slightly, since in
> > several places whilst looking up constructors for types the previous
> > assumption that eqv_types have been expanded is now invalid. I have gone
> > through in a few places I have found and added the call to expand the
> > particular type, but every time I do and rerun the tests, I find yet
> > another place that needs this to be done...
> 
> Is there any reason why you can't modify the predicate which looks up
> constructors for types to do the expansion?

Error messages can be generated in places that look up the type
constructors - mode checking being the example that I ran in to. One of
the main goals of this change is to improve the error messages so that the
"correct" type (w.r.t. what was in the source) is used, not the expanded
type. This means that it is too early for this in the lookup of
constructors.

I am now doing it at the start of code generation - before the code for
each proc is generated, the expansion is done and stored in a seperate
field. This is so that RTTI also only sees the original type (apparently,
RTTI is a very, very black box to me), and things like the debugger will
not list expanded types.


Rob

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