ooRexx  4.2.0-source
About: ooRexx (Open Object Rexx) is a free implementation of Object Rexx. Object Rexx is an enhancement of the classic Rexx interpreter; a full-featured programming language with a human-oriented syntax.
  Fossies Dox: ooRexx-4.2.0-source.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

RexxArray Class Reference

#include <ArrayClass.hpp>

Inheritance diagram for RexxArray:
[legend]
Collaboration diagram for RexxArray:
[legend]

Public Member Functions

void * operator new (size_t size, void *objectPtr)
 
void * operator new (size_t, RexxObject **, size_t, RexxClass *)
 
void * operator new (size_t, RexxObject *)
 
void * operator new (size_t, RexxObject *, RexxObject *)
 
void * operator new (size_t, RexxObject *, RexxObject *, RexxObject *)
 
void * operator new (size_t, RexxObject *, RexxObject *, RexxObject *, RexxObject *)
 
void * operator new (size_t, size_t, RexxObject **)
 
void * operator new (size_t, size_t, size_t, RexxClass *cls=TheArrayClass)
 
void operator delete (void *)
 
void operator delete (void *, void *)
 
void operator delete (void *, RexxObject **, size_t, RexxClass *)
 
void operator delete (void *, RexxObject *)
 
void operator delete (void *, RexxObject *, RexxObject *)
 
void operator delete (void *, RexxObject *, RexxObject *, RexxObject *)
 
void operator delete (void *, RexxObject *, RexxObject *, RexxObject *, RexxObject *)
 
void operator delete (void *, size_t, RexxObject **)
 
void operator delete (void *, size_t, size_t, RexxClass *cls)
 
void operator delete (void *, RexxObject **)
 
 RexxArray (RESTORETYPE restoreType)
 
 RexxArray ()
 
 ~RexxArray ()
 
void init (size_t, size_t)
 
void live (size_t)
 
void liveGeneral (int reason)
 
void flatten (RexxEnvelope *)
 
RexxObjectcopy ()
 
RexxArraymakeArray ()
 
RexxArrayallItems ()
 
RexxArrayallIndexes ()
 
RexxStringtoString (RexxString *, RexxString *)
 
RexxStringmakeString (RexxString *, RexxString *)
 
RexxObjectgetRexx (RexxObject **, size_t)
 
RexxObjectgetApi (size_t pos)
 
void put (RexxObject *eref, size_t pos)
 
RexxObjectputRexx (RexxObject **, size_t)
 
void putApi (RexxObject *eref, size_t pos)
 
RexxObjectremove (size_t)
 
RexxObjectremoveRexx (RexxObject **, size_t)
 
RexxObjectappendRexx (RexxObject *)
 
size_t append (RexxObject *)
 
void setExpansion (RexxObject *expansion)
 
RexxIntegeravailable (size_t position)
 
bool validateIndex (RexxObject **, size_t, size_t, size_t, stringsize_t &)
 
RexxIntegersizeRexx ()
 
RexxObjectfirstRexx ()
 
RexxObjectlastRexx ()
 
RexxObjectfirstItem ()
 
RexxObjectlastItem ()
 
size_t lastIndex ()
 
RexxObjectnextRexx (RexxObject **, size_t)
 
RexxObjectpreviousRexx (RexxObject **, size_t)
 
RexxArraysection (size_t, size_t)
 
RexxObjectsectionRexx (RexxObject *, RexxObject *)
 
RexxObjectsectionSubclass (size_t, size_t)
 
bool hasIndexNative (size_t)
 
RexxObjecthasIndexRexx (RexxObject **, size_t)
 
bool hasIndexApi (size_t)
 
size_t items ()
 
RexxObjectitemsRexx ()
 
RexxObjectdimension (RexxObject *)
 
RexxObjectgetDimensions ()
 
size_t getDimension ()
 
RexxObjectsupplier ()
 
RexxObjectjoin (RexxArray *)
 
RexxArrayextend (size_t)
 
void shrink (size_t)
 
size_t indexOf (RexxObject *)
 
RexxArrayextendMulti (RexxObject **, size_t, size_t)
 
void resize ()
 
void ensureSpace (size_t newSize)
 
RexxObjectnewRexx (RexxObject **, size_t)
 
RexxObjectof (RexxObject **, size_t)
 
RexxObjectempty ()
 
RexxObjectisEmpty ()
 
RexxObjectfill (RexxObject *)
 
RexxObjectindex (RexxObject *)
 
RexxObjecthasItem (RexxObject *)
 
RexxObjectremoveItem (RexxObject *)
 
wholenumber_t sortCompare (RexxObject *comparator, RexxObject *left, RexxObject *right)
 
RexxArraystableSortRexx ()
 
RexxArraystableSortWithRexx (RexxObject *comparator)
 
RexxObjectinsertRexx (RexxObject *_value, RexxObject *index)
 
size_t insert (RexxObject *_value, size_t index)
 
RexxObjectdeleteRexx (RexxObject *index)
 
RexxObjectdeleteItem (size_t index)
 
size_t addLast (RexxObject *item)
 
size_t addFirst (RexxObject *item)
 
size_t insertAfter (RexxObject *item, size_t index)
 
RexxArrayarray ()
 
size_t size ()
 
RexxObjectget (size_t pos)
 
RexxObject ** data ()
 
RexxObject ** data (size_t pos)
 
RexxArraygetExpansion ()
 
size_t findSingleIndexItem (RexxObject *item)
 
RexxObjectindexToArray (size_t idx)
 
RexxObjectconvertIndex (size_t idx)
 
bool isMultiDimensional ()
 
bool isSingleDimensional ()
 
- Public Member Functions inherited from RexxObject
void * operator new (size_t, RexxClass *)
 
void * operator new (size_t, RexxClass *, RexxObject **, size_t)
 
void * operator new (size_t size, void *objectPtr)
 
void operator delete (void *, void *)
 
void operator delete (void *)
 
void operator delete (void *, RexxClass *)
 
void operator delete (void *, RexxClass *, RexxObject **, size_t)
 
RexxObjectnewRexx (RexxObject **arguments, size_t argCount)
 
RexxObjectnewObject ()
 
 operator RexxInternalObject * ()
 
 RexxObject ()
 
 RexxObject (RESTORETYPE restoreType)
 
void initializeNewObject (size_t size, size_t mark, void *vft, RexxBehaviour *b)
 
void initializeNewObject (size_t mark, void *vft, RexxBehaviour *b)
 
virtual ~RexxObject ()
 
virtual RexxObjectdefMethod (RexxString *, RexxMethod *, RexxString *a=OREF_NULL)
 
virtual RexxStringdefaultName ()
 
virtual RexxObjectunknown (RexxString *msg, RexxArray *args)
 
virtual RexxIntegerhasMethod (RexxString *msg)
 
bool hasUninitMethod ()
 
RexxObjectinit ()
 
void uninit ()
 
void live (size_t)
 
