TITLE
Object - JS Array class
DESCRIPTION
This file sets up the base classes and methods for JS's object system. Differences (and conflicts) between Parrot's object model and the JS model means we have to do a little name and method trickery here and there, and this file takes care of much of that.
Methods
- clone() Returns a copy of the object.NOTE: Don't copy what this method does; it's a tad inside-out. We should be overriding the clone vtable method to call .clone() really. But if we do that, we can't current get at the Object PMC's clone method, so for now we do it like this.
- defined() Return true if the object is defined.
- hash Return invocant in hash context.
- item Return invocant in item context. Default is to return self.
- list Return invocant in list context. Default is to return a List containing self.
- print() Print the object.
- say() Print the object, followed by a newline.
- true() Boolean value of object -- defaults to
.defined
(S02).Coercion methods
- Array()
- Hash()
- Iterator()
- Scalar() Default Scalar() gives reference type semantics, returning an object reference (unless the invocant already is one).
- Str() Return a string representation of the invocant. Default is the object's type and address.
Special methods
- new() Create a new object having the same class as the invocant.