[MLton-commit] r7140
    Wesley Terpstra 
    wesley at mlton.org
       
    Fri Jun 12 09:24:40 PDT 2009
    
    
  
Codegens that want to represent ML types in their output need deSeq.
GCState and Label types are not integer, but pointer.
----------------------------------------------------------------------
U   mlton/trunk/mlton/backend/rep-type.fun
U   mlton/trunk/mlton/backend/rep-type.sig
----------------------------------------------------------------------
Modified: mlton/trunk/mlton/backend/rep-type.fun
===================================================================
--- mlton/trunk/mlton/backend/rep-type.fun	2009-06-12 16:22:21 UTC (rev 7139)
+++ mlton/trunk/mlton/backend/rep-type.fun	2009-06-12 16:24:39 UTC (rev 7140)
@@ -231,6 +231,12 @@
          case node t of
             Real s => SOME s
           | _ => NONE
+      
+      val deSeq: t -> t vector option =
+         fn t =>
+         case node t of
+            Seq v => SOME v
+          | _ => NONE
 
       val deWord: t -> WordSize.t option =
          fn t =>
@@ -320,6 +326,8 @@
             else 
                case node t of
                   CPointer => C.CPointer
+                | GCState => C.CPointer
+                | Label _ => C.CPointer
                 | Real s =>
                      (case s of
                          RealSize.R32 => C.Real32
Modified: mlton/trunk/mlton/backend/rep-type.sig
===================================================================
--- mlton/trunk/mlton/backend/rep-type.sig	2009-06-12 16:22:21 UTC (rev 7139)
+++ mlton/trunk/mlton/backend/rep-type.sig	2009-06-12 16:24:39 UTC (rev 7140)
@@ -65,6 +65,7 @@
       val deLabel: t -> Label.t option
       val deObjptr: t -> ObjptrTycon.t option
       val deReal: t -> RealSize.t option
+      val deSeq: t -> t vector option
       val deWord: t -> WordSize.t option
       val equals: t * t -> bool
       val exnStack: unit -> t
    
    
More information about the MLton-commit
mailing list