[m-dev.] [reuse] fixes of some naughty bugs

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Mar 10 01:50:53 AEDT 2001


On 09-Mar-2001, Nancy Mazur <Nancy.Mazur at cs.kuleuven.ac.be> wrote:
> > By a "builtin" procedure I mean one for which the compiler generates inline
> > code automatically, without any explicit definition of that procedure in the
> > standard library source code.  
> 
> Even then, isn't that translated in terms of the hlds_goal: 
> pragma_foreign_code? 

No.  Builtins are just `call' hlds_goals.  Then during code generation they get
translated into the appropriate MLDS or LLDS e.g. `binop' expressions.

> > In the HLDS a call to a builtin procedure is marked with the `builtin_state'
> > field of the call being `inline_builtin'.
> 
> You mean like an ordinary call? But than with that extra annotation? 

Right.

> > > But if this is the case, as all pragma_foreign_code is always
> > > assumed impure,
> > 
> > That's not the case currently (at least on the main branch).
> > Currently pragma_foreign_code is assumed pure.
> 
> No, not within my analysis: they are implicitly assumed as dangerous 
> code, and treated as `can potentially do anything'-code. 

OK, good.

I was talking about what is assumed by purity analysis (compiler/purity.m) and
the other phases which look at the goal_info_purity field that purity analysis
produces.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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