comparison src/especialize.sml @ 802:ef6de4075dc1

Fix a Core_untangle bug that missed closure variable references; XHTMLize
author Adam Chlipala <adamc@hcoop.net>
date Sat, 16 May 2009 12:41:33 -0400
parents e92cfac1608f
children 066493f7f008
comparison
equal deleted inserted replaced
801:5f49a6b759cb 802:ef6de4075dc1
346 | vis => 346 | vis =>
347 (true, case d' of 347 (true, case d' of
348 (DValRec vis', _) => [(DValRec (vis @ vis'), ErrorMsg.dummySpan)] 348 (DValRec vis', _) => [(DValRec (vis @ vis'), ErrorMsg.dummySpan)]
349 | _ => [(DValRec vis, ErrorMsg.dummySpan), d']) 349 | _ => [(DValRec vis, ErrorMsg.dummySpan), d'])
350 in 350 in
351 (*Print.prefaces "doDecl" [("d", CorePrint.p_decl E.empty d)];*) 351 (*Print.prefaces "doDecl" [("d", CorePrint.p_decl E.empty d),
352 ("d'", CorePrint.p_decl E.empty d')];*)
352 (ds, ({maxName = #maxName st, 353 (ds, ({maxName = #maxName st,
353 funcs = funcs, 354 funcs = funcs,
354 decls = []}, changed)) 355 decls = []}, changed))
355 end 356 end
356 357
376 in 377 in
377 (*print "Round over\n";*) 378 (*print "Round over\n";*)
378 if changed then 379 if changed then
379 let 380 let
380 (*val file = ReduceLocal.reduce file*) 381 (*val file = ReduceLocal.reduce file*)
382 (*val () = Print.prefaces "Pre-untangle" [("file", CorePrint.p_file CoreEnv.empty file)]*)
381 val file = CoreUntangle.untangle file 383 val file = CoreUntangle.untangle file
384 (*val () = Print.prefaces "Post-untangle" [("file", CorePrint.p_file CoreEnv.empty file)]*)
382 val file = Shake.shake file 385 val file = Shake.shake file
383 in 386 in
384 (*print "Again!\n";*) 387 (*print "Again!\n";*)
385 specialize file 388 specialize file
386 end 389 end