
    <<ComData.mesa>>
        <<Copyright © 1985 by Xerox Corporation.  All rights reserved.>>
        <<Satterthwaite, April 18, 1986 2:28:01 pm PST>>
        <<Maxwell, August 2, 1983 2:42 pm>>
        <<Paul Rovner, September 8, 1983 9:53 am>>
        <<Russ Atkinson (RRA) March 6, 1985 10:17:34 pm PST>>

    DIRECTORY
        Alloc: TYPE USING [Handle],
        BcdDefs: TYPE USING [MTHandle, SGRecord, VersionStamp],
        FileParms: TYPE USING [ActualId],
        Fixup: TYPE USING [JIHandle, PCHandle],
        OSMiscOps: TYPE USING [Stamp],
        Rope: TYPE USING [ROPE],
        SourceMap: TYPE USING [Loc],
        Symbols: TYPE USING [ISEIndex, CSEIndex, CTXIndex, CBTIndex, CatchIndex],
        SymbolSegment: TYPE USING [FGTEntry],
        SymbolTable: TYPE USING [Base],
        Tree: TYPE USING [Link];

    ComData: PROGRAM = {
        OPEN Symbols;

    <<shared instance of SymbolTable>>

        ownSymbols: PUBLIC SymbolTable.Base;

    <<basic types (initialized in Pass1)>>

        typeINT, typeCARDINAL: PUBLIC CSEIndex;
        typeBOOL, typeCHAR, typeREAL: PUBLIC CSEIndex;
        typeSTRING, typeStringBody: PUBLIC CSEIndex;
        typeATOM, typeAtomRecord: PUBLIC CSEIndex;
        typeRefANY, typeListANY: PUBLIC CSEIndex;
        typeLOCK, typeCONDITION: PUBLIC CSEIndex;

    <<global info describing module>>

        interface: PUBLIC BOOL;        -- interface module
        outerCtx: PUBLIC CTXIndex;    -- predefined identifiers
        moduleCtx: PUBLIC CTXIndex;    -- module identifiers
        importCtx: PUBLIC CTXIndex;    -- import id context
        exportCtx: PUBLIC CTXIndex;    -- export id context
        mainCtx: PUBLIC CTXIndex;    -- main program's context
        nBodies: PUBLIC CARDINAL;
        nInnerBodies: PUBLIC CARDINAL;
        nSigCodes: PUBLIC CARDINAL;
        defBodyLimit: PUBLIC CARDINAL;
        linkCount: PUBLIC CARDINAL;    -- global control links (externals, etc)
        catchIndex: PUBLIC Symbols.CatchIndex;
        cedar: PUBLIC BOOL;
        monitored: PUBLIC BOOL;
        stopping: PUBLIC BOOL;

    <<type identifiers (initialized in Pass1)>>

        idANY: PUBLIC ISEIndex;
        idINT, idCARDINAL, idCHAR, idBOOL, idREAL, idSTRING: PUBLIC ISEIndex;
        idTEXT: PUBLIC ISEIndex;
        idLOCK: PUBLIC ISEIndex;
        idATOM: PUBLIC ISEIndex;

    <<anonymous entry for undeclared ids>>

        seAnon: PUBLIC ISEIndex;

    <<symbolic constants>>

        tC0, tC1: PUBLIC Tree.Link;
        idUNWIND: PUBLIC ISEIndex;

    <<scratch storage>>

        table: PUBLIC Alloc.Handle;

    <<compilation options>>

        switches: PUBLIC PACKED ARRAY CHAR['a..'z] OF BOOL;

    <<input>>

        source: PUBLIC FileParms.ActualId;
        sourceTokens: PUBLIC CARDINAL;

        pattern: PUBLIC FileParms.ActualId;    -- old bcd to match
        matched: PUBLIC BOOL;

    <<variables used for error reporting>>

        nErrors: PUBLIC CARDINAL;
        nWarnings: PUBLIC CARDINAL;
        bodyIndex: PUBLIC CBTIndex;    -- current body
        textIndex: PUBLIC SourceMap.Loc;    -- start index of phrase with error

    <<output>>

        compilerVersion: PUBLIC BcdDefs.VersionStamp;

        <<objectFile: Rope.ROPE;>>
        objectVersion: PUBLIC BcdDefs.VersionStamp;
        objectStamp: PUBLIC OSMiscOps.Stamp;

        codeOffsetList: PUBLIC Fixup.PCHandle;
        codeByteOffsetList: PUBLIC Fixup.PCHandle;
        jumpIndirectList: PUBLIC Fixup.JIHandle;

        globalFrameSize: PUBLIC CARDINAL;
        objectBytes: PUBLIC CARDINAL;
        catchBytes: PUBLIC CARDINAL;

        fgTable: PUBLIC LONG DESCRIPTOR FOR ARRAY OF SymbolSegment.FGTEntry _ NIL;

        bcdSeg, codeSeg, symSeg: PUBLIC BcdDefs.SGRecord;
        mtRoot: PUBLIC BcdDefs.MTHandle _ NIL;
        mtRootSize: PUBLIC CARDINAL;
        fixupLoc: PUBLIC LONG CARDINAL;

        }.

