This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: dangerous apply


Mikael Djurfeldt <mdj@nada.kth.se> writes:

> Tom Lord <lord@emf.net> writes:
> 
> > It seems to me that if you _always_ copy the targeted environment
> > frame when expanding a "set!" of a local variable, the problem
> > is entirely eliminated.
> 
> I'm afraid that this doesn't work.
> 
> If we're going to copy, we must copy the first time the environment is
> referenced during memoization.  Otherwise we'll have ilocs lingering
> which refer to a "dead" environment.

I'm dead wrong here--sorry.

The ilocs don't have the same properties as glocs: they don't point to
particular cells.  This means that your approach will work.

I think it is a great idea.

I will put it in the evaluator as soon as I have time.

/mdj