DIRECTORY
IPInterpreter USING [PopVector, Ref],
Interpress USING [LogProc],
IPExecute USING [CallPreamble, DoTopAction],
IPMaster USING [Vector, Preamble];
IPExecuteImpl:
CEDAR
PROGRAM
IMPORTS IPExecute, IPInterpreter
EXPORTS IPExecute
~ {
emptyVec: PUBLIC IPMaster.Vector ← IPInterpreter.ZeroVec[0];
topFrame: PUBLIC IPMaster.Vector ← IPInterpreter.ZeroVec[IPInterpreter.topFrameSize];
topEnv: PUBLIC IPMaster.Vector ← emptyVec; -- empty vector, for now
ExecutePreamble:
PUBLIC
PROC [self: IPInterpreter.Ref, preamble: IPMaster.Preamble, frame, env: IPMaster.Vector, log: Interpress.LogProc] ~ {
action:
PROC ~ {
IPExecute.CallPreamble[self: self, preamble: preamble, frame: frame, env: env];
self.topFrame ← IPInterpreter.PopVector[self];
self.topEnv ← IPInterpreter.PopVector[self];
};
IPExecute.DoTopAction[self, action, log];
};
}.