<<>> <> <> <> <> <> <> <> PortableCedarRuntimeSupport: CEDAR DEFINITIONS = BEGIN <> <> Version: CARDINAL = 0; <> <> ProcAny: TYPE = PROC ANY RETURNS ANY; ProcPtr: TYPE = LONG POINTER TO ProcAny; Comparison: TYPE = MACHINE DEPENDENT {less(0), equal(1), greater(2)}; PTR: TYPE = POINTER; Word: TYPE = PACKED ARRAY [0..bitsPerWord) OF BIT; bitsPerWord: NAT = 32; <> RefPtr: TYPE = LONG POINTER TO REF; Type: TYPE = MACHINE DEPENDENT { <> nullType (0), lastType (177777B) }; <> ExceptAny: TYPE = SIGNAL ANY RETURNS ANY; <> <<>> HandlerAction: TYPE = {reject, resume, exit}; Handler: TYPE = PROC [context: PTR, except: ExceptAny, rtnPtr: PTR, argPtr: PTR] RETURNS [action: HandlerAction, exitTo: INT]; <> <> <> <<>> <> <> <<>> LockPtr: TYPE = LONG POINTER TO LockRep; LockRep: TYPE; -- for MONITORLOCK CondPtr: TYPE = LONG POINTER TO CondRep; CondRep: TYPE; -- for CONDITION SecureProcess: TYPE[2*SIZE[INT32]]; -- 64 bits of identification of a PROCESS <> <> MixedMul: PROC [x: CARD, y: INT] RETURNS [INT]; <> <> <> <> <> <> <<>> IntMul: PROC [x, y: INT] RETURNS [INT]; <> <> <> <<>> IntDiv: PROC [x, y: INT] RETURNS [INT]; <> <> <> <> <<>> IntMod: PROC [x,y: INT] RETURNS [INT]; <> <> <> <> <<(i.e. FIRST[INT]/-1)>> <<>> <> <> <> <> CardMul: PROC [x, y: CARD] RETURNS [CARD]; <> <> <> <<>> CardDiv: PROC [x, y: CARD] RETURNS [CARD]; <> <> <> <> <> <<>> CardMod: PROC [x, y: CARD] RETURNS [CARD]; <> <> <> <> <> <<>> <> <> <> <> <> <<>> <> <> <<>> <> <<>> RealNeg: PROC [a: REAL32] RETURNS [REAL32]; RealAbs: PROC [a: REAL32] RETURNS [REAL32]; <> <<>> RealCompare: PROC [x, y: REAL] RETURNS [Comparison]; <> <> <<>> RealAdd: PROC [a, b: REAL32] RETURNS [REAL32]; RealSub: PROC [a, b: REAL32] RETURNS [REAL32]; <<(a-b)>> RealMul: PROC [a, b: REAL32] RETURNS [REAL32]; RealDiv: PROC [a, b: REAL32] RETURNS [REAL32]; <<(a/b)>> <<>> FloatInt: PROC [i: INT32] RETURNS [REAL32]; FloatCard: PROC [i: CARD32] RETURNS [REAL32]; RealMax: PROC [a, b: REAL32] RETURNS [REAL32]; <> RealGt: PROC [a, b: REAL32] RETURNS [BOOL]; <<(a>b)>> RealGe: PROC [a, b: REAL32] RETURNS [BOOL]; <<(a>=b)>> <<>> <> <> <> <<>> <> <> <> <> <> <<>> <> <> <> <<>> ZeroDivisor: SIGNAL; <> <<>> BoundsFault: ERROR; <> <<>> <> <<(The compiler does not know the details, and does not use this error explictly).>> <> Fork: PROC [proc: PROC RETURNS [PTR]] RETURNS [SecureProcess]; <> <> <> <> <> Join: PROC [process: SecureProcess] 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]; <> <> <> <> <> <> <<>> ExtensionAlloc: PROC [nWords: INT] RETURNS [PTR]; <> ExtensionFree: PROC [ptr: PTR] RETURNS [PTR ¬ NIL]; <> <<>> <<>> <> <> <<>> CopyModule: PROC; <> <<>> StartModule: PROC [retPtr: PTR, module: PTR, args: PTR]; <> <<>> <> RestartModule: PROC [module: PTR, args: PTR]; <> StopModule: PROC; <> <> <> <<>> PushHandler: PROC [context: PTR, handler: Handler] RETURNS [exitTo: INT]; <> <> <> <<{ >> <> < goto L1;>> < goto L2;>> < CONTINUE;>> < RETRY;>> <<}>> <> <> < b1;>> < b2;>> <<}>> <> <<{>> <> <> <<0 => { b0; PopHandler[] };>> <<1 => { PopHandler[]; goto L1 };>> <<2 => { PopHandler[]; goto L2 };>> <<3 => PopHandler[];>> < NULL; -- should never happen, maybe should be ERROR?>> <> < b1;>> < b2;>> <<};>> <<>> <> <<>> PopHandler: PROC; RaiseSignal: PROC [which: ExceptAny, rtns: PTR, args: PTR]; <> <<>> RaiseError: PROC [which: ExceptAny, args: PTR]; <> <<>> ExceptionBody: PROC; <> <<>> Aborted: ERROR; <> <<>> AbstractionFault: ERROR; <> Unwind: ERROR; <> UnnamedError: ERROR; <> UnnamedSignal: SIGNAL; <> Uncaught: ERROR; <> <<>> RaiseBoundsFault: PROC RETURNS [CARD ¬ 0]; <> <<>> RaiseArithmeticFault: PROC RETURNS [CARD ¬ 0]; <unsigned where the sign bit is set.>> <<>> RaiseAbstractionFault: PROC; <> <> <> <<>> AssignRef: PROC [dstPtr: RefPtr, src: REF]; <> <> AssignRefInit: PROC [dstPtr: RefPtr, src: REF]; <> <> <<>> AssignRefComposite: PROC [dst: PTR, src: PTR, type: Type]; <> <> AssignRefCompositeInit: PROC [dst: PTR, src: PTR, type: Type]; <> <> AssignRefCompositeFault: ERROR; <> GetReferentType: PROC [ref: REF] RETURNS [Type]; <> <> Narrow: PROC [ref: REF, type: Type] RETURNS [REF]; <> <> <<>> NarrowRefFault: ERROR [ref: REF, type: Type]; <> <<>> NarrowFault: ERROR; <> <<>> NilFault: ERROR; <> <<>> CheckProc: PROC [proc: ProcAny] RETURNS [ProcAny]; <> <> <> <<>> NestedProcFault: ERROR [proc: ProcAny]; <> <<>> NewObject: PROC [nUnits: INT, type: Type] RETURNS [REF]; <> <<>> <> MoveWords: PROC [dst: PTR, src: PTR, nWords: NAT]; <> MoveWordsDisjoint: PROC [dst: PTR, src: PTR, nWords: NAT]; <> <<>> EqualWords: PROC [x: PTR, y: PTR, nWords: NAT] RETURNS [BOOL]; <> <<>> MoveBytesDisjoint: PROC [dst: PTR, src: PTR, nBytes: NAT]; <> ExtractField: PROC [base: PTR, offset: INT, bits: [0..bitsPerWord]] RETURNS [Word]; <> <<>> DepositField: PROC [base: PTR, offset: INT, bits: [0..bitsPerWord], word: Word]; <> MoveField: PROC [dst: PTR, dstOffset: INT, src: PTR, srcOffset: INT, bits: NAT]; <> <<>> EqualFields: PROC [x: PTR, xOffset: INT, y: PTR, yOffset: INT, bits: NAT] RETURNS [BOOL]; <> <<>> <> FillFields: PROC [dst: PTR, dstOffset: INT, bits: [0..bitsPerWord], times: NAT, value: Word]; <> FillLongFields: PROC [dst: PTR, dstOffset: INT, src: PTR, srcOffset: INT, bits: NAT, times: NAT]; <> FillWords: PROC [dst: PTR, times: NAT, value: Word]; <> FillLongWords: PROC [dst, src: PTR, nWords: NAT, times: NAT]; <> <<>> <> <> <<>> DebugPutChar: PROC [ch: CHAR]; <> <> <<>> END. <> <> <> <> <> <> <<>> <<>>