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
(2) |
Oct
(3) |
Nov
|
Dec
|
|
From: Stephen W. <sw...@ml...> - 2006-09-28 03:47:39
|
Separated license (+disclaimer) from copyright. ---------------------------------------------------------------------- A mlton/trunk/doc/license/MLton-LICENSE-only ---------------------------------------------------------------------- Copied: mlton/trunk/doc/license/MLton-LICENSE-only (from rev 4712, mlton/trunk/doc/license/MLton-LICENSE) =================================================================== --- mlton/trunk/doc/license/MLton-LICENSE 2006-09-28 10:45:04 UTC (rev 4712) +++ mlton/trunk/doc/license/MLton-LICENSE-only 2006-09-28 10:47:38 UTC (rev 4713) @@ -0,0 +1,16 @@ +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both the copyright notice and this permission notice and warranty +disclaimer appear in supporting documentation, and that the name of +NEC, or any NEC entity not be used in advertising or publicity +pertaining to distribution of the software without specific, written +prior permission. + +NEC disclaims all warranties with regard to this software, including +all implied warranties of merchantability and fitness. In no event +shall NEC be liable for any special, indirect or consequential damages +or any damages whatsoever resulting from loss of use, data or profits, +whether in an action of contract, negligence or other tortious action, +arising out of or in connection with the use or performance of this +software. |
|
From: Stephen W. <sw...@ml...> - 2006-09-28 03:45:11
|
Separated license (+disclaimer) from copyright. ---------------------------------------------------------------------- A mlton/branches/on-20050822-x86_64-branch/doc/license/MLton-LICENSE-only ---------------------------------------------------------------------- Copied: mlton/branches/on-20050822-x86_64-branch/doc/license/MLton-LICENSE-only (from rev 4690, mlton/branches/on-20050822-x86_64-branch/doc/license/MLton-LICENSE) =================================================================== --- mlton/branches/on-20050822-x86_64-branch/doc/license/MLton-LICENSE 2006-08-04 05:48:22 UTC (rev 4690) +++ mlton/branches/on-20050822-x86_64-branch/doc/license/MLton-LICENSE-only 2006-09-28 10:45:04 UTC (rev 4712) @@ -0,0 +1,16 @@ +Permission to use, copy, modify, and distribute this software and its +documentation for any purpose and without fee is hereby granted, +provided that the above copyright notice appear in all copies and that +both the copyright notice and this permission notice and warranty +disclaimer appear in supporting documentation, and that the name of +NEC, or any NEC entity not be used in advertising or publicity +pertaining to distribution of the software without specific, written +prior permission. + +NEC disclaims all warranties with regard to this software, including +all implied warranties of merchantability and fitness. In no event +shall NEC be liable for any special, indirect or consequential damages +or any damages whatsoever resulting from loss of use, data or profits, +whether in an action of contract, negligence or other tortious action, +arising out of or in connection with the use or performance of this +software. |
|
From: Matthew F. <fl...@ml...> - 2006-09-27 15:02:41
|
Most of patch from Eric McCorkle <er...@sh...> for x86-darwin
support; haven't applied the more extensive changes to
include/x86-main.h, as I'm hoping that they are not needed with the
previous fix to the C calling convention code.
----------------------------------------------------------------------
U mlton/trunk/include/x86-main.h
U mlton/trunk/mlton/codegen/x86-codegen/x86-generate-transfers.fun
U mlton/trunk/mlton/codegen/x86-codegen/x86.fun
U mlton/trunk/mlton/main/main.fun
U mlton/trunk/runtime/platform/darwin.c
----------------------------------------------------------------------
Modified: mlton/trunk/include/x86-main.h
===================================================================
--- mlton/trunk/include/x86-main.h 2006-09-27 17:28:04 UTC (rev 4710)
+++ mlton/trunk/include/x86-main.h 2006-09-27 22:02:38 UTC (rev 4711)
@@ -49,7 +49,7 @@
#define DEBUG_X86CODEGEN FALSE
#endif
-#if (defined (__CYGWIN__) || defined (__MSVCRT__))
+#if (defined (__CYGWIN__) || defined (__Darwin__) || defined (__MSVCRT__))
#define ReturnToC "_Thread_returnToC"
#elif (defined (__FreeBSD__) || defined (__linux__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__sun__))
#define ReturnToC "Thread_returnToC"
Modified: mlton/trunk/mlton/codegen/x86-codegen/x86-generate-transfers.fun
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86-generate-transfers.fun 2006-09-27 17:28:04 UTC (rev 4710)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86-generate-transfers.fun 2006-09-27 22:02:38 UTC (rev 4711)
@@ -1155,6 +1155,22 @@
(AppendList.append (assembly_arg, assembly_args),
size_arg + size_args)
end)
+ val (pushArgs, size_args) =
+ let
+ val space = 16 - (size_args mod 16)
+ in
+ if space = 16
+ then (pushArgs, size_args)
+ else (AppendList.append
+ (AppendList.single
+ (Assembly.instruction_binal
+ {oper = Instruction.SUB,
+ dst = c_stackP,
+ src = Operand.immediate_const_int space,
+ size = pointerSize}),
+ pushArgs),
+ size_args + space)
+ end
val flush =
case frameInfo of
SOME (FrameInfo.T {size, ...}) =>
Modified: mlton/trunk/mlton/codegen/x86-codegen/x86.fun
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86.fun 2006-09-27 17:28:04 UTC (rev 4710)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86.fun 2006-09-27 22:02:38 UTC (rev 4711)
@@ -3509,7 +3509,7 @@
=> seq [str ".long ",
seq (separate(List.map (ls, Immediate.layout), ","))]
| String ss
- => seq [str ".string ",
+ => seq [str ".ascii ",
seq (separate(List.map
(ss,
fn s => seq [str "\"",
@@ -3517,7 +3517,7 @@
str "\""]),
","))]
| Global l
- => seq [str ".global ",
+ => seq [str ".globl ",
Label.layout l]
| Local l
=> seq [str ".local ",
Modified: mlton/trunk/mlton/main/main.fun
===================================================================
--- mlton/trunk/mlton/main/main.fun 2006-09-27 17:28:04 UTC (rev 4710)
+++ mlton/trunk/mlton/main/main.fun 2006-09-27 22:02:38 UTC (rev 4711)
@@ -566,6 +566,7 @@
val () =
Control.labelsHaveExtra_ := (case targetOS of
Cygwin => true
+ | Darwin => true
| MinGW => true
| _ => false)
val OSStr = String.toLower (MLton.Platform.OS.toString targetOS)
Modified: mlton/trunk/runtime/platform/darwin.c
===================================================================
--- mlton/trunk/runtime/platform/darwin.c 2006-09-27 17:28:04 UTC (rev 4710)
+++ mlton/trunk/runtime/platform/darwin.c 2006-09-27 22:02:38 UTC (rev 4711)
@@ -10,7 +10,11 @@
#include "use-mmap.c"
static void catcher (int sig, siginfo_t *sip, ucontext_t *ucp) {
+#if (defined(__powerpc__) || defined(__ppc__))
GC_handleSigProf ((pointer) ucp->uc_mcontext->ss.srr0);
+#elif (defined(__i386__))
+ GC_handleSigProf ((pointer) ucp->uc_mcontext->ss.eip);
+#endif
}
void setSigProfHandler (struct sigaction *sa) {
|
|
From: Matthew F. <fl...@ml...> - 2006-09-27 10:28:07
|
Fixed bug in computing the stack size of arguments in C calls
----------------------------------------------------------------------
U mlton/trunk/mlton/codegen/x86-codegen/x86-generate-transfers.fun
----------------------------------------------------------------------
Modified: mlton/trunk/mlton/codegen/x86-codegen/x86-generate-transfers.fun
===================================================================
--- mlton/trunk/mlton/codegen/x86-codegen/x86-generate-transfers.fun 2006-09-27 17:11:29 UTC (rev 4709)
+++ mlton/trunk/mlton/codegen/x86-codegen/x86-generate-transfers.fun 2006-09-27 17:28:04 UTC (rev 4710)
@@ -1105,49 +1105,56 @@
= List.fold
(args, (AppendList.empty, 0),
fn ((arg, size), (assembly_args, size_args)) =>
- (AppendList.append
- (if Size.eq (size, Size.DBLE)
- then AppendList.fromList
- [Assembly.instruction_binal
- {oper = Instruction.SUB,
- dst = c_stackP,
- src = Operand.immediate_const_int 8,
- size = pointerSize},
- Assembly.instruction_pfmov
- {src = arg,
- dst = c_stackPDerefDouble,
- size = size}]
- else if Size.eq (size, Size.SNGL)
- then AppendList.fromList
- [Assembly.instruction_binal
- {oper = Instruction.SUB,
- dst = c_stackP,
- src = Operand.immediate_const_int 4,
- size = pointerSize},
- Assembly.instruction_pfmov
- {src = arg,
- dst = c_stackPDerefFloat,
- size = size}]
- else if Size.eq (size, Size.BYTE)
- orelse Size.eq (size, Size.WORD)
- then AppendList.fromList
- [Assembly.instruction_movx
- {oper = Instruction.MOVZX,
- dst = applyFFTemp,
- src = arg,
- dstsize = wordSize,
- srcsize = size},
- Assembly.instruction_ppush
- {src = applyFFTemp,
- base = c_stackP,
- size = wordSize}]
- else AppendList.single
- (Assembly.instruction_ppush
- {src = arg,
- base = c_stackP,
- size = size}),
- assembly_args),
- (Size.toBytes size) + size_args))
+ let
+ val (assembly_arg, size_arg) =
+ if Size.eq (size, Size.DBLE)
+ then (AppendList.fromList
+ [Assembly.instruction_binal
+ {oper = Instruction.SUB,
+ dst = c_stackP,
+ src = Operand.immediate_const_int 8,
+ size = pointerSize},
+ Assembly.instruction_pfmov
+ {src = arg,
+ dst = c_stackPDerefDouble,
+ size = size}],
+ Size.toBytes size)
+ else if Size.eq (size, Size.SNGL)
+ then (AppendList.fromList
+ [Assembly.instruction_binal
+ {oper = Instruction.SUB,
+ dst = c_stackP,
+ src = Operand.immediate_const_int 4,
+ size = pointerSize},
+ Assembly.instruction_pfmov
+ {src = arg,
+ dst = c_stackPDerefFloat,
+ size = size}],
+ Size.toBytes size)
+ else if Size.eq (size, Size.BYTE)
+ orelse Size.eq (size, Size.WORD)
+ then (AppendList.fromList
+ [Assembly.instruction_movx
+ {oper = Instruction.MOVZX,
+ dst = applyFFTemp,
+ src = arg,
+ dstsize = wordSize,
+ srcsize = size},
+ Assembly.instruction_ppush
+ {src = applyFFTemp,
+ base = c_stackP,
+ size = wordSize}],
+ Size.toBytes wordSize)
+ else (AppendList.single
+ (Assembly.instruction_ppush
+ {src = arg,
+ base = c_stackP,
+ size = size}),
+ Size.toBytes size)
+ in
+ (AppendList.append (assembly_arg, assembly_args),
+ size_arg + size_args)
+ end)
val flush =
case frameInfo of
SOME (FrameInfo.T {size, ...}) =>
|
|
From: Matthew F. <fl...@ml...> - 2006-09-27 10:11:31
|
Unused variables
----------------------------------------------------------------------
U mlton/trunk/mlton/ssa/deep-flatten.fun
----------------------------------------------------------------------
Modified: mlton/trunk/mlton/ssa/deep-flatten.fun
===================================================================
--- mlton/trunk/mlton/ssa/deep-flatten.fun 2006-09-27 16:04:58 UTC (rev 4708)
+++ mlton/trunk/mlton/ssa/deep-flatten.fun 2006-09-27 17:11:29 UTC (rev 4709)
@@ -830,7 +830,6 @@
NONE => bug ()
| SOME y => y
end
- fun replaceVars xs = Vector.map (xs, replaceVar)
fun transformBind {exp, ty, var}: Statement.t list =
let
fun simpleTree () = Option.app (var, simpleVarTree)
@@ -910,7 +909,7 @@
end
end
end)
- | PrimApp {args, prim} => simple ()
+ | PrimApp _ => simple ()
| Select {base, offset} =>
(case var of
NONE => none ()
|
|
From: Matthew F. <fl...@ml...> - 2006-09-27 09:04:59
|
Added MLNLFFI platform memory file for x86-darwin. ---------------------------------------------------------------------- A mlton/trunk/lib/mlnlffi/memory/platform/memory.x86-darwin.mlb ---------------------------------------------------------------------- Copied: mlton/trunk/lib/mlnlffi/memory/platform/memory.x86-darwin.mlb (from rev 4707, mlton/trunk/lib/mlnlffi/memory/platform/memory.x86-freebsd.mlb) |
|
From: Vesa K. <ve...@ml...> - 2006-09-23 01:13:46
|
Added missing specification of find to the MONO_VECTOR signature.
----------------------------------------------------------------------
U mlton/trunk/basis-library/arrays-and-vectors/mono-vector.sig
----------------------------------------------------------------------
Modified: mlton/trunk/basis-library/arrays-and-vectors/mono-vector.sig
===================================================================
--- mlton/trunk/basis-library/arrays-and-vectors/mono-vector.sig 2006-09-22 21:44:23 UTC (rev 4706)
+++ mlton/trunk/basis-library/arrays-and-vectors/mono-vector.sig 2006-09-23 08:13:45 UTC (rev 4707)
@@ -9,6 +9,7 @@
val collate: (elem * elem -> order) -> vector * vector -> order
val concat: vector list -> vector
val exists: (elem -> bool) -> vector -> bool
+ val find: (elem -> bool) -> vector -> elem option
val findi: (int * elem -> bool) -> vector -> (int * elem) option
val foldl: (elem * 'a -> 'a) -> 'a -> vector -> 'a
val foldli: (int * elem * 'a -> 'a) -> 'a -> vector -> 'a
|
|
From: Stephen W. <sw...@ml...> - 2006-09-22 14:44:23
|
Tagged ML Workshop talk. ---------------------------------------------------------------------- A talks/whole-program-compilation/tags/20060916/ ---------------------------------------------------------------------- Copied: talks/whole-program-compilation/tags/20060916 (from rev 4705, talks/whole-program-compilation/trunk) |
|
From: Stephen W. <sw...@ml...> - 2006-09-15 11:46:09
|
Tweaked. ---------------------------------------------------------------------- U talks/whole-program-compilation/trunk/mlton.odp U talks/whole-program-compilation/trunk/mlton.pdf ---------------------------------------------------------------------- Modified: talks/whole-program-compilation/trunk/mlton.odp =================================================================== (Binary files differ) Modified: talks/whole-program-compilation/trunk/mlton.pdf =================================================================== (Binary files differ) |
|
From: Stephen W. <sw...@ml...> - 2006-09-14 17:30:30
|
Updated with latest round of feedback. ---------------------------------------------------------------------- U talks/whole-program-compilation/trunk/mlton.odp U talks/whole-program-compilation/trunk/mlton.pdf ---------------------------------------------------------------------- Modified: talks/whole-program-compilation/trunk/mlton.odp =================================================================== (Binary files differ) Modified: talks/whole-program-compilation/trunk/mlton.pdf =================================================================== (Binary files differ) |
|
From: Stephen W. <sw...@ml...> - 2006-09-13 16:27:39
|
Another pass through based on feedback. ---------------------------------------------------------------------- U talks/whole-program-compilation/trunk/mlton.odp U talks/whole-program-compilation/trunk/mlton.pdf ---------------------------------------------------------------------- Modified: talks/whole-program-compilation/trunk/mlton.odp =================================================================== (Binary files differ) Modified: talks/whole-program-compilation/trunk/mlton.pdf =================================================================== (Binary files differ) |
|
From: Stephen W. <sw...@ml...> - 2006-09-12 22:38:30
|
Exported pdf. ---------------------------------------------------------------------- U talks/whole-program-compilation/trunk/mlton.pdf ---------------------------------------------------------------------- Modified: talks/whole-program-compilation/trunk/mlton.pdf =================================================================== (Binary files differ) |
|
From: Stephen W. <sw...@ml...> - 2006-09-12 22:37:22
|
Checkpointing. Getting close to ML Workshop talk. ---------------------------------------------------------------------- U talks/whole-program-compilation/trunk/mlton.odp ---------------------------------------------------------------------- Modified: talks/whole-program-compilation/trunk/mlton.odp =================================================================== (Binary files differ) |
|
From: Stephen W. <sw...@ml...> - 2006-09-11 12:44:55
|
Tagged talk given at Intel on 20060825. ---------------------------------------------------------------------- A talks/whole-program-compilation/tags/20060825/ ---------------------------------------------------------------------- Copied: talks/whole-program-compilation/tags/20060825 (from rev 4699, talks/whole-program-compilation/trunk) |
|
From: Stephen W. <sw...@ml...> - 2006-09-11 11:55:30
|
Added talk.
----------------------------------------------------------------------
A talks/whole-program-compilation/tags/
A talks/whole-program-compilation/trunk/
A talks/whole-program-compilation/trunk/Makefile
A talks/whole-program-compilation/trunk/dates.sml
A talks/whole-program-compilation/trunk/fib.gif
A talks/whole-program-compilation/trunk/fib.ps
A talks/whole-program-compilation/trunk/fib.sml
A talks/whole-program-compilation/trunk/fib.ssa
A talks/whole-program-compilation/trunk/loop.gif
A talks/whole-program-compilation/trunk/loop.ps
A talks/whole-program-compilation/trunk/loop.sml
A talks/whole-program-compilation/trunk/loop.ssa
A talks/whole-program-compilation/trunk/mlton.odp
A talks/whole-program-compilation/trunk/mlton.pdf
A talks/whole-program-compilation/trunk/notes
----------------------------------------------------------------------
Added: talks/whole-program-compilation/trunk/Makefile
===================================================================
--- talks/whole-program-compilation/trunk/Makefile 2006-09-11 18:04:38 UTC (rev 4698)
+++ talks/whole-program-compilation/trunk/Makefile 2006-09-11 18:55:22 UTC (rev 4699)
@@ -0,0 +1,21 @@
+FIBDOT=fib.ssa.fib_0.cfg.dot
+
+$(FIBDOT): fib.sml
+ mlton -keep dot -keep ssa -show-types true fib.sml
+
+fib.ps: $(FIBDOT)
+ dot $(FIBDOT) >fib.ps
+
+fib.gif: fib.ps
+ convert fib.ps fib.gif
+
+LOOPDOT=loop.ssa.sum_0.cfg.dot
+
+$(LOOPDOT): loop.sml
+ mlton -drop-pass knownCase -drop-pass inline -keep dot -keep ssa -show-types true loop.sml
+
+loop.ps: $(LOOPDOT)
+ dot $(LOOPDOT) >loop.ps
+
+loop.gif: loop.ps
+ convert loop.ps loop.gif
Added: talks/whole-program-compilation/trunk/dates.sml
===================================================================
--- talks/whole-program-compilation/trunk/dates.sml 2006-09-11 18:04:38 UTC (rev 4698)
+++ talks/whole-program-compilation/trunk/dates.sml 2006-09-11 18:55:22 UTC (rev 4699)
@@ -0,0 +1,142 @@
+structure Main:sig end =
+struct
+
+structure Time =
+ struct
+ open Time
+
+ val hoursPerDay = 24
+ val secondsPerMinute = 60
+ val minutesPerHour = 60
+ val secondsPerHour = secondsPerMinute * minutesPerHour
+ val secondsPerDay = hoursPerDay * secondsPerHour
+ fun toDays t = IntInf.toInt (toSeconds t) div secondsPerDay
+ end
+
+structure List =
+ struct
+ open List
+
+ fun fold (l, b, f) = List.foldl f b l
+ end
+
+fun die s = raise Fail s
+
+val points =
+ [(1997, 01, 01, 0),
+ (1997, 10, 15, 16286),
+ (1998, 03, 27, 21575),
+ (1998, 08, 26, 35000),
+ (1999, 01, 20, 46217),
+ (1999, 03, 19, 48006),
+ (1999, 12, 24, 48132),
+ (2000, 09, 06, 66766),
+ (2001, 07, 17, 83722),
+ (2002, 01, 01, 102541),
+ (2003, 01, 01, 112204),
+ (2004, 01, 01, 122299),
+ (2005, 01, 01, 141917),
+ (2006, 01, 01, 143707)]
+
+val i2m =
+ let
+ open Date
+ in
+ fn 1 => Jan
+ | 2 => Feb
+ | 3 => Mar
+ | 4 => Apr
+ | 5 => May
+ | 6 => Jun
+ | 7 => Jul
+ | 8 => Aug
+ | 9 => Sep
+ | 10 => Oct
+ | 11 => Nov
+ | 12 => Dec
+ | _ => die "i2m"
+ end
+
+fun date (y, m, d) =
+ Date.date {year = y,
+ month = i2m m,
+ day = d,
+ hour = 0,
+ minute = 0,
+ second = 0,
+ offset = NONE}
+
+val points =
+ List.map
+ (fn (y, m, d, lines) =>
+ {date = date (y, m, d),
+ lines = lines})
+ points
+
+val _ =
+ List.fold
+ (tl points, hd points,
+ fn (dl2 as {date = d2, lines = l2: int}, {date = d1, lines = l1: int}) =>
+ let
+ val () =
+ if Date.year d2 = Date.year d1 then
+ ()
+ else
+ let
+ val lines =
+ if Date.yearDay d2 = 1 then
+ l2
+ else
+ let
+ val yearStart = date (Date.year d2, 1, 1)
+ val t2 =
+ Time.toDays (Time.- (Date.toTime d2,
+ Date.toTime yearStart))
+ val t1 =
+ Time.toDays (Time.- (Date.toTime yearStart,
+ Date.toTime d1))
+ in
+ (l1 * t1 + l2 * t2) div (t1 + t2)
+ end
+ in
+ print (concat [Int.toString (Date.year d2),
+ "\t", Int.toString lines, "\n"])
+ end
+ in
+ dl2
+ end)
+
+
+val firstDate = #date (hd points)
+val firstDate = date (1997, 1, 1)
+val firstDate = Date.toTime firstDate
+
+val points =
+ List.map
+ (fn {date, lines} =>
+ {days = Time.toDays (Time.- (Date.toTime date, firstDate)),
+ lines = lines})
+ points
+
+val () =
+ List.app
+ (fn {days, lines} =>
+ print (concat [Int.toString days, "\t", Int.toString lines, "\n"]))
+ points
+
+(*
+286 16286
+450 21575
+601 35000
+749 46217
+807 48006
+1087 48132
+1343 66766
+1657 83722
+1826 102541
+2191 112204
+2556 122299
+2922 141917
+3287 143707
+*)
+end
Added: talks/whole-program-compilation/trunk/fib.gif
===================================================================
(Binary files differ)
Property changes on: talks/whole-program-compilation/trunk/fib.gif
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Added: talks/whole-program-compilation/trunk/fib.ps
===================================================================
--- talks/whole-program-compilation/trunk/fib.ps 2006-09-11 18:04:38 UTC (rev 4698)
+++ talks/whole-program-compilation/trunk/fib.ps 2006-09-11 18:55:22 UTC (rev 4699)
@@ -0,0 +1,608 @@
+%!PS-Adobe-2.0
+%%Creator: dot version 2.8 (Wed Jul 19 03:30:15 UTC 2006)
+%%For: (sweeks) Stephen Weeks,,,
+%%Title: fib_0 control-flow graph
+%%Pages: (atend)
+%%BoundingBox: 36 36 448 600
+%%EndComments
+save
+%%BeginProlog
+/DotDict 200 dict def
+DotDict begin
+
+/setupLatin1 {
+mark
+/EncodingVector 256 array def
+ EncodingVector 0
+
+ISOLatin1Encoding 0 255 getinterval putinterval
+EncodingVector 45 /hyphen put
+
+% Set up ISO Latin 1 character encoding
+/starnetISO {
+ dup dup findfont dup length dict begin
+ { 1 index /FID ne { def }{ pop pop } ifelse
+ } forall
+ /Encoding EncodingVector def
+ currentdict end definefont
+} def
+/Times-Roman starnetISO def
+/Times-Italic starnetISO def
+/Times-Bold starnetISO def
+/Times-BoldItalic starnetISO def
+/Helvetica starnetISO def
+/Helvetica-Oblique starnetISO def
+/Helvetica-Bold starnetISO def
+/Helvetica-BoldOblique starnetISO def
+/Courier starnetISO def
+/Courier-Oblique starnetISO def
+/Courier-Bold starnetISO def
+/Courier-BoldOblique starnetISO def
+cleartomark
+} bind def
+
+%%BeginResource: procset graphviz 0 0
+/coord-font-family /Times-Roman def
+/default-font-family /Times-Roman def
+/coordfont coord-font-family findfont 8 scalefont def
+
+/InvScaleFactor 1.0 def
+/set_scale {
+ dup 1 exch div /InvScaleFactor exch def
+ dup scale
+} bind def
+
+% styles
+/solid { [] 0 setdash } bind def
+/dashed { [9 InvScaleFactor mul dup ] 0 setdash } bind def
+/dotted { [1 InvScaleFactor mul 6 InvScaleFactor mul] 0 setdash } bind def
+/invis {/fill {newpath} def /stroke {newpath} def /show {pop newpath} def} bind def
+/bold { 2 setlinewidth } bind def
+/filled { } bind def
+/unfilled { } bind def
+/rounded { } bind def
+/diagonals { } bind def
+
+% hooks for setting color
+/nodecolor { sethsbcolor } bind def
+/edgecolor { sethsbcolor } bind def
+/graphcolor { sethsbcolor } bind def
+/nopcolor {pop pop pop} bind def
+
+/beginpage { % i j npages
+ /npages exch def
+ /j exch def
+ /i exch def
+ /str 10 string def
+ npages 1 gt {
+ gsave
+ coordfont setfont
+ 0 0 moveto
+ (\() show i str cvs show (,) show j str cvs show (\)) show
+ grestore
+ } if
+} bind def
+
+/set_font {
+ findfont exch
+ scalefont setfont
+} def
+
+% draw aligned label in bounding box aligned to current point
+/alignedtext { % width adj text
+ /text exch def
+ /adj exch def
+ /width exch def
+ gsave
+ width 0 gt {
+ text stringwidth pop adj mul 0 rmoveto
+ } if
+ [] 0 setdash
+ text show
+ grestore
+} def
+
+/boxprim { % xcorner ycorner xsize ysize
+ 4 2 roll
+ moveto
+ 2 copy
+ exch 0 rlineto
+ 0 exch rlineto
+ pop neg 0 rlineto
+ closepath
+} bind def
+
+/ellipse_path {
+ /ry exch def
+ /rx exch def
+ /y exch def
+ /x exch def
+ matrix currentmatrix
+ newpath
+ x y translate
+ rx ry scale
+ 0 0 1 0 360 arc
+ setmatrix
+} bind def
+
+/endpage { showpage } bind def
+/showpage { } def
+
+/layercolorseq
+ [ % layer color sequence - darkest to lightest
+ [0 0 0]
+ [.2 .8 .8]
+ [.4 .8 .8]
+ [.6 .8 .8]
+ [.8 .8 .8]
+ ]
+def
+
+/layerlen layercolorseq length def
+
+/setlayer {/maxlayer exch def /curlayer exch def
+ layercolorseq curlayer 1 sub layerlen mod get
+ aload pop sethsbcolor
+ /nodecolor {nopcolor} def
+ /edgecolor {nopcolor} def
+ /graphcolor {nopcolor} def
+} bind def
+
+/onlayer { curlayer ne {invis} if } def
+
+/onlayers {
+ /myupper exch def
+ /mylower exch def
+ curlayer mylower lt
+ curlayer myupper gt
+ or
+ {invis} if
+} def
+
+/curlayer 0 def
+
+%%EndResource
+%%EndProlog
+%%BeginSetup
+14 default-font-family set_font
+1 setmiterlimit
+% /arrowlength 10 def
+% /arrowwidth 5 def
+
+% make sure pdfmark is harmless for PS-interpreters other than Distiller
+/pdfmark where {pop} {userdict /pdfmark /cleartomark load put} ifelse
+% make '<<' and '>>' safe on PS Level 1 devices
+/languagelevel where {pop languagelevel}{1} ifelse
+2 lt {
+ userdict (<<) cvn ([) cvn load put
+ userdict (>>) cvn ([) cvn load put
+} if
+
+%%EndSetup
+%%Page: 1 1
+%%PageBoundingBox: 36 36 448 600
+%%PageOrientation: Portrait
+gsave
+36 36 412 564 boxprim clip newpath
+36 36 translate
+0 0 1 beginpage
+1.0000 set_scale
+4 4 translate 0 rotate
+0.000 0.000 1.000 graphcolor
+0.000 0.000 1.000 graphcolor
+newpath -6 -6 moveto
+-6 562 lineto
+410 562 lineto
+410 -6 lineto
+closepath
+fill
+0.000 0.000 1.000 graphcolor
+newpath -6 -6 moveto
+-6 562 lineto
+410 562 lineto
+410 -6 lineto
+closepath
+stroke
+0.000 0.000 0.000 graphcolor
+14.00 /Times-Roman set_font
+gsave 10 dict begin
+133 7 moveto
+(fib_0 control-flow graph)
+[4.56 3.84 6.96 6.96 6.96 3.6 6.24 6.96 6.96 3.84 4.56 6.96 3.84 4.56 4.56 3.84 6.96 10.08 3.6 6.96 4.56 6.24 6.96 6.96]
+xshow
+end grestore
+% n0
+gsave 10 dict begin
+newpath 186 556 moveto
+16 556 lineto
+16 500 lineto
+186 500 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+24 539 moveto
+(L_157 \(\))
+[8.64 6.96 6.96 6.96 6.96 3.6 4.56 4.56]
+xshow
+24 523 moveto
+(x_371: bool = 0x1 < x_370)
+[6.96 6.96 6.96 6.96 6.96 3.84 3.6 6.96 6.96 6.96 3.84 3.6 7.92 3.6 6.96 6.96 6.96 3.6 7.92 3.6 6.96 6.96 6.96 6.96 6.96]
+xshow
+24 507 moveto
+(case x_371)
+[6.24 6.24 5.52 6.24 3.6 6.96 6.96 6.96 6.96 6.96]
+xshow
+end grestore
+end grestore
+% n6
+gsave 10 dict begin
+newpath 98 440 moveto
+0 440 lineto
+0 400 lineto
+98 400 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+8 423 moveto
+(L_158 \(\))
+[8.64 6.96 6.96 6.96 6.96 3.6 4.56 4.56]
+xshow
+8 407 moveto
+(return \(x_370\))
+[4.56 6.24 3.84 6.96 4.56 6.96 3.6 4.56 6.96 6.96 6.96 6.96 6.96 4.56]
+xshow
+end grestore
+end grestore
+% n0->n6
+gsave 10 dict begin
+solid
+newpath 87 500 moveto
+80 484 71 465 63 449 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 66 448 moveto
+59 440 lineto
+60 451 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 66 448 moveto
+59 440 lineto
+60 451 lineto
+closepath
+stroke
+end grestore
+gsave 10 dict begin
+78 469 moveto
+(false)
+[4.56 6.24 3.84 5.52 6.24]
+xshow
+end grestore
+end grestore
+% n7
+gsave 10 dict begin
+newpath 300 448 moveto
+116 448 lineto
+116 392 lineto
+300 392 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+124 431 moveto
+(L_159 \(\))
+[8.64 6.96 6.96 6.96 6.96 3.6 4.56 4.56]
+xshow
+124 415 moveto
+(x_372: word32 = x_370 - 0x1)
+[6.96 6.96 6.96 6.96 6.96 3.84 3.6 10.08 6.96 4.56 6.96 6.96 6.96 3.6 7.92 3.6 6.96 6.96 6.96 6.96 6.96 3.6 4.56 3.6 6.96 6.96 6.96]
+xshow
+124 399 moveto
+(fib_0 \(x_372\))
+[4.56 3.84 6.96 6.96 6.96 3.6 4.56 6.96 6.96 6.96 6.96 6.96 4.56]
+xshow
+end grestore
+end grestore
+% n0->n7
+gsave 10 dict begin
+solid
+newpath 129 500 moveto
+143 486 159 470 174 455 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 176 458 moveto
+181 448 lineto
+171 453 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 176 458 moveto
+181 448 lineto
+171 453 lineto
+closepath
+stroke
+end grestore
+gsave 10 dict begin
+159 469 moveto
+(true)
+[3.84 4.56 6.96 6.24]
+xshow
+end grestore
+end grestore
+% n1
+gsave 10 dict begin
+newpath 404 64 moveto
+254 64 lineto
+254 24 lineto
+404 24 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+262 47 moveto
+(L_164 \(x_376: word32\))
+[8.64 6.96 6.96 6.96 6.96 3.6 4.56 6.96 6.96 6.96 6.96 6.96 3.84 3.6 10.08 6.96 4.56 6.96 6.96 6.96 4.56]
+xshow
+262 31 moveto
+(return \(x_376\))
+[4.56 6.24 3.84 6.96 4.56 6.96 3.6 4.56 6.96 6.96 6.96 6.96 6.96 4.56]
+xshow
+end grestore
+end grestore
+% n2
+gsave 10 dict begin
+newpath 352 156 moveto
+202 156 lineto
+202 116 lineto
+352 116 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+210 139 moveto
+(L_163 \(x_375: word32\))
+[8.64 6.96 6.96 6.96 6.96 3.6 4.56 6.96 6.96 6.96 6.96 6.96 3.84 3.6 10.08 6.96 4.56 6.96 6.96 6.96 4.56]
+xshow
+210 123 moveto
+(x_373 + x_375)
+[6.96 6.96 6.96 6.96 6.96 3.6 7.92 3.6 6.96 6.96 6.96 6.96 6.96]
+xshow
+end grestore
+end grestore
+% n2->n1
+gsave 10 dict begin
+solid
+newpath 289 116 moveto
+296 103 305 86 313 73 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 316 74 moveto
+318 64 lineto
+310 71 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 316 74 moveto
+318 64 lineto
+310 71 lineto
+closepath
+stroke
+end grestore
+gsave 10 dict begin
+end grestore
+end grestore
+% n3
+gsave 10 dict begin
+newpath 236 64 moveto
+112 64 lineto
+112 24 lineto
+236 24 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+120 47 moveto
+(L_162 \(\))
+[8.64 6.96 6.96 6.96 6.96 3.6 4.56 4.56]
+xshow
+120 31 moveto
+(raise \(Overflow_0\))
+[4.56 6.24 3.84 5.52 6.24 3.6 4.56 10.08 6.96 6.24 4.56 4.56 3.84 6.96 10.08 6.96 6.96 4.56]
+xshow
+end grestore
+end grestore
+% n2->n3
+gsave 10 dict begin
+dashed
+newpath 254 116 moveto
+239 103 220 86 204 71 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 206 68 moveto
+196 64 lineto
+201 73 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 206 68 moveto
+196 64 lineto
+201 73 lineto
+closepath
+stroke
+end grestore
+gsave 10 dict begin
+233 85 moveto
+(Overflow)
+[10.08 6.96 6.24 4.56 4.56 3.84 6.96 10.08]
+xshow
+end grestore
+end grestore
+% n4
+gsave 10 dict begin
+newpath 352 248 moveto
+202 248 lineto
+202 208 lineto
+352 208 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+210 231 moveto
+(L_161 \(x_374: word32\))
+[8.64 6.96 6.96 6.96 6.96 3.6 4.56 6.96 6.96 6.96 6.96 6.96 3.84 3.6 10.08 6.96 4.56 6.96 6.96 6.96 4.56]
+xshow
+210 215 moveto
+(fib_0 \(x_374\))
+[4.56 3.84 6.96 6.96 6.96 3.6 4.56 6.96 6.96 6.96 6.96 6.96 4.56]
+xshow
+end grestore
+end grestore
+% n4->n2
+gsave 10 dict begin
+dotted
+newpath 277 208 moveto
+277 195 277 180 277 166 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 281 166 moveto
+277 156 lineto
+274 166 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 281 166 moveto
+277 156 lineto
+274 166 lineto
+closepath
+stroke
+end grestore
+gsave 10 dict begin
+end grestore
+end grestore
+% n5
+gsave 10 dict begin
+newpath 283 340 moveto
+133 340 lineto
+133 300 lineto
+283 300 lineto
+closepath
+stroke
+gsave 10 dict begin
+0.000 0.000 0.000 nodecolor
+141 323 moveto
+(L_160 \(x_373: word32\))
+[8.64 6.96 6.96 6.96 6.96 3.6 4.56 6.96 6.96 6.96 6.96 6.96 3.84 3.6 10.08 6.96 4.56 6.96 6.96 6.96 4.56]
+xshow
+141 307 moveto
+(x_370 - 0x2)
+[6.96 6.96 6.96 6.96 6.96 3.6 4.56 3.6 6.96 6.96 6.96]
+xshow
+end grestore
+end grestore
+% n5->n3
+gsave 10 dict begin
+dashed
+newpath 203 300 moveto
+199 285 195 266 193 248 curveto
+184 186 178 114 176 74 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 179 74 moveto
+175 64 lineto
+173 74 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 179 74 moveto
+175 64 lineto
+173 74 lineto
+closepath
+stroke
+end grestore
+gsave 10 dict begin
+184 177 moveto
+(Overflow)
+[10.08 6.96 6.24 4.56 4.56 3.84 6.96 10.08]
+xshow
+end grestore
+end grestore
+% n5->n4
+gsave 10 dict begin
+solid
+newpath 223 300 moveto
+233 287 245 270 256 256 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 259 258 moveto
+262 248 lineto
+253 254 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 259 258 moveto
+262 248 lineto
+253 254 lineto
+closepath
+stroke
+end grestore
+gsave 10 dict begin
+end grestore
+end grestore
+% n7->n5
+gsave 10 dict begin
+dotted
+newpath 208 392 moveto
+208 379 208 363 208 350 curveto
+stroke
+gsave 10 dict begin
+solid
+1 setlinewidth
+0.000 0.000 0.000 edgecolor
+newpath 212 350 moveto
+208 340 lineto
+205 350 lineto
+closepath
+fill
+0.000 0.000 0.000 edgecolor
+newpath 212 350 moveto
+208 340 lineto
+205 350 lineto
+closepath
+stroke
+end grestore
+gsave 10 dict begin
+end grestore
+end grestore
+endpage
+showpage
+grestore
+%%PageTrailer
+%%EndPage: 1
+%%Trailer
+%%Pages: 1
+end
+restore
+%%EOF
Added: talks/whole-program-compilation/trunk/fib.sml
===================================================================
--- talks/whole-program-compilation/trunk/fib.sml 2006-09-11 18:04:38 UTC (rev 4698)
+++ talks/whole-program-compilation/trunk/fib.sml 2006-09-11 18:55:22 UTC (rev 4699)
@@ -0,0 +1,7 @@
+fun fib n =
+ if n <= 1 then
+ n
+ else
+ fib (n - 1) + fib (n - 2)
+
+val () = print (concat [Int.toString (fib 10), "\n"])
Added: talks/whole-program-compilation/trunk/fib.ssa
===================================================================
--- talks/whole-program-compilation/trunk/fib.ssa 2006-09-11 18:04:38 UTC (rev 4698)
+++ talks/whole-program-compilation/trunk/fib.ssa 2006-09-11 18:55:22 UTC (rev 4699)
@@ -0,0 +1,1996 @@
+MLton MLTONVERSION (built Mon Jul 17 18:22:35 2006 on eponym)
+ created this file on Fri Aug 25 09:59:43 2006.
+Do not edit this file.
+Flag settings:
+ align: 4
+ atMLtons: (fib, @MLton, --)
+ chunk: chunk per function
+ codegen: Native
+ contifyIntoMain: false
+ debug: false
+ defaultChar: char8
+ defaultInt: int32
+ defaultReal: real64
+ defaultWord: word32
+ diag passes: []
+ drop passes: []
+ elaborate allowConstant (default): false
+ elaborate allowConstant (enabled): true
+ elaborate allowFFI (default): false
+ elaborate allowFFI (enabled): true
+ elaborate allowPrim (default): false
+ elaborate allowPrim (enabled): true
+ elaborate allowOverload (default): false
+ elaborate allowOverload (enabled): true
+ elaborate allowRebindEquals (default): false
+ elaborate allowRebindEquals (enabled): true
+ elaborate deadCode (default): false
+ elaborate deadCode (enabled): true
+ elaborate forceUsed (default): false
+ elaborate forceUsed (enabled): true
+ elaborate ffiStr (default):
+ elaborate ffiStr (enabled): true
+ elaborate nonexhaustiveExnMatch (default): default
+ elaborate nonexhaustiveExnMatch (enabled): true
+ elaborate nonexhaustiveMatch (default): warn
+ elaborate nonexhaustiveMatch (enabled): true
+ elaborate redundantMatch (default): warn
+ elaborate redundantMatch (enabled): true
+ elaborate sequenceNonUnit (default): ignore
+ elaborate sequenceNonUnit (enabled): true
+ elaborate warnUnused (default): false
+ elaborate warnUnused (enabled): true
+ elaborate only: false
+ export header: None
+ exn history: false
+ gc check: Limit
+ indentation: 3
+ inline: NonRecursive {product = 320, small = 60}
+ inlineIntoMain: true
+ input file: fib.ssa
+ keep Machine: false
+ keep RSSA: false
+ keep SSA: true
+ keep SSA2: false
+ keep dot: true
+ keep passes: []
+ extra_: false
+ lib dir: /home/sweeks/mlton/src/build/lib
+ lib target dir: /home/sweeks/mlton/src/build/lib/self
+ loop passes: 1
+ mark cards: true
+ max function size: 10000
+ mlb path maps: [/home/sweeks/mlton/src/build/lib/mlb-path-map]
+ native commented: 0
+ native live stack: false
+ native optimize: 1
+ native move hoist: true
+ native copy prop: true
+ native copy prop cutoff: 1000
+ native cutoff: 100
+ native live transfer: 8
+ native shuffle: true
+ native ieee fp: false
+ native split: Some 20000
+ optimizationPassesSet: [<ssa2PassesSet>, <ssaPassesSet>, <sxmlPassesSet>, <xmlPassesSet>]
+ polyvariance: Some {rounds = 2, small = 30, product = 300}
+ prof passes: []
+ profile: None
+ profile branch: false
+ profile C: []
+ profile IL: ProfileSource
+ profile include/exclude: [(Seq [Star [.], Or [Seq [Seq [[<], [b], [a], [s], [i], [s], [>]]]], Star [.]], false)]
+ profile raise: false
+ profile stack: false
+ show basis: None
+ show def-use: None
+ show types: true
+ ssaPassesSet: <ssaPassesSet>
+ ssaPasses: [default]
+ ssa2PassesSet: <ssa2PassesSet>
+ ssa2Passes: [default]
+ sxmlPassesSet: <sxmlPassesSet>
+ sxmlPasses: [default]
+ target: self
+ target arch: X86
+ target OS: Linux
+ type check: false
+ verbosity: Silent
+ warn unrecognized annotation: true
+ xmlPassesSet: <xmlPassesSet>
+ xmlPasses: [default]
+ zone cut depth: 100
+
+
+Datatypes:
+lambdas_0 = Env_2 of (list_1) | Env_0 | Env_1 of (list_0 ref)
+lambdas_1 = C_0
+lambdas_2 = C_1
+lambdas_3 = Env_4 of (word32, word32, word8 array)
+ | Env_3 of (word32, word32, word8 vector)
+list_2 = nil_6 | ::_1 of (list_2, (word32 * word32))
+Primitive.Option.t_0 = NONE_0 | SOME_0
+list_3 = nil_5 | ::_2 of (list_3, (word32 * word8 vector * word32))
+StreamIOExtra.bufferMode_0 = LINE_BUF_1 of (word32 ref, word8 array)
+ | BLOCK_BUF_1 of (word32 ref, word8 array)
+list_4 = nil_4 | ::_0 of (list_4, word8 vector)
+IO.buffer_mode_0 = LINE_BUF_0 | BLOCK_BUF_0
+list_5 = nil_3
+ | ::_3 of (list_5,
+ ((word8 vector * (word64 ref * bool ref) * (word64 ref * bool ref)) * StreamIOExtra.bufferMode_0 ref * unit ref * (word8 vector * (word64 ref * bool ref) * (word64 ref * bool ref))))
+Primitive.Option.t_1 = SOME_1 of (word32)
+list_6 = C_2
+list_1 = nil_2 | ::_4 of (list_1, (word32 * word8 vector))
+list_7 = nil_1 | ::_5 of (list_7, list_5 ref)
+list_0 = nil_0 | ::_6 of (list_0, lambdas_0)
+bool = false | true
+exn = Io_0 of (word8 vector, word8 vector, exn)
+ | ClosedStream_0
+ | SysErr_0 of (Primitive.Option.t_1, word8 vector)
+ | Fail_0 of (word8 vector)
+ | Subscript_0
+ | Size_0
+ | Overflow_0
+ | Fail8_0 of (word8 vector)
+
+
+Globals:
+x_0: word32 = 0x1
+x_1: unit = ()
+global_0: word32 = 0x8
+global_1: word32 = 0x10
+global_2: word32 = 0x20
+global_3: word32 = 0x0
+global_4: word32 = 0x1
+global_5: word32 = 0x40000000
+global_6: list_0 = nil_0 ()
+global_7: word32 = 0x21
+global_8: bool = false ()
+global_9: lambdas_0 = Env_0 ()
+global_10: list_7 = nil_1 ()
+global_11: word32 = 0x12
+global_12: word8 vector = "xdev"
+global_13: (word32 * word8 vector) = (global_11, global_12)
+global_14: list_1 = nil_2 ()
+global_15: word32 = 0xB
+global_16: word8 vector = "wouldblock"
+global_17: (word32 * word8 vector) = (global_15, global_16)
+global_18: word32 = 0x1A
+global_19: word8 vector = "txtbsy"
+global_20: (word32 * word8 vector) = (global_18, global_19)
+global_21: word32 = 0x7
+global_22: word8 vector = "toobig"
+global_23: (word32 * word8 vector) = (global_21, global_22)
+global_24: word32 = 0x6E
+global_25: word8 vector = "timedout"
+global_26: (word32 * word8 vector) = (global_24, global_25)
+global_27: word32 = 0x3E
+global_28: word8 vector = "time"
+global_29: (word32 * word8 vector) = (global_27, global_28)
+global_30: word32 = 0x74
+global_31: word8 vector = "stale"
+global_32: (word32 * word8 vector) = (global_30, global_31)
+global_33: word32 = 0x3
+global_34: word8 vector = "srch"
+global_35: (word32 * word8 vector) = (global_33, global_34)
+global_36: word32 = 0x1D
+global_37: word8 vector = "spipe"
+global_38: (word32 * word8 vector) = (global_36, global_37)
+global_39: word32 = 0x1E
+global_40: word8 vector = "rofs"
+global_41: (word32 * word8 vector) = (global_39, global_40)
+global_42: word32 = 0x22
+global_43: word8 vector = "range"
+global_44: (word32 * word8 vector) = (global_42, global_43)
+global_45: word32 = 0x5B
+global_46: word8 vector = "prototype"
+global_47: (word32 * word8 vector) = (global_45, global_46)
+global_48: word32 = 0x5D
+global_49: word8 vector = "protonosupport"
+global_50: (word32 * word8 vector) = (global_48, global_49)
+global_51: word32 = 0x47
+global_52: word8 vector = "proto"
+global_53: (word32 * word8 vector) = (global_51, global_52)
+global_54: word8 vector = "pipe"
+global_55: (word32 * word8 vector) = (global_2, global_54)
+global_56: word8 vector = "perm"
+global_57: (word32 * word8 vector) = (global_4, global_56)
+global_58: word32 = 0x4B
+global_59: word8 vector = "overflow"
+global_60: (word32 * word8 vector) = (global_58, global_59)
+global_61: word32 = 0x5F
+global_62: word8 vector = "opnotsupp"
+global_63: (word32 * word8 vector) = (global_61, global_62)
+global_64: word32 = 0x6
+global_65: word8 vector = "nxio"
+global_66: (word32 * word8 vector) = (global_64, global_65)
+global_67: word32 = 0x19
+global_68: word8 vector = "notty"
+global_69: (word32 * word8 vector) = (global_67, global_68)
+global_70: word8 vector = "notsup"
+global_71: (word32 * word8 vector) = (global_61, global_70)
+global_72: word32 = 0x58
+global_73: word8 vector = "notsock"
+global_74: (word32 * word8 vector) = (global_72, global_73)
+global_75: word32 = 0x27
+global_76: word8 vector = "notempty"
+global_77: (word32 * word8 vector) = (global_75, global_76)
+global_78: word32 = 0x14
+global_79: word8 vector = "notdir"
+global_80: (word32 * word8 vector) = (global_78, global_79)
+global_81: word32 = 0x6B
+global_82: word8 vector = "notconn"
+global_83: (word32 * word8 vector) = (global_81, global_82)
+global_84: word32 = 0x26
+global_85: word8 vector = "nosys"
+global_86: (word32 * word8 vector) = (global_84, global_85)
+global_87: word32 = 0x3C
+global_88: word8 vector = "nostr"
+global_89: (word32 * word8 vector) = (global_87, global_88)
+global_90: word32 = 0x3F
+global_91: word8 vector = "nosr"
+global_92: (word32 * word8 vector) = (global_90, global_91)
+global_93: word32 = 0x1C
+global_94: word8 vector = "nospc"
+global_95: (word32 * word8 vector) = (global_93, global_94)
+global_96: word32 = 0x5C
+global_97: word8 vector = "noprotoopt"
+global_98: (word32 * word8 vector) = (global_96, global_97)
+global_99: word32 = 0x2A
+global_100: word8 vector = "nomsg"
+global_101: (word32 * word8 vector) = (global_99, global_100)
+global_102: word32 = 0xC
+global_103: word8 vector = "nomem"
+global_104: (word32 * word8 vector) = (global_102, global_103)
+global_105: word32 = 0x43
+global_106: word8 vector = "nolink"
+global_107: (word32 * word8 vector) = (global_105, global_106)
+global_108: word32 = 0x25
+global_109: word8 vector = "nolck"
+global_110: (word32 * word8 vector) = (global_108, global_109)
+global_111: word8 vector = "noexec"
+global_112: (word32 * word8 vector) = (global_0, global_111)
+global_113: word32 = 0x2
+global_114: word8 vector = "noent"
+global_115: (word32 * word8 vector) = (global_113, global_114)
+global_116: word32 = 0x13
+global_117: word8 vector = "nodev"
+global_118: (word32 * word8 vector) = (global_116, global_117)
+global_119: word32 = 0x3D
+global_120: word8 vector = "nodata"
+global_121: (word32 * word8 vector) = (global_119, global_120)
+global_122: word32 = 0x69
+global_123: word8 vector = "nobufs"
+global_124: (word32 * word8 vector) = (global_122, global_123)
+global_125: word32 = 0x17
+global_126: word8 vector = "nfile"
+global_127: (word32 * word8 vector) = (global_125, global_126)
+global_128: word32 = 0x65
+global_129: word8 vector = "netunreach"
+global_130: (word32 * word8 vector) = (global_128, global_129)
+global_131: word32 = 0x66
+global_132: word8 vector = "netreset"
+global_133: (word32 * word8 vector) = (global_131, global_132)
+global_134: word32 = 0x64
+global_135: word8 vector = "netdown"
+global_136: (word32 * word8 vector) = (global_134, global_135)
+global_137: word32 = 0x24
+global_138: word8 vector = "nametoolong"
+global_139: (word32 * word8 vector) = (global_137, global_138)
+global_140: word32 = 0x48
+global_141: word8 vector = "multihop"
+global_142: (word32 * word8 vector) = (global_140, global_141)
+global_143: word32 = 0x5A
+global_144: word8 vector = "msgsize"
+global_145: (word32 * word8 vector) = (global_143, global_144)
+global_146: word32 = 0x1F
+global_147: word8 vector = "mlink"
+global_148: (word32 * word8 vector) = (global_146, global_147)
+global_149: word32 = 0x18
+global_150: word8 vector = "mfile"
+global_151: (word32 * word8 vector) = (global_149, global_150)
+global_152: word32 = 0x28
+global_153: word8 vector = "loop"
+global_154: (word32 * word8 vector) = (global_152, global_153)
+global_155: word32 = 0x15
+global_156: word8 vector = "isdir"
+global_157: (word32 * word8 vector) = (global_155, global_156)
+global_158: word32 = 0x6A
+global_159: word8 vector = "isconn"
+global_160: (word32 * word8 vector) = (global_158, global_159)
+global_161: word32 = 0x5
+global_162: word8 vector = "io"
+global_163: (word32 * word8 vector) = (global_161, global_162)
+global_164: word32 = 0x16
+global_165: word8 vector = "inval"
+global_166: (word32 * word8 vector) = (global_164, global_165)
+global_167: word32 = 0x4
+global_168: word8 vector = "intr"
+global_169: (word32 * word8 vector) = (global_167, global_168)
+global_170: word32 = 0x73
+global_171: word8 vector = "inprogress"
+global_172: (word32 * word8 vector) = (global_170, global_171)
+global_173: word32 = 0x54
+global_174: word8 vector = "ilseq"
+global_175: (word32 * word8 vector) = (global_173, global_174)
+global_176: word32 = 0x2B
+global_177: word8 vector = "idrm"
+global_178: (word32 * word8 vector) = (global_176, global_177)
+global_179: word32 = 0x71
+global_180: word8 vector = "hostunreach"
+global_181: (word32 * word8 vector) = (global_179, global_180)
+global_182: word32 = 0x1B
+global_183: word8 vector = "fbig"
+global_184: (word32 * word8 vector) = (global_182, global_183)
+global_185: word32 = 0xE
+global_186: word8 vector = "fault"
+global_187: (word32 * word8 vector) = (global_185, global_186)
+global_188: word32 = 0x11
+global_189: word8 vector = "exist"
+global_190: (word32 * word8 vector) = (global_188, global_189)
+global_191: word32 = 0x7A
+global_192: word8 vector = "dquot"
+global_193: (word32 * word8 vector) = (global_191, global_192)
+global_194: word8 vector = "dom"
+global_195: (word32 * word8 vector) = (global_7, global_194)
+global_196: word32 = 0x59
+global_197: word8 vector = "destaddrreq"
+global_198: (word32 * word8 vector) = (global_196, global_197)
+global_199: word32 = 0x23
+global_200: word8 vector = "deadlk"
+global_201: (word32 * word8 vector) = (global_199, global_200)
+global_202: word32 = 0x68
+global_203: word8 vector = "connreset"
+global_204: (word32 * word8 vector) = (global_202, global_203)
+global_205: word32 = 0x6F
+global_206: word8 vector = "connrefused"
+global_207: (word32 * word8 vector) = (global_205, global_206)
+global_208: word32 = 0x67
+global_209: word8 vector = "connaborted"
+global_210: (word32 * word8 vector) = (global_208, global_209)
+global_211: word32 = 0xA
+global_212: word8 vector = "child"
+global_213: (word32 * word8 vector) = (global_211, global_212)
+global_214: word32 = 0x7D
+global_215: word8 vector = "canceled"
+global_216: (word32 * word8 vector) = (global_214, global_215)
+global_217: word8 vector = "busy"
+global_218: (word32 * word8 vector) = (global_1, global_217)
+global_219: word32 = 0x4A
+global_220: word8 vector = "badmsg"
+global_221: (word32 * word8 vector) = (global_219, global_220)
+global_222: word32 = 0x9
+global_223: word8 vector = "badf"
+global_224: (word32 * word8 vector) = (global_222, global_223)
+global_225: word32 = 0x72
+global_226: word8 vector = "already"
+global_227: (word32 * word8 vector) = (global_225, global_226)
+global_228: word8 vector = "again"
+global_229: (word32 * word8 vector) = (global_15, global_228)
+global_230: word32 = 0x61
+global_231: word8 vector = "afnosupport"
+global_232: (word32 * word8 vector) = (global_230, global_231)
+global_233: word32 = 0x63
+global_234: word8 vector = "addrnotavail"
+global_235: (word32 * word8 vector) = (global_233, global_234)
+global_236: word32 = 0x62
+global_237: word8 vector = "addrinuse"
+global_238: (word32 * word8 vector) = (global_236, global_237)
+global_239: word32 = 0xD
+global_240: word8 vector = "acces"
+global_241: (word32 * word8 vector) = (global_239, global_240)
+global_242: bool = true ()
+global_243: exn = Overflow_0 ()
+global_244: word32 = 0xFFFFFFFF
+global_245: word64 = 0x0
+global_246: list_5 = nil_3 ()
+global_247: IO.buffer_mode_0 = BLOCK_BUF_0 ()
+global_248: IO.buffer_mode_0 = LINE_BUF_0 ()
+global_249: word32 = 0x1000
+global_250: word8 vector = "<stdout>"
+global_251: word8 = 0x0
+global_252: word8 vector = "
+"
+global_253: list_4 = nil_4 ()
+global_254: list_4 = ::_0 (global_253, global_252)
+global_255: word8 vector = "output"
+global_256: exn = ClosedStream_0 ()
+global_257: word8 vector = "toplevel handler not installed"
+global_258: word8 = 0xA
+global_259: Primitive.Option.t_0 = SOME_0 ()
+global_260: Primitive.Option.t_0 = NONE_0 ()
+global_261: word8 vector = "partial write"
+global_262: word8 vector = global_261
+global_263: exn = Fail_0 (global_262)
+global_264: exn = Subscript_0 ()
+global_265: word8 vector = "Toplevel handler raised exception.
+"
+global_266: word8 vector = "unhandled exception: "
+global_267: word8 vector = "exit"
+global_268: word8 vector = global_267
+global_269: exn = Fail_0 (global_268)
+global_270: word64 = 0xFFFFFFFFFFFFFFFF
+global_271: word8 vector = "Unknown error"
+global_272: word8 vector = "flushOut"
+global_273: word8 vector = "0123456789ABCDEF"
+global_274: word8 = 0x7E
+global_275: exn = Size_0 ()
+global_276: list_3 = nil_5 ()
+global_277: word8 vector = "Sequence.Slice.concat"
+global_278: word8 vector = global_277
+global_279: exn = Fail_0 (global_278)
+global_280: word8 array = Array_array(word8) (global_3)
+global_281: word8 vector = "" failed with "
+global_282: word8 vector = " ""
+global_283: word8 vector = "Io: "
+global_284: word8 vector = "Fail: "
+global_285: word8 vector = "<UNKNOWN>"
+global_286: word8 vector = "]"
+global_287: list_4 = ::_0 (global_253, global_286)
+global_288: word8 vector = " ["
+global_289: word8 vector = "SysErr: "
+global_290: (word32 * word32) = (global_3, global_3)
+global_291: list_2 = nil_6 ()
+global_292: list_2 = ::_1 (global_291, global_290)
+global_293: (word32 * word32) = (global_3, global_4)
+global_294: list_2 = ::_1 (global_291, global_293)
+global_295: word8 vector = "Fail "
+global_296: word8 vector = "unhandled exception in Basis Library |
|
From: Stephen W. <sw...@ml...> - 2006-09-11 11:04:38
|
New directory. ---------------------------------------------------------------------- A talks/whole-program-compilation/ ---------------------------------------------------------------------- |
|
From: Stephen W. <sw...@ml...> - 2006-09-11 10:59:12
|
New directory. ---------------------------------------------------------------------- A talks/ ---------------------------------------------------------------------- |
|
From: Stephen W. <sw...@ml...> - 2006-09-06 17:26:28
|
Patch from Bernard Berthomieu to implement getrusage on MinGW, instead of setting all times to zero, as we had done in the past. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.c ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.c =================================================================== --- mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.c 2006-09-06 01:25:13 UTC (rev 4695) +++ mlton/branches/on-20050822-x86_64-branch/runtime/platform/mingw.c 2006-09-07 00:26:27 UTC (rev 4696) @@ -148,16 +148,32 @@ /* MLton.Rusage */ /* ------------------------------------------------- */ -/* This is implemented to fill in the times with zeros, so that we can compile - * MLton. +/* GetProcessTimes and GetSystemTimeAsFileTime are documented at: + * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/getprocesstimes.asp + * http://msdn.microsoft.com/library/default.asp?url=/library/en-us/sysinfo/base/getsystemtimeasfiletime.asp */ - int getrusage (int who, struct rusage *usage) { - usage->ru_utime.tv_sec = 0; - usage->ru_utime.tv_usec = 0; - usage->ru_stime.tv_sec = 0; - usage->ru_stime.tv_usec = 0; - return 0; + FILETIME ct, et, kt, ut; + LARGE_INTEGER li, lj; + if (GetProcessTimes(GetCurrentProcess(), &ct, &et, &kt, &ut)) { + usage->ru_utime.tv_sec = ut.dwHighDateTime; + usage->ru_utime.tv_usec = ut.dwLowDateTime/10; + usage->ru_stime.tv_sec = kt.dwHighDateTime; + usage->ru_stime.tv_usec = kt.dwLowDateTime/10; + return 0; + } + /* if GetProcessTimes failed, use real time [for Windows] */ + GetSystemTimeAsFileTime(&ut); + li.LowPart = ut.dwLowDateTime; + li.HighPart = ut.dwHighDateTime; + lj.LowPart = Time_sec; + lj.HighPart = Time_usec; + li.QuadPart -= lj.QuadPart; + usage->ru_utime.tv_sec = li.HighPart; + usage->ru_utime.tv_usec = li.LowPart/10; + usage->ru_stime.tv_sec = 0; + usage->ru_stime.tv_usec = 0; + return 0; } /* ------------------------------------------------- */ |
|
From: Matthew F. <fl...@ml...> - 2006-09-05 18:25:14
|
Assert that gcc layout matches runtime layout.
----------------------------------------------------------------------
U 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/string.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c 2006-09-05 22:22:33 UTC (rev 4694)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c 2006-09-06 01:25:13 UTC (rev 4695)
@@ -29,7 +29,7 @@
assert (not isSmall(arg));
bp = (GC_intInf)(objptrToPointer(arg, s->heap.start)
- - offsetof(struct GC_intInf, isneg));
+ - offsetof(struct GC_intInf, obj.body.isneg));
if (DEBUG_INT_INF)
fprintf (stderr, "bp->header = "FMTHDR"\n", bp->header);
assert (bp->header == GC_INTINF_HEADER);
@@ -77,8 +77,8 @@
} else {
bp = toBignum (s, arg);
res->_mp_alloc = bp->length - 1;
- res->_mp_d = (mp_limb_t*)(bp->limbs);
- res->_mp_size = bp->isneg ? - res->_mp_alloc : res->_mp_alloc;
+ res->_mp_d = (mp_limb_t*)(bp->obj.body.limbs);
+ res->_mp_size = bp->obj.body.isneg ? - res->_mp_alloc : res->_mp_alloc;
}
assert ((res->_mp_size == 0)
or (res->_mp_d[(res->_mp_size < 0
@@ -101,8 +101,8 @@
/* 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.
*/
- res->_mp_alloc = (s->limitPlusSlop - (pointer)bp->limbs) / (sizeof(mp_limb_t));
- res->_mp_d = (mp_limb_t*)(bp->limbs);
+ res->_mp_alloc = (s->limitPlusSlop - (pointer)bp->obj.body.limbs) / (sizeof(mp_limb_t));
+ res->_mp_d = (mp_limb_t*)(bp->obj.body.limbs);
res->_mp_size = 0; /* is this necessary? */
}
@@ -128,22 +128,22 @@
if (DEBUG_INT_INF_DETAILED)
fprintf (stderr, "res --> %s\n",
mpz_get_str (NULL, 10, res));
- bp = (GC_intInf)((pointer)res->_mp_d - offsetof(struct GC_intInf, limbs));
- assert (res->_mp_d == (mp_limb_t*)(bp->limbs));
+ bp = (GC_intInf)((pointer)res->_mp_d - offsetof(struct GC_intInf, obj.body.limbs));
+ assert (res->_mp_d == (mp_limb_t*)(bp->obj.body.limbs));
size = res->_mp_size;
if (size < 0) {
- bp->isneg = TRUE;
+ bp->obj.body.isneg = TRUE;
size = - size;
} else
- bp->isneg = FALSE;
+ bp->obj.body.isneg = FALSE;
if (size <= 1) {
uintmax_t val, ans;
if (size == 0)
val = 0;
else
- val = bp->limbs[0];
- if (bp->isneg) {
+ val = bp->obj.body.limbs[0];
+ if (bp->obj.body.isneg) {
/*
* We only fit if val in [1, 2^(CHAR_BIT * OBJPTR_SIZE - 2)].
*/
@@ -158,11 +158,11 @@
return (objptr)(ans<<1 | 1);
}
}
- setFrontier (s, (pointer)(&bp->limbs[size]), bytes);
+ setFrontier (s, (pointer)(&bp->obj.body.limbs[size]), bytes);
bp->counter = 0;
bp->length = size + 1; /* +1 for isneg field */
bp->header = GC_INTINF_HEADER;
- return pointerToObjptr ((pointer)&bp->isneg, s->heap.start);
+ return pointerToObjptr ((pointer)&bp->obj, s->heap.start);
}
static inline objptr binary (objptr lhs, objptr rhs, size_t bytes,
@@ -346,20 +346,20 @@
assert (base == 2 || base == 8 || base == 10 || base == 16);
fillIntInfArg (&gcState, arg, &argmpz, argspace);
sp = (GC_string8)gcState.frontier;
- str = mpz_get_str((void*)&sp->chars, base, &argmpz);
- assert (str == (char*)&sp->chars);
+ str = mpz_get_str((void*)&sp->obj, base, &argmpz);
+ assert (str == (char*)&sp->obj);
size = strlen(str);
- if (sp->chars.c[0] == '-')
- sp->chars.c[0] = '~';
+ if (sp->obj.body.chars[0] == '-')
+ sp->obj.body.chars[0] = '~';
if (base > 0)
for (unsigned int i = 0; i < size; i++) {
- char c = sp->chars.c[i];
+ char c = sp->obj.body.chars[i];
if (('a' <= c) && (c <= 'z'))
- sp->chars.c[i] = c + ('A' - 'a');
+ sp->obj.body.chars[i] = c + ('A' - 'a');
}
- setFrontier (&gcState, (pointer)&sp->chars + size, bytes);
+ setFrontier (&gcState, (pointer)&sp->obj + size, bytes);
sp->counter = 0;
sp->length = size;
sp->header = GC_STRING8_HEADER;
- return pointerToObjptr ((pointer)&sp->chars, gcState.heap.start);
+ return pointerToObjptr ((pointer)&sp->obj, gcState.heap.start);
}
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 2006-09-05 22:22:33 UTC (rev 4694)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.h 2006-09-06 01:25:13 UTC (rev 4695)
@@ -9,16 +9,28 @@
#if (defined (MLTON_GC_INTERNAL_TYPES))
/* Layout of intInfs.
- * Note, the value passed around is a pointer to the isneg member.
+ * Note, the value passed around is a pointer to the obj member.
*/
typedef struct GC_intInf {
GC_arrayCounter counter;
GC_arrayLength length;
GC_header header;
- mp_limb_t isneg;
- mp_limb_t limbs[];
+ union {
+ struct {
+ mp_limb_t isneg;
+ mp_limb_t limbs[1];
+ } body;
+ pointerAux _p; /* alignment */
+ } obj;
} *GC_intInf;
+COMPILE_TIME_ASSERT(GC_intInf__fields_packed,
+ offsetof(struct GC_intInf, obj) == sizeof(GC_arrayCounter) + sizeof(GC_arrayLength) + sizeof(GC_header));
+COMPILE_TIME_ASSERT(GC_intInf__isneg_packed,
+ offsetof(struct GC_intInf, obj.body.isneg) == offsetof(struct GC_intInf, obj));
+COMPILE_TIME_ASSERT(GC_intInf__limbs_packed,
+ offsetof(struct GC_intInf, obj.body.limbs) == offsetof(struct GC_intInf, obj) + sizeof(mp_limb_t));
+
#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */
#if (defined (MLTON_GC_INTERNAL_FUNCS))
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/string.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/string.h 2006-09-05 22:22:33 UTC (rev 4694)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/string.h 2006-09-06 01:25:13 UTC (rev 4695)
@@ -9,18 +9,25 @@
#if (defined (MLTON_GC_INTERNAL_TYPES))
/* Layout of strings.
- * Note, the value passed around is a pointer to the chars member.
+ * Note, the value passed around is a pointer to the obj member.
*/
typedef struct GC_string8 {
GC_arrayCounter counter;
GC_arrayLength length;
GC_header header;
union {
- char c[1];
- pointerAux p;
- } chars;
+ struct {
+ char chars[1];
+ } body;
+ pointerAux _p; /* alignment */
+ } obj;
} *GC_string8;
+COMPILE_TIME_ASSERT(GC_string8__fields_packed,
+ offsetof(struct GC_string8, obj) == sizeof(GC_arrayCounter) + sizeof(GC_arrayLength) + sizeof(GC_header));
+COMPILE_TIME_ASSERT(GC_string8__chars_packed,
+ offsetof(struct GC_string8, obj.body.chars) == offsetof(struct GC_string8, obj));
+
#endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */
#if (defined (MLTON_GC_INTERNAL_FUNCS))
|
|
From: Matthew F. <fl...@ml...> - 2006-09-05 15:22:34
|
Revised variable naming.
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/Real-ops.h
U mlton/branches/on-20050822-x86_64-branch/runtime/basis/Word/Word-ops.h
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/Real-ops.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/Real-ops.h 2006-09-05 20:49:04 UTC (rev 4693)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Real/Real-ops.h 2006-09-05 22:22:33 UTC (rev 4694)
@@ -31,22 +31,22 @@
MLTON_CODEGEN_STATIC_INLINE \
Real##size##_t Real##size##_fetch (Ref(Real##size##_t) rp) { \
Real##size##OrWord32s u; \
- Word32_t *wp; \
- wp = (Word32_t*)rp; \
- u.ws[0] = wp[0]; \
+ Word32_t *wsp; \
+ wsp = (Word32_t*)rp; \
+ u.ws[0] = wsp[0]; \
if ((sizeof(Real##size##_t) / sizeof(Word32_t)) > 1) \
- u.ws[1] = wp[1]; \
+ u.ws[1] = wsp[1]; \
return u.r; \
} \
MLTON_CODEGEN_STATIC_INLINE \
void Real##size##_store (Ref(Real##size##_t) rp, Real##size##_t r) { \
Real##size##OrWord32s u; \
- Word32_t *wp; \
- wp = (Word32_t*)rp; \
+ Word32_t *wsp; \
+ wsp = (Word32_t*)rp; \
u.r = r; \
- wp[0] = u.ws[0]; \
+ wsp[0] = u.ws[0]; \
if ((sizeof(Real##size##_t) / sizeof(Word32_t)) > 1) \
- wp[1] = u.ws[1]; \
+ wsp[1] = u.ws[1]; \
return; \
} \
MLTON_CODEGEN_STATIC_INLINE \
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/basis/Word/Word-ops.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/basis/Word/Word-ops.h 2006-09-05 20:49:04 UTC (rev 4693)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/basis/Word/Word-ops.h 2006-09-05 22:22:33 UTC (rev 4694)
@@ -49,35 +49,35 @@
#define misaligned(size) \
typedef volatile union { \
- Word##size##_t r; \
+ Word##size##_t w; \
Word32_t ws[sizeof(Word##size##_t) / sizeof(Word32_t)]; \
} Word##size##OrWord32s; \
MLTON_CODEGEN_STATIC_INLINE \
- Word##size##_t Word##size##_fetch (Ref(Word##size##_t) rp) { \
+ Word##size##_t Word##size##_fetch (Ref(Word##size##_t) wp) { \
Word##size##OrWord32s u; \
- Word32_t *wp; \
- wp = (Word32_t*)rp; \
- u.ws[0] = wp[0]; \
+ Word32_t *wsp; \
+ wsp = (Word32_t*)wp; \
+ u.ws[0] = wsp[0]; \
if ((sizeof(Word##size##_t) / sizeof(Word32_t)) > 1) \
- u.ws[1] = wp[1]; \
- return u.r; \
+ u.ws[1] = wsp[1]; \
+ return u.w; \
} \
MLTON_CODEGEN_STATIC_INLINE \
- void Word##size##_store (Ref(Word##size##_t) rp, Word##size##_t r) { \
+ void Word##size##_store (Ref(Word##size##_t) wp, Word##size##_t w) { \
Word##size##OrWord32s u; \
- Word32_t *wp; \
- wp = (Word32_t*)rp; \
- u.r = r; \
- wp[0] = u.ws[0]; \
+ Word32_t *wsp; \
+ wsp = (Word32_t*)wp; \
+ u.w = w; \
+ wsp[0] = u.ws[0]; \
if ((sizeof(Word##size##_t) / sizeof(Word32_t)) > 1) \
- wp[1] = u.ws[1]; \
+ wsp[1] = u.ws[1]; \
return; \
} \
MLTON_CODEGEN_STATIC_INLINE \
void Word##size##_move (Ref(Word##size##_t) dst, Ref(Word##size##_t) src) { \
- Word##size##_t r; \
- r = Word##size##_fetch (src); \
- Word##size##_store (dst, r); \
+ Word##size##_t w; \
+ w = Word##size##_fetch (src); \
+ Word##size##_store (dst, w); \
return; \
}
@@ -123,10 +123,12 @@
misaligned(64)
#undef all
-#undef binary
-#undef bothBinary
+#undef misaligned
+#undef unary
+#undef shift
+#undef ror
+#undef rol
#undef bothCompare
#undef compare
-#undef misaligned
-#undef shift
-#undef unary
+#undef bothBinary
+#undef binary
|
|
From: Matthew F. <fl...@ml...> - 2006-09-05 13:49:05
|
Match function definition types with function prototype types.
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c 2006-08-25 16:16:45 UTC (rev 4692)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c 2006-09-05 20:49:04 UTC (rev 4693)
@@ -268,7 +268,7 @@
return unary (arg, bytes, &mpz_com);
}
-static objptr shary (objptr arg, uint32_t shift, size_t bytes,
+static objptr shary (objptr arg, Word32_t shift, size_t bytes,
void(*shop)(__mpz_struct *resmpz,
__gmp_const __mpz_struct *argspace,
unsigned long shift))
@@ -282,14 +282,14 @@
return finiIntInfRes (&gcState, &resmpz, bytes);
}
-objptr IntInf_arshift (objptr arg, uint32_t shift, size_t bytes) {
+objptr IntInf_arshift (objptr arg, Word32_t shift, size_t bytes) {
if (DEBUG_INT_INF)
fprintf (stderr, "IntInf_arshift ("FMTOBJPTR", %"PRIu32", %zu)\n",
arg, shift, bytes);
return shary (arg, shift, bytes, &mpz_fdiv_q_2exp);
}
-objptr IntInf_lshift (objptr arg, uint32_t shift, size_t bytes) {
+objptr IntInf_lshift (objptr arg, Word32_t shift, size_t bytes) {
if (DEBUG_INT_INF)
fprintf (stderr, "IntInf_lshift ("FMTOBJPTR", %"PRIu32", %zu)\n",
arg, shift, bytes);
|
|
From: Henry C. <he...@ml...> - 2006-08-25 17:55:42
|
Make Real*.toManExp, split and gdtoa thread (and signal) safe using the
One structure.
----------------------------------------------------------------------
U mlton/trunk/basis-library/real/real.fun
----------------------------------------------------------------------
Modified: mlton/trunk/basis-library/real/real.fun
===================================================================
--- mlton/trunk/basis-library/real/real.fun 2006-08-08 02:49:11 UTC (rev 4691)
+++ mlton/trunk/basis-library/real/real.fun 2006-08-25 16:16:45 UTC (rev 4692)
@@ -88,7 +88,7 @@
| SOME (_, c) => c
end
end
-
+
val abs =
if MLton.Codegen.isNative
then abs
@@ -98,7 +98,7 @@
INF => posInf
| NAN => x
| _ => if signBit x then ~x else x
-
+
fun isFinite r =
case class r of
INF => false
@@ -175,7 +175,7 @@
| I.LESS => G.LESS
| I.UNORDERED => raise IEEEReal.Unordered
end
-
+
fun unordered (x, y) = isNan x orelse isNan y
val nextAfter: real * real -> real =
@@ -202,22 +202,23 @@
then doit (r, t)
else ~ (doit (~r, ~t))
end
-
+
val toManExp =
let
- val r: int ref = ref 0
+ val one = One.make (fn () => ref 0)
in
fn x =>
case class x of
INF => {exp = 0, man = x}
| NAN => {exp = 0, man = nan}
| ZERO => {exp = 0, man = x}
- | _ =>
- let
- val man = Prim.frexp (x, r)
- in
- {exp = !r, man = man}
- end
+ | _ =>
+ One.use (one, fn r =>
+ let
+ val man = Prim.frexp (x, r)
+ in
+ {exp = !r, man = man}
+ end)
end
fun fromManExp {exp, man} = Prim.ldexp (man, exp)
@@ -234,17 +235,17 @@
| _ => fromManExp {exp = exp, man = man}
local
- val int = ref zero
+ val one = One.make (fn () => ref zero)
in
fun split x =
case class x of
INF => {frac = if x > zero then zero else ~zero,
whole = x}
| NAN => {frac = nan, whole = nan}
- | _ =>
+ | _ =>
let
- val frac = Prim.modf (x, int)
- val whole = !int
+ val (frac, whole) = One.use (one, fn int =>
+ (Prim.modf (x, int), ! int))
(* Some platforms' C libraries don't get sign of zero right.
*)
fun fix y =
@@ -259,7 +260,7 @@
end
val realMod = #frac o split
-
+
fun checkFloat x =
case class x of
INF => raise Overflow
@@ -274,7 +275,7 @@
TO_NEAREST
(IEEEReal.withRoundingMode (m, fn () =>
(Primitive.Real64.round (toLarge x))))
-
+
fun toInt mode x =
case class x of
INF => raise Overflow
@@ -305,7 +306,7 @@
then raise Overflow
else Int.minInt')
else raise Overflow
-
+
val floor = toInt TO_NEGINF
val ceil = toInt TO_POSINF
val trunc = toInt TO_ZERO
@@ -391,7 +392,7 @@
(* toDecimal, fmt, toString: binary -> decimal conversions. *)
datatype mode = Fix | Gen | Sci
local
- val decpt: int ref = ref 0
+ val one = One.make (fn () => ref 0)
in
fun gdtoa (x: real, mode: mode, ndig: int) =
let
@@ -400,12 +401,12 @@
Fix => 3
| Gen => 0
| Sci => 2
- val cs = Prim.gdtoa (x, mode, ndig, decpt)
in
- (cs, !decpt)
+ One.use (one, fn decpt =>
+ (Prim.gdtoa (x, mode, ndig, decpt), !decpt))
end
end
-
+
fun toDecimal (x: real): IEEEReal.decimal_approx =
case class x of
INF => {class = INF,
@@ -420,7 +421,7 @@
digits = [],
exp = 0,
sign = signBit x}
- | c =>
+ | c =>
let
val (cs, exp) = gdtoa (x, Gen, 0)
fun loop (i, ac) =
@@ -441,7 +442,7 @@
datatype realfmt = datatype StringCvt.realfmt
fun add1 n = Int.+ (n, 1)
-
+
local
fun fix (sign: string, cs: C.CS.t, decpt: int, ndig: int): string =
let
@@ -457,7 +458,7 @@
decpt),
#"0")]
else
- let
+ let
val whole =
if decpt = 0
then "0"
@@ -522,7 +523,7 @@
case class x of
INF => if x > zero then "inf" else "~inf"
| NAN => "nan"
- | _ =>
+ | _ =>
let
val (prefix, x) =
if x < zero
@@ -618,7 +619,7 @@
| _ => doit x
end
end
-
+
val toString = fmt (StringCvt.GEN NONE)
val fromLargeInt: LargeInt.int -> real =
@@ -633,9 +634,9 @@
val x = Prim.strto (NullString.fromString
(concat [LargeInt.toString i, "\000"]))
in
- if sign then ~ x else x
+ if sign then ~ x else x
end
-
+
val toLargeInt: IEEEReal.rounding_mode -> real -> LargeInt.int =
fn mode => fn x =>
case class x of
@@ -651,14 +652,14 @@
in
case class x of
INF => raise Overflow
- | _ =>
+ | _ =>
if minInt <= x andalso x <= maxInt
then LargeInt.fromInt (Prim.toInt x)
else
valOf
(LargeInt.fromString (fmt (StringCvt.FIX (SOME 0)) x))
end
-
+
structure Math =
struct
open Prim.Math
@@ -666,7 +667,7 @@
(* Patch functions to handle out-of-range args. Many C math
* libraries do not do what the SML Basis Spec requires.
*)
-
+
local
fun patch f x =
if x < ~one orelse x > one
@@ -761,13 +762,13 @@
INF => x
| ZERO => one
| _ => R.Math.cosh x
-
+
fun sinh x =
case class x of
INF => x
| ZERO => x
| _ => R.Math.sinh x
-
+
fun tanh x =
case class x of
INF => if x > zero then one else negOne
|
|
From: Stephen W. <sw...@ml...> - 2006-08-07 19:49:12
|
Simplified "profile" target. ---------------------------------------------------------------------- U mlton/branches/on-20050822-x86_64-branch/Makefile ---------------------------------------------------------------------- Modified: mlton/branches/on-20050822-x86_64-branch/Makefile =================================================================== --- mlton/branches/on-20050822-x86_64-branch/Makefile 2006-08-04 05:48:22 UTC (rev 4690) +++ mlton/branches/on-20050822-x86_64-branch/Makefile 2006-08-08 02:49:11 UTC (rev 4691) @@ -244,21 +244,17 @@ .PHONY: profiled profiled: - $(MAKE) -C "$(COMP)" "AOUT=$(AOUT).alloc" COMPILE_ARGS="-profile alloc" - $(CP) "$(COMP)/$(AOUT).alloc" "$(LIB)/" - $(MAKE) -C "$(COMP)" "AOUT=$(AOUT).count" COMPILE_ARGS="-profile count" - $(CP) "$(COMP)/$(AOUT).count" "$(LIB)/" - $(MAKE) -C "$(COMP)" "AOUT=$(AOUT).time" COMPILE_ARGS="-profile time" - $(CP) "$(COMP)/$(AOUT).time" "$(LIB)/" - "$(LIB)/$(AOUT).alloc" @MLton -- "$(LIB)/world.alloc" - "$(LIB)/$(AOUT).count" @MLton -- "$(LIB)/world.count" - "$(LIB)/$(AOUT).time" @MLton -- "$(LIB)/world.time" - sed 's/mlton-compile/mlton-compile.alloc/' < "$(MLTON)" | sed 's/world.mlton/world.alloc.mlton/' > "$(MLTON).alloc" - sed 's/mlton-compile/mlton-compile.count/' < "$(MLTON)" | sed 's/world.mlton/world.count.mlton/' > "$(MLTON).count" - sed 's/mlton-compile/mlton-compile.time/' < "$(MLTON)" | sed 's/world.mlton/world.time.mlton/' > "$(MLTON).time" - chmod a+x "$(MLTON).alloc" - chmod a+x "$(MLTON).count" - chmod a+x "$(MLTON).time" + for t in alloc count time; do \ + $(MAKE) -C "$(COMP)" "AOUT=$(AOUT).$$t" \ + COMPILE_ARGS="-profile $$t"; \ + $(CP) "$(COMP)/$(AOUT).$$t" "$(LIB)/"; \ + "$(LIB)/$(AOUT).$$t" @MLton -- "$(LIB)/world.$$t"; \ + sed "s/mlton-compile/mlton-compile.$$t/" \ + <"$(MLTON)" | \ + sed "s/world.mlton/world.$$t.mlton/" \ + >"$(MLTON).$$t"; \ + chmod a+x "$(MLTON).$$t"; \ + done TOPDIR = 'TOPDIR-unset' SOURCEDIR = $(TOPDIR)/SOURCES/mlton-$(VERSION) |
|
From: Stephen W. <sw...@ml...> - 2006-08-03 22:55:01
|
Fixed bug in the "useless" SSA optimization pass, caused by calling an
imported C function and then ignoring the result. The useless pass
eliminated the result, which changed the return type of the call, and
led to a type error. The fix was simply to force FFI arguments and
results to be useful.
----------------------------------------------------------------------
U mlton/trunk/doc/changelog
U mlton/trunk/mlton/ssa/useless.fun
----------------------------------------------------------------------
Modified: mlton/trunk/doc/changelog
===================================================================
--- mlton/trunk/doc/changelog 2006-07-19 02:50:56 UTC (rev 4689)
+++ mlton/trunk/doc/changelog 2006-08-04 05:48:22 UTC (rev 4690)
@@ -1,5 +1,9 @@
Here are the changes since version 20051202.
+* 2006-08-03
+ - Fixed a bug in the "useless" SSA optimization, caused by calling
+ an imported C function and then ignoring the result.
+
* 2006-06-24
- Fixed a bug in pass to flatten data structures. Thanks to Joe Hurd
for the bug report.
Modified: mlton/trunk/mlton/ssa/useless.fun
===================================================================
--- mlton/trunk/mlton/ssa/useless.fun 2006-07-19 02:50:56 UTC (rev 4689)
+++ mlton/trunk/mlton/ssa/useless.fun 2006-08-04 05:48:22 UTC (rev 4690)
@@ -520,6 +520,9 @@
(unify (l, l'); unifySlot (e, e'))
| _ => Error.bug "Useless.primApp: Array_toVector")
| Array_update => update ()
+ | FFI _ =>
+ (Vector.foreach (args, deepMakeUseful);
+ deepMakeUseful result)
| MLton_equal => Vector.foreach (args, deepMakeUseful)
| Ref_assign => coerce {from = arg 1, to = deref (arg 0)}
| Ref_deref => return (deref (arg 0))
|
|
From: Stephen W. <sw...@ml...> - 2006-07-18 19:50:59
|
Improved typedef for GC_{card,cross}MapStart.
----------------------------------------------------------------------
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.h
U mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c
----------------------------------------------------------------------
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.h
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.h 2006-07-18 01:33:00 UTC (rev 4688)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/generational.h 2006-07-19 02:50:56 UTC (rev 4689)
@@ -15,8 +15,8 @@
typedef uint8_t GC_cardMapElem;
typedef uint8_t GC_crossMapElem;
-typedef uint8_t GC_cardMapStart __attribute__ ((aligned (4)));
-typedef uint8_t GC_crossMapStart __attribute__ ((aligned (4)));
+typedef GC_cardMapElem GC_cardMapStart __attribute__ ((aligned (4)));
+typedef GC_crossMapElem GC_crossMapStart __attribute__ ((aligned (4)));
typedef GC_cardMapStart *GC_cardMap;
typedef GC_crossMapStart *GC_crossMap;
Modified: mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c
===================================================================
--- mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c 2006-07-18 01:33:00 UTC (rev 4688)
+++ mlton/branches/on-20050822-x86_64-branch/runtime/gc/int-inf.c 2006-07-19 02:50:56 UTC (rev 4689)
@@ -347,7 +347,7 @@
fillIntInfArg (&gcState, arg, &argmpz, argspace);
sp = (GC_string8)gcState.frontier;
str = mpz_get_str((void*)&sp->chars, base, &argmpz);
- assert (str == &sp->chars);
+ assert (str == (char*)&sp->chars);
size = strlen(str);
if (sp->chars.c[0] == '-')
sp->chars.c[0] = '~';
|