ParamInfo: TYPE = REF --READONLY-- ParamInfoObject;
ParamInfoNIL: ParamInfo = NIL;
TransferDeclaration: TYPE = {inInterface, inRoutine};
TransferSite: TYPE = {caller, callee};
PktSite: TYPE = {stubFrame, rpcRuntime};
ParamIndex: TYPE = ST.Index[0..256); -- Origin is 1.
ParamRecordKind: TYPE = {argument, result};
ParamLocation:
TYPE = {
inFrame, inPktOverlay, inFrameAndOverlay, inConversation, inStream };
OverlayParamType: TYPE = {static, address, other --must be last--};
ParamInfoObject:
TYPE =
RECORD [
paramRecord: ST.TypeHandle,
paramRecordKind: ParamRecordKind,
pktSite: PktSite,
transferType: ST.TransferTypes,
transferDeclaration: TransferDeclaration,
transferSite: TransferSite,
options: Options,
alwaysOnePkt, alwaysMultiplePkts: BOOLEAN,
hasOverlayParams, hasConversation: BOOLEAN,
hasOverlayParamType: PACKED ARRAY OverlayParamType OF BOOLEAN,
adrInfo: AddressInfo,
allocInfo: AllocInfo,
sizeOf: SizeInfo,
paramCount: ParamIndex, -- Of explicit parameters only.
RESULTCount: ParamIndex, -- Already included in paramCount.
RESULTsParamInfo: PRIVATE ParamInfo,
fields: PRIVATE SEQUENCE boundsCheck: ParamIndex OF FieldInfo ];
AddressInfo:
TYPE =
RECORD [
isStatic, isAddress, isDynamic, isTransfer: BOOLEAN←FALSE,
hasStatics, hasAddresses, hasDynamics, hasTransfers: BOOLEAN←FALSE,
hasGC, hasHeap, hasMds: BOOLEAN←FALSE,
hasShortPtrs: BOOLEAN←FALSE ];
FalseAddressInfo: AddressInfo = [];
SizeInfo:
TYPE =
RECORD [
overlayHeader: Words𡤀,
overlayParamRecord: Words𡤀,
pktToAllocate: Words𡤀 ];
ZeroSizeInfo: SizeInfo = [];
AllocZone: TYPE = {gc, heap, mds};
AllocDetails:
TYPE =
RECORD [
number: INTEGER ← 0,
isDynamic: BOOLEAN ← FALSE ];
AllocInfo: TYPE = PACKED ARRAY AllocZone OF AllocDetails;
NoAllocations: AllocInfo = [];
FieldInfo:
TYPE =
RECORD [
type: ST.Types,
passingMethod: ParamPassingMethod,
location: ParamLocation,
overlayParamType: OverlayParamType,
adrInfo: AddressInfo,
allocInfo: AllocInfo,
size: Words,
minFlatSize, maxFlatSize: Words ];
MakeParamInfo:
PROCEDURE [
paramRecord: ST.TypeHandle,
paramRecordKind: ParamRecordKind,
pktSite: PktSite,
RESULTsParamInfo: ParamInfo←ParamInfoNIL,
Must be NIL for argument records, nonNIL for results.
transferType: ST.TransferTypes,
transferDeclaration: TransferDeclaration,
transferSite: TransferSite,
options: Options ]
RETURNS[paramInfo: ParamInfo];
FreeParamInfo: PROCEDURE [paramInfo: ParamInfo];
ParamProcedure:
TYPE =
PROCEDURE [
paramName: ST.SymbolHandle,
paramType: ST.TypeHandle,
paramIndex: ParamIndex,
paramFieldInfo: FieldInfo ]
RETURNS[stop: BOOLEAN←FALSE];
EnumerateParams:
PROCEDURE [
paramInfo: ParamInfo,
paramProc: ParamProcedure,
includeRESULTs: BOOLEAN←FALSE ];