Mercurial > urweb
view src/mono_inline.sml @ 2296:5104e480b3e3
Fix a few C memory bugs
author | Adam Chlipala <adam@chlipala.net> |
---|---|
date | Thu, 19 Nov 2015 10:31:47 -0500 |
parents | edd634b889d0 |
children |
line wrap: on
line source
structure MonoInline = struct fun inlineFull file = let val oldInline = Settings.getMonoInline () val oldFull = !MonoReduce.fullMode in (Settings.setMonoInline (case Int.maxInt of NONE => 1000000 | SOME n => n); MonoReduce.fullMode := true; let val file = MonoReduce.reduce file val file = MonoOpt.optimize file val file = Fuse.fuse file val file = MonoOpt.optimize file val file = MonoShake.shake file in file end before (MonoReduce.fullMode := oldFull; Settings.setMonoInline oldInline)) handle ex => (Settings.setMonoInline oldInline; MonoReduce.fullMode := oldFull; raise ex) end end