org.abora.gold.xpp.basic
Class Heaper

java.lang.Object
  |
  +--org.abora.gold.java.AboraHeaper
        |
        +--org.abora.gold.xpp.basic.Heaper
Direct Known Subclasses:
Abraham, Accumulator, ActualCalc, Arrangement, BeCarrier, BHFn, BHHFn, BHHHFn, BooleanVar, ByteShuffler, CacheManager, Calc, CalcCreator, CanopyCache, Category, CategoryTable, CBlockTracker, Chameleon, ChunkCleaner, CommIbid, Connection, Converter, Cookbook, CoordinateSpace, CxxClassDescription, Dean, DetectorEvent, DiskManager, EdgeManager, Encrypter, EncrypterConstructor, EncrypterMaker, Eric, ExceptionRecord, ExponentialHashMap, FakeCategory, FeAdminer, FeArchiver, FeBundle, FeCompletionDetector, FeDetector, FeDirectWrapperChecker, FeDirectWrapperMaker, FeFillInDetector, FeIndirectWrapperChecker, FeIndirectWrapperMaker, FeKeyMaster, FeRangeElement, FeServer, FeSession, FeWrapper, FeWrapperDef, FeWrapperSpec, FeWrapperSpecHolder, FHash, FlockLocation, HashSetCache, Heaper2UInt32Cache, HHBFn, HHFn, HHHBFn, HHHFn, HHHHFn, HHHHHFn, HHHHHHFn, HHHHHHHFn, HIHFn, HistoryCrum, HRoot, IEEE128, IEEE8, InstanceCache, IntegerVar, IObject, Joint, Lock, MainDummy, Mapping, MarkM, MuWordArray, OrderEnum, OrderSpec, Package, PackageCategory, PackOBits, Pair, Portal, Position, PrimArray, PrimeSizeProvider, PrimIndexTable, PrimPtr2PtrTable, PrimPtrTable, PrimRemovedObject, PrimSet, PrimSpec, PrimValue, Problem, PromiseManager, Prop, PropChange, PropFinder, ProtocolBroker, ProtocolItem, Ravi, RaviNow, Rcvr, Recipe, RegionDelta, RepairEngineer, RequestHandler, ResultRecorder, SanitationEngineer, Scrambler, ScruSet, ScruTable, Sema4, SequenceDsp, ServerChunk, SetTable, ShepFlag, SHTO, Signal, SnarfHandle, SnarfHandler, SnarfID, SnarfInfoHandler, SnarfRecord, Someone, SpecialistRcvrJig, SplayEntLoaf, StackExaminer, Stamp, Stepper, SuspendedHeaper, TableEntry, Thunk, TokenSource, TracePosition, TransclusionRecorder, TransferSpecialist, TransitionEdge, TwoStepper, Urdi, UrdiView, VHBFn, VHFn, VHHFn, VHHHFn, VHHHHFn, VHHHHHFn, VoidStar, XcvrMaker, Xmtr, XnExecutor, XnReadStream, XnRegion, XnSensor, XnWriteStream

public class Heaper
extends AboraHeaper

This is the base heap allocated class in X++.


Field Summary
protected static Heaper AllBlasts
           
protected static Heaper BecomeMap
           
protected static Heaper GarbageCount
           
protected static Heaper InGC
           
protected static Set InitializedClasses
           
protected static Set InitializingClasses
           
protected static Heaper LastMemory
           
protected static IntegerVar NextClientRequestNumber
           
protected static Heaper NotOneElementSignal
           
protected static Heaper PackageTable
           
protected static IdentityDictionary PromiseNameTable
           
protected static Heaper 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
Heaper()
           
Heaper(Rcvr rcvr)
           
 
Method Summary
static java.lang.String abstractDeclarationFor(Symbol aSymbol)
           
static java.lang.String abstractTypeFor(Symbol aSymbol)
           
 int actualHashForEqual()
           
static void addMethodAttributeToInOf(Symbol attr, java.lang.String src, MethodDictionary md, java.lang.String cat)
           
 void addPackage(Package packagex)
          add a package to the list
static void addPackageCategory(PackageCategory packageCat)
          add a package category to my list
static void allClientProtocolOn(java.lang.Object oo)
          | file |
file _ (Filename named: 'proto.spc') writeStream.
[Heaper allClientProtocolOn: file]
valueNowOrOnUnwindDo: [file close]
static OrderedCollection argumentTypesFor(Selector selector)
          the argument types for the given message
 void arrow(java.lang.Object aSymbol)
          This is for references to struct fields.
foo arrow: #field
translates to
foo->field.
static void blast(Problem problem)
          raise an exception
 void blast(Symbol problemName)
          raise an exception
static void BLAST(Symbol problem)
           
static IdentityDictionary cachePromiseNameTable()
          build a pair of tables from promise names to backend names and back.
static void cachePromiseNameTableIn(java.lang.Object aBlock)
          evaluate a block with the cache enabled
static void canYouBecome(Category cat)
           
 Heaper cast(IntegerVar catNum)
          Return the object if it is of the appropriate type.
static void cleanPromiseClasses()
          Heaper cleanPromiseClasses
static void cleanupGarbage()
          Heaper cleanupGarbage
static void clientClassesDo(java.lang.Object block)
          Heaper clientClassesDo: [:assoc | Transcript << assoc key << ' '].
static void clientFunctionsOn(java.lang.Object oo)
          String streamContents: [:oo | FeEdition clientConstantsOn: oo]
static void clientMethodsOn(java.lang.Object oo)
          Text streamContents: [:oo | IntegerSpace clientMethodsOn: oo]
static void clientProtocol()
          IntegerSpace clientProtocol
static void clientProtocolDo(java.lang.Object ii, java.lang.Object block)
          | file |
