Code.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Sweet, July 23, 1980 10:00 AM
Satterthwaite, April 17, 1986 11:05:49 am PST
Russ Atkinson (RRA) March 6, 1985 11:09:50 pm PST
DIRECTORY
CodeDefs: TYPE USING [CaseCVState, CCIndex, LabelCCIndex, Lexeme],
CompilerUtil: TYPE USING [],
P5: TYPE USING [Module],
SourceMap: TYPE USING [Loc],
Symbols: TYPE USING [ContextLevel, CTXIndex, ISEIndex, RecordSEIndex];
Code: PROGRAM IMPORTS P5 EXPORTS CompilerUtil = {
OPEN CodeDefs;
the following variables are shared among the code generation modules
curctxlvl: PUBLIC Symbols.ContextLevel;
codeptr: PUBLIC CCIndex;
bodyRetLabel, bodyComRetLabel: PUBLIC LabelCCIndex;
reentryLabel: PUBLIC LabelCCIndex;
bodyInRecord, bodyOutRecord: PUBLIC Symbols.RecordSEIndex;
bodyStartLoc: PUBLIC SourceMap.Loc;
mainBody: PUBLIC BOOL;
ZEROlexeme: PUBLIC Lexeme.literal.word;
stking: PUBLIC BOOL;
tailJumpOK: PUBLIC BOOL;
caseCVState: PUBLIC CaseCVState;
mwCaseCV: PUBLIC Lexeme;
fileLoc, inlineFileLoc: PUBLIC SourceMap.Loc;
catchcount: PUBLIC CARDINAL;
catchoutrecord: PUBLIC Symbols.RecordSEIndex;
tempcontext: PUBLIC Symbols.CTXIndex;
firstTemp, tempstart, framesz: PUBLIC CARDINAL;
cfSize: PUBLIC CARDINAL;
cfsi: PUBLIC CARDINAL;
actenable, substenable: PUBLIC LabelCCIndex;
xtracting: PUBLIC BOOL;
xtractlex: PUBLIC Lexeme;
xtractsei: PUBLIC Symbols.ISEIndex;
ACStackOverflow: PUBLIC SIGNAL = CODE;
ACStackUnderflow: PUBLIC SIGNAL = CODE;
StackNotEmptyAtStatement: PUBLIC SIGNAL = CODE;
CodeNotImplemented: PUBLIC SIGNAL = CODE;
DeletingUnreachableCode: PUBLIC SIGNAL = CODE;
CodePassInconsistency: PUBLIC SIGNAL = CODE;
P5module: PUBLIC PROC = { -- starts the code generation pass
P5.Module[]};
}.