<> <> <> <> DIRECTORY CedarBaseContext, SaffronAG7Def, SaffronAG5Def, SaffronAG4Def, CedarBaseMisc, ThreeC4Support, CedarBaseNarrow, SaffronATDef, CedarBaseType; SaffronProcessDeclsImpl: CEDAR PROGRAM IMPORTS CedarBaseContext, CedarBaseMisc, ThreeC4Support, CedarBaseNarrow, CedarBaseType EXPORTS SaffronAG7Def, SaffronAG5Def, SaffronAG4Def= BEGIN OPEN CedarBaseContext, SaffronAG7Def, SaffronAG5Def, SaffronAG4Def, CedarBaseMisc, ThreeC4Support, CedarBaseNarrow, SaffronATDef, CedarBaseType; OptDecListabsentProdProcessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, ribContext: RibContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] = BEGIN tree: OptDecListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; temp1 _ XTypeGraph[typeGraph]; temp0 _ XLocalContext[localContext]; END END; OptDecListpresentProdProcessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, ribContext: RibContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] = BEGIN tree: OptDecListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: OptDecListpresentProdData _ NARROW[tree.data]; [temp0, temp1] _ treeData.DecList.procs.ProcessDecls[treeData.DecList, localContext, ribContext, typeGraph]; END END; DecListmanyProdProcessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, ribContext: RibContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] = BEGIN tree: DecListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: DecListmanyProdData _ NARROW[tree.data]; BEGIN localContext2: LocalContext; typeGraph2: TypeGraph; localContext1: LocalContext; typeGraph1: TypeGraph; [localContext1, typeGraph1] _ treeData.DecListhead.procs.ProcessDecls[treeData.DecListhead, localContext, ribContext, typeGraph]; [localContext2, typeGraph2] _ treeData.DecListtail.procs.ProcessDecls[treeData.DecListtail, localContext1, ribContext, typeGraph1]; temp1 _ typeGraph2; temp0 _ localContext2; END; END END; DecListoneProdProcessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, ribContext: RibContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] = BEGIN tree: DecListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: DecListoneProdData _ NARROW[tree.data]; [temp0, temp1] _ treeData.Declaration.procs.ProcessDecls[treeData.Declaration, localContext, ribContext, typeGraph]; END END; DeclarationopaquetypeProdProcessDecls: PUBLIC PROC[ref: REF ANY, 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: DeclarationopaquetypeProdData _ NARROW[tree.data]; [temp0, temp1] _ treeData.IdentList.procs.ProcessDecls[treeData.IdentList, localContext, ribContext, typeGraph]; END END; DeclarationtypeProdProcessDecls: PUBLIC PROC[ref: REF ANY, 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]; [temp0, temp1] _ treeData.IdentList.procs.ProcessDecls[treeData.IdentList, localContext, ribContext, typeGraph]; END END; DeclarationvalueProdProcessDecls: PUBLIC PROC[ref: REF ANY, 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]; [temp0, temp1] _ treeData.IdentList.procs.ProcessDecls[treeData.IdentList, localContext, ribContext, typeGraph]; END END; IdentListmanyProdProcessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, ribContext: RibContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] = BEGIN tree: IdentListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdentListmanyProdData _ NARROW[tree.data]; BEGIN localContext2: LocalContext; typeGraph2: TypeGraph; localContext1: LocalContext; typeGraph1: TypeGraph; [localContext1, typeGraph1] _ treeData.IdentListhead.procs.ProcessDecls[treeData.IdentListhead, localContext, ribContext, typeGraph]; [localContext2, typeGraph2] _ treeData.IdentListtail.procs.ProcessDecls[treeData.IdentListtail, localContext1, ribContext, typeGraph1]; temp1 _ typeGraph2; temp0 _ localContext2; END; END END; IdentListoneProdProcessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, ribContext: RibContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] = BEGIN tree: IdentListNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdentListoneProdData _ NARROW[tree.data]; [temp0, temp1] _ treeData.Ident.procs.ProcessDecls[treeData.Ident, localContext, ribContext, typeGraph]; END END; IdentidProdProcessDecls: PUBLIC PROC[ref: REF ANY, localContext: LocalContext, ribContext: RibContext, typeGraph: TypeGraph] RETURNS[temp0: LocalContext, temp1: TypeGraph] = BEGIN tree: IdentNode_ NARROW[ref]; BEGIN ENABLE ThreeC4Support.GetSourceInfo => RESUME[tree.position, tree.length]; treeData: IdentidProdData _ NARROW[tree.data]; BEGIN temp2: DeclarationNode; assert1: BOOLEAN; assert: BOOLEAN; descriptor: Descriptor; descriptor _ LocalLookup[localContext, treeData.id]; assert _ Assert[Not[IsUndefinedDescriptor[descriptor]], "undefined descriptor", BotchAction.debug]; assert1 _ Assert[Not[IsInaccessibleDescriptor[descriptor]], "inaccessible descriptor", BotchAction.debug]; IF IsSuspendedDescriptor[descriptor] THEN {temp2 _ NarrowToDeclaration[DescriptorGetDecl[descriptor]]; [temp0, temp1] _ temp2.procs.ProcessOneDecl[temp2, UndefinedTypeIndex[], localContext, ribContext, typeGraph]; } ELSE {IF IsValueDescriptor[descriptor] THEN {temp1 _ XTypeGraph[typeGraph]; temp0 _ XLocalContext[localContext]; } ELSE {BEGIN temp3: DeclarationNode; typeNode: TypeNode; typeIndex: TypeIndex; typeIndex _ GetType[descriptor]; typeNode _ RawFetchType[typeGraph, typeIndex]; IF IsSuspendedType[typeNode] THEN {temp3 _ NarrowToDeclaration[GetTypeDecl[typeNode]]; [temp0, temp1] _ temp3.procs.ProcessOneDecl[temp3, typeIndex, localContext, ribContext, typeGraph]; } ELSE {temp1 _ XTypeGraph[typeGraph]; temp0 _ XLocalContext[localContext]; }; END; }; }; END; END END; END..