void liveGeneral (int reason)
 
void flatten (RexxEnvelope *)
 
RexxObjectcopy ()
 
HashCode hash ()
 
bool truthValue (int)
 
virtual bool logicalValue (logical_t &)
 
virtual bool numberValue (wholenumber_t &result, size_t precision)
 
virtual bool numberValue (wholenumber_t &result)
 
virtual bool unsignedNumberValue (stringsize_t &result, size_t precision)
 
virtual bool unsignedNumberValue (stringsize_t &result)
 
virtual bool doubleValue (double &result)
 
RexxNumberStringnumberString ()
 
RexxIntegerintegerValue (size_t)
 
RexxStringmakeString ()
 
RexxStringprimitiveMakeString ()
 
void copyIntoTail (RexxCompoundTail *buffer)
 
RexxArraymakeArray ()
 
RexxStringstringValue ()
 
RexxStringrequestString ()
 
RexxStringrequestStringNoNOSTRING ()
 
RexxIntegerrequestInteger (size_t)
 
bool requestNumber (wholenumber_t &, size_t)
 
bool requestUnsignedNumber (stringsize_t &, size_t)
 
RexxArrayrequestArray ()
 
RexxStringrequiredString (size_t)
 
RexxStringrequiredString (const char *)
 
RexxStringrequiredString ()
 
RexxIntegerrequiredInteger (size_t, size_t)
 
wholenumber_t requiredNumber (size_t position, size_t precision=Numerics::ARGUMENT_DIGITS)
 
stringsize_t requiredPositive (size_t position, size_t precision=Numerics::ARGUMENT_DIGITS)
 
stringsize_t requiredNonNegative (size_t position, size_t precision=Numerics::ARGUMENT_DIGITS)
 
bool isEqual (RexxObject *)
 
bool isInstanceOf (RexxClass *)
 
RexxObjectisInstanceOfRexx (RexxClass *)
 
RexxMethodinstanceMethod (RexxString *)
 
RexxSupplierinstanceMethods (RexxClass *)
 
RexxMethodinstanceMethodRexx (RexxString *)
 
RexxSupplierinstanceMethodsRexx (RexxClass *)
 
RexxStringobjectName ()
 
RexxObjectobjectNameEquals (RexxObject *)
 
RexxClassclassObject ()
 
RexxObjectsetMethod (RexxString *, RexxMethod *, RexxString *a=OREF_NULL)
 
RexxObjectunsetMethod (RexxString *)
 
RexxObjectrequestRexx (RexxString *)
 
RexxMessagestart (RexxObject **, size_t)
 
RexxMessagestartWith (RexxObject *, RexxArray *)
 
RexxObjectsend (RexxObject **, size_t)
 
RexxObjectsendWith (RexxObject *, RexxArray *)
 
RexxMessagestartCommon (RexxObject *message, RexxObject **arguments, size_t argCount)
 
RexxStringoref ()
 
RexxObjectpmdict ()
 
RexxObjectrun (RexxObject **, size_t)
 
void messageSend (RexxString *, RexxObject **, size_t, ProtectedObject &)
 
void messageSend (RexxString *, RexxObject **, size_t, RexxObject *, ProtectedObject &)
 
RexxMethodcheckPrivate (RexxMethod *)
 
void processUnknown (RexxString *, RexxObject **, size_t, ProtectedObject &)
 
void processProtectedMethod (RexxString *, RexxMethod *, RexxObject **, size_t, ProtectedObject &)
 
void sendMessage (RexxString *, RexxArray *, ProtectedObject &)
 
void sendMessage (RexxString *message, ProtectedObject &result)
 
void sendMessage (RexxString *message, RexxObject **args, size_t argCount, ProtectedObject &result)
 
void sendMessage (RexxString *message, RexxObject *argument1, ProtectedObject &result)
 
void sendMessage (RexxString *, RexxObject *, RexxObject *, ProtectedObject &)
 
void sendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, ProtectedObject &)
 
void sendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, RexxObject *, ProtectedObject &)
 
void sendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, RexxObject *, RexxObject *, ProtectedObject &)
 
RexxObjectsendMessage (RexxString *, RexxArray *)
 
RexxObjectsendMessage (RexxString *message)
 
RexxObjectsendMessage (RexxString *message, RexxObject **args, size_t argCount)
 
RexxObjectsendMessage (RexxString *message, RexxObject *argument1)
 
RexxObjectsendMessage (RexxString *, RexxObject *, RexxObject *)
 
RexxObjectsendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *)
 
RexxObjectsendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, RexxObject *)
 
RexxObjectsendMessage (RexxString *, RexxObject *, RexxObject *, RexxObject *, RexxObject *, RexxObject *)
 
RexxObjectdefMethods (RexxDirectory *)
 
void setObjectVariable (RexxString *, RexxObject *, RexxObject *)
 
RexxObjectgetObjectVariable (RexxString *)
 
RexxObjectgetObjectVariable (RexxString *, RexxObject *)
 
void addObjectVariables (RexxVariableDictionary *)
 
void copyObjectVariables (RexxObject *newObject)
 
RexxObjectsuperScope (RexxObject *)
 
RexxMethodsuperMethod (RexxString *, RexxObject *)
 
RexxObjectmdict ()
 
RexxObjectsetMdict (RexxObject *)
 
RexxBehaviourbehaviourObject ()
 
const char * idString ()
 
RexxStringid ()
 
RexxMethodmethodLookup (RexxString *name)
 
RexxVariableDictionarygetObjectVariables (RexxObject *)
 
void guardOn (RexxActivity *activity, RexxObject *scope)
 
void guardOff (RexxActivity *activity, RexxObject *scope)
 
RexxObjectequal (RexxObject *)
 
RexxObjectnotEqual (RexxObject *other)
 
RexxObjectstrictEqual (RexxObject *)
 
RexxObjectstrictNotEqual (RexxObject *other)
 
RexxIntegeridentityHashRexx ()
 
RexxObjecthashCode ()
 
RexxStringstringRexx ()
 
RexxStringconcatRexx (RexxObject *)
 
RexxStringconcatBlank (RexxObject *)
 
RexxObjectmakeStringRexx ()
 
RexxObjectmakeArrayRexx ()
 
RexxStringdefaultNameRexx ()
 
RexxObjectcopyRexx ()
 
RexxObjectunknownRexx (RexxString *, RexxArray *)
 
RexxObjecthasMethodRexx (RexxString *)
 
void * getCSelf ()
 
void * getCSelf (RexxObject *scope)
 
bool equalValue (RexxObject *other)
 
