[MLton-commit] r4219

Matthew Fluet MLton@mlton.org
Mon, 14 Nov 2005 20:05:41 -0800


Syntax and type errors
----------------------------------------------------------------------

U   mlton/branches/on-20050822-x86_64-branch/basis-library/misc/primitive.sml
U   mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/cont.sml
U   mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/profile.sml
U   mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/rusage.sml
U   mlton/branches/on-20050822-x86_64-branch/bytecode/interpret.c
U   mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun

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

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/misc/primitive.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/misc/primitive.sml	2005-11-15 00:24:38 UTC (rev 4218)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/misc/primitive.sml	2005-11-15 04:05:35 UTC (rev 4219)
@@ -1046,7 +1046,7 @@
                         val free = 
                            _import "GC_profileFree": GCState.t * t -> unit;
                         val malloc = 
-                           _import "GC_profileMalloc": GCState.t * unit -> t;
+                           _import "GC_profileMalloc": GCState.t -> t;
                         val write = 
                            _import "GC_profileWrite" 
                            : GCState.t * t * word (* fd *) -> unit;
@@ -1712,7 +1712,7 @@
              *)
             val copyCurrent = _prim "Thread_copyCurrent": unit -> unit;
             val current = _import "GC_getCurrentThread": GCState.t -> thread;
-            val finishSignalHandler = _import "GC_finishSignalHandler": GCState.t* -> unit;
+            val finishSignalHandler = _import "GC_finishSignalHandler": GCState.t -> unit;
             val returnToC = _prim "Thread_returnToC": unit -> unit;
             val saved = _import "GC_getSavedThread": GCState.t -> thread;
             val savedPre = _import "GC_getSavedThread": GCState.t -> preThread;

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/cont.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/cont.sml	2005-11-15 00:24:38 UTC (rev 4218)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/cont.sml	2005-11-15 04:05:35 UTC (rev 4219)
@@ -10,6 +10,7 @@
 struct
 
 structure Thread = Primitive.Thread
+val gcState = Primitive.GCState.gcState
 
 (* This mess with dummy is so that if callcc is ever used anywhere in the
  * program, then Primitive.usesCallcc is set to true during basis library
@@ -42,7 +43,7 @@
                           ; v ())
              | Original f =>
                   let
-                     val t = Thread.savedPre ()
+                     val t = Thread.savedPre gcState
                   in
                      Thread.atomicEnd () (* Match 1 *)
                      ; f (fn v =>

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/profile.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/profile.sml	2005-11-15 00:24:38 UTC (rev 4218)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/profile.sml	2005-11-15 04:05:35 UTC (rev 4219)
@@ -127,7 +127,7 @@
          val _ =
             Cleaner.addNew
             (Cleaner.atExit, fn () =>
-             (P.done ()
+             (P.done gcState
               ; Data.write (current (), "mlmon.out")
               ; List.app (fn d => P.Data.free (gcState, Data.raw d)) 
                          (!Data.all)))

Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/rusage.sml
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/rusage.sml	2005-11-15 00:24:38 UTC (rev 4218)
+++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/rusage.sml	2005-11-15 04:05:35 UTC (rev 4219)
@@ -28,7 +28,7 @@
              utime = toTime (utimeSec, utimeUsec)}
          end
 
-      val measureGC = Primitive.GC.setRusageMeasureGC
+      val measureGC = MLtonGC.setRusageMeasureGC
 
       val rusage =
          let 

Modified: mlton/branches/on-20050822-x86_64-branch/bytecode/interpret.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/bytecode/interpret.c	2005-11-15 00:24:38 UTC (rev 4218)
+++ mlton/branches/on-20050822-x86_64-branch/bytecode/interpret.c	2005-11-15 04:05:35 UTC (rev 4219)
@@ -5,9 +5,8 @@
  * See the file MLton-LICENSE for details.
  */
 
-#define MLTON_GC_INTERNAL
+#define MLTON_GC_INTERNAL_TYPES
 #include "platform.h"
-#undef MLTON_GC_INTERNAL
 
 #include "interpret.h"
 #include "c-chunk.h"    // c-chunk.h must come before opcode.h because it

Modified: mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun	2005-11-15 00:24:38 UTC (rev 4218)
+++ mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun	2005-11-15 04:05:35 UTC (rev 4219)
@@ -91,7 +91,7 @@
             writesStackTop = true}
 
       val exit =
-         T {args = Vector.new2 (GCState, Word32),
+         T {args = Vector.new2 (gcState, Word32),
             bytesNeeded = NONE,
             convention = Cdecl,
             ensuresBytesFree = false,
@@ -1101,10 +1101,10 @@
                               fun simpleCCall (f: CFunction.t) =
                                  ccall {args = vos args,
                                         func = f}
-                              fun simpleCCallWithGCState (f: CFuntion.t) =
+                              fun simpleCCallWithGCState (f: CFunction.t) =
                                  ccall {args = Vector.concat 
-                                               (Vector.new1 GCState,
-                                                vos args),
+                                               [Vector.new1 GCState,
+                                                vos args],
                                         func = f}
                               fun array (numElts: Operand.t) =
                                  let
@@ -1217,7 +1217,7 @@
                                               then none ()
                                            else
                                               simpleCCallWithGCState 
-                                              (CFunction.share (Operand.ty (a 0)))
+                                              (CFunction.share (Operand.ty (a 0))))
                                | MLton_size =>
                                     simpleCCallWithGCState 
                                     (CFunction.size (Operand.ty (a 0)))