[MLton-commit] r6451

spoons at mlton.org spoons at mlton.org
Mon Mar 3 07:38:13 PST 2008


Better (but still broken) version of reference flattening.

This should be superceded by the (correct) fix on the trunk.

----------------------------------------------------------------------

U   mlton/branches/shared-heap-multicore/mlton/ssa/ref-flatten.fun

----------------------------------------------------------------------

Modified: mlton/branches/shared-heap-multicore/mlton/ssa/ref-flatten.fun
===================================================================
--- mlton/branches/shared-heap-multicore/mlton/ssa/ref-flatten.fun	2008-03-03 15:36:16 UTC (rev 6450)
+++ mlton/branches/shared-heap-multicore/mlton/ssa/ref-flatten.fun	2008-03-03 15:38:12 UTC (rev 6451)
@@ -713,6 +713,7 @@
                                | Thread => Size.makeTop s
                                | Weak t => dependsOn t
                                | Word _ => ()
+                           val () = if Type.isVector t then Size.makeTop s else ()
                         in
                            s
                         end))
@@ -721,7 +722,17 @@
          (datatypes, fn Datatype.T {cons, tycon} =>
           let
              val s = tyconSize tycon
-             fun dependsOn (t: Type.t): unit = Size.<= (typeSize t, s)
+             fun dependsOn (t: Type.t): unit = 
+                 let 
+                   datatype z = datatype Type.dest
+                   val () = case Type.dest t of 
+                              Datatype tycon' => if Tycon.equals (tycon, tycon')
+                                                 then Size.makeTop s
+                                                 else ()
+                            | _ => ()
+                 in
+                   Size.<= (typeSize t, s)
+                 end
              val () = Vector.foreach (cons, fn {args, ...} =>
                                       Prod.foreach (args, dependsOn))
           in




More information about the MLton-commit mailing list