[MLton-commit] r6567

Matthew Fluet fluet at mlton.org
Mon Apr 7 11:55:59 PDT 2008


Rearranging variable decls. to match sizeofObject.

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

U   mlton/trunk/runtime/gc/forward.c

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

Modified: mlton/trunk/runtime/gc/forward.c
===================================================================
--- mlton/trunk/runtime/gc/forward.c	2008-04-07 18:55:54 UTC (rev 6566)
+++ mlton/trunk/runtime/gc/forward.c	2008-04-07 18:55:59 UTC (rev 6567)
@@ -41,13 +41,14 @@
   if (DEBUG_DETAILED and header == GC_FORWARDED)
     fprintf (stderr, "  already FORWARDED\n");
   if (header != GC_FORWARDED) { /* forward the object */
+    size_t size, skip;
+
+    size_t headerBytes, objectBytes;
+    GC_objectTypeTag tag;
     uint16_t bytesNonObjptrs, numObjptrs;
-    GC_objectTypeTag tag;
 
     splitHeader(s, header, &tag, NULL, &bytesNonObjptrs, &numObjptrs);
 
-    size_t headerBytes, objectBytes, size, skip;
-
     /* Compute the space taken by the header and object body. */
     if ((NORMAL_TAG == tag) or (WEAK_TAG == tag)) { /* Fixed size object. */
       headerBytes = GC_NORMAL_HEADER_SIZE;
@@ -67,7 +68,7 @@
 
       size_t reservedMax, reservedShrink, reservedMin, reservedNew;
 
-      if (getStackCurrentObjptr(s) == op) {
+      if (getStackCurrent(s) == stack) {
         /* Shrink active stacks. */
         reservedMax =
           (size_t)(s->controls.ratios.stackCurrentMaxReserved * stack->used);
@@ -95,7 +96,7 @@
        * grow the stack.  We cannot do any growing here because we may
        * run out of to space.
        */
-      assert (getStackCurrentObjptr(s) == op
+      assert (getStackCurrent(s) == stack
               or reservedNew <= stack->reserved);
       if (reservedNew < stack->reserved) {
         if (DEBUG_STACKS or s->controls.messages)




More information about the MLton-commit mailing list