143 |
val maingspec = |
val maingspec = |
144 |
case root of |
case root of |
145 |
NONE => stdpath maingspec |
NONE => stdpath maingspec |
146 |
| SOME r => stdpath r |
| SOME r => SrcPath.fromDescr pcmode r |
147 |
|
|
148 |
val cmifile = valOf (SrcPath.reAnchoredName (initgspec, bootdir)) |
val cmifile = valOf (SrcPath.reAnchoredName (initgspec, bootdir)) |
149 |
handle Option => raise Fail "BootstrapCompile: cmifile" |
handle Option => raise Fail "BootstrapCompile: cmifile" |
307 |
else false |
else false |
308 |
end |
end |
309 |
in |
in |
310 |
SOME ((g, gp), thunk) |
SOME ((g, gp, pcmode), thunk) |
311 |
end |
end |
312 |
end handle Option => (Compile.reset (); NONE) |
end handle Option => (Compile.reset (); NONE) |
313 |
(* to catch valOf failures in "rt" *) |
(* to catch valOf failures in "rt" *) |
330 |
fun slave (dirbase, root) = |
fun slave (dirbase, root) = |
331 |
case mk_compile false (SOME root) (SOME dirbase) of |
case mk_compile false (SOME root) (SOME dirbase) of |
332 |
NONE => NONE |
NONE => NONE |
333 |
| SOME ((g, gp), _) => let |
| SOME ((g, gp, pcmode), _) => let |
334 |
val trav = Compile.newSbnodeTraversal () gp |
val trav = Compile.newSbnodeTraversal () gp |
335 |
fun trav' sbn = isSome (trav sbn) |
fun trav' sbn = isSome (trav sbn) |
336 |
in |
in |
337 |
SOME (g, trav') |
SOME (g, trav', pcmode) |
338 |
end |
end |
339 |
in |
in |
340 |
val _ = CMBSlaveHook.init archos slave |
val _ = CMBSlaveHook.init archos slave |