Changeset 14934

Timestamp:
12/28/16 09:19:09 (5 years ago)
Author:
Mark Evenson
Message:

abcl-introspect: a new ABCL-CONTRIB for accessing ABCL compiler information

The ABCL compiler stores constants that are used in function execution
as private java fields. This includes symbols used to invoke function,
locally-defined functions (such as via labels or flet) and string and
other literal constants.

This file provides access to those internal values, and uses them in
at least two ways. First, to annotate locally defined functions with
the top-level function they are defined within, and second to search
for callers of a give function(*). This may yield some false
positives, such as when a symbol that names a function is also used
for some other purpose. It can also have false negatives, as when a
function is inlined. Still, it's pretty useful. The second use to to
find source locations for frames in the debugger. If the source
location for a local function is asked for the location of its 'owner'
is instead returns.

(*) Since java functions are strings, local fields also have these
strings. In the context of looking for callers of a function you can
also give a string that names a java method. Same caveat re: false
positives.

In order to record information about local functions, ABCL defines a
function-plist, which is for the most part unused, but is used here
with set of keys indicating where the local function was defined and
in what manner, i.e. as normal local function, as a method function,
or as an initarg function. There may be other places functions are
stashed away (defstructs come to mind) and this file should be added
to to take them into account as they are discovered.

This file does not depend on jss, but provides a bit of
jss-specific functionality if jss *is* loaded.

Location:
trunk/abcl/contrib
Files:
4 added

Note: See TracChangeset for help on using the changeset viewer.