You can subscribe to this list here.
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(56) |
Sep
(40) |
Oct
(30) |
Nov
(144) |
Dec
(23) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(41) |
Feb
(29) |
Mar
(31) |
Apr
(39) |
May
(193) |
Jun
(45) |
Jul
(19) |
Aug
(3) |
Sep
(23) |
Oct
(83) |
Nov
(92) |
Dec
(123) |
2007 |
Jan
(90) |
Feb
(267) |
Mar
(120) |
Apr
(51) |
May
(40) |
Jun
(121) |
Jul
(109) |
Aug
(173) |
Sep
(77) |
Oct
(52) |
Nov
(121) |
Dec
(62) |
2008 |
Jan
(76) |
Feb
(53) |
Mar
(98) |
Apr
(87) |
May
(26) |
Jun
(27) |
Jul
(23) |
Aug
(136) |
Sep
(79) |
Oct
(68) |
Nov
(29) |
Dec
(14) |
2009 |
Jan
(7) |
Feb
(2) |
Mar
(11) |
Apr
(75) |
May
(1) |
Jun
(95) |
Jul
(19) |
Aug
(4) |
Sep
(8) |
Oct
(93) |
Nov
(43) |
Dec
(21) |
2010 |
Jan
(20) |
Feb
(23) |
Mar
(18) |
Apr
(6) |
May
(20) |
Jun
(23) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
(2) |
Feb
(6) |
Mar
(15) |
Apr
(5) |
May
(9) |
Jun
(14) |
Jul
(9) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
(2) |
Jun
(17) |
Jul
(37) |
Aug
|
Sep
(1) |
Oct
(6) |
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
(5) |
Apr
(2) |
May
(7) |
Jun
(11) |
Jul
(8) |
Aug
|
Sep
(1) |
Oct
(2) |
Nov
|
Dec
|
2014 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
|
May
(1) |
Jun
(1) |
Jul
(7) |
Aug
(2) |
Sep
|
Oct
(5) |
Nov
(2) |
Dec
(4) |
2015 |
Jan
|
Feb
(2) |
Mar
(2) |
Apr
|
May
|
Jun
(9) |
Jul
(1) |
Aug
|
Sep
|
Oct
(4) |
Nov
(1) |
Dec
|
2016 |
Jan
(2) |
Feb
(1) |
Mar
(1) |
Apr
(1) |
May
(1) |
Jun
(2) |
Jul
(1) |
Aug
|
Sep
(5) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
(1) |
Feb
(3) |
Mar
(3) |
Apr
(7) |
May
(2) |
Jun
(2) |
Jul
(5) |
Aug
(1) |
Sep
(2) |
Oct
(17) |
Nov
(4) |
Dec
(7) |
2018 |
Jan
(5) |
Feb
(14) |
Mar
(2) |
Apr
(5) |
May
(2) |
Jun
(5) |
Jul
|
Aug
(2) |
Sep
|
Oct
(3) |
Nov
(5) |
Dec
|
2019 |
Jan
(4) |
Feb
(2) |
Mar
(3) |
Apr
(1) |
May
(8) |
Jun
(14) |
Jul
(2) |
Aug
|
Sep
(2) |
Oct
(2) |
Nov
(15) |
Dec
(2) |
2020 |
Jan
(10) |
Feb
(3) |
Mar
(1) |
Apr
|
May
(9) |
Jun
(4) |
Jul
(16) |
Aug
(10) |
Sep
(4) |
Oct
(3) |
Nov
|
Dec
|
2021 |
Jan
(11) |
Feb
(2) |
Mar
(2) |
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(5) |
Sep
|
Oct
(6) |
Nov
(4) |
Dec
(4) |
2022 |
Jan
(4) |
Feb
(2) |
Mar
(2) |
Apr
|
May
(6) |
Jun
(3) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2023 |
Jan
|
Feb
|
Mar
|
Apr
(2) |
May
(5) |
Jun
(1) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
(1) |
Nov
(13) |
Dec
|
2024 |
Jan
(1) |
Feb
|
Mar
(5) |
Apr
|
May
(10) |
Jun
|
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
(1) |
Dec
(14) |
2025 |
Jan
(3) |
Feb
|
Mar
(1) |
Apr
|
May
(2) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Matthew F. <fl...@ml...> - 2005-11-15 17:57:11
|
Wrong return type in C prototype ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun ---------------------------------------------------------------------- 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-16 01:29:35 UTC (rev 4234) +++ mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun 2005-11-16 01:57:08 UTC (rev 4235) @@ -264,7 +264,7 @@ prototype = let open CType in - (Vector.new2 (Pointer, Pointer), NONE) + (Vector.new2 (Pointer, Pointer), SOME Word32) end, readsStackTop = false, return = Word32, |
From: Stephen W. <sw...@ml...> - 2005-11-15 17:29:37
|
Fixed viewsvn links to point at tagged release instead of trunk. ---------------------------------------------------------------------- U mlton/trunk/bin/grab-wiki ---------------------------------------------------------------------- Modified: mlton/trunk/bin/grab-wiki =================================================================== --- mlton/trunk/bin/grab-wiki 2005-11-16 00:51:10 UTC (rev 4233) +++ mlton/trunk/bin/grab-wiki 2005-11-16 01:29:35 UTC (rev 4234) @@ -26,11 +26,11 @@ TIMEFORMAT=' Took %lR.' base='http://mlton.org' -version=`date +%Y%m%d` - index='.index' script='.script' tmp='.tmp' +useLocal='true' +version=`date +%Y%m%d` cd "$src/doc/guide" @@ -38,7 +38,9 @@ drop='\(Download\|.*MoinEditorBackup\|OldPages\|Preferences\|RecentChanges\|TemporaryBugExamples\|TemporaryUpload\|WikiSandBox\)' -#if true; then (cd $HOME/mlton/guide-in && tar.write .) | tar.read; else +if $useLocal; then + (cd $HOME/mlton/guide-in && tar.write .) | tar.read; +else echo "Getting index:" lynx -dump "$base/Index?action=titleindex" | \ grep -v >$index -e '^$' -e "^$drop$" @@ -55,7 +57,7 @@ for f in bottom email ftp news top www; do wget -c $base/wiki/mlton/img/moin-$f.png done -#fi +fi echo "Fixing pages:" @@ -80,6 +82,8 @@ s;<link[^>]* href *= *"[^"]*?action[^"]*">;;g # Add version stamp in upper left. s;<a class = mltona\(.*\)>MLton</a>;<a class = mltona\1>MLton $version</a>; +# Replace ViewSVN references to trunk with references to release tag. +s;\(<a href = \"http://mlton.org/cgi-bin/viewsvn\.cgi.*/mlton/\)trunk\([^>]*\)>;\1tags/on-$version-release\2>;g # Fix wiki hrefs and srcs s; \(href\|src\) *= *"\(/pages/[^"]*\)"; \1="$base\2";g s; \(href\|src\) *= *"/\([^"]\+\)"; \1="\2";g |
From: Matthew F. <fl...@ml...> - 2005-11-15 16:51:13
|
Real and Word prototypes conflict with c-chunk.h inline versions ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Int/Word.c U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/Math.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform.h ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Int/Word.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Int/Word.c 2005-11-16 00:33:09 UTC (rev 4232) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Int/Word.c 2005-11-16 00:51:10 UTC (rev 4233) @@ -33,6 +33,7 @@ #endif #define coerce(f, t) \ + t f##_to##t (f x); \ t f##_to##t (f x) { \ return (t)x; \ } @@ -55,6 +56,7 @@ #define WordU64_max (WordU64)0xFFFFFFFFFFFFFFFFull #define binary(kind, name, op) \ + Word##kind Word##kind##_##name (Word##kind w1, Word##kind w2); \ Word##kind Word##kind##_##name (Word##kind w1, Word##kind w2) { \ return w1 op w2; \ } @@ -125,6 +127,7 @@ } #define compare(kind, name, op) \ + Bool Word##kind##_##name (Word##kind w1, Word##kind w2); \ Bool Word##kind##_##name (Word##kind w1, Word##kind w2) { \ return w1 op w2; \ } @@ -134,11 +137,13 @@ compare (U##size, name, op) #define unary(kind,name, op) \ + Word##kind Word##kind##_##name (Word##kind w); \ Word##kind Word##kind##_##name (Word##kind w) { \ return op w; \ } #define shift(kind, name, op) \ + Word##kind Word##kind##_##name (Word##kind w1, Word w2); \ Word##kind Word##kind##_##name (Word##kind w1, Word w2) { \ return w1 op w2; \ } @@ -162,9 +167,11 @@ bothBinary (size, quot, /) \ SmulCheckOverflows (size) \ bothBinary (size, rem, %) \ + Word##size Word##size##_rol (Word##size w1, Word w2); \ Word##size Word##size##_rol (Word##size w1, Word w2) { \ return (w1 >> (size - w2)) | (w1 << w2); \ } \ + Word##size Word##size##_ror (Word##size w1, Word w2); \ Word##size Word##size##_ror (Word##size w1, Word w2) { \ return (w1 >> w2) | (w1 << (size - w2)); \ } \ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/Math.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/Math.c 2005-11-16 00:33:09 UTC (rev 4232) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/Math.c 2005-11-16 00:51:10 UTC (rev 4233) @@ -1,9 +1,11 @@ #include "platform.h" #define unaryReal(f, g) \ + Real64 Real64_##f (Real64 x); \ Real64 Real64_##f (Real64 x) { \ return g (x); \ } \ + Real32 Real32_##f (Real32 x); \ Real32 Real32_##f (Real32 x) { \ return (Real32)(Real64_##f ((Real64)x)); \ } @@ -12,9 +14,11 @@ #undef unaryReal #define binaryReal(f, g) \ + Real64 Real64_Math_##f (Real64 x, Real64 y); \ Real64 Real64_Math_##f (Real64 x, Real64 y) { \ return g (x, y); \ } \ + Real32 Real32_Math_##f (Real32 x, Real32 y); \ Real32 Real32_Math_##f (Real32 x, Real32 y) { \ return (Real32)(Real64_Math_##f ((Real64)x, (Real64)y)); \ } @@ -22,9 +26,11 @@ #undef binaryReal #define unaryReal(f, g) \ + Real64 Real64_Math_##f (Real64 x); \ Real64 Real64_Math_##f (Real64 x) { \ return g (x); \ } \ + Real32 Real32_Math_##f (Real32 x); \ Real32 Real32_Math_##f (Real32 x) { \ return (Real32)(Real64_Math_##f ((Real64)x)); \ } @@ -40,10 +46,12 @@ unaryReal(tan, tan) #undef unaryReal +Real64 Real64_ldexp (Real64 x, Int32 i); Real64 Real64_ldexp (Real64 x, Int32 i) { return ldexp (x, i); } +Real32 Real32_ldexp (Real32 x, Int32 i); Real32 Real32_ldexp (Real32 x, Int32 i) { return (Real32)Real64_ldexp ((Real64)x, i); } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2005-11-16 00:33:09 UTC (rev 4232) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2005-11-16 00:51:10 UTC (rev 4233) @@ -977,33 +977,6 @@ Real64 Real64_modf (Real64 x, Real64 *exp); Real32 Real32_modf (Real32 x, Real32 *exp); -#define unaryReal(f) \ - Real64 Real64_##f (Real64 x); \ - Real32 Real32_##f (Real32 x); -unaryReal(abs) -unaryReal(round) -#undef unaryReal -#define binaryReal(f) \ - Real64 Real64_Math_##f (Real64 x, Real64 y); \ - Real32 Real32_Math_##f (Real32 x, Real32 y); -binaryReal(atan2) -#undef binaryReal -#define unaryReal(f) \ - Real64 Real64_Math_##f (Real64 x); \ - Real32 Real32_Math_##f (Real32 x); -unaryReal(acos) -unaryReal(asin) -unaryReal(atan) -unaryReal(cos) -unaryReal(exp) -unaryReal(ln) -unaryReal(log10) -unaryReal(sin) -unaryReal(sqrt) -unaryReal(tan) -#undef unaryReal -Real64 Real64_ldexp (Real64 x, Int32 i); -Real32 Real32_ldexp (Real32 x, Int32 i); Real64 Real64_frexp (Real64 x, Int *exp); Cstring Real64_gdtoa (double d, int mode, int ndig, int *decpt); Cstring Real32_gdtoa (float f, int mode, int ndig, int *decpt); @@ -1123,16 +1096,6 @@ /* Word{8,16,32,64} */ /* ------------------------------------------------- */ -#define coerce(f, t) \ - t f##_to##t (f x); -#define bothCoerce(from, to) \ - coerce (Word##S##from, Word##to) \ - coerce (Word##U##from, Word##to) -#define binary(kind, name) \ - Word##kind Word##kind##_##name (Word##kind w1, Word##kind w2); -#define bothBinary(size, name) \ - binary (S##size, name) \ - binary (U##size, name) #define SaddCheckOverflows(size) \ Bool WordS##size##_addCheckOverflows (WordS##size x, WordS##size y); #define UaddCheckOverflows(size) \ @@ -1143,65 +1106,24 @@ Bool Word##size##_negCheckOverflows (WordS##size x); #define SsubCheckOverflows(size) \ Bool WordS##size##_subCheckOverflows (WordS##size x, WordS##size y); -#define compare(kind, name) \ - Bool Word##kind##_##name (Word##kind w1, Word##kind w2); -#define bothCompare(size, name) \ - compare (S##size, name) \ - compare (U##size, name) -#define unary(kind, name) \ - Word##kind Word##kind##_##name (Word##kind w); -#define shift(kind, name) \ - Word##kind Word##kind##_##name (Word##kind w1, Word w2); #define all(size) \ - binary (size, add) \ SaddCheckOverflows (size) \ UaddCheckOverflows (size) \ - binary (size, andb) \ - compare (size, equal) \ - bothCompare (size, ge) \ - bothCompare (size, gt) \ - bothCompare (size, le) \ - shift (size, lshift) \ - bothCompare (size, lt) \ - bothBinary (size, mul) \ - unary (size, neg) \ negCheckOverflows (size) \ - unary (size, notb) \ - binary (size, orb) \ - bothBinary (size, quot) \ SmulCheckOverflows (size) \ - bothBinary (size, rem) \ - Word##size Word##size##_rol (Word##size w1, Word w2); \ - Word##size Word##size##_ror (Word##size w1, Word w2); \ - shift (S##size, rshift) \ - shift (U##size, rshift) \ - binary (size, sub) \ SsubCheckOverflows (size) \ - binary (size, xorb) \ - bothCoerce (size, 64) \ - bothCoerce (size, 32) \ - bothCoerce (size, 16) \ - bothCoerce (size, 8) all (8) all (16) all (32) all (64) -#undef coerce -#undef bothCoerce -#undef binary -#undef bothBinary #undef SaddCheckOverflows #undef UaddCheckOverflows #undef SmulCheckOverflows #undef negCheckOverflows #undef SsubCheckOverflows -#undef compare -#undef bothCompare -#undef unary -#undef shift #undef all /* ------------------------------------------------- */ |
From: Matthew F. <fl...@ml...> - 2005-11-15 16:33:19
|
Fixing lots of missing prototypes ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/basis-library/misc/primitive.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/rusage.sml U mlton/branches/on-20050822-x86_64-branch/runtime/Makefile U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/Error.c U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/Dirstream.c U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/getcwd.c U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/ProcEnv.c U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/getenv.c U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/getlogin.c U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/setgroups.c U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/ttyname.c D mlton/branches/on-20050822-x86_64-branch/runtime/basis/Array/ U mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c U mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/rusage.c U mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/spawne.c U mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/spawnp.c A mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Socket/GenericSock.c U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Socket/Socket.c U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/Math.c U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/gdtoa.c U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/modf.c U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/strto.c U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Stdio.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/invariant.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform/mmap-protect.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform.c U mlton/branches/on-20050822-x86_64-branch/runtime/platform.h ---------------------------------------------------------------------- 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 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/misc/primitive.sml 2005-11-16 00:33:09 UTC (rev 4232) @@ -219,7 +219,6 @@ structure Stdio = struct val print = _import "Stdio_print": string -> unit; - (* val sprintf = _import "Stdio_sprintf": char array * nullString * real -> int; *) end structure Array = @@ -1088,7 +1087,7 @@ structure Rusage = struct - val ru = _import "MLton_Rusage_ru": unit -> unit; + val ru = _import "MLton_Rusage_ru": GCState.t -> unit; val self_utime_sec = _import "MLton_Rusage_self_utime_sec": unit -> int; val self_utime_usec = _import "MLton_Rusage_self_utime_usec": unit -> int; 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 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/rusage.sml 2005-11-16 00:33:09 UTC (rev 4232) @@ -9,6 +9,7 @@ structure MLtonRusage: MLTON_RUSAGE = struct structure Prim = Primitive.MLton.Rusage + val gcState = Primitive.GCState.gcState type t = {utime: Time.time, stime: Time.time} @@ -36,7 +37,7 @@ in fn () => let - val () = Prim.ru () + val () = Prim.ru gcState open Prim in {children = collect (children_utime_sec, children_utime_usec, Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2005-11-16 00:33:09 UTC (rev 4232) @@ -181,16 +181,16 @@ # are class.c and gdtoa.c. But there may be others. So, we compile # with -fno-strict-aliasing to prevent gcc from taking advantage of # this aspect of the C spec. -basis/Real/%-gdb.o: basis/Real/%.c gdtoa/arith.h - $(CC) $(DEBUGCFLAGS) -c -o $@ $< -basis/Real/%.o: basis/Real/%.c gdtoa/arith.h - $(CC) $(OPTCFLAGS) -O1 -fno-strict-aliasing -c -o $@ $< +basis/Real/%-gdb.o: basis/Real/%.c gdtoa/arith.h $(HFILES) + $(CC) $(DEBUGCFLAGS) $(DEBUGWARNFLAGS) -c -o $@ $< +basis/Real/%.o: basis/Real/%.c gdtoa/arith.h $(HFILES) + $(CC) $(OPTCFLAGS) $(OPTWARNFLAGS) -O1 -fno-strict-aliasing -c -o $@ $< %-gdb.o: %.c $(HFILES) - $(CC) $(DEBUGCFLAGS) -c -o $@ $< + $(CC) $(DEBUGCFLAGS) $(DEBUGWARNFLAGS) -c -o $@ $< %.o: %.c $(HFILES) - $(CC) $(OPTCFLAGS) -c -o $@ $< + $(CC) $(OPTCFLAGS) $(OPTWARNFLAGS) -c -o $@ $< %-gdb.o: %.S $(CC) $(DEBUGCFLAGS) -c -o $@ $< Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/Error.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/Error.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/Error.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -9,5 +9,6 @@ } Cstring Posix_Error_strerror (Int n) { - return (Cstring)(strerror (n)); + char *res = strerror (n); + return (Cstring)res; } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/Dirstream.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/Dirstream.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/Dirstream.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -13,14 +13,9 @@ return res; } -Cpointer Posix_FileSys_Dirstream_opendir (Cpointer p) { - Cpointer res; - - res = (Cpointer)(opendir ((char *) p)); - if (DEBUG_DIRSTREAM) - fprintf (stderr, "0x%08x = opendir (%s)\n", - (uint)res, (char *)p); - return res; +Cpointer Posix_FileSys_Dirstream_opendir (Pointer p) { + DIR *res = opendir ((char *) p); + return (Cpointer)res; } Cstring Posix_FileSys_Dirstream_readdir (Cpointer d) { Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/getcwd.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/getcwd.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/FileSys/getcwd.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -1,5 +1,6 @@ #include "platform.h" Cstring Posix_FileSys_getcwd (Pointer buf, Size n) { - return (Cstring)(getcwd ((char*)buf, n)); + char *res = getcwd ((char*)buf, n); + return (Cstring)res; } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/ProcEnv.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/ProcEnv.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/ProcEnv.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -1,7 +1,8 @@ #include "platform.h" Cstring Posix_ProcEnv_ctermid () { - return (Cstring)(ctermid (NULL)); + char *res = ctermid (NULL); + return (Cstring)res; } Gid Posix_ProcEnv_getegid () { Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/getenv.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/getenv.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/getenv.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -1,5 +1,6 @@ #include "platform.h" Cstring Posix_ProcEnv_getenv(Pointer s) { - return (Cstring)getenv((char *)s); + char *res = getenv((char *)s); + return (Cstring)res; } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/getlogin.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/getlogin.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/getlogin.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -1,5 +1,6 @@ #include "platform.h" Cstring Posix_ProcEnv_getlogin () { - return (Cstring)(getlogin ()); + char *res = getlogin (); + return (Cstring)(res); } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/setgroups.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/setgroups.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/setgroups.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -4,7 +4,7 @@ int i; gid_t *list; int res; - int size; + uintmax_t size; size = GC_getArrayLength (groups); list = (gid_t*)(calloc_safe (size, sizeof(*list))); Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/ttyname.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/ttyname.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/ProcEnv/ttyname.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -1,5 +1,6 @@ #include "platform.h" Cstring Posix_ProcEnv_ttyname (Fd f) { - return (Cstring)(ttyname (f)); + char *res = ttyname (f); + return (Cstring)res; } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -79,15 +79,16 @@ /* * Initialize an __mpz_struct to use the space provided by an ML array. */ -static inline void initRes (__mpz_struct *mpzp, uint bytes) { +static inline void initRes (__mpz_struct *mpzp, size_t bytes) { GC_intInf bp; - assert (bytes <= gcState.limitPlusSlop - gcState.frontier); + assert (bytes <= (size_t)(gcState.limitPlusSlop - gcState.frontier)); bp = (GC_intInf)gcState.frontier; - /* We have as much space for the limbs as there is to the end of the - * heap. Divide by 4 to get number of words. + /* We have as much space for the limbs as there is to the end + * of the heap. Divide by (sizeof(mp_limb_t)) to get number + * of limbs. */ - mpzp->_mp_alloc = (gcState.limitPlusSlop - (pointer)bp->limbs) / 4; + mpzp->_mp_alloc = (gcState.limitPlusSlop - (pointer)bp->limbs) / (sizeof(mp_limb_t)); mpzp->_mp_size = 0; /* is this necessary? */ mpzp->_mp_d = (mp_limb_t*)(bp->limbs); } @@ -108,9 +109,9 @@ return (res); } -static inline void setFrontier (pointer p, uint bytes) { +static inline void setFrontier (pointer p, size_t bytes) { p = GC_alignFrontier (&gcState, p); - assert (p - gcState.frontier <= bytes); + assert ((size_t)(p - gcState.frontier) <= bytes); GC_profileAllocInc (&gcState, p - gcState.frontier); gcState.frontier = p; assert (gcState.frontier <= gcState.limitPlusSlop); @@ -124,7 +125,7 @@ * If the answer doesn't need all of the space allocated, we adjust * the array size and roll the frontier slightly back. */ -static pointer answer (__mpz_struct *ans, uint bytes) { +static pointer answer (__mpz_struct *ans, size_t bytes) { GC_intInf bp; int size; @@ -166,7 +167,7 @@ return (pointer)&bp->isneg; } -static inline pointer binary (pointer lhs, pointer rhs, uint bytes, +static inline pointer binary (pointer lhs, pointer rhs, size_t bytes, void(*binop)(__mpz_struct *resmpz, __gmp_const __mpz_struct *lhsspace, __gmp_const __mpz_struct *rhsspace)) { @@ -183,57 +184,57 @@ return answer (&resmpz, bytes); } -pointer IntInf_add (pointer lhs, pointer rhs, uint bytes) { +pointer IntInf_add (pointer lhs, pointer rhs, size_t bytes) { if (DEBUG_INT_INF) - fprintf (stderr, "IntInf_add ("FMTPTR", "FMTPTR", %u)\n", + fprintf (stderr, "IntInf_add ("FMTPTR", "FMTPTR", %zu)\n", (uintptr_t)lhs, (uintptr_t)rhs, bytes); return binary (lhs, rhs, bytes, &mpz_add); } -pointer IntInf_gcd (pointer lhs, pointer rhs, uint bytes) { +pointer IntInf_gcd (pointer lhs, pointer rhs, size_t bytes) { if (DEBUG_INT_INF) - fprintf (stderr, "IntInf_gcd ("FMTPTR", "FMTPTR", %u)\n", + fprintf (stderr, "IntInf_gcd ("FMTPTR", "FMTPTR", %zu)\n", (uintptr_t)lhs, (uintptr_t)rhs, bytes); return binary (lhs, rhs, bytes, &mpz_gcd); } -pointer IntInf_mul (pointer lhs, pointer rhs, uint bytes) { +pointer IntInf_mul (pointer lhs, pointer rhs, size_t bytes) { if (DEBUG_INT_INF) - fprintf (stderr, "IntInf_mul ("FMTPTR", "FMTPTR", %u)\n", + fprintf (stderr, "IntInf_mul ("FMTPTR", "FMTPTR", %zu)\n", (uintptr_t)lhs, (uintptr_t)rhs, bytes); return binary (lhs, rhs, bytes, &mpz_mul); } -pointer IntInf_sub (pointer lhs, pointer rhs, uint bytes) { +pointer IntInf_sub (pointer lhs, pointer rhs, size_t bytes) { if (DEBUG_INT_INF) - fprintf (stderr, "IntInf_sub ("FMTPTR", "FMTPTR", %u)\n", + fprintf (stderr, "IntInf_sub ("FMTPTR", "FMTPTR", %zu)\n", (uintptr_t)lhs, (uintptr_t)rhs, bytes); return binary (lhs, rhs, bytes, &mpz_sub); } -pointer IntInf_andb(pointer lhs, pointer rhs, uint bytes) { +pointer IntInf_andb(pointer lhs, pointer rhs, size_t bytes) { if (DEBUG_INT_INF) - fprintf (stderr, "IntInf_andb ("FMTPTR", "FMTPTR", %u)\n", + fprintf (stderr, "IntInf_andb ("FMTPTR", "FMTPTR", %zu)\n", (uintptr_t)lhs, (uintptr_t)rhs, bytes); return binary(lhs, rhs, bytes, &mpz_and); } -pointer IntInf_orb(pointer lhs, pointer rhs, uint bytes) { +pointer IntInf_orb(pointer lhs, pointer rhs, size_t bytes) { if (DEBUG_INT_INF) - fprintf (stderr, "IntInf_orb ("FMTPTR", "FMTPTR", %u)\n", + fprintf (stderr, "IntInf_orb ("FMTPTR", "FMTPTR", %zu)\n", (uintptr_t)lhs, (uintptr_t)rhs, bytes); return binary(lhs, rhs, bytes, &mpz_ior); } -pointer IntInf_xorb(pointer lhs, pointer rhs, uint bytes) { +pointer IntInf_xorb(pointer lhs, pointer rhs, size_t bytes) { if (DEBUG_INT_INF) - fprintf (stderr, "IntInf_xorb ("FMTPTR", "FMTPTR", %u)\n", + fprintf (stderr, "IntInf_xorb ("FMTPTR", "FMTPTR", %zu)\n", (uintptr_t)lhs, (uintptr_t)rhs, bytes); return binary(lhs, rhs, bytes, &mpz_xor); } static pointer -unary(pointer arg, uint bytes, +unary(pointer arg, size_t bytes, void(*unop)(__mpz_struct *resmpz, __gmp_const __mpz_struct *argspace)) { @@ -247,22 +248,22 @@ return answer (&resmpz, bytes); } -pointer IntInf_neg(pointer arg, uint bytes) { +pointer IntInf_neg(pointer arg, size_t bytes) { if (DEBUG_INT_INF) - fprintf (stderr, "IntInf_neg ("FMTPTR", %u)\n", + fprintf (stderr, "IntInf_neg ("FMTPTR", %zu)\n", (uintptr_t)arg, bytes); return unary(arg, bytes, &mpz_neg); } -pointer IntInf_notb(pointer arg, uint bytes) { +pointer IntInf_notb(pointer arg, size_t bytes) { if (DEBUG_INT_INF) - fprintf (stderr, "IntInf_notb ("FMTPTR", %u)\n", + fprintf (stderr, "IntInf_notb ("FMTPTR", %zu)\n", (uintptr_t)arg, bytes); return unary(arg, bytes, &mpz_com); } static pointer -shary(pointer arg, uint shift, uint bytes, +shary(pointer arg, uint shift, size_t bytes, void(*shop)(__mpz_struct *resmpz, __gmp_const __mpz_struct *argspace, unsigned long shift)) @@ -277,16 +278,16 @@ return answer (&resmpz, bytes); } -pointer IntInf_arshift(pointer arg, uint shift, uint bytes) { +pointer IntInf_arshift(pointer arg, uint shift, size_t bytes) { if (DEBUG_INT_INF) - fprintf (stderr, "IntInf_arshift ("FMTPTR", %u, %u)\n", + fprintf (stderr, "IntInf_arshift ("FMTPTR", %u, %zu)\n", (uintptr_t)arg, shift, bytes); return shary(arg, shift, bytes, &mpz_fdiv_q_2exp); } -pointer IntInf_lshift(pointer arg, uint shift, uint bytes) { +pointer IntInf_lshift(pointer arg, uint shift, size_t bytes) { if (DEBUG_INT_INF) - fprintf (stderr, "IntInf_lshift ("FMTPTR", %u, %u)\n", + fprintf (stderr, "IntInf_lshift ("FMTPTR", %u, %zu)\n", (uintptr_t)arg, shift, bytes); return shary(arg, shift, bytes, &mpz_mul_2exp); } @@ -336,7 +337,7 @@ * Arg is an intInf, base is the base to use (2, 8, 10 or 16) and space is a * string (mutable) which is large enough. */ -pointer IntInf_toString (pointer arg, int base, uint bytes) { +pointer IntInf_toString (pointer arg, int base, size_t bytes) { GC_string sp; __mpz_struct argmpz; mp_limb_t argspace[2]; @@ -346,7 +347,7 @@ char c; if (DEBUG_INT_INF) - fprintf (stderr, "IntInf_toString ("FMTPTR", %d, %u)\n", + fprintf (stderr, "IntInf_toString ("FMTPTR", %d, %zu)\n", (uintptr_t)arg, base, bytes); assert (base == 2 || base == 8 || base == 10 || base == 16); fill (arg, &argmpz, argspace); @@ -382,7 +383,7 @@ * num is the numerator bignum, den is the denominator and frontier is * the current frontier. */ -pointer IntInf_quot (pointer num, pointer den, uint bytes) { +pointer IntInf_quot (pointer num, pointer den, size_t bytes) { __mpz_struct resmpz, nmpz, dmpz; @@ -468,7 +469,7 @@ * num is the numerator bignum, den is the denominator and frontier is * the current frontier. */ -pointer IntInf_rem (pointer num, pointer den, uint bytes) { +pointer IntInf_rem (pointer num, pointer den, size_t bytes) { __mpz_struct resmpz, nmpz, dmpz; Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/rusage.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/rusage.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/rusage.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -1,7 +1,5 @@ #include "platform.h" -extern struct GC_state gcState; - static struct rusage self; static struct rusage children; static struct rusage gc; @@ -54,8 +52,8 @@ return gc.ru_stime.tv_usec; } -void MLton_Rusage_ru (void) { - gc = *(GC_getRusageGCAddr (&gcState)); +void MLton_Rusage_ru (GC_state s) { + gc = *(GC_getRusageGCAddr (s)); getrusage (RUSAGE_SELF, &self); getrusage (RUSAGE_CHILDREN, &children); } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/spawne.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/spawne.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/spawne.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -28,7 +28,9 @@ return result; } #else -Int MLton_Process_spawne (Pointer p, Pointer a, Pointer e) { +Int MLton_Process_spawne (__attribute__ ((unused)) Pointer p, + __attribute__ ((unused)) Pointer a, + __attribute__ ((unused)) Pointer e) { die ("MLton_Process_spawne not implemented"); } #endif Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/spawnp.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/spawnp.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/spawnp.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -18,7 +18,8 @@ return result; } #else -Int MLton_Process_spawnp (Pointer p, Pointer a) { +Int MLton_Process_spawnp (__attribute__ ((unused)) Pointer p, + __attribute__ ((unused)) Pointer a) { die ("MLton_Process_spawnp not implemented"); } #endif Copied: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Socket/GenericSock.c (from rev 4223, mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Socket/Socket.c) =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Socket/Socket.c 2005-11-15 19:15:14 UTC (rev 4223) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Socket/GenericSock.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -0,0 +1,11 @@ +#include "platform.h" + +Int GenericSock_socket (Int domain, Int type, Int protocol) { + MLton_initSockets (); + return socket (domain, type, protocol); +} + +Int GenericSocket_socketPair (Int domain, Int type, Int protocol, Int sv[2]) { + MLton_initSockets (); + return socketpair (domain, type, protocol, (int*)sv); +} Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Socket/Socket.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Socket/Socket.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Net/Socket/Socket.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -57,16 +57,6 @@ return shutdown (s, how); } -Int GenericSock_socket (Int domain, Int type, Int protocol) { - MLton_initSockets (); - return socket (domain, type, protocol); -} - -Int Socket_socketPair (Int domain, Int type, Int protocol, Int sv[2]) { - MLton_initSockets (); - return socketpair (domain, type, protocol, (int*)sv); -} - Int Socket_Ctl_getSockOpt (Int s, Int level, Int optname, Char *optval, Int *optlen) { MLton_initSockets (); Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/Math.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/Math.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/Math.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -1,31 +1,31 @@ #include "platform.h" #define unaryReal(f, g) \ - Real64 Real64_##f (Real64 x) { \ + Real64 Real64_##f (Real64 x) { \ return g (x); \ } \ - Real32 Real32_##f (Real32 x) { \ + Real32 Real32_##f (Real32 x) { \ return (Real32)(Real64_##f ((Real64)x)); \ } unaryReal(abs, fabs) unaryReal(round, rint) #undef unaryReal -#define binaryReal(f, g) \ +#define binaryReal(f, g) \ Real64 Real64_Math_##f (Real64 x, Real64 y) { \ - return g (x, y); \ - } \ + return g (x, y); \ + } \ Real32 Real32_Math_##f (Real32 x, Real32 y) { \ - return (Real32)(Real64_Math_##f ((Real64)x, (Real64)y)); \ + return (Real32)(Real64_Math_##f ((Real64)x, (Real64)y)); \ } binaryReal(atan2, atan2) #undef binaryReal #define unaryReal(f, g) \ - Real64 Real64_Math_##f (Real64 x) { \ + Real64 Real64_Math_##f (Real64 x) { \ return g (x); \ } \ - Real32 Real32_Math_##f (Real32 x) { \ + Real32 Real32_Math_##f (Real32 x) { \ return (Real32)(Real64_Math_##f ((Real64)x)); \ } unaryReal(acos, acos) Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/gdtoa.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/gdtoa.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/gdtoa.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -6,7 +6,7 @@ #endif /* This code is patterned on g_dfmt from the gdtoa sources. */ -char * Real64_gdtoa (double d, int mode, int ndig, int *decpt) { +Cstring Real64_gdtoa (double d, int mode, int ndig, int *decpt) { ULong bits[2]; int ex; static FPI fpi = { 53, 1-1023-53+1, 2046-1023-53+1, 1, 0 }; @@ -37,10 +37,10 @@ if (DEBUG) fprintf (stderr, "%s = gdtoa (%g, %d, %d) decpt = %d\n", result, d, mode, ndig, *decpt); - return result; + return (Cstring)result; } -char * Real32_gdtoa (float f, int mode, int ndig, int *decpt) { +Cstring Real32_gdtoa (float f, int mode, int ndig, int *decpt) { ULong bits[1]; int ex; static FPI fpi = { 24, 1-127-24+1, 254-127-24+1, 1, 0 }; @@ -70,5 +70,5 @@ if (DEBUG) fprintf (stderr, "%s = gdtoa (%g, %d, %d) decpt = %d\n", result, (double)f, mode, ndig, *decpt); - return result; + return (Cstring)result; } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/modf.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/modf.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/modf.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -1,12 +1,12 @@ #include "platform.h" +Real64 Real64_modf (Real64 x, Real64 *exp) { + return modf (x, exp); +} + Real32 Real32_modf (Real32 x, Real32 *exp) { Real64 exp_, res; res = modf ((Real64) x, &exp_); *exp = (Real32)exp_; return (Real32)res; } - -Real64 Real64_modf (Real64 x, Real64 *exp) { - return modf (x, exp); -} Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/strto.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/strto.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/strto.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -3,20 +3,20 @@ Real32 gdtoa_strtof (char *s, char **endptr); Real64 gdtoa_strtod (char *s, char **endptr); -Real32 Real32_strto (char *s) { +Real32 Real32_strto (Pointer s) { char *endptr; Real32 res; - res = gdtoa_strtof (s, &endptr); + res = gdtoa_strtof ((char *)s, &endptr); assert (NULL != endptr); return res; } -Real64 Real64_strto (char *s) { +Real64 Real64_strto (Pointer s) { char *endptr; Real64 res; - res = gdtoa_strtod (s, &endptr); + res = gdtoa_strtod ((char *)s, &endptr); assert (NULL != endptr); return res; } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Stdio.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Stdio.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Stdio.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -1,12 +1,9 @@ #include "platform.h" void Stdio_print (Pointer s) { - if (0 == Array_numElements (s)) + uintmax_t size = GC_getArrayLength (s); + if (0 == size) return; - while (1 != fwrite (s, Array_numElements(s), 1, stderr)) + while (1 != fwrite (s, (size_t)size, 1, stderr)) /* nothing */; } - -Int Stdio_sprintf (Pointer buf, Pointer fmt, Real x) { - return sprintf ((char*) buf, (char*) fmt, x); -} Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/invariant.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/invariant.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/invariant.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -13,6 +13,19 @@ "opp = "FMTPTR" " "*opp = "FMTOBJPTR"\n", (uintptr_t)opp, *opp); + /* The following checks that intergenerational pointers have the + * appropriate card marked. Unfortunately, it doesn't work because + * for stacks, the card containing the beginning of the stack is + * marked, but any remaining cards aren't. + */ + if (FALSE and s->mutatorMarksCards + and isPointerInOldGen (s, (pointer)opp) + and isObjptrInNursery (s, *opp) + and not isCardMarked (s, (pointer)opp)) { + displayGCState (s, stderr); + die ("gc.c: intergenerational pointer from "FMTPTR" to "FMTOBJPTR" with unmarked card.\n", + (uintptr_t)opp, *opp); + } } bool invariantForGC (GC_state s) { Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/linux.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -71,11 +71,11 @@ /* Posix */ /* ------------------------------------------------- */ -void Posix_IO_setbin (Fd fd) { +void Posix_IO_setbin (__attribute__ ((unused)) Fd fd) { die("Posix_IO_setbin not implemented"); } -void Posix_IO_settext (Fd fd) { +void Posix_IO_settext (__attribute__ ((unused)) Fd fd) { die("Posix_IO_settext not implemented"); } @@ -83,6 +83,7 @@ /* Process */ /* ------------------------------------------------- */ -Pid MLton_Process_cwait (Pid pid, Pointer status) { +Pid MLton_Process_cwait (__attribute__ ((unused)) Pid pid, + __attribute__ ((unused)) Pointer status) { die("MLton_Process_cwait not implemented"); } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/mmap-protect.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/mmap-protect.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/mmap-protect.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -6,10 +6,10 @@ low = base; if (mprotect (low, dead_low, PROT_NONE)) diee ("mprotect failed"); - result = low + dead_low; + result = (void*)((pointer)low + dead_low); if (mprotect (result, length, PROT_READ | PROT_WRITE | PROT_EXEC)) diee ("mprotect failed"); - high = result + length; + high = (void*)((pointer)result + length); if (mprotect (high, dead_high, PROT_NONE)) diee ("mprotect failed"); return result; Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform.c 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform.c 2005-11-16 00:33:09 UTC (rev 4232) @@ -22,9 +22,9 @@ start = GC_init (s, argc, argv); /* Setup argv and argc that SML sees. */ /* start is now the index of the first real arg. */ - CommandLine_commandName = (uint)(argv[0]); + CommandLine_commandName = (unsigned int)(argv[0]); CommandLine_argc = argc - start; - CommandLine_argv = (uint)(argv + start); + CommandLine_argv = (unsigned int)(argv + start); } void MLton_exit (GC_state s, Int status) { Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2005-11-15 23:55:59 UTC (rev 4231) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2005-11-16 00:33:09 UTC (rev 4232) @@ -121,6 +121,13 @@ #include "types.h" /* ---------------------------------------------------------------- */ +/* Runtime Init/Exit */ +/* ---------------------------------------------------------------- */ + +void MLton_init (int argc, char **argv, GC_state s); +void MLton_exit (GC_state s, Int status) __attribute__ ((noreturn)); + +/* ---------------------------------------------------------------- */ /* Utility libraries */ /* ---------------------------------------------------------------- */ @@ -171,13 +178,6 @@ /* ---------------------------------------------------------------- */ /* ------------------------------------------------- */ -/* Array */ -/* ------------------------------------------------- */ - -#define Array_maxLen GC_MAX_ARRAY_LENGTH -Int Array_numElements (Pointer p); - -/* ------------------------------------------------- */ /* CommandLine */ /* ------------------------------------------------- */ @@ -250,20 +250,20 @@ * into the array used for allocation profiling, and the appropriate element * is incremented by the amount that the function moves the frontier. */ -Pointer IntInf_add (Pointer lhs, Pointer rhs, uint bytes); -Pointer IntInf_andb (Pointer lhs, Pointer rhs, uint bytes); -Pointer IntInf_arshift (Pointer arg, uint shift, uint bytes); -Pointer IntInf_gcd (Pointer lhs, Pointer rhs, uint bytes); -Pointer IntInf_lshift (Pointer arg, uint shift, uint bytes); -Pointer IntInf_mul (Pointer lhs, Pointer rhs, uint bytes); -Pointer IntInf_neg (Pointer arg, uint bytes); -Pointer IntInf_notb (Pointer arg, uint bytes); -Pointer IntInf_orb (Pointer lhs, Pointer rhs, uint bytes); -Pointer IntInf_quot (Pointer num, Pointer den, uint bytes); -Pointer IntInf_rem (Pointer num, Pointer den, uint bytes); -Pointer IntInf_sub (Pointer lhs, Pointer rhs, uint bytes); -Pointer IntInf_toString (Pointer arg, int base, uint bytes); -Pointer IntInf_xorb (Pointer lhs, Pointer rhs, uint bytes); +Pointer IntInf_add (Pointer lhs, Pointer rhs, size_t bytes); +Pointer IntInf_andb (Pointer lhs, Pointer rhs, size_t bytes); +Pointer IntInf_arshift (Pointer arg, uint shift, size_t bytes); +Pointer IntInf_gcd (Pointer lhs, Pointer rhs, size_t bytes); +Pointer IntInf_lshift (Pointer arg, uint shift, size_t bytes); +Pointer IntInf_mul (Pointer lhs, Pointer rhs, size_t bytes); +Pointer IntInf_neg (Pointer arg, size_t bytes); +Pointer IntInf_notb (Pointer arg, size_t bytes); +Pointer IntInf_orb (Pointer lhs, Pointer rhs, size_t bytes); +Pointer IntInf_quot (Pointer num, Pointer den, size_t bytes); +Pointer IntInf_rem (Pointer num, Pointer den, size_t bytes); +Pointer IntInf_sub (Pointer lhs, Pointer rhs, size_t bytes); +Pointer IntInf_toString (Pointer arg, int base, size_t bytes); +Pointer IntInf_xorb (Pointer lhs, Pointer rhs, size_t bytes); Word IntInf_smallMul (Word lhs, Word rhs, Pointer carry); Int IntInf_compare (Pointer lhs, Pointer rhs); @@ -285,11 +285,10 @@ /* MLton */ /* ------------------------------------------------- */ +void MLton_allocTooLarge (void) __attribute__ ((noreturn)); /* print a bug message and exit (2) */ -void MLton_bug (Pointer msg); +void MLton_bug (Pointer msg) __attribute__ ((noreturn)); -Int MLton_errno (void); - /* ---------------------------------- */ /* MLton.Platform */ /* ---------------------------------- */ @@ -372,7 +371,61 @@ Rlimit MLton_Rlimit_getSoft (void); Int MLton_Rlimit_set (Resource r, Rlimit hard, Rlimit soft); +/* ---------------------------------- */ +/* MLton.Rusage */ +/* ---------------------------------- */ + +Int MLton_Rusage_self_utime_sec (void); +Int MLton_Rusage_self_utime_usec (void); +Int MLton_Rusage_self_stime_sec (void); +Int MLton_Rusage_self_stime_usec (void); +Int MLton_Rusage_children_utime_sec (void); +Int MLton_Rusage_children_utime_usec (void); +Int MLton_Rusage_children_stime_sec (void); +Int MLton_Rusage_children_stime_usec (void); +Int MLton_Rusage_gc_utime_sec (void); +Int MLton_Rusage_gc_utime_usec (void); +Int MLton_Rusage_gc_stime_sec (void); +Int MLton_Rusage_gc_stime_usec (void); +void MLton_Rusage_ru (GC_state s); + /* ------------------------------------------------- */ +/* Net */ +/* ------------------------------------------------- */ + +Int Net_htonl (Int i); +Int Net_ntohl (Int i); +Int Net_htons (Int i); +Int Net_ntohs (Int i); +#define NetHostDB_inAddrLen sizeof (struct in_addr) +#define NetHostDB_INADDR_ANY INADDR_ANY +Cstring NetHostDB_Entry_name(void); +Int NetHostDB_Entry_numAliases(void); +Cstring NetHostDB_Entry_aliasesN(Int n); +Int NetHostDB_Entry_addrType(void); +Int NetHostDB_Entry_length(void); +Int NetHostDB_Entry_numAddrs(void); +void NetHostDB_Entry_addrsN(Int n, Pointer addr); +Bool NetHostDB_getByAddress(Pointer addr, Int len); +Bool NetHostDB_getByName(Cstring name); +Int NetHostDB_getHostName(Pointer buf, Int len); +Cstring NetProtDB_Entry_name(void); +Int NetProtDB_Entry_numAliases(void); +Cstring NetProtDB_Entry_aliasesN(Int n); +Int NetProtDB_Entry_protocol(void); +Int NetProtDB_getByName(Cstring name); +Int NetProtDB_getByNumber(Int proto); +Cstring NetServDB_Entry_name(void); +Int NetServDB_Entry_numAliases(void); +Cstring NetServDB_Entry_aliasesN(Int n); +Int NetServDB_Entry_port(void); +Cstring NetServDB_Entry_protocol(void); +Int NetServDB_getByName(Cstring name, Cstring proto); +Int NetServDB_getByNameNull(Cstring name); +Int NetServDB_getByPort(Int port, Cstring proto); +Int NetServDB_getByPortNull(Int port); + +/* ------------------------------------------------- */ /* OS */ /* ------------------------------------------------- */ @@ -387,8 +440,14 @@ /* PackReal */ /* ------------------------------------------------- */ -Real64 PackReal_subVec (Pointer v, Int offset); -void PackReal_update (Pointer a, Int offset, Real64 r); +Real32 PackReal32_subVec (Pointer v, Int offset); +Real32 PackReal32_subVecRev (Pointer v, Int offset); +Real64 PackReal64_subVec (Pointer v, Int offset); +Real64 PackReal64_subVecRev (Pointer v, Int offset); +void PackReal32_update (Pointer a, Int offset, Real32 r); +void PackReal32_updateRev (Pointer a, Int offset, Real32 r); +void PackReal64_update (Pointer a, Int offset, Real64 r); +void PackReal64_updateRev (Pointer a, Int offset, Real64 r); /* ------------------------------------------------- */ /* Posix */ @@ -399,7 +458,7 @@ /* ---------------------------------- */ void Posix_Error_clearErrno (void); -Int Posix_Error_gettErrno (void); +int Posix_Error_getErrno (void); Cstring Posix_Error_strerror (Int n); #define Posix_Error_acces EACCES @@ -542,7 +601,7 @@ #endif Int Posix_FileSys_Dirstream_closedir (Cpointer d); -Cpointer Posix_FileSys_DirStream_opendir (Pointer p); +Cpointer Posix_FileSys_Dirstream_opendir (Pointer p); Cstring Posix_FileSys_Dirstream_readdir (Cpointer d); void Posix_FileSys_Dirstream_rewinddir (Cpointer p); @@ -565,6 +624,16 @@ void Posix_FileSys_Utimbuf_setModTime (Int x); Int Posix_FileSys_Utimbuf_utime (Pointer s); +Int Posix_FileSys_access (Pointer f, Word w); +Int Posix_FileSys_chdir(Pointer p); +Int Posix_FileSys_chmod (Pointer p, Mode m); +Int Posix_FileSys_chown (Pointer p, Uid u, Gid g); +Int Posix_FileSys_fchmod (Fd f, Mode m); +Int Posix_FileSys_fchown (Fd f, Uid u, Gid g); +Int Posix_FileSys_fpathconf (Fd f, Int n); +Int Posix_FileSys_ftruncate (Fd f, Position n); +Cstring Posix_FileSys_getcwd (Pointer buf, Size n); +Int Posix_FileSys_link (Pointer p1, Pointer p2); Int Posix_FileSys_mkdir (Pointer p, Word w); Int Posix_FileSys_mkfifo (Pointer p, Word w); Int Posix_FileSys_open (Pointer p, Word w, Mode m); @@ -676,6 +745,7 @@ Int Posix_ProcEnv_setuid (Uid u); Int Posix_ProcEnv_setgid (Gid g); Int Posix_ProcEnv_getgroups (Pointer groups); +Int Posix_ProcEnv_setgroups (Pointer groups); Cstring Posix_ProcEnv_getlogin (void); Pid Posix_ProcEnv_getpgrp (void); Pid Posix_ProcEnv_setsid (void); @@ -733,11 +803,13 @@ Int Posix_Process_alarm (Int i); Int Posix_Process_exece (Pointer path, Pointer args, Pointer env); Int Posix_Process_execp (Pointer file, Pointer args); -void Posix_Process_exit (Int i); +void Posix_Process_exit (Int i) __attribute__ ((noreturn)); Pid Posix_Process_fork (void); Int Posix_Process_kill (Pid p, Signal s); +Int Posix_Process_nanosleep (Pointer sec, Pointer nsec); Int Posix_Process_pause (void); Int Posix_Process_sleep (Int i); +int Posix_Process_system (const char* cmd); Pid Posix_Process_waitpid (Pid p, Pointer s, Int i); Bool Posix_Process_ifExited (Status s); Int Posix_Process_exitStatus (Status s); @@ -761,16 +833,21 @@ #define Posix_Signal_setmask SIG_SETMASK #define Posix_Signal_unblock SIG_UNBLOCK Int Posix_Signal_default (Int signum); +bool Posix_Signal_isGCPending (void); +Bool Posix_Signal_isPending (Int signum); Int Posix_Signal_handle (Int signum); +void Posix_Signal_handleGC (void); Int Posix_Signal_ignore (Int signum); Int Posix_Signal_isDefault (Int signum, Bool *isDef); -Bool Posix_Signal_isPending (Int signum); +void Posix_Signal_resetPending (void); + Int Posix_Signal_sigaddset (Int signum); Int Posix_Signal_sigdelset (Int signum); Int Posix_Signal_sigemptyset (void); Int Posix_Signal_sigfillset (void); +Int Posix_Signal_sigismember (Int signum); Int Posix_Signal_sigprocmask (Int how); -Int Posix_Signal_sigsuspend (void); +void Posix_Signal_suspend (void); /* ---------------------------------- */ /* Posix.SysDB */ @@ -895,6 +972,58 @@ Int Ptrace_ptrace4 (Int request, Int pid, Word addr, Pointer data); /* ------------------------------------------------- */ +/* Real */ +/* ------------------------------------------------- */ + +Real64 Real64_modf (Real64 x, Real64 *exp); +Real32 Real32_modf (Real32 x, Real32 *exp); +#define unaryReal(f) \ + Real64 Real64_##f (Real64 x); \ + Real32 Real32_##f (Real32 x); +unaryReal(abs) +unaryReal(round) +#undef unaryReal +#define binaryReal(f) \ + Real64 Real64_Math_##f (Real64 x, Real64 y); \ + Real32 Real32_Math_##f (Real32 x, Real32 y); +binaryReal(atan2) +#undef binaryReal +#define unaryReal(f) \ + Real64 Real64_Math_##f (Real64 x); \ + Real32 Real32_Math_##f (Real32 x); +unaryReal(acos) +unaryReal(asin) +unaryReal(atan) +unaryReal(cos) +unaryReal(exp) +unaryReal(ln) +unaryReal(log10) +unaryReal(sin) +unaryReal(sqrt) +unaryReal(tan) +#undef unaryReal +Real64 Real64_ldexp (Real64 x, Int32 i); +Real32 Real32_ldexp (Real32 x, Int32 i); +Real64 Real64_frexp (Real64 x, Int *exp); +Cstring Real64_gdtoa (double d, int mode, int ndig, int *decpt); +Cstring Real32_gdtoa (float f, int mode, int ndig, int *decpt); +Int Real32_class (Real32 f); +Int Real64_class (Real64 d); +Real32 Real32_strto (Pointer s); +Real64 Real64_strto (Pointer s); +Real64 Real64_nextAfter (Real64 x1, Real64 x2); +Int Real32_signBit (Real32 f); +Int Real64_signBit (Real64 d); +#define ternary(size, name) \ + Real##size Real##size##_mul##name \ + (Real##size r1, Real##size r2, Real##size r3); +ternary(32, add) +ternary(64, add) +ternary(32, sub) +ternary(64, sub) +#undef ternary + +/* ------------------------------------------------- */ /* Socket */ /* ------------------------------------------------- */ @@ -904,8 +1033,6 @@ static inline void MLton_initSockets (void) {} #endif -#define NetHostDB_inAddrLen sizeof (struct in_addr) -#define NetHostDB_INADDR_ANY INADDR_ANY #define Socket_sockAddrLenMax max(sizeof (struct sockaddr), \ max(sizeof (struct sockaddr_un), \ max(sizeof (struct sockaddr_in), \ @@ -940,13 +1067,37 @@ #define Socket_MSG_PEEK MSG_PEEK #define Socket_INetSock_TCP_SOL_TCP IPPROTO_TCP #define Socket_INetSock_TCP_SO_NODELAY TCP_NODELAY +Int Socket_accept (Int s, Char *addr, Int *addrlen); +Int Socket_bind (Int s, Char *addr, Int addrlen); +Int Socket_close(Int s); +Int Socket_connect (Int s, Char *addr, Int addrlen); +Int Socket_familyOfAddr(Char *addr); +Int Socket_listen (Int s, Int backlog); +Int Socket_recv (Int s, Char *msg, Int start, Int len, Word flags); +Int Socket_recvFrom (Int s, Char *msg, Int start, Int len, Word flags, Char* addr, Int *addrlen); +Int Socket_send (Int s, Char *msg, Int start, Int len, Word flags); +Int Socket_sendTo (Int s, Char *msg, Int start, Int len, Word flags, Char* addr, Int addrlen); +Int Socket_shutdown (Int s, Int how); +Int Socket_Ctl_getSockOpt (Int s, Int level, Int optname, Char *optval, Int *optlen); +Int Socket_Ctl_setSockOpt (Int s, Int level, Int optname, Char *optval, Int optlen); +Int Socket_Ctl_getsetIOCtl (Int s, Int request, Char* argp); +Int Socket_Ctl_getPeerName (Int s, Char *name, Int *namelen); +Int Socket_Ctl_getSockName (Int s, Char *name, Int *namelen); +Int GenericSock_socket (Int domain, Int type, Int protocol); +Int GenericSocket_socketPair (Int domain, Int type, Int protocol, Int sv[2]); +void UnixSock_toAddr (Char* path, Int pathlen, Char* addr, Int *addrlen); +Int UnixSock_pathLen (Char* addr); +void UnixSock_fromAddr (Char* addr, Char* path, Int pathlen); +void INetSock_toAddr (Pointer in_addr, Int port, Char* addr, Int *addrlen); +void INetSock_fromAddr (Char* addr); +Int INetSock_getPort (void); +void INetSock_getInAddr (Pointer addr); /* ------------------------------------------------- */ /* Stdio */ /* ------------------------------------------------- */ void Stdio_print (Pointer s); -Int Stdio_sprintf (Pointer buf, Pointer fmt, Real64 x); /* ------------------------------------------------- */ /* String */ @@ -969,15 +1120,101 @@ Int Windows_terminate (Pid p, Int s); /* ------------------------------------------------- */ -/* Word8 */ +/* Word{8,16,32,64} */ /* ------------------------------------------------- */ -Char Word8_arshiftAsm (Char w, Word s); +#define coerce(f, t) \ + t f##_to##t (f x); +#define bothCoerce(from, to) \ + coerce (Word##S##from, Word##to) \ + coerce (Word##U##from, Word##to) +#define binary(kind, name) \ + Word##kind Word##kind##_##name (Word##kind w1, Word##kind w2); +#define bothBinary(size, name) \ + binary (S##size, name) \ + binary (U##size, name) +#define SaddCheckOverflows(size) \ + Bool WordS##size##_addCheckOverflows (WordS##size x, WordS##size y); +#define UaddCheckOverflows(size) \ + Bool WordU##size##_addCheckOverflows (WordU##size x, WordU##size y); +#define SmulCheckOverflows(size) \ + Bool WordS##size##_mulCheckOverflows (WordS##size x, WordS##size y); +#define negCheckOverflows(size) \ + Bool Word##size##_negCheckOverflows (WordS##size x); +#define SsubCheckOverflows(size) \ + Bool WordS##size##_subCheckOverflows (WordS##size x, WordS##size y); +#define compare(kind, name) \ + Bool Word##kind##_##name (Word##kind w1, Word##kind w2); +#define bothCompare(size, name) \ + compare (S##size, name) \ + compare (U##size, name) +#define unary(kind, name) \ + Word##kind Word##kind##_##name (Word##kind w); +#define shift(kind, name) \ + Word##kind Word##kind##_##name (Word##kind w1, Word w2); +#define all(size) \ + binary (size, add) \ + SaddCheckOverflows (size) \ + UaddCheckOverflows (size) \ + binary (size, andb) \ + compare (size, equal) \ + bothCompare (size, ge) \ + bothCompare (size, gt) \ + bothCompare (size, le) \ + shift (size, lshift) \ + bothCompare (size, lt) \ + bothBinary (size, mul) \ + unary (size, neg) \ + negCheckOverflows (size) \ + unary (size, notb) \ + binary (size, orb) \ + bothBinary (size, quot) \ + SmulCheckOverflows (size) \ + bothBinary (size, rem) \ + Word##size Word##size##_rol (Word##size w1, Word w2); \ + Word##size Word##size##_ror (Word##size w1, Word w2); \ + shift (S##size, rshift) \ + shift (U##size, rshift) \ + binary (size, sub) \ + SsubCheckOverflows (size) \ + binary (size, xorb) \ + bothCoerce (size, 64) \ + bothCoerce (size, 32) \ + bothCoerce (size, 16) \ + bothCoerce (size, 8) + +all (8) +all (16) +all (32) +all (64) + +#undef coerce +#undef bothCoerce +#undef binary +#undef bothBinary +#undef SaddCheckOverflows +#undef UaddCheckOverflows +#undef SmulCheckOverflows +#undef negCheckOverflows +#undef SsubCheckOverflows +#undef compare +#undef bothCompare +#undef unary +#undef shift +#undef all + /* ------------------------------------------------- */ -/* Word32 */ +/* Word8 Array */ /* ------------------------------------------------- */ -Word Word32_arshiftAsm (Word w, Word s); +Word32 Word8Array_subWord32Rev (Pointer v, Int offset); +void Word8Array_updateWord32Rev (Pointer a, Int offset, Word32 w); +/* ------------------------------------------------- */ +/* Word8 Vector */ +/* ------------------------------------------------- */ + +Word32 Word8Vector_subWord32Rev (Pointer v, Int offset); + #endif /* _MLTON_PLATFORM_H_ */ |
From: Stephen W. <sw...@ml...> - 2005-11-15 15:56:00
|
Fixed accidental commit. ---------------------------------------------------------------------- U mlton/trunk/bin/make-pdf-guide ---------------------------------------------------------------------- Modified: mlton/trunk/bin/make-pdf-guide =================================================================== --- mlton/trunk/bin/make-pdf-guide 2005-11-15 23:38:37 UTC (rev 4230) +++ mlton/trunk/bin/make-pdf-guide 2005-11-15 23:55:59 UTC (rev 4231) @@ -133,4 +133,4 @@ cd -# rm -rf $tmp +rm -rf $tmp |
From: Stephen W. <sw...@ml...> - 2005-11-15 15:38:38
|
Dropped "Home" and "Index", which was appearing awkwardly on each page. Was more careful with the sed about eliminating the <table> at the top. ---------------------------------------------------------------------- U mlton/trunk/bin/make-pdf-guide ---------------------------------------------------------------------- Modified: mlton/trunk/bin/make-pdf-guide =================================================================== --- mlton/trunk/bin/make-pdf-guide 2005-11-15 23:12:32 UTC (rev 4229) +++ mlton/trunk/bin/make-pdf-guide 2005-11-15 23:38:37 UTC (rev 4230) @@ -44,10 +44,12 @@ for f in `cat $pages`; do cat >$script <<EOF -23,41d +/^<table bgcolor = lightblue/,+29d s;\(<body .*\);\1\n<h1>$f</h1>; s;<FONT[^>]*>;;g s;</FONT>;;g +s;\(<div id="content"\);\1; +s;<td colspan = 3;<td align = right; s;<img src=\"\(http://mlton.org[^>]*\)>;<img src="moin-www.png"><a href=\"\1>image</a>;g EOF sed -f $script <$f >.tmp @@ -131,4 +133,4 @@ cd -rm -rf $tmp +# rm -rf $tmp |
From: Matthew F. <fl...@ml...> - 2005-11-15 15:12:36
|
MLton.ProcEnv.setgroups was messed up on many levels. ---------------------------------------------------------------------- U mlton/trunk/basis-library/libs/basis-extra/top-level/basis.sig U mlton/trunk/basis-library/mlton/proc-env.sig U mlton/trunk/basis-library/posix/primitive.sml U mlton/trunk/doc/changelog ---------------------------------------------------------------------- Modified: mlton/trunk/basis-library/libs/basis-extra/top-level/basis.sig =================================================================== --- mlton/trunk/basis-library/libs/basis-extra/top-level/basis.sig 2005-11-15 23:10:46 UTC (rev 4228) +++ mlton/trunk/basis-library/libs/basis-extra/top-level/basis.sig 2005-11-15 23:12:32 UTC (rev 4229) @@ -319,6 +319,7 @@ sharing type MLton.IntInf.t = IntInf.int sharing type MLton.Process.pid = Posix.Process.pid + sharing type MLton.ProcEnv.gid = Posix.ProcEnv.gid sharing type MLton.Signal.t = Posix.Signal.signal sharing type MLton.Word.t = Word.word sharing type MLton.Word8.t = Word8.word Modified: mlton/trunk/basis-library/mlton/proc-env.sig =================================================================== --- mlton/trunk/basis-library/mlton/proc-env.sig 2005-11-15 23:10:46 UTC (rev 4228) +++ mlton/trunk/basis-library/mlton/proc-env.sig 2005-11-15 23:12:32 UTC (rev 4229) @@ -8,6 +8,8 @@ signature MLTON_PROC_ENV = sig + type gid + val setenv: {name: string, value: string} -> unit - val setgroups: Posix.ProcEnv.gid list -> unit + val setgroups: gid list -> unit end Modified: mlton/trunk/basis-library/posix/primitive.sml =================================================================== --- mlton/trunk/basis-library/posix/primitive.sml 2005-11-15 23:10:46 UTC (rev 4228) +++ mlton/trunk/basis-library/posix/primitive.sml 2005-11-15 23:12:32 UTC (rev 4229) @@ -269,7 +269,7 @@ val setenv = _import "Posix_ProcEnv_setenv": NullString.t * NullString.t -> int; val setgid = _import "Posix_ProcEnv_setgid": gid -> int; - val setgroups = _import "Posix_ProcEnv_getgroups": gid array -> int; + val setgroups = _import "Posix_ProcEnv_setgroups": gid array -> int; val setpgid = _import "Posix_ProcEnv_setpgid": Pid.t * Pid.t -> int; val setsid = _import "Posix_ProcEnv_setsid": unit -> Pid.t; val setuid = _import "Posix_ProcEnv_setuid": uid -> int; Modified: mlton/trunk/doc/changelog =================================================================== --- mlton/trunk/doc/changelog 2005-11-15 23:10:46 UTC (rev 4228) +++ mlton/trunk/doc/changelog 2005-11-15 23:12:32 UTC (rev 4229) @@ -1,5 +1,8 @@ Here are the changes since version 20041109. +* 2005-11-15 + - Fixed a bug in MLton.ProcEnv.setgroups. + * 2005-11-11 - Fixed a bug in the interleaving of lexing/parsing and elaborating of ML Basis files, which would raise an unhandled Force exception on |
From: Matthew F. <fl...@ml...> - 2005-11-15 15:10:47
|
Assert is always false on non-zero size ---------------------------------------------------------------------- U mlton/trunk/runtime/Posix/ProcEnv/setgroups.c ---------------------------------------------------------------------- Modified: mlton/trunk/runtime/Posix/ProcEnv/setgroups.c =================================================================== --- mlton/trunk/runtime/Posix/ProcEnv/setgroups.c 2005-11-15 22:01:32 UTC (rev 4227) +++ mlton/trunk/runtime/Posix/ProcEnv/setgroups.c 2005-11-15 23:10:46 UTC (rev 4228) @@ -8,7 +8,6 @@ size = GC_arrayNumElements (groups); ARRAY (gid_t*, list, size); - assert (size <= cardof (list)); for (i = 0; i < size; ++i) list[i] = ((Word*)groups)[i]; res = setgroups (size, list); |
From: Stephen W. <sw...@ml...> - 2005-11-15 14:01:33
|
Eliminated FONT tags. ---------------------------------------------------------------------- U mlton/trunk/bin/make-pdf-guide ---------------------------------------------------------------------- Modified: mlton/trunk/bin/make-pdf-guide =================================================================== --- mlton/trunk/bin/make-pdf-guide 2005-11-15 21:42:07 UTC (rev 4226) +++ mlton/trunk/bin/make-pdf-guide 2005-11-15 22:01:32 UTC (rev 4227) @@ -46,6 +46,8 @@ cat >$script <<EOF 23,41d s;\(<body .*\);\1\n<h1>$f</h1>; +s;<FONT[^>]*>;;g +s;</FONT>;;g s;<img src=\"\(http://mlton.org[^>]*\)>;<img src="moin-www.png"><a href=\"\1>image</a>;g EOF sed -f $script <$f >.tmp @@ -90,7 +92,7 @@ --firstpage p1 --fontsize 11.0 --fontspacing 1.2 ---footer ..1 +--footer ..1 --header t.c --headfootfont Helvetica --headfootsize 11.0 |
From: Stephen W. <sw...@ml...> - 2005-11-15 13:42:09
|
Cleaned up README. ---------------------------------------------------------------------- U mlton/trunk/doc/README ---------------------------------------------------------------------- Modified: mlton/trunk/doc/README =================================================================== --- mlton/trunk/doc/README 2005-11-15 21:36:44 UTC (rev 4225) +++ mlton/trunk/doc/README 2005-11-15 21:42:07 UTC (rev 4226) @@ -2,8 +2,9 @@ programming language. MLton has the following features. + Runs on a variety of platforms. + o HPPA: Debian o PowerPC: Debian, Mac OSX - o X86: Linux, Cygwin/Windows, FreeBSD, NetBSD, OpenBSD + o X86: Linux, Cygwin/Windows, FreeBSD, MinGW/Windows, NetBSD, OpenBSD o Sparc: Debian, Solaris. + Generates standalone executables with excellent running times. + Supports the full SML 97 language. @@ -24,19 +25,22 @@ For more information, go to the MLton home page. - http://www.mlton.org/ + http://mlton.org/ -For general MLton discussion, send mail to MLt...@ml.... To -send mail to the MLton developers, use ML...@ml.... +There are two mailing lists available. + * ML...@ml... MLton developers + * MLt...@ml... MLton user community + doc directory contents: README this file changelog changelog cm2mlb/ a utility for producing ML Basis programs in SML/NJ cmcat/ a utility for producing whole programs in SML/NJ examples/ example SML programs - guide/ MLton guide + guide/ HTML MLton guide (copy of the MLton wiki) license/ license information mllex.ps.gz user guide for mllex lexer generator + mlton-guide.pdf PDF version of MLton guide mlyacc.ps.gz user guide for mlyacc parser generator |
From: Stephen W. <sw...@ml...> - 2005-11-15 13:36:48
|
Make the pdf version of the MLton guide using htmldoc, and install the pdf along with the rest of our documentation. ---------------------------------------------------------------------- U mlton/trunk/Makefile U mlton/trunk/bin/make-pdf-guide U mlton/trunk/package/debian/control ---------------------------------------------------------------------- Modified: mlton/trunk/Makefile =================================================================== --- mlton/trunk/Makefile 2005-11-15 21:23:43 UTC (rev 4224) +++ mlton/trunk/Makefile 2005-11-15 21:36:44 UTC (rev 4225) @@ -151,6 +151,7 @@ docs: dirs $(MAKE) -C $(LEX) docs $(MAKE) -C $(YACC) docs + bin/make-pdf-guide BSDSRC = /tmp/mlton-$(VERSION) .PHONY: freebsd @@ -416,6 +417,7 @@ cd $(SRC)/doc && \ $(CP) changelog examples guide license README $(TDOC)/ \ ) + mv $(TDOC)/guide/mlton-guide.pdf $(TDOC)/ ( \ cd $(SRC)/util && \ $(CP) cmcat cm2mlb $(TDOC)/ \ Modified: mlton/trunk/bin/make-pdf-guide =================================================================== --- mlton/trunk/bin/make-pdf-guide 2005-11-15 21:23:43 UTC (rev 4224) +++ mlton/trunk/bin/make-pdf-guide 2005-11-15 21:36:44 UTC (rev 4225) @@ -1,7 +1,6 @@ #!/bin/sh set -e -set -x name=`basename $0` dir=`dirname $0` @@ -24,10 +23,110 @@ ;; esac -tmp='/tmp/guide' +book='mlton.book' +pages='.pages' +pdf='mlton-guide.pdf' +script='.script' +titlepage='title.html' +tmp='/tmp/mlton-guide' +version=`date +%Y%m%d` + rm -rf $tmp mkdir $tmp +cd $tmp -( cd $src/doc/guide && tar -cf - . ) | ( cd $tmp && tar -xf - ) -yes | time html2ps -DHnRtTU -C fb -W bL http://localhost/guide/ >guide.ps 2>/tmp/z.log -ps2pdf guide.ps +( cd $src/doc/guide && tar -cf - . ) | tar -xf - + +# The grep -v takes out files that aren't wiki pages. +ls -1 | grep -v '\.' >$pages + +echo 'Massaging HTML.' + +for f in `cat $pages`; do +cat >$script <<EOF +23,41d +s;\(<body .*\);\1\n<h1>$f</h1>; +s;<img src=\"\(http://mlton.org[^>]*\)>;<img src="moin-www.png"><a href=\"\1>image</a>;g +EOF + sed -f $script <$f >.tmp + mv .tmp $f +done + +echo 'Generating PDF titlepage.' +cat >$titlepage <<EOF +<html> +<head><title>MLton Guide ($version)</title></head> +<body> +<h1>MLton Guide</h1> +<p> +This is the guide for MLton, an open-source, whole-program, +optimizing Standard ML compiler. +</p> + +<p> +This guide was generated automatically from the MLton wiki, +available online at <a href="http://mlton.org/">http://mlton.org</a>. +It is up to date for MLton $version. +</p> + +</body> +</html> +EOF + +echo 'Generating htmldoc script.' +( +cat <<EOF +#HTMLDOC 1.8.24 Open Source +-f $pdf +-t pdf13 +--bodyfont times +--bottom 0.50in +--browserwidth 680 +--charset iso-8859-1 +--color +--compression=9 +--effectduration 1.0 +--embedfonts +--firstpage p1 +--fontsize 11.0 +--fontspacing 1.2 +--footer ..1 +--header t.c +--headfootfont Helvetica +--headfootsize 11.0 +--headingfont Helvetica +--jpeg=0 +--left 1.00in +--links +--linkstyle underline +--no-encryption +--no-pscommands +--no-strict +--no-xrxcomments +--nup 1 +--pageduration 10 +--pageeffect none +--pagelayout single +--pagemode document +--portrait +--right 0.50in +--size Universal +--title +--top 0.50in +--webpage +$titlepage +Home +Index +EOF + +grep -v '^\(Home\|Index\)$' $pages +) >$book + +echo 'Running htmldoc.' +htmldoc --batch $book + +mv $pdf $src/doc/guide + +cd + +rm -rf $tmp Modified: mlton/trunk/package/debian/control =================================================================== --- mlton/trunk/package/debian/control 2005-11-15 21:23:43 UTC (rev 4224) +++ mlton/trunk/package/debian/control 2005-11-15 21:36:44 UTC (rev 4225) @@ -2,7 +2,7 @@ Section: devel Priority: optional Maintainer: Stephen Weeks <sw...@sw...> -Build-Depends: mlton (>= 20041109-1), libgmp3-dev (>= 4.0.1), tetex-bin, tetex-extra, time +Build-Depends: mlton (>= 20041109-1), htmldoc, libgmp3-dev (>= 4.0.1), tetex-bin, tetex-extra, time Standards-Version: 3.6.2 Package: mlton |
From: Stephen W. <sw...@ml...> - 2005-11-15 13:23:44
|
Added ignore. ---------------------------------------------------------------------- _U mlton/trunk/doc/guide/ ---------------------------------------------------------------------- Property changes on: mlton/trunk/doc/guide ___________________________________________________________________ Name: svn:ignore - mlton.pdf + mlton-guide.pdf |
From: Stephen W. <sw...@ml...> - 2005-11-15 11:15:51
|
Re-grabbed wiki. ---------------------------------------------------------------------- _U mlton/trunk/doc/guide/ U mlton/trunk/doc/guide/AST U mlton/trunk/doc/guide/AccessControl U mlton/trunk/doc/guide/AdmitsEquality U mlton/trunk/doc/guide/Alice U mlton/trunk/doc/guide/AllocateRegisters U mlton/trunk/doc/guide/AndreiFormiga U mlton/trunk/doc/guide/BasisLibrary U mlton/trunk/doc/guide/Bug U mlton/trunk/doc/guide/Bugs20041109 U mlton/trunk/doc/guide/CKitLibrary U mlton/trunk/doc/guide/CallGraph U mlton/trunk/doc/guide/CallingFromCToSML U mlton/trunk/doc/guide/CallingFromSMLToC U mlton/trunk/doc/guide/CallingFromSMLToCFunctionPointer U mlton/trunk/doc/guide/ChrisClearwater U mlton/trunk/doc/guide/Chunkify U mlton/trunk/doc/guide/Closure U mlton/trunk/doc/guide/ClosureConvert U mlton/trunk/doc/guide/CommonArg U mlton/trunk/doc/guide/CommonBlock U mlton/trunk/doc/guide/CommonSubexp U mlton/trunk/doc/guide/CompilationManager U mlton/trunk/doc/guide/CompileTimeOptions U mlton/trunk/doc/guide/CompilerOverview U mlton/trunk/doc/guide/CompilerPassTemplate U mlton/trunk/doc/guide/ConcurrentML U mlton/trunk/doc/guide/ConcurrentMLImplementation U mlton/trunk/doc/guide/ConstantPropagation U mlton/trunk/doc/guide/Contact U mlton/trunk/doc/guide/Contify U mlton/trunk/doc/guide/CoreML U mlton/trunk/doc/guide/CoreMLSimplify U mlton/trunk/doc/guide/CreatingPages U mlton/trunk/doc/guide/Credits U mlton/trunk/doc/guide/CrossCompiling U mlton/trunk/doc/guide/DeadCode U mlton/trunk/doc/guide/DeepFlatten U mlton/trunk/doc/guide/DefineTypeBeforeUse U mlton/trunk/doc/guide/DefinitionOfStandardML U mlton/trunk/doc/guide/Defunctorize U mlton/trunk/doc/guide/Developers U mlton/trunk/doc/guide/Development U mlton/trunk/doc/guide/Documentation U mlton/trunk/doc/guide/Drawbacks U mlton/trunk/doc/guide/EXene U mlton/trunk/doc/guide/Eclipse U mlton/trunk/doc/guide/EditingPages U mlton/trunk/doc/guide/Elaborate U mlton/trunk/doc/guide/Emacs U mlton/trunk/doc/guide/Enscript U mlton/trunk/doc/guide/EqualityType U mlton/trunk/doc/guide/EqualityTypeVariable U mlton/trunk/doc/guide/Experimental U mlton/trunk/doc/guide/FAQ U mlton/trunk/doc/guide/Features U mlton/trunk/doc/guide/FirstClassPolymorphism U mlton/trunk/doc/guide/Flatten U mlton/trunk/doc/guide/ForLoops U mlton/trunk/doc/guide/ForeignFunctionInterface U mlton/trunk/doc/guide/ForeignFunctionInterfaceSyntax U mlton/trunk/doc/guide/ForeignFunctionInterfaceTypes U mlton/trunk/doc/guide/FrontEnd U mlton/trunk/doc/guide/FunctionalRecordUpdate U mlton/trunk/doc/guide/GarbageCollection U mlton/trunk/doc/guide/GenerativeDatatype U mlton/trunk/doc/guide/GenerativeException U mlton/trunk/doc/guide/Globalize U mlton/trunk/doc/guide/GnuMP U mlton/trunk/doc/guide/HaMLet U mlton/trunk/doc/guide/HenryCejtin U mlton/trunk/doc/guide/History U mlton/trunk/doc/guide/Home U mlton/trunk/doc/guide/HowProfilingWorks U mlton/trunk/doc/guide/Identifier U mlton/trunk/doc/guide/Immutable U mlton/trunk/doc/guide/ImperativeTypeVariable U mlton/trunk/doc/guide/ImplementExceptions U mlton/trunk/doc/guide/ImplementHandlers U mlton/trunk/doc/guide/ImplementProfiling U mlton/trunk/doc/guide/ImplementSuffix U mlton/trunk/doc/guide/Index U mlton/trunk/doc/guide/InfixingOperators U mlton/trunk/doc/guide/Inline U mlton/trunk/doc/guide/InsertLimitChecks U mlton/trunk/doc/guide/InsertSignalChecks U mlton/trunk/doc/guide/Installation U mlton/trunk/doc/guide/IntermediateLanguage U mlton/trunk/doc/guide/IntroduceLoops U mlton/trunk/doc/guide/JesperLouisAndersen U mlton/trunk/doc/guide/JohnnyAndersen U mlton/trunk/doc/guide/KnownCase U mlton/trunk/doc/guide/LambdaFree U mlton/trunk/doc/guide/LanguageChanges U mlton/trunk/doc/guide/Lazy U mlton/trunk/doc/guide/Libraries U mlton/trunk/doc/guide/License U mlton/trunk/doc/guide/LineDirective U mlton/trunk/doc/guide/LocalFlatten U mlton/trunk/doc/guide/LocalRef U mlton/trunk/doc/guide/LoopInvariant U mlton/trunk/doc/guide/ML U mlton/trunk/doc/guide/MLBasis U mlton/trunk/doc/guide/MLBasisAnnotationExamples U mlton/trunk/doc/guide/MLBasisAnnotations U mlton/trunk/doc/guide/MLBasisAvailableLibraries U mlton/trunk/doc/guide/MLBasisExamples U mlton/trunk/doc/guide/MLBasisPathMap U mlton/trunk/doc/guide/MLBasisSyntaxAndSemantics U mlton/trunk/doc/guide/MLKit U mlton/trunk/doc/guide/MLNLFFI U mlton/trunk/doc/guide/MLNLFFIImplementation U mlton/trunk/doc/guide/MLj U mlton/trunk/doc/guide/MLtonArray U mlton/trunk/doc/guide/MLtonBinIO U mlton/trunk/doc/guide/MLtonCont U mlton/trunk/doc/guide/MLtonExn U mlton/trunk/doc/guide/MLtonFinalizable U mlton/trunk/doc/guide/MLtonGC U mlton/trunk/doc/guide/MLtonIO U mlton/trunk/doc/guide/MLtonIntInf U mlton/trunk/doc/guide/MLtonItimer U mlton/trunk/doc/guide/MLtonPlatform U mlton/trunk/doc/guide/MLtonPointer U mlton/trunk/doc/guide/MLtonProcEnv U mlton/trunk/doc/guide/MLtonProcess U mlton/trunk/doc/guide/MLtonProfile U mlton/trunk/doc/guide/MLtonRandom U mlton/trunk/doc/guide/MLtonRlimit U mlton/trunk/doc/guide/MLtonRusage U mlton/trunk/doc/guide/MLtonSignal U mlton/trunk/doc/guide/MLtonSocket U mlton/trunk/doc/guide/MLtonStructure U mlton/trunk/doc/guide/MLtonSyslog U mlton/trunk/doc/guide/MLtonTextIO U mlton/trunk/doc/guide/MLtonThread U mlton/trunk/doc/guide/MLtonVector U mlton/trunk/doc/guide/MLtonWeak U mlton/trunk/doc/guide/MLtonWord U mlton/trunk/doc/guide/MLtonWorld U mlton/trunk/doc/guide/Machine U mlton/trunk/doc/guide/ManualPage U mlton/trunk/doc/guide/MatchCompilation U mlton/trunk/doc/guide/MatchCompile U mlton/trunk/doc/guide/MatthewFluet U mlton/trunk/doc/guide/MichaelNorrish U mlton/trunk/doc/guide/MikeThomas U mlton/trunk/doc/guide/MoinMoin U mlton/trunk/doc/guide/Monomorphise U mlton/trunk/doc/guide/MoscowML U mlton/trunk/doc/guide/Multi U mlton/trunk/doc/guide/Mutable U mlton/trunk/doc/guide/OCaml U mlton/trunk/doc/guide/ObjectOrientedProgramming U mlton/trunk/doc/guide/OpenGL U mlton/trunk/doc/guide/OperatorPrecedence U mlton/trunk/doc/guide/OptionalArguments U mlton/trunk/doc/guide/OrphanedPages U mlton/trunk/doc/guide/OtherSites U mlton/trunk/doc/guide/Overloading U mlton/trunk/doc/guide/PackedRepresentation U mlton/trunk/doc/guide/PageSize U mlton/trunk/doc/guide/Papers U mlton/trunk/doc/guide/ParallelMove U mlton/trunk/doc/guide/Performance U mlton/trunk/doc/guide/PhantomType U mlton/trunk/doc/guide/PlatformSpecificNotes U mlton/trunk/doc/guide/PolyEqual U mlton/trunk/doc/guide/PolyML U mlton/trunk/doc/guide/PolymorphicEquality U mlton/trunk/doc/guide/Polyvariance A mlton/trunk/doc/guide/Poplog U mlton/trunk/doc/guide/PortingMLton U mlton/trunk/doc/guide/PrecedenceParse U mlton/trunk/doc/guide/Printf U mlton/trunk/doc/guide/PrintfGentle U mlton/trunk/doc/guide/ProductType U mlton/trunk/doc/guide/Profiling U mlton/trunk/doc/guide/ProfilingAllocation U mlton/trunk/doc/guide/ProfilingCounts U mlton/trunk/doc/guide/ProfilingTheStack U mlton/trunk/doc/guide/ProfilingTime U mlton/trunk/doc/guide/Projects U mlton/trunk/doc/guide/Pronounce U mlton/trunk/doc/guide/PropertyList U mlton/trunk/doc/guide/RSSA U mlton/trunk/doc/guide/RSSAShrink U mlton/trunk/doc/guide/RSSASimplify U mlton/trunk/doc/guide/RayRacine U mlton/trunk/doc/guide/Redundant U mlton/trunk/doc/guide/RedundantTests U mlton/trunk/doc/guide/RefFlatten U mlton/trunk/doc/guide/References U mlton/trunk/doc/guide/Regions U mlton/trunk/doc/guide/ReleaseChecklist U mlton/trunk/doc/guide/RemoveUnused U mlton/trunk/doc/guide/Restore U mlton/trunk/doc/guide/RunTimeOptions U mlton/trunk/doc/guide/RunningOnCygwin U mlton/trunk/doc/guide/RunningOnDarwin U mlton/trunk/doc/guide/RunningOnFreeBSD U mlton/trunk/doc/guide/RunningOnLinux U mlton/trunk/doc/guide/RunningOnMinGW U mlton/trunk/doc/guide/RunningOnNetBSD U mlton/trunk/doc/guide/RunningOnOpenBSD U mlton/trunk/doc/guide/RunningOnPowerPC U mlton/trunk/doc/guide/RunningOnSolaris U mlton/trunk/doc/guide/RunningOnSparc U mlton/trunk/doc/guide/SMLNET U mlton/trunk/doc/guide/SMLNJ U mlton/trunk/doc/guide/SMLNJDeviations U mlton/trunk/doc/guide/SMLNJLibrary U mlton/trunk/doc/guide/SMLofNJStructure U mlton/trunk/doc/guide/SSA U mlton/trunk/doc/guide/SSA2 U mlton/trunk/doc/guide/SSA2Simplify U mlton/trunk/doc/guide/SSASimplify U mlton/trunk/doc/guide/SXML U mlton/trunk/doc/guide/SXMLShrink U mlton/trunk/doc/guide/SXMLSimplify U mlton/trunk/doc/guide/ScopeInference U mlton/trunk/doc/guide/SelfCompiling U mlton/trunk/doc/guide/Serialization U mlton/trunk/doc/guide/ShowBasis U mlton/trunk/doc/guide/Shrink U mlton/trunk/doc/guide/SimplifyTypes U mlton/trunk/doc/guide/Sources U mlton/trunk/doc/guide/SpaceSafety U mlton/trunk/doc/guide/StandardML U mlton/trunk/doc/guide/StandardMLBooks U mlton/trunk/doc/guide/StandardMLHistory U mlton/trunk/doc/guide/StandardMLImplementations U mlton/trunk/doc/guide/StandardMLPortability U mlton/trunk/doc/guide/StandardMLTutorials U mlton/trunk/doc/guide/StephenWeeks U mlton/trunk/doc/guide/StyleGuide U mlton/trunk/doc/guide/Subversion U mlton/trunk/doc/guide/SureshJagannathan U mlton/trunk/doc/guide/Survey U mlton/trunk/doc/guide/SurveyDone U mlton/trunk/doc/guide/Swerve U mlton/trunk/doc/guide/SyntacticConventions U mlton/trunk/doc/guide/SystemInfo U mlton/trunk/doc/guide/TILT U mlton/trunk/doc/guide/Talk U mlton/trunk/doc/guide/TalkDiveIn U mlton/trunk/doc/guide/TalkFolkLore U mlton/trunk/doc/guide/TalkFromSMLTo U mlton/trunk/doc/guide/TalkHowHigherOrder U mlton/trunk/doc/guide/TalkHowModules U mlton/trunk/doc/guide/TalkHowPolymorphism U mlton/trunk/doc/guide/TalkMLtonApproach U mlton/trunk/doc/guide/TalkMLtonFeatures U mlton/trunk/doc/guide/TalkMLtonHistory U mlton/trunk/doc/guide/TalkStandardML U mlton/trunk/doc/guide/TalkTemplate U mlton/trunk/doc/guide/TalkWholeProgram U mlton/trunk/doc/guide/ToMachine U mlton/trunk/doc/guide/ToRSSA U mlton/trunk/doc/guide/ToSSA2 A mlton/trunk/doc/guide/TomMurphy U mlton/trunk/doc/guide/TrustedGroup U mlton/trunk/doc/guide/TypeChecking U mlton/trunk/doc/guide/TypeConstructor U mlton/trunk/doc/guide/TypeVariableScope U mlton/trunk/doc/guide/Unicode U mlton/trunk/doc/guide/UniversalType U mlton/trunk/doc/guide/UnresolvedBugs U mlton/trunk/doc/guide/UnsafeStructure U mlton/trunk/doc/guide/Useless U mlton/trunk/doc/guide/UserGuide U mlton/trunk/doc/guide/Users U mlton/trunk/doc/guide/ValueRestriction U mlton/trunk/doc/guide/Variant U mlton/trunk/doc/guide/VesaKarvonen U mlton/trunk/doc/guide/WantedPages U mlton/trunk/doc/guide/WebSite U mlton/trunk/doc/guide/WesleyTerpstra U mlton/trunk/doc/guide/WholeProgramOptimization U mlton/trunk/doc/guide/WikiMacros U mlton/trunk/doc/guide/WikiName U mlton/trunk/doc/guide/WikiTool U mlton/trunk/doc/guide/XML U mlton/trunk/doc/guide/XMLShrink U mlton/trunk/doc/guide/XMLSimplify U mlton/trunk/doc/guide/XMLSimplifyTypes U mlton/trunk/doc/guide/ZZZOrphanedPages U mlton/trunk/doc/guide/Zone A mlton/trunk/doc/guide/fxp U mlton/trunk/doc/guide/index.html U mlton/trunk/doc/guide/mGTK A mlton/trunk/doc/guide/moin-news.png ---------------------------------------------------------------------- Property changes on: mlton/trunk/doc/guide ___________________________________________________________________ Name: svn:ignore + mlton.pdf Modified: mlton/trunk/doc/guide/AST =================================================================== --- mlton/trunk/doc/guide/AST 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/AST 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/AccessControl =================================================================== --- mlton/trunk/doc/guide/AccessControl 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/AccessControl 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/AdmitsEquality =================================================================== --- mlton/trunk/doc/guide/AdmitsEquality 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/AdmitsEquality 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/Alice =================================================================== --- mlton/trunk/doc/guide/Alice 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Alice 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/AllocateRegisters =================================================================== --- mlton/trunk/doc/guide/AllocateRegisters 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/AllocateRegisters 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; @@ -55,9 +55,9 @@ </p> <h2 id="head-8781d615fd77be9578225c40ac67b9471394cced">Implementation</h2> -<a href = "http://mlton.org/cgi-bin/viewsvn.cgi/mlton/trunk/mlton/ZZZ.sig?view=markup"><img src="moin-www.png" alt="[WWW]" height="11" width="11">ZZZ.sig</a> +<a href = "http://mlton.org/cgi-bin/viewsvn.cgi/mlton/trunk/mlton/backend/allocate-registers.sig?view=markup"><img src="moin-www.png" alt="[WWW]" height="11" width="11">allocate-registers.sig</a> -<a href = "http://mlton.org/cgi-bin/viewsvn.cgi/mlton/trunk/mlton/ZZZ.fun?view=markup"><img src="moin-www.png" alt="[WWW]" height="11" width="11">ZZZ.fun</a> +<a href = "http://mlton.org/cgi-bin/viewsvn.cgi/mlton/trunk/mlton/backend/allocate-registers.fun?view=markup"><img src="moin-www.png" alt="[WWW]" height="11" width="11">allocate-registers.fun</a> <h2 id="head-35ec00231a68203708e39f0e2cc10b50c6bf62de">Details and Notes</h2> </div> @@ -65,5 +65,5 @@ <p> <hr> -Last edited on 2005-08-19 15:43:18 by <span title="cfs32.cs.cornell.edu"><a href="MatthewFluet">MatthewFluet</a></span>. +Last edited on 2005-11-14 23:11:30 by <span title="fox.cs.cornell.edu"><a href="MatthewFluet">MatthewFluet</a></span>. </body></html> Modified: mlton/trunk/doc/guide/AndreiFormiga =================================================================== --- mlton/trunk/doc/guide/AndreiFormiga 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/AndreiFormiga 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/BasisLibrary =================================================================== --- mlton/trunk/doc/guide/BasisLibrary 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/BasisLibrary 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; @@ -49,7 +49,7 @@ </table> <div id="content" lang="en" dir="ltr"> -The <a href="StandardML">Standard ML</a> Basis Library is a collection of modules dealing with basic types, input/output, OS interfaces, and simple datatypes. It is intended as a portable library usable across all implementations of SML. The official online version of the Basis Library specification is at <a href="http://www.standardml.org/Basis/">http://www.standardml.org/Basis/</a>. We keep a copy at <a href="http://mlton.org/basis/"><img src="moin-www.png" alt="[WWW]" height="11" width="11">http://mlton.org/basis/</a>. There is a <a href = "References#GansnerReppy04"> book</a> that includes all of the online version and more. For a reverse chronological list of changes to the specification, see <a href="http://www.standardml.org/Basis/history.html">http://www.standardml.org/Basis/history.html</a>. <p> +The <a href="StandardML">Standard ML</a> Basis Library is a collection of modules dealing with basic types, input/output, OS interfaces, and simple datatypes. It is intended as a portable library usable across all implementations of SML. The official online version of the Basis Library specification is at <a class="external" href="http://www.standardml.org/Basis/"><img src="moin-www.png" alt="[WWW]" height="11" width="11">http://www.standardml.org/Basis/</a>. We keep a copy at <a class="external" href="http://mlton.org/basis/"><img src="moin-www.png" alt="[WWW]" height="11" width="11">http://mlton.org/basis/</a>. There is a <a href = "References#GansnerReppy04"> book</a> that includes all of the online version and more. For a reverse chronological list of changes to the specification, see <a class="external" href="http://www.standardml.org/Basis/history.html"><img src="moin-www.png" alt="[WWW]" height="11" width="11">http://www.standardml.org/Basis/history.html</a>. <p> MLton implements all of the required portions of the Basis Library. MLton also implements many of the optional structures. You can obtain a complete and current list of what's available using <tt>mlton -show-basis</tt> (see <a href="ShowBasis">ShowBasis</a>). By default, MLton makes the Basis Library available to user programs. You can also <a href="MLBasisAvailableLibraries">access the Basis Library</a> from <a href="MLBasis"> ML Basis</a> files. </p> <p> @@ -425,5 +425,5 @@ <p> <hr> -Last edited on 2005-01-28 21:49:35 by <span title="cfs36.cs.cornell.edu"><a href="MatthewFluet">MatthewFluet</a></span>. +Last edited on 2005-09-06 23:28:14 by <span title="cfs34.cs.cornell.edu"><a href="MatthewFluet">MatthewFluet</a></span>. </body></html> Modified: mlton/trunk/doc/guide/Bug =================================================================== --- mlton/trunk/doc/guide/Bug 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Bug 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; @@ -49,7 +49,7 @@ </table> <div id="content" lang="en" dir="ltr"> -To report a bug, please send mail to <a class="external" href="mailto:ML...@ml..."><img src="moin-email.png" alt="[MAILTO]" height="10" width="14">ML...@ml...</a>. Please include the complete SML program that caused the problem and a log of a compile of the program with <tt>-verbose 2</tt>. For large messages (over 512K), please send an email containing the discussion text and a link to any large files. You may use our <a href="http://mlton.org/TemporaryUpload"><img src="moin-www.png" alt="[WWW]" height="11" width="11">TemporaryUpload</a> page for uploading large files. <p> +To report a bug, please send mail to <a class="external" href="mailto:ML...@ml..."><img src="moin-email.png" alt="[MAILTO]" height="10" width="14">mailto:ML...@ml...</a>. Please include the complete SML program that caused the problem and a log of a compile of the program with <tt>-verbose 2</tt>. For large messages (over 512K), please send an email containing the discussion text and a link to any large files. You may use our <a href="http://mlton.org/TemporaryUpload"><img src="moin-www.png" alt="[WWW]" height="11" width="11">TemporaryUpload</a> page for uploading large files. <p> There are some <a href="UnresolvedBugs">UnresolvedBugs</a> that we don't plan to fix. </p> <p> @@ -71,5 +71,5 @@ <p> <hr> -Last edited on 2005-08-31 23:32:42 by <span title="adsl-64-166-226-67.dsl.snfc21.pacbell.net"><a href="StephenWeeks">StephenWeeks</a></span>. +Last edited on 2005-09-06 23:18:45 by <span title="cfs34.cs.cornell.edu"><a href="MatthewFluet">MatthewFluet</a></span>. </body></html> Modified: mlton/trunk/doc/guide/Bugs20041109 =================================================================== --- mlton/trunk/doc/guide/Bugs20041109 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Bugs20041109 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/CKitLibrary =================================================================== --- mlton/trunk/doc/guide/CKitLibrary 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/CKitLibrary 2005-11-15 19:15:14 UTC (rev 4223) @@ -27,7 +27,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/CallGraph =================================================================== --- mlton/trunk/doc/guide/CallGraph 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/CallGraph 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/CallingFromCToSML =================================================================== --- mlton/trunk/doc/guide/CallingFromCToSML 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/CallingFromCToSML 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; @@ -176,7 +176,9 @@ <p> Compile <tt>ffi-export.c</tt> and <tt>export.sml</tt>. <pre>% gcc -c ffi-export.c -% mlton -default-ann 'allowExport true' -default-ann 'allowImport true' export.sml ffi-export.o +% mlton -default-ann 'allowExport true' \ + -default-ann 'allowImport true' \ + export.sml ffi-export.o </pre> </p> <p> @@ -214,5 +216,5 @@ <p> <hr> -Last edited on 2005-08-09 07:31:39 by <span title="pool-71-243-2-249.bos.east.verizon.net"><a href="MatthewFluet">MatthewFluet</a></span>. +Last edited on 2005-11-13 23:08:49 by <span title="pool-68-162-172-153.pitt.east.verizon.net">AdamGoode</span>. </body></html> Modified: mlton/trunk/doc/guide/CallingFromSMLToC =================================================================== --- mlton/trunk/doc/guide/CallingFromSMLToC 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/CallingFromSMLToC 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/CallingFromSMLToCFunctionPointer =================================================================== --- mlton/trunk/doc/guide/CallingFromSMLToCFunctionPointer 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/CallingFromSMLToCFunctionPointer 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/ChrisClearwater =================================================================== --- mlton/trunk/doc/guide/ChrisClearwater 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/ChrisClearwater 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/Chunkify =================================================================== --- mlton/trunk/doc/guide/Chunkify 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Chunkify 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/Closure =================================================================== --- mlton/trunk/doc/guide/Closure 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Closure 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/ClosureConvert =================================================================== --- mlton/trunk/doc/guide/ClosureConvert 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/ClosureConvert 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/CommonArg =================================================================== --- mlton/trunk/doc/guide/CommonArg 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/CommonArg 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; @@ -209,7 +209,8 @@ <pre>nodes(G) = {Root} U Var.t edges(G) = {Root -> v | v bound in a Statement.t or in the Function.t args} U - {xi -> ai | L(x1, ..., xn) transfer where (a1, ..., an) are the formals of L} U + {xi -> ai | L(x1, ..., xn) transfer where (a1, ..., an) + are the formals of L} U {Root -> a | a is a block argument used in an unknown context} </pre> </ul> @@ -254,5 +255,5 @@ <p> <hr> -Last edited on 2005-08-19 15:42:33 by <span title="cfs32.cs.cornell.edu"><a href="MatthewFluet">MatthewFluet</a></span>. +Last edited on 2005-11-13 23:14:11 by <span title="pool-68-162-172-153.pitt.east.verizon.net">AdamGoode</span>. </body></html> Modified: mlton/trunk/doc/guide/CommonBlock =================================================================== --- mlton/trunk/doc/guide/CommonBlock 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/CommonBlock 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/CommonSubexp =================================================================== --- mlton/trunk/doc/guide/CommonSubexp 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/CommonSubexp 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; @@ -49,11 +49,8 @@ </table> <div id="content" lang="en" dir="ltr"> +An optimization pass for the <a href="SSA">SSA</a> <a href="IntermediateLanguage">IntermediateLanguage</a>, invoked from <a href="SSASimplify">SSASimplify</a>. <h2 id="head-55f8ebc805e65b5b71ddafdae390e3be2bcd69af">Description</h2> <p> -An optimization pass for the <a href="SSA">SSA</a> <a href="IntermediateLanguage">IntermediateLanguage</a>, invoked from <a href="SSASimplify">SSASimplify</a>. -</p> -<h2 id="head-55f8ebc805e65b5b71ddafdae390e3be2bcd69af">Description</h2> -<p> Eliminate instances of common subexpressions. </p> <h2 id="head-8781d615fd77be9578225c40ac67b9471394cced">Implementation</h2> @@ -113,7 +110,8 @@ <pre> val l = (n + m) + (n + m) - val k = (l + n) + ((l + m) handle Overflow => ((l + m) handle Overflow => l + n)) + val k = (l + n) + ((l + m) handle Overflow => ((l + m) + handle Overflow => l + n)) </pre> is rewritten so that <tt>(n + m)</tt> is computed exactly once, as </p> </li> @@ -130,5 +128,5 @@ <p> <hr> -Last edited on 2005-08-19 15:41:48 by <span title="cfs32.cs.cornell.edu"><a href="MatthewFluet">MatthewFluet</a></span>. +Last edited on 2005-11-13 23:15:26 by <span title="pool-68-162-172-153.pitt.east.verizon.net">AdamGoode</span>. </body></html> Modified: mlton/trunk/doc/guide/CompilationManager =================================================================== --- mlton/trunk/doc/guide/CompilationManager 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/CompilationManager 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/CompileTimeOptions =================================================================== --- mlton/trunk/doc/guide/CompileTimeOptions 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/CompileTimeOptions 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; @@ -314,7 +314,21 @@ <ul> - Pass argument to the runtime system via <tt>@MLton</tt>. The argument will be processed before other <tt>@MLton</tt> command line switches. Multiple uses of <tt>-runtime</tt> are allowed, and will pass all the arguments in order. If the same runtime switch occurs more than once, then the last setting will take effect. + Pass argument to the runtime system via <tt>@MLton</tt>. The argument will be processed before other <tt>@MLton</tt> command line switches. Multiple uses of <tt>-runtime</tt> are allowed, and will pass all the arguments in order. If the same runtime switch occurs more than once, then the last setting will take effect. There is no need to supply the leading <tt>@MLton</tt> or the trailing <tt>--</tt>; these will be supplied automatically. <p> + An argument to <tt>-runtime</tt> may contain spaces, which will cause the argument to be treated as a sequence of words by the runtime. For example the command line +</p> + +<pre>mlton -runtime 'ram-slop 0.4' foo.sml</pre><p> + is effectively the same as +</p> + +<pre>foo @MLton ram-slop 0.4 --</pre><p> + An executable created with <tt>-runtime stop</tt> doesn't process any <tt>@MLton</tt> arguments. This is useful to create an executable, e.g. <tt>echo</tt>, that must treat <tt>@MLton</tt> like any other command-line argument. +</p> + +<pre>% mlton -runtime stop echo.sml +% echo @MLton -- +@MLton --</pre> </ul> @@ -487,5 +501,5 @@ <p> <hr> -Last edited on 2005-09-05 21:54:58 by <span title="adsl-64-166-225-193.dsl.snfc21.pacbell.net"><a href="StephenWeeks">StephenWeeks</a></span>. +Last edited on 2005-09-27 18:15:36 by <span title="adsl-64-170-115-30.dsl.snfc21.pacbell.net"><a href="StephenWeeks">StephenWeeks</a></span>. </body></html> Modified: mlton/trunk/doc/guide/CompilerOverview =================================================================== --- mlton/trunk/doc/guide/CompilerOverview 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/CompilerOverview 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/CompilerPassTemplate =================================================================== --- mlton/trunk/doc/guide/CompilerPassTemplate 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/CompilerPassTemplate 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/ConcurrentML =================================================================== --- mlton/trunk/doc/guide/ConcurrentML 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/ConcurrentML 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/ConcurrentMLImplementation =================================================================== --- mlton/trunk/doc/guide/ConcurrentMLImplementation 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/ConcurrentMLImplementation 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; @@ -269,7 +269,7 @@ <ul> - <a href="http://mlton.org/pipermail/mlton/2004-May/"><img src="moin-www.png" alt="[WWW]" height="11" width="11">http://mlton.org/pipermail/mlton/2004-May/</a> + <a class="external" href="http://mlton.org/pipermail/mlton/2004-May/"><img src="moin-www.png" alt="[WWW]" height="11" width="11">http://mlton.org/pipermail/mlton/2004-May/</a> </ul> @@ -282,5 +282,5 @@ <p> <hr> -Last edited on 2004-12-03 00:24:53 by <span title="adsl-67-124-249-200.dsl.snfc21.pacbell.net"><a href="StephenWeeks">StephenWeeks</a></span>. +Last edited on 2005-09-06 23:28:35 by <span title="cfs34.cs.cornell.edu"><a href="MatthewFluet">MatthewFluet</a></span>. </body></html> Modified: mlton/trunk/doc/guide/ConstantPropagation =================================================================== --- mlton/trunk/doc/guide/ConstantPropagation 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/ConstantPropagation 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/Contact =================================================================== --- mlton/trunk/doc/guide/Contact 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Contact 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; @@ -102,7 +102,7 @@ <li> <p> - Some MLton developers and users are in channel <tt>#sml</tt> on <a href="http://freenode.net">http://freenode.net</a>. + Some MLton developers and users are in channel <tt>#sml</tt> on <a class="external" href="http://freenode.net"><img src="moin-www.png" alt="[WWW]" height="11" width="11">http://freenode.net</a>. </p> </li> </ul> @@ -113,5 +113,5 @@ <p> <hr> -Last edited on 2005-08-31 23:32:20 by <span title="adsl-64-166-226-67.dsl.snfc21.pacbell.net"><a href="StephenWeeks">StephenWeeks</a></span>. +Last edited on 2005-09-06 23:18:54 by <span title="cfs34.cs.cornell.edu"><a href="MatthewFluet">MatthewFluet</a></span>. </body></html> Modified: mlton/trunk/doc/guide/Contify =================================================================== --- mlton/trunk/doc/guide/Contify 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Contify 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/CoreML =================================================================== --- mlton/trunk/doc/guide/CoreML 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/CoreML 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/CoreMLSimplify =================================================================== --- mlton/trunk/doc/guide/CoreMLSimplify 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/CoreMLSimplify 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/CreatingPages =================================================================== --- mlton/trunk/doc/guide/CreatingPages 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/CreatingPages 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/Credits =================================================================== --- mlton/trunk/doc/guide/Credits 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Credits 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; @@ -129,7 +129,7 @@ </li> <li class="gap"> <p> - Tom Murphy wrote the original version of <tt>MLton.Syslog</tt> as part of his <tt>mlftpd</tt> project, and has sent many useful bug reports and suggestions. + <a href="TomMurphy">TomMurphy</a> wrote the original version of <tt>MLton.Syslog</tt> as part of his <tt>mlftpd</tt> project, and has sent many useful bug reports and suggestions. </p> </li> <li class="gap"> @@ -230,5 +230,5 @@ <p> <hr> -Last edited on 2005-08-30 05:33:54 by <span title="adsl-64-166-226-67.dsl.snfc21.pacbell.net"><a href="StephenWeeks">StephenWeeks</a></span>. +Last edited on 2005-09-27 15:46:17 by <span title="adsl-64-170-115-30.dsl.snfc21.pacbell.net"><a href="StephenWeeks">StephenWeeks</a></span>. </body></html> Modified: mlton/trunk/doc/guide/CrossCompiling =================================================================== --- mlton/trunk/doc/guide/CrossCompiling 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/CrossCompiling 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/DeadCode =================================================================== --- mlton/trunk/doc/guide/DeadCode 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/DeadCode 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/DeepFlatten =================================================================== --- mlton/trunk/doc/guide/DeepFlatten 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/DeepFlatten 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/DefineTypeBeforeUse =================================================================== --- mlton/trunk/doc/guide/DefineTypeBeforeUse 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/DefineTypeBeforeUse 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/DefinitionOfStandardML =================================================================== --- mlton/trunk/doc/guide/DefinitionOfStandardML 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/DefinitionOfStandardML 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/Defunctorize =================================================================== --- mlton/trunk/doc/guide/Defunctorize 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Defunctorize 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/Developers =================================================================== --- mlton/trunk/doc/guide/Developers 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Developers 2005-11-15 19:15:14 UTC (rev 4223) @@ -26,7 +26,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/Development =================================================================== --- mlton/trunk/doc/guide/Development 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Development 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/Documentation =================================================================== --- mlton/trunk/doc/guide/Documentation 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Documentation 2005-11-15 19:15:14 UTC (rev 4223) @@ -29,7 +29,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/Drawbacks =================================================================== --- mlton/trunk/doc/guide/Drawbacks 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Drawbacks 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/EXene =================================================================== --- mlton/trunk/doc/guide/EXene 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/EXene 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/Eclipse =================================================================== --- mlton/trunk/doc/guide/Eclipse 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Eclipse 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/EditingPages =================================================================== --- mlton/trunk/doc/guide/EditingPages 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/EditingPages 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/Elaborate =================================================================== --- mlton/trunk/doc/guide/Elaborate 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Elaborate 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/Emacs =================================================================== --- mlton/trunk/doc/guide/Emacs 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Emacs 2005-11-15 19:15:14 UTC (rev 4223) @@ -27,7 +27,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; @@ -68,12 +68,12 @@ <li> <p> - <a href="http://www.xemacs.org/Documentation/packages/html/sml-mode_3.html">http://www.xemacs.org/Documentation/packages/html/sml-mode_3.html</a> + <a class="external" href="http://www.xemacs.org/Documentation/packages/html/sml-mode_3.html"><img src="moin-www.png" alt="[WWW]" height="11" width="11">http://www.xemacs.org/Documentation/packages/html/sml-mode_3.html</a> </p> </li> <li> <p> - <a href="http://www.smlnj.org/doc/Emacs/sml-mode.html">http://www.smlnj.org/doc/Emacs/sml-mode.html</a> + <a class="external" href="http://www.smlnj.org/doc/Emacs/sml-mode.html"><img src="moin-www.png" alt="[WWW]" height="11" width="11">http://www.smlnj.org/doc/Emacs/sml-mode.html</a> </p> </li> @@ -89,7 +89,7 @@ </li> <li class="gap"> <p> - <a href="http://primate.net/~itz/mindent.tar">http://primate.net/~itz/mindent.tar</a>, developed by Ian Zimmerman, who writes: + <a class="external" href="http://primate.net/~itz/mindent.tar"><img src="moin-www.png" alt="[WWW]" height="11" width="11">http://primate.net/~itz/mindent.tar</a>, developed by Ian Zimmerman, who writes: </p> </li> @@ -158,5 +158,5 @@ <p> <hr> -Last edited on 2005-08-06 22:25:50 by <span title="pool-70-22-241-24.bos.east.verizon.net"><a href="MatthewFluet">MatthewFluet</a></span>. +Last edited on 2005-09-06 23:19:05 by <span title="cfs34.cs.cornell.edu"><a href="MatthewFluet">MatthewFluet</a></span>. </body></html> Modified: mlton/trunk/doc/guide/Enscript =================================================================== --- mlton/trunk/doc/guide/Enscript 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Enscript 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/EqualityType =================================================================== --- mlton/trunk/doc/guide/EqualityType 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/EqualityType 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/EqualityTypeVariable =================================================================== --- mlton/trunk/doc/guide/EqualityTypeVariable 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/EqualityTypeVariable 2005-11-15 19:15:14 UTC (rev 4223) @@ -25,7 +25,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; Modified: mlton/trunk/doc/guide/Experimental =================================================================== --- mlton/trunk/doc/guide/Experimental 2005-11-15 05:02:23 UTC (rev 4222) +++ mlton/trunk/doc/guide/Experimental 2005-11-15 19:15:14 UTC (rev 4223) @@ -24,11 +24,30 @@ <link rel="Appendix" title="mlton-20050731-1.sparc-solaris.tgz" href="http://mlton.org/pages/Experimental/attachments/mlton-20050731-1.sparc-solaris.tgz"> <link rel="Appendix" title="mlton-20050731-1.src.rpm" href="http://mlton.org/pages/Experimental/attachments/mlton-20050731-1.src.rpm"> <link rel="Appendix" title="mlton-20050731-1.src.tgz" href="http://mlton.org/pages/Experimental/attachments/mlton-20050731-1.src.tgz"> +<link rel="Appendix" title="mlton-20051102-1.i386-cygwin.tgz" href="http://mlton.org/pages/Experimental/attachments/mlton-20051102-1.i386-cygwin.tgz"> +<link rel="Appendix" title="mlton-20051102-1.powerpc-darwin.tgz" href="http://mlton.org/pages/Experimental/attachments/mlton-20051102-1.powerpc-darwin.tgz"> +<link rel="Appendix" title="mlton-20051108-1.i386-mingw.tgz" href="http://mlton.org/pages/Experimental/attachments/mlton-20051108-1.i386-mingw.tgz"> +<link rel="Appendix" title="mlton-20051109-1.i386-cygwin.tgz" href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.i386-cygwin.tgz"> +<link rel="Appendix" title="mlton-20051109-1.i386-freebsd.tgz" href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.i386-freebsd.tgz"> +<link rel="Appendix" title="mlton-20051109-1.i386-linux.tgz" href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.i386-linux.tgz"> +<link rel="Appendix" title="mlton-20051109-1.i386-mingw.tgz" href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.i386-mingw.tgz"> +<link rel="Appendix" title="mlton-20051109-1.i386-netbsd.tgz" href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.i386-netbsd.tgz"> +<link rel="Appendix" title="mlton-20051109-1.i386-openbsd.tgz" href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.i386-openbsd.tgz"> +<link rel="Appendix" title="mlton-20051109-1.i386.rpm" href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.i386.rpm"> +<link rel="Appendix" title="mlton-20051109-1.powerpc-darwin.tgz" href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.powerpc-darwin.tgz"> +<link rel="Appendix" title="mlton-20051109-1.sparc-solaris.tgz" href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.sparc-solaris.tgz"> +<link rel="Appendix" title="mlton-20051109-1.src.rpm" href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.src.rpm"> +<link rel="Appendix" title="mlton-20051109-1.src.tgz" href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.src.tgz"> <link rel="Appendix" title="mlton_20050731-1.diff.gz" href="http://mlton.org/pages/Experimental/attachments/mlton_20050731-1.diff.gz"> <link rel="Appendix" title="mlton_20050731-1.dsc" href="http://mlton.org/pages/Experimental/attachments/mlton_20050731-1.dsc"> <link rel="Appendix" title="mlton_20050731-1_i386.changes" href="http://mlton.org/pages/Experimental/attachments/mlton_20050731-1_i386.changes"> <link rel="Appendix" title="mlton_20050731-1_i386.deb" href="http://mlton.org/pages/Experimental/attachments/mlton_20050731-1_i386.deb"> <link rel="Appendix" title="mlton_20050731.orig.tar.gz" href="http://mlton.org/pages/Experimental/attachments/mlton_20050731.orig.tar.gz"> +<link rel="Appendix" title="mlton_20051109-1.diff.gz" href="http://mlton.org/pages/Experimental/attachments/mlton_20051109-1.diff.gz"> +<link rel="Appendix" title="mlton_20051109-1.dsc" href="http://mlton.org/pages/Experimental/attachments/mlton_20051109-1.dsc"> +<link rel="Appendix" title="mlton_20051109-1_i386.changes" href="http://mlton.org/pages/Experimental/attachments/mlton_20051109-1_i386.changes"> +<link rel="Appendix" title="mlton_20051109-1_i386.deb" href="http://mlton.org/pages/Experimental/attachments/mlton_20051109-1_i386.deb"> +<link rel="Appendix" title="mlton_20051109.orig.tar.gz" href="http://mlton.org/pages/Experimental/attachments/mlton_20051109.orig.tar.gz"> </head> <body lang="en" dir="ltr"> @@ -40,7 +59,7 @@ color: darkblue; font-size: 150%; text-align: left;"> - <a class = mltona href="Home">MLton 20050905</a> + <a class = mltona href="Home">MLton 20051115</a> <td style = " border: 0px; font-size: 150%; @@ -73,38 +92,244 @@ <li> <p> - Compiler: better exception history + New license: BSD-style instead of GPL. </p> </li> <li> <p> - FFI: support for symbols + New platforms: x86/MinGW, hppa/Linux. </p> </li> <li> <p> - Libraries: <tt>Int1</tt>, <tt>MLton.CallStack</tt>, <tt>MLton.Process.create</tt>, <tt>Word1</tt> + Compiler: better exception history. </p> </li> <li> <p> - MLBs: <tt>warnExnMatch</tt> annotation + FFI: support for symbols. </p> </li> <li> <p> - Profiling: better inclusion/exclusion of code + Libraries: <tt>Int1</tt>, <tt>MLton.CallStack</tt>, <tt>MLton.Process.create</tt>, <tt>Word1</tt>. </p> </li> <li> <p> - Tools: updates of mllex and mlyacc from SML/NJ + MLBs: <tt>warnExnMatch</tt> annotation. </p> </li> + <li> +<p> + Profiling: better inclusion/exclusion of code. +</p> +</li> + <li> +<p> + Tools: updates of mllex and mlyacc from SML/NJ. +</p> +</li> </ul> +<h2 id="head-0e3b62959b790d2ab3ea48811fd819acd889cd24">20051109 binary packages</h2> + + <ul> + + <li> +<p> + x86 +</p> +</li> + + <ul> + + <li> +<p> + <a href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.i386-cygwin.tgz"><img src="moin-www.png" alt="[WWW]" height="11" width="11">Cygwin</a> 1.5.18-1 +</p> +</li> + <li> +<p> + <a href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.i386-freebsd.tgz"><img src="moin-www.png" alt="[WWW]" height="11" width="11">FreeBSD</a> 5.4 +</p> +</li> + <li> +<p> + Linux +</p> +</li> + + <ul> + + <li> +<p> + <a href="http://mlton.org/pages/Experimental/attachments/mlton_20051109-1_i386.deb"><img src="moin-www.png" alt="[WWW]" height="11" width="11">Debian</a> sid +</p> +</li> + <li> +<p> + <a href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.i386.rpm"><img src="moin-www.png" alt="[WWW]" height="11" width="11">RedHat</a> 7.1 +</p> +</li> + <li> +<p> + <a href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.i386-linux.tgz"><img src="moin-www.png" alt="[WWW]" height="11" width="11">tgz</a> for other distributions (glibc 2.3) +</p> +</li> + + </ul> + + + <li> +<p> + <a href="http://mlton.org/pages/Experimental/attachments/mlton-20051108-1.i386-mingw.tgz"><img src="moin-www.png" alt="[WWW]" height="11" width="11">MinGW</a> +</p> +</li> + <li> +<p> + <a href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.i386-netbsd.tgz"><img src="moin-www.png" alt="[WWW]" height="11" width="11">NetBSD</a> 2.0.2 +</p> +</li> + <li> +<p> + <a href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.i386-openbsd.tgz"><img src="moin-www.png" alt="[WWW]" height="11" width="11">OpenBSD</a> 3.7 +</p> +</li> + + </ul> + + + <li> +<p> + PowerPC +</p> +</li> + + <ul> + + <li> +<p> + <a href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.powerpc-darwin.tgz"><img src="moin-www.png" alt="[WWW]" height="11" width="11">Darwin</a> 7.9.0 (Mac OS X) +</p> +</li> + + </ul> + + + <li> +<p> + Sparc +</p> +</li> + + <ul> + + <li> +<p> + <a href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.sparc-solaris.tgz"><img src="moin-www.png" alt="[WWW]" height="11" width="11">Solaris</a> 8 +</p> +</li> + + </ul> + + + + </ul> + + +<h2 id="head-4a3ee97e74efdeedf7a6690a0962c3e5674109ea">20051109 sources</h2> + + <ul> + + <li> +<p> + <a href="http://mlton.org/pages/Experimental/attachments/mlton-20051109-1.src.tgz"><img src="moin-www.png" alt="[WWW]" height="11" width="11">source tgz</a> +</p> +</li> + <li> +<p> + Debian <a href="http://mlton.org/pages/Experimental/attachments/mlton_20051109-1.dsc"><img src="moin-www.png" alt="[WWW]" height="11" width="11">dsc</a>, <a href="http://mlton.org/pages/Experimental/attachments/mlton_20051109-1.diff.gz"><img src="moin-www.png" alt="[WWW]" height="11" width="11">diff.gz</a>, <a href="... [truncated message content] |
From: Matthew F. <fl...@ml...> - 2005-11-14 21:02:26
|
Fixed bug in sorting of profile labels ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.h ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.c 2005-11-15 04:55:53 UTC (rev 4221) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.c 2005-11-15 05:02:23 UTC (rev 4222) @@ -15,13 +15,12 @@ return s->sourceMaps.sourceNames[s->sourceMaps.sources[i].sourceNameIndex]; } -static int compareSourceLabels (const void *v1, const void *v2) { - uintptr_t ui1; - uintptr_t ui2; +int compareSourceLabels (const void *v1, const void *v2) { + const struct GC_sourceLabel* l1 = (const struct GC_sourceLabel*)v1; + const struct GC_sourceLabel* l2 = (const struct GC_sourceLabel*)v2; + uintptr_t ui1 = (uintptr_t)(l1->label); + uintptr_t ui2 = (uintptr_t)(l2->label); - ui1 = (uintptr_t)v1; - ui2 = (uintptr_t)v2; - if (ui1 < ui2) return -1; else if (ui1 == ui2) @@ -39,7 +38,7 @@ sizeof (*s->sourceMaps.sourceLabels), compareSourceLabels); if (0 == s->sourceMaps.sourceLabels[s->sourceMaps.sourceLabelsLength - 1].label) - die ("Max profile label is 0 -- something is wrong."); + die ("Max source label is 0 -- something is wrong."); if (DEBUG_SOURCES) for (i = 0; i < s->sourceMaps.sourceLabelsLength; i++) fprintf (stderr, FMTPTR" %"PRIu32"\n", Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.h 2005-11-15 04:55:53 UTC (rev 4221) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.h 2005-11-15 05:02:23 UTC (rev 4222) @@ -76,6 +76,7 @@ static GC_sourceSeqIndex getStackTopFrameSourceSeqIndex (GC_state s, GC_stack stack); +static int compareSourceLabels (const void *v1, const void *v2); static void sortSourceLabels (GC_state s); static void initTextSources (GC_state s); |
From: Matthew F. <fl...@ml...> - 2005-11-14 20:55:55
|
Accidently removed header from call to GC_weakNew ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun ---------------------------------------------------------------------- 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 04:29:39 UTC (rev 4220) +++ mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun 2005-11-15 04:55:53 UTC (rev 4221) @@ -1387,11 +1387,15 @@ (case Type.dePointer result of NONE => Error.bug "SsaToRssa.translateStatementsTransfer: PrimApp,Weak_new" | SOME pt => pt) + val func = + CFunction.weakNew {arg = t, + return = result} in - simpleCCallWithGCState - (CFunction.weakNew - {arg = t, - return = result}) + ccall {args = (Vector.concat + [Vector.new2 + (GCState, header), + vos args]), + func = func} end, none) | Word_equal s => |
From: Matthew F. <fl...@ml...> - 2005-11-14 20:29:43
|
Syntax and type errors ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun U mlton/branches/on-20050822-x86_64-branch/runtime/platform.c ---------------------------------------------------------------------- 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 04:05:35 UTC (rev 4219) +++ mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun 2005-11-15 04:29:39 UTC (rev 4220) @@ -160,7 +160,7 @@ end, readsStackTop = true, return = unit, - target = Direct "Thread_switchTo", + target = Direct "GC_switchToThread", writesStackTop = true} fun weakCanGet {arg} = Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform.c 2005-11-15 04:05:35 UTC (rev 4219) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform.c 2005-11-15 04:29:39 UTC (rev 4220) @@ -27,7 +27,7 @@ CommandLine_argv = (uint)(argv + start); } -void MLton_exit (Int status, GC_state s) { +void MLton_exit (GC_state s, Int status) { GC_done (s); exit (status); } |
From: Matthew F. <fl...@ml...> - 2005-11-14 20:05:44
|
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))) |
From: Matthew F. <fl...@ml...> - 2005-11-14 16:24:50
|
Cleaning up interface between GC and rest of runtime ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/basis-library/misc/primitive.sml U mlton/branches/on-20050822-x86_64-branch/include/main.h U mlton/branches/on-20050822-x86_64-branch/runtime/Makefile U mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c D mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/errno.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/align.h A mlton/branches/on-20050822-x86_64-branch/runtime/gc/done.h D mlton/branches/on-20050822-x86_64-branch/runtime/gc/exports.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.h D mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state_exports.c D mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state_exports.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/handler.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/init-world.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.h A mlton/branches/on-20050822-x86_64-branch/runtime/gc/pack.h D mlton/branches/on-20050822-x86_64-branch/runtime/gc/platform.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h A mlton/branches/on-20050822-x86_64-branch/runtime/gc/share.h A mlton/branches/on-20050822-x86_64-branch/runtime/gc/size.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/string.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/switch-thread.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/weak.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform.h ---------------------------------------------------------------------- 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-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/misc/primitive.sml 2005-11-15 00:24:38 UTC (rev 4218) @@ -210,7 +210,6 @@ val detectOverflow = _command_line_const "MLton.detectOverflow": bool = true; val eq = _prim "MLton_eq": 'a * 'a -> bool; - (* val errno = _import "MLton_errno": unit -> int; *) val installSignalHandler = _prim "MLton_installSignalHandler": unit -> unit; val safe = _command_line_const "MLton.safe": bool = true; Modified: mlton/branches/on-20050822-x86_64-branch/include/main.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/include/main.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/include/main.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -10,6 +10,7 @@ #define _MAIN_H_ #define MLTON_GC_INTERNAL_TYPES +#define MLTON_GC_INTERNAL_BASIS #include "platform.h" /* The label must be declared as weak because gcc's optimizer may prove that Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2005-11-15 00:24:38 UTC (rev 4218) @@ -62,10 +62,10 @@ -Wmissing-noreturn -Wmissing-format-attribute \ -Wpacked \ -Wredundant-decls \ - -Wnested-externs -# -Wshadow \ -# -Wmissing-prototypes \ -# -Wmissing-declarations + -Wnested-externs \ + -Wmissing-prototypes \ + -Wmissing-declarations +# -Wshadow OPTWARNFLAGS = $(WARNFLAGS) -Winline -Wdisabled-optimization DEBUGWARNFLAGS = $(WARNFLAGS) -Wunused @@ -165,7 +165,7 @@ types.h: gen/gen-types.c util.h $(UTILOFILES) rm -f types.h - $(CC) $(OPTCFLAGS) $(OPTWARNFLAGS) -Wno-inline -Wno-disabled-optimization -o gen-types gen/gen-types.c $(UTILOFILES) + $(CC) $(OPTCFLAGS) $(WARNFLAGS) -o gen-types gen/gen-types.c $(UTILOFILES) ./gen-types rm -f gen-types @@ -182,9 +182,9 @@ # with -fno-strict-aliasing to prevent gcc from taking advantage of # this aspect of the C spec. basis/Real/%-gdb.o: basis/Real/%.c gdtoa/arith.h - $(CC) $(DEBUGCFLAGS) $(DEBUGWARNFLAGS) -Wno-redundant-decls -c -o $@ $< + $(CC) $(DEBUGCFLAGS) -c -o $@ $< basis/Real/%.o: basis/Real/%.c gdtoa/arith.h - $(CC) $(OPTCFLAGS) -O1 -fno-strict-aliasing $(OPTWARNFLAGS) -Wno-redundant-decls -c -o $@ $< + $(CC) $(OPTCFLAGS) -O1 -fno-strict-aliasing -c -o $@ $< %-gdb.o: %.c $(HFILES) $(CC) $(DEBUGCFLAGS) -c -o $@ $< Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c 2005-11-15 00:24:38 UTC (rev 4218) @@ -7,7 +7,7 @@ */ #define MLTON_GC_INTERNAL_TYPES -#define MLTON_GC_INTERNAL_INTINF +#define MLTON_GC_INTERNAL_BASIS #include "platform.h" enum { Deleted: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/errno.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/errno.c 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/errno.c 2005-11-15 00:24:38 UTC (rev 4218) @@ -1,5 +0,0 @@ -#include "platform.h" - -Int MLton_errno () { - return errno; -} Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/align.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/align.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/align.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -14,4 +14,8 @@ #endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ +#if (defined (MLTON_GC_INTERNAL_BASIS)) + pointer GC_alignFrontier (GC_state s, pointer p); + +#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */ Added: mlton/branches/on-20050822-x86_64-branch/runtime/gc/done.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/done.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/done.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -0,0 +1,9 @@ +/* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh + * Jagannathan, and Stephen Weeks. + * Copyright (C) 1997-2000 NEC Research Institute. + * + * MLton is released under a BSD-style license. + * See the file MLton-LICENSE for details. + */ + +void GC_done (GC_state s); Deleted: mlton/branches/on-20050822-x86_64-branch/runtime/gc/exports.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/exports.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/exports.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -1,18 +0,0 @@ -/* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh - * Jagannathan, and Stephen Weeks. - * Copyright (C) 1997-2000 NEC Research Institute. - * - * MLton is released under a BSD-style license. - * See the file MLton-LICENSE for details. - */ - -void GC_pack (GC_state s); -void GC_unpack (GC_state s); - -void GC_share (GC_state s, pointer object); - -size_t GC_size (GC_state s, pointer root); - - -int GC_init (GC_state s, int argc, char **argv); -void GC_done (GC_state s); Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -22,7 +22,12 @@ static void ensureHasHeapBytesFree (GC_state s, size_t oldGenBytesRequested, size_t nurseryBytesRequested); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ + +#if (defined (MLTON_GC_INTERNAL_BASIS)) + void GC_collect (GC_state s, size_t bytesRequested, bool force, char *file, int line); -#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ +#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.c 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.c 2005-11-15 00:24:38 UTC (rev 4218) @@ -109,3 +109,77 @@ assert (isFrontierAligned (s, s->heap.nursery)); assert (hasHeapBytesFree (s, oldGenBytesRequested, nurseryBytesRequested)); } + + +bool GC_getAmOriginal (GC_state s) { + return s->amOriginal; +} +void GC_setAmOriginal (GC_state s, bool b) { + s->amOriginal = b; +} + +void GC_setMessages (GC_state s, bool b) { + s->controls.messages = b; +} + +void GC_setSummary (GC_state s, bool b) { + s->controls.summary = b; +} + +void GC_setRusageMeasureGC (GC_state s, bool b) { + s->controls.rusageMeasureGC = b; +} + +void GC_setHashConsDuringGC (GC_state s, bool b) { + s->hashConsDuringGC = b; +} + +struct rusage* GC_getRusageGCAddr (GC_state s) { + return &(s->cumulativeStatistics.ru_gc); +} + +sigset_t* GC_getSignalsHandledAddr (GC_state s) { + return &(s->signalsInfo.signalsHandled); +} + +sigset_t* GC_getSignalsPendingAddr (GC_state s) { + return &(s->signalsInfo.signalsPending); +} + +void GC_setGCSignalHandled (GC_state s, bool b) { + s->signalsInfo.gcSignalHandled = b; +} + +bool GC_getGCSignalPending (GC_state s) { + return (s->signalsInfo.gcSignalPending); +} + +void GC_setGCSignalPending (GC_state s, bool b) { + s->signalsInfo.gcSignalPending = b; +} + +void GC_setCallFromCHandlerThread (GC_state s, GC_thread t) { + objptr op = pointerToObjptr ((pointer)t, s->heap.start); + s->callFromCHandlerThread = op; +} + +GC_thread GC_getCurrentThread (GC_state s) { + pointer p = objptrToPointer (s->currentThread, s->heap.start); + return (GC_thread)p; +} + +GC_thread GC_getSavedThread (GC_state s) { + pointer p = objptrToPointer (s->savedThread, s->heap.start); + s->savedThread = BOGUS_OBJPTR; + return (GC_thread)p; +} + +void GC_setSavedThread (GC_state s, GC_thread t) { + objptr op = pointerToObjptr ((pointer)t, s->heap.start); + s->savedThread = op; +} + +void GC_setSignalHandlerThread (GC_state s, GC_thread t) { + objptr op = pointerToObjptr ((pointer)t, s->heap.start); + s->signalHandlerThread = op; +} Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -76,3 +76,28 @@ size_t nurseryBytesRequested); #endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ + +#if (defined (MLTON_GC_INTERNAL_BASIS)) + +bool GC_getAmOriginal (GC_state s); +void GC_setAmOriginal (GC_state s, bool b); +void GC_setMessages (GC_state s, bool b); +void GC_setSummary (GC_state s, bool b); +void GC_setRusageMeasureGC (GC_state s, bool b); +void GC_setHashConsDuringGC (GC_state s, bool b); + +GC_thread GC_getCurrentThread (GC_state s); +GC_thread GC_getSavedThread (GC_state s); +void GC_setCallFromCHandlerThread (GC_state s, GC_thread thread); +void GC_setSavedThread (GC_state s, GC_thread thread); +void GC_setSignalHandlerThread (GC_state s, GC_thread thread); + +#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */ + +struct rusage* GC_getRusageGCAddr (GC_state s); + +sigset_t* GC_getSignalsHandledAddr (GC_state s); +sigset_t* GC_getSignalsPendingAddr (GC_state s); +void GC_setGCSignalHandled (GC_state s, bool b); +bool GC_getGCSignalPending (GC_state s); +void GC_setGCSignalPending (GC_state s, bool b); Deleted: mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state_exports.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state_exports.c 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state_exports.c 2005-11-15 00:24:38 UTC (rev 4218) @@ -1,80 +0,0 @@ -/* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh - * Jagannathan, and Stephen Weeks. - * Copyright (C) 1997-2000 NEC Research Institute. - * - * MLton is released under a BSD-style license. - * See the file MLton-LICENSE for details. - */ - -bool GC_getAmOriginal (GC_state s) { - return s->amOriginal; -} -void GC_setAmOriginal (GC_state s, bool b) { - s->amOriginal = b; -} - -void GC_setMessages (GC_state s, bool b) { - s->controls.messages = b; -} - -void GC_setSummary (GC_state s, bool b) { - s->controls.summary = b; -} - -void GC_setRusageMeasureGC (GC_state s, bool b) { - s->controls.rusageMeasureGC = b; -} - -void GC_setHashConsDuringGC (GC_state s, bool b) { - s->hashConsDuringGC = b; -} - -struct rusage* GC_getRusageGCAddr (GC_state s) { - return &(s->cumulativeStatistics.ru_gc); -} - -sigset_t* GC_getSignalsHandledAddr (GC_state s) { - return &(s->signalsInfo.signalsHandled); -} - -sigset_t* GC_getSignalsPendingAddr (GC_state s) { - return &(s->signalsInfo.signalsPending); -} - -void GC_setGCSignalHandled (GC_state s, bool b) { - s->signalsInfo.gcSignalHandled = b; -} - -bool GC_getGCSignalPending (GC_state s) { - return (s->signalsInfo.gcSignalPending); -} - -void GC_setGCSignalPending (GC_state s, bool b) { - s->signalsInfo.gcSignalPending = b; -} - -void GC_setCallFromCHandlerThread (GC_state s, GC_thread t) { - objptr op = pointerToObjptr ((pointer)t, s->heap.start); - s->callFromCHandlerThread = op; -} - -GC_thread GC_getCurrentThread (GC_state s) { - pointer p = objptrToPointer (s->currentThread, s->heap.start); - return (GC_thread)p; -} - -GC_thread GC_getSavedThread (GC_state s) { - pointer p = objptrToPointer (s->savedThread, s->heap.start); - s->savedThread = BOGUS_OBJPTR; - return (GC_thread)p; -} - -void GC_setSavedThread (GC_state s, GC_thread t) { - objptr op = pointerToObjptr ((pointer)t, s->heap.start); - s->savedThread = op; -} - -void GC_setSignalHandlerThread (GC_state s, GC_thread t) { - objptr op = pointerToObjptr ((pointer)t, s->heap.start); - s->signalHandlerThread = op; -} Deleted: mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state_exports.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state_exports.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state_exports.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -1,28 +0,0 @@ -/* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh - * Jagannathan, and Stephen Weeks. - * Copyright (C) 1997-2000 NEC Research Institute. - * - * MLton is released under a BSD-style license. - * See the file MLton-LICENSE for details. - */ - -bool GC_getAmOriginal (GC_state s); -void GC_setAmOriginal (GC_state s, bool b); -void GC_setMessages (GC_state s, bool b); -void GC_setSummary (GC_state s, bool b); -void GC_setRusageMeasureGC (GC_state s, bool b); -void GC_setHashConsDuringGC (GC_state s, bool b); -struct rusage* GC_getRusageGCAddr (GC_state s); - -GC_thread GC_getCurrentThread (GC_state s); -GC_thread GC_getSavedThread (GC_state s); -void GC_setCallFromCHandlerThread (GC_state s, GC_thread thread); -void GC_setSavedThread (GC_state s, GC_thread thread); -void GC_setSignalHandlerThread (GC_state s, GC_thread thread); - -sigset_t* GC_getSignalsHandledAddr (GC_state s); -sigset_t* GC_getSignalsPendingAddr (GC_state s); -void GC_setGCSignalHandled (GC_state s, bool b); -bool GC_getGCSignalPending (GC_state s); -void GC_setGCSignalPending (GC_state s, bool b); - Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/handler.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/handler.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/handler.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -12,6 +12,11 @@ #endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ +#if (defined (MLTON_GC_INTERNAL_BASIS)) + void GC_startSignalHandler (GC_state s); void GC_finishSignalHandler (GC_state s); + +#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */ + void GC_handler (GC_state s, int signum); Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/init-world.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/init-world.c 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/init-world.c 2005-11-15 00:24:38 UTC (rev 4218) @@ -10,7 +10,6 @@ /* Initialization */ /* ---------------------------------------------------------------- */ - size_t sizeofInitialBytesLive (GC_state s) { uint32_t i; size_t numBytes; Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -12,3 +12,5 @@ char **argv, char **worldFile); #endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ + +int GC_init (GC_state s, int argc, char **argv); Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -27,8 +27,8 @@ #endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ -#if (defined (MLTON_GC_INTERNAL_INTINF)) +#if (defined (MLTON_GC_INTERNAL_BASIS)) GC_header GC_intInfHeader (void); -#endif /* (defined (MLTON_GC_INTERNAL_INTINF)) */ +#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */ Added: mlton/branches/on-20050822-x86_64-branch/runtime/gc/pack.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/pack.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/pack.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -0,0 +1,14 @@ +/* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh + * Jagannathan, and Stephen Weeks. + * Copyright (C) 1997-2000 NEC Research Institute. + * + * MLton is released under a BSD-style license. + * See the file MLton-LICENSE for details. + */ + +#if (defined (MLTON_GC_INTERNAL_BASIS)) + +void GC_pack (GC_state s); +void GC_unpack (GC_state s); + +#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */ Deleted: mlton/branches/on-20050822-x86_64-branch/runtime/gc/platform.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/platform.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/platform.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -1,48 +0,0 @@ -/* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh - * Jagannathan, and Stephen Weeks. - * Copyright (C) 1997-2000 NEC Research Institute. - * - * MLton is released under a BSD-style license. - * See the file MLton-LICENSE for details. - */ - -/* ---------------------------------------------------------------- */ -/* Virtual Memory */ -/* ---------------------------------------------------------------- */ - -/* GC_displayMem displays the virtual memory mapping to stdout. - * It is used to diagnose memory problems. - */ -void GC_displayMem (void); - -void *GC_mmapAnon (void *start, size_t length); -void *GC_mmapAnon_safe (void *start, size_t length); -void *GC_mmapAnon_safe_protect (void *start, size_t length, - size_t dead_low, size_t dead_high); -void *GC_mremap (void *start, size_t oldLength, size_t newLength); -void GC_release (void *base, size_t length); -void GC_decommit (void *base, size_t length); - -size_t GC_pageSize (void); -size_t GC_totalRam (void); -size_t GC_availRam (void); - - -/* ---------------------------------------------------------------- */ -/* Text Segment */ -/* ---------------------------------------------------------------- */ - -void *GC_getTextEnd (void); -void *GC_getTextStart (void); - -/* ---------------------------------------------------------------- */ -/* SigProf Handler */ -/* ---------------------------------------------------------------- */ - -void GC_setSigProfHandler (struct sigaction *sa); - -/* ---------------------------------------------------------------- */ -/* Misc */ -/* ---------------------------------------------------------------- */ - -void GC_setCygwinUseMmap (bool b); Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c 2005-11-15 00:24:38 UTC (rev 4218) @@ -204,7 +204,7 @@ } -GC_profileData GC_profileNew (GC_state s) { +GC_profileData GC_profileMalloc (GC_state s) { GC_profileData p; uint32_t profileMasterLength; @@ -218,7 +218,7 @@ (struct GC_profileStack *) (calloc_safe(profileMasterLength, sizeof(*(p->stack)))); if (DEBUG_PROFILE) - fprintf (stderr, FMTPTR" = GC_profileNew ()\n", (uintptr_t)p); + fprintf (stderr, FMTPTR" = GC_profileMalloc ()\n", (uintptr_t)p); return p; } @@ -342,7 +342,7 @@ static void initProfilingTime (GC_state s) { struct sigaction sa; - s->profiling.data = GC_profileNew (s); + s->profiling.data = GC_profileMalloc (s); initTextSources (s); /* * Install catcher, which handles SIGPROF and calls MLton_Profile_inc. @@ -399,7 +399,7 @@ switch (s->profiling.kind) { case PROFILE_ALLOC: case PROFILE_COUNT: - s->profiling.data = GC_profileNew (s); + s->profiling.data = GC_profileMalloc (s); break; case PROFILE_NONE: die ("impossible PROFILE_NONE"); Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -100,6 +100,8 @@ #endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ +#if (defined (MLTON_GC_INTERNAL_BASIS)) + void GC_profileEnter (GC_state s); void GC_profileLeave (GC_state s); void GC_profileInc (GC_state s, size_t amount); @@ -108,10 +110,13 @@ GC_profileData GC_getProfileCurrent (GC_state s); void GC_setProfileCurrent (GC_state s, GC_profileData p); -GC_profileData GC_profileNew (GC_state s); +GC_profileData GC_profileMalloc (GC_state s); void GC_profileWrite (GC_state s, GC_profileData p, int fd); void GC_profileFree (GC_state s, GC_profileData p); void GC_profileDone (GC_state s); +#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */ + void GC_handleSigProf (pointer pc); + Added: mlton/branches/on-20050822-x86_64-branch/runtime/gc/share.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/share.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/share.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -0,0 +1,13 @@ +/* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh + * Jagannathan, and Stephen Weeks. + * Copyright (C) 1997-2000 NEC Research Institute. + * + * MLton is released under a BSD-style license. + * See the file MLton-LICENSE for details. + */ + +#if (defined (MLTON_GC_INTERNAL_BASIS)) + +void GC_share (GC_state s, pointer object); + +#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */ Added: mlton/branches/on-20050822-x86_64-branch/runtime/gc/size.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/size.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/size.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -0,0 +1,13 @@ +/* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh + * Jagannathan, and Stephen Weeks. + * Copyright (C) 1997-2000 NEC Research Institute. + * + * MLton is released under a BSD-style license. + * See the file MLton-LICENSE for details. + */ + +#if (defined (MLTON_GC_INTERNAL_BASIS)) + +size_t GC_size (GC_state s, pointer root); + +#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -75,7 +75,6 @@ #if (defined (MLTON_GC_INTERNAL_FUNCS)) static GC_sourceSeqIndex getStackTopFrameSourceSeqIndex (GC_state s, GC_stack stack); -char* GC_sourceName (GC_state s, GC_sourceIndex i); static void sortSourceLabels (GC_state s); static void initTextSources (GC_state s); @@ -83,3 +82,9 @@ static void showSources (GC_state s); #endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ + +#if (defined (MLTON_GC_INTERNAL_BASIS)) + +char* GC_sourceName (GC_state s, GC_sourceIndex i); + +#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/string.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/string.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/string.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -26,8 +26,8 @@ #endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ -#if (defined (MLTON_GC_INTERNAL_INTINF)) +#if (defined (MLTON_GC_INTERNAL_BASIS)) GC_header GC_stringHeader (void); -#endif /* (defined (MLTON_GC_INTERNAL_INTINF)) */ +#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/switch-thread.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/switch-thread.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/switch-thread.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -12,4 +12,8 @@ #endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ +#if (defined (MLTON_GC_INTERNAL_BASIS)) + void GC_switchToThread (GC_state s, GC_thread t, size_t ensureBytesFree); + +#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */ 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-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/weak.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -40,8 +40,12 @@ static size_t sizeofWeak (GC_state s); static size_t offsetofWeak (GC_state s); +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ + +#if (defined (MLTON_GC_INTERNAL_BASIS)) + uint32_t GC_weakCanGet (GC_state s, pointer p); pointer GC_weakGet (GC_state s, pointer p); pointer GC_weakNew (GC_state s, GC_header header, pointer p); -#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ +#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -14,4 +14,8 @@ #endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ +#if (defined (MLTON_GC_INTERNAL_BASIS)) + void GC_saveWorld (GC_state s, int fd); + +#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc.c 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc.c 2005-11-15 00:24:38 UTC (rev 4218) @@ -8,7 +8,6 @@ #define MLTON_GC_INTERNAL_TYPES #define MLTON_GC_INTERNAL_FUNCS -#define MLTON_GC_INTERNAL_INTINF #define MLTON_GC_INTERNAL_BASIS #include "platform.h" #include "gc/rusage.h" @@ -33,7 +32,6 @@ #include "gc/frame.c" #include "gc/garbage-collection.c" #include "gc/gc_state.c" -#include "gc/gc_state_exports.c" #include "gc/generational.c" #include "gc/handler.c" #include "gc/hash-cons.c" Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -59,14 +59,14 @@ #include "gc/sources.h" #include "gc/call-stack.h" #include "gc/profiling.h" +#include "gc/gc_state.h" #include "gc/init-world.h" #include "gc/world.h" #include "gc/init.h" +#include "gc/done.h" #include "gc/copy-thread.h" -#include "gc/gc_state.h" +#include "gc/pack.h" +#include "gc/size.h" +#include "gc/share.h" -#include "gc/platform.h" -#include "gc/gc_state_exports.h" -#include "gc/exports.h" - #endif /* _MLTON_GC_H_ */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2005-11-14 23:03:16 UTC (rev 4217) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform.h 2005-11-15 00:24:38 UTC (rev 4218) @@ -127,6 +127,46 @@ int mkdir2 (const char *pathname, mode_t mode); /* ---------------------------------------------------------------- */ +/* Garbage Collector */ +/* ---------------------------------------------------------------- */ + +/* ------------------------------------------------- */ +/* Virtual Memory */ +/* ------------------------------------------------- */ + +/* GC_displayMem displays the virtual memory mapping to stdout. + * It is used to diagnose memory problems. + */ +void GC_displayMem (void); + +void *GC_mmapAnon (void *start, size_t length); +void *GC_mmapAnon_safe (void *start, size_t length); +void *GC_mmapAnon_safe_protect (void *start, size_t length, + size_t dead_low, size_t dead_high); +void *GC_mremap (void *start, size_t oldLength, size_t newLength); +void GC_release (void *base, size_t length); +void GC_decommit (void *base, size_t length); + +size_t GC_pageSize (void); +size_t GC_totalRam (void); +size_t GC_availRam (void); + +void GC_setCygwinUseMmap (bool b); + +/* ------------------------------------------------- */ +/* Text Segment */ +/* ------------------------------------------------- */ + +void *GC_getTextEnd (void); +void *GC_getTextStart (void); + +/* ------------------------------------------------- */ +/* SigProf Handler */ +/* ------------------------------------------------- */ + +void GC_setSigProfHandler (struct sigaction *sa); + +/* ---------------------------------------------------------------- */ /* MLton libraries */ /* ---------------------------------------------------------------- */ @@ -184,15 +224,6 @@ void Debug_leave (Pointer name); /* ------------------------------------------------- */ -/* GC */ -/* ------------------------------------------------- */ - -void MLton_GC_setHashConsDuringGC (Int b); -void MLton_GC_setMessages (Int b); -void MLton_GC_setSummary (Int b); -void MLton_GC_setRusageMeasureGC (Int b); - -/* ------------------------------------------------- */ /* IEEEReal */ /* ------------------------------------------------- */ @@ -258,10 +289,6 @@ void MLton_bug (Pointer msg); Int MLton_errno (void); -/* halt the machine */ -void MLton_exit (Int status); -Word MLton_random (void); -Word MLton_size (Pointer p); /* ---------------------------------- */ /* MLton.Platform */ @@ -298,18 +325,6 @@ extern Bool MLton_Platform_CygwinUseMmap; /* ---------------------------------- */ -/* MLton.Profile */ -/* ---------------------------------- */ - -void MLton_Profile_Data_free (Pointer d); -Pointer MLton_Profile_Data_malloc (void); -void MLton_Profile_Data_write (Pointer data, Word fd); - -Pointer MLton_Profile_current (void); -void MLton_Profile_done (void); -void MLton_Profile_setCurrent (Pointer d); - -/* ---------------------------------- */ /* MLton.Process */ /* ---------------------------------- */ @@ -940,18 +955,6 @@ int String_equal (char * s1, char * s2); /* ------------------------------------------------- */ -/* Thread */ -/* ------------------------------------------------- */ - -Pointer Thread_current (void); -void Thread_finishSignalHandler (void); -void Thread_resetSignals (void); -Pointer Thread_saved (void); -void Thread_setSignalHandler (Pointer t); -void Thread_startSignalHandler (void); -void Thread_switchTo (Pointer t, Word ensureBytesFree); - -/* ------------------------------------------------- */ /* Time */ /* ------------------------------------------------- */ |
From: Matthew F. <fl...@ml...> - 2005-11-14 15:03:27
|
gcState (as a symbol) is available both in the Basis Library implementation and in the backend. So, eliminate silly wrapper functions that do nothing by pass the gcState address. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/basis-library/misc/primitive.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/gc.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/thread.sml U mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml U mlton/branches/on-20050822-x86_64-branch/mlprof/main.sml U mlton/branches/on-20050822-x86_64-branch/mlton/backend/profile.fun U mlton/branches/on-20050822-x86_64-branch/mlton/backend/rep-type.fun U mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun U mlton/branches/on-20050822-x86_64-branch/mlton/codegen/x86-codegen/x86-mlton-basic.fun U mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c D mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/exit.c D mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/gc.c D mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/profile.c D mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/share.c D mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/size.c D mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/thread.c D mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/world.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.h U mlton/branches/on-20050822-x86_64-branch/runtime/platform.c ---------------------------------------------------------------------- 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-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/misc/primitive.sml 2005-11-14 23:03:16 UTC (rev 4217) @@ -396,13 +396,17 @@ structure GC = struct val collect = _prim "GC_collect": unit -> unit; - val pack = _import "MLton_GC_pack": unit -> unit; + val pack = _import "GC_pack": GCState.t -> unit; val setHashConsDuringGC = - _import "MLton_GC_setHashConsDuringGC": bool -> unit; - val setMessages = _import "MLton_GC_setMessages": bool -> unit; - val setRusageMeasureGC = _import "MLton_GC_setRusageMeasureGC": bool -> unit; - val setSummary = _import "MLton_GC_setSummary": bool -> unit; - val unpack = _import "MLton_GC_unpack": unit -> unit; + _import "GC_setHashConsDuringGC": GCState.t * bool -> unit; + val setMessages = + _import "GC_setMessages": GCState.t * bool -> unit; + val setRusageMeasureGC = + _import "GC_setRusageMeasureGC": GCState.t * bool -> unit; + val setSummary = + _import "GC_setSummary": GCState.t * bool -> unit; + val unpack = + _import "GC_unpack": GCState.t -> unit; end structure IEEEReal = @@ -1040,16 +1044,20 @@ type t = word val dummy:t = 0w0 - val free = _import "MLton_Profile_Data_free": t -> unit; - val malloc = _import "MLton_Profile_Data_malloc": unit -> t; - val write = - _import "MLton_Profile_Data_write" - : t * word (* fd *) -> unit; + val free = + _import "GC_profileFree": GCState.t * t -> unit; + val malloc = + _import "GC_profileMalloc": GCState.t * unit -> t; + val write = + _import "GC_profileWrite" + : GCState.t * t * word (* fd *) -> unit; end - val current = _import "MLton_Profile_current": unit -> Data.t; - val done = _import "MLton_Profile_done": unit -> unit; + val done = _import "GC_profileDone": GCState.t -> unit; + val getCurrent = + _import "GC_getProfileCurrent": GCState.t -> Data.t; val setCurrent = - _import "MLton_Profile_setCurrent": Data.t -> unit; + _import "GC_setProfileCurrent" + : GCState.t * Data.t -> unit; end structure Rlimit = @@ -1704,16 +1712,16 @@ * switching to a copy. *) val copyCurrent = _prim "Thread_copyCurrent": unit -> unit; - val current = _import "Thread_current": unit -> thread; - val finishSignalHandler = _import "Thread_finishSignalHandler": unit -> unit; + val current = _import "GC_getCurrentThread": GCState.t -> thread; + val finishSignalHandler = _import "GC_finishSignalHandler": GCState.t* -> unit; val returnToC = _prim "Thread_returnToC": unit -> unit; - val saved = _import "Thread_saved": unit -> thread; - val savedPre = _import "Thread_saved": unit -> preThread; + val saved = _import "GC_getSavedThread": GCState.t -> thread; + val savedPre = _import "GC_getSavedThread": GCState.t -> preThread; val setCallFromCHandler = - _import "Thread_setCallFromCHandler": thread -> unit; - val setSignalHandler = _import "Thread_setSignalHandler": thread -> unit; - val setSaved = _import "Thread_setSaved": thread -> unit; - val startSignalHandler = _import "Thread_startSignalHandler": unit -> unit; + _import "GC_setCallFromCHandlerThread": GCState.t * thread -> unit; + val setSignalHandler = _import "GC_setSignalHandlerThread": GCState.t * thread -> unit; + val setSaved = _import "GC_setSavedThread": GCState.t * thread -> unit; + val startSignalHandler = _import "GC_startSignalHandler": GCState.t -> unit; val switchTo = _prim "Thread_switchTo": thread -> unit; end @@ -2182,8 +2190,8 @@ structure World = struct - val isOriginal = _import "World_isOriginal": unit -> bool; - val makeOriginal = _import "World_makeOriginal": unit -> unit; + val getAmOriginal = _import "GC_getAmOriginal": GCState.t -> bool; + val setAmOriginal = _import "GC_setAmOriginal": GCState.t * bool -> unit; val save = _prim "World_save": word (* filedes *) -> unit; end end Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/gc.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/gc.sml 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/gc.sml 2005-11-14 23:03:16 UTC (rev 4217) @@ -9,4 +9,21 @@ structure MLtonGC = struct open Primitive.GC + + val gcState = Primitive.GCState.gcState + + val pack : unit -> unit = + fn () => pack gcState + val unpack : unit -> unit = + fn () => unpack gcState + + val setHashConsDuringGC : bool -> unit = + fn b => setHashConsDuringGC (gcState, b) + val setMessages : bool -> unit = + fn b => setMessages (gcState, b) + val setRusageMeasureGC : bool -> unit = + fn b => setRusageMeasureGC (gcState, b) + val setSummary : bool -> unit = + fn b => setSummary (gcState, b) + end 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-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/profile.sml 2005-11-14 23:03:16 UTC (rev 4217) @@ -10,6 +10,8 @@ structure P = Primitive.MLton.Profile +val gcState = Primitive.GCState.gcState + val isOn = P.isOn structure Data = @@ -43,7 +45,7 @@ if equals (d, d') then ac else d' :: ac) [] (!all) - ; P.Data.free raw + ; P.Data.free (gcState, raw) ; isFreed := true) fun make (raw: P.Data.t): t = @@ -55,7 +57,7 @@ let val array = if isOn - then P.Data.malloc () + then P.Data.malloc gcState else P.Data.dummy val d = make array val _ = all := d :: !all @@ -79,7 +81,7 @@ creat (file, flags [irusr, iwusr, irgrp, iwgrp, iroth, iwoth]) end - val _ = P.Data.write (raw, Posix.FileSys.fdToWord fd) + val _ = P.Data.write (gcState, raw, Posix.FileSys.fdToWord fd) val _ = Posix.IO.close fd in () @@ -102,7 +104,7 @@ val _ = ic := false val _ = isCurrent := true val _ = r := d - val _ = P.setCurrent raw + val _ = P.setCurrent (gcState, raw) in () end @@ -115,7 +117,7 @@ DynamicWind.wind (f, fn () => setCurrent old) end -fun init () = setCurrent (Data.make (P.current ())) +fun init () = setCurrent (Data.make (P.getCurrent gcState)) val _ = if not isOn @@ -127,7 +129,8 @@ (Cleaner.atExit, fn () => (P.done () ; Data.write (current (), "mlmon.out") - ; List.app (P.Data.free o Data.raw) (!Data.all))) + ; List.app (fn d => P.Data.free (gcState, Data.raw d)) + (!Data.all))) val _ = Cleaner.addNew (Cleaner.atLoadWorld, fn () => Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/thread.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/thread.sml 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/thread.sml 2005-11-14 23:03:16 UTC (rev 4217) @@ -10,6 +10,8 @@ structure Prim = Primitive.Thread +val gcState = Primitive.GCState.gcState + structure AtomicState = struct datatype t = NonAtomic | Atomic of int @@ -68,7 +70,7 @@ val () = Prim.copyCurrent () in case !func of - NONE => Prim.savedPre () + NONE => Prim.savedPre gcState | SOME x => (* This branch never returns. *) let @@ -107,7 +109,7 @@ val r : (unit -> 'a) ref = ref (fn () => die "Thread.atomicSwitch didn't set r.\n") val t: 'a thread ref = - ref (Paused (fn x => r := x, Prim.current ())) + ref (Paused (fn x => r := x, Prim.current gcState)) fun fail e = (t := Dead ; switching := false ; atomicEnd () @@ -170,9 +172,9 @@ let (* Atomic 1 *) val _ = state := InHandler - val t = f (fromPrimitive (Prim.saved ())) + val t = f (fromPrimitive (Prim.saved gcState)) val _ = state := Normal - val _ = Prim.finishSignalHandler () + val _ = Prim.finishSignalHandler gcState val _ = atomicSwitch (fn (T r) => @@ -192,7 +194,7 @@ (new (fn () => loop () handle e => MLtonExn.topLevelHandler e)) val _ = signalHandler := SOME p in - Prim.setSignalHandler p + Prim.setSignalHandler (gcState, p) end fun switchToSignalHandler () = @@ -200,7 +202,7 @@ (* Atomic 0 *) val () = atomicBegin () (* Atomic 1 *) - val () = Prim.startSignalHandler () (* implicit atomicBegin () *) + val () = Prim.startSignalHandler gcState (* implicit atomicBegin () *) (* Atomic 2 *) in case !signalHandler of @@ -220,7 +222,7 @@ fun loop (): unit = let (* Atomic 2 *) - val t = Prim.saved () + val t = Prim.saved gcState fun doit () = let (* Atomic 1 *) @@ -233,7 +235,7 @@ ; MLtonExn.topLevelHandler e) (* atomicBegin() before putting res *) (* Atomic 1 *) - val _ = Prim.setSaved t + val _ = Prim.setSaved (gcState, t) val _ = Prim.returnToC () (* implicit atomicEnd() *) in () @@ -243,7 +245,7 @@ loop () end val p = toPrimitive (new (fn () => loop ())) - val _ = Prim.setCallFromCHandler p + val _ = Prim.setCallFromCHandler (gcState, p) in fn (i, f) => Array.update (exports, i, f) end Modified: mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/basis-library/mlton/world.sml 2005-11-14 23:03:16 UTC (rev 4217) @@ -9,6 +9,8 @@ structure MLtonWorld: MLTON_WORLD = struct structure Prim = Primitive.World + + val gcState = Primitive.GCState.gcState datatype status = Clone | Original @@ -39,9 +41,9 @@ end val _ = Prim.save (Posix.FileSys.fdToWord fd) in - if Prim.isOriginal () + if Prim.getAmOriginal gcState then (Posix.IO.close fd; Original) - else (Prim.makeOriginal () + else (Prim.setAmOriginal (gcState, true) ; Cleaner.clean Cleaner.atLoadWorld ; Clone) end Modified: mlton/branches/on-20050822-x86_64-branch/mlprof/main.sml =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlprof/main.sml 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/mlprof/main.sml 2005-11-14 23:03:16 UTC (rev 4217) @@ -116,12 +116,12 @@ Process.callWithIn (OS.Path.mkAbsolute {path = afile, relativeTo = OS.FileSys.getDir ()}, - ["@MLton", "show-prof"], + ["@MLton", "show-sources"], fn ins => let fun line () = case In.inputLine ins of - NONE => Error.bug "unexpected end of show-prof data" + NONE => Error.bug "unexpected end of show-sources data" | SOME l => l val magic = valOf (Word.fromString (line ())) fun vector (f: string -> 'a): 'a vector = Modified: mlton/branches/on-20050822-x86_64-branch/mlton/backend/profile.fun =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/backend/profile.fun 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/mlton/backend/profile.fun 2005-11-14 23:03:16 UTC (rev 4217) @@ -630,7 +630,7 @@ add (#1 (enter (pushes, si))) in case target of - Direct "GC_gc" => doit SourceInfo.gc + Direct "GC_collect" => doit SourceInfo.gc | Direct "GC_arrayAllocate" => doit SourceInfo.gcArrayAllocate | Direct "MLton_bug" => add pushes Modified: mlton/branches/on-20050822-x86_64-branch/mlton/backend/rep-type.fun =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/backend/rep-type.fun 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/mlton/backend/rep-type.fun 2005-11-14 23:03:16 UTC (rev 4217) @@ -512,7 +512,7 @@ end, readsStackTop = true, return = unit, - target = Direct "GC_gc", + target = Direct "GC_collect", writesStackTop = true} val t = make true val f = make false 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-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/mlton/backend/ssa-to-rssa.fun 2005-11-14 23:03:16 UTC (rev 4217) @@ -91,7 +91,7 @@ writesStackTop = true} val exit = - T {args = Vector.new1 Word32, + T {args = Vector.new2 (GCState, Word32), bytesNeeded = NONE, convention = Cdecl, ensuresBytesFree = false, @@ -101,7 +101,7 @@ prototype = let open CType in - (Vector.new1 Word32, NONE) + (Vector.new2 (Pointer, Word32), NONE) end, readsStackTop = true, return = unit, @@ -146,7 +146,7 @@ writesStackTop = true} val threadSwitchTo = - T {args = Vector.new2 (Type.thread, Word32), + T {args = Vector.new3 (gcState, Type.thread, Word32), bytesNeeded = NONE, convention = Cdecl, ensuresBytesFree = true, @@ -156,7 +156,7 @@ prototype = let open CType in - (Vector.new2 (Pointer, Word32), NONE) + (Vector.new3 (Pointer, Pointer, Word32), NONE) end, readsStackTop = true, return = unit, @@ -236,7 +236,7 @@ writesStackTop = true} fun share t = - T {args = Vector.new1 t, + T {args = Vector.new2 (gcState, t), bytesNeeded = NONE, convention = Cdecl, ensuresBytesFree = false, @@ -246,22 +246,30 @@ prototype = let open CType in - (Vector.new1 Pointer, NONE) + (Vector.new2 (Pointer, Pointer), NONE) end, readsStackTop = false, return = unit, - target = Direct "MLton_share", + target = Direct "GC_share", writesStackTop = false} fun size t = - vanilla {args = Vector.new1 t, - name = "MLton_size", - prototype = let - open CType - in - (Vector.new1 Pointer, SOME Word32) - end, - return = Word32} + T {args = Vector.new2 (gcState, t), + bytesNeeded = NONE, + convention = Cdecl, + ensuresBytesFree = false, + mayGC = false, + maySwitchThreads = false, + modifiesFrontier = false, + prototype = let + open CType + in + (Vector.new2 (Pointer, Pointer), NONE) + end, + readsStackTop = false, + return = Word32, + target = Direct "GC_size", + writesStackTop = false} end structure Name = @@ -913,9 +921,12 @@ in case Prim.name prim of MLton_halt => - ([], Transfer.CCall {args = vos args, - func = CFunction.exit, - return = NONE}) + ([], + Transfer.CCall + {args = Vector.concat [Vector.new1 GCState, + vos args], + func = CFunction.exit, + return = NONE}) | Thread_copyCurrent => let val func = CFunction.copyCurrentThread @@ -1090,6 +1101,11 @@ fun simpleCCall (f: CFunction.t) = ccall {args = vos args, func = f} + fun simpleCCallWithGCState (f: CFuntion.t) = + ccall {args = Vector.concat + (Vector.new1 GCState, + vos args), + func = f} fun array (numElts: Operand.t) = let val result = valOf (toRtype ty) @@ -1200,10 +1216,10 @@ if not (Type.isPointer t) then none () else - simpleCCall (CFunction.share - (Operand.ty (a 0)))) + simpleCCallWithGCState + (CFunction.share (Operand.ty (a 0))) | MLton_size => - simpleCCall + simpleCCallWithGCState (CFunction.size (Operand.ty (a 0))) | MLton_touch => let @@ -1334,45 +1350,31 @@ | Thread_canHandle => move (Runtime GCField.CanHandle) | Thread_copy => - ccall {args = (Vector.concat - [Vector.new1 GCState, - vos args]), - func = CFunction.copyThread} + simpleCCallWithGCState + CFunction.copyThread | Thread_switchTo => - ccall {args = (Vector.new2 - (a 0, EnsuresBytesFree)), + ccall {args = (Vector.new3 + (GCState, + a 0, + EnsuresBytesFree)), func = CFunction.threadSwitchTo} | Vector_length => arrayOrVectorLength () | Weak_canGet => ifIsWeakPointer (varType (arg 0), fn _ => - let - val func = - CFunction.weakCanGet - {arg = Operand.ty (a 0)} - in - ccall {args = (Vector.new2 - (GCState, - Vector.sub (vos args, 0))), - func = func} - end, + simpleCCallWithGCState + (CFunction.weakCanGet + {arg = Operand.ty (a 0)}), fn () => move (Operand.bool false)) | Weak_get => ifIsWeakPointer (varType (arg 0), fn t => - let - val func = - CFunction.weakGet - {arg = Operand.ty (a 0), - return = t} - in - ccall {args = (Vector.new2 - (GCState, - Vector.sub (vos args, 0))), - func = func} - end, + simpleCCallWithGCState + (CFunction.weakGet + {arg = Operand.ty (a 0), + return = t}), none) | Weak_new => ifIsWeakPointer @@ -1385,15 +1387,11 @@ (case Type.dePointer result of NONE => Error.bug "SsaToRssa.translateStatementsTransfer: PrimApp,Weak_new" | SOME pt => pt) - val func = - CFunction.weakNew {arg = t, - return = result} in - ccall {args = (Vector.concat - [Vector.new2 - (GCState, header), - vos args]), - func = func} + simpleCCallWithGCState + (CFunction.weakNew + {arg = t, + return = result}) end, none) | Word_equal s => @@ -1431,10 +1429,8 @@ src = a 2}) | Word8Vector_subWord => subWord () | World_save => - ccall {args = (Vector.new2 - (GCState, - Vector.sub (vos args, 0))), - func = CFunction.worldSave} + simpleCCallWithGCState + CFunction.worldSave | _ => codegenOrC prim end | S.Exp.Select {base, offset} => Modified: mlton/branches/on-20050822-x86_64-branch/mlton/codegen/x86-codegen/x86-mlton-basic.fun =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/codegen/x86-codegen/x86-mlton-basic.fun 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/mlton/codegen/x86-codegen/x86-mlton-basic.fun 2005-11-14 23:03:16 UTC (rev 4217) @@ -400,7 +400,7 @@ val fileNameLabel = Label.fromString "fileName" val fileName = Operand.immediate_label fileNameLabel (* This is a hack: The line number needs to be pushed, but the actual - * call to GC_gc is about 9 lines further (push 4 more arguments, + * call to GC_collect is about 9 lines further (push 4 more arguments, * adjust stackTop, save return label, * save gcState.frontier and gcState.stackTop, make call). * However, there are probably cases where this is different. Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c 2005-11-14 23:03:16 UTC (rev 4217) @@ -41,7 +41,7 @@ assert(not isSmall(arg)); bp = (GC_intInf)(arg - offsetof(struct GC_intInf, isneg)); if (DEBUG_INT_INF) - fprintf (stderr, "bp->header = 0x%08x\n", bp->header); + fprintf (stderr, "bp->header = "FMTHDR"\n", bp->header); assert (bp->header == GC_intInfHeader ()); return bp; } @@ -265,7 +265,7 @@ shary(pointer arg, uint shift, uint bytes, void(*shop)(__mpz_struct *resmpz, __gmp_const __mpz_struct *argspace, - ulong shift)) + unsigned long shift)) { __mpz_struct argmpz, resmpz; @@ -273,7 +273,7 @@ initRes(&resmpz, bytes); fill(arg, &argmpz, argspace); - shop(&resmpz, &argmpz, (ulong)shift); + shop(&resmpz, &argmpz, (unsigned long)shift); return answer (&resmpz, bytes); } Deleted: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/exit.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/exit.c 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/exit.c 2005-11-14 23:03:16 UTC (rev 4217) @@ -1,8 +0,0 @@ -#include "platform.h" - -extern struct GC_state gcState; - -void MLton_exit (Int status) { - GC_done (&gcState); - exit (status); -} Deleted: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/gc.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/gc.c 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/gc.c 2005-11-14 23:03:16 UTC (rev 4217) @@ -1,29 +0,0 @@ -#define _ISOC99_SOURCE - -#include "platform.h" - -extern struct GC_state gcState; - -void MLton_GC_setHashConsDuringGC (Int b) { - GC_setHashConsDuringGC (&gcState, b); -} - -void MLton_GC_setMessages (Int b) { - GC_setMessages (&gcState, b); -} - -void MLton_GC_setSummary (Int b) { - GC_setSummary (&gcState, b); -} - -void MLton_GC_setRusageMeasureGC (Int b) { - GC_setRusageMeasureGC (&gcState, b); -} - -void MLton_GC_pack (void) { - GC_pack (&gcState); -} - -void MLton_GC_unpack (void) { - GC_unpack (&gcState); -} Deleted: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/profile.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/profile.c 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/profile.c 2005-11-14 23:03:16 UTC (rev 4217) @@ -1,43 +0,0 @@ -#include "platform.h" - -#ifndef DEBUG_PROFILE -#define DEBUG_PROFILE FALSE -#endif - -extern struct GC_state gcState; - -void MLton_Profile_Data_free (Pointer p) { - GC_profileFree (&gcState, (GC_profileData)p); -} - -Pointer MLton_Profile_Data_malloc (void) { - return (Pointer)GC_profileNew (&gcState); -} - -void MLton_Profile_Data_write (Pointer p, Word fd) { - if (DEBUG_PROFILE) - fprintf (stderr, "MLton_Profile_Data_write ("FMTPTR")\n", - (uintptr_t)p); - GC_profileWrite (&gcState, (GC_profileData)p, (int)fd); -} - -Pointer MLton_Profile_current (void) { - Pointer res; - - res = (Pointer)(GC_getProfileCurrent (&gcState)); - if (DEBUG_PROFILE) - fprintf (stderr, FMTPTR" = MLton_Profile_current ()\n", - (uintptr_t)res); - return res; -} - -void MLton_Profile_setCurrent (Pointer d) { - if (DEBUG_PROFILE) - fprintf (stderr, "MLton_Profile_setCurrent ("FMTPTR")\n", - (uintptr_t)d); - GC_setProfileCurrent (&gcState, (GC_profileData)d); -} - -void MLton_Profile_done () { - GC_profileDone (&gcState); -} Deleted: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/share.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/share.c 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/share.c 2005-11-14 23:03:16 UTC (rev 4217) @@ -1,7 +0,0 @@ -#include "platform.h" - -extern struct GC_state gcState; - -void MLton_share (Pointer p) { - GC_share (&gcState, p); -} Deleted: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/size.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/size.c 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/size.c 2005-11-14 23:03:16 UTC (rev 4217) @@ -1,7 +0,0 @@ -#include "platform.h" - -extern struct GC_state gcState; - -Word MLton_size(Pointer p) { - return GC_size(&gcState, p); -} Deleted: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/thread.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/thread.c 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/thread.c 2005-11-14 23:03:16 UTC (rev 4217) @@ -1,57 +0,0 @@ -#include "platform.h" - -extern struct GC_state gcState; - -enum { - DEBUG_THREAD = FALSE, -}; - -Pointer Thread_current () { - Pointer t; - - t = (Pointer)(GC_getCurrentThread (&gcState)); - if (DEBUG_THREAD) - fprintf (stderr, FMTPTR" = Thread_current ()\n", - (uintptr_t)t); - return t; -} - -void Thread_finishSignalHandler () { - GC_finishSignalHandler (&gcState); -} - -Pointer Thread_saved () { - Pointer t; - - t = (Pointer)(GC_getSavedThread (&gcState)); - if (DEBUG_THREAD) - fprintf (stderr, FMTPTR" = Thread_saved ()\n", - (uintptr_t)t); - return t; -} - -void Thread_setCallFromCHandler (Pointer t) { - GC_setCallFromCHandlerThread (&gcState, (GC_thread)t); -} - -void Thread_setSaved (Pointer t) { - if (DEBUG_THREAD) - fprintf (stderr, "Thread_setSaved ("FMTPTR")\n", - (uintptr_t)t); - GC_setSavedThread (&gcState, (GC_thread)t); -} - -void Thread_setSignalHandler (Pointer t) { - GC_setSignalHandlerThread (&gcState, (GC_thread)t); -} - -void Thread_startSignalHandler () { - GC_startSignalHandler (&gcState); -} - -void Thread_switchTo (Pointer t, Word ensureBytesFree) { - if (DEBUG_THREAD) - fprintf (stderr, "Thread_switchTo ("FMTPTR", %u)\n", - (uintptr_t)t, (uint)ensureBytesFree); - GC_switchToThread (&gcState, (GC_thread)t, ensureBytesFree); -} Deleted: mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/world.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/world.c 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/MLton/world.c 2005-11-14 23:03:16 UTC (rev 4217) @@ -1,11 +0,0 @@ -#include "platform.h" - -extern struct GC_state gcState; - -Bool World_isOriginal(void) { - return (Bool)(GC_getAmOriginal (&gcState)); -} - -void World_makeOriginal(void) { - GC_setAmOriginal (&gcState, TRUE); -} Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.c 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.c 2005-11-14 23:03:16 UTC (rev 4217) @@ -176,10 +176,10 @@ assert (hasHeapBytesFree (s, oldGenBytesRequested, nurseryBytesRequested)); } -void GC_gc (GC_state s, size_t bytesRequested, bool force, +void GC_collect (GC_state s, size_t bytesRequested, bool force, char *file, int line) { if (DEBUG or s->controls.messages) - fprintf (stderr, "%s %d: GC_gc\n", file, line); + fprintf (stderr, "%s %d: GC_collect\n", file, line); enter (s); /* When the mutator requests zero bytes, it may actually need as * much as GC_HEAP_LIMIT_SLOP. Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.h 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.h 2005-11-14 23:03:16 UTC (rev 4217) @@ -22,7 +22,7 @@ static void ensureHasHeapBytesFree (GC_state s, size_t oldGenBytesRequested, size_t nurseryBytesRequested); -void GC_gc (GC_state s, size_t bytesRequested, bool force, - char *file, int line); +void GC_collect (GC_state s, size_t bytesRequested, bool force, + char *file, int line); #endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform.c 2005-11-14 03:41:13 UTC (rev 4216) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform.c 2005-11-14 23:03:16 UTC (rev 4217) @@ -27,3 +27,7 @@ CommandLine_argv = (uint)(argv + start); } +void MLton_exit (Int status, GC_state s) { + GC_done (s); + exit (status); +} |
From: Matthew F. <fl...@ml...> - 2005-11-13 19:41:44
|
Making internal GC functions static ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/Makefile U mlton/branches/on-20050822-x86_64-branch/include/main.h U mlton/branches/on-20050822-x86_64-branch/mlton/main/lookup-constant.fun U mlton/branches/on-20050822-x86_64-branch/runtime/Makefile U mlton/branches/on-20050822-x86_64-branch/runtime/Posix/Signal.c U mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/align.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/align.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/array-allocate.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/array.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/array.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/atomic.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/call-stack.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/cheney-copy.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/controls.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/copy-thread.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/current.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/dfs-mark.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/enter_leave.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/exports.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/foreach.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/forward.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/frame.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/handler.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/hash-cons.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/init-world.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.h A mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/invariant.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/major.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/mark-compact.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/model.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/new-object.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/object-size.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/object.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/objptr.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/pointer.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/rusage.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/signals.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/stack.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/statistics.h A mlton/branches/on-20050822-x86_64-branch/runtime/gc/string.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/string.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/switch-thread.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/sysvals.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/thread.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/translate.h D mlton/branches/on-20050822-x86_64-branch/runtime/gc/util.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/weak.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc/world.h U mlton/branches/on-20050822-x86_64-branch/runtime/gc.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc.h ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/Makefile 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/Makefile 2005-11-14 03:41:13 UTC (rev 4216) @@ -16,7 +16,6 @@ LIB = $(BUILD)/lib INC = $(LIB)/include COMP = $(SRC)/mlton -RUN = $(SRC)/runtime MLTON = $(BIN)/mlton AOUT = mlton-compile ifeq (mingw, $(TARGET_OS)) @@ -274,15 +273,16 @@ runtime: @echo 'Compiling MLton runtime system for $(TARGET).' $(MAKE) -C runtime - $(CP) $(RUN)/*.a $(LIB)/$(TARGET)/ - $(CP) runtime/*.h include/*.h $(INC)/ + $(CP) include/*.h $(INC)/ + $(CP) runtime/*.a $(LIB)/$(TARGET)/ mkdir -p $(INC)/gc mkdir -p $(INC)/util mkdir -p $(INC)/platform - $(CP) bytecode/interpret.h $(INC) + $(CP) runtime/*.h $(INC)/ $(CP) runtime/gc/*.h $(INC)/gc $(CP) runtime/util/*.h $(INC)/util $(CP) runtime/platform/*.h $(INC)/platform + $(CP) bytecode/interpret.h $(INC) $(MAKE) -C bytecode bytecode/print-opcodes >$(LIB)/opcodes ar r $(LIB)/$(TARGET)/libmlton.a bytecode/interpret.o Modified: mlton/branches/on-20050822-x86_64-branch/include/main.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/include/main.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/include/main.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -9,9 +9,8 @@ #ifndef _MAIN_H_ #define _MAIN_H_ -#define MLTON_GC_INTERNAL +#define MLTON_GC_INTERNAL_TYPES #include "platform.h" -#undef MLTON_GC_INTERNAL /* The label must be declared as weak because gcc's optimizer may prove that * the code that declares the label is dead and hence eliminate the declaration. Modified: mlton/branches/on-20050822-x86_64-branch/mlton/main/lookup-constant.fun =================================================================== --- mlton/branches/on-20050822-x86_64-branch/mlton/main/lookup-constant.fun 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/mlton/main/lookup-constant.fun 2005-11-14 03:41:13 UTC (rev 4216) @@ -73,7 +73,7 @@ in List.foreach (List.concat - [["#define MLTON_GC_INTERNAL", + [["#define MLTON_GC_INTERNAL_TYPES", "#include \"platform.h\"", "struct GC_state gcState;", "", Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2005-11-14 03:41:13 UTC (rev 4216) @@ -62,12 +62,11 @@ -Wmissing-noreturn -Wmissing-format-attribute \ -Wpacked \ -Wredundant-decls \ - -Wnested-externs \ - -Winline -Wdisabled-optimization + -Wnested-externs # -Wshadow \ # -Wmissing-prototypes \ # -Wmissing-declarations -OPTWARNFLAGS = $(WARNFLAGS) +OPTWARNFLAGS = $(WARNFLAGS) -Winline -Wdisabled-optimization DEBUGWARNFLAGS = $(WARNFLAGS) -Wunused UTILCFILES = \ @@ -183,9 +182,9 @@ # with -fno-strict-aliasing to prevent gcc from taking advantage of # this aspect of the C spec. basis/Real/%-gdb.o: basis/Real/%.c gdtoa/arith.h - $(CC) $(DEBUGCFLAGS) -c -o $@ $< + $(CC) $(DEBUGCFLAGS) $(DEBUGWARNFLAGS) -Wno-redundant-decls -c -o $@ $< basis/Real/%.o: basis/Real/%.c gdtoa/arith.h - $(CC) $(OPTCFLAGS) -O1 -fno-strict-aliasing -c -o $@ $< + $(CC) $(OPTCFLAGS) -O1 -fno-strict-aliasing $(OPTWARNFLAGS) -Wno-redundant-decls -c -o $@ $< %-gdb.o: %.c $(HFILES) $(CC) $(DEBUGCFLAGS) -c -o $@ $< Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Posix/Signal.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Posix/Signal.c 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Posix/Signal.c 2005-11-14 03:41:13 UTC (rev 4216) @@ -44,7 +44,7 @@ sigaddset (GC_getSignalsHandledAddr (&gcState), signum); memset (&sa, 0, sizeof(sa)); /* The mask must be full because GC_handler reads and writes - * s->signalsPending (else there is a race condition). + * s->signalsPending (else there is a race condition). */ sigfillset (&sa.sa_mask); sa.sa_handler = handler; Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/IntInf.c 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,9 +6,9 @@ * See the file MLton-LICENSE for details. */ -#define MLTON_GC_INTERNAL +#define MLTON_GC_INTERNAL_TYPES +#define MLTON_GC_INTERNAL_INTINF #include "platform.h" -#undef MLTON_GC_INTERNAL enum { DEBUG_INT_INF = FALSE, @@ -42,7 +42,7 @@ bp = (GC_intInf)(arg - offsetof(struct GC_intInf, isneg)); if (DEBUG_INT_INF) fprintf (stderr, "bp->header = 0x%08x\n", bp->header); - assert (bp->header == GC_INTINF_HEADER); + assert (bp->header == GC_intInfHeader ()); return bp; } @@ -109,7 +109,7 @@ } static inline void setFrontier (pointer p, uint bytes) { - p = alignFrontier (&gcState, p); + p = GC_alignFrontier (&gcState, p); assert (p - gcState.frontier <= bytes); GC_profileAllocInc (&gcState, p - gcState.frontier); gcState.frontier = p; @@ -162,7 +162,7 @@ setFrontier ((pointer)(&bp->limbs[size]), bytes); bp->counter = 0; bp->length = size + 1; /* +1 for isNeg word */ - bp->header = GC_INTINF_HEADER; + bp->header = GC_intInfHeader (); return (pointer)&bp->isneg; } @@ -364,7 +364,7 @@ } sp->counter = 0; sp->length = size; - sp->header = GC_STRING_HEADER; + sp->header = GC_stringHeader (); setFrontier ((pointer)(&sp->chars[align(size, 4)]), bytes); return (pointer)str; } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/align.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/align.c 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/align.c 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,7 +6,7 @@ * See the file MLton-LICENSE for details. */ -static inline size_t alignWithExtra (GC_state s, size_t bytes, size_t extra) { +size_t alignWithExtra (GC_state s, size_t bytes, size_t extra) { return align (bytes + extra, s->alignment) - extra; } @@ -25,3 +25,7 @@ assert (isFrontierAligned (s, (pointer)res)); return (pointer)res; } + +pointer GC_alignFrontier (GC_state s, pointer p) { + return alignFrontier (s, p); +} Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/align.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/align.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/align.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,5 +6,12 @@ * See the file MLton-LICENSE for details. */ -bool isFrontierAligned (GC_state s, pointer p); -pointer alignFrontier (GC_state s, pointer p); +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static size_t alignWithExtra (GC_state s, size_t bytes, size_t extra); +static bool isFrontierAligned (GC_state s, pointer p); +static pointer alignFrontier (GC_state s, pointer p); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ + +pointer GC_alignFrontier (GC_state s, pointer p); Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/array-allocate.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/array-allocate.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/array-allocate.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,7 +6,11 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + pointer GC_arrayAllocate (GC_state s, size_t ensureBytesFree, GC_arrayLength numElements, GC_header header); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/array.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/array.c 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/array.c 2005-11-14 03:41:13 UTC (rev 4216) @@ -24,6 +24,10 @@ return *(getArrayLengthp (a)); } +uintmax_t GC_getArrayLength (pointer a) { + return ((uintmax_t)(getArrayLength (a))); +} + /* getArrayCounterp (p) * * Returns a pointer to the counter for the array pointed to by p. @@ -60,8 +64,3 @@ + bytesNonObjptrs + (pointerIndex * OBJPTR_SIZE); } - - -GC_arrayLength GC_getArrayLength (pointer a) { - return getArrayLength (a); -} Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/array.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/array.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/array.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,6 +6,8 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + /* * Array objects have the following layout: * @@ -28,10 +30,18 @@ #define FMTARRCTR "%"PRIxARRCTR #define GC_ARRAY_HEADER_SIZE (GC_ARRAY_COUNTER_SIZE + GC_ARRAY_LENGTH_SIZE + GC_HEADER_SIZE) -GC_arrayLength* getArrayLengthp (pointer a); -GC_arrayLength getArrayLength (pointer a); -GC_arrayCounter* getArrayCounterp (pointer a); -GC_arrayCounter getArrayCounter (pointer a); -pointer indexArrayAtPointerIndex (GC_state s, pointer a, - GC_arrayCounter arrayIndex, - uint32_t pointerIndex); +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ + +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static inline GC_arrayLength* getArrayLengthp (pointer a); +static inline GC_arrayLength getArrayLength (pointer a); +static inline GC_arrayCounter* getArrayCounterp (pointer a); +static inline GC_arrayCounter getArrayCounter (pointer a); +static pointer indexArrayAtPointerIndex (GC_state s, pointer a, + GC_arrayCounter arrayIndex, + uint32_t pointerIndex); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ + +uintmax_t GC_getArrayLength (pointer a); Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/atomic.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/atomic.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/atomic.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,5 +6,9 @@ * See the file MLton-LICENSE for details. */ -void beginAtomic (GC_state s); -void endAtomic (GC_state s); +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static void beginAtomic (GC_state s); +static void endAtomic (GC_state s); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/call-stack.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/call-stack.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/call-stack.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,11 +6,19 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + struct GC_callStackState { uint32_t numStackFrames; uint32_t *callStack; }; +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ + +#if (defined (MLTON_GC_INTERNAL_BASIS)) + uint32_t GC_numStackFrames (GC_state s); void GC_callStack (GC_state s, pointer p); uint32_t* GC_frameIndexSourceSeq (GC_state s, GC_frameIndex frameIndex); + +#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/cheney-copy.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/cheney-copy.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/cheney-copy.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,7 +6,11 @@ * See the file MLton-LICENSE for details. */ -void updateWeaksForCheneyCopy (GC_state s); -void swapHeapsForCheneyCopy (GC_state s); -void majorCheneyCopyGC (GC_state s); -void minorCheneyCopyGC (GC_state s); +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static void updateWeaksForCheneyCopy (GC_state s); +static void swapHeapsForCheneyCopy (GC_state s); +static void majorCheneyCopyGC (GC_state s); +static void minorCheneyCopyGC (GC_state s); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/controls.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/controls.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/controls.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,6 +6,8 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + struct GC_ratios { /* Minimum live ratio to use copying GC. */ float copy; @@ -44,5 +46,11 @@ bool summary; /* Print a summary of gc info when program exits. */ }; -bool detailedGCTime (GC_state s); -bool needGCTime (GC_state s); +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ + +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static bool detailedGCTime (GC_state s); +static bool needGCTime (GC_state s); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/copy-thread.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/copy-thread.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/copy-thread.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,6 +6,15 @@ * See the file MLton-LICENSE for details. */ -GC_thread copyThread (GC_state s, GC_thread from, size_t size); +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static GC_thread copyThread (GC_state s, GC_thread from, size_t size); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ + +#if (defined (MLTON_GC_INTERNAL_BASIS)) + void GC_copyCurrentThread (GC_state s); pointer GC_copyThread (GC_state s, pointer p); + +#endif /* (defined (MLTON_GC_INTERNAL_BASIS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/current.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/current.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/current.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,7 +6,11 @@ * See the file MLton-LICENSE for details. */ -objptr getThreadCurrentObjptr (GC_state s); -GC_thread getThreadCurrent (GC_state s); -objptr getStackCurrentObjptr (GC_state s); -GC_stack getStackCurrent (GC_state s); +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static objptr getThreadCurrentObjptr (GC_state s); +static GC_thread getThreadCurrent (GC_state s); +static objptr getStackCurrentObjptr (GC_state s); +static GC_stack getStackCurrent (GC_state s); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/dfs-mark.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/dfs-mark.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/dfs-mark.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,15 +6,23 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + typedef enum { MARK_MODE, UNMARK_MODE, } GC_markMode; -bool isPointerMarked (pointer p); -bool isPointerMarkedByMode (pointer p, GC_markMode m); -size_t dfsMarkByMode (GC_state s, pointer root, - GC_markMode mode, bool shouldHashCons); -void dfsMarkWithHashCons (GC_state s, objptr *opp); -void dfsMarkWithoutHashCons (GC_state s, objptr *opp); -void dfsUnmark (GC_state s, objptr *opp); +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ + +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static bool isPointerMarked (pointer p); +static bool isPointerMarkedByMode (pointer p, GC_markMode m); +static size_t dfsMarkByMode (GC_state s, pointer root, + GC_markMode mode, bool shouldHashCons); +static void dfsMarkWithHashCons (GC_state s, objptr *opp); +static void dfsMarkWithoutHashCons (GC_state s, objptr *opp); +static void dfsUnmark (GC_state s, objptr *opp); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/enter_leave.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/enter_leave.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/enter_leave.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,5 +6,9 @@ * See the file MLton-LICENSE for details. */ -void enter (GC_state s); -void leave (GC_state s); +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static void enter (GC_state s); +static void leave (GC_state s); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/exports.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/exports.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/exports.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,10 +6,6 @@ * See the file MLton-LICENSE for details. */ -uint32_t GC_getArrayLength (pointer a); - -void GC_handler (GC_state s, int signum); - void GC_pack (GC_state s); void GC_unpack (GC_state s); @@ -17,25 +13,6 @@ size_t GC_size (GC_state s, pointer root); -void GC_startSignalHandler (GC_state s); -void GC_finishSignalHandler (GC_state s); -void GC_switchToThread (GC_state s, GC_thread t, size_t ensureBytesFree); - - -GC_profileData GC_getProfileCurrent (GC_state s); -void GC_setProfileCurrent (GC_state s, GC_profileData p); - -void GC_profileFree (GC_state s, GC_profileData p); -GC_profileData GC_profileNew (GC_state s); -void GC_profileWrite (GC_state s, GC_profileData p, int fd); - -void GC_profileDone (GC_state s); - -void GC_handleSigProf (pointer pc); - - -void GC_saveWorld (GC_state s, int fd); - int GC_init (GC_state s, int argc, char **argv); void GC_done (GC_state s); Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/foreach.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/foreach.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/foreach.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,14 +6,16 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + typedef void (*GC_foreachObjptrFun) (GC_state s, objptr *opp); -void callIfIsObjptr (GC_state s, GC_foreachObjptrFun f, objptr *opp); +static void callIfIsObjptr (GC_state s, GC_foreachObjptrFun f, objptr *opp); /* foreachGlobalObjptr (s, f) * * Apply f to each global object pointer into the heap. */ -void foreachGlobalObjptr (GC_state s, GC_foreachObjptrFun f); +static void foreachGlobalObjptr (GC_state s, GC_foreachObjptrFun f); /* foreachObjptrInObject (s, p, skipWeaks, f) * * Applies f to each object pointer in the object pointed to by p. @@ -21,8 +23,8 @@ * * If skipWeaks, then the object pointer in weak objects is skipped. */ -pointer foreachObjptrInObject (GC_state s, pointer p, - GC_foreachObjptrFun f, bool skipWeaks); +static pointer foreachObjptrInObject (GC_state s, pointer p, + GC_foreachObjptrFun f, bool skipWeaks); /* foreachObjptrInRange (s, front, back, f, skipWeaks) * * Apply f to each pointer between front and *back, which should be a @@ -34,8 +36,8 @@ * * If skipWeaks, then the object pointer in weak objects is skipped. */ -pointer foreachObjptrInRange (GC_state s, pointer front, pointer *back, - GC_foreachObjptrFun f, bool skipWeaks); +static pointer foreachObjptrInRange (GC_state s, pointer front, pointer *back, + GC_foreachObjptrFun f, bool skipWeaks); typedef void (*GC_foreachStackFrameFun) (GC_state s, GC_frameIndex i); @@ -44,4 +46,6 @@ * * Apply f to the frame index of each frame in the current stack. */ -void foreachStackFrame (GC_state s, GC_foreachStackFrameFun f); +static void foreachStackFrame (GC_state s, GC_foreachStackFrameFun f); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/forward.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/forward.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/forward.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,6 +6,8 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + struct GC_forwardState { bool amInMinorGC; pointer back; @@ -15,8 +17,14 @@ #define GC_FORWARDED ~((GC_header)0) -bool isPointerInToSpace (GC_state s, pointer p); -bool isObjptrInToSpace (GC_state s, objptr op); -void forwardObjptr (GC_state s, objptr *opp); -void forwardObjptrIfInNursery (GC_state s, objptr *opp); -void forwardInterGenerationalObjptrs (GC_state s); +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ + +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static bool isPointerInToSpace (GC_state s, pointer p); +static bool isObjptrInToSpace (GC_state s, objptr op); +static void forwardObjptr (GC_state s, objptr *opp); +static void forwardObjptrIfInNursery (GC_state s, objptr *opp); +static void forwardInterGenerationalObjptrs (GC_state s); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/frame.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/frame.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/frame.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,6 +6,8 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + /* * The "... reserved bytes ..." of a stack object constitute a linear * sequence of frames. For the purposes of garbage collection, we @@ -45,6 +47,12 @@ #define GC_RETURNADDRESS_SIZE sizeof(GC_returnAddress) #define FMTRA "0x%016"PRIxPTR -GC_frameIndex getFrameIndexFromReturnAddress (GC_state s, GC_returnAddress ra); -GC_frameLayout getFrameLayoutFromFrameIndex (GC_state s, GC_frameIndex index); -GC_frameLayout getFrameLayoutFromReturnAddress (GC_state s, GC_returnAddress ra); +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ + +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static GC_frameIndex getFrameIndexFromReturnAddress (GC_state s, GC_returnAddress ra); +static GC_frameLayout getFrameLayoutFromFrameIndex (GC_state s, GC_frameIndex index); +static GC_frameLayout getFrameLayoutFromReturnAddress (GC_state s, GC_returnAddress ra); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,19 +6,23 @@ * See the file MLton-LICENSE for details. */ -void minorGC (GC_state s); -void majorGC (GC_state s, size_t bytesRequested, bool mayResize); -void growStackCurrent (GC_state s); -void enterGC (GC_state s); -void leaveGC (GC_state s); -void performGC (GC_state s, - size_t oldGenBytesRequested, - size_t nurseryBytesRequested, - bool forceMajor, - bool mayResize); -void ensureInvariantForMutator (GC_state s, bool force); -void ensureHasHeapBytesFree (GC_state s, - size_t oldGenBytesRequested, - size_t nurseryBytesRequested); +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static void minorGC (GC_state s); +static void majorGC (GC_state s, size_t bytesRequested, bool mayResize); +static void growStackCurrent (GC_state s); +static void enterGC (GC_state s); +static void leaveGC (GC_state s); +static void performGC (GC_state s, + size_t oldGenBytesRequested, + size_t nurseryBytesRequested, + bool forceMajor, + bool mayResize); +static void ensureInvariantForMutator (GC_state s, bool force); +static void ensureHasHeapBytesFree (GC_state s, + size_t oldGenBytesRequested, + size_t nurseryBytesRequested); void GC_gc (GC_state s, size_t bytesRequested, bool force, char *file, int line); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,6 +6,8 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + struct GC_state { size_t alignment; /* */ bool amInGC; @@ -61,10 +63,16 @@ GC_weak weaks; /* Linked list of (live) weak pointers */ }; -void displayGCState (GC_state s, FILE *stream); +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ -size_t sizeofGCStateCurrentStackUsed (GC_state s); -void setGCStateCurrentThreadAndStack (GC_state s); -void setGCStateCurrentHeap (GC_state s, - size_t oldGenBytesRequested, - size_t nurseryBytesRequested); +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static void displayGCState (GC_state s, FILE *stream); + +static size_t sizeofGCStateCurrentStackUsed (GC_state s); +static void setGCStateCurrentThreadAndStack (GC_state s); +static void setGCStateCurrentHeap (GC_state s, + size_t oldGenBytesRequested, + size_t nurseryBytesRequested); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,6 +6,8 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + /* must agree w/ cardSizeLog2 in ssa-to-rssa.fun */ #define CARD_SIZE_LOG2 8 #define CARD_SIZE TWOPOWER(CARD_SIZE_LOG2) @@ -46,25 +48,31 @@ size_t crossMapValidSize; }; -void displayGenerationalMaps (GC_state s, - struct GC_generationalMaps *generational, - FILE *stream); +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ -GC_cardMapIndex pointerToCardMapIndexAbsolute (pointer p); -GC_cardMapIndex sizeToCardMapIndex (size_t z); -size_t cardMapIndexToSize (GC_cardMapIndex i); -pointer pointerToCardMapAddr (GC_state s, pointer p); +#if (defined (MLTON_GC_INTERNAL_FUNCS)) -bool isCardMarked (GC_state s, pointer p); -void markCard (GC_state s, pointer p); +static void displayGenerationalMaps (GC_state s, + struct GC_generationalMaps *generational, + FILE *stream); -void setCardMapAbsolute (GC_state s); -pointer getCrossMapCardStart (GC_state s, pointer p); +static GC_cardMapIndex pointerToCardMapIndexAbsolute (pointer p); +static GC_cardMapIndex sizeToCardMapIndex (size_t z); +static size_t cardMapIndexToSize (GC_cardMapIndex i); +static pointer pointerToCardMapAddr (GC_state s, pointer p); -void clearCardMap (GC_state s); -void clearCrossMap (GC_state s); -void createCardMapAndCrossMap (GC_state s); -void resizeCardMapAndCrossMap (GC_state s); +static bool isCardMarked (GC_state s, pointer p); +static void markCard (GC_state s, pointer p); -bool isCrossMapOk (GC_state s); -void updateCrossMap (GC_state s); +static void setCardMapAbsolute (GC_state s); +static pointer getCrossMapCardStart (GC_state s, pointer p); + +static void clearCardMap (GC_state s); +static void clearCrossMap (GC_state s); +static void createCardMapAndCrossMap (GC_state s); +static void resizeCardMapAndCrossMap (GC_state s); + +static bool isCrossMapOk (GC_state s); +static void updateCrossMap (GC_state s); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/handler.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/handler.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/handler.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,4 +6,12 @@ * See the file MLton-LICENSE for details. */ -void switchToSignalHandlerThreadIfNonAtomicAndSignalPending (GC_state s); +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static void switchToSignalHandlerThreadIfNonAtomicAndSignalPending (GC_state s); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ + +void GC_startSignalHandler (GC_state s); +void GC_finishSignalHandler (GC_state s); +void GC_handler (GC_state s, int signum); Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/hash-cons.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/hash-cons.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/hash-cons.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,6 +6,8 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + /* ---------------------------------------------------------------- */ /* Object hash consing */ /* ---------------------------------------------------------------- */ @@ -29,15 +31,21 @@ bool mayInsert; } *GC_objectHashTable; -GC_objectHashTable allocHashTable (GC_state s); -void freeHashTable (GC_objectHashTable t); +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ -pointer insertHashTableElem (GC_state s, - GC_objectHashTable t, GC_hash hash, - pointer object, pointer max, bool mightBeThere); -void growHashTableMaybe (GC_state s, GC_objectHashTable t); +#if (defined (MLTON_GC_INTERNAL_FUNCS)) -pointer hashConsPointer (GC_state s, pointer object, bool countBytesHashConsed); -void shareObjptr (GC_state s, objptr *opp); +static GC_objectHashTable allocHashTable (GC_state s); +static void freeHashTable (GC_objectHashTable t); -void printBytesHashConsedMessage (GC_state s, uintmax_t total); +static pointer insertHashTableElem (GC_state s, + GC_objectHashTable t, GC_hash hash, + pointer object, pointer max, bool mightBeThere); +static void growHashTableMaybe (GC_state s, GC_objectHashTable t); + +static pointer hashConsPointer (GC_state s, pointer object, bool countBytesHashConsed); +static void shareObjptr (GC_state s, objptr *opp); + +static void printBytesHashConsedMessage (GC_state s, uintmax_t total); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,6 +6,8 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + /* * All ML objects (including ML execution stacks) are allocated in a * contiguous heap. The heap has the following general layout: @@ -28,27 +30,32 @@ #define GC_HEAP_LIMIT_SLOP 512 -bool isPointerInHeap (GC_state s, pointer p); -bool isPointerInOldGen (GC_state s, pointer p); -bool isPointerInNursery (GC_state s, pointer p); -bool isPointerInFromSpace (GC_state s, pointer p); -bool isObjptrInHeap (GC_state s, objptr op); -bool isObjptrInOldGen (GC_state s, objptr op); -bool isObjptrInNursery (GC_state s, objptr op); -bool isObjptrInFromSpace (GC_state s, objptr op); -bool hasHeapBytesFree (GC_state s, size_t oldGen, size_t nursery); -bool isHeapInit (GC_heap h); +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ -void displayHeap (GC_state s, GC_heap heap, FILE *stream); -void initHeap (GC_state s, GC_heap h); -size_t sizeofHeapDesired (GC_state s, size_t live, size_t currentSize); +#if (defined (MLTON_GC_INTERNAL_FUNCS)) -void releaseHeap (GC_state s, GC_heap h); -void shrinkHeap (GC_state s, GC_heap h, size_t keep); -bool createHeap (GC_state s, GC_heap h, size_t desiredSize, size_t minSize); -bool createHeapSecondary (GC_state s, size_t desiredSize); -bool remapHeap (GC_state s, GC_heap h, size_t desiredSize, size_t minSize); -void growHeap (GC_state s, size_t desiredSize, size_t minSize); -void resizeHeap (GC_state s, size_t minSize); -void resizeHeapSecondary (GC_state s); +static bool isPointerInHeap (GC_state s, pointer p); +static bool isPointerInOldGen (GC_state s, pointer p); +static bool isPointerInNursery (GC_state s, pointer p); +static bool isPointerInFromSpace (GC_state s, pointer p); +static bool isObjptrInHeap (GC_state s, objptr op); +static bool isObjptrInOldGen (GC_state s, objptr op); +static bool isObjptrInNursery (GC_state s, objptr op); +static bool isObjptrInFromSpace (GC_state s, objptr op); +static bool hasHeapBytesFree (GC_state s, size_t oldGen, size_t nursery); +static bool isHeapInit (GC_heap h); +static void displayHeap (GC_state s, GC_heap heap, FILE *stream); +static void initHeap (GC_state s, GC_heap h); +static size_t sizeofHeapDesired (GC_state s, size_t live, size_t currentSize); + +static void releaseHeap (GC_state s, GC_heap h); +static void shrinkHeap (GC_state s, GC_heap h, size_t keep); +static bool createHeap (GC_state s, GC_heap h, size_t desiredSize, size_t minSize); +static bool createHeapSecondary (GC_state s, size_t desiredSize); +static bool remapHeap (GC_state s, GC_heap h, size_t desiredSize, size_t minSize); +static void growHeap (GC_state s, size_t desiredSize, size_t minSize); +static void resizeHeap (GC_state s, size_t minSize); +static void resizeHeapSecondary (GC_state s); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/init-world.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/init-world.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/init-world.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,6 +6,8 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + /* GC_init uses the array of struct intInfInits in s at program start * to allocate intInfs. * The globalIndex'th entry of the globals array in s is set to the @@ -30,7 +32,13 @@ GC_arrayLength numElements; }; -size_t sizeofInitialBytesLive (GC_state s); -void initIntInfs (GC_state s); -void initVectors (GC_state s); -void initWorld (GC_state s); +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ + +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static size_t sizeofInitialBytesLive (GC_state s); +static void initIntInfs (GC_state s); +static void initVectors (GC_state s); +static void initWorld (GC_state s); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,5 +6,9 @@ * See the file MLton-LICENSE for details. */ -int processAtMLton (GC_state s, int argc, - char **argv, char **worldFile); +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static int processAtMLton (GC_state s, int argc, + char **argv, char **worldFile); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Copied: mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c (from rev 4206, mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.h) =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.h 2005-11-12 04:22:23 UTC (rev 4206) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c 2005-11-14 03:41:13 UTC (rev 4216) @@ -0,0 +1,11 @@ +/* Copyright (C) 1999-2005 Henry Cejtin, Matthew Fluet, Suresh + * Jagannathan, and Stephen Weeks. + * Copyright (C) 1997-2000 NEC Research Institute. + * + * MLton is released under a BSD-style license. + * See the file MLton-LICENSE for details. + */ + +GC_header GC_intInfHeader (void) { + return GC_INTINF_HEADER; +} Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,6 +6,8 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + /* Layout of intInfs. * Note, the value passed around is a pointer to the isneg member. */ @@ -17,4 +19,16 @@ uint32_t limbs[1]; } *GC_intInf; +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ + +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + #define GC_INTINF_HEADER GC_WORD32_VECTOR_HEADER + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ + +#if (defined (MLTON_GC_INTERNAL_INTINF)) + +GC_header GC_intInfHeader (void); + +#endif /* (defined (MLTON_GC_INTERNAL_INTINF)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/invariant.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/invariant.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/invariant.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,8 +6,12 @@ * See the file MLton-LICENSE for details. */ -void assertIsObjptrInFromSpace (GC_state s, objptr *opp); -bool invariantForGC (GC_state s); -bool invariantForMutatorFrontier (GC_state s); -bool invariantForMutatorStack (GC_state s); -bool invariantForMutator (GC_state s, bool frontier, bool stack); +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static void assertIsObjptrInFromSpace (GC_state s, objptr *opp); +static bool invariantForGC (GC_state s); +static bool invariantForMutatorFrontier (GC_state s); +static bool invariantForMutatorStack (GC_state s); +static bool invariantForMutator (GC_state s, bool frontier, bool stack); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/major.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/major.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/major.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,7 +6,11 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + typedef enum { GC_COPYING, GC_MARK_COMPACT, } GC_majorKind; + +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/mark-compact.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/mark-compact.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/mark-compact.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,9 +6,13 @@ * See the file MLton-LICENSE for details. */ -void copyForThreadInternal (pointer dst, pointer src); -void threadInternalObjptr (GC_state s, objptr *opp); -void clearIfWeakAndUnmarkedForMarkCompact (GC_state s, pointer p); -void updateForwardPointersForMarkCompact (GC_state s); -void updateBackwardPointersAndSlideForMarkCompact (GC_state s); -void majorMarkCompactGC (GC_state s); +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static void copyForThreadInternal (pointer dst, pointer src); +static void threadInternalObjptr (GC_state s, objptr *opp); +static void clearIfWeakAndUnmarkedForMarkCompact (GC_state s, pointer p); +static void updateForwardPointersForMarkCompact (GC_state s); +static void updateBackwardPointersAndSlideForMarkCompact (GC_state s); +static void majorMarkCompactGC (GC_state s); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/model.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/model.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/model.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -5,6 +5,8 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + /* Consider the following schemes for representing object pointers and mapping them to 64-bit native pointers. @@ -205,3 +207,5 @@ #endif #define GC_MODEL_NONOBJPTR ((GC_MODEL_MINALIGN_SHIFT - GC_MODEL_SHIFT) > 0) #define GC_MODEL_MINALIGN TWOPOWER(GC_MODEL_MINALIGN_SHIFT) + +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/new-object.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/new-object.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/new-object.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,7 +6,11 @@ * See the file MLton-LICENSE for details. */ -pointer newObject (GC_state s, GC_header header, - size_t bytesRequested, bool allocInOldGen); -GC_stack newStack (GC_state s, size_t reserved, bool allocInOldGen); -GC_thread newThread (GC_state s, size_t stackSize); +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static pointer newObject (GC_state s, GC_header header, + size_t bytesRequested, bool allocInOldGen); +static GC_stack newStack (GC_state s, size_t reserved, bool allocInOldGen); +static GC_thread newThread (GC_state s, size_t stackSize); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/object-size.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/object-size.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/object-size.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,8 +6,12 @@ * See the file MLton-LICENSE for details. */ -size_t sizeofArrayNoHeader (GC_state s, GC_arrayLength numElements, - uint16_t numNonObjptrs, uint16_t numObjptrs); -size_t sizeofStackNoHeader (GC_state s, GC_stack stack); +#if (defined (MLTON_GC_INTERNAL_FUNCS)) -size_t sizeofObject (GC_state s, pointer p); +static size_t sizeofArrayNoHeader (GC_state s, GC_arrayLength numElements, + uint16_t numNonObjptrs, uint16_t numObjptrs); +static size_t sizeofStackNoHeader (GC_state s, GC_stack stack); + +static size_t sizeofObject (GC_state s, pointer p); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/object.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/object.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/object.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,6 +6,8 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + /* * There are four kinds of ML objects: * array, normal (fixed size), stack, and weak. @@ -17,8 +19,17 @@ WEAK_TAG, } GC_objectTypeTag; -const char* objectTypeTagToString (GC_objectTypeTag tag); +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static const char* objectTypeTagToString (GC_objectTypeTag tag); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ + + +#if (defined (MLTON_GC_INTERNAL_TYPES)) + /* * Each object has a header, which immediately precedes the object data. * A header has the following bit layout: @@ -44,10 +55,19 @@ #define MARK_MASK 0x80000000 #define MARK_SHIFT 31 -GC_header* getHeaderp (pointer p); -GC_header getHeader (pointer p); -GC_header buildHeaderFromTypeIndex (uint32_t t); +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static GC_header* getHeaderp (pointer p); +static GC_header getHeader (pointer p); +static GC_header buildHeaderFromTypeIndex (uint32_t t); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ + + +#if (defined (MLTON_GC_INTERNAL_TYPES)) + /* * Normal objects have the following layout: * @@ -64,6 +84,9 @@ */ #define GC_NORMAL_HEADER_SIZE GC_HEADER_SIZE +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ + + /* Array objects are described in "array.h" */ /* Stack objects are described in "stack.h" */ @@ -71,6 +94,8 @@ /* Weak objects are described in "weak.h" */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + /* * The type index of a header is an index into an array of object * types, where each element describes the layout of an object. The @@ -109,6 +134,10 @@ WORD16_VECTOR_TYPE_INDEX = 5, }; +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ + +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + #define GC_STACK_HEADER buildHeaderFromTypeIndex (STACK_TYPE_INDEX) #define GC_THREAD_HEADER buildHeaderFromTypeIndex (THREAD_TYPE_INDEX) #define GC_WEAK_GONE_HEADER buildHeaderFromTypeIndex (WEAK_GONE_TYPE_INDEX) @@ -116,9 +145,9 @@ #define GC_WORD16_VECTOR_HEADER buildHeaderFromTypeIndex (WORD16_VECTOR_TYPE_INDEX) #define GC_WORD32_VECTOR_HEADER buildHeaderFromTypeIndex (WORD32_VECTOR_TYPE_INDEX) -void splitHeader (GC_state s, GC_header header, - GC_objectTypeTag *tagRet, bool *hasIdentityRet, - uint16_t *bytesNonObjptrsRet, uint16_t *numObjptrsRet); +static void splitHeader (GC_state s, GC_header header, + GC_objectTypeTag *tagRet, bool *hasIdentityRet, + uint16_t *bytesNonObjptrsRet, uint16_t *numObjptrsRet); +static pointer advanceToObjectData (GC_state s, pointer p); -pointer advanceToObjectData (GC_state s, pointer p); - +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/objptr.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/objptr.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/objptr.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -5,6 +5,8 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + #define OBJPTR_TYPE__(z) uint ## z ## _t #define OBJPTR_TYPE_(z) OBJPTR_TYPE__(z) #define OBJPTR_TYPE OBJPTR_TYPE_(GC_MODEL_BITSIZE) @@ -21,8 +23,14 @@ #error gc model does not admit bogus object pointer #endif -bool isObjptr (objptr p); -pointer objptrToPointer (objptr O, pointer B); -objptr pointerToObjptr (pointer P, pointer B); -pointer fetchObjptrToPointer (pointer OP, pointer B); -void storeObjptrFromPointer (pointer OP, pointer P, pointer B); +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ + +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static bool isObjptr (objptr p); +static pointer objptrToPointer (objptr O, pointer B); +static objptr pointerToObjptr (pointer P, pointer B); +static pointer fetchObjptrToPointer (pointer OP, pointer B); +static void storeObjptrFromPointer (pointer OP, pointer P, pointer B); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/pointer.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/pointer.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/pointer.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,6 +6,10 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + #define BOGUS_POINTER (pointer)0x1 -bool isPointer (pointer p); +static bool isPointer (pointer p); + +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.c 2005-11-14 03:41:13 UTC (rev 4216) @@ -7,7 +7,8 @@ */ GC_profileMasterIndex sourceIndexToProfileMasterIndex (GC_state s, - GC_sourceIndex i) { + GC_sourceIndex i) + { return s->sourceMaps.sources[i].sourceNameIndex + s->sourceMaps.sourcesLength; } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/profiling.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,6 +6,8 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + typedef enum { PROFILE_ALLOC, PROFILE_COUNT, @@ -68,18 +70,48 @@ bool stack; }; -void enterSourceForProfiling (GC_state s, GC_profileMasterIndex i); -void enterForProfiling (GC_state s, GC_sourceSeqIndex sourceSeqIndex); -void enterFrameForProfiling (GC_state s, GC_frameIndex i); +#else + +struct GC_profileData; +typedef struct GC_profileData *GC_profileData; + +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ + +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static GC_profileMasterIndex sourceIndexToProfileMasterIndex (GC_state s, GC_sourceIndex i); +static GC_sourceNameIndex profileMasterIndexToSourceNameIndex (GC_state s, GC_profileMasterIndex i); +static GC_profileStack getProfileStackInfo (GC_state s, GC_profileMasterIndex i); + +static void addToStackForProfiling (GC_state s, GC_profileMasterIndex i); +static void enterSourceForProfiling (GC_state s, GC_profileMasterIndex i); +static void enterForProfiling (GC_state s, GC_sourceSeqIndex sourceSeqIndex); +static void enterFrameForProfiling (GC_state s, GC_frameIndex i); + +static void removeFromStackForProfiling (GC_state s, GC_profileMasterIndex i); +static void leaveSourceForProfiling (GC_state s, GC_profileMasterIndex i); +static void leaveForProfiling (GC_state s, GC_sourceSeqIndex sourceSeqIndex); +static void leaveFrameForProfiling (GC_state s, GC_frameIndex i); + +static void profileInc (GC_state s, size_t amount, GC_sourceSeqIndex sourceSeqIndex); + +static void setProfTimer (long usec); +static void initProfiling (GC_state s); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ + void GC_profileEnter (GC_state s); - -void leaveSourceForProfiling (GC_state s, GC_profileMasterIndex i); -void leaveForProfiling (GC_state s, GC_sourceSeqIndex sourceSeqIndex); -void leaveFrameForProfiling (GC_state s, GC_frameIndex i); void GC_profileLeave (GC_state s); - void GC_profileInc (GC_state s, size_t amount); void GC_profileAllocInc (GC_state s, size_t amount); -void initProfiling (GC_state s); +GC_profileData GC_getProfileCurrent (GC_state s); +void GC_setProfileCurrent (GC_state s, GC_profileData p); +GC_profileData GC_profileNew (GC_state s); +void GC_profileWrite (GC_state s, GC_profileData p, int fd); +void GC_profileFree (GC_state s, GC_profileData p); + +void GC_profileDone (GC_state s); + +void GC_handleSigProf (pointer pc); Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/rusage.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/rusage.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/rusage.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,14 +6,14 @@ * See the file MLton-LICENSE for details. */ -void rusageZero (struct rusage *ru); -void rusagePlusMax (struct rusage *ru1, - struct rusage *ru2, - struct rusage *ru); -void rusageMinusMax (struct rusage *ru1, - struct rusage *ru2, - struct rusage *ru); -uintmax_t rusageTime (struct rusage *ru); -uintmax_t getCurrentTime (void); -void startTiming (struct rusage *ru_start); -uintmax_t stopTiming (struct rusage *ru_start, struct rusage *ru_gc); +static void rusageZero (struct rusage *ru); +static void rusagePlusMax (struct rusage *ru1, + struct rusage *ru2, + struct rusage *ru); +static void rusageMinusMax (struct rusage *ru1, + struct rusage *ru2, + struct rusage *ru); +static uintmax_t rusageTime (struct rusage *ru); +static uintmax_t getCurrentTime (void); +static void startTiming (struct rusage *ru_start); +static uintmax_t stopTiming (struct rusage *ru_start, struct rusage *ru_gc); Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/signals.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/signals.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/signals.h 2005-11-14 03:41:13 UTC (rev 4216) @@ -6,6 +6,8 @@ * See the file MLton-LICENSE for details. */ +#if (defined (MLTON_GC_INTERNAL_TYPES)) + struct GC_signalsInfo { /* TRUE iff a signal handler is running. */ bool amInSignalHandler; @@ -25,4 +27,10 @@ sigset_t signalsPending; }; -void initSignalStack (GC_state s); +#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ + +#if (defined (MLTON_GC_INTERNAL_FUNCS)) + +static void initSignalStack (GC_state s); + +#endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.h =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.h 2005-11-14 02:05:37 UTC (rev 4215) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/sources.h 20... [truncated message content] |
From: Matthew F. <fl...@ml...> - 2005-11-13 18:05:39
|
Record fix of cyclic mlb files bug ---------------------------------------------------------------------- U mlton/trunk/doc/changelog ---------------------------------------------------------------------- Modified: mlton/trunk/doc/changelog =================================================================== --- mlton/trunk/doc/changelog 2005-11-12 21:35:34 UTC (rev 4214) +++ mlton/trunk/doc/changelog 2005-11-14 02:05:37 UTC (rev 4215) @@ -1,5 +1,10 @@ Here are the changes since version 20041109. +* 2005-11-11 + - Fixed a bug in the interleaving of lexing/parsing and elaborating of + ML Basis files, which would raise an unhandled Force exception on + cyclic basis references. Thanks to John Dias for the bug report. + * 2005-11-10 - Fixed two bugs in Time.scan. One would raise Time on a string with a large fractional component. Thanks to Carsten Varming for the bug |
From: Matthew F. <fl...@ml...> - 2005-11-12 13:35:36
|
Interleaving lex/parse with elaboration through the use of Promise.t could result in a Force exception for cyclic MLBs. ---------------------------------------------------------------------- U mlton/trunk/mlton/elaborate/elaborate-mlbs.fun ---------------------------------------------------------------------- Modified: mlton/trunk/mlton/elaborate/elaborate-mlbs.fun =================================================================== --- mlton/trunk/mlton/elaborate/elaborate-mlbs.fun 2005-11-12 20:54:25 UTC (rev 4213) +++ mlton/trunk/mlton/elaborate/elaborate-mlbs.fun 2005-11-12 21:35:34 UTC (rev 4214) @@ -187,6 +187,12 @@ (fileAbs, B) end) val B = Promise.force B + handle Promise.Force => + (* Basis forms a cycle; + * force the AST to generate error message. + *) + (ignore (Promise.force basdec) + ; #2 (Env.makeBasis (E, fn () => ()))) in Env.openBasis (E, B) end |
From: Matthew F. <fl...@ml...> - 2005-11-12 12:54:26
|
Drop some warnings ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/Makefile ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2005-11-12 20:28:15 UTC (rev 4212) +++ mlton/branches/on-20050822-x86_64-branch/runtime/Makefile 2005-11-12 20:54:25 UTC (rev 4213) @@ -62,8 +62,8 @@ -Wmissing-noreturn -Wmissing-format-attribute \ -Wpacked \ -Wredundant-decls \ - -Wnested-externs -# -Winline -Wdisabled-optimization + -Wnested-externs \ + -Winline -Wdisabled-optimization # -Wshadow \ # -Wmissing-prototypes \ # -Wmissing-declarations @@ -166,7 +166,7 @@ types.h: gen/gen-types.c util.h $(UTILOFILES) rm -f types.h - $(CC) $(OPTCFLAGS) $(OPTWARNFLAGS) -o gen-types gen/gen-types.c $(UTILOFILES) + $(CC) $(OPTCFLAGS) $(OPTWARNFLAGS) -Wno-inline -Wno-disabled-optimization -o gen-types gen/gen-types.c $(UTILOFILES) ./gen-types rm -f gen-types @@ -183,9 +183,9 @@ # with -fno-strict-aliasing to prevent gcc from taking advantage of # this aspect of the C spec. basis/Real/%-gdb.o: basis/Real/%.c gdtoa/arith.h - $(CC) $(DEBUGCFLAGS) $(DEBUGWARNFLAGS) -c -o $@ $< + $(CC) $(DEBUGCFLAGS) -c -o $@ $< basis/Real/%.o: basis/Real/%.c gdtoa/arith.h - $(CC) $(OPTCFLAGS) $(OPTWARNFLAGS) -O1 -fno-strict-aliasing -c -o $@ $< + $(CC) $(OPTCFLAGS) -O1 -fno-strict-aliasing -c -o $@ $< %-gdb.o: %.c $(HFILES) $(CC) $(DEBUGCFLAGS) -c -o $@ $< |
From: Matthew F. <fl...@ml...> - 2005-11-12 12:28:27
|
Use uintmaxToCommaString ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/gc/array-allocate.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/cheney-copy.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/forward.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/hash-cons.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap_predicates.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/mark-compact.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/pack.c U mlton/branches/on-20050822-x86_64-branch/runtime/gc/translate.c ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/array-allocate.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/array-allocate.c 2005-11-12 20:11:58 UTC (rev 4211) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/array-allocate.c 2005-11-12 20:28:15 UTC (rev 4212) @@ -28,17 +28,17 @@ alignMax ((uintmax_t)bytesPerElement * (uintmax_t)numElements + GC_ARRAY_HEADER_SIZE, s->alignment); if (arraySizeMax >= (uintmax_t)SIZE_MAX) - die ("Out of memory: cannot allocate array with %"PRIuMAX" bytes.", - /*ullongToCommaString*/(arraySizeMax)); + die ("Out of memory: cannot allocate array with %s bytes.", + uintmaxToCommaString(arraySizeMax)); arraySize = (size_t)arraySizeMax; if (arraySize < GC_ARRAY_HEADER_SIZE + OBJPTR_SIZE) /* Create space for forwarding pointer. */ arraySize = GC_ARRAY_HEADER_SIZE + OBJPTR_SIZE; if (DEBUG_ARRAY) - fprintf (stderr, "array with "FMTARRLEN" elts of size %zu and total size %zu. Ensure %zu bytes free.\n", + fprintf (stderr, "array with "FMTARRLEN" elts of size %zu and total size %s. Ensure %s bytes free.\n", numElements, bytesPerElement, - /*uintToCommaString*/(arraySize), - /*uintToCommaString*/(ensureBytesFree)); + uintmaxToCommaString(arraySize), + uintmaxToCommaString(ensureBytesFree)); if (arraySize >= s->controls.oldGenArraySize) { if (not hasHeapBytesFree (s, arraySize, ensureBytesFree)) { enter (s); Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/cheney-copy.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/cheney-copy.c 2005-11-12 20:11:58 UTC (rev 4211) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/cheney-copy.c 2005-11-12 20:28:15 UTC (rev 4212) @@ -58,12 +58,12 @@ s->forwardState.toLimit = s->secondaryHeap.start + s->secondaryHeap.size; if (DEBUG or s->controls.messages) { fprintf (stderr, "Major copying GC.\n"); - fprintf (stderr, "fromSpace = "FMTPTR" of size %zu\n", + fprintf (stderr, "fromSpace = "FMTPTR" of size %s\n", (uintptr_t) s->heap.start, - /*uintToCommaString*/(s->heap.size)); - fprintf (stderr, "toSpace = "FMTPTR" of size %zu\n", + uintmaxToCommaString(s->heap.size)); + fprintf (stderr, "toSpace = "FMTPTR" of size %s\n", (uintptr_t) s->secondaryHeap.start, - /*uintToCommaString*/(s->secondaryHeap.size)); + uintmaxToCommaString(s->secondaryHeap.size)); } assert (s->secondaryHeap.start != (pointer)NULL); /* The next assert ensures there is enough space for the copy to @@ -80,8 +80,8 @@ s->secondaryHeap.oldGenSize = s->forwardState.back - s->secondaryHeap.start; s->cumulativeStatistics.bytesCopied += s->secondaryHeap.oldGenSize; if (DEBUG) - fprintf (stderr, "%zu bytes live.\n", - /*uintToCommaString*/(s->secondaryHeap.oldGenSize)); + fprintf (stderr, "%s bytes live.\n", + uintmaxToCommaString(s->secondaryHeap.oldGenSize)); swapHeapsForCheneyCopy (s); clearCrossMap (s); s->lastMajorStatistics.kind = GC_COPYING; @@ -140,7 +140,7 @@ if (detailedGCTime (s)) stopTiming (&ru_start, &s->cumulativeStatistics.ru_gcMinor); if (DEBUG_GENERATIONAL or s->controls.messages) - fprintf (stderr, "Minor GC done. %zu bytes copied.\n", - /*uintToCommaString*/(bytesCopied)); + fprintf (stderr, "Minor GC done. %s bytes copied.\n", + uintmaxToCommaString(bytesCopied)); } } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/forward.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/forward.c 2005-11-12 20:11:58 UTC (rev 4211) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/forward.c 2005-11-12 20:28:15 UTC (rev 4212) @@ -83,8 +83,8 @@ if (new <= stack->reserved) { stack->reserved = new; if (DEBUG_STACKS) - fprintf (stderr, "Shrinking stack to size %zu.\n", - /*uintToCommaString*/(stack->reserved)); + fprintf (stderr, "Shrinking stack to size %s.\n", + uintmaxToCommaString(stack->reserved)); } } } else { @@ -94,8 +94,8 @@ (s, max((size_t)(s->controls.ratios.threadShrink * stack->reserved), stack->used)); if (DEBUG_STACKS) - fprintf (stderr, "Shrinking stack to size %zu.\n", - /*uintToCommaString*/(stack->reserved)); + fprintf (stderr, "Shrinking stack to size %s.\n", + uintmaxToCommaString(stack->reserved)); } objectBytes = sizeof (struct GC_stack) + stack->used; skip = stack->reserved - stack->used; Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.c 2005-11-12 20:11:58 UTC (rev 4211) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/garbage-collection.c 2005-11-12 20:28:15 UTC (rev 4212) @@ -53,8 +53,8 @@ size = sizeofStackGrow (s, getStackCurrent(s)); if (DEBUG_STACKS or s->controls.messages) - fprintf (stderr, "Growing stack to size %zu.\n", - /*uintToCommaString*/(sizeofStackWithHeaderAligned (s, size))); + fprintf (stderr, "Growing stack to size %s.\n", + uintmaxToCommaString(sizeofStackWithHeaderAligned (s, size))); assert (hasHeapBytesFree (s, sizeofStackWithHeaderAligned (s, size), 0)); stack = newStack (s, size, TRUE); copyStack (s, getStackCurrent(s), stack); @@ -97,9 +97,9 @@ enterGC (s); if (DEBUG or s->controls.messages) - fprintf (stderr, "Starting gc. Request %zu nursery bytes and %zu old gen bytes.\n", - /*uintToCommaString*/(nurseryBytesRequested), - /*uintToCommaString*/(oldGenBytesRequested)); + fprintf (stderr, "Starting gc. Request %s nursery bytes and %s old-gen bytes.\n", + uintmaxToCommaString(nurseryBytesRequested), + uintmaxToCommaString(oldGenBytesRequested)); assert (invariantForGC (s)); if (needGCTime (s)) startTiming (&ru_start); @@ -131,9 +131,9 @@ gcTime = 0; /* Assign gcTime to quell gcc warning. */ if (DEBUG or s->controls.messages) { fprintf (stderr, "Finished gc.\n"); - fprintf (stderr, "time: %"PRIuMAX" ms\n", /*intToCommaString*/(gcTime)); - fprintf (stderr, "old gen size: %zu bytes (%.1f%%)\n", - /*intToCommaString*/(s->heap.oldGenSize), + fprintf (stderr, "time: %s ms\n", uintmaxToCommaString(gcTime)); + fprintf (stderr, "old gen size: %s bytes (%.1f%%)\n", + uintmaxToCommaString(s->heap.oldGenSize), 100.0 * ((double)(s->heap.oldGenSize) / (double)(s->heap.size))); } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.c 2005-11-12 20:11:58 UTC (rev 4211) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/gc_state.c 2005-11-12 20:28:15 UTC (rev 4212) @@ -51,9 +51,9 @@ size_t nurserySize; if (DEBUG_DETAILED) - fprintf (stderr, "setGCStateCurrentHeap(%zu, %zu)\n", - /*uintToCommaString*/(oldGenBytesRequested), - /*uintToCommaString*/(nurseryBytesRequested)); + fprintf (stderr, "setGCStateCurrentHeap(%s, %s)\n", + uintmaxToCommaString(oldGenBytesRequested), + uintmaxToCommaString(nurseryBytesRequested)); h = &s->heap; assert (isFrontierAligned (s, h->start + h->oldGenSize + oldGenBytesRequested)); nurserySize = h->size - h->oldGenSize - oldGenBytesRequested; Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.c 2005-11-12 20:11:58 UTC (rev 4211) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.c 2005-11-12 20:28:15 UTC (rev 4212) @@ -134,8 +134,8 @@ totalMapSize = cardMapSize + crossMapSize; if (DEBUG_MEM) - fprintf (stderr, "Creating card/cross map of size %zu\n", - /*uintToCommaString*/(totalMapSize)); + fprintf (stderr, "Creating card/cross map of size %s\n", + uintmaxToCommaString(totalMapSize)); s->generationalMaps.cardMap = GC_mmapAnon_safe (NULL, totalMapSize); s->generationalMaps.crossMap = Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/hash-cons.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/hash-cons.c 2005-11-12 20:11:58 UTC (rev 4211) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/hash-cons.c 2005-11-12 20:28:15 UTC (rev 4212) @@ -288,8 +288,8 @@ } void printBytesHashConsedMessage (GC_state s, uintmax_t total) { - fprintf (stderr, "%"PRIuMAX" bytes hash-consed (%.1f%%).\n", - /*ullongToCommaString*/(s->lastMajorStatistics.bytesHashConsed), + fprintf (stderr, "%s bytes hash-consed (%.1f%%).\n", + uintmaxToCommaString(s->lastMajorStatistics.bytesHashConsed), (100.0 * ((double)s->lastMajorStatistics.bytesHashConsed / (double)total))); Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.c 2005-11-12 20:11:58 UTC (rev 4211) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap.c 2005-11-12 20:28:15 UTC (rev 4212) @@ -88,20 +88,20 @@ else res = s->controls.fixedHeap / 2; if (res < live) - die ("Out of memory with fixed heap size %zu.", - /*uintToCommaString*/(s->controls.fixedHeap)); + die ("Out of memory with fixed heap size %s.", + uintmaxToCommaString(s->controls.fixedHeap)); } else if (s->controls.maxHeap > 0) { if (res > s->controls.maxHeap) res = s->controls.maxHeap; if (res < live) - die ("Out of memory with max heap size %zu.", - /*uintToCommaString*/(s->controls.maxHeap)); + die ("Out of memory with max heap size %s.", + uintmaxToCommaString(s->controls.maxHeap)); } if (DEBUG_RESIZING) - fprintf (stderr, "%zu = sizeofHeapDesired (%zu, %zu)\n", - /*uintToCommaString*/(res), - /*uintToCommaString*/(live), - /*uintToCommaString*/(currentSize)); + fprintf (stderr, "%s = sizeofHeapDesired (%s, %s)\n", + uintmaxToCommaString(res), + uintmaxToCommaString(live), + uintmaxToCommaString(currentSize)); assert (res >= live); return res; } @@ -110,9 +110,9 @@ if (NULL == h->start) return; if (DEBUG or s->controls.messages) - fprintf (stderr, "Releasing heap at "FMTPTR" of size %zu.\n", + fprintf (stderr, "Releasing heap at "FMTPTR" of size %s.\n", (uintptr_t)h->start, - /*uintToCommaString*/(h->size)); + uintmaxToCommaString(h->size)); GC_release (h->start, h->size); initHeap (s, h); } @@ -127,10 +127,10 @@ if (keep < h->size) { if (DEBUG or s->controls.messages) fprintf (stderr, - "Shrinking heap at "FMTPTR" of size %zu to %zu bytes.\n", + "Shrinking heap at "FMTPTR" of size %s to %s bytes.\n", (uintptr_t)h->start, - /*uintToCommaString*/(h->size), - /*uintToCommaString*/(keep)); + uintmaxToCommaString(h->size), + uintmaxToCommaString(keep)); GC_decommit (h->start + keep, h->size - keep); h->size = keep; } @@ -150,9 +150,9 @@ size_t backoff; if (DEBUG_MEM) - fprintf (stderr, "createHeap desired size = %zu min size = %zu\n", - /*uintToCommaString*/(desiredSize), - /*uintToCommaString*/(minSize)); + fprintf (stderr, "createHeap desired size = %s min size = %s\n", + uintmaxToCommaString(desiredSize), + uintmaxToCommaString(minSize)); assert (isHeapInit (h)); if (desiredSize < minSize) desiredSize = minSize; @@ -189,8 +189,8 @@ if (h->size > s->cumulativeStatistics.maxHeapSizeSeen) s->cumulativeStatistics.maxHeapSizeSeen = h->size; if (DEBUG or s->controls.messages) - fprintf (stderr, "Created heap of size %zu at "FMTPTR".\n", - /*uintToCommaString*/(h->size), + fprintf (stderr, "Created heap of size %s at "FMTPTR".\n", + uintmaxToCommaString(h->size), (uintptr_t)h->start); assert (h->size >= minSize); return TRUE; @@ -269,10 +269,10 @@ curHeapp = &s->heap; assert (desiredSize >= s->heap.size); if (DEBUG_RESIZING) - fprintf (stderr, "Growing heap at "FMTPTR" of size %zu to %zu bytes.\n", + fprintf (stderr, "Growing heap at "FMTPTR" of size %s to %s bytes.\n", (uintptr_t)s->heap.start, - /*uintToCommaString*/(s->heap.size), - /*uintToCommaString*/(desiredSize)); + uintmaxToCommaString(s->heap.size), + uintmaxToCommaString(desiredSize)); orig = curHeapp->start; size = curHeapp->oldGenSize; assert (size <= s->heap.size); @@ -341,8 +341,8 @@ unlink_safe (template); if (s->controls.messages) GC_displayMem (); - die ("Out of memory. Unable to allocate %zu bytes.\n", - /*uintToCommaString*/(minSize)); + die ("Out of memory. Unable to allocate %s bytes.\n", + uintmaxToCommaString(minSize)); } } done: @@ -358,9 +358,9 @@ size_t desiredSize; if (DEBUG_RESIZING) - fprintf (stderr, "resizeHeap minSize = %zu size = %zu\n", - /*ullongToCommaString*/(minSize), - /*uintToCommaString*/(s->heap.size)); + fprintf (stderr, "resizeHeap minSize = %s size = %s\n", + uintmaxToCommaString(minSize), + uintmaxToCommaString(s->heap.size)); desiredSize = sizeofHeapDesired (s, minSize, s->heap.size); assert (minSize <= desiredSize); if (desiredSize <= s->heap.size) Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap_predicates.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap_predicates.c 2005-11-12 20:11:58 UTC (rev 4211) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/heap_predicates.c 2005-11-12 20:28:15 UTC (rev 4212) @@ -67,10 +67,10 @@ (total <= s->heap.size) and (nursery <= (size_t)(s->limitPlusSlop - s->frontier)); if (DEBUG_DETAILED) - fprintf (stderr, "%s = hasBytesFree (%zu, %zu)\n", + fprintf (stderr, "%s = hasBytesFree (%s, %s)\n", boolToString (res), - /*uintToCommaString*/(oldGen), - /*uintToCommaString*/(nursery)); + uintmaxToCommaString(oldGen), + uintmaxToCommaString(nursery)); return res; } 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 20:11:58 UTC (rev 4211) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/init.c 2005-11-12 20:28:15 UTC (rev 4212) @@ -303,9 +303,9 @@ s->sysvals.ram = align ((size_t)(s->controls.ratios.ramSlop * s->sysvals.totalRam), s->sysvals.pageSize); if (DEBUG or DEBUG_RESIZING or s->controls.messages) - fprintf (stderr, "total RAM = %zu RAM = %zu\n", - /*uintToCommaString*/(s->sysvals.totalRam), - /*uintToCommaString*/(s->sysvals.ram)); + fprintf (stderr, "total RAM = %s RAM = %s\n", + uintmaxToCommaString(s->sysvals.totalRam), + uintmaxToCommaString(s->sysvals.ram)); if (DEBUG_SOURCES or DEBUG_PROFILE) { uint32_t i; for (i = 0; i < s->sourceMaps.frameSourcesLength; i++) { Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/mark-compact.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/mark-compact.c 2005-11-12 20:11:58 UTC (rev 4211) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/mark-compact.c 2005-11-12 20:28:15 UTC (rev 4212) @@ -286,9 +286,9 @@ s->cumulativeStatistics.numMarkCompactGCs++; if (DEBUG or s->controls.messages) { fprintf (stderr, "Major mark-compact GC.\n"); - fprintf (stderr, "heap = "FMTPTR" of size %zu\n", + fprintf (stderr, "heap = "FMTPTR" of size %s\n", (uintptr_t) s->heap.start, - /*uintToCommaString*/(s->heap.size)); + uintmaxToCommaString(s->heap.size)); } if (s->hashConsDuringGC) { s->lastMajorStatistics.bytesHashConsed = 0; Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/pack.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/pack.c 2005-11-12 20:11:58 UTC (rev 4211) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/pack.c 2005-11-12 20:28:15 UTC (rev 4212) @@ -11,8 +11,8 @@ enter (s); if (DEBUG or s->controls.messages) - fprintf (stderr, "Packing heap of size %zu.\n", - /*uintToCommaString*/(s->heap.size)); + fprintf (stderr, "Packing heap of size %s.\n", + uintmaxToCommaString(s->heap.size)); /* Could put some code here to skip the GC if there hasn't been much * allocated since the last collection. But you would still need to * do a minor GC to make all objects contiguous. @@ -26,16 +26,16 @@ } releaseHeap (s, &s->secondaryHeap); if (DEBUG or s->controls.messages) - fprintf (stderr, "Packed heap to size %zu.\n", - /*uintToCommaString*/(s->heap.size)); + fprintf (stderr, "Packed heap to size %s.\n", + uintmaxToCommaString(s->heap.size)); leave (s); } void GC_unpack (GC_state s) { enter (s); if (DEBUG or s->controls.messages) - fprintf (stderr, "Unpacking heap of size %zu.\n", - /*uintToCommaString*/(s->heap.size)); + fprintf (stderr, "Unpacking heap of size %s.\n", + uintmaxToCommaString(s->heap.size)); /* The enterGC is needed here because minorGC and resizeHeap might * move the stack, and the SIGPROF catcher would then see a bogus * stack. The leaveGC has to happen after the setStack. @@ -48,7 +48,7 @@ setGCStateCurrentThreadAndStack (s); leaveGC (s); if (DEBUG or s->controls.messages) - fprintf (stderr, "Unpacked heap to size %zu.\n", - /*uintToCommaString*/(s->heap.size)); + fprintf (stderr, "Unpacked heap to size %s.\n", + uintmaxToCommaString(s->heap.size)); leave (s); } Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/translate.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/translate.c 2005-11-12 20:11:58 UTC (rev 4211) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/translate.c 2005-11-12 20:28:15 UTC (rev 4212) @@ -31,8 +31,8 @@ pointer limit; if (DEBUG or s->controls.messages) - fprintf (stderr, "Translating heap of size %zu from "FMTPTR" to "FMTPTR".\n", - /*uintToCommaString*/(size), + fprintf (stderr, "Translating heap of size %s from "FMTPTR" to "FMTPTR".\n", + uintmaxToCommaString(size), (uintptr_t)from, (uintptr_t)to); if (from == to) return; |
From: Matthew F. <fl...@ml...> - 2005-11-12 12:11:59
|
Comments ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/gc/TODO ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/TODO =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/gc/TODO 2005-11-12 20:11:17 UTC (rev 4210) +++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/TODO 2005-11-12 20:11:58 UTC (rev 4211) @@ -1,6 +1,3 @@ -* fix semantics of numNonPointers for normal objects to mean bytes of - non-pointer data, rather than number of 32-bit words of - 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. * Why does hash-table use malloc/free while generational maps use mmap/munmap? |