I want to write a function that, as part of what it does, compiles
a file with high optimization settings. Eg
(defun Compile-File-Fast (File)
(proclaim '(optimize (speed 3) (safety 1) (compilation-speed 0)))
(compile-file File)
;; ????
)
However, I want to leave the optimization settings at whatever state
they were before. Unfortunately, I cannot figure out how to either:
(A) Portably find the current optimization settings in order to record
them before changing, so I can change back after the compilation, or
(B) Find a command that makes the settings locally but works for
compiling the file. As far as I can tell, neither DECLARE nor
DECLAIM will do this.
Am I missing something obvious, am I trying to do something that I
shouldn't, or what? Thanks-
- Marty
(proclaim '(inline skates))
---
In article <·········@aplcenmp.apl.jhu.edu>, ····@aplcenmp.apl.jhu.edu
(Marty Hall) wrote:
> However, I want to leave the optimization settings at whatever state
> they were before. Unfortunately, I cannot figure out how to either:
>
> (A) Portably find the current optimization settings in order to record
> them before changing, so I can change back after the compilation, or
Use the function DECLARATION-INFORMATION (CLtL2, page 210).
Rainer Joswig
······@informatik.uni-hamburg.de
In article <···················@kimac1.informatik.uni-hamburg.de> ······@informatik.uni-hamburg.de (Rainer Joswig) writes:
Newsgroups: comp.lang.lisp
Path: bingen.hrp.no!dhhalden.no!nuug!news.eunet.no!trane.uninett.no!sunic!uunet!haven.umd.edu!darwin.sura.net!news.dfn.de!rzsun2.informatik.uni-hamburg.de!kimac1.informatik.uni-hamburg.de!user
From: ······@informatik.uni-hamburg.de (Rainer Joswig)
Followup-To: comp.lang.lisp
Sender: ····@informatik.uni-hamburg.de (Mr. News)
Organization: University of Hamburg, Germany
References: <·········@aplcenmp.apl.jhu.edu>
Date: Fri, 18 Jun 1993 07:53:29 GMT
Lines: 12
In article <·········@aplcenmp.apl.jhu.edu>, ····@aplcenmp.apl.jhu.edu
(Marty Hall) wrote:
> However, I want to leave the optimization settings at whatever state
> they were before. Unfortunately, I cannot figure out how to either:
>
> (A) Portably find the current optimization settings in order to record
> them before changing, so I can change back after the compilation, or
Use the function DECLARATION-INFORMATION (CLtL2, page 210).
According to my Allegro CL User Guide, vol 2, page A-42, item #328,
X3J13 later decided that the environment-enquiry functions,
VARIABLE-INFORMATION, FUNCTION-INFORMATION, DECLARATION-INFORMATION,
AGMENT-ENVIRONMENT, DEFINE-DECLARATION, PARSE-MACRO, and ENCLOSE, should
be removed from the standards proposal due to "serious consitency
problems".
--
Eyvind Ness, Research Scientist, OECD Halden Reactor Project, Norway.
~/.signature: No such file or directory ;-)
······@hrp.no (Eyvind Ness) writes:
According to my Allegro CL User Guide, vol 2, page A-42, item #328,
X3J13 later decided that the environment-enquiry functions,
VARIABLE-INFORMATION, FUNCTION-INFORMATION, DECLARATION-INFORMATION,
AGMENT-ENVIRONMENT, DEFINE-DECLARATION, PARSE-MACRO, and ENCLOSE, should
be removed from the standards proposal due to "serious consitency
problems".
Well, that's not quite what happened. We found that, after adding the
ability to define declarations with arbitrary syntax with
DEFINE-DECLARATION, we also needed an additional function
PARSE-DECLARATIONS, so that you could sort out which declarations in a
LET* belonged to which bindings, for example. Rather than add this
function, the committee decided to remove the entire environment
access facility. It appears that many of the committee members were
put off by the complexity of the issues involved and just didn't want
to have to deal with it.
Personally, I'm of the opinion that the committee threw out the baby
with the bath water. The environment inquiry functions are certainly
useful by themselves even if you don't have the facilities for defining
your own declarations, or for writing portable code walkers.
-Sandra
In article <·········@aplcenmp.apl.jhu.edu> you write:
>(A) Portably find the current optimization settings in order to record
> them before changing, so I can change back after the compilation, or
>(B) Find a command that makes the settings locally but works for
> compiling the file. As far as I can tell, neither DECLARE nor
> DECLAIM will do this.
These can't be done portably.
--
Barry Margolin
System Manager, Thinking Machines Corp.
······@think.com {uunet,harvard}!think!barmar