NAME

Parrot::Pmc2c::Library - PMC to C Code Generation

SYNOPSIS

use Parrot::Pmc2c::Library;

DESCRIPTION

Parrot::Pmc2c::Library is a wrapper around a collection of PMCs linked in the same dynamic library. A degenerate case is having an unnamed library with just one PMC, which is the case used by the Parrot core. See Parrot::Pmc2c

Instance Methods

new($opt, $vtable_dump, %pmcs)
$library = Parrot::Pmc2c::Library->new
    ( $options,     # hash refernce, the same passed to other constructors
      $vtable_dump, # vtable.dump
      pmc1        => $pmc1_dump,
      pmc2        => $pmc2_dump,
      ... );

Creates a new library object. If the $options hash contains a library key its value will be used for the library name.

write_all_files()

Writes C and header files for all the PMCs in the library, or <libname>.c and pmc_<libname>.h if his object represents a named library.

gen_h

Writes the header file for the library.

gen_c

Writes the C file for the library.

includes()

Returns the set of C #includes for the library.

SEE ALSO

tools/build/pmc2c.pl