LispWorks User Guide and Reference Manual > 27 The COMMON-LISP Package

NextPrevUpTopContentsIndex

disassemble

Function
Summary

Prints the machine code of a compiled function.

Package

common-lisp

Signature

disassemble name-or-function => nil

Arguments

name-or-function

Either a function object, a lambda expression or a symbol with a function definition.

Description

This function prints the machine code of a compiled function, to *standard-ouput* .

On UNIX and Mac OS X, the number of instructions in the disasembly is also printed, at the end.

If the function denoted by name-or-function is not compiled then it is first compiled using the function compile . This happens if name-or-function is a lambda expression or an symbol naming an interpreted function.

An error is signalled if name-or-function is not suitable.

Examples
(disassemble  #'(lambda (x) (progn x)))
(disassemble  'cons)
(disassemble  #'map)
Notes

The output from disassemble lacks useful information such as local and lexical variable names and symbol names. The representation of integers or characters or Lisp objects in general is not easily readable without detailed knowledge of the internals of the Lisp system and the host machine instruction set.

See also

compile
compile-file


LispWorks User Guide and Reference Manual - 22 Dec 2009

NextPrevUpTopContentsIndex