file _ (Filename named: 'client.prc') readStream.
[Heaper clientProtocol: file do:
[:number :class :parent :implicit :meth |
cerr << number << ' ' << class.
meth value:
[:mnum :return :sel :args :static | sel = #import ifTrue: [self halt].
cerr cr << mnum << ' ' << return << ' ' << sel << $( << args << $)].
cerr cr]] valueNowOrOnUnwindDo: [file close]
static void clientProtocolOn(java.lang.Object oo)
          String streamContents: [:oo | FeStatusDetector clientProtocolOn: oo]
static void clientProtocolOn(java.lang.Object oo, java.lang.Object classNumber)
          String streamContents: [:oo | FeStatusDetector clientProtocolOn: oo with: 6]
static void collectibleClasses()
          Return the list of classes whose instances need to be garbage
collected.
static boolean compare(Heaper a, Heaper b)
           
static void compileClientSubclasses()
          Heaper compileClientSubclasses
static void compileConstantPromiseMethods(java.lang.Class promise)
          make the methods that are the same in all promise classes.
static void compileCreateFromRcvr(OrderedCollection ivars)
          compile a method to create self from a receiver
static void compileEQ()
          Compile code to do EQ comparisions
static void compileGeneratedClassMethod(java.lang.String text)
           
static void compileGeneratedMethod(java.lang.String text)
           
static void compileHook()
          compile changes to make this a hook class - add an instance variable and accessing methods
static void compilePromise()
          make a promise class and generate all its methods.
static void compilePromiseDefaultMethods(java.lang.Class promise, Symbol selector, java.lang.Integer count)
          compile a default for the indicated promise method stripping off the last count arguments
static void compilePromiseFluidDeclarations(java.lang.Class promise)
          if there's a fluid declaration in the staticTimeNonInherited, then declare the client
counterpart
static void compilePromiseHandlers()
           
static void compilePromiseMethods(java.lang.Class promise)
          update return types, argument types, mangling and unmangling information
static void compileRequestCreateMsgInArguments(java.lang.Class requestClass, OrderedCollection args)
           
static void compileRequestEvaluateMsgInReturningArguments(java.lang.Class requestClass, Symbol return1, OrderedCollection args)
           
static void compileRPCSpecialistEvaluateMsgForReturningArguments(java.lang.String requestName, Symbol return1, OrderedCollection args)
           
static void compileSendSelfTo(OrderedCollection ivars)
          compile a method to send self to a xmtr
static void compileSendSelfToSendHook()
          for pseudocopy.
static void compileStubbleMethods()
          compile makeProxy, sendSelfTo and create.Xcvr:
static void compileSubclassStubbleMethods()
          compile subclass methods on me and all subclasses
static Symbol computeMangle(ParseNode tree)
          compute the C++ mangled name for a function
static void computePreorder(java.lang.Object mine)
          Set my preorder number and pass it on down recursively to my subclasses.
static void constantTypeValue(Symbol constant, java.lang.String type, Heaper value)
          define a global constant
 Heaper convert(Category type)
          do a type conversion and a cast
static void convertCopyDeclarations()
          This converts all copy classes to the new representation.
static void convertDeferredDeclarations()
          This converts all deferred classes to the new representation.
static void convertProxyDeclarations()
          This converts all Proxy classes to the new representation.
static void convertSubclassCopyDeclarations()
          This converts all copy classes to the new representation.
static void convertSubclassDeferredDeclarations()
          This converts all deferred classes to the new representation.
static void convertSubclassProxyDeclarations()
          This converts all deferred classes to the new representation.
static void copyReferencesToType(Symbol symb)
          Return the list of variables in this class that is non-copy.
static void create()
          Create the frame and call the constructor defined for instances.
static void create(java.lang.Object arg1)
          Create the frame and call the constructor defined for instances.
static void create(java.lang.Object arg1, java.lang.Object arg2)
          Create the frame and call the constructor defined for instances.
static void create(java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3)
          Create the frame and call the constructor defined for instances.
static void create(java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4)
          Create the frame and call the constructor defined for instances.
static void create(java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4, java.lang.Object arg5)
          Create the frame and call the constructor defined for instances.
static void create(java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4, java.lang.Object arg5, java.lang.Object arg6)
          Create the frame and call the constructor defined for instances.
static void create(java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4, java.lang.Object arg5, java.lang.Object arg6, java.lang.Object arg7)
          Create the frame and call the constructor defined for instances.
static void create(java.lang.Object arg1, java.lang.Object arg2, java.lang.Object arg3, java.lang.Object arg4, java.lang.Object arg5, java.lang.Object arg6, java.lang.Object arg7, java.lang.Object arg8)
          Create the frame and call the constructor defined for instances.
static void create(Rcvr rcvr)
           
static void createRequestClassArguments(Symbol return1, OrderedCollection arguments)
           
static boolean definesProxyMethods()
           
 void delete()
           
 void deref()
          This is so that PrimArray arguments can be used identically in smalltalk and X++
 void destroy()
           
 void destruct()
          Classes should implement this message rather than a destructor.
 void destructor()
          No other class should implement this.
static void enum(Symbol enumName, Array enums)
          Define a bunch of enums.
static void enumFlags(Symbol enumName, Array enums)
          Define a bunch of single- or multi-bit flags.
The first symbol is the name (or list of names) of a zero value of the enum type.
Each subsequent element in the outer array takes up its own set of bit positions in the
enum.
 boolean equals(Heaper other)
          Return true if the two objects are equal.
static java.lang.String exportName()
          Return the completely stripped rootName for this class.
static Symbol fetchAttribute(java.lang.Object attr)
          get information attached to the given attribute, or NULL if none
 Package fetchPackage(PackageCategory cat)
          retrieve a package attached to this object
static void fetchSuperCategory()
           
static void fileOutClientProtocol(java.lang.Object filename)
           
static java.lang.Class findCategory(UInt8Array catName)
          translate a category name into a class
