disasm
core-api
cfunction
src/core/asm.c on line 1060, column 1
(disasm func &opt field)
Returns assembly that could be used to compile the given function.
func must be a function, not a c function. Will throw on error on a
badly typed argument. If given a field name, will only return that
part of the function assembly. Possible fields are:
:arity number of required and optional arguments.
:min-arity minimum number of arguments function can be called
with.
:max-arity maximum number of arguments function can be called
with.
:vararg true if function can take a variable number of
arguments.
:bytecode array of parsed bytecode instructions. Each
instruction is a tuple.
:source name of source file that this function was compiled
from.
:name name of function.
:slotcount how many virtual registers, or slots, this function
uses. Corresponds to stack space used by function.
:symbolmap all symbols and their slots.
:constants an array of constants referenced by this function.
:sourcemap a mapping of each bytecode instruction to a line and
column in the source file.
:environments an internal mapping of which enclosing functions
are referenced for bindings.
:defs other function definitions that this function may
instantiate.