MimP5.mesa
Copyright Ó 1985, 1986, 1987, 1988, 1991 by Xerox Corporation. All rights reserved.
Sweet, June 1, 1986 9:02:14 pm PDT
Satterthwaite, November 26, 1985 1:29:52 pm PST
Russ Atkinson (RRA) July 23, 1990 3:17:25 pm PDT
DIRECTORY
IntCodeDefs USING [Handler, Label, Node, NodeList, Var],
MimCode USING [CodeList, LabelInfo, StoreOptions],
MobDefs USING [Link, ModuleIndex],
SourceMap USING [Loc],
Symbols USING [BTIndex, CBTIndex, ContextLevel, CSEIndex, ISEIndex, SEIndex, Type, typeANY],
Tree USING [Index, Link];
MimP5: DEFINITIONS = {
OPEN IntCodeDefs, MimCode, Symbols;
from MimCalls
CountedAllocate: PROC [zone: Node, type: Symbols.SEIndex, catch: Tree.Link, size: Node]
RETURNS [Node];
SysError: PROC RETURNS [Node];
ZoneOp: PROC [zone: Node, which: ZoneOpSelector, args: NodeList, catch: Tree.Link]
RETURNS [Node];
ZoneOpSelector: TYPE = {alloc, free};
from MimDriver
inInline: BOOL;
TRUE iff inside of INLINE expansion (inside of subst or substx)
MakeGlobal: PROC [bits: INT, type: Type ¬ typeANY]
RETURNS [v: Var, sei: ISEIndex];
MakeString: PROC [t: Tree.Link] RETURNS [Node];
ProcDescForBti: PROC [bti: CBTIndex, body: BOOL ¬ FALSE] RETURNS [Node];
returns the descriptor for the indicated procedure
body => return the body
~body => return the address of the body
ProcLabelForBti: PROC [bti: CBTIndex, direct: BOOL ¬ TRUE] RETURNS [Node];
returns a var with code location for the proc label
direct => for direct application
~direct => for proc desc body initialization
PushContext: PROC [label: Label, cl: CodeList, inner: PROC];
Enters a new context (reflected in visibleContext) for the given proc label and code list, calls inner, and then pops the context on the way out. Useful for generating procedure bodies (see MimStmt.SCatchPhrase).
SignalForSei: PROC [sei: ISEIndex] RETURNS [Node];
VarForInterface: PROC [mod: MobDefs.ModuleIndex] RETURNS [Var];
VarForLink: PROC [link: MobDefs.Link, bits: INT] RETURNS [Var];
visibleContext: REF VisibalContextArray;
VisibalContextArray: TYPE = ARRAY Symbols.ContextLevel OF IntCodeDefs.Label;
from MimFlow
FlowExp: PROC [node: Tree.Index] RETURNS [Node];
GetLabelMark: PROC RETURNS [LabelInfo];
LabelCreate: PROC [t: Tree.Link];
LabelList: PROC [cl: CodeList, t: Tree.Link, elabel: Label, mark: LabelInfo];
MakeExitLabel: PROC RETURNS [exit, loop: Label];
from MimCons
All: PROC [t: Tree.Link, node: Tree.Index, options: StoreOptions] RETURNS [Node];
Construct: PROC [t: Tree.Link, node: Tree.Index, options: StoreOptions] RETURNS [Node];
ListCons: PROC [node: Tree.Index] RETURNS [Node];
New: PROC [node: Tree.Index] RETURNS [Node];
RowCons: PROC [t: Tree.Link, node: Tree.Index, options: StoreOptions] RETURNS [Node];
VariantConstruct: PROC [t1, t2: Tree.Link, options: StoreOptions] RETURNS [Node];
from MimExpr
BindStmtExp: PROC [root: Tree.Index, isExp: BOOL] RETURNS [Node];
CaseStmtExp: PROC [root: Tree.Index, isExp: BOOL] RETURNS [Node];
Clarify: PROC [type: Type] RETURNS [CSEIndex];
Removes layers of definition and opaque from the given type.
Normalize: PROC [type: Type] RETURNS [CSEIndex];
Removes layers of definition, subrange and opaque from the given type.
Exp: PROC [t: Tree.Link] RETURNS [IntCodeDefs.Node];
ExpList: PROC [t: Tree.Link, wordPad: BOOL] RETURNS [head, tail: NodeList ¬ NIL];
GetCanonicalType: PROC [tree: Tree.Index] RETURNS [Node];
NarrowExp: PROC [tree: Tree.Index] RETURNS [Node];
TypeRel: PROC [tree: Tree.Index] RETURNS [Node];
VarForSei: PROC [sei: ISEIndex] RETURNS [Var];
from MimStmt
DeclList: PROC [cl: CodeList, t: Tree.Link];
SCatchPhrase: PROC [t: Tree.Link] RETURNS [Handler];
StatementList: PROC [cl: CodeList, t: Tree.Link];
StatementTree: PROC [t: Tree.Link] RETURNS [Node];
WrapSource: PROC [node: Node, loc: SourceMap.Loc] RETURNS [Node];
WrapSourceBlock: PROC [cl: CodeList, bti: BTIndex, hasDecls: BOOL] RETURNS [Node];
}.