| parrotcode: Class and object | |
| Contents | C |

objects.c - Class and object

Handles class and object manipulation.

static void create_deleg_pmc_vtable(Interp *, PMC *class, STRING *name)const char *Parrot_MMD_method_name(Interp*, INTVAL)INTVAL Parrot_MMD_method_idx(Interp*, STRING *)PMC *Parrot_single_subclass(Interp *ointerpreter, PMC *base_class, STRING *child_class_name)child_class is NULL,
this is an anonymous subclass we're creating,
which happens commonly enough to warrant an actual single-subclass function.void Parrot_new_class(Interp *interpreter, PMC *class, STRING *class_name)class_name.PMC *Parrot_class_lookup(Interp *interpreter, STRING *class_name)class_name and returns it if it exists.
Otherwise it returns PMCNULL.static void parrot_class_register(Interp *interpreter, STRING *class_name, PMC *new_class, PMC *mro)init method initializes objects of the class rather than the class itself,
and adding it to the interpreter's base type table so you can create a new foo in PASM like this: new Px, foo.void Parrot_instantiate_object(Interp *interpreter, PMC *object, PMC *init)PMC *Parrot_add_parent(Interp *interpreter, PMC *class, PMC *parent)PMC *Parrot_remove_parent(Interp *interpreter, PMC *removed_class, PMC *existing_class)NULL.PMC *Parrot_multi_subclass(Interp *interpreter, PMC *base_class_array, STRING *child_class_name)NULL.INTVAL Parrot_object_isa(Interp *interpreter, PMC *pmc, PMC *cl)pmc is an instance of class cl.PMC *Parrot_new_method_cache(Interp *interpreter)NULL.PMC *Parrot_find_method_with_cache(Interp *interpreter, PMC *class, STRING *method_name)void Parrot_note_method_offset(Interp *interpreter, UINTVAL offset, PMC *method)INTVAL Parrot_add_attribute(Interp *interpreter, PMC *class, STRING *attr)attr to the class.PMC *Parrot_get_attrib_by_num(Interp *interpreter, PMC *object, INTVAL attrib)attrib from object.
Presumably the code is asking for the correct attribute number.PMC *Parrot_get_attrib_by_str(Interp *interpreter, PMC *object, STRING *attr)attr from object.PMC *Parrot_set_attrib_by_num(Interp *interpreter, PMC *object, INTVAL attrib, PMC *value)attrib from object to value.
Presumably the code is asking for the correct attribute number.PMC *Parrot_set_attrib_by_str(Interp *interpreter, PMC *object, STRING *attr, PMC *value)attr from object to value.PMC *Parrot_find_class_constructor(Interp *interpreter, STRING *class, INTVAL classtoken)
include/parrot/objects.h, docs/pdds/pdd15_objects.pod.
|
|
|