DeferringTypes.mesa
Copyright Ó 1991, 1992 by Xerox Corporation. All rights reserved.
Last tweaked by Mike Spreitzer December 16, 1991 12:01 pm PST
Laurie Horton, July 17, 1992 1:25 pm PDT
DIRECTORY
CirioTypes USING [CompilerContext, Type];
DeferringTypes: CEDAR DEFINITIONS =
BEGIN
CC: TYPE = CirioTypes.CompilerContext;
Type: TYPE = CirioTypes.Type;
CreateDeferringType: PROC [cc: CC] RETURNS [Type];
Returns a direct (not indirect) type.
CirioCode.GetTypeClass[type] = $defer
CCTypes.GetTypeRepresentation will return the undertype, or NIL.
SetUndertype: PROC [deferring, under: Type];
Called exactly once after the deferring type is created. Methods of the deferring type simply invoke methods of the under type, or err if the under type hasn't been set yet.
GetUndertype: PROC [deferring: Type] RETURNS [Type];
IsDeferring: PROC [Type] RETURNS [BOOL];
UndertypeStar: PROC [deferring: Type] RETURNS [Type];
Return the "last" under type for this deferring type. If deferring is not a deferring type, return deferring.
END.