virtual wholenumber_t compareTo (RexxObject *)
 
 koper (operator_plus) koper(operator_minus) koper(operator_multiply) koper(operator_divide) koper(operator_integerDivide) koper(operator_remainder) koper(operator_power) koper(operator_abuttal) koper(operator_concat) koper(operator_concatBlank) koper(operator_equal) koper(operator_notEqual) koper(operator_isGreaterThan) koper(operator_isBackslashGreaterThan) koper(operator_isLessThan) koper(operator_isBackslashLessThan) koper(operator_isGreaterOrEqual) koper(operator_isLessOrEqual) koper(operator_strictEqual) koper(operator_strictNotEqual) koper(operator_strictGreaterThan) koper(operator_strictBackslashGreaterThan) koper(operator_strictLessThan) koper(operator_strictBackslashLessThan) koper(operator_strictGreaterOrEqual) koper(operator_strictLessOrEqual) koper(operator_lessThanGreaterThan) koper(operator_greaterThanLessThan) koper(operator_and) koper(operator_or) koper(operator_xor) koper(operator_not) RexxVariableDictionary *objectVariables
 
- Public Member Functions inherited from RexxInternalObject
void * operator new (size_t, RexxClass *)
 
void * operator new (size_t, RexxClass *, RexxObject **, size_t)
 
void * operator new (size_t size, void *ptr)
 
void operator delete (void *)
 
void operator delete (void *p, void *ptr)
 
 RexxInternalObject ()
 
 RexxInternalObject (RESTORETYPE restoreType)
 
virtual ~RexxInternalObject ()
 
 operator RexxObject * ()
 
size_t getObjectSize ()
 
void setObjectSize (size_t s)
 
size_t getObjectDataSize ()
 
void * getObjectDataSpace ()
 
void clearObject ()
 
void clearObject (size_t l)
 
void setVirtualFunctions (void *t)
 
void setInitHeader (size_t s, size_t markword)
 
void setInitHeader (size_t markword)
 
void setObjectLive (size_t markword)
 
void setHasReferences ()
 
void setHasNoReferences ()
 
bool hasReferences ()
 
bool hasNoReferences ()
 
void setPrimitive ()
 
void setNonPrimitive ()
 
bool isPrimitive ()
 
bool isNonPrimitive ()
 
bool isObjectMarked (size_t markword)
 
void setObjectMark (size_t markword)
 
void clearObjectMark ()
 
bool isObjectLive (size_t mark)
 
bool isObjectDead (size_t mark)
 
bool isOldSpace ()
 
bool isNewSpace ()
 
void setNewSpace ()
 
void setOldSpace ()
 
void makeProxiedObject ()
 
bool isProxyObject ()
 
bool isSubClassOrEnhanced ()
 
bool isBaseClass ()
 
size_t getObjectTypeNumber ()
 
RexxBehaviourgetObjectType ()
 
bool isObjectType (RexxBehaviour *b)
 
bool isObjectType (size_t t)
 
bool isSameType (RexxInternalObject *o)
 
void setBehaviour (RexxBehaviour *b)
 
virtual RexxObjectmakeProxy (RexxEnvelope *)
 
virtual RexxObjectevaluate (RexxActivation *, RexxExpressionStack *)
 
virtual RexxObjectgetValue (RexxActivation *)
 
virtual RexxObjectgetValue (RexxVariableDictionary *)
 
virtual RexxObjectgetRealValue (RexxActivation *)
 
virtual RexxObjectgetRealValue (RexxVariableDictionary *)
 
virtual HashCode getHashValue ()
 
HashCode identityHash ()
 
void hasUninit ()
 
void removedUninit ()
 
void printObject ()
 
RexxObjectclone ()
 
- Public Member Functions inherited from RexxVirtualBase
virtual RexxObjectunflatten (RexxEnvelope *)
 

Static Public Member Functions

static RexxArraycreateMultidimensional (RexxObject **dims, size_t count, RexxClass *)
 
static void createInstance ()
 
- Static Public Member Functions inherited from RexxObject
static void decodeMessageName (RexxObject *target, RexxObject *message, RexxString *&messageName, RexxObject *&startScope)
 
static void createInstance ()
 
- Static Public Member Functions inherited from RexxInternalObject
static size_t getObjectHeaderSize ()
 

Static Public Attributes

static RexxClassclassInstance = OREF_NULL
 
static RexxArraynullArray = OREF_NULL
 
static const size_t ARRAY_MIN_SIZE = 4
 
static const size_t ARRAY_DEFAULT_SIZE = 10
 
- Static Public Attributes inherited from RexxObject
static PCPPM operatorMethods []
 
static RexxClassclassInstance = OREF_NULL
 

Protected Member Functions

void mergeSort (BaseSortComparator &comparator, RexxArray *working, size_t left, size_t right)
 
void merge (BaseSortComparator &comparator, RexxArray *working, size_t left, size_t mid, size_t right)
 
size_t find (BaseSortComparator &comparator, RexxObject *val, int bnd, size_t left, size_t right)
 
void openGap (size_t index, size_t elements)
 
void closeGap (size_t index, size_t elements)
 
RexxObject ** slotAddress (size_t index)
 
size_t dataSize ()
 
- Protected Member Functions inherited from RexxVirtualBase
virtual ~RexxVirtualBase ()
 
virtual void baseVirtual ()
 

Static Protected Member Functions

static void arraycopy (RexxArray *source, size_t start, RexxArray *target, size_t index, size_t count)
 

Protected Attributes

size_t arraySize
 
size_t maximumSize
 
size_t lastElement
 
RexxArraydimensions
 
RexxArrayexpansionArray
 
RexxObjectobjects [1]
 

Static Protected Attributes

static const size_t MAX_FIXEDARRAY_SIZE = (Numerics::MAX_WHOLENUMBER/10) + 1
 

Additional Inherited Members

- Public Attributes inherited from RexxInternalObject
ObjectHeader header
 
RexxBehaviourbehaviour
 

Detailed Description

Definition at line 100 of file ArrayClass.hpp.

Constructor & Destructor Documentation

◆ RexxArray() [1/2]

RexxArray::RexxArray ( RESTORETYPE  restoreType)
inline

Definition at line 123 of file ArrayClass.hpp.

◆ RexxArray() [2/2]

RexxArray::RexxArray ( )
inline

Definition at line 124 of file ArrayClass.hpp.

Referenced by newRexx().

◆ ~RexxArray()

RexxArray::~RexxArray ( )
inline

Definition at line 125 of file ArrayClass.hpp.

Member Function Documentation

◆ addFirst()

size_t RexxArray::addFirst ( RexxObject item)
inline

Definition at line 197 of file ArrayClass.hpp.

References insert().

Referenced by RexxClass::newRexx(), RexxClass::setMetaClass(), and RexxClass::subclass().

◆ addLast()

size_t RexxArray::addLast ( RexxObject item)
inline

Definition at line 196 of file ArrayClass.hpp.

References insert(), and size().

Referenced by RexxClass::inherit(), and RexxClass::subClassable().

◆ allIndexes()

RexxArray * RexxArray::allIndexes ( )

Return an array of all indices of real array items contained in the collection.

Returns
An array with all of the array indices (non-sparse).

Definition at line 1486 of file ArrayClass.cpp.

