DIRECTORY C2CDefs, IntCodeDefs, IntToIntTab; C2CEnables: CEDAR DEFINITIONS = BEGIN Purpose: TYPE = {unknown, proc, enableHandler}; LabelUsageRec: TYPE = RECORD [ lambda: IntCodeDefs.LambdaNode, --the lambda for which this labelusage is defined purposeOfLambda: Purpose ¬ unknown, definedLabels: IntToIntTab.Table ¬ NIL, upLabels: IntToIntTab.Table¬NIL, callers: LIST OF IntCodeDefs.LogicalId ¬ NIL ]; LabelUsage: TYPE = REF LabelUsageRec; LambdaLabelUsage: PROC [id: IntCodeDefs.LogicalId] RETURNS [LabelUsage]; IncEnableNesting: PROC []; DecEnableNesting: PROC []; PopsForJump: PROC [id: IntCodeDefs.LogicalId] RETURNS [INT]; PopsForReturns: PROC [] RETURNS [INT]; END. 6 C2CEnables.mesa Copyright Σ 1987, 1988, 1991 by Xerox Corporation. All rights reserved. Christian Jacobi, February 29, 1988 2:32:49 pm PST --we assume that a lambda is either used as proc or as enableHandler, but not for both --targets of goto's --key: LogicalId of Label; val: >=0 if declared in this procedure --defined only for enable handlers --key: LogicalId of Label; val: number>0 (count) --direct up-labels: labels used, but not defined in this procedure --indirect up-labels: labels used by inner procedure, but not defined in this procedure --defined only for enable handlers --lists enable handlers which directly call this enable handler's lambda --given an lambda - id finds the corresponding labe usage --Used for enables to return information about the up-level goto's --enter a nesting level of code protected with an enable --exit a nesting level of code protected with an enable --returns the number of enable scopes to be poped for a goto from current place to id --returns the number of enable scopes to be poped for a return from current place Κζ•NewlineDelimiter –(cedarcode) style™šœ™Icodešœ Οeœ=™HKšœ2™2K˜—šΟk ˜ Kšœ˜Kšœ ˜ Kšœ ˜ K˜—KšΟn œžœž œ˜Kšž˜K˜šœ žœ"˜/KšœV™V—K˜šœžœžœ˜Kšœ Οc1˜QKšœ$˜$šœ"žœ˜(Kš ™Kš A™A—šœž˜ Kšœ#™#Kš 0™0Kš C™CKšœ U™W—šœ žœžœž˜,Kšœ#™#KšœH™H—Kšœ˜—Kšœ žœžœ˜%K˜šŸœžœžœ˜HJš 9™9J™C—K˜šŸœžœ˜K™8—K˜šŸœžœ˜K™7K˜—šŸ œžœžœžœ˜