NAME ^

object.ops

DESCRIPTION ^

Parrot's library of object ops

callmethodcc(invar PMC, in STR)

Call method $2 with invocant $1 and generate a new return continuation. The invocant ($1) is used for method lookup. The object is passed as the first argument in set_args.

Throws a Method_Not_Found_Exception for a non-existent method.

callmethodcc(invar PMC, invar PMC)

Like above but use the Sub object $2 as method.

callmethod(invar PMC, in STR, invar PMC)

callmethod(invar PMC, invar PMC, invar PMC)

Like above, but use continuation $3 instead of creating a new continuation.

tailcallmethod(invar PMC, in STR)

tailcallmethod(invar PMC, invar PMC)

Make a tailcall to method $2 with invocant $1.

DELETED_fetchmethod(out PMC, invar PMC, in STR)

Use find_method instead.

addmethod(invar PMC, in STR, invar PMC)

Adds $3 as a method named $2 to $1.

can(out INT, invar PMC, in STR)

Sets $1 to true or false, depending on whether $2 ->can the method in $3.

does(out INT, invar PMC, in STR)

Sets $1 to true or false, depending on whether $2 ->does the interface in $3.

See "build/pmc2c.pl" in tools for a list of available interfaces.

isa(out INT, invar PMC, in STR)

isa(out INT, invar PMC, in PMC)

Sets $1 to true or false, depending on whether $2 isa $3.

newclass(out PMC, in STR)

Creates a new Parrot-style class, named $2, and puts the new PMC for it into $1.

newclass(out PMC, in PMC)

Create a new Parrot-style class, with the hierarchical name given in $2.

subclass(out PMC, invar PMC)

subclass(out PMC, invar PMC, in STR)

subclass(out PMC, invar PMC, in PMC)

KLUDGE ALERT - OPCODE NAME SHOULD DIFFER FROM BELOW - XXX FIXME

Create a new class, put in $1, that is a subclass of $2. $3, if available and not null, is the name of the new class--if not, the subclass is an anonymous subclass.

subclass(out PMC, inconst PMC)

subclass(out PMC, inconst PMC, in STR)

subclass(out PMC, inconst PMC, in PMC)

subclass(out PMC, in STR)

subclass(out PMC, in STR, in STR)

subclass(out PMC, in STR, in PMC)

KLUDGE ALERT - OPCODE NAME SHOULD DIFFER FROM ABOVE - XXX FIXME

Create a new class, put in $1, that is a subclass of the class named $2. $3, if available and not null, is the name of the new class--if not, the subclass is an anonymous subclass.

getclass(out PMC, in STR)

getclass(out PMC, in PMC)

Find the PMC for a class, by name.

singleton(invar PMC) (unimplemented)

Take the object in $1 and put it into its own singleton class, which is an anonymous subclass of the object's current class.

class(out PMC, invar PMC)

Get the class PMC for the object in $2 and put it in $1.

classname(out STR, invar PMC)

Get the class name for the class in $2 and put it in $1.

addparent(invar PMC, invar PMC)

Add class $2 to the list of parent classes for $1.

removeparent(invar PMC, invar PMC)

Remove class $2 from class $1's list of parents.

addattribute(invar PMC, in STR)

Add the attribute named $2 to the class $1.

removeattribute(invar PMC, in STR) (unimplemented)

removeattribute(invar PMC, in INT) (unimplemented)

Remove attribute $2 from class $1, specified either by name or offset.

getattribute(out PMC, invar PMC, in INT)

getattribute(out PMC, invar PMC, in STR)

Get attribute number $3 from object $2 and put the result in $1. String attribute names have to be fully qualified.

setattribute(invar PMC, in INT, invar PMC)

setattribute(invar PMC, in STR, invar PMC)

Set attribute $2 of object $1 to $3

classoffset(out INT, invar PMC, in STR)

Returns the offset of the first attribute for class $3 in object $2. Throws an exception if $3 isn't in $2's hierarchy.

adddoes(invar PMC, in STR) (unimplemented)

Add $2 to the list of interfaces that this class claims to implement.

removedoes(invar PMC, in STR) (unimplemented)

Remove $2 from the list of interfaces that this class claims to implement.

COPYRIGHT ^

Copyright (C) 2001-2004, The Perl Foundation.

LICENSE ^

This program is free software. It is subject to the same license as the Parrot interpreter itself.


parrot