References convertIndex(), data(), items(), new_array(), OREF_NULL, put(), and size().

Referenced by RexxMemory::createImage().

◆ allItems()

RexxArray * RexxArray::allItems ( void  )

Return an array of all real items contained in the collection.

Returns
An array with all of the array items (non-sparse).

Definition at line 1459 of file ArrayClass.cpp.

References data(), items(), new_array(), OREF_NULL, put(), and size().

Referenced by RexxMemory::createImage(), and makeArray().

◆ append()

size_t RexxArray::append ( RexxObject value)

Append an item after the last item in the array.

Parameters
valueThe value to append.
Returns
The index of the appended item.

Definition at line 482 of file ArrayClass.cpp.

References ensureSpace(), lastElement, and put().

Referenced by RexxActivity::generateStackFrames(), StringUtil::subWords(), and StringUtil::words().

◆ appendRexx()

RexxObject * RexxArray::appendRexx ( RexxObject value)

Append an item after the last item in the array.

Parameters
valueThe value to append.
Returns
The index of the appended item.

Definition at line 308 of file ArrayClass.cpp.

References ARG_ONE, CHAR_APPEND, ensureSpace(), Error_Incorrect_method_array_dimension, isMultiDimensional(), lastElement, new_integer(), put(), reportException(), and requiredArgument().

Referenced by RexxMemory::createImage().

◆ array()

RexxArray* RexxArray::array ( )
inline

Definition at line 199 of file ArrayClass.hpp.

References makeArray().

◆ arraycopy()

void RexxArray::arraycopy ( RexxArray source,
size_t  start,
RexxArray target,
size_t  index,
size_t  count 
)
staticprotected

copy segments of one array into another.

Parameters
sourceThe source array
startThe starting index of the source copy
targetThe target array
indexThe target copy index
countThe number of items to count.

Definition at line 2485 of file ArrayClass.cpp.

References get(), index(), put(), and RexxObject::start().

Referenced by merge().

◆ available()

RexxInteger * RexxArray::available ( size_t  position)

Definition at line 823 of file ArrayClass.cpp.

References size(), TheFalseObject, and TheTrueObject.

◆ closeGap()

void RexxArray::closeGap ( size_t  index,
size_t  elements 
)
protected

Close a gap in the array item.

Parameters
indexThe gap to close.
elementsThe size of the gap to close.

Definition at line 444 of file ArrayClass.cpp.

References index(), lastElement, Numerics::minVal(), OREF_NULL, put(), shrink(), size(), and slotAddress().

Referenced by deleteItem().

◆ convertIndex()

RexxObject * RexxArray::convertIndex ( size_t  idx)

Convert an internal index item into "external" form. Handles both single- and multi-dimensional arrays.

Parameters
idxThe internal index to convert.
Returns
An index object proper for the array type.

Definition at line 1791 of file ArrayClass.cpp.

References indexToArray(), isSingleDimensional(), and new_integer().

Referenced by allIndexes(), firstRexx(), index(), lastRexx(), nextRexx(), previousRexx(), and supplier().

◆ copy()

RexxObject * RexxArray::copy ( void  )
virtual

Copy the array (and the expansion array, if necessary)

Returns
A copy of the array object.

Reimplemented from RexxInternalObject.

Definition at line 120 of file ArrayClass.cpp.

References copy(), RexxObject::copy(), expansionArray, OREF_NULL, and setExpansion().

Referenced by RexxMessage::arguments(), copy(), getDimensions(), RexxClass::getSuperClasses(), and RexxClass::newRexx().

◆ createInstance()

void RexxArray::createInstance ( )
static

Create initial class object at bootstrap time.

Definition at line 93 of file ArrayClass.cpp.

References CLASS_CREATE, new_array(), and nullArray.

Referenced by RexxMemory::createImage().

◆ createMultidimensional()

RexxArray * RexxArray::createMultidimensional ( RexxObject **  dims,
size_t  count,
RexxClass arrayClass 
)
static

Helper routine for creating a multidimensional array.

Parameters
dimsPointer to an array of pointers to dimension objects.
countthe number of dimensions to create
Returns
The created array

Definition at line 2316 of file ArrayClass.cpp.

References dimensions, Error_Incorrect_method_array_too_big, MAX_FIXEDARRAY_SIZE, missingArgument(), new_array(), new_externalArray(), new_integer(), OREF_NULL, OrefSet, put(), reportException(), RexxObject::requiredNonNegative(), and RexxObject::sendMessage().

Referenced by operator new().

◆ data() [1/2]

◆ data() [2/2]

RexxObject** RexxArray::data ( size_t  pos)
inline

Definition at line 203 of file ArrayClass.hpp.

References data().

Referenced by data().

◆ dataSize()

size_t RexxArray::dataSize ( )
inlineprotected

Definition at line 231 of file ArrayClass.hpp.

References data(), size(), and slotAddress().

Referenced by extend(), and join().

◆ deleteItem()

RexxObject * RexxArray::deleteItem ( size_t  _index)

Insert an element into the array, shifting all of the existing elements at the inserted position and adjusting the size accordingly.

Parameters
valueThe value to insert (can be OREF_NULL to just open a new slot)
_indexThe insertion index position.
Returns
The index of the inserted item.

Definition at line 2216 of file ArrayClass.cpp.

References closeGap(), get(), OREF_NULL, and TheNilObject.

Referenced by deleteRexx(), and RexxClass::uninherit().

◆ deleteRexx()

RexxObject * RexxArray::deleteRexx ( RexxObject index)

Delete an element from the given index location, shifting the item indexes as required.

Parameters
indexThe target index. This can be a single number or an array containing a single number.
Returns
The object that has been deleted. Returns .nil if the target index does not exist.

Definition at line 379 of file ArrayClass.cpp.

References deleteItem(), Error_Incorrect_method_array_dimension, isMultiDimensional(), RaiseBoundsInvalid, RaiseBoundsTooMany, reportException(), and validateIndex().

Referenced by RexxMemory::createImage().

◆ dimension()

◆ empty()

RexxObject * RexxArray::empty ( )

Empty all of the items from an array.

Returns
No return value.

Definition at line 267 of file ArrayClass.cpp.

References data(), RexxInternalObject::isNewSpace(), lastElement, objects, OREF_NULL, OrefSet, and size().

Referenced by RexxMemory::createImage().

◆ ensureSpace()

void RexxArray::ensureSpace ( size_t  newSize)

Make sure that the array has been expanded to sufficient size for a primitive put operation.

Parameters
newSizeThe new required size.

Definition at line 1042 of file ArrayClass.cpp.

References Error_Incorrect_method_array_too_big, extend(), MAX_FIXEDARRAY_SIZE, reportException(), and size().

Referenced by append(), appendRexx(), and openGap().

◆ extend()

RexxArray * RexxArray::extend ( size_t  extension)

◆ extendMulti()

◆ fill()

RexxObject * RexxArray::fill ( RexxObject value)

