72 return (value == other) || value->
isEqual(other);
86 if (bucketSize % 2 == 0)
96 newHash->
size = bucketSize;
103 size_t companionSize,
121 if (bucketSize % 2 == 0)
134 newHash = (
RexxHashTable *)(((
char *)newObj) + companionSize);
145 newHash->
size = bucketSize;
165 for (ep = this->
entries, endp = ep + count; ep < endp; ep++)
203 for (
size_t i=0; i < count ; i++)
290 if (position > this->
free)
292 this->
free = position;
310 if (this->
free < _next)
366 if (position > this->
free)
368 this->
free = position;
387 if (this->
free < _next)
442 if (position > this->
free)
444 this->
free = position;
462 if (this->
free < _next)
528 if (this->
free < _next)
594 if (this->
free < _next)
692 for (; ep < endp; ep++)
723 for (; ep < endp; ep++)
755 for (; ep < endp; ep++)
760 if (_value == ep->
value)
988 if (_index == entry || entry->
memCompare(data, length))
1009 if (_index == entry || entry->
memCompare(data, length))
1180 for (over = this->
free;
1199 primeEntry->
next = over;
1200 this->
free = over-1;
1243 newHash->
insert(_value, _index, position,
type);
1289 if (_index == entry || entry->
memCompare(data, length))
1321 if (_index == entry || entry->
memCompare(data, length))
1683 if (position > this->
free)
1685 this->
free = position;
1713 return items() == 0;
1779 size_t count =
items();
1834 newHash = expandHash;
RexxArray * new_array(size_t s)
#define TheHashTableBehaviour
bool EQUAL_VALUE(RexxObject *value, RexxObject *other)
RexxHashTable * new_hashtab(size_t s)
#define memory_mark(oref)
RexxObject * new_object(size_t s)
#define flatten_reference(oref, envel)
size_t roundObjectBoundary(size_t n)
#define memory_mark_general(oref)
#define setUpFlatten(type)
RexxSupplier * new_supplier(RexxArray *c, RexxArray *f)
void put(RexxObject *eref, size_t pos)
virtual RexxObject * mergeItem(RexxObject *, RexxObject *)
virtual RexxObject * put(RexxObject *, RexxObject *)
RexxSupplier * supplier()
size_t countAll(RexxObject *key)
RexxHashTable * add(RexxObject *value, RexxObject *key)
RexxObject * primitiveGet(RexxObject *key)
RexxObject * primitiveRemoveItem(RexxObject *value, RexxObject *key)
RexxObject * primitiveRemove(RexxObject *key)
RexxObject * getIndex(RexxObject *value)
RexxHashTable * primitiveAdd(RexxObject *value, RexxObject *key)
RexxObject * merge(RexxHashTableCollection *target)
RexxArray * getAll(RexxObject *key)
RexxArray * primitiveGetAll(RexxObject *key)
RexxHashTable * stringPut(RexxObject *value, RexxString *key)
void reMerge(RexxHashTable *target)
RexxObject * index(HashLink position)
RexxHashTable * putNodupe(RexxObject *value, RexxObject *key)
void primitiveMerge(RexxHashTable *target)
RexxObject * nextItem(RexxObject *, RexxObject *)
HashLink hashIndex(RexxObject *obj)
RexxObject * primitiveHasItem(RexxObject *, RexxObject *)
RexxObject * stringMerge(RexxHashTable *target)
RexxHashTable * primitivePut(RexxObject *value, RexxObject *key)
RexxHashTable * stringAdd(RexxObject *value, RexxString *key)
void liveGeneral(int reason)
RexxHashTable * put(RexxObject *value, RexxObject *key)
HashLink hashPrimitiveIndex(RexxObject *obj)
RexxArray * uniqueIndexes()
RexxObject * hasItem(RexxObject *value, RexxObject *key)
RexxObject * mergeItem(RexxObject *value, RexxObject *index)
RexxObject * primitiveNextItem(RexxObject *, RexxObject *)
RexxObject * remove(RexxObject *key)
RexxObject * removeItem(RexxObject *value, RexxObject *key)
HashLink hashStringIndex(RexxObject *obj)
static RexxTable * newInstance(size_t, size_t, size_t)
RexxObject * get(RexxObject *key)
RexxObject * primitiveGetIndex(RexxObject *value)
RexxObject * value(HashLink position)
RexxArray * stringGetAll(RexxString *key)
RexxHashTable * insert(RexxObject *value, RexxObject *index, HashLink position, int type)
RexxObject * stringGet(RexxString *key)
RexxObject * removeAll(RexxObject *key)
HashLink next(HashLink position)
RexxArray * allIndex(RexxObject *key)
void flatten(RexxEnvelope *)
RexxObject * replace(RexxObject *value, HashLink position)
void setObjectSize(size_t s)
static void * virtualFunctionTable[]
bool isEqual(RexxObject *)
const char * getStringData()
bool memCompare(const char *s, size_t l)