< Parrot Virtual Machine

Vtable List

Vtable nameDescription
absoluteReturns the absolute value of the PMC, as a PMC
add_attributeAdds an attribute to the PMC object. Attributes are typically stored in the pmc->pmc_ext->_metadata field.
add_methodAdds a new method to the PMC's class
add_parent
add_role
add_vtable_override
assign_pmcAssigns a PMC value to the PMC
assign_string_nativeAssigns a string to the PMC
bitwise_not
bitwise_nots
can
clone
clone_pmc
decrementDecrements the integer value of the PMC by 1
definedDetermines if the PMC is defined
defined_keyed
defined_keyed_int
defined_keyed_str
delpropDeletes a property from the PMC
destroyDestroy the PMC
does
does_pmc
elements
exists_keyed
exists_keyed_int
exists_keyed_str
find_method
freeze
get_attr
get_bignumGets the BigNum representation of the PMC
get_boolGets the boolean representation of the PMC
get_class
get_integerGets the integer representation of the PMC
get_integer_keyed
get_integer_keyed_int
get_integer_keyed_str
get_iter
get_namespace
get_numberGets the floating-point representation of the PMC
get_number_keyed
get_number_keyed_int
get_number_keyed_str
get_pmcGets the PMC representation of the PMC
get_pmc_keyed
get_pmc_keyed_int
get_pmc_keyed_str
get_pointer
get_pointer_keyed
get_pointer_keyed_int
get_pointer_keyed_str
get_repr
get_stringGets the string representation of the PMC
get_string_keyed
get_string_keyed_int
get_string_keyed_srt
getpropGet the value of a certain property from the PMC
getprops
i_absolute
i_bitwise_not
i_bitwise_nots
i_logical_not
i_net
incrementIncrements the integer value of the PMC by 1
initInitializes the PMC. This method is called when the new keyword is used to create a new PMC.
init_pmc
inspect
inspect_str
instantiate
invokeThe invoke vtable method is called when the PMC is called like a function. In the following code:
.local pmc mypmc = new 'MyPMCType'
mypmc()

The invoke vtable method is called on the second line when the PMC is treated as a function call. For string functions, for example, the string class uses the value of the string to look up a function with the same name, and then invokes that function. Subroutine PMCs invoke the given function when they are called.

is_same
isa
isa_pmc
logical_not
markMark the PMC and all its children as alive for the memory manager. This prevents children of the PMC from being collected prematurely by the garbage collector.
morph
name
neg
new_from_string
nextkey_keyed
nextkey_keyed_int
nextkey_keyed_str
pop_floatIf the PMC is an array, pops a floating point value off the top of it
pop_integerIf the PMC is an array, pops an integer value off the top of it
pop_pmcIf the PMC is an array, pops a PMC value off the top of it
pop_stringIf the PMC is an array, pops a string value off the top of it
push_floatIf the PMC is an array, pushes a floating point value onto the top of it
push_integerIf the PMC is an array, pushes an integer onto the top of it
push_pmcIf the PMC is an array, pushes a PMC onto the top of it
push_stringIf the PMC is an array, pushes a string onto the top of it
remove_attributeRemoves an attribute from the PMC
remove_method
remove_parent
remove_role
remove_vtable_override
set_attrSets an attribute value for the given PMC
set_attr_keyed
set_attr_keyed_str
set_bugnum_int
set_bignum_num
set_bignum_str
set_boolSets the value of the PMC as if it were a boolean
set_integer_keyed
set_integer_keyed_int
set_integer_keyed_str
set_integer_nativeSets the value of the PMC as if it were an integer
set_number_keyed
set_number_keyed_int
set_number_keyed_str
set_number_nativeSets the value of the PMC as if it were a floating point value
set_number_same
set_pmcSets the value of a PMC to the value of another PMC
set_pmc_keyed
set_pmc_keyed_int
set_pmc_keyed_str
set_pointer
set_pointer_keyed
set_pointer_keyed_int
set_pointer_keyed_str
set_string_keyed
set_string_keyed_int
set_string_keyed_str
set_string_nativeSets the value of the PMC as if it were a string
set_string_same
setprop
share
share_ro
shift_floatIf the PMC is an array, shifts a floating point value onto the bottom of it
shift_intIf the PMC is an array, shifts an integer onto the bottom of it
shift_pmcIf the PMC is an array, shifts a PMC onto the bottom of it
shift_stringIf the PMC is an array, shifts a string onto the bottom of it
slice
splice
substr
substr_str
thaw
thawfinish
type
type_keyed
type_keyed_int
type_keyed_str
unshift_floatIf the PMC is an array, unshifts a floating point valuefrom the bottom of it
unshift_integerIf the PMC is an array, unshifts an integer from the bottom of it
unshift_pmcIf the PMC is an array, unshifts a PMC from the bottom of it
unshift_strIf the PMC is an array, unshifts a string from the bottom of it
visit
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.