|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Object
|
+--org.abora.gold.java.AboraHeaper
|
+--org.abora.gold.xpp.basic.Heaper
|
+--org.abora.gold.collection.basic.PrimArray
Array objects in smalltalk vary in size, while in x++ the allocate separate storage for the varying part. Thus they require very different Recipes. Recipes are normally registered by the class'' associated Recipe class at its own initialization time. In smalltalk, the Array classes share a common Recipe class, (STArrayRecipe), which registers an instance of itself for each appropriate concrete subclass of PrimArray.X. (WeakPtrArrays are not in the browser because they currently have no clients and may disappear.)
| Field Summary | |
protected static int |
OurGutsCount
in units of PrimArrayHeap allocation |
| Fields inherited from class org.abora.gold.xpp.basic.Heaper |
AllBlasts, BecomeMap, GarbageCount, InGC, InitializedClasses, InitializingClasses, LastMemory, NextClientRequestNumber, NotOneElementSignal, PackageTable, PromiseNameTable, StringHashSBoxes |
| Fields inherited from class org.abora.gold.java.AboraHeaper |
ActiveClubs, CurrentAuthor, CurrentBertCanopyCache, CurrentBertCrum, CurrentChunk, CurrentGrandMap, CurrentKeyMaster, CurrentPacker, CurrentSensorCanopyCache, CurrentServer, CurrentSession, CurrentSessions, CurrentTrace, InitialEditClub, InitialOwner, InitialReadClub, InitialSponsor, InsideTransactionFlag |
| Constructor Summary | |
protected |
PrimArray(int count,
int datumSize)
we get the datum size all the way up here so that the caller does not have to repeat whatever calculation went into newCount |
| Method Summary | |
static void |
cleanup()
|
BooleanVar |
contentsEqual(PrimArray other)
Whether the two ranges contain semantically the same values. |
int |
contentsHash()
A hash of the entire contents of the array. |
PrimArray |
copy()
|
PrimArray |
copy(int count)
|
PrimArray |
copy(int count,
int start)
|
PrimArray |
copy(int count,
int start,
int before)
|
PrimArray |
copy(int count,
int start,
int before,
int after)
Make a copy of a piece of this array. |
protected void |
copyElements(int to,
PrimArray source,
int from,
int count)
subclasses with non-32 bit or other interesting values should override |
PrimArray |
copyGrow(int after)
Make a copy of the array into a larger array. |
void |
copyToBuffer(int[] buffer,
int size)
|
void |
copyToBuffer(int[] buffer,
int size,
int count)
|
void |
copyToBuffer(int[] buffer,
int size,
int count,
int start)
Copy of a piece of this array into the provided buffer with size bytes of space available. |
int |
count()
How many elements the array can hold |
BooleanVar |
elementsEqual(int here,
PrimArray other)
|
BooleanVar |
elementsEqual(int here,
PrimArray other,
int there)
|
BooleanVar |
elementsEqual(int here,
PrimArray other,
int there,
int n)
Whether the two ranges contain the same values, using the criteria defined in contentsEqual |
int |
elementsHash()
|
int |
elementsHash(int count)
|
int |
elementsHash(int count,
int start)
A hash of the range of values out of the array. |
Heaper |
fetchValue(int index)
Fetch a value; may be a Heaper, NULL, or a PrimValue as appropriate to PrimArray subclass. |
Heaper |
getValue(int index)
Same fetchValue except it will BLAST if value is NULL |
int |
indexOf(Heaper value)
|
int |
indexOf(Heaper value,
int start)
|
int |
indexOf(Heaper value,
int start,
int n)
The index of the nth occurrence of the given value at or after (before if n is negative) the given index, or -1 if there is none. |
int |
indexOfElements(PrimArray other)
|
int |
indexOfElements(PrimArray other,
int valueCount)
|
int |
indexOfElements(PrimArray other,
int valueCount,
int valueStart)
|
int |
indexOfElements(PrimArray other,
int valueCount,
int valueStart,
int start)
|
int |
indexOfElements(PrimArray other,
int valueCount,
int valueStart,
int start,
int nth)
The index of the nth occurrence of the given sequence of values at or after (before if n is negative) the given starting index, or -1 if there is none. |
int |
indexPast(Heaper value)
|
int |
indexPast(Heaper value,
int start)
|
int |
indexPast(Heaper value,
int start,
int n)
The index of the nth occurrence of anything but the given value at or after (before if n is negative) the given index, or -1 if there is none. |
protected PrimArray |
makeNew(int size,
PrimArray source,
int sourceOffset,
int count,
int destOffset)
|
protected void |
moveTo(int newLoc)
used in compaction |
protected void |
outOfBounds()
the canonical out-of-bounds blast for prim arrays |
protected void |
printElementOn(int index,
java.io.PrintWriter oo)
|
void |
printOn(java.io.PrintWriter oo)
|
protected int |
rangeCheck(int index)
|
protected int |
size()
used in compaction |
PrimSpec |
spec()
A description of the kinds of things which can be stored in this array |
protected int[] |
storage()
|
void |
storeAll()
|
void |
storeAll(Heaper value)
|
void |
storeAll(Heaper value,
int count)
|
void |
storeAll(Heaper value,
int count,
int start)
Set a range of elements to have the same value |
void |
storeMany(int to,
PrimArray other)
Copy n elements from the other array into this one. |
void |
storeMany(int to,
PrimArray other,
int count)
Copy n elements from the other array into this one. |
void |
storeMany(int to,
PrimArray other,
int count,
int from)
Copy n elements from the other array into this one. |
void |
storeValue(int index,
Heaper value)
Store a value; may be a Heaper, NULL, or a PrimValue as appropriate to PrimArray subclass. |
protected void |
zeroElements()
|
protected void |
zeroElements(int from)
|
protected void |
zeroElements(int from,
int count)
|
| Methods inherited from class org.abora.gold.java.AboraHeaper |
asOop, basicInspect, displayString, error, hack, halt, inspect, knownBug, mightNotImplement, REQUIRES, shouldImplement, shouldNotImplement, stubbleForSubclassResponsibility, thingToDo, willNotImplement |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static int OurGutsCount
| Constructor Detail |
protected PrimArray(int count,
int datumSize)
| Method Detail |
public int count()
public void storeValue(int index,
Heaper value)
public Heaper fetchValue(int index)
public Heaper getValue(int index)
public PrimSpec spec()
public BooleanVar contentsEqual(PrimArray other)
public int contentsHash()
public void storeMany(int to,
PrimArray other,
int count,
int from)
public void storeMany(int to,
PrimArray other,
int count)
public void storeMany(int to,
PrimArray other)
public PrimArray copy(int count,
int start,
int before,
int after)
public PrimArray copy(int count,
int start,
int before)
public PrimArray copy(int count,
int start)
public PrimArray copy(int count)
public PrimArray copy()
public PrimArray copyGrow(int after)
public int indexOf(Heaper value,
int start,
int n)
public int indexOf(Heaper value,
int start)
public int indexOf(Heaper value)
public int indexOfElements(PrimArray other,
int valueCount,
int valueStart,
int start,
int nth)
public int indexOfElements(PrimArray other,
int valueCount,
int valueStart,
int start)
public int indexOfElements(PrimArray other,
int valueCount,
int valueStart)
public int indexOfElements(PrimArray other,
int valueCount)
public int indexOfElements(PrimArray other)
public int indexPast(Heaper value,
int start,
int n)
public int indexPast(Heaper value,
int start)
public int indexPast(Heaper value)
public void storeAll(Heaper value,
int count,
int start)
public void storeAll(Heaper value,
int count)
public void storeAll(Heaper value)
public void storeAll()
public void copyToBuffer(int[] buffer,
int size,
int count,
int start)
public void copyToBuffer(int[] buffer,
int size,
int count)
public void copyToBuffer(int[] buffer,
int size)
public BooleanVar elementsEqual(int here,
PrimArray other,
int there,
int n)
public BooleanVar elementsEqual(int here,
PrimArray other,
int there)
public BooleanVar elementsEqual(int here,
PrimArray other)
public int elementsHash(int count,
int start)
public int elementsHash(int count)
public int elementsHash()
public void printOn(java.io.PrintWriter oo)
printOn in class Heaperprotected int rangeCheck(int index)
protected int[] storage()
protected void printElementOn(int index,
java.io.PrintWriter oo)
protected void copyElements(int to,
PrimArray source,
int from,
int count)
protected void zeroElements(int from,
int count)
protected void zeroElements(int from)
protected void zeroElements()
protected PrimArray makeNew(int size,
PrimArray source,
int sourceOffset,
int count,
int destOffset)
public static void cleanup()
protected void outOfBounds()
protected int size()
protected void moveTo(int newLoc)
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||