static void findSenderAndReceiverMethods()
           
 void findTailInto(IdentitySet visited, IdentitySet result)
          find a non-Heaper object that refers to this one
static IdentityDictionary flushPromiseNameTable()
          flush the promise name table.
 void foo(java.lang.Object x)
           
static void freezeClientClasses()
          Heaper freezeClientClasses.
static void freezeClientProtocol()
          Heaper freezeClientProtocol.
static void freezeStProtocol()
          Heaper freezeStProtocol.
static void frozenClasses()
          Heaper frozenClasses.
static void garbageCollect()
           
static void garbageCollectFrom(java.lang.Object roots)
          This is an attept to simulate the X++ garbage collector.
Only instances of the classes returned by Heaper>collectibleClasses
will actually get deleted.
static void gcOpportunity()
          A no-op method in smalltalk to tell c++ it is a good time to garbage collect.
static void gcOpportunity(java.lang.Object anInt)
          A no-op method in smalltalk to tell c++ it is a good time to garbage collect.
static void generatedCategory()
           
static void generatePromiseNames(Symbol promise)
          Walk down the inheritance tree recording what promise name goes with which class.
static Category getCategory()
           
 Package getOrMakePackage(PackageCategory cat)
          retrieve a package attached to this object
static void getSuperCategory()
           
static void handlerSignaturesFrom(java.lang.Object filename)
           
 int hash()
           
 int hashForEqual()
           
static boolean hasProxyMethods()
           
static void info_clientClasses()
          XuHeaper XuAdminer XuArchiver XuBundle XuArrayBundle XuElementBundle XuPlaceHolderBundle
XuCalc XuCalcCreator XuCoordinateSpace XuCrossSpace XuFilterSpace XuIDSpace XuIntegerSpace
XuRealSpace XuSequenceSpace XuFillRangeDetector XuFillDetector XuGateKeeper XuServer
XuKeyMaster XuLock XuBooLock XuChallengeLock XuMatchLock XuMultiLock XuWallLock XuMapping
XuCrossMapping XuIntegerMapping XuSequenceMapping XuOrderSpec XuCrossOrderSpec XuPopSensor
XuPosition XuFilterPosition XuID XuInteger XuReal XuSequence XuTuple XuPrimArray
XuPrimSpec XuPrimFloatSpec XuPrimIntegerSpec XuPrimPointerSpec XuPrimValue XuPrimFloat
XuPrimInteger XuRangeElement XuDataHolder XuEdition XuIDHolder XuLabel XuWork XuClub
XuRational XuRegion XuCrossRegion XuFilter XuIDRegion XuIntegerRegion XuRealRegion
XuSequenceRegion XuRevisionDetector XuSession XuStatusDetector XuStepper XuTableStepper
XuWaitDetector XuWrapper XuClubDescription XuHyperLink XuHyperRef XuMultiRef XuSingleRef
XuLockSmith XuBooLockSmith XuChallengeLockSmith XuMatchLockSmith XuMultiLockSmith
XuWallLockSmith XuPath XuSet XuText XuWrapperSpec
static void info_clientSideClasses()
          FillRangeDetector FillDetector RevisionDetector StatusDetector WaitDetector Wrapper
static void info_promiseClasses()
          Promise Adminer Archiver Array FloatArray HumberArray IntArray PtrArray Bundle ArrayBundle
ElementBundle PlaceHolderBundle CoordinateSpace CrossSpace FilterSpace IDSpace
IntegerSpace RealSpace SequenceSpace FillRangeDetector FillDetector KeyMaster Lock BooLock
ChallengeLock MatchLock MultiLock WallLock Mapping CrossMapping IntegerMapping
SequenceMapping OrderSpec CrossOrderSpec Position FilterPosition ID Sequence Tuple Integer
Real RangeElement DataHolder Edition IDHolder Label Work Club RevisionDetector Server
Session StatusDetector Stepper TableStepper WaitDetector Wrapper ClubDescription HyperLink
HyperRef MultiRef SingleRef LockSmith BooLockSmith ChallengeLockSmith MatchLockSmith
MultiLockSmith WallLockSmith Path Set Text WrapperSpec Region CrossRegion Filter IDRegion
IntegerRegion RealRegion SequenceRegion Value FloatValue IntValue
static void info_stProtocol()
          {void NOLOCK CLIENT} destroy
{UInt32 CLIENT} actualHashForEqual
{BooleanVar CLIENT} isEqual: other {Heaper}
static boolean inGC()
          Some destructors need to have different behavior during garbage
collection, since some of their instance variables may already have
been collected.
static void initializedClasses()
           
static void initializingClasses()
           
static void initPackages()
           
static void initStringHashSBoxes()
          Heaper initStringHashSBoxes
static void inspectPieces()
           
static int instanceSize()
           
static void IntegerVar(java.lang.Object x)
           
 boolean isByProxy()
           
static boolean isConstructed(VoidStar obj)
           
static boolean isDestructed(VoidStar obj)
           
 boolean isEqual(Heaper other)
          Return true if the two objects are equal.
static boolean isEqualOrSubclassOf(Category cat)
           
static void isGenerated()
          Automatically generated classes should implement this as true.
static void isIntType(Symbol type)
           
 boolean isKindOf(IntegerVar catNum)
          The server message to test the run-time type of a promise.
static boolean isRawType(TypeDescription type)
           
 boolean isUnlocked()
           
static void linkTimeNonInherited()
           
static Heaper make(java.lang.Object rcvr)
           
static void makeClassTable(java.lang.Object filename)
           
static void makeFillTable(java.lang.Object filename)
           
static void makeRequestTable(java.lang.Object filename)
           
static Symbol mangle(Symbol selector)
          return the C++ mangled function name from the Smalltalk selector
 void markChildren(IntegerVar count)
          This ia a generic method to mark all of the pointers coming
