comparison src/mono_opt.sml @ 572:57018f21cd5c

Handling singnal bind
author Adam Chlipala <adamc@hcoop.net>
date Sun, 21 Dec 2008 12:30:57 -0500
parents 1901db85acb4
children 1e589a60b86f
comparison
equal deleted inserted replaced
571:86d324061ddc 572:57018f21cd5c
358 optExp (ELet (x, t, e1, (EWrite e2, loc)), loc) 358 optExp (ELet (x, t, e1, (EWrite e2, loc)), loc)
359 359
360 | EWrite (EPrim (Prim.String ""), loc) => 360 | EWrite (EPrim (Prim.String ""), loc) =>
361 ERecord [] 361 ERecord []
362 362
363 | ESignalBind ((ESignalReturn e1, loc), e2) =>
364 optExp (EApp (e2, e1), loc)
365
363 | _ => e 366 | _ => e
364 367
365 and optExp e = #1 (U.Exp.map {typ = typ, exp = exp} e) 368 and optExp e = #1 (U.Exp.map {typ = typ, exp = exp} e)
366 369
367 val optimize = U.File.map {typ = typ, exp = exp, decl = decl} 370 val optimize = U.File.map {typ = typ, exp = exp, decl = decl}