[MLton-commit] r4207
Matthew Fluet
MLton@mlton.org
Sat, 12 Nov 2005 08:25:24 -0800
Fixing asserts and comments
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/TODO
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/weak.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/TODO
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/TODO 2005-11-12 04:22:23 UTC (rev 4206)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/TODO 2005-11-12 16:25:21 UTC (rev 4207)
@@ -3,6 +3,4 @@
non-pointer data. Rename to sizeNonPointers.
* what type should be used for the size field in GC_heap? I'm using
size_t currently, since that is the type needed by malloc.
-* the "skipObjects" loop in forwardInterGenerationalObjptrs appears to
- be unnecessary.
* Why does hash-table use malloc/free while generational maps use mmap/munmap?
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c 2005-11-12 04:22:23 UTC (rev 4206)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c 2005-11-12 16:25:21 UTC (rev 4207)
@@ -218,6 +218,9 @@
assert (isAligned (sizeof (struct GC_stack), s->alignment));
assert (isAligned (GC_NORMAL_HEADER_SIZE + sizeof (struct GC_thread),
s->alignment));
+ // While the following assert is manifestly true,
+ // it checks the asserts in sizeofWeak.
+ assert (sizeofWeak (s) == sizeofWeak (s));
s->amInGC = TRUE;
s->amOriginal = TRUE;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/weak.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/weak.h 2005-11-12 04:22:23 UTC (rev 4206)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/weak.h 2005-11-12 16:25:21 UTC (rev 4207)
@@ -24,7 +24,7 @@
* The link native-pointer is used to chain the live weaks together
* during a copying gc and is otherwise unused.
*
- * The third word is the weak object-pointer.
+ * The final component is the weak object-pointer.
*/
typedef struct GC_weak {
struct GC_weak *link;