Mercurial > urweb
comparison src/mono_reduce.sml @ 319:1fd2a29a7c85
Improve linear-let optimization
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 11 Sep 2008 11:44:46 -0400 |
parents | 60907c06b4c4 |
children | e976b187d73a |
comparison
equal
deleted
inserted
replaced
318:60907c06b4c4 | 319:1fd2a29a7c85 |
---|---|
211 | ECon (_, _, SOME e) => summarize d e | 211 | ECon (_, _, SOME e) => summarize d e |
212 | ENone _ => [] | 212 | ENone _ => [] |
213 | ESome (_, e) => summarize d e | 213 | ESome (_, e) => summarize d e |
214 | EFfi _ => [] | 214 | EFfi _ => [] |
215 | EFfiApp (_, _, es) => List.concat (map (summarize d) es) | 215 | EFfiApp (_, _, es) => List.concat (map (summarize d) es) |
216 | EApp ((EFfi _, _), e) => summarize d e | |
216 | EApp _ => [Unsure] | 217 | EApp _ => [Unsure] |
217 | EAbs _ => [] | 218 | EAbs _ => [] |
218 | 219 |
219 | ERecord xets => List.concat (map (summarize d o #2) xets) | 220 | ERecord xets => List.concat (map (summarize d o #2) xets) |
220 | EField (e, _) => summarize d e | 221 | EField (e, _) => summarize d e |
242 | 243 |
243 | EClosure (_, es) => List.concat (map (summarize d) es) | 244 | EClosure (_, es) => List.concat (map (summarize d) es) |
244 | 245 |
245 | EQuery {query, body, initial, ...} => | 246 | EQuery {query, body, initial, ...} => |
246 List.concat [summarize d query, | 247 List.concat [summarize d query, |
247 summarize d body, | 248 summarize (d + 2) body, |
248 summarize d initial, | 249 summarize d initial, |
249 [ReadDb]] | 250 [ReadDb]] |
250 | 251 |
251 | EDml e => summarize d e @ [WriteDb] | 252 | EDml e => summarize d e @ [WriteDb] |
252 | 253 |