
<<file Code.mesa>>
<<last modified by Sweet, 14-Dec-81  9:17:53>>
<<last modified by Satterthwaite, April 16, 1986 2:30:24 pm PST>>

DIRECTORY
CodeDefs: TYPE USING [CaseCVState, CCIndex, EnableIndex, LabelCCIndex, Lexeme],
CompilerUtil: TYPE USING [],
P5: TYPE USING [Module],
SourceMap: TYPE USING [Loc],
Symbols: TYPE USING [ContextLevel, CTXIndex, ISEIndex, RecordSEIndex, CCBTIndex];

Code: PROGRAM 
IMPORTS P5 EXPORTS CompilerUtil =
BEGIN OPEN CodeDefs;

<<the following variables are shared among the code generation modules>>

curctxlvl: PUBLIC Symbols.ContextLevel;
codeStart, codeptr: PUBLIC CCIndex;
bodyRetLabel, bodyComRetLabel: PUBLIC LabelCCIndex;
bodyRecurLabel: PUBLIC LabelCCIndex;
bodyInRecord, bodyOutRecord: PUBLIC Symbols.RecordSEIndex;
bodyStartLoc: PUBLIC SourceMap.Loc;
mainBody: PUBLIC BOOL;
ZEROlexeme: PUBLIC Lexeme.literal.word;
tailJumpOK: PUBLIC BOOL;
caseCVState: PUBLIC CaseCVState;
mwCaseCV: PUBLIC Lexeme;
fileLoc, inlineFileLoc: PUBLIC SourceMap.Loc;
tempcontext: PUBLIC Symbols.CTXIndex;
firstTemp, tempstart, framesz: PUBLIC CARDINAL;
xtracting: PUBLIC BOOL;
xtractlex: PUBLIC Lexeme;
xtractsei: PUBLIC Symbols.ISEIndex;
warnStackOverflow: PUBLIC BOOL;

inlineRetErrorLabel, inlineRetErrorListLabel: PUBLIC LabelCCIndex;
catchcount: PUBLIC CARDINAL;
catchoutrecord: PUBLIC Symbols.RecordSEIndex;
actenable: PUBLIC Symbols.CCBTIndex;
enableLevel: PUBLIC CARDINAL;
enableList: PUBLIC ARRAY [0..15] OF EnableIndex;

StackNotEmptyAtStatement: PUBLIC SIGNAL = CODE;
CodeNotImplemented: PUBLIC SIGNAL = CODE;
CodePassInconsistency: PUBLIC SIGNAL = CODE;


P5module: PUBLIC PROC =
BEGIN -- starts the code generation pass
P5.Module[];
END;

END.

