192 |
(* here we build a new gp -- the one that uses the freshly |
(* here we build a new gp -- the one that uses the freshly |
193 |
* brewed pervasive env, core env, and primitives *) |
* brewed pervasive env, core env, and primitives *) |
194 |
val core = valOf (sbnode ginfo_nocore core) |
val core = valOf (sbnode ginfo_nocore core) |
195 |
val corenv = CoerceEnv.es2bs (#statenv (#ii core) ()) |
val corenv = CoerceEnv.es2bs (#statenv core ()) |
196 |
val core_sym = #symenv (#ii core) () |
val core_sym = #symenv core () |
197 |
|
|
198 |
(* The following is a bit of a hack (but corenv is a hack anyway): |
(* The following is a bit of a hack (but corenv is a hack anyway): |
199 |
* As soon as we have core available, we have to patch the |
* As soon as we have core available, we have to patch the |
208 |
val pervasive = rt pervasive |
val pervasive = rt pervasive |
209 |
|
|
210 |
fun sn2pspec (name, n) = let |
fun sn2pspec (name, n) = let |
211 |
val { ii = { statenv, symenv, statpid, sympid }, ctxt } = rt n |
val { statenv, symenv, statpid, sympid } = rt n |
212 |
val env = |
val env = |
213 |
E.mkenv { static = statenv (), |
E.mkenv { static = statenv (), |
214 |
symbolic = symenv (), |
symbolic = symenv (), |
215 |
dynamic = emptydyn } |
dynamic = emptydyn } |
216 |
val pidInfo = |
val pidInfo = { statpid = statpid, sympid = sympid } |
|
{ statpid = statpid, sympid = sympid, ctxt = ctxt } |
|
217 |
in |
in |
218 |
{ name = name, env = env, pidInfo = pidInfo } |
{ name = name, env = env, pidInfo = pidInfo } |
219 |
end |
end |
225 |
(* The following is a hack but must be done for both the symbolic |
(* The following is a hack but must be done for both the symbolic |
226 |
* and later the dynamic part of the core environment: |
* and later the dynamic part of the core environment: |
227 |
* we must include these parts in the pervasive env. *) |
* we must include these parts in the pervasive env. *) |
228 |
val perv_sym = E.layerSymbolic (#symenv (#ii pervasive) (), |
val perv_sym = E.layerSymbolic (#symenv pervasive (), |
229 |
core_sym) |
core_sym) |
230 |
|
|
231 |
val param = |
val param = |
232 |
mkParam { primconf = Primitive.configuration pspecs, |
mkParam { primconf = Primitive.configuration pspecs, |
233 |
pervasive = E.mkenv { static = |
pervasive = E.mkenv { static = #statenv pervasive (), |
|
#statenv (#ii pervasive) (), |
|
234 |
symbolic = perv_sym, |
symbolic = perv_sym, |
235 |
dynamic = emptydyn }, |
dynamic = emptydyn }, |
236 |
pervcorepids = |
pervcorepids = |
237 |
PidSet.addList (PidSet.empty, |
PidSet.addList (PidSet.empty, |
238 |
[#statpid (#ii pervasive), |
[#statpid pervasive, |
239 |
#sympid (#ii pervasive), |
#sympid pervasive, |
240 |
#statpid (#ii core)]) } |
#statpid core]) } |
241 |
{ corenv = corenv } |
{ corenv = corenv } |
242 |
val stab = |
val stab = |
243 |
if deliver then SOME true else NONE |
if deliver then SOME true else NONE |
255 |
Servers.withServers (fn () => recomp gp) |
Servers.withServers (fn () => recomp gp) |
256 |
in |
in |
257 |
if isSome res then let |
if isSome res then let |
258 |
val rtspid = PS.toHex (#statpid (#ii rts)) |
val rtspid = PS.toHex (#statpid rts) |
259 |
fun writeList s = let |
fun writeList s = let |
260 |
fun add ((p, flag), l) = let |
fun add ((p, flag), l) = let |
261 |
val n = listName (p, true) |
val n = listName (p, true) |