diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-10-25 14:07:10 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-10-25 14:07:10 -0400 |
commit | 5a88b41a6655f601c989ae94ce1fc8bb391ca630 (patch) | |
tree | 95685ca6f24d0e3511588ae55bbdd8a121f97994 /src/core_util.sml | |
parent | 31da370dd5fae72ddf756aa5ef54241b099fd617 (diff) |
RPC uses VM support for call/cc
Diffstat (limited to 'src/core_util.sml')
-rw-r--r-- | src/core_util.sml | 35 |
1 files changed, 6 insertions, 29 deletions
diff --git a/src/core_util.sml b/src/core_util.sml index 4722eca1..cedde841 100644 --- a/src/core_util.sml +++ b/src/core_util.sml @@ -532,20 +532,12 @@ fun compare ((e1, _), (e2, _)) = | (ELet _, _) => LESS | (_, ELet _) => GREATER - | (EServerCall (n1, es1, e1, _, _), EServerCall (n2, es2, e2, _, _)) => + | (EServerCall (n1, es1, _), EServerCall (n2, es2, _)) => join (Int.compare (n1, n2), - fn () => join (joinL compare (es1, es2), - fn () => compare (e1, e2))) + fn () => joinL compare (es1, es2)) | (EServerCall _, _) => LESS | (_, EServerCall _) => GREATER - | (ETailCall (n1, es1, e1, _, _), ETailCall (n2, es2, e2, _, _)) => - join (Int.compare (n1, n2), - fn () => join (joinL compare (es1, es2), - fn () => compare (e1, e2))) - | (ETailCall _, _) => LESS - | (_, ETailCall _) => GREATER - | (EKAbs (_, e1), EKAbs (_, e2)) => compare (e1, e2) | (EKAbs _, _) => LESS | (_, EKAbs _) => GREATER @@ -725,27 +717,12 @@ fun mapfoldB {kind = fk, con = fc, exp = fe, bind} = fn e2' => (ELet (x, t', e1', e2'), loc)))) - | EServerCall (n, es, e, t1, t2) => - S.bind2 (ListUtil.mapfold (mfe ctx) es, - fn es' => - S.bind2 (mfe ctx e, - fn e' => - S.bind2 (mfc ctx t1, - fn t1' => - S.map2 (mfc ctx t2, - fn t2' => - (EServerCall (n, es', e', t1', t2'), loc))))) - - | ETailCall (n, es, e, t1, t2) => + | EServerCall (n, es, t) => S.bind2 (ListUtil.mapfold (mfe ctx) es, fn es' => - S.bind2 (mfe ctx e, - fn e' => - S.bind2 (mfc ctx t1, - fn t1' => - S.map2 (mfc ctx t2, - fn t2' => - (ETailCall (n, es', e', t1', t2'), loc))))) + S.map2 (mfc ctx t, + fn t' => + (EServerCall (n, es', t'), loc))) | EKAbs (x, e) => S.map2 (mfe (bind (ctx, RelK x)) e, |