| 1 |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| 2 |
<html> |
| 3 |
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ --> |
| 4 |
<head> |
| 5 |
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 6 |
<title>Minimal Compilation (ANSI and GNU Common Lisp Document)</title> |
| 7 |
|
| 8 |
<meta name="description" content="Minimal Compilation (ANSI and GNU Common Lisp Document)"> |
| 9 |
<meta name="keywords" content="Minimal Compilation (ANSI and GNU Common Lisp Document)"> |
| 10 |
<meta name="resource-type" content="document"> |
| 11 |
<meta name="distribution" content="global"> |
| 12 |
<meta name="Generator" content="makeinfo"> |
| 13 |
<link href="index.html" rel="start" title="Top"> |
| 14 |
<link href="Compilation-Semantics.html" rel="up" title="Compilation Semantics"> |
| 15 |
<link href="Semantic-Constraints.html" rel="next" title="Semantic Constraints"> |
| 16 |
<link href="Notes-about-the-Implementation-of-Compiler-Macros.html" rel="prev" title="Notes about the Implementation of Compiler Macros"> |
| 17 |
<style type="text/css"> |
| 18 |
<!-- |
| 19 |
a.summary-letter {text-decoration: none} |
| 20 |
blockquote.indentedblock {margin-right: 0em} |
| 21 |
div.display {margin-left: 3.2em} |
| 22 |
div.example {margin-left: 3.2em} |
| 23 |
div.lisp {margin-left: 3.2em} |
| 24 |
kbd {font-style: oblique} |
| 25 |
pre.display {font-family: inherit} |
| 26 |
pre.format {font-family: inherit} |
| 27 |
pre.menu-comment {font-family: serif} |
| 28 |
pre.menu-preformatted {font-family: serif} |
| 29 |
span.nolinebreak {white-space: nowrap} |
| 30 |
span.roman {font-family: initial; font-weight: normal} |
| 31 |
span.sansserif {font-family: sans-serif; font-weight: normal} |
| 32 |
ul.no-bullet {list-style: none} |
| 33 |
--> |
| 34 |
</style> |
| 35 |
|
| 36 |
|
| 37 |
</head> |
| 38 |
|
| 39 |
<body lang="en"> |
| 40 |
<span id="Minimal-Compilation"></span><div class="header"> |
| 41 |
<p> |
| 42 |
Next: <a href="Semantic-Constraints.html" accesskey="n" rel="next">Semantic Constraints</a>, Previous: <a href="Notes-about-the-Implementation-of-Compiler-Macros.html" accesskey="p" rel="prev">Notes about the Implementation of Compiler Macros</a>, Up: <a href="Compilation-Semantics.html" accesskey="u" rel="up">Compilation Semantics</a> </p> |
| 43 |
</div> |
| 44 |
<hr> |
| 45 |
<span id="Minimal-Compilation-1"></span><h4 class="subsubsection">3.2.2.6 Minimal Compilation</h4> |
| 46 |
|
| 47 |
<p><i>Minimal compilation</i> is defined as follows: |
| 48 |
</p> |
| 49 |
<dl compact="compact"> |
| 50 |
<dt><tt>*</tt></dt> |
| 51 |
<dd><p>All <i>compiler macro</i> |
| 52 |
<span id="index-compiler-macro"></span> |
| 53 |
calls appearing in the |
| 54 |
<i>source code</i> being compiled are expanded, if at all, at compile time; |
| 55 |
they will not be expanded at run time. |
| 56 |
</p> |
| 57 |
</dd> |
| 58 |
<dt><tt>*</tt></dt> |
| 59 |
<dd><p>All <i>macro</i> |
| 60 |
<span id="index-macro"></span> |
| 61 |
and |
| 62 |
<i>symbol macro</i> |
| 63 |
<span id="index-symbol-macro"></span> |
| 64 |
calls |
| 65 |
appearing in the source code being compiled are expanded at compile time |
| 66 |
in such a way that they will not be expanded again at run time. |
| 67 |
<b>macrolet</b> |
| 68 |
<span id="index-macrolet"></span> |
| 69 |
</p> |
| 70 |
<p>and |
| 71 |
<b>symbol-macrolet</b> |
| 72 |
<span id="index-symbol_002dmacrolet"></span> |
| 73 |
</p> |
| 74 |
<p>are effectively replaced by |
| 75 |
<i>forms</i> corresponding to their bodies in which calls to |
| 76 |
<i>macros</i> are replaced by their expansions. |
| 77 |
</p> |
| 78 |
</dd> |
| 79 |
<dt><tt>*</tt></dt> |
| 80 |
<dd><p>The first <i>argument</i> in a <b>load-time-value</b> |
| 81 |
<span id="index-load_002dtime_002dvalue"></span> |
| 82 |
</p> |
| 83 |
<p><i>form</i> |
| 84 |
in <i>source code</i> processed by <b>compile</b> |
| 85 |
<span id="index-compile-1"></span> |
| 86 |
</p> |
| 87 |
<p>is <i>evaluated</i> at <i>compile time</i>; |
| 88 |
in <i>source code</i> processed by <b>compile-file</b> |
| 89 |
<span id="index-compile_002dfile"></span> |
| 90 |
, |
| 91 |
the compiler arranges for it to be <i>evaluated</i> at <i>load time</i>. |
| 92 |
In either case, the result of the <i>evaluation</i> |
| 93 |
is remembered and used later as the value of the |
| 94 |
<b>load-time-value</b> <i>form</i> at <i>execution time</i>. |
| 95 |
</p> |
| 96 |
</dd> |
| 97 |
</dl> |
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
</body> |
| 103 |
</html> |