[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue CONSTANT-MODIFICATION, version 2
- To: Jeff Dalton <jeff%aiai.edinburgh.ac.uk@NSS.Cs.Ucl.AC.UK>
- Subject: Re: Issue CONSTANT-MODIFICATION, version 2
- From: sandra%defun@cs.utah.edu (Sandra J Loosemore)
- Date: Mon, 9 Jan 89 19:27:56 MST
- Cc: cl-compiler@sail.stanford.edu
- In-reply-to: Jeff Dalton <jeff%aiai.edinburgh.ac.uk@NSS.Cs.Ucl.AC.UK>, Tue, 10 Jan 89 00:39:18 GMT
Re why constants in compiled code can't be modified:
Since "collapsing" of equivalent constants is allowed, destructively
modifying compiled constants can cause unintended side-effects to
other constants which just happen to look the same.
Many implementations already put constants in read-only storage. This
is actually write-protected in some implementations, and in others
it is simply not scanned by the garbage collector. Sometimes this is
done by the loader, and sometimes it's done during an image save or
other explicit compaction.
-Sandra
-------