src/pmc/packfiledebug.pmc - PackfileDebug PMC


This class implements a PackfileDebug object, a segment of the .pbc data file used for storing pir debug information.

See packfile.pmc for the toplevel Packfile interface, see packfilesegment.pmc for the list of common methods every packfile segment pmc must implement; see PDD13 for the design spec.

Initial and experimental version, using some vtables as a quick way of testing.

Vtable functions

Create empty PackfileDebug.
void mark()
Marks the object as live.
Set pointer to underlying PackFile_ConstTable
void *get_pointer()
Builds a Packfile_Debug segment for this PMC.
INTVAL get_integer()
INTVAL elements()
Get the number of filename mappings.
INTVAL get_pmc_keyed_int(INTVAL n)
INTVAL get_integer_keyed_int(INTVAL n)
Get the line mapping n. If n is greater than elements(), then the integer version returns -1 and the PMC version returns PMCNULL;
INTVAL get_string_keyed_int(INTVAL n)
Get the filename mapping n. If set_directory() has been used, this will return the filename. Otherwise it returns a string of the integer index into the constant table.


void set_directory(PMC *directory)
Find PackfileConstantTable in PackfileDirectory and use it to perform lookup for filenames.