<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>4.5. Inspecting generated C code</title><link rel="stylesheet" type="text/css" href="ecl.css"><meta name="generator" content="DocBook XSL Stylesheets V1.76.1"><link rel="home" href="index.html" title="The ECL manual"><link rel="up" href="ch27.html" title="Chapter 4. The compiler"><link rel="prev" href="ch27s04.html" title="4.4. Use of Declarations to Improve Efficiency"><link rel="next" href="ch28.html" title="Chapter 5. Porting ECL"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">4.5. Inspecting generated C code</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="ch27s04.html">Prev</a> </td><th width="60%" align="center">Chapter 4. The compiler</th><td width="20%" align="right"> <a accesskey="n" href="ch28.html">Next</a></td></tr></table><hr></div><div class="section" title="4.5. Inspecting generated C code"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a name="Internals-Inspecting-generated-C-code"></a>4.5. Inspecting generated C code</h2></div></div></div><p>Common-Lisp defines a function disassemble, which is supposed to disassemble a compiled function and to display the assembler code. According to <span class="emphasis"><em>Common-Lisp: The Language</em></span>,</p><p><span class="emphasis"><em>This is primary useful for debugging the compiler</em></span>, ..\\</p><p>This is, however, <span class="emphasis"><em>useless</em></span> in our case, because we are not concerned with assembly language. Rather, we are interested in the C code generated by the <span class="application">ECL</span> compiler. Thus the disassemble function in <span class="application">ECL</span> accepts not-yet-compiled functions only and displays the translated C code.</p><pre class="screen"> > (defun add1 (x) (1+ x)) ADD1 > (disassemble *) ;;; Compiling (DEFUN ADD1 ...). ;;; Emitting code for ADD1. /* function definition for ADD1 */ static L1(int narg, object V1) { VT3 VLEX3 CLSR3 TTL: VALUES(0) = one_plus((V1)); RETURN(1); } </pre></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="ch27s04.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="ch27.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="ch28.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">4.4. Use of Declarations to Improve Efficiency </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 5. Porting <span class="application">ECL</span></td></tr></table></div></body></html>