[m-dev.] for review: turn off support for foriegn_code/3+

Tyson Dowd trd at cs.mu.OZ.AU
Tue Mar 13 19:42:35 AEDT 2001


On 22-Jan-2001, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 22-Jan-2001, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> > I don't intend to commit this just yet, but when we have bootstrapped
> > "enough" I will bootcheck and then commit this.  I am not sure when that will
> > be.
> > 
> > This is *just* for the mercury-latest branch.
> ...
> > Estimated hours taken: 2
> > 
> > configure.in:
> > 	Check for foreign_proc, as we require it to work if we wish to
> > 	bootstrap.
> > 
> > compiler/prog_io_pragma.m:
> > 	Remove support for foreign_code/3+.  
> > 	We only accept foreign_proc for these cases now.
> > 
> > library/*.m:
> > 	Turn foreign_code/3+ into foreign_proc by applying the
> > 	following subsitutions:
> > 
> > 	First turn all foreign_code into foreign_proc:
> > 	s/foreign_code\(/foreign_proc\(/g
> > 
> > 	Then turn back any foreign_proc with a string as its second
> > 	argument.
> >         s/foreign_proc(\("[A-Za-z0-9+]*",[ \t\n]*")/foreign_code$1/g
> 
> That looks fine.
> 
> I think it would be a good idea to wait a fair while before committing
> the change to prog_io_pragma.m to remove support for foreign_code/3+
> (longer than for the other changes).

I'd just like to say that I didn't get a chance to commit this change
yet (it got put aside before I went away), but I plan to commit it today
or tomorrow.

I will apply this change to the release and the main branches.

The prog_io_pragma.m change will wait for a while longer.


The upshot of this is that you should use :- pragma foreign_proc to
define procedures in a foreign language from now on in the library.

You can continue to use :- pragma c_code elsewhere, as :- pragma
foreign_* is not yet officially supported (i.e. there may be more
changes to come).

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