out of an object.
 IntegerVar markCount()
          Return the count of the last garbage collection i which this object was marked.
 void markInstances(IntegerVar count)
          The count is so we don't need to clear the marks.
static void mayBecome(Category cat)
           
static void mayBecomeAnySubclassOf(Category cat)
           
static void new1(Symbol allocType)
          This does nothing in smalltalk, but allows translated code to specify
how a new object is allocated.
static Heaper newX(Heaper memory)
          Create the frame for a new instance using the identity of memory.
static void nonCopyVariables()
          Return the list of variables in this class that is non-copy.
 void notWorking()
           
 Package pack(PackageCategory packageCat)
          this gets translated into a macro PACK(PackageClassName,contents)
static OrderedCollection packageClasses()
          return my packages classes and create if needed
 Category packagingCategory()
          the category object to use for packaging purposes
static Symbol parseExportName(ProgramNode pNode)
           
static void passe()
           
static void pointerToStaticMember(Symbol selector)
           
static void pointerToStaticMember(Symbol selector, java.lang.String typeString)
           
static void pointerToVirtualMember(Symbol selector)
           
static void preorderMax()
           
static void preorderNumber()
           
 void printOn(java.io.PrintWriter oo)
           
static void PROBLEM(java.lang.Object exception)
           
static void problems()
          A ProblemList for all X++ BLASTs
static java.lang.Class promiseClass()
          starting at self and moving up the hierarchy, find the first ON.CLIENT class, and return
its promise counterpart.
BLAST if it should exist and doesn't.
static java.lang.String promiseDefaultValue(java.lang.Object default1, java.lang.Object selector)
           
static Symbol promiseName()
          Return the name of the promise class associated generated for 'name'.
static IdentityDictionary promiseNameTable()
           
static void promiseToAbstract(java.lang.Object token)
          token = #IntValue ifTrue: [^#IntegerVar].
static Category registerPackageCategory(PackageCategory packageCat)
          a package category can be added; remember it and return what its contents class should be
static void removeGeneratedCode()
           
static void removeStubbleMethods()
           
static void removeSubclassGeneratedCode()
          remove subclass methods on me and all subclasses
static void removeSubclassStubbleMethods()
          remove subclass methods on me and all subclasses
static void requestProcedure(java.lang.Object sel, java.lang.Object classx, java.lang.Object return1, java.lang.Object args, java.lang.Object implicit, java.lang.Object staticx)
          Heaper requestProcedure: 'position' with: 'IntegerSpace' with: 'Integer' with:
#('IntValue') with: true with: true.
static void requestProceduresFrom(java.lang.Object filename)
           
static Symbol returnTypeFor(Selector selector)
          the return type for the given message
static java.lang.String rootName()
          Return the completely stripped rootName for this class.
static void scheduleTermination()
          In xpp, smainx.cxx defines this to set a flag requesting server termination after current
request.
 void sendProxyTo(Xmtr trans)
           
 void sendSelfTo(Xmtr trans)
          do nothing
static java.lang.String serverNameFor(java.lang.String root)
          Return the name of the server side class that implements 'root'
static void setGC(boolean flag)
          Some destructors need to have different behavior during garbage
collection, since some of their instance variables may already have
been collected.
static Signal signal(Symbol signal)
          Define a blast and return a unique and persistent signal for it.
static Signal signals(Array signals)
          Define a set of blasts blast and return a SignalCollection.
static void smalltalkSelector(java.lang.Object stripped, java.lang.Object classx, java.lang.Object argCount)
           
static void stClientProtocol()
          IntegerSpace stClientProtocol
static void stubbleSelectorTokenReturnsArguments(Symbol selector, Symbol token, Symbol return1, Array arguments)
          add stubble information to the class
static void subclassNonCopyVariables()
          Return the list of variables in this class that is non-copy.
static int takeOop()
           
static Symbol togglePromiseName(Symbol sym)
           
static Symbol togglePromiseOfParse(ProgramNode pNode)
           
static void unimplemented()
           
static Symbol unmangle(Symbol token)
          return the Smalltalk selector from the C++ mangled function name
static void verifyFreeze()
          Heaper verifyFreeze.
static void wipeStubble()
          remove stubble information
 
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

AllBlasts

protected static Heaper AllBlasts

BecomeMap

protected static Heaper BecomeMap

GarbageCount

protected static Heaper GarbageCount

InGC

protected static Heaper InGC

InitializedClasses

protected static Set InitializedClasses

InitializingClasses

protected static Set InitializingClasses

LastMemory

protected static Heaper LastMemory

NextClientRequestNumber

protected static IntegerVar NextClientRequestNumber

NotOneElementSignal

protected static Heaper NotOneElementSignal

PackageTable

protected static Heaper PackageTable

PromiseNameTable

protected static IdentityDictionary PromiseNameTable

StringHashSBoxes

protected static Heaper StringHashSBoxes
Constructor Detail

Heaper

public Heaper(Rcvr rcvr)

Heaper

public Heaper()
Method Detail

notWorking

public void notWorking()

passe

public static void passe()

unimplemented

public static void unimplemented()

destroy

public void destroy()

destruct

public void destruct()
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.


arrow

public void arrow(java.lang.Object aSymbol)
This is for references to struct fields.
foo arrow: #field
translates to
foo->field.


deref

public void deref()
This is so that PrimArray arguments can be used identically in smalltalk and X++


isByProxy

public boolean isByProxy()

sendProxyTo

public void sendProxyTo(Xmtr trans)

sendSelfTo

public void sendSelfTo(Xmtr trans)
do nothing


convert

public Heaper convert(Category type)
do a type conversion and a cast


printOn

public void printOn(java.io.PrintWriter oo)

actualHashForEqual

public int actualHashForEqual()

hashForEqual

public int hashForEqual()

isEqual

public boolean isEqual(Heaper other)
Return true if the two objects are equal.


getCategory

public static Category getCategory()

findTailInto