Fill all locations of the array with the given object

Returns
No return value.

Definition at line 247 of file ArrayClass.cpp.

References ARG_ONE, lastElement, objects, OREF_NULL, OrefSet, requiredArgument(), and size().

Referenced by RexxMemory::createImage().

◆ find()

size_t RexxArray::find ( BaseSortComparator comparator,
RexxObject val,
int  limit,
size_t  left,
size_t  right 
)
protected

Finds the place in the given range of specified sorted array, where the element should be inserted for getting sorted array. Uses exponential search algorithm.

Parameters
comparatorThe comparator used to compare pairs of elements.
valobject to be inserted
limitpossible values 0,-1. "-1" - val is located at index more then elements equals to val. "0" - val is located at index less then elements equals to val.
leftThe left bound of the insert operation.
rightThe right bound for the insert (inclusive)
Returns
The insertion point.

Definition at line 2510 of file ArrayClass.cpp.

References BaseSortComparator::compare(), and get().

Referenced by merge().

◆ findSingleIndexItem()

size_t RexxArray::findSingleIndexItem ( RexxObject item)

Find the index of a single item in the array.

Parameters
itemThe item to locate.
Returns
The numeric index of the item.

Definition at line 1763 of file ArrayClass.cpp.

References RexxObject::equalValue(), get(), OREF_NULL, and size().

Referenced by hasItem(), index(), and removeItem().

◆ firstItem()

RexxObject * RexxArray::firstItem ( )

Return the first item in the array, or .nil if the array is empty.

Returns
The first item in the array

Definition at line 1272 of file ArrayClass.cpp.

References expansionArray, objects, OREF_NULL, size(), and TheNilObject.

Referenced by RexxMemory::createImage().

◆ firstRexx()

RexxObject * RexxArray::firstRexx ( void  )

Definition at line 1224 of file ArrayClass.cpp.

References convertIndex(), expansionArray, objects, OREF_NULL, size(), and TheNilObject.

Referenced by RexxMemory::createImage().

◆ flatten()

void RexxArray::flatten ( RexxEnvelope envelope)
virtual

Reimplemented from RexxVirtualBase.

Definition at line 176 of file ArrayClass.cpp.

References arraySize, cleanUpFlatten, flatten_reference, and setUpFlatten.

◆ get()

RexxObject* RexxArray::get ( size_t  pos)
inline

◆ getApi()

RexxObject * RexxArray::getApi ( size_t  position)

Get an item from the array, with array size sensitivity.

Parameters
positionThe target position.
Returns
The object at the array position. Returns OREF_NULL if there is not item at that position.

Definition at line 533 of file ArrayClass.cpp.

References get(), OREF_NULL, and size().

◆ getDimension()

◆ getDimensions()

RexxObject * RexxArray::getDimensions ( )

Return an array of the dimensions of this array.

Returns
An array item with one size item for each dimension of the array.

Definition at line 711 of file ArrayClass.cpp.

References copy(), dimensions, isSingleDimensional(), new_array(), new_integer(), and size().

Referenced by RexxMemory::createImage().

◆ getExpansion()

RexxArray* RexxArray::getExpansion ( )
inline

Definition at line 204 of file ArrayClass.hpp.

References expansionArray.

◆ getRexx()

RexxObject * RexxArray::getRexx ( RexxObject **  arguments,
size_t  argCount 
)

The Rexx stub for the Array GET method. This does full checking for the array.

Parameters
argumentsThe array of all arguments sent to the method (variable arguments allowed here.)
argCountThe number of arguments in the method call.
Returns
Value at the provided index or .nil if the item does not exist.

Definition at line 503 of file ArrayClass.cpp.

References data(), OREF_NULL, RaiseBoundsInvalid, RaiseBoundsTooMany, TheNilObject, and validateIndex().

Referenced by RexxMemory::createImage().

◆ hasIndexApi()

bool RexxArray::hasIndexApi ( size_t  i)

Determine if an item exists for a given index position.

Parameters
iThe target index.
Returns
Either true or false, depending on whether the item exists.

Definition at line 573 of file ArrayClass.cpp.

References data(), OREF_NULL, and size().

◆ hasIndexNative()

bool RexxArray::hasIndexNative ( size_t  _index)

Definition at line 1427 of file ArrayClass.cpp.

References data(), OREF_NULL, and size().

◆ hasIndexRexx()

RexxObject * RexxArray::hasIndexRexx ( RexxObject **  _index,
size_t  _indexCount 
)

◆ hasItem()

RexxObject * RexxArray::hasItem ( RexxObject target)

Test if an item is within the array.

Parameters
targetThe target test item.
Returns
.true if this item exists in the array. .false if it does not exist.

Definition at line 1902 of file ArrayClass.cpp.

References ARG_ONE, findSingleIndexItem(), requiredArgument(), TheFalseObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ index()

RexxObject * RexxArray::index ( RexxObject target)

Return the index for the first occurrence of the target in the array.

Parameters
targetThe target object.
Returns
The index for the array. For a multi-dimensional array, this returns an array of indices.

Definition at line 1852 of file ArrayClass.cpp.

References ARG_ONE, convertIndex(), findSingleIndexItem(), requiredArgument(), and TheNilObject.

Referenced by arraycopy(), closeGap(), RexxMemory::createImage(), insertAfter(), insertRexx(), and openGap().

◆ indexOf()

size_t RexxArray::indexOf ( RexxObject target)

Definition at line 1696 of file ArrayClass.cpp.

References get(), and size().

Referenced by RexxClass::inherit(), and RexxClass::uninherit().

◆ indexToArray()

RexxObject * RexxArray::indexToArray ( size_t  idx)

Convert a multi-dimensional array index into an array of index values for the flattened dimension.

Parameters
idxThe index to covert.
Returns
An array of the individual index items.

Definition at line 1814 of file ArrayClass.cpp.

References dimensions, get(), RexxInternalObject::getValue(), new_array(), new_integer(), put(), and size().

Referenced by convertIndex().

◆ init()

void RexxArray::init ( size_t  _size,
size_t  maxSize 
)

Initialize an array

Parameters
_sizeThe initial size of the array.
maxSizeThe maximum size this array can hold (maxSize >= size)

Definition at line 106 of file ArrayClass.cpp.

References arraySize, expansionArray, lastElement, maximumSize, and OrefSet.

◆ insert()

size_t RexxArray::insert ( RexxObject value,
size_t  _index 
)

Insert an element into the array, shifting all of the existing elements at the inserted position and adjusting the size accordingly.

Parameters
valueThe value to insert (can be OREF_NULL to just open a new slot)
_indexThe insertion index position. NOTE: Unlike the Rexx version, the index is the position where this value will be inserted, not the index of where it is inserted after.
Returns
The index of the inserted item.

Definition at line 2198 of file ArrayClass.cpp.

References openGap(), and put().

Referenced by addFirst(), addLast(), insertAfter(), and insertRexx().

◆ insertAfter()

