| parrotcode: The base vtable calling functions | |
| Contents | C |

src/pmc.c - The base vtable calling functions


INTVAL PMC_is_nullPMC *pmc_newbase_type (which is an index into the list of PMC types declared in vtables in include/parrot/pmc.h).
Once the PMC has been successfully created and its vtable pointer initialized,
we call its init method to perform any other necessary initialization.PMC *pmc_reusestatic PMC *get_new_pmc_headerPMC *pmc_new_noinitbase_type (which is an index into the list of PMC types declared in vtables in include/parrot/pmc.h).
Unlike pmc_new(),
pmc_new_noinit() does not call its init method.
This allows separate allocation and initialization for continuations.PMC *constant_pmc_new_noinitbase_type.PMC *constant_pmc_newbase_type,
then calls its init.PMC *pmc_new_initpmc_new(),
but passes init to the PMC's init_pmc() vtable entry.PMC *constant_pmc_new_initconstant_pmc_new,
but passes init to the PMC's init_pmc vtable entry.PMC *temporary_pmc_new(PARROT_INTERP, INTVAL base_type)base_type,
the call init.
You are responsible for freeing this PMC when it goes out of scope with free_temporary_pmc().
Do not store this PMC in any other PMCs,
or allow it to be stored.
Do not store any regular PMC in this PMC,
or allow the storage of any regular PMC in this PMC.pmc_new() instead.pmc_new() instead,
and never ever add PARROT_API to either function.)void temporary_pmc_freetemporary_pmc_new().
Do not call this with any other type of PMC.
Do not forget to call this (or you'll leak PMCs).
Read and understand the warnings for temporary_pmc_new() before you're tempted to use this.INTVAL pmc_registerINTVAL pmc_typename.INTVAL pmc_type_pname.static PMC *create_class_pmcvoid Parrot_create_mro
void dod_register_pmcvoid dod_unregister_pmc
include/parrot/vtable.h.
5.1.0.14.2.20011008152120.02158148@pop.sidhe.org (http://www.nntp.perl.org/group/perl.perl6.internals/5516).

Initial version by Simon on 2001.10.20.
|
|
|