[m-dev.] for review: initialize global IO data structures in IL backend

Tyson Dowd trd at cs.mu.OZ.AU
Tue Nov 7 19:33:56 AEDT 2000


On 07-Nov-2000, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 06-Nov-2000, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> > compiler/mlds_to_il.m:
> > 	If the module contains main/2, generate a call to the initialization
> > 	function for the io library in the class constructor for this module.
> > 	This isn't a perfect solution (it isn't quite a flexible as the
> > 	init.c approach if you have more than one main module that contains a 
> > 	main/2 predicate) but it works well enough at the moment.
> > 
> > 	Also, switch to using DCG versions of the field selection and update
> > 	syntax, as this is nicer than using =(Info) and dcg_set.
> 
> That looks fine, Tyson.
> 
> My only comment is that rather than calling
> mercury.io.io_init_state_2_p_0() directly, it might be a better idea
> to call something like mercury.private_builtin.init_runtime(), and
> have that call mercury.io.io_init_state_2_p_0().  That way it's easier
> to add additional start-up code if needed.

This is a good idea and easy to do.  I'll do this before I commit.

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't everyone's cup of fur.
     trd at cs.mu.oz.au        # 
http://www.cs.mu.oz.au/~trd #
--------------------------------------------------------------------------
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