P4.Mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
Satterthwaite, April 11, 1986 10:11:47 am PST
Maxwell, August 1, 1983 12:46 pm
Paul Rovner, September 7, 1983 5:57 pm
Russ Atkinson (RRA) March 6, 1985 10:16:28 pm PST
DIRECTORY
Alloc: TYPE USING [Notifier],
BcdDefs: TYPE USING [Link, ModuleIndex],
Literals: TYPE USING [LitDescriptor],
PrincOpsUtils: TYPE USING [BITAND],
Symbols: TYPE,
Tree: TYPE USING [Index, Link, Map, NodeName, Scan];
P4: DEFINITIONS IMPORTS PrincOpsUtils = {
OPEN Symbols;
mark: BOOL = FALSE;
ownGfi: BcdDefs.ModuleIndex = 1;
representations (interim)
Repr: TYPE = [none..all];
signed: CARDINAL = 1;
unsigned: CARDINAL = 2;
long: CARDINAL = 4;
other: CARDINAL = 8;
none: CARDINAL = 0;
both: CARDINAL = signed+unsigned;
all: CARDINAL = other+long+both;
CommonRep: PROC[Repr, Repr] RETURNS[Repr] = LOOPHOLE[PrincOpsUtils.BITAND];
properties (synthesized)
Prop: TYPE = RECORD[
noAssign: BOOL,
noXfer: BOOL,
noSelect: BOOL,
noFreeVar: BOOL,
immutable: BOOL];
fullProp: Prop = [
noAssign:TRUE, noXfer:TRUE, noSelect:TRUE, noFreeVar:TRUE, immutable:TRUE];
emptyProp: Prop = [
noAssign:FALSE, noXfer:FALSE, noSelect:FALSE, noFreeVar:FALSE, immutable:FALSE];
voidProp: Prop = fullProp;
CommonProp: PROC[Prop, Prop] RETURNS[Prop] = LOOPHOLE[PrincOpsUtils.BITAND];
attributes
Attr: TYPE = RECORD[prop: Prop, rep: Repr];
voidAttr: Attr = [prop: voidProp, rep: none];
CommonAttr: PROC[Attr, Attr] RETURNS[Attr] = LOOPHOLE[PrincOpsUtils.BITAND];
lengths and register counts
OpWordCount: TYPE = CARDINAL; -- size of operands for builtins
RegCount: TYPE = [0..32);
maxRegs: RegCount = RegCount.LAST;
literal values
WordSeq: TYPE = RECORD[SEQUENCE length: CARDINAL OF WORD];
ValueDescriptor: TYPE = REF WordSeq;
notifiers
BCDNotify, DeclNotify, LayoutNotify, StmtNotify: Alloc.Notifier;
OpsNotify, ExpANotify, ExpBNotify, ExpCNotify: Alloc.Notifier;
exported by Pass4B
AssignImports: Tree.Scan;
InitBCD: PROC[Tree.Link];
FinishBCD: Tree.Scan;
MakeEPLink: PROC[ep: CARDINAL, gfi: BcdDefs.ModuleIndex] RETURNS[BcdDefs.Link];
MatchBCD: PROC RETURNS[BOOL];
ProcessDirectory: Tree.Scan;
ProcessExports: Tree.Map;
ProcessImports: Tree.Scan;
ProcessSymLiterals: PROC;
exported by Pass4D
BiasForType: PROC[Type] RETURNS[INTEGER];
CanonicalType: PROC[Type] RETURNS[Type];
ComparableType: PROC[Type] RETURNS[BOOL];
DeclItem: Tree.Scan;
DeclUpdate: Tree.Map;
DefaultBasicOps: PROC[Type, BitCount] RETURNS[BOOL];
MaxCardinality: PROC[Type, BOOL, WordCount] RETURNS[LONG CARDINAL];
RepForType: PROC[Type] RETURNS[Repr];
SparseRep: PROC[Type] RETURNS[BOOL];
TypeExp: PROC[typeExp: Tree.Link, body, indirect: BOOLFALSE];
TypeForTree: PROC[Tree.Link] RETURNS[Type];
WordsForType: PROC[Type] RETURNS[WordCount];
VarInit: SIGNAL RETURNS[BOOL];
exported by Pass4L
AssignEntries: PROC[BTIndex];
BitsForType: PROC[Type] RETURNS[BitCount];
CheckBlock: PROC[BTIndex];
CheckFields: PROC[RecordSEIndex, CARDINAL];
LayoutArgs: PROC[RecordSEIndex, CARDINAL, BOOL] RETURNS[CARDINAL];
LayoutBlock: PROC[BTIndex, CARDINAL] RETURNS[CARDINAL];
LayoutFields: PROC[RecordSEIndex, CARDINAL];
LayoutGlobals: PROC[bti: CBTIndex, stopping, fragments: BOOL] RETURNS[CARDINAL];
LayoutInterface: PROC[CBTIndex] RETURNS[CARDINAL];
LayoutLocals: PROC[CBTIndex] RETURNS[CARDINAL];
exported by Pass4S
currentLevel: VAR ContextLevel;
checked: VAR BOOL;
BindCase: PROC[
Tree.Index, Tree.NodeName, PROC[Tree.Link, INTEGER] RETURNS[Tree.Link]]
RETURNS[Tree.Link];
BindType: PROC[Tree.Index, Tree.Map] RETURNS[Tree.Link];
Body: PROC[CBTIndex];
CaseDriver: PROC[Tree.Index, Tree.Map, INTEGER] RETURNS[Tree.Link];
CatchNest: PROC[Tree.Link];
MarkString: PROC[local: BOOLTRUE];
Subst: PROC[Tree.Index] RETURNS[Tree.Link];
exported by Pass4Ops
RelOp: TYPE = Tree.NodeName [relE .. relLE];
BoolTest: PROC[Tree.Link] RETURNS[BOOL];
FoldExpr: PROC[Tree.Index, Repr] RETURNS[Tree.Link];
IntervalTest: PROC[l,r: Tree.Link, rep: Repr] RETURNS[BOOL];
IntToReal: PROC[Tree.Index] RETURNS[Tree.Link];
LiteralRep: PROC[Tree.Link, Repr] RETURNS[Repr];
LongToShort: PROC[Tree.Index, Repr] RETURNS[Tree.Link];
MakeTreeLiteral: PROC[WORD] RETURNS[Tree.Link];
RelTest: PROC[l,r: Tree.Link, op: RelOp, rep: Repr] RETURNS[BOOL];
ShortToLong: PROC[Tree.Index, Repr] RETURNS[Tree.Link];
StructuredLiteral: PROC[Tree.Link] RETURNS[BOOL];
TreeLiteral: PROC[Tree.Link] RETURNS[BOOL];
TreeLiteralDesc: PROC[Tree.Link] RETURNS[Literals.LitDescriptor];
TreeLiteralValue: PROC[Tree.Link] RETURNS[WORD];
ZeroP: PROC[Tree.Link] RETURNS[BOOL];
exported by Pass4Xa
ConsState: TYPE = {init, first, rest};
Covering: TYPE = {none, partial, full};
All: PROC[node: Tree.Index, cs: ConsState←$init] RETURNS[Tree.Link];
Assignment: PROC[Tree.Index] RETURNS[Tree.Link];
Call: PROC[Tree.Index] RETURNS[Tree.Link];
CheckRange: PROC[Tree.Link, CARDINAL, Type] RETURNS[Tree.Link];
Construct: PROC[node: Tree.Index, cs: ConsState←$init] RETURNS[Tree.Link];
Cover: PROC[lType: Type, lRep: Repr, rType: Type, rRep: Repr] RETURNS[Covering];
Dollar: PROC[Tree.Index] RETURNS[Tree.Link];
Dot: PROC[Tree.Index, Repr] RETURNS[Tree.Link];
Extract: PROC[Tree.Index] RETURNS[Tree.Link];
Index: PROC[Tree.Index] RETURNS[Tree.Link];
ListCons: PUBLIC PROC[Tree.Index] RETURNS[Tree.Link];
MakeArgRecord: PROC[RecordSEIndex, Tree.Link] RETURNS[Tree.Link];
Narrow: PROC[Tree.Index] RETURNS[Tree.Link];
New: PROC[Tree.Index] RETURNS[Tree.Link];
OperandStruct: PROC[Tree.Link] RETURNS[CSEIndex];
PadRecord: PROC[t: Tree.Link, lType: Type] RETURNS[Tree.Link];
RewriteAssign: PROC[Tree.Index, Type] RETURNS[Tree.Link];
Reloc: PROC[Tree.Index] RETURNS[Tree.Link];
Rhs: PROC[exp: Tree.Link, lhsType: Type, cs: ConsState←$init, voidOK: BOOLFALSE]
RETURNS[Tree.Link];
RowConstruct: PROC[node: Tree.Index, cs: ConsState←$init] RETURNS[Tree.Link];
SeqIndex: PROC[Tree.Index] RETURNS[Tree.Link];
Substx: PROC[Tree.Index] RETURNS[Tree.Link];
Union: PROC[node: Tree.Index, cs: ConsState←$init] RETURNS[Tree.Link];
exported by Pass4Xb
ExpInit: PROC;
ExpReset: PROC;
AdjustBias: PROC[Tree.Link, INTEGER] RETURNS[Tree.Link];
BoolValue: PROC[t: Tree.Link] RETURNS[Tree.Link] = INLINE {
RETURN[RValue[t, 0, unsigned]]};
ComputeIndexRegs: PROC[Tree.Index] RETURNS[RegCount];
Exp: PROC[Tree.Link, Repr] RETURNS[Tree.Link];
FillMultiWord: PROC[words: ValueDescriptor, origin: CARDINAL, t: Tree.Link];
ForceType: PROC[Tree.Link, Type] RETURNS[Tree.Link];
LiteralAttr: PROC[Repr] RETURNS[Attr];
MakeStructuredLiteral: PROC[val: WORD, type: Type] RETURNS[Tree.Link];
NeutralExp: Tree.Map;
OperandType: PROC[Tree.Link] RETURNS[Type];
RegsForType: PROC[Type] RETURNS[RegCount];
RValue: PROC[exp: Tree.Link, bias: INTEGER, target: Repr] RETURNS[Tree.Link];
VAttr: PROC RETURNS[Attr];
VBias: PROC RETURNS[INTEGER];
VPop: PROC;
VProp: PROC RETURNS[Prop];
VPush: PROC[bias: INTEGER, attr: Attr, nRegs: RegCount];
VRegs: PROC RETURNS[RegCount];
VRep: PROC RETURNS[Repr];
exported by Pass4Xc
AddrOp: PROC[Tree.Index] RETURNS[Tree.Link];
ConstantInterval: PROC[Tree.Index] RETURNS[origin, range: INTEGER];
Interval: PROC[Tree.Index, INTEGER, Repr] RETURNS[const: BOOL];
Nil: PROC[Tree.Index] RETURNS[Tree.Link];
NormalizeRange: PROC[Tree.Link] RETURNS[Tree.Link];
MiscXfer: PROC[Tree.Index] RETURNS[Tree.Link];
TypeOp: PROC[Tree.Index] RETURNS[Tree.Link];
EmptyInterval: SIGNAL;
}.