comparison src/cjrize.sml @ 280:fdd7a698be01

Compiling a parametrized query the inefficient way
author Adam Chlipala <adamc@hcoop.net>
date Tue, 02 Sep 2008 17:31:45 -0400
parents 09c66a30ef32
children 0236d9412ad2
comparison
equal deleted inserted replaced
279:8bb46d87b074 280:fdd7a698be01
169 end) sm xps 169 end) sm xps
170 in 170 in
171 ((L'.PRecord xps, loc), sm) 171 ((L'.PRecord xps, loc), sm)
172 end 172 end
173 173
174 fun cifyExp ((e, loc), sm) = 174 fun cifyExp (eAll as (e, loc), sm) =
175 case e of 175 case e of
176 L.EPrim p => ((L'.EPrim p, loc), sm) 176 L.EPrim p => ((L'.EPrim p, loc), sm)
177 | L.ERel n => ((L'.ERel n, loc), sm) 177 | L.ERel n => ((L'.ERel n, loc), sm)
178 | L.ENamed n => ((L'.ENamed n, loc), sm) 178 | L.ENamed n => ((L'.ENamed n, loc), sm)
179 | L.ECon (dk, pc, eo) => 179 | L.ECon (dk, pc, eo) =>
204 val (e2, sm) = cifyExp (e2, sm) 204 val (e2, sm) = cifyExp (e2, sm)
205 in 205 in
206 ((L'.EApp (e1, e2), loc), sm) 206 ((L'.EApp (e1, e2), loc), sm)
207 end 207 end
208 | L.EAbs _ => (ErrorMsg.errorAt loc "Anonymous function remains at code generation"; 208 | L.EAbs _ => (ErrorMsg.errorAt loc "Anonymous function remains at code generation";
209 Print.prefaces' [("Function", MonoPrint.p_exp MonoEnv.empty eAll)];
209 (dummye, sm)) 210 (dummye, sm))
210 211
211 | L.ERecord xes => 212 | L.ERecord xes =>
212 let 213 let
213 val old_xts = map (fn (x, _, t) => (x, t)) xes 214 val old_xts = map (fn (x, _, t) => (x, t)) xes