comparison src/cjrize.sml @ 387:7abb28e9d51f

Binops; equality tested on int; lame 404 substitute
author Adam Chlipala <adamc@hcoop.net>
date Tue, 21 Oct 2008 09:50:19 -0400
parents e976b187d73a
children 787d4931fb07
comparison
equal deleted inserted replaced
386:ef43ed6cd1de 387:7abb28e9d51f
247 end 247 end
248 | L.EAbs _ => (ErrorMsg.errorAt loc "Anonymous function remains at code generation"; 248 | L.EAbs _ => (ErrorMsg.errorAt loc "Anonymous function remains at code generation";
249 Print.prefaces' [("Function", MonoPrint.p_exp MonoEnv.empty eAll)]; 249 Print.prefaces' [("Function", MonoPrint.p_exp MonoEnv.empty eAll)];
250 (dummye, sm)) 250 (dummye, sm))
251 251
252 | L.EUnop (s, e1) =>
253 let
254 val (e1, sm) = cifyExp (e1, sm)
255 in
256 ((L'.EUnop (s, e1), loc), sm)
257 end
258 | L.EBinop (s, e1, e2) =>
259 let
260 val (e1, sm) = cifyExp (e1, sm)
261 val (e2, sm) = cifyExp (e2, sm)
262 in
263 ((L'.EBinop (s, e1, e2), loc), sm)
264 end
265
252 | L.ERecord xes => 266 | L.ERecord xes =>
253 let 267 let
254 val old_xts = map (fn (x, _, t) => (x, t)) xes 268 val old_xts = map (fn (x, _, t) => (x, t)) xes
255 269
256 val (xets, sm) = ListUtil.foldlMap (fn ((x, e, t), sm) => 270 val (xets, sm) = ListUtil.foldlMap (fn ((x, e, t), sm) =>