<> <> <> <> 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..