size_t RexxArray::insertAfter ( RexxObject item,
size_t  index 
)
inline

Definition at line 198 of file ArrayClass.hpp.

References index(), and insert().

Referenced by RexxClass::inherit().

◆ insertRexx()

RexxObject * RexxArray::insertRexx ( RexxObject _value,
RexxObject index 
)

Insert an element into the given index location.

Parameters
_valueThe value to insert. This can be omitted, which will insert an empty slot at the indicated position.
indexThe target index. This can be .nil, which will insert at the beginning, omitted, which will insert at the end, or a single-dimensional index of the position where the value will be inserted after.
Returns
The index of the inserted valued.

Definition at line 338 of file ArrayClass.cpp.

References Error_Incorrect_method_array_dimension, index(), insert(), isMultiDimensional(), new_integer(), OREF_NULL, RaiseBoundsInvalid, RaiseBoundsTooMany, reportException(), size(), TheNilObject, and validateIndex().

Referenced by RexxMemory::createImage().

◆ isEmpty()

RexxObject * RexxArray::isEmpty ( )

Test if an array is empty.

Returns
True if the array is empty, false otherwise

Definition at line 295 of file ArrayClass.cpp.

References items(), TheFalseObject, and TheTrueObject.

Referenced by RexxMemory::createImage().

◆ isMultiDimensional()

bool RexxArray::isMultiDimensional ( )
inline

Definition at line 209 of file ArrayClass.hpp.

References dimensions, OREF_NULL, and size().

Referenced by appendRexx(), deleteRexx(), insertRexx(), isSingleDimensional(), and sectionRexx().

◆ isSingleDimensional()

bool RexxArray::isSingleDimensional ( )
inline

Definition at line 210 of file ArrayClass.hpp.

References isMultiDimensional().

Referenced by convertIndex(), dimension(), extendMulti(), getDimensions(), and validateIndex().

◆ items()

size_t RexxArray::items ( )

◆ itemsRexx()

RexxObject * RexxArray::itemsRexx ( )

Definition at line 682 of file ArrayClass.cpp.

References items(), and new_integer().

Referenced by RexxMemory::createImage().

◆ join()

RexxObject * RexxArray::join ( RexxArray other)

Definition at line 1630 of file ArrayClass.cpp.

References data(), dataSize(), new_array(), size(), and slotAddress().

Referenced by RexxClause::newToken().

◆ lastIndex()

size_t RexxArray::lastIndex ( )

Definition at line 1310 of file ArrayClass.cpp.

References lastElement.

◆ lastItem()

RexxObject * RexxArray::lastItem ( )

Return the last item in the array.

Returns
The last item, or .nil if the array is empty.

Definition at line 1298 of file ArrayClass.cpp.

References get(), lastElement, and TheNilObject.

Referenced by RexxMemory::createImage().

◆ lastRexx()

RexxObject * RexxArray::lastRexx ( void  )

Definition at line 1251 of file ArrayClass.cpp.

References convertIndex(), lastElement, and TheNilObject.

Referenced by RexxMemory::createImage().

◆ live()

void RexxArray::live ( size_t  liveMark)
virtual

Reimplemented from RexxVirtualBase.

Definition at line 143 of file ArrayClass.cpp.

References arraySize, dimensions, expansionArray, memory_mark, and objects.

◆ liveGeneral()

void RexxArray::liveGeneral ( int  reason)
virtual

Reimplemented from RexxVirtualBase.

Definition at line 161 of file ArrayClass.cpp.

References arraySize, dimensions, expansionArray, memory_mark_general, and objects.

◆ makeArray()

RexxArray * RexxArray::makeArray ( void  )
virtual

Reimplemented from RexxInternalObject.

Definition at line 1443 of file ArrayClass.cpp.

References allItems().

Referenced by array(), RexxInstructionDo::execute(), and toString().

◆ makeString()

RexxString * RexxArray::makeString ( RexxString format,
RexxString separator 
)

Definition at line 1519 of file ArrayClass.cpp.

References toString().

Referenced by RexxMethod::newMethodObject(), and RoutineClass::newRoutineObject().

◆ merge()

void RexxArray::merge ( BaseSortComparator comparator,
RexxArray working,
size_t  left,
size_t  mid,
size_t  right 
)
protected

Perform the merge operation on two partitions.

Parameters
comparatorThe comparator used to produce the ordering.
workingThe temporary working storage.
leftThe left bound of the range.
midThe midpoint of the range. This merges the two partitions (left, mid - 1) and (mid, right).
rightThe right bound of the array.

Definition at line 2407 of file ArrayClass.cpp.

References arraycopy(), BaseSortComparator::compare(), find(), get(), and put().

Referenced by mergeSort().

◆ mergeSort()

void RexxArray::mergeSort ( BaseSortComparator comparator,
RexxArray working,
size_t  left,
size_t  right 
)
protected

The merge sort routine. This will partition the data in to two sections, mergesort each partition, then merge the two partitions together.

Parameters
comparatorThe comparator object used for the compares.
workingThe working array (same size as the sorted array).
leftThe left bound of the partition.
rightThe right bounds of the parition (inclusive).

Definition at line 2371 of file ArrayClass.cpp.

References BaseSortComparator::compare(), get(), merge(), and put().

Referenced by stableSortRexx(), and stableSortWithRexx().

◆ newRexx()

RexxObject * RexxArray::newRexx ( RexxObject **  arguments,
size_t  argCount 
)

Definition at line 2730 of file ArrayClass.cpp.

References RexxArray().

Referenced by RexxMemory::createImage().

◆ nextRexx()

RexxObject * RexxArray::nextRexx ( RexxObject **  arguments,
size_t  argCount 
)

◆ of()

RexxObject * RexxArray::of ( RexxObject **  args,
size_t  argCount 
)

◆ openGap()

void RexxArray::openGap ( size_t  index,
size_t  elements 
)
protected

Open a gap in the array by shifting each element to the right starting at the given index.

Parameters
indexThe index of the first item to shift.
elementsThe number of elements to shift.

Definition at line 406 of file ArrayClass.cpp.

References data(), ensureSpace(), index(), lastElement, OREF_NULL, size(), and slotAddress().

Referenced by insert().

◆ operator delete() [1/10]

void RexxArray::operator delete ( void *  )
inline

Definition at line 112 of file ArrayClass.hpp.

◆ operator delete() [2/10]

void RexxArray::operator delete ( void *  ,
RexxObject  
)
inline

Definition at line 115 of file ArrayClass.hpp.

◆ operator delete() [3/10]

void RexxArray::operator delete ( void *  ,
RexxObject **   
)
inline

Definition at line 121 of file ArrayClass.hpp.

◆ operator delete() [4/10]

void RexxArray::operator delete ( void *  ,
RexxObject **  ,
size_t  ,
RexxClass  
)
inline

Definition at line 114 of file ArrayClass.hpp.

◆ operator delete() [5/10]

