SaffronProgramGraph.Mesa
James Rauen, August 7, 1988 4:19:15 pm PDT
DIRECTORY
Rope USING [ROPE],
SaffronBaseDef USING [ValueNode];
SaffronProgramGraph: CEDAR DEFINITIONS = BEGIN
OPEN BD: SaffronBaseDef;
Parameterized Field Descriptor
ParameterizedFieldDescriptorNode: TYPE = REF ParameterizedFieldDescriptorNodeBody;
ParameterizedFieldDescriptorNodeBody: TYPE = RECORD [
cells: ParameterizedFieldDescriptorCell
];
ParameterizedFieldDescriptorCell: TYPE = REF ParameterizedFieldDescriptorCellBody;
ParameterizedFieldDescriptorCellBody: TYPE = RECORD [
next: ParameterizedFieldDescriptorCell,
k: SELECT kind: * FROM
runtimeIndex => [],
staticIndex  => [index: BD.ValueNode],
fieldName  => [name: Rope.ROPE],
ENDCASE
];
Program Graph
ProgramGraphNode: TYPE = REF ProgramGraphNodeBody;
ProgramGraphNodeBody: TYPE = RECORD [
entry: OperationNode
];
OperationNode: TYPE = REF OperationNodeBody;
OperationNodeBody: TYPE = RECORD [
signalCatchNode: SignalCatchNode,
prim: SELECT primitiveOperation: * FROM
PushConstant      => [op: OpPushConstant],
Test         => [op: OpTest],
UnaryFunction      => [op: OpUnaryFunction],
BinaryFunction      => [op: OpBinaryFunction],
LoadLocal       => [op: OpLoadLocal],
LoadIndirect       => [op: OpLoadIndirect],
StoreLocal       => [op: OpStoreLocal],
StoreIndirect       => [op: OpStoreIndirect],
New         => [op: OpNew],
Call         => [op: OpCall],
Return        => [op: OpReturn],
CreateProcedureDescriptor   => [op: OpCreateProcedureDescriptor],
SetLock        => [op: OpSetLock],
Sleep         => [op: OpSleep],
Wake         => [op: OpWake],
LoadOwnProcess      => [op: OpLoadOwnProcess],
Fork         => [op: OpFork],
Join         => [op: OpJoin],
Detach        => [op: OpDetach],
WaitForCondition     => [op: OpWaitForCondition],
NotifyCondition      => [op: OpNotifyCondition],
BroadcastToCondition    => [op: OpBroadcastToCondition],
EnterMonitor      => [op: OpEnterMonitor],
ExitMonitor       => [op: OpExitMonitor],
EnQueueSelf       => [op: OpEnQueueSelf],
DeQueueSelf       => [op: OpDeQueueSelf],
WakeOneOnQueue     => [op: OpWakeOneOnQueue],
WakeAllOnQueue     => [op: OpWakeAllOnQueue],
LockQueue       => [op: OpLockQueue],
ReleaseQueue      => [op: OpReleaseQueue],
SaveSignalParamters     => [op: OpSaveSignalParamters],
GetCatchNode      => [op: OpGetCatchNode],
GetCatchCodeProcedureDescriptor => [op: OpGetCatchCodeProcedureDescriptor],
GetNextCatchNode     => [op: OpGetNextCatchNode],
AcquireSignalParameters   => [op: OpAcquireSignalParameters],
DeleteCallerPFrame     => [op: OpDeleteCallerPFrame],
ENDCASE
];
SignalCatchNode: TYPE = REF SignalCatchNodeBody;
SignalCatchNodeBody: TYPE = RECORD [];
Stack Primitives
OpPushConstant: TYPE = RECORD [
constant: BD.ValueNode,
nextAction: OperationNode
];
OpTest: TYPE = RECORD [
nextActionIfTrue: OperationNode,
nextActionIfFalse: OperationNode
];
OpUnaryFunction: TYPE = RECORD [
nextActionIfSatisfactoryArguments: OperationNode,
f: SELECT function: * FROM
negate => [], -- these fields should contain next actions for unsatisfactory arguments.
not  => [],
ENDCASE
];
OpBinaryFunction: TYPE = RECORD [
nextActionIfSatisfactoryArguments: OperationNode,
f: SELECT function: * FROM
add  => [],
subtract => [],
multiply => [],
divide => [],
mod  => [],
and  => [],
or   => [],
equal  => [],
notEqual => [],
ENDCASE
];
Load/Store Operations
OpLoadLocal: TYPE = RECORD [
pfd: ParameterizedFieldDescriptorNode,
nextActionIfSatisfactoryIndices: OperationNode,
nextActionIfUnsatisfactoryIndices: OperationNode
];
OpLoadIndirect: TYPE = RECORD [
pfd: ParameterizedFieldDescriptorNode,
nextActionIfSatisfactoryIndices: OperationNode,
nextActionIfUnsatisfactoryIndices: OperationNode,
nextActionIfNilPointer: OperationNode
];
OpStoreLocal: TYPE = RECORD [
pfd: ParameterizedFieldDescriptorNode,
nextActionIfSatisfactoryIndices: OperationNode,
nextActionIfUnsatisfactoryIndices: OperationNode
];
OpStoreIndirect: TYPE = RECORD [
pfd: ParameterizedFieldDescriptorNode,
nextActionIfSatisfactoryIndices: OperationNode,
nextActionIfUnsatisfactoryIndices: OperationNode,
nextActionIfNilPointer: OperationNode
];
END.