Parrot::Pmc2c::PMC - PMC model object
use Parrot::Pmc2c::PMC;
Parrot::Pmc2c::PMC is used by tools/build/pmc2c.pl to generate C code from PMC files.
Parrot::Pmc2c::PMC
is_dynpmc
Determines if a given PMC type is dynamically loaded or not.
implements_vtable($method)
True if pmc generates code for vtable $method.
$method
vtable_method_does_write($method)
Returns true if the vtable $method writes our value.
inherit_attrs()
$class = inherit_attrs($class, $meth);
Purpose: Modify $attrs to inherit attrs from $super_attrs as appropriate.
Arguments: List of two arguments:
Method name.
Return Values: Reference to hash holding the data structure being built up within dump_pmc().
dump_pmc()
Comments: Called within gen_super_meths().
gen_super_meths()
dump_is_current()
dump_is_current($existing);
Purpose: Determines whether the dump of a file is newer than the PMC file. (If it's not, then the PMC file has changed and the dump has not been updated.)
Arguments: String holding filename.
Return Values: Returns true if timestamp of existing is more recent than that of PMC.
Comments: Called within dump_pmc().
generate_c_file()
Generates the C implementation file code for the PMC.
generate_h_file()
Generates the C header file code for the PMC.
hdecls()
Returns the C code function declarations for all the methods for inclusion in the PMC's C header file.
init()
Initializes the instance.
gen_includes()
Returns the C #include for the header file of each of the PMC's superclasses.
#include
pre_method_gen
Generate switch-bases VTABLE for MULTI
post_method_gen
Generate write barriers.
gen_methods()
Returns the C code for the pmc methods.
gen_attributes()
Returns the C code for the attribute struct definition.
find_multi_functions()
Returns an arrayref of MULTI function names declared in the PMC. Used to initialize the multiple dispatch function list.
vtable_flags()
Returns C code to produce a PMC's flags.
vtable_decl($name)
Returns the C code for the declaration of a vtable temporary named $name with the functions for this class.
$name
pmc_class_init_func()
Returns the C code for the PMC's class_init function as a static function to be called from the exported class_init.
init_func()
Returns the C code for the PMC's initialization method, or an empty string if the PMC has a no_init flag.
no_init
update_vtable_func()
Returns the C code for the PMC's update_vtable.
get_mro_func()
Returns the C code for the PMC's get_mro function.
get_isa_func()
Returns the C code for the PMC's get_isa function.
get_vtable_func()
gen_switch_vtable
generate_start
Generate and emit the C code for the start of an attribute struct.
generate_end
Generate and emit the C code for the end of an attribute struct.
generate_declaration
Generate and emit the C code for an attribute declaration.
generate_accessor
Generate and emit the C code for an attribute get/set accessor pair.
To install Rakudo::Star, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Rakudo::Star
CPAN shell
perl -MCPAN -e shell install Rakudo::Star
For more information on module installation, please visit the detailed CPAN module installation guide.