[m-dev.] main as an exported predicate

Thomas Charles CONWAY conway at cs.mu.OZ.AU
Wed May 6 14:38:55 AEST 1998


Fergus Henderson, you write:
> On 02-May-1998, Thomas Charles CONWAY <conway at cs.mu.OZ.AU> wrote:
> > 
> > Main/2 is handled rather specially in the runtime at the moment: the
> > runtime contains a hard-coded call to nonprofcall for main. Is there
> > any reason (other than hysterical) that main shouldn't be handled like
> > the library_initializer - and be a predicate automatically exported to
> > C and then called via the usual C-calls-Mercury mechanism?
> 
> There are a few reasons (profiling, benchmarking, low-level debugging)
> but I think they're all historical.
> 

Profiling would be simpler if main was just a "normal" call from C to
Mercury. Zoltan, how about the other cases?

-- 
Thomas Conway <conway at cs.mu.oz.au>
Nail here [] for new monitor.  )O+



More information about the developers mailing list