Home My Page Projects Code Snippets Project Openings SML/NJ
 Summary Activity Forums Tracker Lists Tasks Docs Surveys News SCM Files

# SCM Repository

[smlnj] Diff of /sml/trunk/src/compiler/FLINT/opt/fixfix.sml
 [smlnj] / sml / trunk / src / compiler / FLINT / opt / fixfix.sml

# Diff of /sml/trunk/src/compiler/FLINT/opt/fixfix.sml

revision 256, Wed Apr 21 01:28:39 1999 UTC revision 257, Wed Apr 21 02:45:08 1999 UTC
# Line 39  Line 39
39  fun buglexp (msg,le) = (say "\n"; PP.printLexp le; say " "; bug msg)  fun buglexp (msg,le) = (say "\n"; PP.printLexp le; say " "; bug msg)
40  fun bugval (msg,v) = (say "\n"; PP.printSval v; say " "; bug msg)  fun bugval (msg,v) = (say "\n"; PP.printSval v; say " "; bug msg)
41  fun assert p = if p then () else bug ("assertion failed")  fun assert p = if p then () else bug ("assertion failed")
42    fun bugsay s = say ("!*!*! Fixfix: "^s^" !*!*!\n")
43
44  val cplv = LambdaVar.dupLvar  val cplv = LambdaVar.dupLvar
45
# Line 271  Line 272
272                         else let val cs = map (fn ref(sp,ti) => sp + ti div 2) cs                         else let val cs = map (fn ref(sp,ti) => sp + ti div 2) cs
273                                  val s' = foldl (op+) 0 cs                                  val s' = foldl (op+) 0 cs
274                         in if s < 2*s' + ilthreshold                         in if s < 2*s' + ilthreshold
275                            then ((*; say((Collect.LVarString f)^                            then ((* say((Collect.LVarString f)^
276                                  " {"^(Int.toString(!cf))^                                  " {"^(Int.toString(!cf))^
277                                  "} = F.IH_MAYBE "^                                  "} = F.IH_MAYBE "^
278                                  (Int.toString (s-ilthreshold))^                                  (Int.toString (s-ilthreshold))^
# Line 305  Line 306
306         in         in
307             case top             case top
308              of (SCC.SIMPLE f)::sccs =>              of (SCC.SIMPLE f)::sccs =>
309                 (assert(f = lename);                 ((if (f = lename) then () else bugsay "f != lename");
310                  (s, S.diff(fv, funs), foldl sccconvert le sccs))                  (s, S.diff(fv, funs), foldl sccconvert le sccs))
311               | (SCC.RECURSIVE _)::_ => bug "recursive main body in SCC ?!?!?"               | (SCC.RECURSIVE _)::_ => bug "recursive main body in SCC ?!?!?"
312               | [] => bug "SCC going crazy"               | [] => bug "SCC going crazy"

Legend:
 Removed from v.256 changed lines Added in v.257