[MLton-commit] r6410

Matthew Fluet fluet at mlton.org
Thu Feb 14 13:39:41 PST 2008


Use symbolic names for object type tags.

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

U   mlton/trunk/mlton/codegen/c-codegen/c-codegen.fun

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

Modified: mlton/trunk/mlton/codegen/c-codegen/c-codegen.fun
===================================================================
--- mlton/trunk/mlton/codegen/c-codegen/c-codegen.fun	2008-02-14 21:39:38 UTC (rev 6409)
+++ mlton/trunk/mlton/codegen/c-codegen/c-codegen.fun	2008-02-14 21:39:40 UTC (rev 6410)
@@ -332,13 +332,13 @@
              val (tag, hasIdentity, bytesNonObjptrs, numObjptrs) =
                 case ObjectType.toRuntime ty of
                    Array {hasIdentity, bytesNonObjptrs, numObjptrs} =>
-                      (0, hasIdentity, 
+                      ("ARRAY_TAG", hasIdentity, 
                        Bytes.toInt bytesNonObjptrs, numObjptrs)
                  | Normal {hasIdentity, bytesNonObjptrs, numObjptrs} =>
-                      (1, hasIdentity, 
+                      ("NORMAL_TAG", hasIdentity, 
                        Bytes.toInt bytesNonObjptrs, numObjptrs)
                  | Stack =>
-                      (2, false, 0, 0)
+                      ("STACK_TAG", false, 0, 0)
                  | Weak {gone} =>
                       let
                          val bytesObjptr =
@@ -372,10 +372,10 @@
                                then (bytesNonObjptrs + bytesObjptr, 0)
                             else (bytesNonObjptrs, 1)
                       in
-                         (3, false, bytesNonObjptrs, numObjptrs)
+                         ("WEAK_TAG", false, bytesNonObjptrs, numObjptrs)
                       end
           in
-             concat ["{ ", C.int tag, ", ",
+             concat ["{ ", tag, ", ",
                      C.bool hasIdentity, ", ",
                      C.int bytesNonObjptrs, ", ",
                      C.int numObjptrs, " }"]




More information about the MLton-commit mailing list