1
0
Fork 0
cl-sites/HyperSpec-7-0/HyperSpec/Issues/iss067_w.htm
2024-04-01 10:24:07 +02:00

136 lines
8.5 KiB
HTML

<!-- Common Lisp HyperSpec (TM), version 7.0 generated by Kent M. Pitman on Mon, 11-Apr-2005 2:31am EDT -->
<HTML>
<HEAD>
<TITLE>CLHS: Issue COMPILER-VERBOSITY Writeup</TITLE>
<LINK HREF="../Data/clhs.css" REL="stylesheet" TYPE="text/css" />
<META HTTP-EQUIV="Author" CONTENT="Kent M. Pitman">
<META HTTP-EQUIV="Organization" CONTENT="LispWorks Ltd.">
<LINK REL=TOP HREF="../Front/index.htm">
<LINK REL=COPYRIGHT HREF="../Front/Help.htm#Legal">
<LINK REL=DISCLAIMER HREF="../Front/Help.htm#Disclaimer">
<LINK REL=PREV HREF="../Issues/iss066_w.htm">
<LINK REL=UP HREF="../Issues/iss067.htm">
<LINK REL=NEXT HREF="../Issues/iss068_w.htm">
</HEAD>
<BODY>
<H1><A REV=MADE HREF="http://www.lispworks.com/"><IMG WIDTH=80 HEIGHT=65 ALT="[LISPWORKS]" SRC="../Graphics/LWSmall.gif" ALIGN=Bottom></A><A REL=TOP HREF="../Front/index.htm"><IMG WIDTH=237 HEIGHT=65 ALT="[Common Lisp HyperSpec (TM)]" SRC="../Graphics/CLHS_Sm.gif" ALIGN=Bottom></A> <A REL=PREV HREF="../Issues/iss066_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="../Issues/iss067.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="../Issues/iss068_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
<HR>
<H2>Issue COMPILER-VERBOSITY Writeup</H2>
<PRE><B>Forum:</B> Compiler<P>
<B>Issue:</B> <A HREF="iss067.htm">COMPILER-VERBOSITY</A><P>
<B>References:</B> CLtL p. 438-329; 426<P>
issue <A HREF="iss065.htm">COMPILER-DIAGNOSTICS</A><P>
<B>Category:</B> ENHANCEMENT<P>
<B>Edit History:</B> V1, 25 Oct 1988, Sandra Loosemore<P>
V2, 12 Dec 1988, Dan L. Pierson (add USE-CONDITIONS)<P>
V3, 15 Dec 1988, Dan L. Pierson (expand on conditions)<P>
V4, 21 Dec 1988, Dan L. Pierson (reword and clarify)<P>
V5, 06 Jan 1989, Sandra Loosemore (update discussion)<P>
V6, 26 Jan 1989, Sandra Loosemore (remove USE-CONDITIONS)<P>
<B>Status:</B> Ready for release<P>
<P>
<P>
<B>Problem Description:<P>
</B><P>
Implementations vary widely in the amount of information that is printed<P>
out by <A REL=DEFINITION HREF="../Body/f_cmp_fi.htm#compile-file"><B>COMPILE-FILE</B></A>. In some situations, it would be useful to control<P>
how much information is printed.<P>
<P>
<P>
<B>Proposal COMPILER-VERBOSITY:LIKE-LOAD:<P>
</B><P>
Introduce special variables, <A REL=DEFINITION HREF="../Body/v_cmp_pr.htm#STcompile-verboseST"><B>*COMPILE-VERBOSE*</B></A> and <A REL=DEFINITION HREF="../Body/v_cmp_pr.htm#STcompile-printST"><B>*COMPILE-PRINT*</B></A>,<P>
with implementation-dependent initial values.<P>
<P>
Add :VERBOSE and :PRINT keyword arguments to the function<P>
<A REL=DEFINITION HREF="../Body/f_cmp_fi.htm#compile-file"><B>COMPILE-FILE</B></A>, analogous to those for the function <A REL=DEFINITION HREF="../Body/f_load.htm#load"><B>LOAD</B></A>.<P>
<P>
The :VERBOSE argument (which defaults to the value of<P>
<A REL=DEFINITION HREF="../Body/v_cmp_pr.htm#STcompile-verboseST"><B>*COMPILE-VERBOSE*</B></A>), if true, permits <A REL=DEFINITION HREF="../Body/f_cmp_fi.htm#compile-file"><B>COMPILE-FILE</B></A> to print a message<P>
in the form of a comment to <A REL=DEFINITION HREF="../Body/v_debug_.htm#STstandard-outputST"><B>*STANDARD-OUTPUT*</B></A> indicating what file is<P>
being compiled and other useful information.<P>
<P>
The :PRINT argument (which defaults to the value of <A REL=DEFINITION HREF="../Body/v_cmp_pr.htm#STcompile-printST"><B>*COMPILE-PRINT*</B></A>),<P>
if true, causes information about top-level forms in the file being<P>
compiled to be printed to <A REL=DEFINITION HREF="../Body/v_debug_.htm#STstandard-outputST"><B>*STANDARD-OUTPUT*</B></A>. Exactly what is printed<P>
will vary from implementation to implementation, but nevertheless some<P>
information will be printed.<P>
<P>
Introduce a special variable <A REL=DEFINITION HREF="../Body/v_ld_prs.htm#STload-printST"><B>*LOAD-PRINT*</B></A>, which has an initial value of<P>
<A REL=DEFINITION HREF="../Body/a_nil.htm#nil"><B>NIL</B></A>. State that the default value of the :PRINT argument to <A REL=DEFINITION HREF="../Body/f_load.htm#load"><B>LOAD</B></A> is<P>
<A REL=DEFINITION HREF="../Body/v_ld_prs.htm#STload-printST"><B>*LOAD-PRINT*</B></A> (rather than <A REL=DEFINITION HREF="../Body/a_nil.htm#nil"><B>NIL</B></A>).<P>
<P>
<P>
<B>Rationale:<P>
</B><P>
This proposal makes <A REL=DEFINITION HREF="../Body/f_cmp_fi.htm#compile-file"><B>COMPILE-FILE</B></A> behave like <A REL=DEFINITION HREF="../Body/f_load.htm#load"><B>LOAD</B></A>. There is already<P>
some precedent for doing this (for example, issue <A HREF="iss061.htm">COMPILE-FILE-PACKAGE</A>,<P>
which makes <A REL=DEFINITION HREF="../Body/f_cmp_fi.htm#compile-file"><B>COMPILE-FILE</B></A> as well as <A REL=DEFINITION HREF="../Body/f_load.htm#load"><B>LOAD</B></A> rebind <A REL=DEFINITION HREF="../Body/v_pkg.htm#STpackageST"><B>*PACKAGE*</B></A>).<P>
<P>
Adding the <A REL=DEFINITION HREF="../Body/v_ld_prs.htm#STload-printST"><B>*LOAD-PRINT*</B></A> variable allows the printing of messages by<P>
<A REL=DEFINITION HREF="../Body/f_load.htm#load"><B>LOAD</B></A> to be controlled either on a global or a per-call basis.<P>
<P>
<P>
<B>Current Practice:<P>
</B><P>
<A REL=DEFINITION HREF="../Body/f_cmp_fi.htm#compile-file"><B>COMPILE-FILE</B></A> prints out progress messages in nearly all<P>
implementations.<P>
<P>
Lucid provides a :MESSAGES keyword argument to <A REL=DEFINITION HREF="../Body/f_cmp_fi.htm#compile-file"><B>COMPILE-FILE</B></A>, which can<P>
either be a stream to send messages to, or <A REL=DEFINITION HREF="../Body/a_nil.htm#nil"><B>NIL</B></A> to suppress messages.<P>
The default value is T, which sends messages to &quot;the <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A> terminal<P>
device&quot;.<P>
<P>
On the TI Explorer, <A REL=DEFINITION HREF="../Body/f_cmp_fi.htm#compile-file"><B>COMPILE-FILE</B></A> displays the name of the function<P>
being compiled when the option :VERBOSE T is given or special variable<P>
COMPILER:COMPILER-VERBOSE is true. (In other words, they use :VERBOSE<P>
to mean what this proposal says to use :PRINT for.)<P>
<P>
Symbolics Cloe already has a <A REL=DEFINITION HREF="../Body/v_ld_prs.htm#STload-printST"><B>*LOAD-PRINT*</B></A> variable.<P>
<P>
<P>
<B>Cost to implementors:<P>
</B><P>
This is an incompatible change for some implementations. While the<P>
changes required should be conceptually simple, their implementation<P>
may involve a significant amount of grunt work. At least two<P>
implementations already <A REL=DEFINITION HREF="../Body/f_provid.htm#provide"><B>provide</B></A> some similar mechanism for suppressing<P>
messages.<P>
<P>
<P>
<B>Cost to users:<P>
</B><P>
Some (non-portable) user code may break in implementations where this<P>
is an incompatible change.<P>
<P>
No user code should be broken by the addition of the <A REL=DEFINITION HREF="../Body/v_ld_prs.htm#STload-printST"><B>*LOAD-PRINT*</B></A><P>
variable, since the default behavior for the :PRINT keyword to <A REL=DEFINITION HREF="../Body/f_load.htm#load"><B>LOAD</B></A> <P>
is unchanged.<P>
<P>
<P>
<B>Benefits:<P>
</B><P>
Users are given a portable way to control how much information is printed<P>
by <A REL=DEFINITION HREF="../Body/f_cmp_fi.htm#compile-file"><B>COMPILE-FILE</B></A>.<P>
<P>
<P>
<B>Discussion:<P>
</B><P>
This issue addresses an extension to the language. If this proposal<P>
is not accepted, the <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A> will simply continue not to say anything<P>
about whether <A REL=DEFINITION HREF="../Body/f_cmp_fi.htm#compile-file"><B>COMPILE-FILE</B></A> can print progress messages, or what stream<P>
such messages are directed to.<P>
<P>
</PRE>
<HR>
<A REL=NAVIGATOR HREF="../Front/StartPts.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Starting Points]" SRC="../Graphics/StartPts.gif" ALIGN=Bottom></A><A REL=TOC HREF="../Front/Contents.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Contents]" SRC="../Graphics/Contents.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Master.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Index]" SRC="../Graphics/Index.gif" ALIGN=Bottom></A><A REL=INDEX HREF="../Front/X_Symbol.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Symbols]" SRC="../Graphics/Symbols.gif" ALIGN=Bottom></A><A REL=GLOSSARY HREF="../Body/26_a.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Glossary]" SRC="../Graphics/Glossary.gif" ALIGN=Bottom></A><A HREF="../Front/X3J13Iss.htm"><IMG WIDTH=80 HEIGHT=40 ALT="[Issues]" SRC="../Graphics/Issues.gif" ALIGN=Bottom></A><BR>
<A REL=COPYRIGHT HREF="../Front/Help.htm#Legal"><I>Copyright 1996-2005, LispWorks Ltd. All rights reserved.</I></A><P>
</BODY>
</HTML>