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

92 lines
5.3 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 OPTIMIZE-DEBUG-INFO 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/iss250_w.htm">
<LINK REL=UP HREF="../Issues/iss251.htm">
<LINK REL=NEXT HREF="../Issues/iss252_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/iss250_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Previous]" SRC="../Graphics/Prev.gif" ALIGN=Bottom></A><A REL=UP HREF="../Issues/iss251.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Up]" SRC="../Graphics/Up.gif" ALIGN=Bottom></A><A REL=NEXT HREF="../Issues/iss252_w.htm"><IMG WIDTH=40 HEIGHT=40 ALT="[Next]" SRC="../Graphics/Next.gif" ALIGN=Bottom></A></H1>
<HR>
<H2>Issue OPTIMIZE-DEBUG-INFO Writeup</H2>
<PRE><B>Issue:</B> <A HREF="iss251.htm">OPTIMIZE-DEBUG-INFO</A><P>
<B>References:</B> CLtL p. 160<P>
<B>Category:</B> ADDITION<P>
<B>Edit History:</B> V1 9 Sep 1988, David Gray (initial version)<P>
V2 19 Sep 1988, David Gray (delete first alternative)<P>
<P>
<B>Problem Description:<P>
</B><P>
The <A REL=DEFINITION HREF="../Body/d_optimi.htm#optimize"><B>OPTIMIZE</B></A> declaration provides a way to tell the compiler how important<P>
various qualities are in order to guide which optimizations are done.<P>
There is another quality, however, that is not mentioned, but is an<P>
important consideration for the compiler: how much information<P>
should be included in the object code to facilitate debugging. This<P>
includes both annotation added to enable a debugger to display more<P>
information to the user, and also suppression of optimizations that would<P>
confuse debugging by making it harder to connect the object code with the<P>
source code.<P>
<P>
<B>Proposal OPTIMIZE-DEBUG-INFO:NEW-QUALITY:<P>
</B><P>
In the description of the <A REL=DEFINITION HREF="../Body/d_optimi.htm#optimize"><B>OPTIMIZE</B></A> declaration, add an additional quality<P>
named <A REL=DEFINITION HREF="../Body/d_optimi.htm#debug"><B>DEBUG</B></A>, described as &quot;ease of debugging&quot;.<P>
<P>
Rationale:<P>
<P>
Since ease of debugging is an issue that the user will be concerned with,<P>
and is an issue that the compiler needs to consider, this provides a clear<P>
way for the user to control the amount of debugging information placed in<P>
the object module, with DEBUG=0 meaning none and DEBUG=3 meaning &quot;as much<P>
as possible&quot;.<P>
<P>
Current Practice:<P>
<P>
No current implementation of this is known.<P>
<P>
Cost to implementors:<P>
<P>
All would have to update their handling of <A REL=DEFINITION HREF="../Body/d_optimi.htm#optimize"><B>OPTIMIZE</B></A> declarations to accept<P>
the new quality.<P>
<P>
Cost to users:<P>
<P>
One more little feature to learn. Some problems may result from the<P>
addition of the symbol <A REL=DEFINITION HREF="../Body/d_optimi.htm#debug"><B>DEBUG</B></A> to the LISP package.<P>
<P>
Benefits:<P>
<P>
Provides users a <A REL=DEFINITION HREF="../Body/07_ffb.htm#standard"><B>standard</B></A> way to control the interaction between<P>
the compiler and debugger, and saves implementors from having to invent<P>
implementation-dependent solutions.<P>
<P>
Costs of Non-Adoption: <P>
<P>
Continued confusion about how debug information should be controlled.<P>
<P>
<B>Discussion:<P>
</B><P>
Concern has been raised that there is already a problem with the<P>
non-orthogonality of <A REL=DEFINITION HREF="../Body/d_optimi.htm#speed"><B>SPEED</B></A>, <A REL=DEFINITION HREF="../Body/d_optimi.htm#safety"><B>SAFETY</B></A>, and <A REL=DEFINITION HREF="../Body/d_optimi.htm#space"><B>SPACE</B></A> that would be made even<P>
worse with <A REL=DEFINITION HREF="../Body/d_optimi.htm#debug"><B>DEBUG</B></A> added, since users tend to be perplexed by the<P>
interactions of these qualities. <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>