SaffronNewScopeImpl.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Generated by BJackson.pa at April 27, 1987 11:24:14 pm PDT
using ThreeCasabaFour [1.1] of April 14, 1987 6:34:07 pm PDT
DIRECTORY
CedarBaseContext,
SaffronAG4Def,
CedarBaseMisc,
CedarBaseTypeAux,
ThreeC4Support,
SaffronATDef,
CedarBaseType;
SaffronNewScopeImpl: CEDAR PROGRAM IMPORTS CedarBaseContext, CedarBaseMisc, CedarBaseTypeAux, ThreeC4Support, CedarBaseType EXPORTS SaffronAG4Def=
BEGIN
OPEN CedarBaseContext, SaffronAG4Def, CedarBaseMisc, CedarBaseTypeAux, ThreeC4Support, SaffronATDef, CedarBaseType;
ScopeProdNewScope: PUBLIC PROC[ref: REF ANY, ribContext: RibContext, typeGraph: TypeGraph] RETURNS[temp0: ContextTree, temp1: TypeGraph] =
BEGIN
tree: ScopeNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: ScopeProdData ← NARROW[tree.data];
BEGIN
contextTree: ContextTree;
nestedContexts: ContextTreeList;
junk1: BOOLEAN;
junk: BOOLEAN;
newRibContext: RibContext;
localContext3: LocalContext;
typeGraph3: TypeGraph;
localContext2: LocalContext;
typeGraph2: TypeGraph;
localContext1: LocalContext;
typeGraph1: TypeGraph;
localContext: LocalContext;
localContext ← CreateLocalContext[];
[localContext1, typeGraph1] ← treeData.OptDecList.procs.PreprocessDecls[treeData.OptDecList, localContext, typeGraph];
[localContext2, typeGraph2] ← treeData.OptDecList.procs.ProcessDecls[treeData.OptDecList, localContext1, ribContext, typeGraph1];
[localContext3, typeGraph3] ← FetchAllSizes[typeGraph2, localContext2, ribContext];
newRibContext ← ExtendRibContext[ribContext, localContext3];
junk ← PrintLocalContext[localContext3, Output[]];
junk1 ← PrintTypeGraph[typeGraph3, Output[]];
nestedContexts ← BuildEmptyContextTreeList[];
contextTree ← BuildContextTree[newRibContext, nestedContexts];
temp1 ← typeGraph3;
temp0 ← contextTree;
END;
END
END;
END..