Procedures.mesa
Sturgis, January 27, 1989 4:03:29 pm PST
Last changed by Theimer on July 16, 1989 4:41:39 pm PDT
Spreitze, January 9, 1992 10:32 am PST
DIRECTORY
CirioTypes USING[BasicTypeInfo, CompilerContext, Node, Type],
IO USING[STREAM];
Procedures: CEDAR DEFINITIONS =
BEGIN
CC: TYPE = CirioTypes.CompilerContext;
Node: TYPE = CirioTypes.Node;
Type: TYPE = CirioTypes.Type;
BasicTypeInfo: TYPE = CirioTypes.BasicTypeInfo;
CreateProcedureType: PROC[args, results: Type, cc: CC, bti: BasicTypeInfo] RETURNS[Type];
CirioCode.GetTypeClass[type] = $procedure
CCTypes.GetTypeRepresentation will return bti.
CreateProcLiteralType: PROC [proc: ProcLiteral, cc: CC] RETURNS [Type];
CirioCode.GetTypeClass[type] = $procedure
CCTypes.GetTypeRepresentation will return NIL.
ProcedureNodeInfo: TYPE = REF ProcedureNodeInfoBody;
ProcedureNodeInfoBody: TYPE = RECORD[
call: PROC[args: Node, cc: CC, data: REF ANY] RETURNS[Node],
show: PROC[to: IO.STREAM, data: REF ANY, depth, width: INT],
data: REF ANY];
ProcLiteral: TYPE = REF ProcLiteralBody;
ProcLiteralBody: TYPE = RECORD [
procType: Type,
procNodeInfo: ProcedureNodeInfo
];
CreateProcedureNode: PROC[type: Type, info: ProcedureNodeInfo] RETURNS[Node];
Procedure nodes support the getRepresentation object procedure (CedarCode.GetNodeRepresentation). They return the info parameter supplied to the Create call.
CreateProcLiteralNode: PROC [proc: ProcLiteral, cc: CC] RETURNS [Node];
END.