public void findTailInto(IdentitySet visited,
                         IdentitySet result)
find a non-Heaper object that refers to this one


delete

public void delete()

destructor

public void destructor()
No other class should implement this. This will eventually become
deleted objects in Smalltalk to Heaper.


isUnlocked

public boolean isUnlocked()

markChildren

public void markChildren(IntegerVar count)
This ia a generic method to mark all of the pointers coming
out of an object. Subclasses with lots of IntegerVars or with
wimpy pointers should reimplement this.


markCount

public IntegerVar markCount()
Return the count of the last garbage collection i which this object was marked.


markInstances

public void markInstances(IntegerVar count)
The count is so we don't need to clear the marks.


addPackage

public void addPackage(Package packagex)
add a package to the list


fetchPackage

public Package fetchPackage(PackageCategory cat)
retrieve a package attached to this object


getOrMakePackage

public Package getOrMakePackage(PackageCategory cat)
retrieve a package attached to this object


pack

public Package pack(PackageCategory packageCat)
this gets translated into a macro PACK(PackageClassName,contents)


packagingCategory

public Category packagingCategory()
the category object to use for packaging purposes


foo

public void foo(java.lang.Object x)

blast

public void blast(Symbol problemName)
raise an exception


cast

public Heaper cast(IntegerVar catNum)
Return the object if it is of the appropriate type.


equals

public boolean equals(Heaper other)
Return true if the two objects are equal.


hash

public int hash()

isKindOf

public boolean isKindOf(IntegerVar catNum)
The server message to test the run-time type of a promise.


addMethodAttributeToInOf

public static void addMethodAttributeToInOf(Symbol attr,
                                            java.lang.String src,
                                            MethodDictionary md,
                                            java.lang.String cat)

compileGeneratedClassMethod

public static void compileGeneratedClassMethod(java.lang.String text)

compileGeneratedMethod

public static void compileGeneratedMethod(java.lang.String text)

convertCopyDeclarations

public static void convertCopyDeclarations()
This converts all copy classes to the new representation. Rather than copy declaration
for instance variables, the classes will have the COPY attribute, and instance variables
that should not be copied have the nocopy attribute.


convertDeferredDeclarations

public static void convertDeferredDeclarations()
This converts all deferred classes to the new representation. Rather than deferred:
declaration for protocols, the classes will have the DEFERRED attribute.


convertProxyDeclarations

public static void convertProxyDeclarations()
This converts all Proxy classes to the new representation. Rather than a proxy:
declaration for protocols, the classes will have the BY.PROXY attribute. Methods which
were in proxy: protocols should have PROXY attributes. In addition methods which override
PROXY methods will also be declared PROXY.


convertSubclassCopyDeclarations

public static void convertSubclassCopyDeclarations()
This converts all copy classes to the new representation. Rather than copy declaration
for instance variables, the classes will have the COPY attribute, and instance variables
that should not be copied have the nocopy attribute.


convertSubclassDeferredDeclarations

public static void convertSubclassDeferredDeclarations()
This converts all deferred classes to the new representation. Rather than deferred
declaration for protocols, the classes will have the DEFERRED attribute.


convertSubclassProxyDeclarations

public static void convertSubclassProxyDeclarations()
This converts all deferred classes to the new representation. Rather than proxy
declaration for protocols, the classes will have the By.Proxy attribute.


generatedCategory

public static void generatedCategory()

isGenerated

public static void isGenerated()
Automatically generated classes should implement this as true.


removeGeneratedCode

public static void removeGeneratedCode()

removeSubclassGeneratedCode

public static void removeSubclassGeneratedCode()
remove subclass methods on me and all subclasses


compileSendSelfToSendHook

public static void compileSendSelfToSendHook()
for pseudocopy. compile a method to send self to a xmtr, but only through SEND.HOOK


make

public static Heaper make(java.lang.Object rcvr)

compileCreateFromRcvr

public static void compileCreateFromRcvr(OrderedCollection ivars)
compile a method to create self from a receiver


compileSendSelfTo

public static void compileSendSelfTo(OrderedCollection ivars)
compile a method to send self to a xmtr


findSenderAndReceiverMethods

public static void findSenderAndReceiverMethods()

compileClientSubclasses

public static void compileClientSubclasses()
Heaper compileClientSubclasses


compileStubbleMethods

public static void compileStubbleMethods()
compile makeProxy, sendSelfTo and create.Xcvr:


compileSubclassStubbleMethods

public static void compileSubclassStubbleMethods()
compile subclass methods on me and all subclasses


removeStubbleMethods

public static void removeStubbleMethods()

removeSubclassStubbleMethods

public static void removeSubclassStubbleMethods()
remove subclass methods on me and all subclasses


argumentTypesFor

public static OrderedCollection argumentTypesFor(Selector selector)
the argument types for the given message


computeMangle

public static Symbol computeMangle(ParseNode tree)
compute the C++ mangled name for a function


definesProxyMethods

public static boolean definesProxyMethods()

hasProxyMethods

public static boolean hasProxyMethods()

mangle

public static Symbol mangle(Symbol selector)
return the C++ mangled function name from the Smalltalk selector


returnTypeFor

public static Symbol returnTypeFor(Selector selector)
the return type for the given message


stubbleSelectorTokenReturnsArguments

public static void stubbleSelectorTokenReturnsArguments(Symbol selector,
                                                        Symbol token,
                                                        Symbol return1,
                                                        Array arguments)
add stubble information to the class


unmangle

public static Symbol unmangle(Symbol token)
return the Smalltalk selector from the C++ mangled function name


wipeStubble

public static void wipeStubble()
remove stubble information


compileRequestCreateMsgInArguments

public static void compileRequestCreateMsgInArguments(java.lang.Class requestClass,
                                                      OrderedCollection args)

compileRequestEvaluateMsgInReturningArguments

