-- file P5U.mesa
-- last edited by Sweet, 9-Oct-81  9:45:03
-- last edited by Satterthwaite, November 23, 1982 12:49 pm

DIRECTORY
  Alloc: TYPE USING [Handle, Notifier],
  CodeDefs: TYPE USING [
    BYTE, CCIndex, ChunkIndex, CodeCCIndex, CodeChunkType, EnableIndex,
    JumpType, LabelCCIndex, OpWordCount],
  PackageSymbols: TYPE USING [WordIndex],
  Symbols: TYPE USING [CSEIndex, CTXIndex, ISEIndex, RecordSEIndex, SEIndex, CCBTIndex],
  Tree: TYPE USING [Index, Link];

P5U: DEFINITIONS = {
  OPEN Symbols, CodeDefs;

  CgenUtilNotify: Alloc.Notifier;

  AllocCodeCCItem: PROC [n: [0..3]] RETURNS [c: CodeCCIndex];
  BeginCatch: PROC RETURNS [first, cur: CCIndex];
  BitsForOperand: PROC [t: Tree.Link] RETURNS [CARDINAL];
  BitsForType: PROC [sei: SEIndex] RETURNS [CARDINAL];
  CCellAlloc: PROC [t: CodeChunkType];
  CgenUtilInit: PROC [ownTable: Alloc.Handle];
  ComputeFrameSize: PROC [fs: CARDINAL] RETURNS [CARDINAL];
  CreateLabel: PROC RETURNS [c: LabelCCIndex];
  DeleteCell: PROC [c: CCIndex];
  EndCatch: PROC [oldfirst, oldcur: CCIndex];
  EnumerateCaseArms: PROC [node: Tree.Index, action: PROC [t: Tree.Link]];
  FreeChunk: PROC [i: CodeDefs.ChunkIndex, size: CARDINAL];
  FullWordBits: PROC [bits: CARDINAL] RETURNS [CARDINAL];
  GetChunk: PROC [size: CARDINAL] RETURNS [CodeDefs.ChunkIndex];
  InsertLabel: PROC [c: LabelCCIndex];
  LabelAlloc: PROC RETURNS [c: LabelCCIndex];
  LongTreeAddress: PROC [t: Tree.Link] RETURNS [long: BOOL];
  MakeLongTreeLiteral: PROC [d: DESCRIPTOR FOR ARRAY OF WORD, type: CSEIndex] RETURNS [Tree.Link];
  MakeTreeLiteral: PROC [val: WORD] RETURNS [Tree.Link];
  MarkedType: PROC [SEIndex] RETURNS [CSEIndex];
  NewEnableItem: PROC [bti: Symbols.CCBTIndex] RETURNS [EnableIndex];
  NextVar: PROC [sei: ISEIndex] RETURNS [ISEIndex];
  OperandType: PROC [t: Tree.Link] RETURNS [sei: CSEIndex];
  Out0: PROC [i: BYTE];
  Out1: PROC [i: BYTE, p1: WORD];
  Out2: PROC [i: BYTE, p1, p2: WORD];
  Out3: PROC [i: BYTE, p1, p2, p3: WORD];
  OutCatchMark: PROC [index: EnableIndex, start: BOOL];
  OutJump: PROC [jt: JumpType, l: LabelCCIndex];
  OutSource: PROC [index: CARDINAL];
  ParamCount: PROC [c: CodeCCIndex] RETURNS [CARDINAL];
  PrevVar: PROC [ssei, sei : ISEIndex] RETURNS [ISEIndex];
  PushLitVal: PROC [v: UNSPECIFIED];
  RecordConstant: PROC [offset: PackageSymbols.WordIndex, length: CARDINAL];
  ReferentType: PROC [type: SEIndex] RETURNS [SEIndex];
  TreeLiteral: PROC [t: Tree.Link] RETURNS [BOOL];
  TreeLiteralValue: PROC [t: Tree.Link] RETURNS [WORD];
  TypeForTree: PROC [t: Tree.Link] RETURNS [SEIndex];
  VariantTag: PROC [type: SEIndex, ctx: CTXIndex] RETURNS [WORD];
  WordAligned: PROC [tsei: RecordSEIndex] RETURNS [BOOL];
  WordsForOperand: PROC [t: Tree.Link] RETURNS [OpWordCount];
  WordsForSei: PROC [sei: SEIndex] RETURNS [OpWordCount];
  WordsForString: PROC [nChars: CARDINAL] RETURNS [CARDINAL];

  }.