<> <> <> <> <<>> <> DIRECTORY Rope USING [ROPE], SafeStorage USING [nullType, Type]; RTTCache: CEDAR DEFINITIONS = BEGIN OPEN Rope, SafeStorage; ProcKey: TYPE = PROC ANY RETURNS ANY; InvalidIndex: ERROR; IntEntry: TYPE = REF IntEntryRep; IntEntryRep: TYPE = RECORD [ next: IntEntry _ NIL, valid: BOOL _ FALSE, type: Type _ nullType, proc: ProcKey _ NIL, int: INT _ -1]; RefEntry: TYPE = REF RefEntryRep; RefEntryRep: TYPE = RECORD [ next: RefEntry _ NIL, valid: BOOL _ FALSE, type: Type _ nullType, proc: ProcKey _ NIL, ref: REF _ NIL]; ComponentMap: TYPE = REF ComponentMapRep; ComponentMapRep: TYPE = RECORD [ filledTypes, filledNames: CARDINAL _ 0, comps: SEQUENCE len: CARDINAL OF ComponentEntry]; ComponentEntry: TYPE = RECORD [ validType, validName: BOOL _ FALSE, type: Type _ nullType, name: ROPE _ NIL]; NullComponentEntry: ComponentEntry = [FALSE, FALSE, nullType, NIL]; LookupInt: PROC [type: Type, proc: ProcKey] RETURNS [entry: IntEntry]; < entry.int is OK>> FillIntEntry: PROC [entry: IntEntry, value: INT] RETURNS [alreadyFull: BOOL]; <> <> ClearIntEntry: PROC [entry: IntEntry]; <> <> GetInt: PROC [entry: IntEntry] RETURNS [value: INT, valid: BOOL]; <> LookupRef: PROC [type: Type, proc: ProcKey] RETURNS [entry: RefEntry]; <> < entry.ref is OK>> FillRefEntry: PROC [entry: RefEntry, value: REF] RETURNS [alreadyFull: BOOL]; <> <> ClearRefEntry: PROC [entry: RefEntry]; <> <> GetRef: PROC [entry: RefEntry] RETURNS [value: REF, valid: BOOL]; <> GetStats: PROC RETURNS [intProbes, intMisses, intFilled, refProbes, refMisses, refFilled: INT]; <> NewComponentMap: PROC [len: NAT] RETURNS [map: ComponentMap]; <> FillNameComponent: PROC [map: ComponentMap, index: INT, name: ROPE] RETURNS [alreadyFull: BOOL]; <> <> <> FillTypeComponent: PROC [map: ComponentMap, index: INT, type: Type] RETURNS [alreadyFull: BOOL]; <> <> <> GetComponentAtIndex: PROC [map: ComponentMap, index: INT] RETURNS [comp: ComponentEntry]; <> <> GetComponentForName: PROC [map: ComponentMap, name: ROPE, case: BOOL _ TRUE] RETURNS [index: INT, comp: ComponentEntry]; <> <> <> END.