public static void compileRequestEvaluateMsgInReturningArguments(java.lang.Class requestClass,
                                                                 Symbol return1,
                                                                 OrderedCollection args)

compileRPCSpecialistEvaluateMsgForReturningArguments

public static void compileRPCSpecialistEvaluateMsgForReturningArguments(java.lang.String requestName,
                                                                        Symbol return1,
                                                                        OrderedCollection args)

createRequestClassArguments

public static void createRequestClassArguments(Symbol return1,
                                               OrderedCollection arguments)

compileEQ

public static void compileEQ()
Compile code to do EQ comparisions


compileHook

public static void compileHook()
compile changes to make this a hook class - add an instance variable and accessing methods


cleanPromiseClasses

public static void cleanPromiseClasses()
Heaper cleanPromiseClasses


compileConstantPromiseMethods

public static void compileConstantPromiseMethods(java.lang.Class promise)
make the methods that are the same in all promise classes. These are:
class methods:: make: makeBroken: makeBrokenBy:
instance methods:: getActualFoo: getMyFoo: create: create.Problem and create.Promise


compilePromise

public static void compilePromise()
make a promise class and generate all its methods.


compilePromiseDefaultMethods

public static void compilePromiseDefaultMethods(java.lang.Class promise,
                                                Symbol selector,
                                                java.lang.Integer count)
compile a default for the indicated promise method stripping off the last count arguments


compilePromiseFluidDeclarations

public static void compilePromiseFluidDeclarations(java.lang.Class promise)
if there's a fluid declaration in the staticTimeNonInherited, then declare the client
counterpart


compilePromiseMethods

public static void compilePromiseMethods(java.lang.Class promise)
update return types, argument types, mangling and unmangling information


isIntType

public static void isIntType(Symbol type)

isRawType

public static boolean isRawType(TypeDescription type)

promiseDefaultValue

public static java.lang.String promiseDefaultValue(java.lang.Object default1,
                                                   java.lang.Object selector)

cachePromiseNameTable

public static IdentityDictionary cachePromiseNameTable()
build a pair of tables from promise names to backend names and back.


cachePromiseNameTableIn

public static void cachePromiseNameTableIn(java.lang.Object aBlock)
evaluate a block with the cache enabled


exportName

public static java.lang.String exportName()
Return the completely stripped rootName for this class. Get rid of prefixes.
Some classes will implement this directly in order to provide another name.


flushPromiseNameTable

public static IdentityDictionary flushPromiseNameTable()
flush the promise name table.


generatePromiseNames

public static void generatePromiseNames(Symbol promise)
Walk down the inheritance tree recording what promise name goes with which class. The
incoming promise name is used by any classes which are not ON.CLIENT because instances of
them will be known to the Clients as that type.


parseExportName

public static Symbol parseExportName(ProgramNode pNode)

promiseClass

public static java.lang.Class promiseClass()
starting at self and moving up the hierarchy, find the first ON.CLIENT class, and return
its promise counterpart.
BLAST if it should exist and doesn't.


promiseName

public static Symbol promiseName()
Return the name of the promise class associated generated for 'name'.


promiseNameTable

public static IdentityDictionary promiseNameTable()

rootName

public static java.lang.String rootName()
Return the completely stripped rootName for this class. Get rid of prefixes.
Some classes will implement this directly in order to provide another name.


serverNameFor

public static java.lang.String serverNameFor(java.lang.String root)
Return the name of the server side class that implements 'root'


togglePromiseName

public static Symbol togglePromiseName(Symbol sym)

togglePromiseOfParse

public static Symbol togglePromiseOfParse(ProgramNode pNode)

clientProtocolDo

public static void clientProtocolDo(java.lang.Object ii,
                                    java.lang.Object block)
| file |
file _ (Filename named: 'client.prc') readStream.
[Heaper clientProtocol: file do:
[:number :class :parent :implicit :meth |
cerr << number << ' ' << class.
meth value:
[:mnum :return :sel :args :static | sel = #import ifTrue: [self halt].
cerr cr << mnum << ' ' << return << ' ' << sel << $( << args << $)].
cerr cr]] valueNowOrOnUnwindDo: [file close]


compilePromiseHandlers

public static void compilePromiseHandlers()

handlerSignaturesFrom

public static void handlerSignaturesFrom(java.lang.Object filename)

makeClassTable

public static void makeClassTable(java.lang.Object filename)

makeRequestTable

public static void makeRequestTable(java.lang.Object filename)

promiseToAbstract

public static void promiseToAbstract(java.lang.Object token)
token = #IntValue ifTrue: [^#IntegerVar].


requestProcedure

public static void requestProcedure(java.lang.Object sel,
                                    java.lang.Object classx,
                                    java.lang.Object return1,
                                    java.lang.Object args,
                                    java.lang.Object implicit,
                                    java.lang.Object staticx)
Heaper requestProcedure: 'position' with: 'IntegerSpace' with: 'Integer' with:
#('IntValue') with: true with: true.


requestProceduresFrom

public static void requestProceduresFrom(java.lang.Object filename)

smalltalkSelector

public static void smalltalkSelector(java.lang.Object stripped,
                                     java.lang.Object classx,
                                     java.lang.Object argCount)

allClientProtocolOn

public static void allClientProtocolOn(java.lang.Object oo)
| file |
file _ (Filename named: 'proto.spc') writeStream.
[Heaper allClientProtocolOn: file]
valueNowOrOnUnwindDo: [file close]


clientClassesDo

public static void clientClassesDo(java.lang.Object block)
Heaper clientClassesDo: [:assoc | Transcript << assoc key << ' ']. Transcript endEntry


clientProtocol

public static void clientProtocol()
IntegerSpace clientProtocol


fileOutClientProtocol

public static void fileOutClientProtocol(java.lang.Object filename)

freezeClientClasses

public static void freezeClientClasses()
Heaper freezeClientClasses.


freezeClientProtocol

