SaffronMakeTypeBoundsImpl.mesa
Copyright Ó 1987 by Xerox Corporation. All rights reserved.
Generated by BJackson.pa at April 27, 1987 11:24:13 pm PDT
using ThreeCasabaFour [1.1] of April 14, 1987 6:34:07 pm PDT
DIRECTORY
CedarBaseContext,
SaffronAG6Def,
CedarBaseMisc,
CedarBaseTypeAux,
ThreeC4Support,
SaffronATDef,
CedarBaseType;
SaffronMakeTypeBoundsImpl: CEDAR PROGRAM IMPORTS CedarBaseMisc, CedarBaseTypeAux, ThreeC4Support, CedarBaseType EXPORTS SaffronAG6Def=
BEGIN
OPEN CedarBaseContext, SaffronAG6Def, CedarBaseMisc, CedarBaseTypeAux, ThreeC4Support, SaffronATDef, CedarBaseType;
BoundsProdMakeTypeBounds: PUBLIC PROC[ref: REF ANY, leftClosed: BOOLEAN, rightClosed: BOOLEAN, typeIndex: TypeIndex, localContext: LocalContext, ribContext: RibContext, typeGraph: TypeGraph] RETURNS[temp0: TypeNode, temp1: TypeBounds, temp2: LocalContext, temp3: TypeGraph] =
BEGIN
tree: BoundsNode← NARROW[ref];
BEGIN
ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length];
treeData: BoundsProdData ← NARROW[tree.data];
BEGIN
bounds: TypeBounds;
upperOrdinal: OrdinalValue;
localContext3: LocalContext;
typeGraph3: TypeGraph;
lowerOrdinal: OrdinalValue;
localContext2: LocalContext;
typeGraph2: TypeGraph;
assert: BOOLEAN;
typeNode: TypeNode;
localContext1: LocalContext;
typeGraph1: TypeGraph;
[typeNode, localContext1, typeGraph1] ← FetchType[typeGraph, typeIndex, localContext, ribContext];
assert ← Assert[IsEnumType[typeNode], "only subranges of enums are allowed", BotchAction.quit];
[lowerOrdinal, localContext2, typeGraph2] ← treeData.Boundlower.procs.MakeTypeBound[treeData.Boundlower, typeIndex, localContext1, ribContext, typeGraph1];
[upperOrdinal, localContext3, typeGraph3] ← treeData.Boundupper.procs.MakeTypeBound[treeData.Boundupper, typeIndex, localContext2, ribContext, typeGraph2];
bounds ← BuildTypeBounds[lowerOrdinal, upperOrdinal, leftClosed, rightClosed];
temp3 ← typeGraph3;
temp2 ← localContext3;
temp1 ← bounds;
temp0 ← typeNode;
END;
END
END;
END..