[ivy]<Satterthwaite>SML>SMLDriver.mesa!8

SMLDriver.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
last edit by Satterthwaite, May 12, 1986 11:58:01 am PDT
DIRECTORY
BasicTime: TYPE USING [GMT],
IO: TYPE USING [STREAM],
Rope: TYPE USING [ROPE],
SMProj: TYPE USING [Proj],
SMTree: TYPE Tree USING [Link],
SMTreeOps: TYPE TreeOps USING [TM];
SMLDriver: CEDAR DEFINITIONS~{
OPEN Tree~~SMTree, TreeOps~~SMTreeOps;
loader state
LS: TYPE~REF LoaderState;
LoaderState: TYPE;
loading
Create: PROC[z: ZONE, tm: TreeOps.TM, out: IO.STREAM] RETURNS[LS];
Loaded: PROC[ls: LS] RETURNS[BOOL];
LoadAndBind: PROC[ls: LS, root: Tree.Link, wDir: Rope.ROPE, replace: BOOL]
RETURNS[errors: BOOL];
Started: PROC[ls: LS] RETURNS[BOOL];
StartAll: PROC[ls: LS, root: Tree.Link];
Unload: PROC[ls: LS, root: Tree.Link, unloadTheBcd: BOOL];
LoadInfo: TYPE~REF LoadInfoRecord;
LoadInfoRecord: TYPE;
LoadedModule: PROC[info: LoadInfo] RETURNS[BOOL];
binding
Bind: PROC[
name: Rope.ROPE, stamp: BasicTime.GMT, root: Tree.Link,
z: ZONE, tm: TreeOps.TM, out: IO.STREAM, wDir: Rope.ROPE]
RETURNS[errors: BOOL];
BindInfo: TYPE~REF BindInfoRecord;
BindInfoRecord: TYPE;
data structures
loaded module state (compiler/loader feedback for module replacement)
LoadMod
stored in Ext of Apply nodes
where first son is an apply, describes bcd files that have been loaded
there is one othese per parse tree node
LoadMod: TYPE~REF LoadModRecord;
LoadModRecord: TYPE~RECORD[
proj: SMProj.Proj←NIL,
bindInfo: BindInfo←NIL,
loadInfo: LoadInfo←NIL,
mustReplace: BOOL←FALSE];-- => this module must be replaced in the load state
}.