[m-rev.] diff: fix bootstrapping problem

Julien Fischer juliensf at csse.unimelb.edu.au
Thu May 31 11:42:34 AEST 2007


On Thu, 31 May 2007, Peter Wang wrote:

> On 2007-05-31, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>>
>> Estimated hours taken: 1
>> Branches: main
>>
>> Fix a problem that prevented the compiler bootstrapping.
>>
>> compiler/term_constr_initial.m:
>> compiler/termination.m:
>> 	Conform to the new behaviour of status_defined_in_this_module/1
>> 	w.r.t procedures defined by `:- external'.
>>
>> 	Change the progress message emitted during termination analysis
>> 	to say that we are `Checking the termination of' a procedure
>> 	rather than just `Checking' it.
>>
>> Julien.
>
> Sorry about that.  I think I see why the status_* functions are defined
> the way that they are now.  Do you want me to apply the following patch?

Yes, that's probably the best thing to do in the short term.
(For one thing I'm not sure what assumptions other parts of
the compiler make about this - please leave the comments about
externals in the termination analyser code though.)

A better long term solutions would be to define a type like:

 	:- type proc_defn_import_status
 		--->	defined_in_this_module
 		;	imported
 		;	external.

and use that when checking the import_status of procedures.
That way the handling of procedures defined using external would
be made explicit.

(I'll make this latter change after Zoltan has finished his change
to the frontend of the compiler.)

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list