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]

dangerous apply



I've been thinking about dangerous apply some more.

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.

That is almost as efficient as the "perfect" copy-on-write involving
an extra tag bit on the environment spine.  Instead of only copying
argument frames exactly once, you'll copy every modified frame
exactly as many times as set! of one of those variables is live within
the cope of the frame.  If it is really true that we don't use set!
very often (and it seems to be) this should be quite acceptable.

Best of all, this change can be implemented with no new C code.

-t