DIRECTORY RCMap USING[Base, Index], SymbolTable USING[Base], Symbols USING[SEIndex, MDIndex]; RCMapOps: DEFINITIONS = BEGIN MapMap: TYPE = LONG POINTER TO MapMapObj; -- built by Include MapMapObj: TYPE = RECORD[SEQUENCE length: CARDINAL OF MapMapItem]; MapMapItem: TYPE = RECORD[old, new: RCMap.Index]; Initialize: PROC[ptr: RCMap.Base, nPages: CARDINAL, expansionOK: BOOL _ FALSE]; Finalize: PROC; EstablishOuter: PROC[outerProc: PROC [stb: SymbolTable.Base, mdi: Symbols.MDIndex, inner: PROC[base: SymbolTable.Base]]]; GetBase: PROC RETURNS[base: RCMap.Base, nWords: CARDINAL]; Acquire: PROC[stb: SymbolTable.Base, sei: Symbols.SEIndex] RETURNS[rcmx: RCMap.Index]; Include: PROC[rcmb: RCMap.Base, nWords: CARDINAL, zone: UNCOUNTED ZONE _ NIL] RETURNS[MapMap]; FindMapMapEntry: PROC[mapMap: MapMap, oldIndex: RCMap.Index] RETURNS[RCMap.Index]; Enumerate: PROC[base: RCMap.Base, nWords: CARDINAL, proc: PROC[RCMap.Index] RETURNS[stop: BOOLEAN]] RETURNS[stopped: BOOLEAN]; END. BEWARE: If you allow expansion of the RCMap Base, you must be careful about concurrent access to the existing Base. In current Cedar, for performance reasons (all accesses to the Base would have to be protected by a monitor), the Cedar runtime does not allow expansion (ERROR if RCMap Base overflows). Because it has its own RCMap.Base and is not re-entrant, the compiler (also binder) is able to specify an expansion zone (and does so) without needing a monitor. ΊRCMapOps.mesa Copyright c 1985 by Xerox Corporation. All rights reserved. Rovner On September 19, 1983 9:31 pm Russ Atkinson (RRA) January 31, 1985 1:11:22 pm PST TYPEs Establish the specified Base as the "current" one. ASSUME ptr was allocated by VM.Allocate Establish an Outer proc Retrieve info about the current RCMap.Base Returns an RCMap.Index in the current RCMap.Base of the RCMap for the specified type. Makes an entry if necessary. Merges the specified RCMap.Base into the current one. If zone # NIL, allocates and returns a MapMap Does a MapMap lookup: returns the index in the current RCMap.Base that corresponds to the specified index in the RCMap.Base that Include processed. Κ.˜codešœ ™ Kšœ Οmœ1™Kš œ žœžœžœ žœžœ ˜BKšœ žœžœ˜1˜Kšœ2™2Kšœ'™'—š Οn œžœžœžœžœ˜OK˜—Kš œžœ˜˜Kšœ™—š œžœ žœ˜