DIRECTORY Alloc: TYPE USING [Notifier, AddNotify, DropNotify], ComData: TYPE USING [matched, monitored, table, tC0, tC1, textIndex, zone], CompilerUtil: TYPE USING [], P4: TYPE USING [ Attr, voidAttr, BCDNotify, DeclNotify, LayoutNotify, ExpANotify, ExpBNotify, ExpCNotify, OpsNotify, StmtNotify, AssignEntries, AssignImports, Body, DeclItem, ExpInit, ExpReset, FinishBCD, InitBCD, MatchBCD, ProcessDirectory, ProcessExports, ProcessImports, VarInit], Symbols: TYPE USING [ Base, CSEIndex, RecordSEIndex, RecordSENull, RootBti, typeANY], Tree: TYPE USING [Base, Index, Link, NullIndex, treeType], TreeOps: TYPE USING [FreeNode, GetNode]; Pass4: PROGRAM IMPORTS Alloc, TreeOps, P4, dataPtr: ComData EXPORTS CompilerUtil = { OPEN TreeOps, Symbols; tb: Tree.Base; -- tree base address (local copy) tTRUE: PUBLIC Tree.Link; tFALSE: PUBLIC Tree.Link; P4Notify: PUBLIC Alloc.Notifier = { tb _ base[Tree.treeType]; P4.BCDNotify[base]; P4.DeclNotify[base]; P4.LayoutNotify[base]; P4.StmtNotify[base]; P4.OpsNotify[base]; P4.ExpANotify[base]; P4.ExpBNotify[base]; P4.ExpCNotify[base]}; returnRecord, resumeRecord: PUBLIC RecordSEIndex; implicitType: PUBLIC CSEIndex; -- assumed type of empty implicitBias: PUBLIC INTEGER; -- assumed bias of empty implicitAttr: PUBLIC P4.Attr; -- assumed attributes of empty lockNode: PUBLIC Tree.Index; resident: PUBLIC BOOL; P4Unit: PUBLIC PROC [unit: Tree.Link] = { node: Tree.Index; (dataPtr.table).AddNotify[P4Notify]; tTRUE _ dataPtr.tC1; tFALSE _ dataPtr.tC0; implicitType _ typeANY; implicitBias _ 0; implicitAttr _ P4.voidAttr; resumeRecord _ RecordSENull; P4.ExpInit[dataPtr.zone]; node _ GetNode[unit]; Module[node ! P4.VarInit => {RESUME [TRUE]}]; P4.ExpReset[]; FreeNode[node]; (dataPtr.table).DropNotify[P4Notify]}; Module: PROC [node: Tree.Index] = { subNode: Tree.Index = GetNode[tb[node].son[6]]; saveIndex: CARDINAL = dataPtr.textIndex; dataPtr.textIndex _ tb[subNode].info; P4.InitBCD[tb[subNode].son[1], dataPtr.zone]; dataPtr.textIndex _ tb[node].info; lockNode _ IF ~dataPtr.monitored THEN Tree.NullIndex ELSE GetNode[tb[node].son[5]]; resident _ tb[node].attr1; P4.AssignEntries[Symbols.RootBti]; P4.AssignImports[tb[node].son[2]]; P4.DeclItem[tb[node].son[6]]; P4.Body[Symbols.RootBti]; P4.ProcessDirectory[tb[node].son[1]]; P4.ProcessImports[tb[node].son[2]]; tb[node].son[3] _ P4.ProcessExports[tb[node].son[3]]; P4.FinishBCD[tb[subNode].son[1]]; IF dataPtr.matched THEN dataPtr.matched _ P4.MatchBCD[]; dataPtr.textIndex _ saveIndex}; }. ´file Pass4.Mesa last modified by Satterthwaite, October 4, 1982 10:24 am called by allocator whenever table area is repacked intermediate result bookkeeping overall control Ê[˜J˜Jšœ™Jšœ8™8J˜šÏk ˜ Jšœœœ#˜4Jšœ œœ8˜KJšœœœ˜šœœœ˜J˜J˜$J˜:J˜@J˜J˜;—šœ œœ˜J˜?—Jšœœœ*˜:Jšœ œœ˜(J˜—šœ˜š˜J˜J˜—Jšœ˜Jšœ˜J˜JšœÏc!˜0J˜Jšœœ ˜Jšœœ ˜J˜J˜šœ œ˜#Jšœ3™3J˜J˜(J˜J˜J˜J˜AJ˜J˜—Jšœ™˜Jšœœ˜1J˜Jšœœ ž˜7Jšœœœž˜7Jšœœ ž˜=J˜Jšœ œ ˜Jšœ œœ˜J˜—Jšœ™˜šÏnœœœ˜)J˜J˜$J˜+J˜GJ˜J˜J˜Jšœœœ˜-J˜J˜J˜&J˜—šŸœœ˜#J˜/Jšœ œ˜(J˜%J˜-J˜"Jšœ œœœ˜SJ˜J˜"J˜"J˜J˜J˜%J˜#J˜5J˜!Jšœœ!˜8J˜J˜—J˜J˜J˜———…— Ô ã