comparison src/mono_opt.sml @ 451:1bd575eb2d1e

Remove empty writes
author Adam Chlipala <adamc@hcoop.net>
date Sat, 01 Nov 2008 16:50:28 -0400
parents 024478c34f4d
children 787d4931fb07
comparison
equal deleted inserted replaced
450:07f6576aeb0a 451:1bd575eb2d1e
309 body = (optExp (EWrite e', loc), loc)} 309 body = (optExp (EWrite e', loc), loc)}
310 310
311 | EWrite (ELet (x, t, e1, e2), loc) => 311 | EWrite (ELet (x, t, e1, e2), loc) =>
312 optExp (ELet (x, t, e1, (EWrite e2, loc)), loc) 312 optExp (ELet (x, t, e1, (EWrite e2, loc)), loc)
313 313
314 | EWrite (EPrim (Prim.String ""), loc) =>
315 ERecord []
316
314 | _ => e 317 | _ => e
315 318
316 and optExp e = #1 (U.Exp.map {typ = typ, exp = exp} e) 319 and optExp e = #1 (U.Exp.map {typ = typ, exp = exp} e)
317 320
318 val optimize = U.File.map {typ = typ, exp = exp, decl = decl} 321 val optimize = U.File.map {typ = typ, exp = exp, decl = decl}