DIRECTORY IP USING [AGet, Any, Array, ArrayFromVector, ASet, Context, ContextRep, CurrentPool, Get, Integer, Marker, MasterError, nullMarker, Operator, OperatorFromPool, Pool, Pop, PopInteger, Push, PushOperator, PushVector, State, Vector, VectorFromArray], IPBase USING []; IPContextImpl: CEDAR PROGRAM IMPORTS IP EXPORTS IP, IPBase ~ BEGIN OPEN IP; NewMarker: PROC[self: State] RETURNS[Marker] ~ { last: Marker ~ self.lastMarker; IF last self.context _ caller]; self.context _ caller; }; GetMarker: PUBLIC PROC[self: State] RETURNS[Marker] ~ { context: Context ~ self.context; IF context=NIL THEN RETURN[nullMarker] ELSE RETURN[context.marker]; }; Frame: PUBLIC PROC[self: State] RETURNS[Vector] ~ { context: Context ~ self.context; IF context.frame=NIL THEN RETURN[context.initialFrame] ELSE RETURN[VectorFromArray[context.frame]]; }; FGet: PUBLIC PROC[self: State, j: Integer] RETURNS[Any] ~ { context: Context ~ self.context; IF context.frame=NIL THEN RETURN[Get[context.initialFrame, j]] ELSE RETURN[AGet[context.frame, j]] }; FSet: PUBLIC PROC[self: State, x: Any, j: Integer] ~ { context: Context ~ self.context; IF context.frame=NIL THEN context.frame _ ArrayFromVector[context.initialFrame]; ASet[context.frame, x, j]; }; PoolOp: PUBLIC PROC[self: State] RETURNS[Pool] ~ { RETURN[self.context.pool] }; PGet: PUBLIC PROC[self: State, j: Integer] RETURNS[Any] ~ { pool: Pool ~ self.context.pool; RETURN[AGet[pool.array, j]]; }; PSet: PUBLIC PROC[self: State, x: Any, j: Integer] ~ { pool: Pool ~ self.context.pool; -- SavePool[self, pool, ...]; -- ASet[pool.array, x, j]; }; Env: PUBLIC PROC[self: State] RETURNS[Vector] ~ { RETURN[self.context.env]; }; ApplyFRAME: PUBLIC PROC[self: State] ~ { PushVector[self, Frame[self]]; }; ApplyFGET: PUBLIC PROC[self: State] ~ { j: Integer ~ PopInteger[self]; Push[self, FGet[self, j]]; }; ApplyFSET: PUBLIC PROC[self: State] ~ { j: Integer ~ PopInteger[self]; x: Any ~ Pop[self]; FSet[self, x, j]; }; ApplyPOOLOP: PUBLIC PROC[self: State] ~ { PushOperator[self, OperatorFromPool[PoolOp[self]]]; }; ApplyPOOL: PUBLIC PROC[self: State] ~ { PushVector[self, CurrentPool[PoolOp[self]]]; }; ApplyPGET: PUBLIC PROC[self: State] ~ { j: Integer ~ PopInteger[self]; Push[self, PGet[self, j]]; }; ApplyPSET: PUBLIC PROC[self: State] ~ { j: Integer ~ PopInteger[self]; x: Any ~ Pop[self]; PSet[self, x, j]; }; ApplyENV: PUBLIC PROC[self: State] ~ { PushVector[self, Env[self]]; }; END. TIPContextImpl.mesa Last edited by: Doug Wyatt, March 3, 1984 5:18:25 pm PST �Êð˜Jšœ™J™šœ™Jšœ(™(J™—šÏk ˜ Jš�œ�œï˜÷Jšœ�œ˜J˜—Jšœ�œ�˜Jš�œ�˜ Jš�œ�œ˜Jšœ�œ�œ�œ˜J˜šÏn œ�œ�œ ˜0Jšœ˜Jš�œ �œ�œ�œ˜9Jš�œ3�œ˜?J˜J˜—šžœ�œ�œ�œ4˜_Jšœ˜Jšœ"Ïc˜;šœ�œŸ˜=Jšœ˜Jšœ�œ˜5Jšœ˜—J˜Jšœ�œ˜/Jšœ˜J˜J˜—šž œ�œ�œ�œ ˜7J˜ Jš�œ �œ�œ�œ ˜&Jš�œ�œ˜J˜—J˜J˜šžœ�œ�œ�œ ˜3J˜ Jš�œ�œ�œ�œ˜6Jš�œ�œ!˜,J˜J˜—šžœ�œ�œ�œ ˜;J˜ Jš�œ�œ�œ�œ˜>Jš�œ�œ˜#J˜J˜—šžœ�œ�œ%˜6J˜ Jš�œ�œ�œ7˜PJšœ˜J˜J˜—J˜š žœ�œ�œ�œ �œ˜OJ˜—šžœ�œ�œ�œ ˜;J˜Jš�œ˜J˜J˜—šžœ�œ�œ%˜6J˜JšŸ ˜ Jšœ˜J˜J˜—J˜šžœ�œ�œ�œ ˜1Jš�œ˜Jšœ˜J˜—J˜šž œ�œ�œ˜(Jšœ˜J˜—šž œ�œ�œ˜'Jšœ˜Jšœ˜J˜—šž œ�œ�œ˜'Jšœ˜Jšœ˜Jšœ˜J˜—šž œ�œ�œ˜)Jšœ3˜3J˜—šž œ�œ�œ˜'Jšœ,˜,J˜—šž œ�œ�œ˜'Jšœ˜Jšœ˜J˜—šž œ�œ�œ˜'Jšœ˜Jšœ˜Jšœ˜J˜—šžœ�œ�œ˜&Jšœ˜J˜—J˜Jš�œ˜—…— „È