public static void freezeClientProtocol()
Heaper freezeClientProtocol.


freezeStProtocol

public static void freezeStProtocol()
Heaper freezeStProtocol.


stClientProtocol

public static void stClientProtocol()
IntegerSpace stClientProtocol


verifyFreeze

public static void verifyFreeze()
Heaper verifyFreeze.


clientFunctionsOn

public static void clientFunctionsOn(java.lang.Object oo)
String streamContents: [:oo | FeEdition clientConstantsOn: oo]


clientMethodsOn

public static void clientMethodsOn(java.lang.Object oo)
Text streamContents: [:oo | IntegerSpace clientMethodsOn: oo]


clientProtocolOn

public static void clientProtocolOn(java.lang.Object oo)
String streamContents: [:oo | FeStatusDetector clientProtocolOn: oo]


clientProtocolOn

public static void clientProtocolOn(java.lang.Object oo,
                                    java.lang.Object classNumber)
String streamContents: [:oo | FeStatusDetector clientProtocolOn: oo with: 6]


frozenClasses

public static void frozenClasses()
Heaper frozenClasses.


cleanupGarbage

public static void cleanupGarbage()
Heaper cleanupGarbage


enumFlags

public static void enumFlags(Symbol enumName,
                             Array enums)
Define a bunch of single- or multi-bit flags.
The first symbol is the name (or list of names) of a zero value of the enum type.
Each subsequent element in the outer array takes up its own set of bit positions in the
enum. If there is just a Symbol, it is a single bit. If there is an array of Symbols, the
first one is an alternate name for zero for that set of bits, the next is ...1..., the
next is ...01..., then ...11..., then ...100..., etc. In this case, the whole set takes up
ceiling (log base 2 of the number of Symbols in the subarray.)


enum

public static void enum(Symbol enumName,
                        Array enums)
Define a bunch of enums. They start at 1 unless otherwise specified.


initializedClasses

public static void initializedClasses()

initializingClasses

public static void initializingClasses()

initPackages

public static void initPackages()

initStringHashSBoxes

public static void initStringHashSBoxes()
Heaper initStringHashSBoxes


linkTimeNonInherited

public static void linkTimeNonInherited()

canYouBecome

public static void canYouBecome(Category cat)

compare

public static boolean compare(Heaper a,
                              Heaper b)

fetchSuperCategory

public static void fetchSuperCategory()

findCategory

public static java.lang.Class findCategory(UInt8Array catName)
translate a category name into a class


getSuperCategory

public static void getSuperCategory()

instanceSize

public static int instanceSize()

isEqualOrSubclassOf

public static boolean isEqualOrSubclassOf(Category cat)

mayBecome

public static void mayBecome(Category cat)

mayBecomeAnySubclassOf

public static void mayBecomeAnySubclassOf(Category cat)

create

public static void create()
Create the frame and call the constructor defined for instances.


create

public static void create(java.lang.Object arg1)
Create the frame and call the constructor defined for instances.


create

public static void create(Rcvr rcvr)

create

public static void create(java.lang.Object arg1,
                          java.lang.Object arg2)
Create the frame and call the constructor defined for instances.


create

public static void create(java.lang.Object arg1,
                          java.lang.Object arg2,
                          java.lang.Object arg3)
Create the frame and call the constructor defined for instances.


create

public static void create(java.lang.Object arg1,
                          java.lang.Object arg2,
                          java.lang.Object arg3,
                          java.lang.Object arg4)
Create the frame and call the constructor defined for instances.


create

public static void create(java.lang.Object arg1,
                          java.lang.Object arg2,
                          java.lang.Object arg3,
                          java.lang.Object arg4,
                          java.lang.Object arg5)
Create the frame and call the constructor defined for instances.


create

public static void create(java.lang.Object arg1,
                          java.lang.Object arg2,
                          java.lang.Object arg3,
                          java.lang.Object arg4,
                          java.lang.Object arg5,
                          java.lang.Object arg6)
Create the frame and call the constructor defined for instances.


create

public static void create(java.lang.Object arg1,
                          java.lang.Object arg2,
                          java.lang.Object arg3,
                          java.lang.Object arg4,
                          java.lang.Object arg5,
                          java.lang.Object arg6,
                          java.lang.Object arg7)
Create the frame and call the constructor defined for instances.


create

public static void create(java.lang.Object arg1,
                          java.lang.Object arg2,
                          java.lang.Object arg3,
                          java.lang.Object arg4,
                          java.lang.Object arg5,
                          java.lang.Object arg6,
                          java.lang.Object arg7,
                          java.lang.Object arg8)
Create the frame and call the constructor defined for instances.


new1

public static void new1(Symbol allocType)
This does nothing in smalltalk, but allows translated code to specify
how a new object is allocated. Returns self since Heaper creates do
^self new create...


newX

public static Heaper newX(Heaper memory)
Create the frame for a new instance using the identity of memory. This
corresponds to creating the frame in the actual memory in c++. First call the
destructor for memory.


BLAST

public static void BLAST(Symbol problem)

blast

public static void blast(Problem problem)
raise an exception


PROBLEM

public static void PROBLEM(java.lang.Object exception)

problems

public static void problems()
A ProblemList for all X++ BLASTs


signal

public static Signal signal(Symbol signal)
Define a blast and return a unique and persistent signal for it.


signals

public static Signal signals(Array signals)
Define a set of blasts blast and return a SignalCollection.


IntegerVar

public static void IntegerVar(java.lang.Object x)

scheduleTermination

public static void scheduleTermination()
In xpp, smainx.cxx defines this to set a flag requesting server termination after current
request.


collectibleClasses

public static void collectibleClasses()
Return the list of classes whose instances need to be garbage
collected. I don't know whether this needs to return the locked
or unlocked versions of classes.


garbageCollect

public static void garbageCollect()

garbageCollectFrom

