SaffronProcessOneDeclImpl.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Generated by BJackson.pa at April 27, 1987 11:24:16 pm PDT
using ThreeCasabaFour [1.1] of April 14, 1987 6:34:07 pm PDT
DIRECTORY
CedarBaseContext,
SaffronAG5Def,
ThreeC4Support,
SaffronATDef,
CedarBaseValue,
CedarBaseType;
SaffronProcessOneDeclImpl: CEDAR PROGRAM IMPORTS CedarBaseContext, ThreeC4Support, CedarBaseType EXPORTS SaffronAG5Def=
BEGIN
OPEN CedarBaseContext, SaffronAG5Def, ThreeC4Support, SaffronATDef, CedarBaseValue, CedarBaseType;
DeclarationtypeProdProcessOneDecl: PUBLIC PROC[ref: REF ANY, typeIndex: TypeIndex, localContext: LocalContext, ribContext: RibContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] =
BEGIN
tree: DeclarationNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: DeclarationtypeProdData ← NARROW[tree.data];
BEGIN
newTypeIndex: TypeIndex;
localContext1: LocalContext;
typeGraph2: TypeGraph;
typeGraph1: TypeGraph;
tempTypeNode: TypeNode;
tempTypeNode ← BuildInaccessibleType[];
typeGraph1 ← SetType[typeGraph, tempTypeNode, typeIndex];
[newTypeIndex, localContext1, typeGraph2] ← treeData.TypeExp.procs.MakeType[treeData.TypeExp, localContext, ribContext, typeGraph1, typeIndex];
temp1 ← typeGraph2;
temp0 ← localContext1;
END;
END
END;
DeclarationvalueProdProcessOneDecl: PUBLIC PROC[ref: REF ANY, dummyTypeIndex: TypeIndex, localContext: LocalContext, ribContext: RibContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] =
BEGIN
tree: DeclarationNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: DeclarationvalueProdData ← NARROW[tree.data];
BEGIN
localContext4: LocalContext;
finalDescriptor: Descriptor;
value: Value;
localContext3: LocalContext;
typeGraph2: TypeGraph;
typeIndex: TypeIndex;
localContext2: LocalContext;
typeGraph1: TypeGraph;
localContext1: LocalContext;
newDescriptor: Descriptor;
newDescriptor ← BuildInaccessibleDescriptor[];
localContext1 ← treeData.IdentList.procs.ReplaceDescriptor[treeData.IdentList, newDescriptor, localContext];
[typeIndex, localContext2, typeGraph1] ← treeData.TypeExp.procs.MakeType[treeData.TypeExp, localContext1, ribContext, typeGraph, UndefinedTypeIndex[]];
[value, localContext3, typeGraph2] ← treeData.Initialization.procs.MakeValue[treeData.Initialization, localContext2, ribContext, typeGraph1, typeIndex];
finalDescriptor ← BuildValueDescriptor[value];
localContext4 ← treeData.IdentList.procs.ReplaceDescriptor[treeData.IdentList, finalDescriptor, localContext3];
temp1 ← typeGraph2;
temp0 ← localContext4;
END;
END
END;
END..