parrotcode: Array PMC | |
Contents | PMCs |
src/pmc/array.pmc - Array PMC
These are the vtable functions for the Array base class.
static PMC *undef(Interp *interp)
Undef
PMC.static PMC *retval(Interp *interp, void *ret)
*ret
,
returning the appropriate PMC,
or raising an exception if necessary.static PMC *Parrot_Array_set_pmc_ptr(Interp *interp, List *list, INTVAL key)
key
of *list
.
If this element was previously empty,
then this function also creates and assigns an "undef" PMC to that element.void class_init()
void init()
list_new()
function.void init_pmc(PMC *init)
list_new_init()
to initialize the underlying list.*init
contains the initialization information specifying initial size,
number of dimensions,
etc.void assign_pmc(PMC *other)
void set_pmc(PMC *other)
assign_pmc
.
Expected to go away soon.void mark()
PMC *clone()
INTVAL get_integer()
INTVAL get_bool()
INTVAL elements()
FLOATVAL get_number()
STRING *get_string()
INTVAL get_integer_keyed_int(INTVAL key)
key
.INTVAL type_keyed_int(INTVAL key)
INTVAL get_integer_keyed(PMC *key)
key
.FLOATVAL get_number_keyed_int(INTVAL key)
key
.FLOATVAL get_number_keyed(PMC *key)
key
.STRING *get_string_keyed_int(INTVAL key)
key
.STRING *get_string_keyed(PMC *key)
key
.PMC *get_pmc_keyed_int(INTVAL key)
key
.PMC *get_pmc_keyed(PMC *key)
key
.void set_integer_native(INTVAL size)
size
.void set_integer_same(PMC *value)
*value
.void set_integer_keyed_int (INTVAL key, INTVAL value)
key
to value
.void set_integer_keyed (PMC *key, INTVAL value)
key
to value
.void set_number_keyed_int(INTVAL key, FLOATVAL value)
key
to value
.void set_number_keyed(PMC *key, FLOATVAL value)
key
to value
.void set_string_keyed_int(INTVAL key, STRING *value)
key
to value
.void set_string_keyed(PMC *key, STRING *value)
key
to value
.void set_pmc_keyed_int(INTVAL idx, PMC *src)
idx
to *src
.void set_pmc_keyed (PMC *key, PMC *value)
key
to value
.void push_integer (INTVAL value)
value
to the end of the array.void push_float (FLOATVAL value)
value
to the end of the array.void push_string (STRING *value)
*value
to the end of the array.void push_pmc (PMC *value)
*value
to the end of the array.void unshift_integer(INTVAL value)
value
to the start of the array.void unshift_float(FLOATVAL value)
value
to the start of the array.void unshift_string(STRING *value)
*value
to the start of the array.void unshift_pmc(PMC *value)
*value
to the start of the array.INTVAL pop_integer()
FLOATVAL pop_float()
STRING *pop_string()
PMC *pop_pmc()
INTVAL shift_integer()
FLOATVAL shift_float()
STRING *shift_string()
PMC *shift_pmc()
void splice(PMC *value, INTVAL offset, INTVAL count)
count
elements starting at offset
with the elements in value
.count
is 0 then the elements in value
will be inserted after offset
.INTVAL defined_keyed_int(INTVAL key)
key
is defined; otherwise returns false.INTVAL defined_keyed(PMC *key)
key
is defined; otherwise returns false.INTVAL exists_keyed_int(INTVAL key)
key
exists; otherwise returns false.INTVAL exists_keyed(PMC *key)
key
exists; otherwise returns false.void delete_keyed_int(INTVAL key)
key
.void delete_keyed(PMC *key)
*key
.INTVAL is_equal (PMC *value)
==
operation.
Compares two array to hold equal elements.PMC *slice (PMC *key, INTVAL f)
key
if f == 0.PMC *get_iter ()
void visit(visit_info *info)
*info
is the visit info,
(see include/parrot/pmc_freeze.h).void freeze(visit_info *info)
void thaw(visit_info *info)
void share_ro()
src/list.c, include/parrot/list.h
Create global immutable undef object.
|