[MLton-commit] r6831

Matthew Fluet fluet at mlton.org
Mon Sep 1 07:25:32 PDT 2008


Use less generic macro names.

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

U   mlton/trunk/include/common-main.h
U   mlton/trunk/mlton/codegen/c-codegen/c-codegen.fun

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

Modified: mlton/trunk/include/common-main.h
===================================================================
--- mlton/trunk/include/common-main.h	2008-09-01 13:19:51 UTC (rev 6830)
+++ mlton/trunk/include/common-main.h	2008-09-01 14:25:28 UTC (rev 6831)
@@ -24,13 +24,13 @@
 #define DeclareProfileLabel(l)                  \
         extern char l __attribute__ ((weak))
 
-#define BeginIntInfs static struct GC_intInfInit intInfInits[] = {
-#define IntInf(g, n) { g, n },
-#define EndIntInfs };
+#define BeginIntInfInits static struct GC_intInfInit intInfInits[] = {
+#define IntInfInitElem(g, n) { g, n },
+#define EndIntInfInits };
 
-#define BeginVectors static struct GC_vectorInit vectorInits[] = {
-#define NewVector(a, b, c, d) { (pointer)a, b, c, d },
-#define EndVectors };
+#define BeginVectorInits static struct GC_vectorInit vectorInits[] = {
+#define VectorInitElem(a, b, c, d) { (pointer)a, b, c, d },
+#define EndVectorInits };
 
 #define LoadArray(a, f) if (fread (a, sizeof(*a), cardof(a), f) != cardof(a)) return -1;
 #define SaveArray(a, f) if (fwrite(a, sizeof(*a), cardof(a), f) != cardof(a)) return -1;

Modified: mlton/trunk/mlton/codegen/c-codegen/c-codegen.fun
===================================================================
--- mlton/trunk/mlton/codegen/c-codegen/c-codegen.fun	2008-09-01 13:19:51 UTC (rev 6830)
+++ mlton/trunk/mlton/codegen/c-codegen/c-codegen.fun	2008-09-01 14:25:28 UTC (rev 6831)
@@ -1,4 +1,4 @@
-(* Copyright (C) 1999-2007 Henry Cejtin, Matthew Fluet, Suresh
+(* Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh
  *    Jagannathan, and Stephen Weeks.
  * Copyright (C) 1997-2000 NEC Research Institute.
  *
@@ -267,19 +267,20 @@
             ()
          end
       fun declareIntInfs () =
-         (print "BeginIntInfs\n"
-          ; List.foreach (intInfs, fn (g, i) =>
-                          (C.callNoSemi ("IntInf",
-                                         [C.int (Global.index g),
-                                          C.string (IntInf.toString i)],
-                                         print)
-                           ; print "\n"))
-          ; print "EndIntInfs\n")
+         (print "BeginIntInfInits\n"
+          ; (List.foreach
+             (intInfs, fn (g, i) =>
+              (C.callNoSemi ("IntInfInitElem",
+                             [C.int (Global.index g),
+                              C.string (IntInf.toString i)],
+                             print)
+               ; print "\n")))
+          ; print "EndIntInfInits\n")
       fun declareStrings () =
-         (print "BeginVectors\n"
+         (print "BeginVectorInits\n"
           ; (List.foreach
              (vectors, fn (g, v) =>
-              (C.callNoSemi ("NewVector",
+              (C.callNoSemi ("VectorInitElem",
                              [C.string (WordXVector.toString v),
                               C.int (Bytes.toInt
                                      (WordSize.bytes
@@ -288,7 +289,7 @@
                               C.int (WordXVector.length v)],
                              print)
                  ; print "\n")))
-          ; print "EndVectors\n")
+          ; print "EndVectorInits\n")
       fun declareReals () =
          (print "static void real_Init() {\n"
           ; List.foreach (reals, fn (g, r) =>




More information about the MLton-commit mailing list