parrotcode: Slice PMC | |
Contents | PMCs |
src/classes/slice.pmc - Slice PMC
These are the vtable functions for the slice PMC class.
A Slice PMC isa Key PMC, holding a chain of start and/or end values for slice ranges. Private flags define the meaning of the values:
[ s .. e ] s .. KEY_start_slice_FLAG; e .. KEY_end_slice_FLAG
[ x, ] KEY_start_slice_FLAG | KEY_end_slice_FLAG
[ .. e ] KEY_inf_slice_FLAG | KEY_end_slice_FLAG
[ s .. ] KEY_start_slice_FLAG | KEY_inf_slice_FLAG
Infinite ranges are currently implemented for Array and PerlString only.
Run
$ parrot -d2000 slice.pasm
to see slice constant flags.
During initialization above key chain gets converted to parrot_range_t structures.
INTVAL get_integer()
STRING *get_string()
PMC *slice(PMC *key)
PMC *get_iter()
PMC *nextkey_keyed (PMC *agg, INTVAL what)
|