public static void garbageCollectFrom(java.lang.Object roots)
This is an attept to simulate the X++ garbage collector.
Only instances of the classes returned by Heaper>collectibleClasses
will actually get deleted. Further, this assumes that it gets run
after all operations are finished because it doesn't mark instances
from objects on the stack (it could be made to...).


gcOpportunity

public static void gcOpportunity()
A no-op method in smalltalk to tell c++ it is a good time to garbage collect.


gcOpportunity

public static void gcOpportunity(java.lang.Object anInt)
A no-op method in smalltalk to tell c++ it is a good time to garbage collect.


inGC

public static boolean inGC()
Some destructors need to have different behavior during garbage
collection, since some of their instance variables may already have
been collected. In X++, this will return true during garbage
collection.


isConstructed

public static boolean isConstructed(VoidStar obj)

isDestructed

public static boolean isDestructed(VoidStar obj)

setGC

public static void setGC(boolean flag)
Some destructors need to have different behavior during garbage
collection, since some of their instance variables may already have
been collected. In X++, this will return true during garbage
collection.


addPackageCategory

public static void addPackageCategory(PackageCategory packageCat)
add a package category to my list


fetchAttribute

public static Symbol fetchAttribute(java.lang.Object attr)
get information attached to the given attribute, or NULL if none


inspectPieces

public static void inspectPieces()

packageClasses

public static OrderedCollection packageClasses()
return my packages classes and create if needed


registerPackageCategory

public static Category registerPackageCategory(PackageCategory packageCat)
a package category can be added; remember it and return what its contents class should be


abstractDeclarationFor

public static java.lang.String abstractDeclarationFor(Symbol aSymbol)

abstractTypeFor

public static java.lang.String abstractTypeFor(Symbol aSymbol)

copyReferencesToType

public static void copyReferencesToType(Symbol symb)
Return the list of variables in this class that is non-copy.


nonCopyVariables

public static void nonCopyVariables()
Return the list of variables in this class that is non-copy.


subclassNonCopyVariables

public static void subclassNonCopyVariables()
Return the list of variables in this class that is non-copy.


constantTypeValue

public static void constantTypeValue(Symbol constant,
                                     java.lang.String type,
                                     Heaper value)
define a global constant


makeFillTable

public static void makeFillTable(java.lang.Object filename)

computePreorder

public static void computePreorder(java.lang.Object mine)
Set my preorder number and pass it on down recursively to my subclasses. Return the next
unused preorder number.


preorderMax

public static void preorderMax()

preorderNumber

public static void preorderNumber()

pointerToStaticMember

public static void pointerToStaticMember(Symbol selector)

pointerToStaticMember

public static void pointerToStaticMember(Symbol selector,
                                         java.lang.String typeString)

pointerToVirtualMember

public static void pointerToVirtualMember(Symbol selector)

info_clientClasses

public static void info_clientClasses()
XuHeaper XuAdminer XuArchiver XuBundle XuArrayBundle XuElementBundle XuPlaceHolderBundle
XuCalc XuCalcCreator XuCoordinateSpace XuCrossSpace XuFilterSpace XuIDSpace XuIntegerSpace
XuRealSpace XuSequenceSpace XuFillRangeDetector XuFillDetector XuGateKeeper XuServer
XuKeyMaster XuLock XuBooLock XuChallengeLock XuMatchLock XuMultiLock XuWallLock XuMapping
XuCrossMapping XuIntegerMapping XuSequenceMapping XuOrderSpec XuCrossOrderSpec XuPopSensor
XuPosition XuFilterPosition XuID XuInteger XuReal XuSequence XuTuple XuPrimArray
XuPrimSpec XuPrimFloatSpec XuPrimIntegerSpec XuPrimPointerSpec XuPrimValue XuPrimFloat
XuPrimInteger XuRangeElement XuDataHolder XuEdition XuIDHolder XuLabel XuWork XuClub
XuRational XuRegion XuCrossRegion XuFilter XuIDRegion XuIntegerRegion XuRealRegion
XuSequenceRegion XuRevisionDetector XuSession XuStatusDetector XuStepper XuTableStepper
XuWaitDetector XuWrapper XuClubDescription XuHyperLink XuHyperRef XuMultiRef XuSingleRef
XuLockSmith XuBooLockSmith XuChallengeLockSmith XuMatchLockSmith XuMultiLockSmith
XuWallLockSmith XuPath XuSet XuText XuWrapperSpec


info_clientSideClasses

public static void info_clientSideClasses()
FillRangeDetector FillDetector RevisionDetector StatusDetector WaitDetector Wrapper


info_promiseClasses

public static void info_promiseClasses()
Promise Adminer Archiver Array FloatArray HumberArray IntArray PtrArray Bundle ArrayBundle
ElementBundle PlaceHolderBundle CoordinateSpace CrossSpace FilterSpace IDSpace
IntegerSpace RealSpace SequenceSpace FillRangeDetector FillDetector KeyMaster Lock BooLock
ChallengeLock MatchLock MultiLock WallLock Mapping CrossMapping IntegerMapping
SequenceMapping OrderSpec CrossOrderSpec Position FilterPosition ID Sequence Tuple Integer
Real RangeElement DataHolder Edition IDHolder Label Work Club RevisionDetector Server
Session StatusDetector Stepper TableStepper WaitDetector Wrapper ClubDescription HyperLink
HyperRef MultiRef SingleRef LockSmith BooLockSmith ChallengeLockSmith MatchLockSmith
MultiLockSmith WallLockSmith Path Set Text WrapperSpec Region CrossRegion Filter IDRegion
IntegerRegion RealRegion SequenceRegion Value FloatValue IntValue


info_stProtocol

public static void info_stProtocol()
{void NOLOCK CLIENT} destroy
{UInt32 CLIENT} actualHashForEqual
{BooleanVar CLIENT} isEqual: other {Heaper}


takeOop

public static int takeOop()


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