org.abora.gold.primtab
Class PrimIndexTable

java.lang.Object
  |
  +--org.abora.gold.java.AboraHeaper
        |
        +--org.abora.gold.xpp.basic.Heaper
              |
              +--org.abora.gold.primtab.PrimIndexTable

public class PrimIndexTable
extends Heaper

Map possibly wimpy pointers to integers. Common usage almost never does a
remove on this class, therefore we rehash in order to save time on other ops.


Field Summary
protected  boolean amWimpy
           
protected  IntegerVarArray myIndices
           
protected  byte myOriginalSize
           
protected  PtrArray myPtrs
           
protected  byte myTally
           
 
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
PrimIndexTable(int size, boolean wimpy)
           
 
Method Summary
 int actualHashForEqual()
           
 void atIntroduce(Heaper ptr, IntegerVar index)
           
 void atStore(Heaper ptr, IntegerVar index)
           
 void clearAll()
          Clear all entries from the table.
 int count()
           
 void destruct()
          Classes should implement this message rather than a destructor.
 IntegerVar fetch(Heaper ptr)
          return -1 on not found.
 IntegerVar get(Heaper ptr)
           
 void grow()
           
 int hashFind(Heaper value)
           
 int hashFindFetch(Heaper value)
           
static Heaper make(int size)
           
 void rehash(PtrArray oldPtrs, IntegerVarArray oldIndices, int newSize)
           
 void remove(Heaper ptr)
           
 PrimIndexTableStepper stepper()
           
static PrimIndexTable wimpyIndexTable(int size)
           
 
Methods inherited from class org.abora.gold.xpp.basic.Heaper
abstractDeclarationFor, abstractTypeFor, addMethodAttributeToInOf, addPackage, addPackageCategory, allClientProtocolOn, argumentTypesFor, arrow, blast, blast, BLAST, cachePromiseNameTable, cachePromiseNameTableIn, canYouBecome, cast, cleanPromiseClasses, cleanupGarbage, clientClassesDo, clientFunctionsOn, clientMethodsOn, clientProtocol, clientProtocolDo, clientProtocolOn, clientProtocolOn, collectibleClasses, compare, compileClientSubclasses, compileConstantPromiseMethods, compileCreateFromRcvr, compileEQ, compileGeneratedClassMethod, compileGeneratedMethod, compileHook, compilePromise, compilePromiseDefaultMethods, compilePromiseFluidDeclarations, compilePromiseHandlers, compilePromiseMethods, compileRequestCreateMsgInArguments, compileRequestEvaluateMsgInReturningArguments, compileRPCSpecialistEvaluateMsgForReturningArguments, compileSendSelfTo, compileSendSelfToSendHook, compileStubbleMethods, compileSubclassStubbleMethods, computeMangle, computePreorder, constantTypeValue, convert, convertCopyDeclarations, convertDeferredDeclarations, convertProxyDeclarations, convertSubclassCopyDeclarations, convertSubclassDeferredDeclarations, convertSubclassProxyDeclarations, copyReferencesToType, create, create, create, create, create, create, create, create, create, create, createRequestClassArguments, definesProxyMethods, delete, deref, destroy, destructor, enum, enumFlags, equals, exportName, fetchAttribute, fetchPackage, fetchSuperCategory, fileOutClientProtocol, findCategory, findSenderAndReceiverMethods, findTailInto, flushPromiseNameTable, foo, freezeClientClasses, freezeClientProtocol, freezeStProtocol, frozenClasses, garbageCollect, garbageCollectFrom, gcOpportunity, gcOpportunity, generatedCategory, generatePromiseNames, getCategory, getOrMakePackage, getSuperCategory, handlerSignaturesFrom, hash, hashForEqual, hasProxyMethods, info_clientClasses, info_clientSideClasses, info_promiseClasses, info_stProtocol, inGC, initializedClasses, initializingClasses, initPackages, initStringHashSBoxes, inspectPieces, instanceSize, IntegerVar, isByProxy, isConstructed, isDestructed, isEqual, isEqualOrSubclassOf, isGenerated, isIntType, isKindOf, isRawType, isUnlocked, linkTimeNonInherited, make, makeClassTable, makeFillTable, makeRequestTable, mangle, markChildren, markCount, markInstances, mayBecome, mayBecomeAnySubclassOf, new1, newX, nonCopyVariables, notWorking, pack, packageClasses, packagingCategory, parseExportName, passe, pointerToStaticMember, pointerToStaticMember, pointerToVirtualMember, preorderMax, preorderNumber, printOn, PROBLEM, problems, promiseClass, promiseDefaultValue, promiseName, promiseNameTable, promiseToAbstract, registerPackageCategory, removeGeneratedCode, removeStubbleMethods, removeSubclassGeneratedCode, removeSubclassStubbleMethods, requestProcedure, requestProceduresFrom, returnTypeFor, rootName, scheduleTermination, sendProxyTo, sendSelfTo, serverNameFor, setGC, signal, signals, smalltalkSelector, stClientProtocol, stubbleSelectorTokenReturnsArguments, subclassNonCopyVariables, takeOop, togglePromiseName, togglePromiseOfParse, unimplemented, unmangle, verifyFreeze, wipeStubble
 
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

myPtrs

protected PtrArray myPtrs

myIndices

protected IntegerVarArray myIndices

myTally

protected byte myTally

amWimpy

protected boolean amWimpy

myOriginalSize

protected byte myOriginalSize
Constructor Detail

PrimIndexTable

public PrimIndexTable(int size,
                      boolean wimpy)
Method Detail

atIntroduce

public void atIntroduce(Heaper ptr,
                        IntegerVar index)

atStore

public void atStore(Heaper ptr,
                    IntegerVar index)

clearAll

public void clearAll()
Clear all entries from the table. I know this looks like a hack, but the
alternative is to throw away the table and build a new one: an expensive
prospect for comm.


count

public int count()

fetch

public IntegerVar fetch(Heaper ptr)
return -1 on not found.


get

public IntegerVar get(Heaper ptr)

remove

public void remove(Heaper ptr)

destruct

public void destruct()
Description copied from class: Heaper
Classes should implement this message rather than a destructor. We use this so
the destruction behavior implemented in abstract superclasses can access the
vtable of the concrete run-time type in C++. Using a message makes C++
parallel the Smalltalk semantics for delete. Destroy will actually call the destructor.

Overrides:
destruct in class Heaper

grow

public void grow()

hashFind

public int hashFind(Heaper value)

hashFindFetch

public int hashFindFetch(Heaper value)

rehash

public void rehash(PtrArray oldPtrs,
                   IntegerVarArray oldIndices,
                   int newSize)

actualHashForEqual

public int actualHashForEqual()
Overrides:
actualHashForEqual in class Heaper

stepper

public PrimIndexTableStepper stepper()

make

public static Heaper make(int size)

wimpyIndexTable

public static PrimIndexTable wimpyIndexTable(int size)


Translation - Copyright © 2003 David G Jones. All Rights Reserved.
Original Udanax-Gold - Copyright © 1979-1999 Udanax.com. All rights reserved.