void RexxArray::operator delete ( void *  ,
RexxObject ,
RexxObject  
)
inline

Definition at line 116 of file ArrayClass.hpp.

◆ operator delete() [6/10]

void RexxArray::operator delete ( void *  ,
RexxObject ,
RexxObject ,
RexxObject  
)
inline

Definition at line 117 of file ArrayClass.hpp.

◆ operator delete() [7/10]

void RexxArray::operator delete ( void *  ,
RexxObject ,
RexxObject ,
RexxObject ,
RexxObject  
)
inline

Definition at line 118 of file ArrayClass.hpp.

◆ operator delete() [8/10]

void RexxArray::operator delete ( void *  ,
size_t  ,
RexxObject **   
)
inline

Definition at line 119 of file ArrayClass.hpp.

◆ operator delete() [9/10]

void RexxArray::operator delete ( void *  ,
size_t  ,
size_t  ,
RexxClass cls 
)
inline

Definition at line 120 of file ArrayClass.hpp.

◆ operator delete() [10/10]

void RexxArray::operator delete ( void *  ,
void *   
)
inline

Definition at line 113 of file ArrayClass.hpp.

◆ operator new() [1/8]

void* RexxArray::operator new ( size_t  size,
void *  objectPtr 
)
inline

Definition at line 103 of file ArrayClass.hpp.

◆ operator new() [2/8]

void * RexxArray::operator new ( size_t  size,
RexxObject first 
)

Definition at line 2630 of file ArrayClass.cpp.

References new_array(), and put().

◆ operator new() [3/8]

◆ operator new() [4/8]

void * RexxArray::operator new ( size_t  size,
RexxObject first,
RexxObject second 
)

Definition at line 2643 of file ArrayClass.cpp.

References new_array(), and put().

◆ operator new() [5/8]

void * RexxArray::operator new ( size_t  size,
RexxObject first,
RexxObject second,
RexxObject third 
)

Definition at line 2653 of file ArrayClass.cpp.

References new_array(), and put().

◆ operator new() [6/8]

void * RexxArray::operator new ( size_t  size,
RexxObject first,
RexxObject second,
RexxObject third,
RexxObject fourth 
)

Definition at line 2671 of file ArrayClass.cpp.

References new_array(), and put().

◆ operator new() [7/8]

void * RexxArray::operator new ( size_t  size,
size_t  items,
RexxObject **  first 
)

Definition at line 2225 of file ArrayClass.cpp.

References data(), get(), lastElement, new_array(), and OREF_NULL.

◆ operator new() [8/8]

void * RexxArray::operator new ( size_t  newSize,
size_t  size,
size_t  maxSize,
RexxClass cls = TheArrayClass 
)

Definition at line 2691 of file ArrayClass.cpp.

References new_object(), and RexxInternalObject::setBehaviour().

◆ previousRexx()

RexxObject * RexxArray::previousRexx ( RexxObject **  arguments,
size_t  argCount 
)

◆ put()

void RexxArray::put ( RexxObject eref,
size_t  pos 
)

Place an object into the array. Note: This version does not do any bounds checking. The caller is responsible for ensuring there is sufficient space.

Parameters
erefThe object to add.
posThe index of the added item (origin 1)

Definition at line 203 of file ArrayClass.cpp.

References data(), expansionArray, lastElement, and OrefSet.

Referenced by RexxHashTable::allIndex(), RexxQueue::allIndexes(), RexxList::allIndexes(), RexxDirectory::allIndexes(), RexxHashTable::allIndexes(), allIndexes(), RexxList::allItems(), RexxDirectory::allItems(), RexxStem::allItems(), RexxHashTable::allItems(), allItems(), append(), appendRexx(), RexxSource::argArray(), arraycopy(), closeGap(), createMultidimensional(), extendMulti(), RexxSource::extractSource(), RexxHashTable::getAll(), PackageManager::getImageData(), RexxBehaviour::getMethods(), indexToArray(), insert(), StringUtil::makearray(), RexxList::makeArrayIndices(), merge(), mergeSort(), RexxMethod::newMethodObject(), RexxMemory::newObjects(), RoutineClass::newRoutineObject(), operator new(), RexxHashTable::primitiveGetAll(), RexxSource::processInstall(), RexxObject::processUnknown(), putApi(), putRexx(), RexxHashTable::removeAll(), removeItem(), RexxStartDispatcher::run(), RexxMemory::saveImage(), sectionRexx(), shrink(), RexxStem::sort(), RexxHashTable::stringGetAll(), RexxRelation::supplier(), RexxStem::supplier(), RexxHashTable::supplier(), supplier(), RexxStem::tailArray(), RexxActivation::trapDelay(), RexxActivation::trapUndelay(), RexxNativeActivation::valuesToObject(), RexxList::weakReferenceArray(), and RexxSource::words().

◆ putApi()

void RexxArray::putApi ( RexxObject o,
size_t  position 
)

Put an array item into an array on behalf of an API. This will extend the array, if necessary, to accomodate the put.

Parameters
oThe inserted object.
positionThe target position.

Definition at line 551 of file ArrayClass.cpp.

References Error_Incorrect_method_array_too_big, extend(), MAX_FIXEDARRAY_SIZE, put(), reportException(), and size().

◆ putRexx()

RexxObject * RexxArray::putRexx ( RexxObject **  arguments,
size_t  argCount 
)

The Rexx stub for the Array PUT method. This does full checking for the array.

Parameters
argumentsThe array of all arguments sent to the method (variable arguments allowed here.)
argCountThe number of arguments in the method call.
Returns
Always return nothing.

Definition at line 222 of file ArrayClass.cpp.

References ARG_ONE, ExtendUpper, missingArgument(), OREF_NULL, put(), RaiseBoundsInvalid, RaiseBoundsTooMany, and validateIndex().

Referenced by RexxMemory::createImage().

◆ remove()

RexxObject * RexxArray::remove ( size_t  _index)

Definition at line 590 of file ArrayClass.cpp.

References data(), expansionArray, lastElement, OREF_NULL, OrefSet, and size().

◆ removeItem()

RexxObject * RexxArray::removeItem ( RexxObject target)

Remove the target object from the collection.

Parameters
targetThe target object.
Returns
The removed object (same as target).

Definition at line 1876 of file ArrayClass.cpp.

References ARG_ONE, findSingleIndexItem(), OREF_NULL, put(), requiredArgument(), and TheNilObject.

Referenced by RexxMemory::createImage().

◆ removeRexx()

RexxObject * RexxArray::removeRexx ( RexxObject **  arguments,
size_t  argCount 
)

◆ resize()

void RexxArray::resize ( void  )

◆ section()

RexxArray * RexxArray::section ( size_t  _start,
size_t  _end 
)

Section an array to the given size.

Parameters
_startThe starting point of the section.
_endThe end section index
Returns
A new array representing the given section.

Definition at line 1075 of file ArrayClass.cpp.

