GenericCall.mesa
Last tweaked by Mike Spreitzer on December 18, 1989 4:24:20 pm PST
GenericCall: DEFINITIONS =
BEGIN
Size: TYPE ~ INT--I'd like to say [0..INT.LAST], but PrincOps can't compile that--;
Pointer: TYPE ~ CARD32 --so they can be seen with Cirio--;
Nil: Pointer ~ 0;
bitsPerUnit: Size ~ BITS[UNIT];
bitsPerWord: Size ~ BITS[WORD];
unitsPerWord: Size ~ UNITS[WORD];
divides: BOOL[TRUE..TRUE] ~ ((bitsPerWord MOD bitsPerUnit) = 0);
Fields: TYPE ~ REF FieldSeq;
FieldSeq: TYPE ~ RECORD [SEQUENCE length: NAT OF Field];
FieldList: TYPE ~ LIST OF Field;
Field:
TYPE ~
RECORD [
address: Pointer,
bitOffset: Size,
bits: Size];
nilField: Field ~ [Nil, 0, 0];
SizeList: TYPE ~ LIST OF Size;
ProcRep: TYPE ~ LONG POINTER TO ProcPair;
ProcPair: TYPE ~ RECORD [startPC, flag: Pointer];
Call: PROC [proc: ProcRep, formalArgSizes, formalRetSizes: SizeList, actualArgs, actualRets: Fields];
Seqifields: PROC [FieldList] RETURNS [Fields];
Unimplemented: ERROR;
BadArgs: ERROR;
END.