DIRECTORY ConvertUnsafe USING [LS, SubString], FS USING [nullOpenFile, OpenFile], Symbols, SymbolSegment, TimeStamp USING [Stamp], Tree USING [Link], VM USING [Interval, nullInterval]; SymbolOperations: DEFINITIONS = BEGIN Base: TYPE = Symbols.Base; BitAddress: TYPE = Symbols.BitAddress; BitCount: TYPE = Symbols.BitCount; BTIndex: TYPE = Symbols.BTIndex; CSEIndex: TYPE = Symbols.CSEIndex; CTXIndex: TYPE = Symbols.CTXIndex; CTXNull: CTXIndex = Symbols.CTXNull; ExtIndex: TYPE = SymbolSegment.ExtIndex; ExtNull: ExtIndex = SymbolSegment.ExtNull; ExtensionType: TYPE = Symbols.ExtensionType; FGTEntry: TYPE = SymbolSegment.FGTEntry; FieldBitCount: TYPE = Symbols.FieldBitCount; ISEIndex: TYPE = Symbols.ISEIndex; ISENull: ISEIndex = Symbols.ISENull; HashVector: TYPE = Symbols.HashVector; HTRecord: TYPE = Symbols.HTRecord; HVIndex: TYPE = Symbols.HVIndex; Linkage: TYPE = Symbols.Linkage; LongString: TYPE = ConvertUnsafe.LS; MDIndex: TYPE = Symbols.MDIndex; MDNull: MDIndex = Symbols.MDNull; Name: TYPE = Symbols.Name; nullName: Name = Symbols.nullName; RecordSEIndex: TYPE = Symbols.RecordSEIndex; RefClass: TYPE = Symbols.RefClass; STHeader: TYPE = SymbolSegment.STHeader; STHeaderPtr: TYPE = LONG POINTER TO STHeader; SubString: TYPE = ConvertUnsafe.SubString; TransferMode: TYPE = Symbols.TransferMode; Type: TYPE = Symbols.Type; TypeClass: TYPE = Symbols.TypeClass; WordCount: TYPE = Symbols.WordCount; SymbolTableBase: TYPE = REF SymbolTableBaseRep; SymbolTableBaseRep: TYPE = RECORD [ interval: VM.Interval _ VM.nullInterval, file: FS.OpenFile _ FS.nullOpenFile, hashVec: LONG POINTER TO HashVector _ NIL, -- hash index ht: LONG DESCRIPTOR FOR ARRAY Name OF HTRecord _ NIL, -- hash table ssb: LongString _ NIL, -- id string seb: Base _ NIL, -- se table ctxb: Base _ NIL, -- context table mdb: Base _ NIL, -- module directory base bb: Base _ NIL, -- body table tb: Base _ NIL, -- tree area ltb: Base _ NIL, -- literal area extb: Base _ NIL, -- extension map mdLimit: MDIndex _ MDNull, -- module directory size extLimit: ExtIndex _ ExtNull, -- extension size mainCtx: CTXIndex _ CTXNull, stHandle: STHeaderPtr _ NIL, sourceFile: LongString _ NIL, fgTable: LONG DESCRIPTOR FOR ARRAY OF FGTEntry _ NIL ]; Acquire: PROC [file: FS.OpenFile, startPage: CARDINAL, pages: CARDINAL] RETURNS [stb: SymbolTableBase _ NIL]; Release: PROC [stb: SymbolTableBase]; FindString: PROC [stb: SymbolTableBase, s: SubString] RETURNS [name: Name]; HashValue: PROC [stb: SymbolTableBase, s: SubString] RETURNS [HVIndex]; SubStringForName: PROC [stb: SymbolTableBase, name: Name] RETURNS[s: SubString]; CtxEntries: PROC [stb: SymbolTableBase, ctx: CTXIndex] RETURNS [n: CARDINAL]; FirstCtxSe: PROC [stb: SymbolTableBase, ctx: CTXIndex] RETURNS [ISEIndex]; NextSe: PROC [stb: SymbolTableBase, sei: ISEIndex] RETURNS [ISEIndex]; SearchContext: PROC [stb: SymbolTableBase, name: Name, ctx: CTXIndex] RETURNS [ISEIndex]; SeiForValue: PROC [stb: SymbolTableBase, value: CARDINAL, ctx: CTXIndex] RETURNS [ISEIndex]; FindMdi: PROC [stb: SymbolTableBase, stamp: TimeStamp.Stamp] RETURNS [MDIndex]; ArgCtx: PROC [stb: SymbolTableBase, type: CSEIndex] RETURNS [CTXIndex]; ArgRecord: PROC [stb: SymbolTableBase, type: CSEIndex] RETURNS [RecordSEIndex]; ClusterSe: PROC [stb: SymbolTableBase, type: Type] RETURNS [Type]; NormalType: PROC [stb: SymbolTableBase, type: CSEIndex] RETURNS [CSEIndex]; RecordLink: PROC [stb: SymbolTableBase, type: RecordSEIndex] RETURNS [RecordSEIndex]; RecordRoot: PROC [stb: SymbolTableBase, type: RecordSEIndex] RETURNS [root: RecordSEIndex]; ReferentType: PROC [stb: SymbolTableBase, type: CSEIndex] RETURNS [CSEIndex]; TransferTypes: PROC [stb: SymbolTableBase, type: Type] RETURNS [typeIn, typeOut: RecordSEIndex]; TypeForm: PROC [stb: SymbolTableBase, type: Type] RETURNS [TypeClass]; TypeLink: PROC [stb: SymbolTableBase, type: Type] RETURNS [Type]; TypeRoot: PROC [stb: SymbolTableBase, type: Type] RETURNS [root: Type]; UnderType: PROC [stb: SymbolTableBase, type: Type] RETURNS [CSEIndex]; XferMode: PROC [stb: SymbolTableBase, type: Type] RETURNS [TransferMode]; BitsForRange: PROC [stb: SymbolTableBase, maxValue: CARDINAL] RETURNS [nBits: CARDINAL _ 1]; BitsForType: PROC [stb: SymbolTableBase, type: Type] RETURNS [BitCount _ 0]; BitsPerElement: PROC [stb: SymbolTableBase, type: Type, packed: BOOL] RETURNS [BitCount]; Cardinality: PROC [stb: SymbolTableBase, type: Type] RETURNS [LONG CARDINAL]; FindExtension: PROC [stb: SymbolTableBase, sei: ISEIndex] RETURNS [type: ExtensionType, tree: Tree.Link]; FnField: PROC [stb: SymbolTableBase, field: ISEIndex] RETURNS [offset: BitAddress, size: FieldBitCount]; NameForSe: PROC [stb: SymbolTableBase, sei: ISEIndex] RETURNS [Name]; LinkMode: PROC [stb: SymbolTableBase, sei: ISEIndex] RETURNS [Linkage]; RecField: PROC [stb: SymbolTableBase, field: ISEIndex] RETURNS [offset: BitAddress, size: FieldBitCount]; RCType: PROC [stb: SymbolTableBase, type: CSEIndex] RETURNS [RefClass]; VariantField: PROC [stb: SymbolTableBase, type: CSEIndex] RETURNS [ISEIndex]; WordsForType: PROC [stb: SymbolTableBase, type: Type] RETURNS [WordCount]; ParentBti: PROC [stb: SymbolTableBase, bti: BTIndex] RETURNS [BTIndex]; SiblingBti: PROC [stb: SymbolTableBase, bti: BTIndex] RETURNS [BTIndex]; SonBti: PROC [stb: SymbolTableBase, bti: BTIndex] RETURNS [BTIndex]; EnumerateBodies: PROC [stb: SymbolTableBase, root: BTIndex, proc: PROC [BTIndex] RETURNS [stop: BOOL]] RETURNS [bti: BTIndex]; END. HSymbolOperations.mesa Russ Atkinson, October 17, 1983 4:13 pm This file has been shamelessly ripped off from SymbolOps.mesa of July 6, 1983 1:36 pm. It is meant as an eventual replacement, which would permit symbol tables to exist without the use of global frames or excessive MDS (hooray!). There is NO provision for table movement! the basis for our symbols tables defining the current symbol table info defining the source file links hash manipulation context management module management type manipulation information returning procedures body table management Κ €˜šœ™J™'—J˜Jšœ‘™‘J˜šΟk ˜ Jšœœœ ˜$Jšœœ˜"Jšœ˜Jšœ˜Jšœ œ ˜Jšœœ˜Jšœœ˜"—J˜šœ ˜Jšœ˜—˜Jšœœ˜Jšœ œ˜&Jšœ œ˜"Jšœ œ˜ Jšœ œ˜"šœ œ˜"Jšœ$˜$—šœ œ˜(Jšœ*˜*—Jšœœ˜,Jšœ œ˜(Jšœœ˜,šœ œ˜"Jšœ$˜$—Jšœ œ˜&Jšœ œ˜"Jšœ œ˜ Jšœ œ˜ Jšœ œœ˜$šœ œ˜ Jšœ!˜!—šœœ˜Jšœ"˜"—Jšœœ˜,Jšœ œ˜"Jšœ œ˜(Jš œ œœœœ ˜-Jšœ œ˜*Jšœœ˜*Jšœœ˜Jšœ œ˜$Jšœ œ˜$J˜Jšœœœ˜/•PostFix32 sp tabStops•postfix32 sp tabStops•postFix32 sp tabStopsšœœœ˜#šœ™Jšœ œ œ˜(Jšœœ œ˜$—– 32 sp tabStop–32 sp tabstops–32 sp tabStopsšœ(™(J– 32 sp tabStop–32 sp tabstops–32 sp tabStopsš œ œœœœΟc ˜8J– 32 sp tabStop–32 sp tabstops–32 sp tabStopsšœœ œœœœ œž ˜CJ– 32 sp tabStop–32 sp tabstops–32 sp tabStopsšœœž ˜#J– 32 sp tabStop–32 sp tabstops–32 sp tabStopsšœ œž ˜J– 32 sp tabStop–32 sp tabstops–32 sp tabStopsšœ œž˜"J– 32 sp tabStop–32 sp tabstops–32 sp tabStopsšœ œž˜)J– 32 sp tabStop–32 sp tabstops–32 sp tabStopsšœ œž ˜J– 32 sp tabStop–32 sp tabstops–32 sp tabStopsšœ œž ˜J– 32 sp tabStop–32 sp tabstops–32 sp tabStopsšœ œž˜ J– 32 sp tabStop–32 sp tabstops–32 sp tabStopsšœ œž˜"J– 32 sp tabStop–32 sp tabstops–32 sp tabStopsšœž˜3J– 32 sp tabStop–32 sp tabstops–32 sp tabStopsšœž˜/J– 32 sp tabStop–32 sp tabstops–32 sp tabStopsšœ˜J– 32 sp tabStop–32 sp tabstops–32 sp tabStopsšœœ˜—–32 sp tabStops–32 sp tabStops–32 sp tabStopsšœ#™#J–32 sp tabStops–32 sp tabStops–32 sp tabStopsšœœ˜J–32 sp tabStops–32 sp tabStops–32 sp tabStopsš œ œ œœœœ ˜4—J–32 sp tabStops–32 sp tabStops–32 sp tabStops˜J–32 sp tabStops–32 sp tabStops–32 sp tabStops˜—šΟnœ˜ Jšœœœ œ˜9Jšœœ˜%—J˜šŸœœ˜%J˜—šœ™J™JšŸ œœ&œ˜KJ˜JšŸ œœ&œ ˜GJ˜JšŸœœ$œ˜P—J™šœ™J™šŸ œœ'œœ˜MJ˜—šŸ œœ'œ ˜JJ˜—šŸœœ'œ ˜FJ˜—šŸ œ˜Jšœ2œ ˜EJ˜—šŸ œ˜Jšœœœ ˜J—J™—šœ™J™šŸœ˜ Jšœ/œ ˜A—J™—šœ™J™šŸœœ(œ ˜GJ˜—šŸ œ˜Jšœ'œ˜?J˜—šŸ œœ$œ˜BJ˜—šŸ œœ(œ ˜KJ˜—šŸ œ˜Jšœ,œ˜DJ˜—šŸ œ˜Jšœ,œ˜JJ˜—šŸ œ˜Jšœ'œ ˜:J˜—šŸ œ˜Jšœ"œ"˜LJ˜—šŸœœ$œ ˜FJ˜—šŸœœ$œ˜AJ˜—šŸœœ$œ˜GJ˜—šŸ œœ$œ ˜FJ˜—JšŸœœ$œ˜I—J™šœ ™ J˜šŸ œ˜Jšœ!œœ œ˜IJ˜—šŸ œœ$œ˜LJ˜—šŸœ˜Jšœ+œœ ˜DJ˜—š Ÿ œœ$œœœ˜MJ˜—šŸ œ˜Jšœ&œ(˜UJ˜—šŸœ˜ Jšœ'œ+˜ZJ˜—šŸ œœ'œ˜EJ˜—šŸœœ'œ ˜GJ˜—šŸœ˜Jšœ'œ+˜ZJ˜—šŸœœ(œ ˜GJ˜—šŸ œœ(œ ˜MJ˜—JšŸ œœ$œ ˜J—J™šœ™J™šŸ œœ&œ ˜GJ˜—šŸ œœ&œ ˜HJ˜—šŸœœ&œ ˜DJ˜—šŸœ˜Jšœ,œ œœ˜PJšœ˜———J˜Jšœ˜J˜J˜—…—r#^