Parrot Virtual Machine/Built-In PMCs
Built-in PMCs
[edit | edit source]Parrot ships with a number of PMC data types built in. This means that these standard types are always available. This page is going to serve as a reference to these PMC types. We will not attempt to cover all the PMC types that are added specifically for other HLLs, libraries, or programs. (For information on using these PMC types, and on defining new PMC types, see the Parrot Virtual Machine/Polymorphic Containers (PMCs) chapter).
The entries in this list should (A) contain a link to the relevant PMC documentation, and (B) provide a brief overview of the PMC and it's methods.
AddrRegistry
[edit | edit source]Array
[edit | edit source]A simple array class, serves as the base class for other array PMCs. This type of PMC is rarely used directly. Instead, more versatile array PMC types, such as ResizablePMCArray are used. Array specifies an interface that all other Array classes must share. It also provides a number of defaults that other array-like PMCs may default to.
BigInt
[edit | edit source]A PMC type for storing an arbitrarily large number, or a number with arbitrary precision. Not currently implemented.
Boolean
[edit | edit source]A boolean True/False PMC.
Bound_NCI
[edit | edit source]Capture
[edit | edit source]Closure
[edit | edit source]Compiler
[edit | edit source]A Compiler PMC for a particular language. Can be used to convert an HLL into PIR and eventually into Parrot Bytecode.
Complex
[edit | edit source]A PMC for Complex numbers.
Continuation
[edit | edit source]A Continuation PMC allows Parrot to take a snapshot of the current state of the system to return to later.
Coroutine
[edit | edit source]A sub-like PMC that implements a coroutine.
Default
[edit | edit source]Deleg_PMC
[edit | edit source]Delegate
[edit | edit source]Enumerate
[edit | edit source]Env
[edit | edit source]Allows access to the system's environment variables, as a hash.
Eval
[edit | edit source]Exception
[edit | edit source]An Exception PMC holds information about system errors for recovery.
Exception_Handler
[edit | edit source]A sub-like routine that catches and resolves exceptions
Exporter
[edit | edit source]File
[edit | edit source]A read/write interface for files
FixedBooleanArray
[edit | edit source]An array of fixed size of Boolean values.
FixedFloatArray
[edit | edit source]An array of fixed size for FLOATVAL floating point numbers
FixedPMCArray
[edit | edit source]An array of fixed size for PMC values
FixedStringArray
[edit | edit source]An array of fixed size for STRING values
Float
[edit | edit source]A floating point number PMC. Used similarly to a FLOATVAL, except has methods and vtable methods. FLOATVALs become Float PMCs when they are promoted to become a PMC.
Hash
[edit | edit source]A hash, also known as a "dictionary" or an "associative array". Like an array but indexed with strings instead of integers
Integer
[edit | edit source]A basic integer number PMC. Used similarly to an INTVAL, but with methods and vtable methods. INTVALS become Integer PMCs when they are promoted to become a PMC.
IntList
[edit | edit source]A simple list, or array, of integers.
Iterator
[edit | edit source]An Iterator PMC provides a stateful counter that enables you to iterate over the items in one of the array classes, one at a time.
Key
[edit | edit source]A value, typically a string, which is used to look up values in a hash.
LexInfo
[edit | edit source]LexPad
[edit | edit source]ManagedStruct
[edit | edit source]A low-level structure whose memory is allocated and automatically deallocated by Parrot. Extends UnManagedStruct, but adds automatic memory collection.
MultiArray
[edit | edit source]MultiSub
[edit | edit source]A collection of subroutines with the same name. In Multiple Method Dispatch (MMD) the parameters of the function called determine which subroutine from the collection to call.
Mutable
[edit | edit source]Namespace
[edit | edit source]Implements a Parrot namespace. Contains information about variables, subroutines, coroutines, and MultiSubs that are stored in that namespace.
NCI
[edit | edit source]A native call function PMC. Stores interface information to a function which has been written in C.
Null
[edit | edit source]A PMC with a NUL value
Object
[edit | edit source]OrderedHash
[edit | edit source]OS
[edit | edit source]Pair
[edit | edit source]An association of a Key PMC with a PMC value. Hashes are typically implemented as an array of Pair PMCs
ParrotClass
[edit | edit source]ParrotInterpreter
[edit | edit source]An interface to the interpreter structure.
ParrotIO
[edit | edit source]A read/write interface to the console
ParrotLibrary
[edit | edit source]A dynamically-loaded library object.
ParrotObject
[edit | edit source]ParrotRunningThread
[edit | edit source]ParrotThread
[edit | edit source]A PMC that stores information about a thread
Pmethod_test
[edit | edit source]Pointer
[edit | edit source]Random
[edit | edit source]Ref
[edit | edit source]ResizableBooleanArray
[edit | edit source]A resizable array to store Boolean values
ResizableFloatArray
[edit | edit source]A resizable array to store floating point values.
ResizableIntegerArray
[edit | edit source]A resizable array to store integer values
ResizablePMCArray
[edit | edit source]A resizable array to store PMC values
ResizableStringArray
[edit | edit source]A resizable array to store Strings
RetContinuation
[edit | edit source]A return continuation. Like a regular Continuation PMC, but can only be used once. Can be promoted to a Continuation using the Clone vtable method.
Role
[edit | edit source]An abstract role, or interface, for a class. Specifies actions and properties of a class, but cannot be instantiated
SArray
[edit | edit source]SharedRef
[edit | edit source]Slice
[edit | edit source]SMOP_Attribute
[edit | edit source]SMOP_Class
[edit | edit source]STMLog
[edit | edit source]STMRef
[edit | edit source]STMVar
[edit | edit source]String
[edit | edit source]A PMC to contain a string value. Like a STRING value, but has methods and vtable methods. STRINGS become String PMCs when they are promoted to PMCs.
Sub
[edit | edit source]A Parrot subroutine. Implements a basic subroutine (using the sub command in PIR), but also serves as a base class for more intricate sub-like classes
Super
[edit | edit source]A parent PMC class, to support multiple inheritance.
Timer
[edit | edit source]TQueue
[edit | edit source]Undef
[edit | edit source]An undefined PMC with no usable type.
UnamangedStruct
[edit | edit source]A low-level structure which the programmer must manage manually. Parrot does not automatically collect memory allocated for the struct.