NAME

src/pmc/oplib.pmc - Information about an opcode library

DESCRIPTION

The PMC provides introspection on the opcodes contained in a library.

Vtable functions

void init()
Throws an error. OpLib requires an argument to init. See init_pmc.
void init_pmc(PMC *name_pmc)
Initializes the OpLib with information about an oplib.
INTVAL get_integer_keyed_str(STRING *name)
INTVAL get_integer_keyed(PMC *key)
PMC* get_pmc_keyed_str(STRING *name)
PMC* get_pmc_keyed(PMC *key)
Look up an op number given the name of the op. First we look for the specific name, then the more general short name.The VTABLEs that return integers return -1 when an opcode could not be found. The VTABLEs that return PMCs throw exceptions instead.
PMC* get_pmc_keyed_int(INTVAL value)
Returns an Opcode PMC for a given opcode number. To find an opcode number from a name, see get_integer_keyed_str() above.
INTVAL elements()
INTVAL get_integer()
Returns the number of opcodes in the library.
void* get_pointer()
Returns the op_lib_t pointer for the opcode library.

Methods

PMC *op_family(STRING *shortname)
Returns an array of Opcode PMCs for all the opcodes in the library that share the given short name.
PMC *version()
Returns an array containing the two bytecode version numbers (bc_major, bc_minor) of the library.

SEE ALSO

src/pmc/opcode.pmc