[m-dev.] storing GetVars vs Vars Re: source-to-source debugger proposal

Zoltan Somogyi zs at csse.unimelb.edu.au
Tue Oct 2 15:10:19 AEST 2007


On 28-Sep-2007, Peter Moulder <Peter.Moulder at infotech.monash.edu.au> wrote:
> That isn't obvious to me at least (being less familiar with Mercury
> implementation).  I'm assuming that the usual case is that
> VarsA/GetVarsA won't actually be called, so the runtime cost of adding a
> closure to the shadow stack is adding a function pointer, and the closure
> information; is the closure information implemented as a pointer to a
> record of two?three words (typeinfo-for-T, L, and (in the case of
> GetVarsB) E), or is it more expensive than that?  If it is that then the
> GetVars runtime costs are
> 
>   - Allocate the closure record.
>   - Fill it.  (Just two/three word copies, they're already local variables.)

That is your misconception. There is no type-safe way to fill the closure
without doing *everything* that the GetVars approach does, not unless you
get *below* the source level.

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



More information about the developers mailing list