Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[7de359]: ansi_environment.xml Maximize Restore History

Download this file

ansi_environment.xml    172 lines (156 with data), 7.3 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE book [
<!ENTITY % eclent SYSTEM "ecl.ent">
%eclent;
]>
<book xmlns="http://docbook.org/ns/docbook" version="5.0" xml:lang="en">
<chapter xml:id="ansi.environment">
<title>Environment</title>
<section xml:id="ansi.environment.dict">
<title>Dictionary</title>
<refentry xml:id="ansi.environment.disassemble">
<refnamediv>
<refname><function>disassemble</function></refname>
<refpurpose>Display the assembly code of a function</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcprototype>
<funcdef>disassemble</funcdef>
<paramdef><parameter>function-designator</parameter>*</paramdef>
</funcprototype>
</funcsynopsis>
<variablelist>
<varlistentry>
<term><replaceable>function-designator</replaceable></term>
<listitem><para>A symbol which is bound to a function in the global environment, or a lambda form
</para></listitem>
</varlistentry>
</variablelist>
</refsynopsisdiv>
<refsect1>
<title>Function</title>
<para>As specified in &ANSI; this function outputs the internal represention of a compiled function, or of a lambda form, as it would look after being compiled.</para>
<para>&ECL; only has a particular difference: it has two different compilers, one based on bytecodes and one based on the C language. The output will thus depend on the arguments and on which compiler is active at the moment in which this function is run.</para>
<itemizedlist>
<listitem><para>If the argument is a bytecompiled function, the output will be bytecodes.</para></listitem>
<listitem><para>If the argument is a lambda form, it will be processed by the active compiler and the appropriate output (bytecodes or C) will be shown.</para></listitem>
<listitem><para>If the argument is a C-compiled form, &ECL; will retrieve its original lambda form and process it with the currently active compiler.</para></listitem>
</itemizedlist>
</refsect1>
</refentry>
<refentry xml:id="ansi.environment.trace">
<refnamediv>
<refname><function>trace</function></refname>
<refpurpose>Follow execution of functions</refpurpose>
</refnamediv>
<refsynopsisdiv>
<funcsynopsis>
<funcprototype>
<funcdef>trace</funcdef>
<paramdef><parameter>function-name</parameter>*</paramdef>
</funcprototype>
</funcsynopsis>
<variablelist>
<varlistentry>
<term><replaceable>function-name</replaceable></term>
<listitem><para>
<synopsis>{<replaceable>symbol</replaceable> | (<replaceable>symbol</replaceable> [<replaceable>option</replaceable> <replaceable>form</replaceable>]*)}</synopsis>
</para></listitem>
</varlistentry>
<varlistentry>
<term><replaceable>symbol</replaceable></term>
<listitem><para>A symbol which is bound to a function in the global
environment. Not evaluated.</para></listitem>
</varlistentry>
<varlistentry>
<term><replaceable>option</replaceable></term>
<listitem><para>One of <symbol>:BREAK</symbol>,
<symbol>:BREAK-AFTER</symbol>, <symbol>:COND-BEFORE</symbol>,
<symbol>:COND-AFTER</symbol>, <symbol>:COND</symbol>,
<symbol>:PRINT</symbol>, <symbol>:PRINT-AFTER</symbol>,
<symbol>:STEP</symbol></para></listitem>
</varlistentry>
<varlistentry>
<term><replaceable>form</replaceable></term>
<listitem><para>A lisp form evaluated in an special
environment.</para></listitem>
</varlistentry>
<varlistentry>
<term>returns</term>
<listitem><para>List of symbols with traced functions.</para></listitem>
</varlistentry>
</variablelist>
</refsynopsisdiv>
<refsect1>
<title>Macro</title>
<para>Causes one or more functions to be traced. Each
<replaceable>function-name</replaceable> can be a symbol which is bound to
a function, or a list containing that symbol plus additional options. If
the function bound to that symbol is called, information about the
argumetns and output of this function will be printed. Trace options will
modify the amount of information and when it is printed.</para>
<para>Not that if the function is called from another function compiled in
the same file, tracing might not be enabled. If this is the case, to
enable tracing, recompile the caller with a <literal>notinline</literal>
declaration for the called function.</para>
<para><function>trace</function> returns a name list of those functions
that were traced by the call to trace. If no
<replaceable>function-name</replaceable> is given, <literal>trace</literal>
simply returns a name list of all the currently traced functions.</para>
<para>Trace options cause the normal printout to be suppressed, or cause
extra information to be printed. Each option is a pair of an option keyword
and a value form. If an already traced function is traced again, any new
options replace the old options and a warning might be printed. The lisp
<replaceable>form</replaceable> accompanying the option is evaluated in an
environment where <replaceable>sys::arglist</replaceable> is contains the
list of arguments to the function.</para>
<para>The following options are defined:</para>
<variablelist>
<varlistentry>
<term><symbol>:cond</symbol></term>
<term><symbol>:cond-before</symbol></term>
<term><symbol>:cond-after</symbol></term>
<listitem>
<para>If <symbol>:cond-before</symbol> is specified, then
<function>trace</function> does nothing unless
<replaceable>form</replaceable> evaluates to true at the time of the
call. <symbol>:cond-after</symbol> is similar, but suppresses the
initial printout, and is tested when the function returns.
<symbol>:cond</symbol> tries both before and after.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><symbol>:step</symbol></term>
<listitem>
<para>If <replaceable>form</replaceable> evaluates to true, the stepper
is entered.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><symbol>:break</symbol></term>
<term><symbol>:break-after</symbol></term>
<listitem>
<para>If specified, and <replaceable>form</replaceable> evaluates to
true, then the debugger is invoked at the start of the function or at
the end of the function according to the respective option.</para>
</listitem>
</varlistentry>
<varlistentry>
<term><symbol>:print</symbol></term>
<term><symbol>:print-after</symbol></term>
<listitem>
<para>In addition to the usual printout, the result of evaluating
<replaceable>form</replaceable> is printed at the start of the function
or at the end of the function, depending on the option. Multiple print
options cause multiple values to be output, in the order in which they
were introduced.</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
</refentry>
</section>
<xi:include href="ref_c_environment.xml" xpointer="ansi.environment.c-dict" xmlns:xi="http://www.w3.org/2001/XInclude"/>
</chapter>
</book>