[m-dev.] for review: direct reuse

Peter Ross peter.ross at miscrit.be
Thu Sep 21 20:22:16 AEDT 2000


On Thu, Sep 21, 2000 at 11:42:01AM +1100, Fergus Henderson wrote:
> On 20-Sep-2000, Peter Ross <Peter.Ross at cs.kuleuven.ac.be> wrote:
> > +++ ml_unify_gen.m	2000/09/20 11:16:50	1.16.2.1
> > @@ -984,8 +979,33 @@
> >  		{ MLDS_Decls = list__append(BoxConstDefns, [ConstDefn]) },
> >  		{ MLDS_Statements = [AssignStatement] }
> >  	;
> > -		{ HowToConstruct = reuse_cell(_) },
> > -		{ sorry("cell reuse") }
> > +		{ HowToConstruct = reuse_cell(CellToReuse) },
> > +		{ CellToReuse = cell_to_reuse(ReuseVar, ConsId, _CorrectVals) },
> > +
> > +		%
> > +		% Currently structure reuse will only reuse a cell that
> > +		% is using the same cons_id, so it is safe to just do an
> > +		% assignment.
> > +		%
> > +		ml_gen_unification(assign(Var, ReuseVar), model_det, Context,
> > +				MLDS_Decls, MLDS_StatementsA),
> 
> That is a somewhat fragile assumption.  I think it would be a very
> good idea to document that the MLDS back-end relies on this assumption
> in the definition of the reuse_cell/1 constructor in hlds_goal.m.
> 
At the moment I am just trying to get it all working.  This restriction
will definately be removed real soon now.

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