DIRECTORY LupineManagerPrivate USING [ Nest, Options, ParamPassingMethod, String ], LupineSymbolTable USING [ Index, SymbolHandle, TransferTypes, TypeHandle, Types ]; LupineMarshal: DEFINITIONS = BEGIN OPEN 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 = {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_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, options: Options ]; FromPacket: PROCEDURE [ paramInfo: ParamInfo, overlayHandling: OverlayHandling, varNames: VariableNames, nest: Nest, options: Options ]; BeginAllocation: PROCEDURE [ paramInfo: ParamInfo, nest: Nest, options: Options ] RETURNS [newNest: Nest]; EndAllocation: PROCEDURE [ paramInfo: ParamInfo, justCloseBlocks: BOOLEAN_FALSE, nest: Nest, options: Options ] RETURNS [newNest: Nest]; END. -- LupineMarshal. ZLupineMarshal.mesa. Copyright c 1985 by Xerox Corporation. All rights reserved. Last edited by BZM on 10-Mar-82 16:56:13. Birrell, September 8, 1983 3:41 pm Bob Hagmann February 8, 1985 5:07:49 pm PST LupineMarshal is exported by LupineMarshal*Impl. 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: Κ-˜headšœ™Icodešœ Οmœ1™<—šœ™Jšœ™Lšœ"™"L™+—J˜Jšœ0™0J˜šΟk ˜ šœžœ˜J˜,—šœžœ˜J˜8J˜J˜——šœž œ˜Jšžœžœžœ˜7J˜J˜—Jšœ™˜Jšœžœžœžœ˜JšœžœΟcœžœ˜(J˜J˜—JšœD™D˜Jšœ žœžœ˜J˜šΟnœž ˜$Jšžœ-˜4J˜——J˜Jšœ?™?˜Jšœ žœžœŸ œ˜3Jšœžœ˜J˜Jšœžœ˜5Jšœžœ˜&Jšœ žœ˜(J˜Jšœ žœžœŸ˜5Jšœžœ˜+šœžœ˜J˜E—JšœžœŸœ˜CJ˜šœžœžœ˜ Jšœ žœ ˜J˜!J˜Jšœžœ˜J˜)J˜J˜Jšœ"žœ˜*Jšœ#žœ˜+Jš œžœžœžœžœ˜>J˜J˜J˜JšœŸ˜8JšœŸ"˜