comparison src/especialize.sml @ 1083:2eb585274501

Stop skipping Especialization of generated functions; fix Compiler.parseUrp; expose uw_really_write(); allow more NULL arguments to uw_register_transactional()
author Adam Chlipala <adamc@hcoop.net>
date Wed, 23 Dec 2009 12:25:34 -0500
parents a4979e31e4bf
children 74f2eb3b0606
comparison
equal deleted inserted replaced
1082:4b2f50829af5 1083:2eb585274501
322 if not fin 322 if not fin
323 orelse List.all (fn (ERel _, _) => true 323 orelse List.all (fn (ERel _, _) => true
324 | _ => false) fxs' 324 | _ => false) fxs'
325 orelse (IS.numItems fvs >= length fxs 325 orelse (IS.numItems fvs >= length fxs
326 andalso IS.exists (fn n => functionInside (#2 (List.nth (env, n)))) fvs) then 326 andalso IS.exists (fn n => functionInside (#2 (List.nth (env, n)))) fvs) then
327 default () 327 ((*Print.prefaces "No" [("name", Print.PD.string name),
328 ("fxs'",
329 Print.p_list (CorePrint.p_exp CoreEnv.empty) fxs')];*)
330 default ())
328 else 331 else
329 case (KM.find (args, fxs'), 332 case (KM.find (args, fxs'),
330 SS.member (!mayNotSpec, name) orelse IS.member (#specialized st, f)) of 333 SS.member (!mayNotSpec, name) (*orelse IS.member (#specialized st, f)*)) of
331 (SOME f', _) => 334 (SOME f', _) =>
332 let 335 let
333 val e = (ENamed f', loc) 336 val e = (ENamed f', loc)
334 val e = IS.foldr (fn (arg, e) => (EApp (e, (ERel arg, loc)), loc)) 337 val e = IS.foldr (fn (arg, e) => (EApp (e, (ERel arg, loc)), loc))
335 e fvs 338 e fvs
338 in 341 in
339 (*Print.prefaces "Brand new (reuse)" 342 (*Print.prefaces "Brand new (reuse)"
340 [("e'", CorePrint.p_exp CoreEnv.empty e)];*) 343 [("e'", CorePrint.p_exp CoreEnv.empty e)];*)
341 (e, st) 344 (e, st)
342 end 345 end
343 | (_, true) => ((*Print.prefaces ("No(" ^ name ^ ")") 346 | (_, true) => ((*Print.prefaces ("No!(" ^ name ^ ")")
344 [("fxs'", 347 [("fxs'",
345 Print.p_list (CorePrint.p_exp CoreEnv.empty) fxs')];*) 348 Print.p_list (CorePrint.p_exp CoreEnv.empty) fxs')];*)
346 default ()) 349 default ())
347 | (NONE, false) => 350 | (NONE, false) =>
348 let 351 let