MBLoaderOps.mesa
Modified by Lewis on 17-Sep-81 11:01:30
last edited by Levin on May 27, 1983 2:00 pmMay 13, 1983 6:30 pm
DIRECTORY
BasicLoadStateFormat USING [ConfigIndex, ModuleInfo],
BcdDefs USING [BcdBase, EXPIndex, Link, MTHandle, MTIndex],
PrincOps USING [ControlLink, GFTIndex, GlobalFrameHandle, MaxNGfi],
MB USING [BHandle, Handle],
Rope USING [ROPE];
MBLoaderOps: DEFINITIONS =
BEGIN
ConfigIndex: TYPE = BasicLoadStateFormat.ConfigIndex;
ModuleInfo: TYPE = BasicLoadStateFormat.ModuleInfo;
From MBLoader
VirtualLinks: TYPE = LONG DESCRIPTOR FOR ARRAY OF BcdDefs.Link;
RealLinksTable: TYPE = ARRAY [0..256) OF PrincOps.ControlLink;
RealLinks: TYPE = REF RealLinksTable;
FindFiles: PROC [loadee: MB.BHandle]; -- find code files
FindCode: PROC [loadee: MB.BHandle]; -- load code into MBVM
FileNotFound: SIGNAL [name: Rope.ROPE];
OpenLinkSpace: PROC [loadee: MB.BHandle, mth: BcdDefs.MTHandle];
WriteLink: PROC [offset: CARDINAL, link: PrincOps.ControlLink];
ReadLink: PROC [offset: CARDINAL] RETURNS [link: PrincOps.ControlLink];
CloseLinkSpace: PROC;
WriteLinks: PROC [loadee: MB.BHandle, mth: BcdDefs.MTHandle, links: RealLinks];
LinkFragLength: PROC [loadee: MB.BHandle, mth: BcdDefs.MTHandle]
RETURNS [nLinks: CARDINAL];
GetVirtualLinks: PROC [loadee: MB.BHandle, mth: BcdDefs.MTHandle]
RETURNS [virtualLinks: VirtualLinks];
ProcessUnboundImports: PROC;
From MBLoaderCore
InitLoaderCore: PROC [h: MB.Handle];
FinishLoaderCore: PROC;
From MBLoaderExtra
InitLoaderExtra: PROC [h: MB.Handle];
FinishLoaderExtra: PROC;
Bind: PROC [loadee: MB.BHandle, config: ConfigIndex];
From MBLoadState
Binding: TYPE = REF BindingRecord;
BindingRecord: TYPE = RECORD [
bias: PrincOps.GFTIndex, -- = bcd.firstdummy
b: SEQUENCE n: --import gfi-- CARDINAL OF BindLink
];
BindLink: TYPE = RECORD [
whichgfi: [0..PrincOps.MaxNGfi),
body: SELECT type: * FROM
interface => [eti: BcdDefs.EXPIndex],
module => [mti: BcdDefs.MTIndex],
notbound => NULL,
ENDCASE
];
InitLoadState: PROC [h: MB.Handle];
FinishLoadState: PROC;
InputLoadState: PROC RETURNS [nbcds: ConfigIndex];
UpdateLoadState: PROC [config: ConfigIndex, handle: MB.BHandle];
WriteLoadState: PROC;
Loadstate ModuleInfo (gfi -> <resolved?, Bcd#, gfi>) management
EnterModule: PROC [rgfi: PrincOps.GFTIndex, module: ModuleInfo];
GetModule: PROC [rgfi: PrincOps.GFTIndex] RETURNS [module: ModuleInfo];
AcquireBcd: PROC [config: ConfigIndex] RETURNS [handle: MB.BHandle];
InitBinding: PROC [bcd: BcdDefs.BcdBase] RETURNS [binding: Binding];
BcdUnresolved: PROC [bcd: ConfigIndex] RETURNS [BOOLEAN];
BcdExports: PROC [bcd: ConfigIndex] RETURNS [BOOLEAN];
BcdExportsTypes: PROC [bcd: ConfigIndex] RETURNS [BOOLEAN];
GFT management
GetNextGFI: PROC [reserve: CARDINAL] RETURNS [next: PrincOps.GFTIndex];
SetGFTEntry: PROC [
frame: PrincOps.GlobalFrameHandle, gfi: PrincOps.GFTIndex, ngfi: CARDINAL];
Enumerators
EnumerationDirection: TYPE = {recentfirst, recentlast};
EnumerateModules: PROC [
proc: PROC [rgfi: PrincOps.GFTIndex, module: ModuleInfo] RETURNS [BOOLEAN]]
RETURNS [PrincOps.GFTIndex];
EnumerateBcds: PROC [
dir: EnumerationDirection, proc: PROC [ConfigIndex] RETURNS [BOOLEAN]]
RETURNS [config: ConfigIndex];
END.