DIRECTORY LupineDeclare USING [ PktSite, TransferDeclaration, TransferSite ], LupineManagerPrivate USING [ Nest, Options, ParamPassingMethod, String ], LupineSymbolTable USING [ Index, SymbolHandle, TransferTypes, TypeHandle, Types ]; LupineMarshal: DEFINITIONS = BEGIN OPEN Declare: LupineDeclare, LupineManagerPrivate, ST: LupineSymbolTable; Words: TYPE = LONG INTEGER; Chars: TYPE = --LONG INTEGER-- CARDINAL; Version: TYPE = CARDINAL; ParameterProtocolVersions: PROCEDURE RETURNS [oldestSupported, newestSupported: Version]; ParamInfo: TYPE = REF --READONLY-- ParamInfoObject; ParamInfoNIL: ParamInfo = NIL; TransferDeclaration: TYPE = Declare.TransferDeclaration; TransferSite: TYPE = Declare.TransferSite; PktSite: TYPE = Declare.PktSite; 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_0, overlayParamRecord: Words_0, pktToAllocate: Words_0 ]; 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, 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 ]; OverlayHandling: TYPE = PACKED ARRAY OverlayParamType OF OverlayOperation; OverlayOperation: TYPE = { alreadyInPkt, copyToPkt, leaveInPkt, copyToFrame, justCopyToFrame, error } _ error; VariableNames: TYPE = RECORD [ pkt, overlayPtr, pktLength, pktLimit, lastPkt: String ]; ToPacket: PROCEDURE [ paramInfo: ParamInfo, overlayHandling: OverlayHandling, varNames: VariableNames, nest: Nest ]; FromPacket: PROCEDURE [ paramInfo: ParamInfo, overlayHandling: OverlayHandling, varNames: VariableNames, nest: Nest ]; BeginAllocation: PROCEDURE [ paramInfo: ParamInfo, nest: Nest ] RETURNS [newNest: Nest]; EndAllocation: PROCEDURE [ paramInfo: ParamInfo, justCloseBlocks: BOOLEAN_FALSE, nest: Nest ] RETURNS [newNest: Nest]; END. -- LupineMarshal. File [Ivy]Lupine>LupineMarshal.mesa. Last edited by BZM on 10-Mar-82 16:56:13. LupineMarshal is exported by LupineMarshal*Impl. Last Edited by: Birrell, September 8, 1983 3:41 pm Word and character counts. These parameter protocol versions are checked during remote binding: These routines pull together information needed for marshaling: Must be NIL for argument records, nonNIL for results. These routines actually generate marshaling code: Marshal.ToPacket operations: Marshal.FromPacket operations: Illegal operation: ʘJšœ,™,Jšœ)™)J˜Jšœ0™0JšÏk2™2J˜š ˜ šœœ˜J˜-—šœœ˜J˜,—šœœ˜J˜8J˜J˜——šœ œ˜Jšœœ/œ˜OJ˜J˜—Jšœ™˜Jšœœœœ˜JšœœÏcœœ˜(J˜J˜—JšœD™D˜Jšœ œœ˜J˜šÏnœ ˜$Jšœ-˜4J˜——J˜Jšœ?™?˜Jšœ œœž œ˜3Jšœœ˜J˜Jšœœ˜8Jšœœ˜*Jšœ œ˜ J˜Jšœ œœž˜5Jšœœ˜+šœœ˜J˜E—Jšœœžœ˜CJ˜šœœœ˜ Jšœ œ ˜J˜!J˜Jšœœ˜J˜)J˜J˜Jšœ"œ˜*Jšœ#œ˜+Jš œœœœœ˜>J˜J˜J˜Jšœž˜8Jšœž"˜