411 REFERENCE · Wikibooks
Parrot Virtual Machine/Built-In PMCs
Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.
Built-in PMCs
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
http://docs.parrot.org/parrot/latest/html/src/pmc/addrregistry.pmc.html
Array
http://www.parrotcode.org/docs/pmc/pmc/array.html
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
http://docs.parrot.org/parrot/latest/html/src/pmc/bignum.pmc.html
A PMC type for storing an arbitrarily large number, or a number with arbitrary precision. Not currently implemented.
Boolean
http://docs.parrot.org/parrot/latest/html/src/pmc/boolean.pmc.html
A boolean True/False PMC.
Bound_NCI
http://www.parrotcode.org/docs/pmc/pmc/bound_nci.html
Capture
http://docs.parrot.org/parrot/latest/html/src/pmc/capture.pmc.html
Closure
http://www.parrotcode.org/docs/pmc/pmc/closure.html
Compiler
http://www.parrotcode.org/docs/pmc/pmc/compiler.html
A Compiler PMC for a particular language. Can be used to convert an HLL into PIR and eventually into Parrot Bytecode.
Complex
http://www.parrotcode.org/docs/pmc/pmc/complex.html
A PMC for Complex numbers.
Continuation
http://www.parrotcode.org/docs/pmc/pmc/continuation.html
A Continuation PMC allows Parrot to take a snapshot of the current state of the system to return to later.
Coroutine
http://www.parrotcode.org/docs/pmc/pmc/coroutine.html
A sub-like PMC that implements a coroutine.
Default
http://www.parrotcode.org/docs/pmc/pmc/default.html
Deleg_PMC
http://www.parrotcode.org/docs/pmc/pmc/deleg_pmc.html
Delegate
http://www.parrotcode.org/docs/pmc/pmc/delegate .html
Enumerate
http://www.parrotcode.org/docs/pmc/pmc/enumerate.html
Env
http://www.parrotcode.org/docs/pmc/pmc/env.html
Allows access to the system's environment variables, as a hash.
Eval
http://www.parrotcode.org/docs/pmc/pmc/eval.html
Exception
http://www.parrotcode.org/docs/pmc/pmc/exception.html
An Exception PMC holds information about system errors for recovery.
Exception_Handler
http://www.parrotcode.org/docs/pmc/pmc/exception_handler.html
A sub-like routine that catches and resolves exceptions
Exporter
http://www.parrotcode.org/docs/pmc/pmc/exporter.html
File
http://docs.parrot.org/parrot/latest/html/src/dynpmc/file.pmc.html
A read/write interface for files
FixedBooleanArray
http://www.parrotcode.org/docs/pmc/pmc/fixedbooleanarray.html
An array of fixed size of Boolean values.
FixedFloatArray
http://www.parrotcode.org/docs/pmc/pmc/fixedfloatarray.html
An array of fixed size for FLOATVAL floating point numbers
FixedPMCArray
http://www.parrotcode.org/docs/pmc/pmc/fixedpmcarray.html
An array of fixed size for PMC values
FixedStringArray
http://www.parrotcode.org/docs/pmc/pmc/fixedstringarray.html
An array of fixed size for STRING values
Float
http://www.parrotcode.org/docs/pmc/pmc/float.html
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
http://www.parrotcode.org/docs/pmc/pmc/hash.html
A hash, also known as a "dictionary" or an "associative array". Like an array but indexed with strings instead of integers
Integer
http://www.parrotcode.org/docs/pmc/pmc/integer.html
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
http://www.parrotcode.org/docs/pmc/pmc/intlist.html
A simple list, or array, of integers.
Iterator
http://www.parrotcode.org/docs/pmc/pmc/iterator.html
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
http://www.parrotcode.org/docs/pmc/pmc/key.html
A value, typically a string, which is used to look up values in a hash.
LexInfo
http://www.parrotcode.org/docs/pmc/pmc/lexinfo.html
LexPad
http://www.parrotcode.org/docs/pmc/pmc/lexpad.html
ManagedStruct
http://www.parrotcode.org/docs/pmc/pmc/managedstruct.html
A low-level structure whose memory is allocated and automatically deallocated by Parrot. Extends UnManagedStruct, but adds automatic memory collection.
MultiArray
http://www.parrotcode.org/docs/pmc/pmc/multiarray.html
MultiSub
http://www.parrotcode.org/docs/pmc/pmc/multisub.html
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
Namespace
http://www.parrotcode.org/docs/pmc/pmc/namespace.html
Implements a Parrot namespace. Contains information about variables, subroutines, coroutines, and MultiSubs that are stored in that namespace.
NCI
http://www.parrotcode.org/docs/pmc/pmc/nci.html
A native call function PMC. Stores interface information to a function which has been written in C.
Null
http://www.parrotcode.org/docs/pmc/pmc/null.html
A PMC with a NUL value
Object
http://www.parrotcode.org/docs/pmc/pmc/object.html
OrderedHash
http://www.parrotcode.org/docs/pmc/pmc/orderedhash.html
OS
http://www.parrotcode.org/docs/pmc/pmc/os.html
Pair
http://www.parrotcode.org/docs/pmc/pmc/pair.html
An association of a Key PMC with a PMC value. Hashes are typically implemented as an array of Pair PMCs
ParrotClass
http://www.parrotcode.org/docs/pmc/pmc/parrotclass.html
ParrotInterpreter
http://www.parrotcode.org/docs/pmc/pmc/parrotinterpreter.html
An interface to the interpreter structure.
ParrotIO
http://www.parrotcode.org/docs/pmc/pmc/parrotio.html
A read/write interface to the console
ParrotLibrary
http://www.parrotcode.org/docs/pmc/pmc/parrotlibrary.html
A dynamically-loaded library object.
ParrotObject
http://www.parrotcode.org/docs/pmc/pmc/parrotobject.html
ParrotRunningThread
http://www.parrotcode.org/docs/pmc/pmc/parrotrunningthread.html
ParrotThread
http://www.parrotcode.org/docs/pmc/pmc/parrotthread.html
A PMC that stores information about a thread
Pmethod_test
http://www.parrotcode.org/docs/pmc/pmc/pmethod_test.html
Pointer
http://www.parrotcode.org/docs/pmc/pmc/pointer.html
Random
http://www.parrotcode.org/docs/pmc/pmc/random.html
Ref
http://www.parrotcode.org/docs/pmc/pmc/ref.html
ResizableBooleanArray
http://www.parrotcode.org/docs/pmc/pmc/resizablebooleanarray.html
A resizable array to store Boolean values
ResizableFloatArray
http://www.parrotcode.org/docs/pmc/pmc/resizablefloatarray.html
A resizable array to store floating point values.
ResizableIntegerArray
http://www.parrotcode.org/docs/pmc/pmc/resizableintegerarray.html
A resizable array to store integer values
ResizablePMCArray
http://www.parrotcode.org/docs/pmc/pmc/resizablepmcarray.html
A resizable array to store PMC values
ResizableStringArray
http://www.parrotcode.org/docs/pmc/pmc/resizablestringarray.html
A resizable array to store Strings
RetContinuation
http://www.parrotcode.org/docs/pmc/pmc/retcontinuation.html
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
http://www.parrotcode.org/docs/pmc/pmc/role.html
An abstract role, or interface, for a class. Specifies actions and properties of a class, but cannot be instantiated
SArray
http://www.parrotcode.org/docs/pmc/pmc/sarray.html
SharedRef
http://www.parrotcode.org/docs/pmc/pmc/sharedref.html
Slice
http://www.parrotcode.org/docs/pmc/pmc/slice.html
SMOP_Attribute
http://www.parrotcode.org/docs/pmc/pmc/smop_attribute.html
SMOP_Class
http://www.parrotcode.org/docs/pmc/pmc/smop_class.html
STMLog
http://www.parrotcode.org/docs/pmc/pmc/stmlog.html
STMRef
http://www.parrotcode.org/docs/pmc/pmc/stmref.html
STMVar
http://www.parrotcode.org/docs/pmc/pmc/stmvar.html
String
http://www.parrotcode.org/docs/pmc/pmc/string.html
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
http://www.parrotcode.org/docs/pmc/pmc/sub.html
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
http://www.parrotcode.org/docs/pmc/pmc/super.html
A parent PMC class, to support multiple inheritance.
Timer
http://www.parrotcode.org/docs/pmc/pmc/timer.html
TQueue
http://www.parrotcode.org/docs/pmc/pmc/tqueue.html
Undef
http://www.parrotcode.org/docs/pmc/pmc/undef.html
An undefined PMC with no usable type.
UnamangedStruct
http://www.parrotcode.org/docs/pmc/pmc/unamangedstruct.html
A low-level structure which the programmer must manage manually. Parrot does not automatically collect memory allocated for the struct.
Version
http://www.parrotcode.org/docs/pmc/pmc/version.html
VtableCache
Command Line Options Parrot Virtual Machine Bytecode File Format