122 |
val currentvar = tmpvar("profCurrent",CONty(refTycon,[intTy]), mkv) |
val currentvar = tmpvar("profCurrent",CONty(refTycon,[intTy]), mkv) |
123 |
val currentexp = varexp currentvar |
val currentexp = varexp currentvar |
124 |
|
|
125 |
val register = |
val register = CoreAccess.getVar (env, "profile_register") |
|
case Lookup.lookVal |
|
|
(env, |
|
|
SP.SPATH [CoreSym.coreSym, |
|
|
S.varSymbol "profile_register"], |
|
|
fn _ => fn s => fn _ => bug "222 in prof") of |
|
|
V.VAL r => r |
|
|
| _ => bug "09824 in prof" |
|
126 |
|
|
127 |
local |
local |
128 |
val ty = case register of |
val ty = case register of |
275 |
in SEQexp (seq l) |
in SEQexp (seq l) |
276 |
end |
end |
277 |
|
|
278 |
|
| IFexp { test, thenCase, elseCase } => |
279 |
|
IFexp { test = iinstr test, |
280 |
|
thenCase = instr thenCase, |
281 |
|
elseCase = instr elseCase } |
282 |
|
|
283 |
|
| ANDALSOexp (e1, e2) => |
284 |
|
ANDALSOexp (iinstr e1, instr e2) |
285 |
|
| ORELSEexp (e1, e2) => |
286 |
|
ORELSEexp (iinstr e1, instr e2) |
287 |
|
| WHILEexp { test, expr } => |
288 |
|
WHILEexp { test = iinstr test, expr = iinstr expr } |
289 |
|
|
290 |
| exp as APPexp (f,a) => |
| exp as APPexp (f,a) => |
291 |
let fun safe(VARexp(ref(VALvar{info, ...}), _)) = |
let fun safe(VARexp(ref(VALvar{info, ...}), _)) = |
292 |
if II.isSimple info then |
if II.isSimple info then |
350 |
val ccvara' = makeEntry(name) |
val ccvara' = makeEntry(name) |
351 |
val lvar = tmpvar("fnvar",t,mkv); |
val lvar = tmpvar("fnvar",t,mkv); |
352 |
|
|
353 |
val exnMatch = |
val exnMatch = CoreAccess.getCon (env, "Match") |
|
case Lookup.lookVal |
|
|
(env, |
|
|
SP.SPATH [CoreSym.coreSym, |
|
|
S.varSymbol "Match"], |
|
|
fn _ => fn s => fn _ => |
|
|
bug "250 in prof") |
|
|
of V.CON e => e |
|
|
| _ => bug "no CON for exnMatch" |
|
354 |
|
|
355 |
val RULE(_,special) = List.last l |
val RULE(_,special) = List.last l |
356 |
in FNexp ([RULE(VARpat(lvar), |
in FNexp ([RULE(VARpat(lvar), |