References data(), new_array(), size(), and slotAddress().

◆ sectionRexx()

RexxObject * RexxArray::sectionRexx ( RexxObject _start,
RexxObject _end 
)

Extract a section of the array as another array

Parameters
_startThe starting index position
_endThe number of items to section.
Returns
A new array containing the section elements.

Definition at line 1117 of file ArrayClass.cpp.

References ARG_ONE, ARG_TWO, Error_Incorrect_method_section, get(), isMultiDimensional(), isOfClass, new_array(), OREF_NULL, put(), RaiseBoundsInvalid, RaiseBoundsTooMany, reportException(), requiredArgument(), RexxObject::requiredNonNegative(), sectionSubclass(), size(), TheNullArray, and validateIndex().

Referenced by RexxMemory::createImage().

◆ sectionSubclass()

RexxObject * RexxArray::sectionSubclass ( size_t  _start,
size_t  _end 
)

◆ setExpansion()

void RexxArray::setExpansion ( RexxObject expansion)

Definition at line 815 of file ArrayClass.cpp.

References expansionArray, and OrefSet.

Referenced by copy(), extend(), and extendMulti().

◆ shrink()

void RexxArray::shrink ( size_t  amount)

Definition at line 1677 of file ArrayClass.cpp.

References arraySize, expansionArray, OREF_NULL, put(), and size().

Referenced by closeGap().

◆ size()

size_t RexxArray::size ( )
inline

Definition at line 200 of file ArrayClass.hpp.

References arraySize, and expansionArray.

Referenced by addLast(), allIndexes(), allItems(), RexxSupplier::available(), available(), RoutineClass::callWithRexx(), RexxInstructionDo::checkOver(), closeGap(), copyElements(), RexxClass::createClassBehaviour(), RexxClass::createInstanceBehaviour(), dataSize(), RexxSource::decodeExternalMethod(), RexxObject::decodeMessageName(), dimension(), RexxActivity::display(), empty(), ensureSpace(), RexxInstructionForward::execute(), extend(), extendMulti(), fill(), findSingleIndexItem(), firstItem(), firstRexx(), RexxNativeActivation::forwardMessage(), getApi(), getDimension(), getDimensions(), RexxSource::guardNew(), hasIndexApi(), hasIndexNative(), RexxSupplier::index(), indexOf(), indexToArray(), insertRexx(), RexxClass::isCompatibleWith(), isMultiDimensional(), join(), RexxMethod::loadExternalMethod(), RoutineClass::loadExternalRoutine(), RexxClass::mergeSuperClassScopes(), RexxActivity::messageSubstitution(), RexxMethod::newMethodObject(), RoutineClass::newRoutineObject(), RexxSupplier::next(), nextRexx(), openGap(), previousRexx(), putApi(), remove(), RexxClass::removeClassMethod(), RexxInstructionGuard::RexxInstructionGuard(), RexxSource::RexxSource(), RexxSource::routineDirective(), CallRoutineDispatcher::run(), CallProgramDispatcher::run(), RexxObject::run(), section(), sectionRexx(), sectionSubclass(), RexxMessage::send(), RexxObject::sendMessage(), RexxObject::sendWith(), shrink(), sizeRexx(), RexxObject::startWith(), RexxBehaviour::superMethod(), RexxRelation::supplier(), supplier(), RexxDirectory::unknown(), RexxClass::updateInstanceSubClasses(), RexxClass::updateSubClasses(), validateIndex(), and RexxSupplier::value().

◆ sizeRexx()

RexxInteger * RexxArray::sizeRexx ( )

Definition at line 1059 of file ArrayClass.cpp.

References new_integer(), and size().

Referenced by RexxMemory::createImage().

◆ slotAddress()

RexxObject** RexxArray::slotAddress ( size_t  index)
inlineprotected

Definition at line 230 of file ArrayClass.hpp.

References data().

Referenced by closeGap(), dataSize(), join(), openGap(), and section().

◆ sortCompare()

wholenumber_t RexxArray::sortCompare ( RexxObject comparator,
RexxObject left,
RexxObject right 
)

◆ stableSortRexx()

RexxArray * RexxArray::stableSortRexx ( )

Sort elements of the array in place, using a stable merge sort.

Returns
Returns the same array, with the elements sorted.

Definition at line 2562 of file ArrayClass.cpp.

References Error_Execution_sparse_array, get(), items(), mergeSort(), new_array(), OREF_NULL, and reportException().

Referenced by RexxMemory::createImage().

◆ stableSortWithRexx()

RexxArray * RexxArray::stableSortWithRexx ( RexxObject comparator)

Sort elements of the array in place, using a stable merge sort.

Returns
Returns the same array, with the elements sorted.

Definition at line 2598 of file ArrayClass.cpp.

References ARG_ONE, Error_Execution_sparse_array, get(), items(), mergeSort(), new_array(), OREF_NULL, reportException(), and requiredArgument().

Referenced by RexxMemory::createImage().

◆ supplier()

RexxObject * RexxArray::supplier ( )

Definition at line 783 of file ArrayClass.cpp.

References convertIndex(), get(), items(), new_array(), new_supplier(), OREF_NULL, put(), and size().

Referenced by RexxMemory::createImage().

◆ toString()

◆ validateIndex()

Member Data Documentation

◆ ARRAY_DEFAULT_SIZE

const size_t RexxArray::ARRAY_DEFAULT_SIZE = 10
static

Definition at line 220 of file ArrayClass.hpp.

Referenced by new_externalArray().

◆ ARRAY_MIN_SIZE

const size_t RexxArray::ARRAY_MIN_SIZE = 4
static

Definition at line 219 of file ArrayClass.hpp.

Referenced by new_array().

◆ arraySize

size_t RexxArray::arraySize
protected

Definition at line 236 of file ArrayClass.hpp.

Referenced by extend(), flatten(), init(), items(), live(), liveGeneral(), resize(), shrink(), and size().

◆ classInstance

RexxClass * RexxArray::classInstance = OREF_NULL
static

Definition at line 216 of file ArrayClass.hpp.

◆ dimensions

◆ expansionArray

◆ lastElement

size_t RexxArray::lastElement
protected

◆ MAX_FIXEDARRAY_SIZE

const size_t RexxArray::MAX_FIXEDARRAY_SIZE = (Numerics::MAX_WHOLENUMBER/10) + 1
staticprotected

Definition at line 234 of file ArrayClass.hpp.

Referenced by createMultidimensional(), ensureSpace(), putApi(), and validateIndex().

◆ maximumSize

size_t RexxArray::maximumSize
protected

Definition at line 237 of file ArrayClass.hpp.

Referenced by extend(), extendMulti(), and init().

◆ nullArray

RexxArray * RexxArray::nullArray = OREF_NULL
static

Definition at line 217 of file ArrayClass.hpp.

Referenced by createInstance().

◆ objects

RexxObject* RexxArray::objects[1]
protected

The documentation for this class was generated from the following files: