| 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>Compiler Terminology (ANSI and GNU Common Lisp Document)</title> |
| 7 |
|
| 8 |
<meta name="description" content="Compiler Terminology (ANSI and GNU Common Lisp Document)"> |
| 9 |
<meta name="keywords" content="Compiler Terminology (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.html" rel="up" title="Compilation"> |
| 15 |
<link href="Compilation-Semantics.html" rel="next" title="Compilation Semantics"> |
| 16 |
<link href="Compilation.html" rel="prev" title="Compilation"> |
| 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="Compiler-Terminology"></span><div class="header"> |
| 41 |
<p> |
| 42 |
Next: <a href="Compilation-Semantics.html" accesskey="n" rel="next">Compilation Semantics</a>, Previous: <a href="Compilation.html" accesskey="p" rel="prev">Compilation</a>, Up: <a href="Compilation.html" accesskey="u" rel="up">Compilation</a> </p> |
| 43 |
</div> |
| 44 |
<hr> |
| 45 |
<span id="Compiler-Terminology-1"></span><h4 class="subsection">3.2.1 Compiler Terminology</h4> |
| 46 |
|
| 47 |
<p>The following terminology is used in this section. |
| 48 |
</p> |
| 49 |
<p>The <i>compiler</i> |
| 50 |
<span id="index-compiler"></span> |
| 51 |
is a utility that translates code into an |
| 52 |
<i>implementation-dependent</i> form that might be represented or |
| 53 |
executed efficiently. |
| 54 |
The term <i>compiler</i> |
| 55 |
<span id="index-compiler-1"></span> |
| 56 |
refers to both of the <i>functions</i> |
| 57 |
<b>compile</b> and <b>compile-file</b>. |
| 58 |
</p> |
| 59 |
<p>The term <i>compiled code</i> |
| 60 |
<span id="index-compiled-code"></span> |
| 61 |
refers to |
| 62 |
<i>objects</i> representing compiled programs, such as <i>objects</i> constructed |
| 63 |
by <b>compile</b> or by <b>load</b> when <i>loading</i> a <i>compiled file</i>. |
| 64 |
</p> |
| 65 |
<p>The term <i>implicit compilation</i> |
| 66 |
<span id="index-implicit-compilation"></span> |
| 67 |
refers to <i>compilation</i> |
| 68 |
performed during <i>evaluation</i>. |
| 69 |
</p> |
| 70 |
<p>The term <i>literal object</i> |
| 71 |
<span id="index-literal-object"></span> |
| 72 |
refers to |
| 73 |
a quoted <i>object</i> |
| 74 |
or a <i>self-evaluating object</i> |
| 75 |
or an <i>object</i> that is a substructure of such an <i>object</i>. |
| 76 |
A <i>constant variable</i> is not itself a <i>literal object</i>. |
| 77 |
</p> |
| 78 |
<p>The term <i>coalesce</i> |
| 79 |
<span id="index-coalesce"></span> |
| 80 |
is defined as follows. |
| 81 |
Suppose <tt>A</tt> and <tt>B</tt> are two <i>literal constants</i> in the <i>source code</i>, |
| 82 |
and that <tt>A'</tt> and <tt>B'</tt> are the corresponding <i>objects</i> in the <i>compiled code</i>. |
| 83 |
If <tt>A'</tt> and <tt>B'</tt> are <b>eql</b> but |
| 84 |
<tt>A</tt> and <tt>B</tt> are not <b>eql</b>, then it is said |
| 85 |
that <tt>A</tt> and <tt>B</tt> have been coalesced by the compiler. |
| 86 |
</p> |
| 87 |
<p>The term <i>minimal compilation</i> |
| 88 |
<span id="index-minimal-compilation"></span> |
| 89 |
refers to actions the compiler |
| 90 |
must take at <i>compile time</i>. These actions are specified in |
| 91 |
<a href="Compilation-Semantics.html">Compilation Semantics</a>. |
| 92 |
</p> |
| 93 |
<p>The verb <i>process</i> |
| 94 |
<span id="index-process"></span> |
| 95 |
refers to performing <i>minimal compilation</i>, |
| 96 |
determining the time of evaluation for a <i>form</i>, |
| 97 |
and possibly <i>evaluating</i> that <i>form</i> (if required). |
| 98 |
</p> |
| 99 |
<p>The term <i>further compilation</i> |
| 100 |
<span id="index-further-compilation"></span> |
| 101 |
refers to |
| 102 |
<i>implementation-dependent</i> compilation beyond <i>minimal compilation</i>. |
| 103 |
That is, <i>processing</i> does not imply complete compilation. |
| 104 |
Block compilation and generation of machine-specific instructions are |
| 105 |
examples of further compilation. |
| 106 |
Further compilation is permitted to take place at <i>run time</i>. |
| 107 |
</p> |
| 108 |
<p>Four different <i>environments</i> relevant to compilation are |
| 109 |
distinguished: |
| 110 |
the <i>startup environment</i>, |
| 111 |
the <i>compilation environment</i>, |
| 112 |
the <i>evaluation environment</i>, and |
| 113 |
the <i>run-time environment</i>. |
| 114 |
</p> |
| 115 |
<p>The <i>startup environment</i> |
| 116 |
<span id="index-startup-environment"></span> |
| 117 |
is |
| 118 |
the <i>environment</i> of the <i>Lisp image</i> |
| 119 |
from which the <i>compiler</i> was invoked. |
| 120 |
</p> |
| 121 |
<p>The <i>compilation environment</i> |
| 122 |
<span id="index-compilation-environment"></span> |
| 123 |
is maintained by the compiler |
| 124 |
and is used to hold definitions and declarations to be used internally |
| 125 |
by the compiler. Only those parts of a definition needed for correct |
| 126 |
compilation are saved. The <i>compilation environment</i> is used |
| 127 |
as the <i>environment</i> <i>argument</i> to macro expanders called by |
| 128 |
the compiler. It is unspecified whether a definition available in the |
| 129 |
<i>compilation environment</i> can be used in an <i>evaluation</i> |
| 130 |
initiated in the <i>startup environment</i> or <i>evaluation environment</i>. |
| 131 |
</p> |
| 132 |
<p>The <i>evaluation environment</i> |
| 133 |
<span id="index-evaluation-environment"></span> |
| 134 |
is a <i>run-time environment</i> |
| 135 |
in which macro expanders and code specified by <b>eval-when</b> |
| 136 |
to be evaluated are evaluated. All evaluations initiated by the |
| 137 |
<i>compiler</i> take place in the <i>evaluation environment</i>. |
| 138 |
</p> |
| 139 |
<p>The <i>run-time environment</i> |
| 140 |
<span id="index-run_002dtime-environment"></span> |
| 141 |
is the |
| 142 |
<i>environment</i> in which the program being compiled will be executed. |
| 143 |
</p> |
| 144 |
<p>The <i>compilation environment</i> inherits from |
| 145 |
the <i>evaluation environment</i>, |
| 146 |
and the <i>compilation environment</i> and <i>evaluation environment</i> |
| 147 |
might be <i>identical</i>. |
| 148 |
The <i>evaluation environment</i> inherits from |
| 149 |
the <i>startup environment</i>, |
| 150 |
and the <i>startup environment</i> and <i>evaluation environment</i> |
| 151 |
might be <i>identical</i>. |
| 152 |
</p> |
| 153 |
<p>The term <i>compile time</i> |
| 154 |
<span id="index-compile-time"></span> |
| 155 |
refers to the duration of time that |
| 156 |
the compiler is processing <i>source code</i>. |
| 157 |
At <i>compile time</i>, |
| 158 |
only the <i>compilation environment</i> |
| 159 |
and the <i>evaluation environment</i> |
| 160 |
are available. |
| 161 |
</p> |
| 162 |
<p>The term <i>compile-time definition</i> |
| 163 |
<span id="index-compile_002dtime-definition"></span> |
| 164 |
refers to a definition in |
| 165 |
the <i>compilation environment</i>. |
| 166 |
For example, when compiling a file, |
| 167 |
the definition of a function might be retained in the <i>compilation environment</i> |
| 168 |
if it is declared <b>inline</b>. |
| 169 |
This definition might not be available in the <i>evaluation environment</i>. |
| 170 |
</p> |
| 171 |
<p>The term <i>run time</i> |
| 172 |
<span id="index-run-time"></span> |
| 173 |
refers to the duration of time that the |
| 174 |
loader is loading compiled code or compiled code is being executed. |
| 175 |
At run time, only the <i>run-time environment</i> is available. |
| 176 |
</p> |
| 177 |
<p>The term <i>run-time definition</i> |
| 178 |
<span id="index-run_002dtime-definition"></span> |
| 179 |
refers to a definition in the |
| 180 |
<i>run-time environment</i>. |
| 181 |
</p> |
| 182 |
<p>The term <i>run-time compiler</i> |
| 183 |
<span id="index-run_002dtime-compiler"></span> |
| 184 |
refers to the <i>function</i> <b>compile</b> |
| 185 |
or <i>implicit compilation</i>, for which the compilation and run-time |
| 186 |
<i>environments</i> are maintained in the same <i>Lisp image</i>. |
| 187 |
Note that when the <i>run-time compiler</i> is used, |
| 188 |
the <i>run-time environment</i> |
| 189 |
and <i>startup environment</i> |
| 190 |
are the same. |
| 191 |
</p> |
| 192 |
<hr> |
| 193 |
<div class="header"> |
| 194 |
<p> |
| 195 |
Next: <a href="Compilation-Semantics.html" accesskey="n" rel="next">Compilation Semantics</a>, Previous: <a href="Compilation.html" accesskey="p" rel="prev">Compilation</a>, Up: <a href="Compilation.html" accesskey="u" rel="up">Compilation</a> </p> |
| 196 |
</div> |
| 197 |
|
| 198 |
|
| 199 |
|
| 200 |
</body> |
| 201 |
</html> |