parrotcode: Simple Array or Subroutine Parameter Array | |
Contents | PMCs |
src/pmc/sarray.pmc - Simple Array or Subroutine Parameter Array
Simple Array or Subroutine Parameter Array PMC.
SArray data are kept in an malloced array of HashEntry
's:
start_idx
shift
.end_idx
push
.SArrays are fixed size, implying that the first operation on it must be setting its size, and that only the most important vtable methods are implemented.
Currently SArray's are used for:
static PARROT_INLINE INTVAL ret_int(Interp *interp, HashEntry *e)
*e
,
returning the appropriate integer,
or raising an exception if necessary.static PARROT_INLINE FLOATVAL ret_num(Interp *interp, HashEntry *e)
*e
,
returning the appropriate floating-point number,
or raising an exception if necessary.static PARROT_INLINE STRING *ret_string(Interp *interp, HashEntry *e)
*e
,
returning the appropriate Parrot string,
or raising an exception if necessary.static PARROT_INLINE PMC *ret_pmc(Interp *interp, HashEntry *e)
*e
,
returning the appropriate PMC,
or raising an exception if necessary.static PARROT_INLINE HashEntry *shift_entry(PMC *self)
static PARROT_INLINE HashEntry *get_entry(PMC *self, INTVAL key)
key
.void init()
void morph(INTVAL type)
morph()
.void mark()
void destroy()
PMC *clone()
INTVAL get_bool()
INTVAL elements()
INTVAL get_integer()
INTVAL type_keyed_int(INTVAL key)
key
.INTVAL get_integer_keyed_int(INTVAL key)
key
.INTVAL get_integer_keyed(PMC *key)
*key
.INTVAL shift_integer()
FLOATVAL get_number_keyed_int(INTVAL key)
key
.FLOATVAL get_number_keyed (PMC *key)
*key
.FLOATVAL shift_float()
STRING *get_string_keyed_int(INTVAL key)
key
.STRING *get_string_keyed(PMC *key)
*key
.STRING *shift_string()
PMC *get_pmc_keyed_int(INTVAL key)
key
.PMC *get_pmc_keyed(PMC *key)
*key
.PMC *shift_pmc()
void set_integer_native(INTVAL size)
size
elements.void set_integer_keyed_int(INTVAL key, INTVAL value)
key
to value
.void push_integer(INTVAL value)
value
to the end of the array.void set_number_keyed_int(INTVAL key, FLOATVAL value)
key
to value
.void push_float(FLOATVAL value)
value
to the end of the array.void set_string_keyed_int(INTVAL key, STRING *value)
key
to value
.void push_string(STRING *value)
*value
to the end of the array.void set_pmc_keyed_int(INTVAL key, PMC *src)
key
to *src
.void push_pmc(PMC *value)
*value
to the end of the array.docs/pdds/pdd03_calling_conventions.pod.
Initial version 2003.07.04 by leo
2003.11.06 boemmels renamed HASH_ENTRY to HashEntry
|