DIRECTORY C2CAddressing, C2CBasics, C2CDefs, Rope; C2CRunTime: CEDAR DEFINITIONS = BEGIN ROPE: TYPE = Rope.ROPE; Code: TYPE = C2CDefs.Code; AddressContainer: TYPE = C2CAddressing.AddressContainer; install: READONLY Rope.ROPE; IncludeInstallationSupport: PROC []; IncludeCedarExtra: PROC []; MoveWords: PROC [dst, src: Code, nWords: INT] RETURNS [Code]; MoveWordsDisjoint: PROC [dst, src: Code, nWords: INT] RETURNS [Code]; EqualWords: PROC [x, y: Code, nWords: INT] RETURNS [Code]; MoveBytesDisjoint: PROC [dst, src: Code, nBytes: INT] RETURNS [Code]; ExtractField: PROC [src: AddressContainer, bits: INT] RETURNS [Code]; DepositField: PROC [dst: AddressContainer, bits: INT, word: Code] RETURNS [Code]; MoveField: PROC [dst, src: AddressContainer, bits: INT] RETURNS [Code]; EqualFields: PROC [x, y: AddressContainer, bits: INT] RETURNS [Code]; FillFields: PROC [dst: AddressContainer, bits: INT, times: INT, value: Code] RETURNS [Code]; FillWords: PROC [dst: Code, times: INT, value: Code] RETURNS [Code]; FillLongFields: PROC [dst, src: AddressContainer, bits: INT, times: INT] RETURNS [Code]; FillLongWords: PROC [dst, src: Code, times: INT, nWords: NAT] RETURNS [Code]; RaiseBoundsFault: PROC [] RETURNS [Code]; RaiseAbstractionFault: PROC [] RETURNS [Code]; RaiseArithmeticFault: PROC [] RETURNS [Code]; RaiseUnnamedError: PROC [] RETURNS [Code]; nakedBoundsError: READONLY ROPE; SignedPwr: PROC [base, exp: Code] RETURNS [Code]; UnsignedPwr: PROC [base, exp: Code] RETURNS [Code]; FloatInt: PROC [Code] RETURNS [Code]; FloatCard: PROC [Code] RETURNS [Code]; RealNeg: PROC [Code] RETURNS [Code]; RealAdd: PROC [a, b: Code] RETURNS [Code]; RealSub: PROC [a, b: Code] RETURNS [Code]; RealMul: PROC [a, b: Code] RETURNS [Code]; RealDiv: PROC [a, b: Code] RETURNS [Code]; RealGt: PROC [a, b: Code] RETURNS [Code]; RealGe: PROC [a, b: Code] RETURNS [Code]; RealEq: PROC [a, b: Code] RETURNS [Code]; RealAbs: PROC [Code] RETURNS [Code]; RealMin: PROC [a, b: Code] RETURNS [Code]; RealMax: PROC [a, b: Code] RETURNS [Code]; RealPwr: PROC [base, exp: Code] RETURNS [Code]; nakedUnnamedError: READONLY ROPE; nakedUnwindError: READONLY ROPE; nakedAbortedError: READONLY ROPE; nakedUncaughtError: READONLY ROPE; nakedNarrowFault: READONLY ROPE; PushHandler: PROC [context: Code, handler: Code] RETURNS [Code]; PopHandler: PROC [] RETURNS [Code]; RaiseSignal: PROC [which, rtns, args: Code] RETURNS [Code]; RaiseError: PROC [which, args: Code] RETURNS [Code]; StartModule: PROC [retPtr, module, args: Code] RETURNS [Code]; ExtensionAlloc: PROC [sz: Code] RETURNS [Code]; ExtensionFree: PROC [ptr: Code] RETURNS [Code]; Fork: PROC [processPtr, proc: Code] RETURNS [Code]; Join: PROC [process: Code] RETURNS [Code]; Wait: PROC [cond, lock: Code] RETURNS [Code]; Notify: PROC [cond: Code] RETURNS [Code]; Broadcast: PROC [cond: Code] RETURNS [Code]; MonitorEntry: PROC [lock: Code] RETURNS [Code]; MonitorExit: PROC [lock: Code] RETURNS [Code]; AssignRef: PROC [dstPtr: Code, src: Code] RETURNS [Code]; AssignRefInit: PROC [dstPtr: Code, src: Code] RETURNS [Code]; AssignRefComposite: PROC [dst: Code, src: Code, type: Code, words: INT] RETURNS [Code]; AssignRefCompositeInit: PROC [dst: Code, src: Code, type: Code, words: INT] RETURNS [Code]; NewObject: PROC [nWords: Code, type: Code] RETURNS [Code]; Narrow: PROC [ref: Code, type: Code] RETURNS [Code]; GetReferentType: PROC [ref: Code] RETURNS [Code]; CheckProc: PROC [proc: Code] RETURNS [Code]; END. ~ C2CRunTime.mesa Copyright Σ 1987, 1988, 1990, 1991 by Xerox Corporation. All rights reserved. Christian Jacobi, March 3, 1988 2:47:57 pm PST Christian Jacobi, July 25, 1990 6:02:01 pm PDT Types of this procedures are different from the actual procedures generated. E.g. the return parameter here is the generated code, and not what the actual procedure would return. Installation and Include files name prefix used by Cinder Basics generates code for MoveWords: PROC [dst: PTR, src: PTR, nWords: NAT]; Moves words from the source to the destination. The caller does not assure disjointness. src, dst: actual code included generates code for MoveWordsDisjoint: PROC [dst: PTR, src: PTR, nWords: NAT]; Moves words from the source to the destination. For efficiency, no check is made for overlapping variables, but the caller assures disjointness. src, dst: actual code included generates code for EqualWords: PROC [x: PTR, y: PTR, nWords: NAT] RETURNS [BOOL]; Tests the two multi-word variables for equality. src, dst: actual code included generates code for MoveBytesDisjoint: PROC [dst: PTR, src: PTR, nBytes: NAT]; Moves bytes from the source to the destination. For efficiency, no check is made for overlapping variables, but the caller assures disjointness. src, dst: actual code included generates code for ExtractField: PROC [base: PTR, offset: INT, bits: [0..bitsPerWord]] RETURNS [Word]; Extracts the field from any base pointer at any bit offset. The word returned is the field right-justified with zero bits on the left. src: contains actual code for base, offset generates code for DepositField: PROC [base: PTR, offset: INT, bits: [0..bitsPerWord], word: Word]; Deposits the field to any base pointer at any bit offset. The word given has the bits right-justified. The other bits are ignored. src, word: contains actual code for base, offset, word generates code for MoveField: PROC [dst: PTR, dstOffset: INT, src: PTR, srcOffset: INT, bits: NAT]; Moves field that is bits wide from the src address (plus srcOffset bits) to the dst address (plus dstOffset bits). The caller does not assures disjointness. src, dst: contains actual code for src, srcOffset, dst, dstOffset generates code for EqualFields: PROC [x: PTR, xOffset: INT, y: PTR, yOffset: INT, bits: NAT] RETURNS [BOOL]; Tests fields for equality. src, dst: contains actual code for x, xOffset, y, yOffset generates code for FillFields: PROC [dst: PTR, dstOffset: INT, bits: [0..bitsPerWord], times: NAT, value: Word]; Fills contiguos fields that are each bits wide in the dst address (plus dstOffset bits) for times number of fields. The fill value will be right-justified in value. generates code for FillWords: PROC [dst: PTR, times: NAT, value: Word]; Fills times words at the destination with value. generates code for FillLongFields: PROC [dst: PTR, dstOffset: INT, src: PTR, srcOffset: INT, bits: NAT, times: NAT]; Fills contiguos fields that are bits wide in the dst address (plus dstOffset bits) for times number of fields. The fill value is taken from the src address (plus srcOffset bits). generates code for FillLongWords: PROC [dst, src: PTR, nWords: NAT, times: NAT]; Fills times nWords fields at the destination (dst) with the nWords field at the source (src). Comforts RaiseBoundsFault: PROC [] = {ERROR BoundsFault}; RaiseAbstractionFault: PROC [] = {ERROR ...}; RaiseArithmeticFault: PROC [] RETURNS [num: INT_0] = {ERROR ...}; RaiseUnnamedError: PROC [] RETURNS [num: INT_0] = {ERROR}; Arithmetic BoundsFault: ERROR; 32 bit precision Signed if macro implementation; argument may not be evaluated twice unless specified 32 bit precision Unsigned if macro implementation; argument may not be evaluated twice unless specified 32 bit precision Floating point if macro implementation; argument may not be evaluated twice unless specified --may re-evaluate argument --may re-evaluate arguments --may re-evaluate arguments 64 bit precision Floating point NOT YET AVAILABLE Signaller UnnamedError: ERROR; UnwindError: ERROR; AbortedError: ERROR; UncaughtError: ERROR; NarrowFault: ERROR; PushHandler: PROC [context: PTR, handler: Handler] RETURNS [exitTo: INT]; PopHandler: PROC []; RaiseSignal: PROC [which: ExceptAny, rtns: PTR, args: PTR]; RaiseError: PROC [which: ExceptAny, args: PTR]; Mesa Module nonsense StartModule: PROC [retPtr: PTR, module: PTR, args: PTR]; Starts a module with given arguments. Frame allocation ExtensionAlloc: PROC [nWords: INT] RETURNS [PTR]; Allocates a frame extension large enough to hold nWords worth of data. ExtensionFree: PROC [ptr: PTR] RETURNS [PTR _ NIL]; Frees a frame extension obtained by ExtensionAlloc. Ignores ptr = NIL. Always returns NIL for convenience of assigning back to the link. Monitors & Processes Fork: PROC [processPtr: PTR, proc: ProcAny]; Join: PROC [process: PROCESS] RETURNS [retPtr: PTR]; Wait: PROC [cond: CondPtr, lock: LockPtr]; Notify: PROC [cond: CondPtr]; Broadcast: PROC [cond: CondPtr]; MonitorEntry: PROC [lock: LockPtr]; MonitorExit: PROC [lock: LockPtr]; Cedar AssignRef: PROC [dstPtr: RefPtr, src: REF]; Atomically assigns a reference to a reference-containing cell. AssignRefInit: PROC [dstPtr: RefPtr, src: REF]; Atomically assigns a reference to a reference-containing cell for initialization, without first decrementing RCs of destination. AssignRefComposite: PROC [dst: PTR, src: PTR, type: Type, sz: NAT]; Performs dst^ _ src^, treating the copied variable as being of the specified type (containing refs). Reference-counted fields are treated properly. This operation is definitely not atomic. AssignRefCompositeFault will be raised if an an improper assignment is attempted (i.e. assignment to a variant record). AssignRefCompositeInit: PROC [dst: PTR, src: PTR, type: Type, sz: NAT]; Performs dst^ _ src^, treating the copied variable as being of the specified type. Reference-counted fields are treated properly. This operation is definitely not atomic. AssignRefCompositeFault will be raised if an an improper assignment is attempted (i.e. assignment to a variant record). Assumes this is an initialization of dst^ and therefore does not decrease RCs of destination. NewObject: PROC [nWords: INT, type: Type] RETURNS [REF]; Allocates a new object of the given type from the default zone, using at least nWords of storage, and initializing the type appropriately. Narrow: PROC [ref: REF, type: Type] RETURNS [REF]; Checks to determine that the type of the object is equal to the given type, then returns the original reference. When ref = NIL, NIL is returned and no checking is performed. Raises NarrowFault if the types are different. Useful for NARROW. GetReferentType: PROC [ref: REF] RETURNS [Type]; Gets the referent type of an object from a reference to that object. Returns nullType for ref = NIL. Useful for WITH ref SELECT FROM ... CheckProc: PROC [proc: ProcAny] RETURNS [theSameProc: ProcAny]; Checks the procedure for being assignable. Raises NestedProcError if the proc is nested. Κ •NewlineDelimiter –(cedarcode) style™šœ™Icodešœ ΟeœC™NKšœ.™.Kšœ.™.K™—šΟk ˜ Kšœ˜Kšœ ˜ Kšœ˜Kšœ˜K˜—KšΟn œžœž œ˜Kšž˜J™Kšžœžœžœ˜Kšœžœ˜Kšœžœ"˜8J™Iimp™ML™N™L™—LšΠbl™L˜šœ žœžœ˜L™—K˜KšŸœžœ˜$KšŸœžœ˜L˜L™Lš ™˜šŸ œžœžœžœ˜=L™š Ÿ œžœžœžœ žœ™2KšœY™Y—Kšœ™K™—šŸœžœžœžœ˜EL™š Ÿœžœžœžœ žœ™:Kšœ‘™‘—Kšœ™K™—šŸ œžœžœžœ˜:L™šŸ œžœžœžœ žœžœžœ™>Kšœ0™0—Kšœ™L˜—L˜šŸœžœžœžœ˜EL™š Ÿœžœžœžœ žœ™:Kšœ‘™‘—Kšœ™K™—K™šŸ œžœžœžœ˜EL™š Ÿ œžœžœ žœžœ™SKšœ‡™‡—Kšœ*™*K™—šŸ œžœžœžœ˜QL™šŸ œžœžœ žœ&™PKšœ„™„—Kšœ6™6K™—šŸ œžœ$žœžœ˜GL™šŸ œžœžœ žœžœ žœžœ™PKš œΟzœ‘œ‘ œ‘œ‘ œ2™—KšœA™AK™—šŸ œžœ žœžœ˜EL™šŸ œžœžœ žœžœ žœžœžœžœ™YKšœ™—Kšœ9™9K™—K˜š Ÿ œžœžœ žœžœ˜\K™š Ÿ œžœžœ žœ!žœ™]Kš œ%‘œ ‘œ‘ œ ‘œ>‘œ™₯—K˜—šŸ œžœžœžœ˜DK™šŸ œžœžœ žœ™4Kšœ2™2J™——š Ÿœžœ$žœ žœžœ˜XK™šŸœžœžœ žœžœ žœžœ žœ™aKš œ ‘œ ‘œ‘ œ ‘œ5‘œ‘ œ™³K˜——š Ÿ œžœžœ žœžœ˜MK™š Ÿ œžœ žœ žœ žœ™=Kšœ_™_———K˜Jš ™˜šŸœžœžœ˜)KšŸœžœžœ™0—K˜šŸœžœžœ˜.KšŸœžœžœ™-—K˜šŸœžœžœ˜-KšŸœžœžœ™AK™—šŸœžœžœ˜*KšŸœžœžœ™:—K˜—J™Jš  ™ ™šœžœžœ˜ JšŸ œžœ™—J™J™šŸ™J™M—K˜šŸ œžœžœ˜1K˜—J™šŸ™J™M—J™šŸ œžœžœ˜3K˜—J™šŸ™J™M—J™KšŸœžœžœ˜%KšŸ œžœžœ˜&KšŸœžœžœ˜$K˜KšŸœžœžœ˜*KšŸœžœžœ˜*KšŸœžœžœ˜*KšŸœžœžœ˜*K˜KšŸœžœžœ˜)KšŸœžœžœ˜)KšŸœžœžœ˜)K˜šŸœžœžœ˜$JšΟc™—šŸœžœžœ˜*Jš’™—šŸœžœžœ˜*Jš’™K˜—šŸœžœžœ˜/K˜—K˜šŸ™J™—™K˜——Jš  ™ ˜šœžœžœ˜!JšŸ œžœ™K˜—šœžœžœ˜ JšŸ œžœ™—K˜šœžœžœ˜!šŸ œžœ™K™——šœžœžœ˜"JšŸ œžœ™J™—šœžœžœ˜ JšŸ œžœ™—K˜K˜šŸ œžœ žœ˜@KšŸ œžœ"žœ žœ™I—K˜šŸ œžœžœ˜#KšŸ œžœ™—K˜šŸ œžœžœ˜;šŸ œžœžœžœ™;K™——šŸ œžœžœ˜4šŸ œžœžœ™/K™———J™Jš ™˜šŸ œžœžœ˜>š Ÿ œžœ žœ žœžœ™8Kšœ%™%———K˜K˜Jš ™˜šŸœžœ žœ˜/š Ÿœžœ žœžœžœ™1KšœF™F—K˜—šŸ œžœ žœ˜/š Ÿ œžœžœžœžœžœ™3KšœCžœžœ/™Š—K™——K˜Kš ™˜šŸœžœžœ˜3KšŸœžœ"™,—K˜šŸœžœžœ˜*KšŸœžœžœ žœ™4—K˜šŸœžœžœ˜-KšŸœžœ ™*—K˜šŸœžœžœ˜)KšŸœžœ™—K˜šŸ œžœžœ˜,KšŸ œžœ™ K™—šŸ œžœžœ˜/KšŸ œžœ™#K™—šŸ œžœžœ˜.KšŸ œžœ™"——L˜Lš ™˜šŸ œžœžœ˜9šŸ œžœžœ™+Kšœ>™>——L˜šŸ œžœžœ˜=šŸ œžœžœ™/Kšœ€™€Kšœ™——šŸœžœ+žœžœ˜WšŸœžœžœžœ™CKšœ·™·—K™—šŸœžœ+žœžœ˜[šŸœžœžœžœ™GKšœ…™…——L˜šŸ œžœžœ˜:š Ÿ œžœ žœžœžœ™8KšœŠ™Š——K™šŸœžœžœ˜4š Ÿœžœžœžœžœ™2Kšœ}žœžœgžœ™σ——K˜šŸœžœ žœ˜1šŸœžœžœžœ™0Kš œažœžœžœžœ™Š——K˜šŸ œžœžœ˜,šŸ œžœžœ™?KšœY™Y———K™Lšžœ˜K˜—…— ͺ5C