[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Destructive operations
- To: Timothy.Freeman@THEORY.CS.CMU.EDU
- Subject: Destructive operations
- From: "Scott E. Fahlman" <Fahlman@C.CS.CMU.EDU>
- Date: Tue, 06 Jan 1987 23:29:00 -0000
- Cc: common-lisp@SAIL.STANFORD.EDU, gross@SAM.CS.CMU.EDU
- In-reply-to: Msg of 6 Jan 1987  18:55-EST from Timothy.Freeman at theory.cs.cmu.edu
- Sender: FAHLMAN@C.CS.CMU.EDU
In my view, when a constant appears in code, the compiler is free to
store this in read-only space or do other strange things that depend on
the constantness of the constant.  Many useful optimizaitons depend on
this.  I thought that I could find something in the manual that implied
this clearly, but a cursory search failed.  The description of
DEFCONSTANT says that the compiler assume that such constants will stay
put, but I found nothing about other constants, such as '(a b c), that
might appear in the body of the code.  Still, I think that we must allow
the compiler to assume that these things will not be altered
destructively.  You can always store the list in a variable if you want
it to be malleable.
CLtL doesn't say much about what the compiler is required to do or not
do.  A subcommittee of X3J13 has been set up to formulate
recommendations on how to fix this.  This is one of the issues that they
should address.
-- Scott