Debian Codegraph @

doc/CHANGELOG.adoc

raw
1 = CHANGELOG
2
3 * 2025-10-29
4 ** Fix bug in `DeepFlatten` SSA2 optimization. Thanks to Tom
5 Schollenberger (tommyscholly) for the bug report.
6
7 * 2025-10-04
8 ** Fix bug in `Useless` SSA optimization. Thanks to Humza Shahid
9 (hummy123) for the bug report.
10
11 * 2025-06-23
12 ** Add (expert) `-profile-tail-call-opt {always|self-only|never}`
13 compile-time option that controls how the `SSA{,2}Shrink`
14 optimization optimizes tail calls in the presence of profiling.
15
16 * 2025-05-23
17 ** Update SML/NJ libraries to SML/NJ 110.99.8 and fix bug in
18 `MonoBufferFn`.
19
20 == Version 20241230
21
22 Here are the changes from version 20210117 to 20241230.
23
24 === Summary
25
26 * Compiler.
27 ** Enhance and fix bugs in `Useless` and `ConstantPropagation` SSA
28 optimization passes.
29 ** Update LLVM codegen; using the LLVM codegen requires LLVM 15 (or
30 higher).
31 ** Update elaboration error messages involving constants and infix
32 patterns and expressions.
33 ** Accept a non-semicolon terminated final expression in the syntax
34 of programs.
35 ** Eliminate (expert) `-profile time-label` compile-time option.
36 ** Fix `-pi-style pie` compile-time option.
37 * Runtime.
38 ** Fix bug in heap resizing that could lead to a segmentation fault.
39 ** Fix bug with `-align 4` and mark-compact GC.
40 ** Fix bug in `GC_sequenceCopy` failing to update card map when
41 copying object pointers.
42 * Libraries.
43 ** Basis Library.
44 *** Fix bug in `ImperativeIO.getInstream`.
45 *** Fix bug in `Date.localOffset` for time zones east of prime
46 meridian.
47 *** Fix bugs in `WORD.scan` when `0` is followed by `w` or `x` or
48 `wx` but not by more digits.
49 ** Other libraries.
50 *** Updated: ckit library, MLLPT library, MLRISC library, SML/NJ library
51 * Other.
52 ** Add preliminary support for `wasm32-wasi`.
53 ** Add support for `loongarch64` architecture.
54 ** Update ``Makefile``s to simplify bootstrapping.
55
56 === Details
57
58 * 2024-12-20
59 ** Fix bug in the optimization of representations of sequences in
60 `Useless` SSA optimization. Thanks to Humza Shahid (hummy123) for
61 the bug report.
62
63 * 2024-12-14
64 ** Update SML/NJ libraries to SML/NJ 110.99.6.1.
65
66 * 2024-08-09
67 ** Update the LLVM codegen to generate LLVM IR using opaque
68 pointers; using the LLVM codegen requires LLVM 15 (or higher).
69
70 * 2024-05-22
71 ** Optimize representation of sequences in `Useless` SSA
72 optimization.
73
74 * 2024-05-21
75 ** Add support for WebAssembly architecture (`wasm32`) and WASI
76 "operating system", available together as the `wasm32-wasi`
77 platform. Thanks to Adam Goode for the pull request.
78
79 * 2024-05-16
80 ** Fix bug in heap resizing that could lead to segmentation fault.
81 Thanks to Humza Shahid (hummy123) for the bug report.
82
83 * 2024-05-15
84 ** Fix bug in handling of `WordXVector` constants in `Useless` SSA
85 optimization that could lead to internal compiler errors. Thanks to
86 Humza Shahid (hummy123) for the bug report.
87
88 * 2024-05-13
89 ** Fix bug in `#line` directives that fails to acceptable
90 `(*#line line "file"*)`, which should be accepted with a default
91 column of 1. Thanks to Norman Ramsey for the bug report.
92
93 * 2024-03-28
94 ** Update default `-link-opt` options for `*-openbsd` platforms.
95 Thanks to Dan Cross for the pull request.
96
97 * 2024-03-17
98 ** Update elaboration error messages involving constants and infix
99 patterns and expressions.
100
101 * 2024-01-19
102 ** Add support for LoongArch64 architecture. Thanks to JiaLing
103 Zhang for the pull request.
104
105 * 2023-11-22
106 ** Fix bug in `ImperativeIO.getInstream`. Thanks to Murray Calavera
107 (ii8) for the bug report.
108
109 * 2023-11-17
110 ** Fix bug with `-align 4` and mark-compact GC.
111
112 * 2023-11-11
113 ** Fix bug/inefficiency in register allocation for x86
114 floating-point stack.
115
116 * 2023-11-09
117 ** Fix bug in frame allocation of handler offset and args that
118 could, in rare circumstances, lead to a `Machine.typeCheck` internal
119 compiler error.
120
121 * 2023-11-08
122 ** Eliminate ``bash``isms from `bin/mlton` script. Thanks to Murray
123 Calavera (ii8) for the pull request.
124
125 * 2023-08-31
126 ** Fix bug in x86 and amd64 native codegens leading to an internal
127 compiler error
128 (`Fail: amd64AllocateRegisters.RegisterAllocation.toAddressMemLoc:disp`).
129 Thanks to Darin Minamoto (DarinM223) for the bug report.
130
131 * 2023-07-28
132 ** Fix bug in `Date.localOffset` for time zones east of prime
133 meridian. Thanks to Arata Mizuki (minoki) for the bug report and
134 suggested fix.
135
136 * 2023-07-21
137 ** Update default `-cc-opt` and `-link-opt` options for
138 `powerpc-darwin` and `powerpc64-darwin` platforms.
139
140 * 2023-05-29
141 ** Fix bugs in `WORD.scan` when `0` is followed by `w` or `x` or
142 `wx` but not by more digits. Thanks to Arata Mizuki (minoki) for
143 the bug report.
144
145 * 2023-05-26
146 ** Update SML/NJ libraries to SML/NJ 110.99.3.
147
148 * 2023-05-22
149 ** Adapt default `-llvm-opt-opt` options to LLVM's "New Pass
150 Manager"; using the LLVM codegen requires LLVM 14 (or higher).
151
152 * 2022-11-16
153 ** Fix bug in `GC_sequenceCopy` failing to update card map when
154 copying object pointers. Thanks to Chris Cannam for the bug report
155 and debugging.
156
157 * 2022-03-16
158 ** Fix (latent) bug with amd64 and LLVM codegens calling C functions
159 with signed 8-bit and 16-bit arguments.
160
161 * 2022-02-20
162 ** Fix bug with `-profile time` leading to a segmentation fault.
163 Thanks to Byron Zhong for the bug report.
164
165 * 2022-01-11
166 ** Accept a non-semicolon terminated final expression in the syntax
167 of programs. Thanks to Krzysztof Leśniak (serpent7776) for the
168 discussion and grammar patch.
169
170 * 2022-01-10
171 ** Update ``Makefile``s to simplify bootstrapping.
172
173 * 2021-12-17
174 ** Fix bug in `ConstantPropagation` with vector literals. Thanks to
175 Ram Raghunathan for the bug report.
176 ** Update signal-handling infrastructure. Properly mark data
177 accessed by a signal handler as `volatile`. Merge `SignalCheck` and
178 `LimitCheck` passes into a single `InsertChecks` pass to avoid
179 insertion of redundant checks.
180 ** Fix mismatch in C and SML types for some `_import`-ed runtime
181 functions.
182
183 * 2021-10-21
184 ** Migrate website sources from http://asciidoc.org/[AsciiDoc] to
185 http://asciidoctor.org/[AsciiDoctor].
186
187 * 2021-08-19
188 ** Simplify time profiling by eliminating the `ProfileTimeLabel`
189 approach and supporting infrastructure. The `ProfileTimeField`
190 approach remains and works with all codegens and most platforms.
191
192 * 2021-08-03
193 ** Updates to `ConstantPropagation` to support constant folding and
194 propagation of `WordXVector` constants.
195
196 * 2021-02-15
197 ** Fix `-pi-style pie` compile-time option. Thanks to Jo Henke for
198 the patch.
199
200 == Version 20210117
201
202 Here are the changes from version 20201002 to 20210117.
203
204 === Summary
205
206 * Compiler.
207 ** Fix bug in `SimplifyTypes` SSA optimization pass.
208 * Libraries.
209 ** Other libraries.
210 *** Updated: ckit library, MLLPT library, MLRISC library, SML/NJ library
211 * Other.
212 ** Preliminary support for `arm64-darwin`.
213 ** Fix bug in `Makefile.binary` detecting default position-independent style.
214
215 === Details
216
217 * 2021-01-17
218 ** Update SML/NJ libraries to SML/NJ 110.99.
219
220 * 2021-01-15
221 ** Fix bug in `Makefile.binary` detecting default position-independent style.
222 Thanks to Greg Werbin for the bug report.
223 ** Preliminary support for `arm64-darwin` ("Apple Silicon"). Thanks to Chris
224 Cannam for the patches.
225
226 * 2020-10-22
227 ** Fix bug in `SimplifyTypes` SSA optimization pass. Thanks to Martin Elsman
228 for the bug report.
229
230 == Version 20201002
231
232 Here are the changes from version 20200817 to version 20201002.
233
234 === Summary
235
236 * Compiler.
237 ** Fixed bug in handling of weak objects during mark-compact GC.
238
239 === Details
240
241 * 2020-09-20
242 ** Fix bug in handling of weak objects during mark-compact GC. Thanks to
243 Bernard Berthomieu for the bug report.
244
245 == Version 20200817
246
247 Here are the changes from version 20200722 to version 20200817
248
249 === Summary
250
251 * Compiler.
252 ** Fixed bug in `RssaShrink` optimization that would result in an unbound
253 variable and an internal compiler error.
254 * Other.
255 ** Fixes for Solaris and MinGW platforms.
256
257 === Details
258
259 * 2020-07-30
260 ** Fix bug in jump-chaining optimization of `RssaShrink` that would
261 result in an unbound variable and an internal compiler error.
262
263 == Version 20200722
264
265 Here are the changes from version 20180206 to version 20200722.
266
267 === Summary
268
269 * Compiler.
270 ** Added expert `-pi-style {default|npi|pic|pie}` and
271 `-native-pic {false|true}` options, which can be used to override a
272 target-determined default.
273 ** Fix a number of instances of excessive live data during
274 compilation.
275 ** Disable `Zone` SSA optimization pass by default; the `Zone` pass
276 is known to not be safe-for-space.
277 ** Statically allocate and initialize some global objects.
278 ** Many updates and improvements to C and LLVM codegens.
279 ** Add new `BounceVars` RSSA optimization pass to split the live
280 ranges of RSSA variables.
281 ** Improve `RssaShrink` optimization.
282 ** Add support for alternate globalization strategies in
283 `ConstantPropagation`.
284 ** Strengthen `Useless` optimization with respect to a number of
285 primitives.
286 ** Add new `DuplicateGlobals` and `SplitTypes` SSA optimization
287 passes.
288 ** Introduce new `Overflow`-checking primitives and remove old
289 `Overflow`-checking primitives and special-case code required (e.g.,
290 `Arith` transfers in IRs) to support them.
291 ** Add parsers for XML, SXML, SSA, and SSA2 IRs.
292 * Runtime.
293 ** Detect and report incompatible use of ASLR/PIE on `load-world`.
294 ** Added support for RISC-V architecture.
295 * Language.
296 * Libraries.
297 ** Basis Library.
298 *** Change `OS.IO.poll` to not be restarted when interrupted by a
299 signal. (This is consistent with `Socket.select`.)
300 *** Add `+MLton.sizeAll: unit -> IntInf.int+` that returns the size
301 of reachable live data.
302 *** Change type of `MLton.size` from `+'a -> int+` to
303 `+'a -> IntInf.int+`, because with 64-bit systems, the size of a
304 single object can exceed that representable by a signed 32-bit
305 integer.
306 ** Other libraries.
307 *** Updated: ckit library, MLLPT library, MLRISC library, SML/NJ library
308 * Tools.
309 * Other.
310 ** Updates to simplify porting MLton.
311 ** Support parallel build (i.e., `make -j`). This mainly supports
312 platforms/packagers that use a parallel `make` by default; it does
313 not obtain significant build speedups.
314 ** Various updates to ``Makefile``s. See `Makefile.config` for
315 common and user-customizable configuration.
316 ** Characterize MLton-LICENSE as an instance of the Historical
317 Permission Notice and Disclaimer (HPND) license, rather than
318 BSD-style.
319
320 === Details
321
322 * 2020-07-18
323 ** Update SML/NJ libraries to SML/NJ 110.98.
324
325 * 2020-07-08
326 ** Fix `Real{32,64}_gdtoa` race condition.
327
328 * 2020-07-07
329 ** Upgrade `gdtoa.tgz`.
330
331 * 2020-06-28
332 ** Update SML/NJ libraries to SML/NJ 110.97.
333
334 * 2020-05-28
335 ** Fix bug in running `blockFn`-s for `CML.sync`.
336
337 * 2020-05-23
338 ** Updates to simplify porting MLton. Add `remote-bootstrap` and
339 `remote-add-cross-target` goals to `Makefile`. The
340 `remote-bootstrap` goal automates the process of bootstraping MLton
341 on a remote machine that doesn't have a suitable pre-compiled
342 `mlton` binary. The `remote-add-cross-target` goal automatesthe
343 process of adding a cross-compiler target. These goals replace
344 `bin/add-cross` and `bin/save-bootstrap-source`.
345
346 * 2020-05-12
347 ** Fix infinte loop with jump chaining in `RssaShrink`.
348
349 * 2020-03-11
350 ** Fix `String.scan` to return `NONE` if first character is
351 non-printable.
352
353 * 2020-02-14
354 ** Fix bug in `SimplifyTypes` SSA optimization pass.
355
356 * 2020-01-22
357 ** Add expert `-pi-style {default|npi|pic|pie}` and
358 `-native-pic {false|true}` options, which can be used to override a
359 target-determined default. See
360 https://github.com/MLton/mlton/pull/365 for details.
361
362 * 2020-01-21
363 ** Support parallel build (i.e., `make -j`). This mainly supports
364 platforms/packagers that use a parallel `make` by default; it does
365 not obtain significant build speedups.
366
367 * 2020-01-11
368 ** Revise implementation of statically allocated and initialized
369 global objects.
370
371 * 2019-11-22
372 ** Many updates and improvements to C and LLVM codegens. See
373 https://github.com/MLton/mlton/pull/351 for details.
374
375 * 2019-11-05
376 ** Change `OS.IO.poll` to not be restarted when interrupted by a
377 signal. (This is consistent with `Socket.select`.)
378
379 * 2019-11-04
380 ** Detect and report incompatible use of ASLR/PIE on `load-world`.
381 ** Fix bugs in `MLton.size` and `MLton.share`; calling `MLton.size`
382 or `MLton.share` with a non-pointer variant of an object type that
383 could be represented by either a pointer or a non-pointer (e.g., the
384 `NONE` variant of an `int list option`) would segfault.
385
386 * 2019-10-25
387 ** Fix a number of instances of excessive live data during compilation.
388 ** Disable `Zone` SSA optimization pass by default; the `Zone` pass
389 is known to not be safe-for-space.
390 ** Add `+MLton.sizeAll: unit -> IntInf.int+` that returns the size of
391 reachable live data.
392 ** Change type of `MLton.size` from `+'a -> int+` to
393 `+'a -> IntInf.int+`, because with 64-bit systems, the size of a
394 single object can exceed that representable by a signed 32-bit
395 integer.
396
397 * 2019-09-19
398 ** Statically allocate and initialize some global objects. See
399 https://github.com/MLton/mlton/pull/328 for details. Undertaken by
400 Jason Carr at RIT supported by NSF CISE Research Infrastructure
401 (CRI) award.
402
403 * 2019-07-18
404 ** Add `-llvm-aamd {none|tbaa}` to control including alias-analysis
405 metadata when compiling with LLVM. See
406 https://github.com/MLton/mlton/pull/324 for details. Undertaken by
407 Jason Carr at RIT supported by NSF CISE Research Infrastructure
408 (CRI) award.
409
410 * 2019-06-21
411 ** Improved parser combinator library (`structure Parse`) in the
412 MLton Library. Undertaken by Jason Carr at RIT supported by NSF
413 CISE Research Infrastructure (CRI) award.
414
415 * 2019-06-19
416 ** Raise values from raiser to handler via the ML stack. See
417 https://github.com/MLton/mlton/pull/321 for details.
418
419 * 2019-06-17
420 ** Various updates to ``Makefile``s. See `Makefile.config` for
421 common and user-customizable configuration.
422
423 * 2019-06-07
424 ** Refactor pass infrastructure. See
425 https://github.com/MLton/mlton/pull/313 for details.
426
427 * 2019-05-31
428 ** Add new `BounceVars` RSSA optimization pass to split the live
429 ranges of RSSA variables. See
430 https://github.com/MLton/mlton/pull/299 for details. Undertaken by
431 Jason Carr at RIT supported by NSF CISE Research Infrastructure
432 (CRI) award.
433
434 * 2019-05-24
435 ** Many updates and improvements to C and LLVM codegens. See
436 https://github.com/MLton/mlton/pull/304 for details.
437
438 * 2019-05-13
439 ** Improve RSSA shrink optimization. Undertaken by Jason Carr at
440 RIT supported by NSF CISE Research Infrastructure (CRI) award.
441
442 * 2019-03-22
443 ** Update word primitives. Inline signed integer `quot` and `rem`
444 in C codegen (C99 and C11 have reliable semantics for signed
445 division).
446
447 * 2019-03-20
448 ** Remove old `Overflow`-checking primitives and special-case code
449 required to support them. Undertaken by Daman Morris at RIT
450 supported by NSF CISE Research Infrastructure (CRI) award.
451
452 * 2019-03-12
453 ** Fix latent `MLton.GC.collect` bug; an explicit `MLton.GC.collect`
454 call was passed `0` bytes requested rather than the bytes required
455 by the return block(s).
456
457 * 2019-01-16
458 ** Add support for alternate globalization strategies in
459 `ConstantPropagation` (but defaults correspond to previous
460 behavior).
461
462 * 2019-01-03
463 ** Strengthen `Useless` optimization with respect to a number of primitives
464 (`MLton_equal`, `MLton_hash`, `MLton_eq`, `MLton_share`, `MLton_size`,
465 `Weak_canGet`, and `MLton_touch`).
466 ** Add new `DuplicateGlobals` and `SplitTypes` SSA optimization passes.
467 `DuplicateGlobals` introduces a distinct instance of a `ConApp` global for
468 each distict use within the program. `SplitTypes` performs a
469 unification-based analysis to split a datatype into distinct instances for
470 constructed values that are not unified. Because datatypes are recursive,
471 other analyses often conflate all defs and uses of `ConApp`-s; `SplitTypes`
472 allows non-unified instances of a datatype to be analyzed separately.
473 Undertaken by Jason Carr at RIT supported by NSF CISE Research Infrastructure
474 (CRI) award.
475
476 * 2018-11-07
477 ** Add support for OpenBSD 6.4, which added stack-pointer register checking to
478 the kernel. On OpenBSD, `%rsp`/`%esp` must be reserved by the native codegens
479 (so as to always point to the C stack) and the signal stack must be `mmap`-ed
480 with `MAP_STACK`. Thanks to Dan Cross for the pull request.
481
482 * 2018-10-15
483 ** Introduce new `Overflow`-checking primitives. Undertaken by Daman Morris
484 at RIT supported by NSF CISE Research Infrastructure (CRI) award.
485
486 * 2018-08-17
487 ** Add a parser for the SSA2 IR (`functor ParseSsa2`). Undertaken by Manan
488 Joshi at RIT supported by NSF CISE Research Infrastructure (CRI) award.
489
490 * 2018-05-18
491 ** Add a parser for the SSA IR (`functor ParseSsa`). Undertaken by James
492 Reilly at RIT supported by NSF CISE Research Infrastructure (CRI) award.
493
494 * 2018-04-28
495 ** Characterize MLton-LICENSE as an instance of the Historical Permission
496 Notice and Disclaimer (HPND) license, rather than BSD-style.
497
498 * 2018-04-04
499 ** Added support for RISC-V architecture. Thanks to Adam Goode for the pull
500 request.
501
502 * 2018-03-31
503 ** Add `./bin/save-bootstrap-source` script to aid bootstrapping on a new
504 platform. Thanks to Adam Goode for the pull request.
505
506 * 2018-03-28
507 ** Recognize `ppc64le` in `./bin/platform` as an instance of `powerpc64`
508 architecture. Thanks to Adam Goode for the pull request.
509
510 * 2018-02-15
511 ** Set `LIB_REL_BIN` in `mlton` script when installing. Some systems (e.g.,
512 x86_64 Fedora) will set `libdir` to `/usr/lib64`, so it is necessary to
513 compute and set the relative path from `TBIN` to `TLIB` when installing
514 `$(TBIN)/mlton`.
515
516 == Version 20180206
517
518 Here are the changes from version 20130715 to version 20180206.
519
520 === Summary
521
522 * Compiler.
523 ** Added an experimental LLVM codegen (`-codegen llvm`); requires LLVM tools
524 (`llvm-as`, `opt`, `llc`) version ≥ 3.7.
525 ** Made many substantial cosmetic improvements to front-end diagnostic
526 messages, especially with respect to source location regions, type inference
527 for `fun` and `val rec` declarations, signature constraints applied to a
528 structure, `sharing type` specifications and `where type` signature
529 expressions, type constructor or type variable escaping scope, and
530 nonexhaustive pattern matching.
531 ** Fixed minor bugs with exception replication, precedence parsing of function
532 clauses, and simultaneous `sharing` of multiple structures.
533 ** Made compilation deterministic (eliminate output executable name from
534 compile-time specified `@MLton` runtime arguments; deterministically generate
535 magic constant for executable).
536 ** Updated `-show-basis` (recursively expand structures in environments,
537 displaying components with long identifiers; append `(* @ region *)`
538 annotations to items shown in environment).
539 ** Forced amd64 codegen to generate PIC on amd64-linux targets.
540 * Runtime.
541 ** Added `gc-summary-file file` runtime option.
542 ** Reorganized runtime support for `IntInf` operations so that programs that
543 do not use `IntInf` compile to executables with no residual dependency on GMP.
544 ** Changed heap representation to store forwarding pointer for an object in
545 the object header (rather than in the object data and setting the header to a
546 sentinel value).
547 * Language.
548 ** Added support for selected SuccessorML features; see
549 http://mlton.org/SuccessorML for details.
550 ** Added `(*#showBasis "file" *)` directive; see
551 http://mlton.org/ShowBasisDirective for details.
552 ** FFI:
553 *** Added `pure`, `impure`, and `reentrant` attributes to `_import`. An
554 unattributed `_import` is treated as `impure`. A `pure` `_import` may be
555 subject to more aggressive optimizations (common subexpression elimination,
556 dead-code elimination). An `_import`-ed C function that (directly or
557 indirectly) calls an `_export`-ed SML function should be attributed
558 `reentrant`.
559 ** ML Basis annotations.
560 *** Added `allowSuccessorML {false|true}` to enable all SuccessorML features
561 and other annotations to enable specific SuccessorML features; see
562 http://mlton.org/SuccessorML for details.
563 *** Split `nonexhaustiveMatch {warn|error|igore}` and `redundantMatch
564 {warn|error|ignore}` into `nonexhaustiveMatch` and `redundantMatch`
565 (controls diagnostics for `case` expressions, `fn` expressions, and `fun`
566 declarations (which may raise `Match` on failure)) and `nonexhaustiveBind`
567 and `redundantBind` (controls diagnostics for `val` declarations (which may
568 raise `Bind` on failure)).
569 *** Added `valrecConstr {warn|error|ignore}` to report when a `val rec` (or
570 `fun`) declaration redefines an identifier that previously had constructor
571 status.
572 * Libraries.
573 ** Basis Library.
574 *** Improved performance of `Array.copy`, `Array.copyVec`, `Vector.append`,
575 `String.^`, `String.concat`, `String.concatWith`, and other related
576 functions by using `memmove` rather than element-by-element constructions.
577 ** `Unsafe` structure.
578 *** Added unsafe operations for array uninitialization and raw arrays; see
579 https://github.com/MLton/mlton/pull/207 for details.
580 ** Other libraries.
581 *** Updated: ckit library, MLLPT library, MLRISC library, SML/NJ library
582 * Tools.
583 ** mlnlffigen
584 *** Updated to warn and skip (rather than abort) when encountering functions
585 with `struct`/`union` argument or return type.
586
587 === Details
588
589 * 2018-02-6
590 ** Remove ancient and unused `cmcat` tool.
591
592 * 2018-02-03
593 ** Upgrade `gdtoa.tgz`.
594
595 * 2018-02-02
596 ** Remove docs from `all` target of `./Makefile`; this eliminates the
597 `all-no-docs` target (which was frequently used in favor of `all`).
598
599 * 2018-01-31
600 ** Use C compiler with `-std=gnu11` (rather than `-std=gnu99`).
601 ** Revert rudimentary support for `./configure`; the support was so minimal
602 that it seems unhelpful to pretend that there are exhaustive compatibility
603 checks being performed. All of the basic configuration can be accomplished
604 with simple `make` variable definitions.
605
606 * 2018-01-25
607 ** Remove (expert, undocumented) `-debug-format` option; the same effect can
608 be achieved with `-as-opt` and `-cc-opt`.
609 ** Propagate C compiler from `./configure` to `mlton` script.
610
611 * 2018-01-24
612 ** Extend `-target-*-opt` options to support `arch-os` pairs.
613 ** Remove `./package/rpm/*` and corresponding targets in `./Makefile`;
614 upstream MLton has not produced RPMs for years.
615
616 * 2018-01-24
617 ** Slightly improve performance of `Vector.concat` and
618 `String.{concat,concatWith,tokens,fields}` by avoiding `List.map`-s.
619
620 * 2018-01-23
621 ** Restore, but deprecate, `-drop-pass` compile-time expert option.
622
623 * 2018-01-19
624 ** Update SML/NJ libraries to SML/NJ 110.82.
625
626 * 2017-12-29
627 ** Add support for `(*#showBasis "file" *)` directives. This feature is
628 meant to facilitate auto-completion via
629 https://github.com/MatthewFluet/company-mlton[`company-mlton`] and similar
630 tools.
631
632 * 2017-12-20
633 ** Update performance comparison on website. Thanks to Curtis Dunham for the
634 pull request.
635
636 * 2017-12-17
637 ** Updates to `-show-basis`:
638 *** `-show-basis-flat`: Recursively expand structures in environments,
639 displaying components with long identifiers.
640 *** `-show-basis-def`: Appends `(* @ region *)` annotations to items shown
641 in environment.
642 *** `-show-basis-compact`: Tries to optimize vertical space (at the expense
643 of long lines).
644
645 * 2017-12-11
646 ** Drop `_BSD_SOURCE` and `_POSIX_C_SOURCE` feature macros in
647 `./runtime/cenv.h`.
648
649 * 2017-12-10
650 ** Add a `Dockerfile` to build/test MLton. Thanks to Richard Laughlin for the
651 pull request.
652
653 * 2017-12-06
654 ** Remove `$PREFIX` and `$prefix` from top-level `Makefile.in`; use
655 `./configure --prefix path`. Thanks to Richard Laughlin for the pull
656 request.
657
658 * 2017-12-03
659 ** Fix heap invariant predicates.
660
661 * 2017-11-15
662 ** Eliminate the use of (some) global mutable state for signal handling.
663
664 * 2017-11-14
665 ** Store forwarding pointer for an object in the object header (rather than in
666 the object data and setting the header to a sentinel value).
667
668 * 2017-11-02
669 ** Updates to stack management in backend:
670 *** Improve `Allocation.Stack.get`.
671 *** Do not force `Cont` block arguments to stack.
672
673 * 2017-10-30
674 ** In `signature SSA_TO_RSSA_STRUCTS` share by `Rssa.Atoms = Ssa.Atoms`. This
675 is the idiom used elsewhere in the compiler, rather than sharing individual
676 sub-structures of `Atoms`.
677 ** Minor updates to `DirectedGraph` and `Tree` in MLton library.
678
679 * 2017-10-23
680 ** Add `-seed-rand w` compile-time option, to seed the pseudo-random number
681 generator.
682 ** Add a new MachineShuffle pass (disabled by default) that shuffles the
683 collection of chunks within the program and shuffles the collection of blocks
684 within a chunk. With the `-seed-rand w` compile-time option, can be used to
685 generate executables with distinct code placements.
686
687 * 2017-10-23
688 ** Use a relative path in the `mlton` script, rather than an absolute path.
689 The absolute path needed to be set to the intended installation directory,
690 which made it difficult to install a binary release in a local directory.
691 Undertaken by Maksim Yegorov at RIT supported by NSF CISE Research
692 Infrastructure (CRI) award.
693
694 * 2017-10-21
695 ** Add unsafe operations for array uninitialization and raw arrays.
696 *** Rename `+Array_uninit: SeqIndex.int -> 'a array+` primitive to
697 `+Array_alloc: SeqIndex.int -> 'a array+`.
698 *** Add `+Array_uninit: 'a array * SeqIndex.int -> unit+` primitive to set all
699 objptrs in the element at the given index to a bogus non-objptr value
700 (`0wx1`). One motivation for this primitive is to support space-efficient
701 polymorphic resizeable arrays. When shrinking a resizeable array, we would
702 like to `NULL` out the elements that are no longer part of the logical
703 array, in order to avoid a (logical) space leak.
704 *** Add `+Array_uninitIsNop: 'a array -> bool+` primitive to answer if the
705 `Array_uninit` primitive applied to the same array would be a nop (i.e., if
706 the array has no objptrs in the elements). This can be used to skip a
707 bulk-`Array_uninit` loop when it is known that the `Array_uninit` operations
708 would be nops.
709 *** Add `+Array_allocRaw: SeqIndex.int -> 'a array+` primitive to allocate an
710 array, but with a header that indicates that the array has no objptrs. Add
711 `+Array_toArray: 'a array -> 'a array+` primitive to update the header of an
712 `Array_allocRaw` allocated array to reveal the objptrs. One motiviation for
713 this primitive is that, in a parallel setting, the uninitialization of an
714 array can be a sequential bottleneck. The `Array_allocRaw` is a constant
715 time operation and the subsequent `Array_uninit` operations can be performed
716 in parallel.
717 *** Extend `structure Unsafe.Array` with additional operations. See
718 `./basis-library/sml-nj/unsafe.sig`.
719
720 * 2017-10-20
721 ** Introduce ShareZeroVec SSA optimization to share zero-length vectors after
722 coercion-based optimizations. Undertaken by Maksim Yegorov at RIT supported
723 by NSF CISE Research Infrastructure (CRI) award.
724
725 * 2017-10-18
726 ** New canonicalization strategy for CommonSubexp SSA optimization.
727 Previously, the canonicalization of commutative arithmetic primitives was
728 sensitive to variable hashes (created by an unseeded pseudo-random number
729 generator); now, the canonicalization of commutative arithmetic primitives is
730 sensitive to relative definition order of variables.
731
732 * 2017-10-12
733 ** Fix bug in runtime argument option parsing.
734
735 * 2017-10-05
736 ** Many updates and improvements to diagnostic messages. See
737 https://github.com/MLton/mlton/pull/195 for details.
738
739 * 2017-09-27
740 ** Add rudimentary support for `./configure`; in particular, support
741 `--with-gmp-lib` and `--with-gmp-include` to set location of GMP and
742 `--prefix` to specify an install prefix. Undertaken by Maksim Yegorov at RIT
743 supported by NSF CISE Research Infrastructure (CRI) award.
744
745 * 2017-08-21
746 ** Introduce `+Array_copyArray: 'a array * SeqIndex.int * 'a array *
747 SeqIndex.int * SeqIndex.int -> unit+` and `+Array_copyVector: 'a array *
748 SeqIndex.int * 'a vector * SeqIndex.int * SeqIndex.int -> unit+` primitives
749 which are used to implement a number of array and vector construction
750 functions, particularly `append`, `concat`, and `concatWith`. The primitives
751 compile to `memmove` operations, which (significantly) outperforms MLton's
752 element-by-element construction for large sequences. Undertaken by Bryan Camp
753 at RIT supported by NSF CISE Research Infrastructure (CRI) award.
754
755 * 2017-07-25
756 ** Force PIC generation on amd64-linux targets. Thanks to Kuen-Bang Hou
757 (Favonia) for the pull request.
758
759 * 2017-07-11
760 ** Generalize the `subWord` primitives to
761 +
762 ----
763 | WordArray_subWord of {seqSize:WordSize.t, eleSize: WordSize.t}
764 | WordArray_updateWord of {seqSize: WordSize.t, eleSize: WordSize.t}
765 | WordVector_subWord of {seqSize: WordSize.t, eleSize: WordSize.t}
766 ----
767 +
768 Undertaken by Bryan Camp at RIT supported by NSF CISE Research Infrastructure
769 (CRI) award.
770
771 * 2017-07-11
772 ** Add a parser combinator library (`structure StreamParser`) to the MLton
773 Library. Undertaken by Jason Carr at RIT supported by NSF CISE Research
774 Infrastructure (CRI) award.
775 ** Add a parser for the SXML IR (`structure ParseSxml`). Undertaken by Jason
776 Carr at RIT supported by NSF CISE Research Infrastructure (CRI) award.
777 ** Allow compilation to start with a `.sxml` file. Undertaken by Jason Carr
778 at RIT supported by NSF CISE Research Infrastructure (CRI) award.
779
780 * 2017-06-29
781 ** Replace `-drop-pass regex` compile-time option with `-disable-pass regex`
782 compile option and add `-enable-pass regex` compile option. Various XML,
783 SXML, SSA, SSA2, RSSA, and Machine IR optimization passes are initialized with
784 a default status, which can be overriden by `-{disable,enable}-pass`. In
785 particular, it is now easy to add a work-in-progress (and potentially buggy)
786 pass to the simplification pipeline with `execute = false` default status, to
787 be selectively executed with `-enable-pass`. Undertaken by Bryan Camp at RIT
788 supported by NSF CISE Research Infrastructure (CRI) award.
789 ** Add LoopUnswitch and LoopUnroll SSA optimizations (undertaken by Matthew
790 Surawski as an RIT CS MS Capstone Project). Initial evaluation demonstrates
791 some non-trivial performance gains, no non-trivial performance losses, and
792 only minor code size increases, but currently disabled pending a more thorough
793 evaluation.
794
795 * 2017-05-23
796 ** Expand the set of MLB annotations:
797 *** `nonexhaustiveBind`, `nonexhaustiveExnBind`, `redundantBind`: controls
798 diagnostics for `val` declarations (which may raise `Bind` on failure).
799 *** `nonexhaustiveMatch`, `nonexhaustiveExnMatch`, `redundantMatch`:
800 controls diagnostics for `case` expressions, `fn` expressions, and `fun`
801 declarations (which may raise `Match` on failure).
802 *** `nonexhaustiveRaise`, `nonexhaustiveExnRaise`, `redundantRaise`:
803 controls diagnostics for `handle` expressions (which implicitly re-raise on
804 failure). Note that `nonexhaustiveRaise` and `nonexhaustiveExnRaise`
805 default to `ignore`. The combination of `nonexhaustiveRaise warn` and
806 `nonexhaustiveExnRaise ignore` can be useful for finding handlers that
807 handle some, but not all, values of an exception variant.
808 ** Make a number of improvements to diagnostic messages:
809 *** Display nonexhaustive exception patterns as `_ : exn`, rather than
810 `e`.
811 *** Normalize nonexhaustive patterns by sorting (e.g., by `ConApp` name).
812 *** Report complete enumeration of unhandled constants, rather than a single
813 example.
814 *** Report nonexhaustive patterns of record type as records, rather than as
815 tuples.
816
817 * 2017-04-20
818 ** Updates to SSA, SSA2, and RSSA IR support infrastructure
819 *** Display more context when reporting SSA and SSA2 IR type errors.
820 *** Add `-layout-width n` compile expert option to control the target width
821 for the pretty printer.
822 *** Make cosmetic improvments to SSA and SSA2 IR display (uses of global
823 variables bound to small constants and conapps are commented with the
824 corresponding value; include loop forest for functions with `-keep dot`).
825 *** Improve RSSA constant folding and copy propagation.
826 *** Limit Machine IR `Globals` to variables used outside of the `main`
827 function.
828
829 * 2017-04-15
830 ** Add `gc-summary-file file` runtime option.
831
832 * 2017-04-15
833 ** Rename and add `smlnj-mlton-x{2,4,8,16}` top-level `Makefile` targets.
834 ** Update SML/NJ librarys to SML/NJ 110.80 (making use of supported
835 SuccessorML features).
836 ** Note support for SML/NJ extensions via SuccessorML MLB annotations on
837 website.
838
839 * 2017-04-14
840 ** Add support for vector expressions (`+#[e1, e2, ..., en]+`) and vector
841 patterns (`+#[p1, p2, ..., pn]+`) and add `Vector_vector` n-ary primitive.
842 Initial support for vector expressions and the `Vector_vector` primitive were
843 undertaken by Krishna Ravikumar as an RIT CS MS Capstone Project.
844
845 * 2017-03-29
846 ** Update DOS eol handling and tweak error messages in lexer.
847
848 * 2017-03-27
849 ** Correct off-by-one error in column numbers. Thanks to Jacob Zimmerman for
850 the error report and pull request.
851
852 * 2017-03-15
853 ** Updates to SuccessorML support:
854 *** Add an `allowSuccessorML {false|true}` MLB annotation to enable all
855 Successor ML features with a single annotation.
856 *** Fix parsing of numeric labels to only accept an INT token that does not
857 begin with 0, is not an extended literal, is not negative, and is decimal.
858 *** Drop the alternate word prefixes (`0xw` and `0bw`).
859 *** Unconditionally allow line comments in MLB files.
860 *** Allow UTF-8 byte sequences in text constants.
861 *** Refactor `ml.lex` and `mlb.lex` to be more maintainable.
862 *** Rename `allowRecPunning` annotation to `allowRecordPunExps`.
863
864 * 2017-02-27
865 ** Update ML-Yacc examples (`calc`, `fol`, `pascal`) to comply with MLton
866 build process. Thanks to Hai Nguyen Van for the pull request.
867
868 * 2017-01-25
869 ** Update PortingMLton documentation and `./bin/add-cross` script. Thanks to
870 Daniel Moerner for the pull request.
871
872 * 2016-09-29
873 ** Constant fold `CPointer_equal(NULL, NULL)` to `true`.
874
875 * 2016-09-29
876 ** Introduce `NEEDS_SIGALTSTACK_EXEC` config in runtime system.
877
878 * 2016-09-27
879 ** Construct a devel build version string from last commit time and last
880 commit hash.
881 ** Omit build date and build node from version banner; makes self-compiles
882 deterministic.
883 ** Remove `upgrade-basis.sml` from build. The generated `upgrade-basis.sml`
884 was introduced to handle incompatibilities in the Basis Library provided by an
885 old version of MLton and the Basis Library assumed by the current sources.
886 However, there are no incompatibilities with MLton 20130715, MLton 20100608,
887 or MLton 20070826. Nonetheless, the feature testing performed by
888 `./bin/upgrade-basis` to generate `upgrade-basis.sml` is time consuming,
889 especially when trying to simply type check the compiler sources.
890
891 * 2016-06-20
892 ** Do not `gzip` man pages on OpenBSD. Thanks to Alexander Abushkevich for
893 the pull request.
894
895 * 2016-06-20
896 ** Generate position independent code for OpenBSD. Thanks to Alexander
897 Abushkevich for the pull request.
898
899 * 2016-06-20
900 ** Fix profiling for amd64-openbsd and x86-openbsd. Thanks to Alexander
901 Abushkevich for the pull request.
902
903 * 2016-04-06
904 ** Update SML/NJ librarys to SML/NJ 110.79.
905
906 * 2016-03-22
907 ** Update LLVM codegen to support (and require) >= llvm-3.7. Thanks to Eugene
908 Akentyev for the pull request.
909
910 * 2016-02-26
911 ** Configure GMP location via `Makefile`.
912
913 * 2016-01-10
914 ** Fix typo in `mlb-formal.tex`. Thanks to Jon Sterling for the pull request.
915
916 * 2015-11-10
917 ** Update SML/NJ librarys to SML/NJ 110.78. Use `allowOrPats` and
918 `allowSigWithtype` to minimize diffs.
919
920 * 2015-10-20
921 ** Fix elaboration of `withtype` in signature.
922
923 * 2015-10-06
924 ** Add support for setting CM anchor bindings in `cm2mlb` tool.
925
926 * 2015-10-06
927 ** Fix non-exhaustive match warnings with or-patterns. Thanks to Rob Simmons
928 for the bug report.
929 ** Distinguish between partial and fully redundant matches.
930 ** Report partial redundancy in `val` declarations.
931 ** Lower precedence of or-patterns in parser.
932 ** Make a variety of cosmetic improvements to non-exhaustive and redundant
933 error/warning messages, primarily to be consistent in formatting between
934 quoted AST and generated messages.
935
936 * 2015-07-10
937 ** Extend support for arm64 (aarch64). Thanks to Edmund Evans for the patch.
938
939 * 2015-06-22
940 ** Introduce `valrecConstr {warn|error|ignore}` MLB annotation to report when
941 a `val rec` (or `fun`) declaration redefines an identifier that previously had
942 constructor status.
943
944 * 2015-06-19
945 ** Add support for selected SuccessorML features (undertaken by Kevin Bradley
946 as an RIT CS MS Capstone Project).
947 *** `do`-declarations (`allowDoDecls`)
948 *** extended literals (`allowExtendedLiterals`)
949 *** line comments (`allowLineComments`)
950 *** optional leading bar in matches, fun decls, and datatype decls
951 (`allowOptBar`)
952 *** optional trailing semicolon in sequence expressions (`allowOptSemicolon`)
953 *** or patterns (`allowOrPats`)
954 *** record expression punning (`allowRecPunning`)
955 *** withtype in signatures (`allowSigWithtype`)
956
957 * 2015-06-10
958 ** Hide equality status of poly (and mono) vector and array slices.
959 ** Hide type equality of mono and poly `Word8.word` arrays and vectors.
960
961 * 2015-06-08
962 ** Added `reentrant` attribute to `_import`. An `_import`-ed C function that
963 (directly or indirectly) calls an `_export`-ed SML function should be
964 attributed `reentrant`.
965
966 * 2015-06-08
967 ** Make compilation deterministic:
968 *** Eliminate output executable name from compile-time specified `@MLton`
969 arguments.
970 *** Deterministically generate magic constant for executable.
971
972 * 2015-06-08
973 ** Add `-keep ast` compile option. Undertaken by Ross Bayer at RIT supported
974 by NSF CISE Research Infrastructure (CRI) award.
975
976 * 2015-06-02
977 ** Updates to Debian packaging. Thanks to Christopher Cramer for the pull
978 request.
979
980 * 2015-03-30
981 ** Use `LANG=en_us` when computing version and build date. Thanks to Eugene
982 Akentyev for the pull request.
983
984 * 2015-02-17
985 ** Update `mlnlffigen` to warn and skip functions with `struct`/`union`
986 arguments. Thanks to Armando Doval for the pull request.
987
988 * 2014-12-22
989 ** Move pervasive constructs from `./mlton/ast` to `./mlton/atoms`, so that
990 `./mlton/ast/sources.mlb` depends on `./mlton/atoms/sources.mlb` (and not the
991 other way around). Undertaken by Vedant Raiththa at RIT supported by NSF CISE
992 Research Infrastructure (CRI) award.
993
994 * 2014-12-17
995 ** Cache a worker thread to service calls of `_export`-ed functions. Thanks
996 to Bernard Berthomieu for the bug report.
997
998 * 2014-12-02
999 ** Post-process generated front-end files for compatibility with SML/NJ's
1000 recent `ml-lex` and `ml-yacc` tools that generate log identifiers rather than
1001 unqualified (top-level environment) identifiers.
1002 ** Corrected documentation for SML/NJ `Makefile` target and fixed
1003 `bootstrap-nj` target. Thanks to Daniel Rosenwasser for the pull request.
1004
1005 * 2014-11-21
1006 ** Reorganized runtime support for `IntInf` operations so that programs that
1007 do not use `IntInf` compile to executables with no residual dependency on GMP.
1008 ** Fixed bug in `MLton.IntInf.fromRep` that could yield values that violate
1009 the `IntInf` representation invariants. Thanks to Rob Simmons for the bug
1010 report.
1011
1012 * 2014-10-24
1013 ** Added `pure` and `impure` attributes to `_import`. An unattributed
1014 `_import` is treated as `impure`. A `pure` `_import` may be subject to more
1015 aggressive optimizations (common subexpression elimination, dead-code
1016 elimination). Undertaken by Vedant Raiththa at RIT supported by NSF CISE
1017 Research Infrastructure (CRI) award.
1018
1019 * 2014-10-22
1020 ** Various updates to treatment of `IntInf` constants in the compiler.
1021 *** Recognize both `Big` and `Small` representations of `IntInf`-s.
1022 *** Translate `IntInf` consts to `Big` and `Small` representations in
1023 conversion from SSA to RSSA. This is consistent with the treatment of other
1024 `IntInf` operations in the conversion. After the conversion, `IntInf` is no
1025 longer treated as a primitive.
1026 *** Remove `initIntInfs` from program initialization.
1027 *** Constant fold `IntInf_toVector` and `WordVector_toIntInf` primitives.
1028
1029 * 2014-10-20
1030 ** Various updates to `structure WordXVector` in compiler proper.
1031 *** Update the `WordXVector.layout` function. If the `elementSize` is
1032 `WordX.word8` and more than 90% of the characters satisfy `Char.isGraph
1033 orelse Char.isSpace`, then display as an SML string constant (with
1034 non-printable characters SML-escaped). Otherwise, display as an SML/NJ-style
1035 `#[0x0, 0xF]` vector literal.
1036 *** Update initialization of `static struct GC_vectorInit vectorInits[]`
1037 constants in runtime. If the `WordXVector`’s (primitive) `elementSize` is
1038 `WordSize.W8`, then emit a C-escaped string constant. Otherwise, emit a
1039 C-array initialization.
1040
1041 * 2014-08-15
1042 ** More updates to benchmark infrastructure.
1043 *** Make `update-counts.sh` script more robust.
1044 *** Update `hamlet.sml` benchmark program to close input file after each
1045 loop.
1046 *** Update `fft.sml` benchmark program to only invoke `test` function with
1047 power-of-2 arguments.
1048 *** Update `model-elimination.sml` benchmark program to iterate `main ()`
1049 according to `doit` size parameter.
1050
1051 * 2014-08-11
1052 ** Include `winsock2.h` before `windows.h` in MinGW port. Thanks to Shu-Hung
1053 You for the pull request.
1054
1055 * 2014-07-31
1056 ** Refactor array and vector implementation in Basis Library into a primitive
1057 implementation (using `SeqInt.int` for indexing) and a wrapper implementation
1058 (using the default `Int.int` for indexing). Thanks to Rob Simmons for the
1059 pull request.
1060 ** Correct description of `MLton.{Vector,Array}.unfoldi` on website. Thanks
1061 to Rob Simmons for the pull request.
1062
1063 * 2014-07-14
1064 ** Updates to benchmark infrastructure.
1065 *** Add `even-odd.sml` benchmark that exercises mutual tail recursion.
1066 *** Add `update-counts.sh` script to calculate appropriate benchmark
1067 iteration counts and update benchmark iteration counts so that all
1068 benchmarks run for at least 30 seconds.
1069 *** Updates to benchmark driver program.
1070
1071 * 2014-07-07
1072 ** Change `./basis-library/integer/int-inf.sml` to reduce dependency on
1073 GMP-specific details of `./basis-library/integer/int-inf0.sml`. Thanks to Rob
1074 Simmons for the pull request.
1075 ** Correct type and description of `MLton.IntInf.fromRep` on website. Thanks
1076 to Rob Simmons for the pull request.
1077
1078 * 2014-07-01
1079 ** Add experimental LLVM codegen (undertaken by Brian Leibig as an RIT CS MS
1080 Project).
1081
1082 * 2014-06-09
1083 ** Update `CallingFromSMLToC` page on website. Thanks to Bikal Gurung for the
1084 pull request.
1085
1086 * 2014-03-18
1087 ** Updates for MinGW port.
1088
1089 * 2014-02-07
1090 ** Update AsciiDoc sources for website.
1091
1092 * 2013-10-31
1093 ** Various updates to website. Thanks to Mauricio C Antunes for the pull
1094 request.
1095 *** Add Tofte's tutorial and Rossberg's grammar.
1096 *** Fix links to implementations.
1097
1098 * 2013-10-10
1099 ** Update links from `References` page on website. Thanks to Mauricio C
1100 Antunes for the pull request.
1101
1102 * 2013-09-02
1103 ** Fix example for `Lazy` page on website. Thanks to Daniel Rosenwasser for
1104 the pull request.
1105
1106 == Version 20130715
1107
1108 Here are the changes from version 20100608 to version 20130715.
1109
1110 === Summary
1111
1112 * Compiler.
1113 ** Cosmetic improvements to type-error messages.
1114 ** Removed features:
1115 *** Bytecode codegen: The bytecode codegen had not seen significant use and
1116 it was not well understood by any of the active developers.
1117 *** Support for `.cm` files as input: The ML Basis system provides much
1118 better infrastructure for "programming in the very large" than the (very)
1119 limited support for CM. The `cm2mlb` tool (available in the source
1120 distribution) can be used to convert CM projects to MLB projects, preserving
1121 the CM scoping of module identifiers.
1122 ** Bug fixes: see changelog
1123 * Runtime.
1124 ** Bug fixes: see changelog
1125 * Language.
1126 ** Interpret `(*#line line.col "file" *)` directives as relative
1127 file names.
1128 ** ML Basis annotations.
1129 *** Added: `resolveScope`
1130 * Libraries.
1131 ** Basis Library.
1132 *** Improved performance of `String.concatWith`.
1133 *** Use bit operations for `REAL.class` and other low-level operations.
1134 *** Support additional variables with `Posix.ProcEnv.sysconf`.
1135 *** Bug fixes: see changelog
1136 ** `MLton` structure.
1137 *** Removed: `MLton.Socket`
1138 ** Other libraries.
1139 *** Updated: ckit library, MLRISC library, SML/NJ library
1140 *** Added: MLLPT library
1141 * Tools.
1142 ** mllex
1143 *** Generate `(*#line line.col "file.lex" *)` directives with simple
1144 (relative) file names, rather than absolute paths.
1145 ** mlyacc
1146 *** Generate `(*#line line.col "file.grm" *)` directives with simple
1147 (relative) file names, rather than absolute paths.
1148 *** Fixed bug in comment-handling in lexer.
1149
1150 === Details
1151
1152 * 2013-07-06
1153 ** Update SML/NJ libraries to SML/NJ 110.76.
1154
1155 * 2013-06-19
1156 ** Upgrade `gdtoa.tgz`; fixed bug in `Real32.{fmt,toDecimal,toString}`, which
1157 in some cases produced too many digits
1158
1159 * 2013-06-18
1160 ** Removed `MLton.Socket` structure (deprecated in last release).
1161
1162 * 2013-06-10
1163 ** Improved performance of `String.concatWith`.
1164
1165 * 2013-05-22
1166 ** Update SML/NJ libraries to SML/NJ 110.75.
1167
1168 * 2013-04-30
1169 ** Detect PowerPC 64 architecture.
1170
1171 * 2012-10-09
1172 ** Fixed bug in elaboration that erroneously accepted the following:
1173 +
1174 [source,sml]
1175 ----
1176 signature S = sig structure A : sig type t end
1177 and B : sig type t end where type t = A.t end
1178 ----
1179
1180 * 2012-09-04
1181 ** Introduce an MLB annotation to control overload and flex record resolution
1182 scope: `resolveScope {strdec|dec|topdec|program}`.
1183
1184 * 2012-07-04
1185 ** Simplify use of `getsockopt` and `setsockopt` in Basis Library.
1186 ** Direct implementation of `Socket.Ctl.{getATMARK,getNREAD}` in runtime
1187 system, rather than indirect implementation in Basis Library via `ioctl`.
1188 ** Replace use of casting through a union with `memcpy` in runtime.
1189
1190 * 2012-06-11
1191 ** Use bit operations for `REAL.class` and other low-level operations.
1192 ** Fixed bugs in `REAL.copySign`, `REAL.signBit`, and `REAL.{to,from}Decimal`.
1193
1194 * 2012-06-01
1195 ** Cosmetic improvements to type-error messages.
1196 ** Fixed bug in elaboration that erroneously rejected the following:
1197 +
1198 [source,sml]
1199 ----
1200 datatype ('a, ''a) t = T
1201 type ('a, ''a) u = unit
1202 ----
1203 +
1204 and erroneously accepted the following:
1205 +
1206 [source,sml]
1207 ----
1208 fun f (x: 'a) : ''a = x
1209 fun g (x: 'a) : ''a = if x = x then x else x
1210 ----
1211
1212 * 2012-02-24
1213 ** Fixed bug in redundant SSA optimization.
1214
1215 * 2011-06-20
1216 ** Support additional variables with `Posix.ProcEnv.sysconf`.
1217
1218 * 2011-06-17
1219 ** Change `mllex` and `mlyacc` to generate `#line` directives with simple file
1220 names, rather than absolute paths.
1221 ** Interpret `#line` directives as relative file names.
1222
1223 * 2011-06-14
1224 ** Fixed bug in SSA/SSA2 shrinker that could erroneously turn a non-tail
1225 function call with a `Bug` transfer as its continuation into a tail function
1226 call.
1227
1228 * 2011-06-11
1229 ** Update SML/NJ libraries to SML/NJ 110.73 and add ML-LPT library.
1230
1231 * 2011-06-10
1232 ** Fixed bug in translation from SSA2 to RSSA with case expressions over
1233 non-primitive-sized words.
1234 ** Fixed bug in SSA/SSA2 type checking of case expressions over words.
1235
1236 * 2011-06-04
1237 ** Upgrade `gdtoa.tgz`.
1238 ** Remove bytecode codegen.
1239 ** Remove support for `.cm` files as input.
1240
1241 * 2011-05-03
1242 ** Fixed a bug with the treatment of `as`-patterns, which should not allow the
1243 redefinition of constructor status.
1244
1245 * 2011-02-18
1246 ** Fixed bug with treatment of nan in common subexpression elimination SSA
1247 optimization.
1248
1249 * 2011-02-18
1250 ** Fixed bug in translation from SSA2 to RSSA with weak pointers.
1251
1252 * 2011-02-05
1253 ** Fixed bug in amd64 codegen calling convention for varargs C calls.
1254
1255 * 2011-01-17
1256 ** Fixed bug in comment-handling in lexer for `mlyacc`’s input language.
1257
1258 * 2010-06-22
1259 ** Fixed bug in elaboration of function clauses with different numbers of
1260 arguments that would raise an uncaught `Subscript` exception.
1261
1262
1263 == Version 20100608
1264
1265 Here are the changes from version 20070826 to version 20100608.
1266
1267 === Summary
1268
1269 * New platforms.
1270 ** ia64-hpux
1271 ** powerpc64-aix
1272 * Compiler.
1273 ** Command-line switches.
1274 *** Added: `-mlb-path-var '<name> <value>'`
1275 *** Removed: `-keep sml`, `-stop sml`
1276 ** Improved constant folding of floating-point operations.
1277 ** Experimental: Support for compiling to a C library; see wiki documentation.
1278 ** Extended `-show-def-use` output to include types of variable definitions.
1279 ** Deprecated features (to be removed in a future release)
1280 *** Bytecode codegen: The bytecode codegen has not seen significant use and
1281 it is not well understood by any of the active developers.
1282 *** Support for `.cm` files as input: The ML Basis system provides much
1283 better infrastructure for "programming in the very large" than the (very)
1284 limited support for CM. The `cm2mlb` tool (available in the source
1285 distribution) can be used to convert CM projects to MLB projects, preserving
1286 the CM scoping of module identifiers.
1287 ** Bug fixes: see changelog
1288 * Runtime.
1289 ** `@MLton` switches.
1290 *** Added: `may-page-heap {false|true}`
1291 ** `may-page-heap`: By default, MLton will not page the heap to disk when
1292 unable to grow the heap to accomodate an allocation. (Previously, this
1293 behavior was the default, with no means to disable, with security an
1294 least-surprise issues.)
1295 ** Bug fixes: see changelog
1296 * Language.
1297 ** Allow numeric characters in ML Basis path variables.
1298 * Libraries.
1299 ** Basis Library.
1300 *** Bug fixes: see changelog.
1301 ** `MLton` structure.
1302 *** Added: `MLton.equal`, `MLton.hash`, `MLton.Cont.isolate`,
1303 `MLton.GC.Statistics, `MLton.Pointer.sizeofPointer`,
1304 `MLton.Socket.Address.toVector`
1305 *** Changed:
1306 *** Deprecated: `MLton.Socket`
1307 ** `Unsafe` structure.
1308 *** Added versions of all of the monomorphic array and vector structures.
1309 ** Other libraries.
1310 *** Updated: ckit library, MLRISC library, SML/NJ library.
1311 * Tools.
1312 ** `mllex`
1313 *** Eliminated top-level `type int = Int.int` in output.
1314 *** Include `(*#line line.col "file.lex" *)` directives in output.
1315 *** Added `%posint` command, to set the `yypos` type and allow the lexing of
1316 multi-gigabyte files.
1317 ** `mlnlffigen`
1318 *** Added command-line switches `-linkage archive` and `-linkage shared`.
1319 *** Deprecated command-line switch `-linkage static`.
1320 *** Added support for ia64 and hppa targets.
1321 ** `mlyacc`
1322 *** Eliminated top-level `type int = Int.int` in output.
1323 *** Include `(*#line line.col "file.grm" *)` directives in output.
1324
1325 === Details
1326
1327 * 2010-05-12
1328 ** Fixed bug in the mark-compact garbage collector where the C library's
1329 `memcpy` was used to move objects during the compaction phase; this could lead
1330 to heap corruption and segmentation faults with newer versions of `gcc` and/or
1331 `glibc`, which assume that src and dst in a `memcpy` do not overlap.
1332
1333 * 2010-03-12
1334 ** Fixed bug in elaboration of `datatype` declarations with `withtype`
1335 bindings.
1336
1337 * 2009-12-11
1338 ** Fixed performance bug in RefFlatten SSA2 optimization.
1339
1340 * 2009-12-09
1341 ** Fixed performance bug in SimplifyTypes SSA optimization.
1342
1343 * 2009-12-02
1344 ** Fixed bug in amd64 codegen register allocation of indirect C calls.
1345
1346 * 2009-09-17
1347 ** Fixed bug in `IntInf.scan` and `IntInf.fromString` where leading spaces
1348 were only accepted if the stream had an explicit sign character.
1349
1350 * 2009-07-10
1351 ** Added CombineConversions SSA optimization.
1352
1353 * 2009-06-09
1354 ** Removed deprecated command line switch `-show-anns {false, true}`.
1355
1356 * 2009-04-18
1357 ** Removed command line switches `-keep sml` and `-stop sml`. Their meaning
1358 was unclear with `.mlb` files; their effect with `.cm` files can be achieved
1359 with `-stop f`.
1360
1361 * 2009-04-16
1362 ** Fixed bug in `IntInf.~>>` that could cause a `glibc` assertion failure.
1363
1364 * 2009-04-01
1365 ** Fixed exported type of `MLton.Process.reap`.
1366
1367 * 2009-01-27
1368 ** Added `MLton.Socket.Address.toVector` to get the network-byte-order
1369 representation of an IP address.
1370
1371 * 2008-11-10
1372 ** Fixed bug in `MLton.size` and `MLton.share` when tracing the current stack.
1373
1374 * 2008-10-27
1375 ** Fixed phantom typing of sockets by hiding the representation of socket
1376 types. Previously the representation of sockets was revealed rendering the
1377 phantom types useless.
1378
1379 * 2008-10-10
1380 ** Fixed bug in nested `_export`/`_import` functions.
1381
1382 * 2008-09-12
1383 ** Improved constant folding of floating point operations.
1384
1385 * 2008-08-20
1386 ** Store the card/cross map at the end of the allocated ML heap; avoids
1387 possible out of memory errors when resizing the ML heap cannot be followed by
1388 a card/cross map allocation.
1389
1390 * 2008-07-24
1391 ** Added support for compiling to a C library. The relevant new compiler
1392 options are `-ar` and `-format`. Libraries are named based on the name of the
1393 `-export-header` file. Libraries have two extra methods:
1394 *** `NAME_open(argc, argv)` initializes the library and runs the SML code
1395 until it reaches the end of the program. If the SML code exits or raises an
1396 uncaught exception, the entire program will terminate.
1397 *** `NAME_close()` will execute any registered atExit functions, any
1398 outstanding finalizers, and frees the ML heap.
1399
1400 * 2008-07-16
1401 ** Fixed bug in the name mangling of `_import`-ed functions with the `stdcall`
1402 convention.
1403
1404 * 2008-06-12
1405 ** Added `MLton.Pointer.sizeofPointer`.
1406
1407 * 2008-06-06
1408 ** Added expert command line switch `-emit-main {true|false}`.
1409
1410 * 2008-05-17
1411 ** Fixed bug in Windows code to page the heap to disk when unable to grow the
1412 heap to a desired size. Thanks to Sami Evangelista for the bug report.
1413
1414 * 2008-05-10
1415 ** Implemented `MLton.Cont.isolate`.
1416
1417 * 2008-04-20
1418 ** Fixed bug in *NIX code to page the heap to disk when unable to grow the
1419 heap to a desired size. Thanks to Nicolas Bertolotti for the bug report and
1420 patch.
1421
1422 * 2008-04-07
1423 ** More flexible active/paused stack resizing policy. +
1424 Removed `thread-shrink-ratio` runtime option. + Added
1425 `stack-current-grow-ratio`, `stack-current-max-reserved-ratio`,
1426 `stack-current-permit-ratio`, `stack-current-shrink-ratio`,
1427 `stack-max-reserved-ratio`, and `stack-shrink-ratio` runtime options.
1428
1429 * 2008-04-07
1430 ** Fixed bugs in Basis Library where the representations of `OS.IO.iodesc`,
1431 `Posix.IO.file_desc`, `Posix.Signal.signal`, `Socket.sock`,
1432 `Socket.SOGK.sock_type` as integers were exposed.
1433
1434 * 2008-03-14
1435 ** Added unsafe versions of all of the monomorphic array and vector
1436 structures.
1437
1438 * 2008-03-02
1439 ** Fixed bug in Basis Library where the representation of `OS.Process.status`
1440 as an integer was exposed.
1441
1442 * 2008-02-13
1443 ** Fixed space-safety bug in RefFlatten optimization (to flatten refs into
1444 containing data structure). Thanks to Daniel Spoonhower for the bug report and
1445 initial diagnosis and patch.
1446
1447 * 2008-01-25
1448 ** Various updates to GC statistics gathering. Some basic GC statistics can
1449 be accessed from SML by `MLton.GC.Statistics.*` functions.
1450
1451 * 2008-01-24
1452 ** Added primitive (structural) polymorphic hash.
1453
1454 * 2008-01-21
1455 ** Fixed frontend to accept `op _longvid_` patterns and expressions. Thanks to
1456 Florian Weimer for the bug report.
1457
1458 * 2008-01-17
1459 ** Extended `-show-def-use` output to include types of variable definitions.
1460
1461 * 2008-01-09
1462 ** Extended `MLton_equal` to be a structural equality on all types, including
1463 `real` and `+->+` types.
1464
1465 * 2007-12-18
1466 ** Changed ML-Yacc and ML-Lex to output line directives so that MLton's
1467 def-use information points to the source files (`.grm` and `.lex`) instead of
1468 the generated implementations (`.grm.sml` and `.lex.sml`).
1469
1470 * 2007-12-14
1471 ** Added runtime option `may-page-heap {false|true}`. By default, MLton will
1472 not page the heap to disk when unable to grow the heap to a desired size.
1473 (Previously, this behavior was the default, with no means to disable, with
1474 security and least-surprise concerns.) Thanks to Wesley Terpstra for the
1475 patch.
1476 ** Fixed bug the FFI visible representation of `Int16.int ref` (and references
1477 of other primitive types smaller than 32-bits) on big-endian platforms. Thanks
1478 to Dave Herman for the bug report.
1479
1480 * 2007-12-13
1481 ** Fixed bug in `ImperativeIOExtra.canInput` (`TextIO.canInput`). Thanks to
1482 Ville Laurikari for the bug report.
1483
1484 * 2007-12-09
1485 ** Better constant folding of `IntInf` operations.
1486
1487 * 2007-12-07
1488 ** Fixed bug in algebraic simplification of `RealX` primitives. `+Real.<= (x,
1489 x)+` is `false` when `x` is `NaN`.
1490
1491 * 2007-11-29
1492 ** Fixed bug in type inference of flexible records. This would later cause
1493 the compiler to raise the `TypeError` exception. Thanks to Wesley Terpstra for
1494 the bug report.
1495
1496 * 2007-11-28
1497 ** Fixed bug in cross-compilation of `gdtoa` library. Thanks to Wesley
1498 Terpstra for the bug report and patch.
1499
1500 * 2007-11-20
1501 ** Fixed bug in RefFlatten optimization (pass to flatten refs into containing
1502 data structure). Thanks to Ruy LeyWild for the bug report.
1503
1504 * 2007-11-19
1505 ** Fixed bug in the handling of weak pointers by the mark-compact garbage
1506 collector. Thanks to Sean McLaughlin for the bug report and Florian Weimer for
1507 the initial diagnosis.
1508
1509 * 2007-11-07
1510 ** Added `%posint` command to `ml-lex`, to set the `yypos` type and allow the
1511 lexing of multi-gigabyte input files. Thanks to Florian Weimer for the feature
1512 concept and original patch.
1513
1514 * 2007-11-07
1515 ** Added command-line switch `-mlb-path-var '<name> <value>'` for specifying
1516 MLB path variables.
1517
1518 * 2007-11-06
1519 ** Allow numeric characters in MLB path variables.
1520
1521 * 2007-09-20
1522 ** Fixed bug in elaboration of structures with signature constraints. This
1523 would later cause the compiler to raise the `TypeError` exception. Thanks to
1524 Vesa Karvonen for the bug report.
1525
1526 * 2007-09-11
1527 ** Fixed bug in interaction of `_export`-ed functions and signal
1528 handlers. Thanks to Sean McLaughlin for the bug report.
1529
1530 * 2007-09-03
1531 ** Fixed bug in implementation of `_export`-ed functions using `char`
1532 type. Thanks to Katsuhiro Ueno for the bug report.
1533
1534
1535 == Version 20070826
1536
1537 Here are the changes from version 20051202 to version 20070826.
1538
1539 === Summary
1540
1541 * New platforms:
1542 ** amd64-linux, amd64-freebsd
1543 ** hppa-hpux
1544 ** powerpc-aix
1545 ** x86-darwin (Mac OS X)
1546 * Compiler.
1547 ** Support for 64-bit platforms.
1548 *** Native amd64 codegen.
1549 ** Command-line switches.
1550 *** Added: `-codegen amd64`, `-codegen x86`, `-default-type <type>`,
1551 `-profile-val {false|true}`.
1552 *** Changed: `-stop f` (file listing now includes `.mlb` files)
1553 ** Bytecode codegen.
1554 *** Support for profiling.
1555 *** Support for exception history.
1556 * Language.
1557 ** ML Basis annotations.
1558 *** Removed: `allowExport`, `allowImport`, `sequenceUnit`, `warnMatch`.
1559 * Libraries.
1560 ** Basis Library.
1561 *** Added: `PackWord16Big, `PackWord16Little`, `PackWord64Big`,
1562 `PackWord64Little`.
1563 *** Bug Fixes: see changelog.
1564 ** `MLton` structure.
1565 *** Added: `MLTON_MONO_ARRAY`, `MLTON_MONO_VECTOR`, `MLTON_REAL`,
1566 `MLton.BinIO.tempPrefix`, `MLton.CharArray`, `MLton.CharVector`,
1567 `MLton.IntInf.BigWord`, `MLton.IntInf.SmallInt`,
1568 `MLton.Exn.defaultTopLevelHandler`, `MLton.Exn.getTopLevelHandler`,
1569 `MLton.Exn.setTopLevelHandler`, `MLton.LargeReal`, `MLton.LargeWord`,
1570 `MLton.Real`, `MLton.Real32`, `MLton.Real64`, `MLton.Rlimit.Rlim`,
1571 `MLton.TextIO.tempPrefix`, `MLton.Vector.create`, `MLton.Word.bswap`,
1572 `MLton.Word8.bswap`, `MLton.Word16`, `MLton.Word32`, `MLton.Word64`,
1573 `MLton.Word8Array`, `MLton.Word8Vector`.
1574 *** Changed: `MLton.Array.unfoldi`, `MLton.IntInf.rep`, `MLton.Rlimit`,
1575 `MLton.Vector.unfoldi`.
1576 *** Deprecated: `MLton.Socket`
1577 ** Other libraries.
1578 *** Added: MLRISC libary.
1579 *** Updated: ckit library, SML/NJ library.
1580 * Tools.
1581
1582 === Details
1583
1584 * 2007-08-12
1585 ** Removed deprecated ML Basis annotations.
1586
1587 * 2007-08-06
1588 ** Fixed bug in treatment of `Real<N>.{scan,fromString}` operations.
1589 `Real<N>.{scan,fromString}` were using `TO_NEAREST` semantics, but should obey
1590 current rounding mode. (Only `Real<N>.fromDecimal` is specified to always
1591 have `TO_NEAREST` semantics.) Thanks to Sean McLaughlin for the bug report.
1592
1593 * 2007-07-27
1594 ** Fixed bugs in constant-folding of floating-point operations with C codegen.
1595
1596 * 2007-07-26
1597 ** Fixed bug in treatment of floating-point operations. Floating-point
1598 operations depend on the current rounding mode, but were being treated as
1599 pure. Thanks to Sean McLaughlin for the bug report.
1600
1601 * 2007-07-13
1602 ** Added `MLton.Exn.{default,get,set}TopLevelHandler`.
1603
1604 * 2007-07-12
1605 ** Restored `native` option to `-codegen` flag.
1606
1607 * 2007-07-11
1608 ** Fixed bug in `Real32.toInt`: conversion of real values close to
1609 `Int.maxInt` could be incorrect.
1610
1611 * 2007-07-07
1612 ** Updates to bytecode code generator: support for amd64-* targets, support
1613 for profiling (including exception history).
1614 ** Fixed bug in `Socket` module of Basis Library; unmarshalling of socket
1615 options (for `get*` functions) used `andb` rather than `orb`. Thanks to Anders
1616 Petersson for the bug report (and patch).
1617
1618 * 2007-07-06
1619 ** Fixed bug in `Date` module of Basis Library; some functions would
1620 erroneously raise `Date` when given a year <= 1900. Thanks to Joe Hurd for the
1621 bug report.
1622 ** Fixed a long-standing bug in monomorphisation pass. Thanks to Vesa Karvonen
1623 for the bug report.
1624
1625 * 2007-05-18
1626 ** Native amd64 code generator for amd64-* targets.
1627 ** Eliminate `native` option from `-codegen` flag.
1628 ** Add `x86` and `amd64` options to `-codegen` flag.
1629
1630 * 2007-04-29
1631 ** Improved type checking of RSSA and Machine ILs.
1632
1633 * 2007-04-14
1634 ** Fixed aliasing issues with `basis/Real/*.c` files.
1635 ** Added real/word casts in `MLton` structure.
1636
1637 * 2007-04-12
1638 ** Added primitives for bit cast of word to/from real.
1639 ** Implement `PackReal<N>{Big,Little}` using `PackWord<N>{Big,Little}` and bit
1640 casts.
1641
1642 * 2007-04-11
1643 ** Move all system header `#include`-s to `platform/` os headers.
1644 ** Use C99 `<assert.h>`, rather than custom `"assert.{h,c}"`.
1645
1646 * 2007-03-13
1647 ** Implement `PackWord<N>{Big,Little}` entirely in ML, using an ML byte swap
1648 function.
1649
1650 * 2007-02-25
1651 ** Change amd64-* target platforms from 32-bit compatibility mode (i.e.,
1652 `-m32`) to 64-bit mode (i.e., `-m64`). Currently, only the C codegen is able
1653 to generate 64-bit executables.
1654
1655 * 2007-02-23
1656 ** Removed expert command line switch `-coalesce <n>`.
1657 ** Added expert command line switch `-chunkify {coalesce<n>|func|one}`.
1658
1659 * 2007-02-20
1660 ** Fixed bug in `PackReal<N>.toBytes`. Thanks to Eric McCorkle for the bug
1661 report (and patch).
1662
1663 * 2007-02-18
1664 ** Added command line switch `-profile-val`, to profile the evaluation of
1665 `val` bindings; this is particularly useful with exception history for
1666 debugging uncaught exceptions at the top-level.
1667
1668 * 2006-12-29
1669 ** Added command line switch `-show {anns|path-map}` and deprecated command
1670 line switch `-show-anns {false|true}`. Use `-show path-map` to see the
1671 complete MLB path map as seen by the compiler.
1672
1673 * 2006-12-20
1674 ** Changed the output of command line switch `-stop f` to include `.mlb`
1675 files. This is useful for generating Makefile dependencies. The old output
1676 is easy to recover if necessary (e.g. `grep -v '\.mlb$'`).
1677
1678 * 2006-12-08
1679 ** Added command line switches `-{,target}-{as,cc,link}-opt-quote`, which pass
1680 their argument as a single argument to `gcc` (i.e., without tokenization at
1681 spaces). These options support using headers and libraries (including the
1682 MLton runtime headers and libraries) from a path with spaces.
1683
1684 * 2006-12-02
1685 ** Extensive reorganization of garbage collector, runtime system, and Basis
1686 Library implementation. (This is in preparation for future 64bit support.)
1687 They should be more C standards compliant and easier to port to new systems.
1688 ** FFI revisions
1689 *** Disallow nested indirect types (e.g., `int array array`).
1690
1691 * 2006-11-30
1692 ** Fixed a bug in elaboration of FFI forms; unary FFI types (e.g., `array`,
1693 `ref`, `vector`) could be used in places where `MLton.Pointer.t` was required.
1694 This would later cause the compiler to raise the `TypeError` exception, along
1695 with a lot of XML IL.
1696
1697 * 2006-11-19
1698 ** On *-darwin, work with GnuMP installed via Fink or MacPorts.
1699
1700 * 2006-10-30
1701 ** Ported to x86-darwin.
1702
1703 * 2006-09-23
1704 ** Added missing specification of `find` to the `MONO_VECTOR` signature.
1705
1706 * 2006-08-03
1707 ** Fixed a bug in Useless SSA optimization, caused by calling an imported C
1708 function and then ignoring the result.
1709
1710 * 2006-06-24
1711 ** Fixed a bug in pass to flatten data structures. Thanks to Joe Hurd for the
1712 bug report.
1713
1714 * 2006-06-08
1715 ** Fixed a bug in the native codegen's implementation of the C-calling
1716 convention.
1717
1718 * 2006-05-11
1719 ** Ported to PowerPC-AIX.
1720 ** Fixed a bug in the runtime for the cases where nonblocking IO with sockets
1721 was implemented using `MSG_DONTWAIT`. This flag does not exist on AIX,
1722 Cygwin, HPUX, and MinGW and was previously just ignored. Now the runtime
1723 simulates the flag for these platforms (except MinGW, yet, where it's still
1724 ignored).
1725
1726 * 2006-05-06
1727 ** Added `-default-type '<ty><N>'` for specifying the binding of default types
1728 in the Basis Library (e.g., `Int.int`).
1729
1730 * 2006-04-25
1731 ** Ported to HPPA-HPUX.
1732 ** Fixed `PackReal{,32,64}{Big,Little}` to follow the Basis Library
1733 specification.
1734
1735 * 2006-04-19
1736 ** Fixed a bug in `MLton.share` that could cause a segfault.
1737
1738 * 2006-03-30
1739 ** Changed `MLton.Vector.unfoldi` to return the state in addition to the
1740 result vector.
1741
1742 * 2006-03-30
1743 ** Added `MLton.Vector.create`, a more powerful vector-creation function than
1744 is available in the basis library.
1745
1746 * 2006-03-04
1747 ** Added MLRISC from SML/NJ 110.57 to standard distribution.
1748
1749 * 2006-03-03
1750 ** Fixed bug in SSA simplifier that could eliminate an irredundant test.
1751
1752 * 2006-03-02
1753 ** Ported a bugfix from SML/NJ for a bug with the combination of `withNack`
1754 and `never` in CML.
1755
1756 * 2006-02-09
1757 ** Support compiler specific annotations in ML Basis files. If an annotation
1758 contains `:`, then the text preceding the `:` is meant to denote a compiler.
1759 For MLton, if the text preceding the `:` is equal to `mlton`, then the
1760 remaining annotation is scanned as a normal annotation. If the text preceding
1761 the `:` is not-equal to `mlton`, then the annotation is ignored, and no
1762 warning is issued.
1763
1764 * 2006-02-04
1765 ** Fixed bug in elaboration of functors; a program with a very large number of
1766 functors could exhibit the error `ElaborateEnv.functorClosure: firstTycons`.
1767
1768
1769 == Version 20051202
1770
1771 Here are the changes from version 20041109 to version 20051202.
1772
1773 === Summary
1774
1775 * New license: BSD-style instead of GPL.
1776 * New platforms:
1777 ** hppa: Debian Linux.
1778 ** x86: MinGW.
1779 * Compiler.
1780 ** improved exception history.
1781 ** Command-line switches.
1782 *** Added: `-as-opt`, `-mlb-path-map`, `-target-as-opt`, `-target-cc-opt`.
1783 *** Deprecated: none.
1784 *** Removed: `-native`, `-sequence-unit`, `-warn-match`, `-warn-unused`.
1785 * Language.
1786 ** FFI syntax changes and extensions.
1787 *** Added: `_symbol`.
1788 *** Changed: `_export`, `_import`.
1789 *** Removed: `_ffi`.
1790 ** ML Basis annotations.
1791 *** Added: `allowFFI`, `nonexhaustiveExnMatch`, `nonexhaustiveMatch`,
1792 `redundantMatch`, `sequenceNonUnit`.
1793 *** Deprecated: `allowExport`, `allowImport`, `sequenceUnit`, `warnMatch`.
1794 * Libraries.
1795 ** Basis Library.
1796 *** Added: `Int1`, `Word1`.
1797 ** `MLton` structure.
1798 *** Added: `Process.create`, `ProcEnv.setgroups`, `Rusage.measureGC`,
1799 `Socket.fdToSock`, `Socket.Ctl.getError`.
1800 *** Changed: `MLton.Platform.Arch`.
1801 ** Other libraries.
1802 *** Added: ckit library, ML-NLFFI library, SML/NJ library.
1803 * Tools.
1804 ** updates of `mllex` and `mlyacc` from SML/NJ.
1805 ** added `mlnlffigen`.
1806 ** profiling supports better inclusion/exclusion of code.
1807
1808 === Details
1809
1810 * 2005-11-19
1811 ** Updated SML/NJ Library and CKit Library from SML/NJ 110.57.
1812
1813 * 2005-11-15
1814 ** Fixed a bug in `MLton.ProcEnv.setgroups`.
1815
1816 * 2005-11-11
1817 ** Fixed a bug in the interleaving of lexing/parsing and elaborating of ML
1818 Basis files, which would raise an unhandled `Force` exception on cyclic basis
1819 references. Thanks to John Dias for the bug report.
1820
1821 * 2005-11-10
1822 ** Fixed two bugs in `Time.scan`. One would raise `Time` on a string with a
1823 large fractional component. Thanks to Carsten Varming for the bug report.
1824 The other failed to scan strings with an explicit sign followed by a decimal
1825 point.
1826
1827 * 2005-11-03
1828 ** Removed `MLton.GC.setRusage`.
1829 ** Added `MLton.Rusage.measureGC`.
1830
1831 * 2005-09-11
1832 ** Fixed bug in display of types with large numbers of type variables, which
1833 could cause unhandled exception `Chr`.
1834
1835 * 2005-09-08
1836 ** Fixed bug in type inference of flexible records that would show up as
1837 `"Type error: variable applied to wrong number of type args"`.
1838
1839 * 2005-09-06
1840 ** Fixed bug in `Real.signBit`, which had assumed that the underlying C
1841 signbit returned 0 or 1, when in fact any nonzero value is allowed to indicate
1842 the signbit is set.
1843
1844 * 2005-09-05
1845 ** Added `-mlb-path-map` switch.
1846
1847 * 2005-08-25
1848 ** Fixed bug in `MLton.Finalizable.touch`, which was not keeping alive
1849 finalizable values in all cases.
1850
1851 * 2005-08-18
1852 ** Added SML/NJ Library and CKit Library from SML/NJ 110.55 to standard
1853 distribution.
1854 ** Fixed bug in `Socket.Ctl.*`, which got the endianness wrong on big-endian
1855 machines. Thanks to Wesley Terpstra for the bug report and fix.
1856 ** Added `MLton.GC.setRusage`.
1857 ** Fixed bug in `mllex`, which had file positions starting at 2. They now
1858 start at zero.
1859
1860 * 2005-08-15
1861 ** Fixed bug in `LargeInt.scan`, which should skip leading `"0x"` and `"0X"`.
1862 Thanks to Wesley Terpstra for the bug report and fix.
1863
1864 * 2005-08-06
1865 ** Additional revisions of FFI:
1866 *** Deprecated `_export` with incomplete annotation.
1867 *** Added `_address` for address of C objects.
1868 *** Eliminated address component of `_symbol`.
1869 *** Changed the type of the `_symbol*` expression.
1870 *** See documentation for more detail.
1871
1872 * 2005-08-06
1873 ** Annotation changes:
1874 *** Deprecated: `sequenceUnit`
1875 *** Added: `sequenceNonUnit`
1876
1877 * 2005-08-03
1878 ** Annotation changes:
1879 *** Deprecated: `allowExport`, `allowImport`, `warnMatch`
1880 *** Added: `allowFFI`, `nonexhaustiveExnMatch`, `nonexhaustiveMatch`,
1881 `redundantMatch`
1882
1883 * 2005-08-01
1884 ** Update `mllex` and `mlyacc` with SML/NJ 110.55+ versions. This
1885 incorporates a small number of minor bug fixes.
1886
1887 * 2005-07-23
1888 ** Fixed bug in pass to flatten refs into containing data structure.
1889
1890 * 2005-07-23
1891 ** Overhaul of FFI:
1892 *** Deprecated `_import` of C base types.
1893 *** Added `_symbol` for address, getter, and setter of C base types.
1894 *** See documentation for more detail.
1895
1896 * 2005-07-21
1897 ** Update `mllex` and `mlyacc` with SML/NJ 110.55 versions. This incorporates
1898 a small number of minor bug fixes.
1899
1900 * 2005-07-20
1901 ** Fixed bug in front end that allowed unary constructors to be used without
1902 an argument in patterns.
1903
1904 * 2005-07-19
1905 ** Eliminated `_ffi`, which has been deprecated for some time.
1906
1907 * 2005-07-14
1908 ** Fixed bug in runtime that caused getrusage to be called on every GC, even
1909 if timing info isn't needed.
1910
1911 * 2005-07-13
1912 ** Fixed bug in closure conversion tickled by making a weak pointer to a
1913 closure.
1914
1915 * 2005-07-12
1916 ** Changed `{OS,Posix}.Process.sleep` to call `nanosleep()` instead of
1917 `sleep()`.
1918 ** Added `MLton.ProcEnv.setgroups`.
1919
1920 * 2005-07-11
1921 ** `InetSock.{any,toAddr}` raise `SysErr` if port is not in [0, 2^16^).
1922
1923 * 2005-07-02
1924 ** Fixed bug in `Socket.recvVecFrom{,',NB,NB'}`. The type was too polymorphic
1925 and allowed the creation of a bogus `sock_addr`.
1926
1927 * 2005-06-28
1928 ** The front end now reports errors on encountering undefined or cyclicly
1929 defined MLB path variables.
1930
1931 * 2005-05-22
1932 ** Fixed bug in `Posix.IO.{getlk,setlk,setlkw}` that caused a link-time error:
1933 undefined reference to `Posix_IO_FLock_typ`.
1934 ** Improved exception history so that the first entry in the history is the
1935 source position of the raise, and the rest is the call stack.
1936
1937 * 2005-05-19
1938 ** Improved exception history for `Overflow` exceptions.
1939
1940 * 2005-04-20
1941 ** Fixed a bug in pass to flatten refs into containing data structure.
1942
1943 * 2005-04-14
1944 ** Fixed a front-end bug that could cause an internal bug message of the form
1945 `"missing flexInst"`.
1946
1947 * 2005-04-13
1948 ** Fixed a bug in the representation of flat arrays/vectors that caused
1949 incorrect behavior when the element size was 2 or 4 bytes and there were
1950 multiple components to the element (e.g. `(char * char) vector`).
1951
1952 * 2005-04-01
1953 ** Fixed a bug in `GC_arrayAllocate` that could cause a segfault.
1954
1955 * 2005-03-22
1956 ** Added structures `Int1`, `Word1`.
1957
1958 * 2005-03-19
1959 ** Fixed a bug that caused `Socket.Ctl.{get,set}LINGER` to raise `Subscript`.
1960 The problem was in the use of `PackWord32Little.update`, which scales the
1961 supplied index by `bytesPerElem`.
1962
1963 * 2005-03-13
1964 ** Fixed a bug in CML mailboxes.
1965
1966 * 2005-02-26
1967 ** Fixed an off-by-one error in `mkstemp` defined in `mingw.c`.
1968
1969 * 2005-02-13
1970 ** Added `mlnlffigen` tool (heavily adapted from SML/NJ).
1971
1972 * 2005-02-12
1973 ** Added MLNLFFI Library (heavily adapted from SML/NJ) to standard
1974 distribution.
1975
1976 * 2005-02-04
1977 ** Fixed a bug in `OS.path.toString`, which did not raise `InvalidArc` when
1978 needed.
1979
1980 * 2005-02-03
1981 ** Fixed a bug in `OS.Path.joinDirFile`, which did not raise `InvalidArc` when
1982 passed a file that was not an arc.
1983
1984 * 2005-01-26
1985 ** Fixed a front end bug that incorrectly rejected expansive __valbind__s with
1986 useless bound type variables.
1987
1988 * 2005-01-22
1989 ** Fixed x86 codegen bug which failed to account for the possibility that a
1990 64-bit move could interfere with itself (as simulated by 32-bit moves).
1991
1992 * 2004-12-22
1993 ** Fixed `Real32.fmt StringCvt.EXACT`, which had been producing too many
1994 digits of precision because it was converting to a `Real64.real`.
1995
1996 * 2004-12-15
1997 ** Replaced MLB path variable `MLTON_ROOT` with `SML_LIB`, to use a more
1998 compiler-independent name. We will keep `MLTON_ROOT` aliased to `SML_LIB`
1999 until after the next release.
2000
2001 * 2004-12-02
2002 ** `Unix.create` now works on all platforms (including Cygwin and MinGW).
2003
2004 * 2004-11-24
2005 ** Added support for `MLton.Process.create`, which works on all platforms
2006 (including Windows-based ones like Cygwin and MinGW) and allows better control
2007 over `std{in,out,err}` for child process.
2008
2009
2010 == Version 20041109
2011
2012 Here are the changes from version 20040227 to 20041109.
2013
2014 === Summary
2015
2016 * New platforms:
2017 ** x86: FreeBSD 5.x, OpenBSD
2018 ** PowerPC: Darwin (MacOSX)
2019 * Support for MLBasis files.
2020 * Support for dynamic libraries.
2021 * Support for Concurrent ML (CML).
2022 * New structures: `Int2`, `Int3`, ..., `Int31` and `Word2`, `Word3`, ..., `Word31`.
2023 * A new form of profiling: `-profile count`.
2024 * A bytecode generator.
2025 * Data representation improvements.
2026 * `MLton` structure changes.
2027 ** Added: `share`, `shareAll`
2028 ** Changed: `Exn`, `IntInf`, `Signal`, `Thread`.
2029 * Command-line switch changes.
2030 ** Deprecated:
2031 *** `-native` (use `-codegen`)
2032 *** `-sequence-unit` (use `-default-ann`)
2033 *** `-warn-match` (use `-default-ann`)
2034 *** `-warn-unused` (use `-default-ann`)
2035 ** Removed:
2036 *** `-detect-overflow`
2037 *** `-exn-history` (use `-const`)
2038 *** `-safe`
2039 *** `-show-basis-used`
2040 ** Added:
2041 *** `-codegen`
2042 *** `-const`
2043 *** `-default-ann`
2044 *** `-disable-ann`
2045 *** `-profile-branch`
2046 *** `-target-link-opt`
2047
2048 === Details
2049
2050 * 2004-09-22
2051 ** Extended `_import` to support indirect function calls.
2052
2053 * 2004-09-13
2054 ** Made `Date.{fromString,scan}` accept a space (treated as zero) in the first
2055 character of the day of the month.
2056
2057 * 2004-09-12
2058 ** Fixed bug in `IntInf` that could cause a segfault.
2059 ** Remove `MLton.IntInf.size`.
2060
2061 * 2004-09-05
2062 ** Made `-detect-overflow` and `-safe` expert options.
2063
2064 * 2004-08-30
2065 ** Added `+val MLton.share: 'a -> unit+`, which maximizes sharing in a heap
2066 object.
2067
2068 * 2004-08-27
2069 ** Fixed bug in `Real.toLargeInt`. It would incorrectly raise `Option`
2070 instead of `Overflow` in the case when the real was not an `INF`, but rounding
2071 produced an `INF`.
2072 ** Fixed bugs in `Date.{fmt,fromString,scan,toString}`. They incorrectly
2073 allowed a space for the first character in the day of the month.
2074
2075 * 2004-08-18
2076 ** Changed `MLton.{Thread,Signal,World}` to distinguish between implicitly and
2077 explicitly paused threads.
2078
2079 * 2004-07-28
2080 ** Added support for programming in the large using the ML Basis system.
2081
2082 * 2004-07-11
2083 ** Fixed bugs in `ListPair.*Eq` functions, which incorrectly raised the
2084 `UnequalLengths` exception.
2085
2086 * 2004-07-01
2087 ** Added `+val MLton.Exn.addExnMessager: (exn -> string option) -> unit+`.
2088
2089 * 2004-06-23
2090 ** Runtime system options that take memory sizes now accept a `g` suffix
2091 indicating gigabytes. They also now take a real instead of an integer,
2092 e.g. `fixed-heap 0.5g`. They also now accept uppercase, e.g. `150M`.
2093
2094 * 2004-06-12
2095 ** Added support for OpenBSD.
2096
2097 * 2004-06-10
2098 ** Added support for FreeBSD 5.x.
2099
2100 * 2004-05-28
2101 ** Deprecated the `-native` flag. Instead, use the new flag `-codegen
2102 {native|bytecode|C}`. This is in anticipation of adding a bytecode compiler.
2103
2104 * 2004-05-26
2105 ** Fixed a front-end bug that could cause cascading error to print a very
2106 large and unreadable internal bug message of the form `"datatype ... realized
2107 with scheme Unknown"`.
2108
2109 * 2004-05-17
2110 ** Automatically restart functions in the Basis Library that correspond
2111 directly to interruptable system calls.
2112
2113 * 2004-05-13
2114 ** Added `-profile count`, for dynamic counts of function calls and branches.
2115 ** Equate the types `Posix.Signal.signal` and `Unix.signal`.
2116
2117 * 2004-05-11
2118 ** Fixed a bug with `-basis 1997` that would cause type errors due to
2119 differences between types in the MLton structure and types in the rest of the
2120 basis library.
2121
2122 * 2004-05-01
2123 ** Fixed a bug with sharing constraints in signatures that would sometimes
2124 mistakenly treat two structures as identical when they shouldn't have been.
2125 This would cause some programs to be mistakenly rejected.
2126
2127 * 2004-04-30
2128 ** Added `MLton.Signal.{handled,restart}`.
2129
2130 * 2004-04-23
2131 ** Added `Timer.checkCPUTimes`, and updated the `Timer` structure to match the
2132 latest basis spec. Also fixed `totalCPUTimer` and `totalRealTimer`, which
2133 were wrong.
2134
2135 * 2004-04-13
2136 ** Added `MLton.Signal.Mask.{getBlocked,isMember}`.
2137
2138 * 2004-04-12
2139 ** Fix bug that mistakenly generalized variable types containing unknown types
2140 when matching against a signature.
2141 ** Reasonable front-end error message when unification causes recursive
2142 (circular) type.
2143
2144 * 2004-04-03
2145 ** Fixed bug in sharing constraints so that `sharing A = B = C` means that all
2146 pairs `A = B`, `A = C`, `B = C` are shared, not just `A = B` and `B = C`.
2147 This matters in some situations.
2148
2149 * 2004-03-20
2150 ** Fixed `Time.now` which was treating microseconds as nanoseconds.
2151
2152 * 2004-03-14
2153 ** Fixed SSA optimizer bug that could cause the error `"<type> has no
2154 tyconInfo property"`.
2155
2156 * 2004-03-11
2157 ** Fixed `Time.fromReal` to raise `Time`, not `Overflow`, on unrepresentable
2158 times.
2159
2160 * 2004-03-04
2161 ** Added structures `Word2`, `Word3`, ..., `Word31`.
2162
2163 * 2004-03-03
2164 ** Added structures `Int2`, `Int3`, ..., `Int31`.
2165 ** Fixed bug in elaboration of `and` with signatures, structures, and functors
2166 so that it now evaluates all right-hand sides before binding any left-hand
2167 sides.
2168
2169
2170 == Version 20040227
2171
2172 Here are the changes from version 20030716 to 20040227.
2173
2174 === Summary
2175
2176 * The front end now follows the Definition of SML and produces readable error
2177 messages.
2178 * Added support for NetBSD.
2179 * Basis library changes tracking revisions to the specification.
2180 * Added structures: `Int64`, `Real32`, `Word64`.
2181 * File positions use `Int64`.
2182 * Major improvements to `-show-basis`, which now displays the basis in a very
2183 readable way with full type information.
2184 * Command-line switch changes.
2185 ** Deprecated: `-basis`.
2186 ** Removed: `-lib-search`, `-link`, `-may-load-world`, `-static`.
2187 ** Added: `-link-opt`, `-runtime`, `-sequence-unit`, `-show-def-use`,
2188 `-stop tc`, `-warn-match`, `-warn-unused`.
2189 ** Changed: `-export-header`, `-show-basis`, `-show-basis-used`.
2190 ** Renamed: `-host` to `-target`.
2191 * FFI changes.
2192 ** Renamed `_ffi` as `_import`.
2193 ** Added `cdecl` and `stdcall` attributes to `_import` and `_export`
2194 expressions.
2195 * MLton structure changes.
2196 ** Added: Pointer.
2197 ** Removed: Ptrace.
2198 ** Changed: `Finalizable`, `IntInf`, `Platform`, `Random`, `Signal`, `Word`.
2199
2200 === Details
2201
2202 * 2004-02-16
2203 ** Changed `-export-header`, `-show-basis`, `-show-basis-used` to take a file
2204 name argument, and they no longer force compilation to halt.
2205 ** Added `-show-def-use` and `-warn-unused`, which deal with def-use
2206 information.
2207
2208 * 2004-02-13
2209 ** Added flag `-sequence-unit`, which imposes the constraint that in the
2210 sequence expression `(e1; e2)`, `e1` must be of type `unit`.
2211
2212 * 2004-02-10
2213 ** Lots of changes to `MLton.Signal`: name changes, removal of superfluous
2214 functions, additional functions.
2215
2216 * 2004-02-09
2217 ** Extended `-show-basis` so that when used with an input program, it shows
2218 the basis defined by the input program.
2219 ** Added `stop` runtime argument.
2220 ** Made `-call-graph {false|true}` an option to `mlprof` that determines
2221 whether or not a call graph file is written.
2222
2223 * 2004-01-20
2224 ** Fixed a bug in `IEEEReal.{fromString,scan}`, which would improperly return
2225 `INF` instead of `ZERO` for things like `"0.0000e123456789012345"`.
2226 ** Fixed a bug in `Real.{fromDecimal,fromString,scan}`, which didn't return an
2227 appropriately signed zero for `~0.0`.
2228 ** Fixed a bug in `Real.{toDecimal,fmt}`, which didn't correctly handle
2229 `~0.0`.
2230 ** Report a compile-time error on unrepresentable real constants.
2231
2232 * 2004-01-05
2233 ** Removed option `-may-load-world`. You can now use `-runtime no-load-world`
2234 instead.
2235 ** Removed option `-static`. You can now use `-link-opt -static` instead.
2236 ** Changed `MLton.IntInf.size` to return 0 instead of 1 on small ints.
2237
2238 * 2003-12-28
2239 ** Fixed horrible bug in `MLton.Random.alphaNumString` that caused it to
2240 return 0 for all characters beyond position 11.
2241
2242 * 2003-12-17
2243 ** Removed `-basis` as a normal flag. It is still available as an expert
2244 flag, but its use is deprecated. It will almost certainly disappear after the
2245 next release.
2246
2247 * 2003-12-10
2248 ** Allow multiple `@MLton --` runtime args in sequnce. This makes it easier
2249 for scripts to prefix `@MLton` args without having to splice them with other
2250 ones.
2251
2252 * 2003-12-04
2253 ** Added support for files larger than 2G. This included changing
2254 `Position` from `Int32` to `Int64`.
2255
2256 * 2003-12-01
2257 ** Added `structure MLton.Pointer`, which includes a `type t` for pointers
2258 (memory addresses, not SML heap pointers) and operations for loading from and
2259 storing to memory.
2260
2261 * 2003-11-03
2262 ** Fixed `Timer.checkGCTime` so that only the GC user time is included, not GC
2263 system time.
2264
2265 * 2003-10-13
2266 ** Added `-warn-match` to control display nonexhaustive and redundant
2267 match warnings.
2268 ** Fixed space leak in `StreamIO` causing the entire stream to be retained.
2269 Thanks to Jared Showalter for the bug report and fix.
2270
2271 * 2003-10-10
2272 ** Added `-stop tc` switch to stop after type checking.
2273
2274 * 2003-09-25
2275 ** Fixed `Posix.IO.getfl`, which had mistakenly called `fcntl` with `F_GETFD`
2276 instead of `F_GETFL`.
2277 ** Tracking basis library changes:
2278 *** `Socket` module datagram functions no longer return amount written,
2279 since they always write the entire amount or fail. So,
2280 `send{Arr,Vec}To{,'}` now return `unit` instead of `int`.
2281 *** Added nonblocking versions of all the send and recv functions, as well
2282 as accept and connect. So, we now have: `acceptNB`, `connectNB`,
2283 `recv{Arr,Vec}{,From}NB{,'}`, `send{Arr,Vec}{,To}NB{,'}`.
2284
2285 * 2003-09-24
2286 ** Tracking basis library changes:
2287 *** `TextIO.inputLine` now returns a `string option`.
2288 *** Slices used in `Byte`, `PRIM_IO`, `PrimIO`, `Posix.IO`, `StreamIO`.
2289 *** `Posix.IO.readVec` raises `Size`, not `Subscript`, with negative
2290 argument.
2291
2292 * 2003-09-22
2293 ** Fixed `Real.toManExp` so that the mantissa is in [0.5, 1), not [1, 2). The
2294 spec says that 1.0 &le; man * radix < radix, which since radix is 2, implies
2295 that the mantissa is in [0.5, 1).
2296 ** Added `Time.{from,to}Nanoseconds`.
2297
2298 * 2003-09-11
2299 ** Added `Real.realRound`.
2300 ** Added `Char{Array,Vector}Slice` to `Text`.
2301
2302 * 2003-09-11
2303 ** `OS.IO.poll` and `Socket.select` now raise errors on negative timeouts.
2304 ** `Time.time` is now implemented using `IntInf` instead of `Int`, which means
2305 that a much larger range of time values is representable.
2306
2307 * 2003-09-10
2308 ** `Word64` is now there.
2309
2310 * 2003-09-09
2311 ** Replaced `Pack32{Big,Little}` with `PackWord32{Big,Little}`.
2312 ** Fixed bug in `OS.FileSys.fullPath`, which mistakenly stopped as soon as it
2313 hit a symbolic link.
2314
2315 * 2003-09-08
2316 ** Fixed `@MLton max-heap`, which was mistakenly ignored. Cleaned up `@MLton
2317 fixed-heap`. Both `fixed-heap` and `max-heap` can use copying or mark-compact
2318 collection.
2319
2320 * 2003-09-06
2321 ** `Int64` is completely there.
2322 ** Fixed `OS.FileSys.tmpName` so that it creates the file, and doesn't use
2323 `tmpnam`. This eliminates an annoying linker warning message.
2324
2325 * 2003-09-05
2326 ** Added structures `{LargeInt,LargeReal,LargeWord,Word}{Array,Array2,ArraySlice,Vector,VectorSlice}`
2327 ** Fixed bug in `Real.toDecimal`, which return class `NORMAL` for subnormals.
2328 ** Fixed bug in `Real.toLargeInt`, which didn't return as precise an integer
2329 as possible.
2330
2331 * 2003-09-03
2332 ** Lots of fixes to `REAL` functions.
2333 *** `Real32` is now completely in place, except for `Real32.nextAfter` on
2334 SunOS.
2335 *** Fixed `Real.Math.exp` on x86 to return the right value when applied to
2336 `posInf` and `negInf`.
2337 *** Changed `Real.Math.{cos,sin,tan}` on x86 to always use a call to the C
2338 math library instead of using the x86 instruction. This eliminates some
2339 anomalies between compiling `-native false` and `-native true`.
2340 *** Change `Real.Math.pow` to handle exceptional cases in the SML code.
2341 *** Fixed `Real.signBit` on Sparcs.
2342
2343 * 2003-08-28
2344 ** Fixed `PackReal{,64}Little` to work correctly on Sparc.
2345 ** Added `PackReal{,64}Big`, `PackReal32{Big,Little}`.
2346 ** Added `-runtime` switch, which passes arguments to the runtime via
2347 `@MLton`. These arguments are processed before command line switches.
2348 ** Eliminated MLton switch `-may-load-world`. Can use `-runtime` combined
2349 with new runtime switch `-no-load-world` to disable load world in an
2350 executable.
2351
2352 * 2003-08-26
2353 ** Changed `-host` to `-target`.
2354 ** Split `MLton.Platform.{arch,os}` into `MLton.Platform.{Arch,OS}.t`.
2355
2356 * 2003-08-21
2357 ** Fixed bug in C codegen that would cause undefined references to
2358 `Real_{fetch,move,store}` when compiling on Sparcs with `-align 4`.
2359
2360 * 2003-08-17
2361 ** Eliminated `-link` and `-lib-search`, which are no longer needed.
2362 Eliminated support for passing `-l*`, `-L*`, and `*.a` on the command line.
2363 Use `-link-opt` instead.
2364
2365 * 2003-08-16
2366 ** Added `-link-opt`, for passing options to `gcc` when linking.
2367
2368 * 2003-07-19
2369 ** Renamed `_ffi` as `_import`. The old `_ffi` will remain for a while, but
2370 is deprecated and should be replaced with `_import`.
2371 ** Added attributes to `_export` and `_import`. For now, the only attributes
2372 are `cdecl` and `stdcall`.
2373
2374
2375 == Version 20030716
2376
2377 Here are the changes from version 20030711 to 20030716.
2378
2379 == Summary
2380
2381 * Fixed several serious bugs with the 20030711 release.
2382
2383 == Details
2384
2385 * 2003-07-15
2386 ** Fixed bug that caused a segfault when attempting to create an
2387 array that was too large, e.g
2388 +
2389 [source,sml]
2390 ----
2391 1 + Array.sub (Array.tabulate (valOf Int.maxInt, fn i => i), 0)
2392 ----
2393
2394 ** mlton now checks the command line arguments following the file to compile
2395 that are passed to the linker to make sure they are reasonable.
2396
2397 * 2003-07-14
2398 ** Fixed packaging for Cygwin and Sparc to include `libgmp.a`.
2399 ** Eliminated bootstrap target. The `Makefile` automatically determines
2400 whether to bootstrap or not.
2401 ** Fixed XML type checker bug that could cause error: `"empty tyvars in
2402 PolyVal dec"`.
2403
2404 * 2003-07-12
2405 ** Turned off `FORCE_GENERATIONAL` in gc. It had been set, which caused the
2406 gc to always use generational collection. This could seriously slow apps down
2407 that don't need it.
2408
2409
2410 == Version 20030711
2411
2412 Here are the changes from version 20030312 to 20030711.
2413
2414 === Summary
2415
2416 * Added support for Sparc/SunOS using the C code generator.
2417 * Completed the basis library implementation. At this point, the only missing
2418 basis library function is `use`.
2419 * Added `_export`, which allows one to call SML functions from C.
2420 * Added weak pointers (via `MLton.Weak`) and finalization (via
2421 `MLton.Finalizable`).
2422 * Added new integer modules: `Int8`, `Int16`.
2423 * Better profiling call graphs
2424 * Fixed conversions between reals and their decimal representations to be
2425 correct using the gdtoa library.
2426
2427 === Details
2428
2429 * 2003-07-07
2430 ** Profiling improvements:
2431 *** Eliminated `mlton -profile-split`. Added `mlprof -split`. Now the
2432 profiling infrastructure keeps track of the splits and allows one to decide
2433 which splits to make (if any) when `mlprof` is run, which is much better
2434 than having to decide at compile time.
2435 *** Changed `mlprof -graph` to `mlprof -keep`, and changed the behavior so
2436 that `-keep` also controls which functions are displayed in the table.
2437 *** Eliminated `mlprof -ignore`: it's behavior is now subsumed by `-keep`,
2438 whose meaning has changed to be more like -ignore on nodes that are not
2439 kept.
2440 ** When calling `gcc` for linking, put `-link` args in same order as they
2441 appeared on the MLton command line (they used to be reversed).
2442
2443 * 2003-07-03
2444 ** Making `OS.Process.{atExit,exit}` conform to the basis library spec in that
2445 exceptions raised during cleaners are caught and ignored. Also, calls to
2446 `exit` from cleaners cause the rest of cleaners to run.
2447
2448 * 2003-07-02
2449 ** Fixed bug with negative `IntInf` constants that could cause compile time
2450 error message: `"x86Translate.translateChunk ... strange Offset: base: ..."`
2451 ** Changed argument type of `MLton.IntInf.Small` from `word` to `int`.
2452 ** Added fix to profiling so that the `mlmon.out` file is written even when
2453 the program terminates due to running out of memory.
2454
2455 * 2003-06-25
2456 ** Added `{Int{8,16},Word8}{,Array,ArraySlice,Vector,VectorSlice,Array2}`
2457 structures.
2458
2459 * 2003-06-25
2460 ** Fixed bug in `IntInf.sign`, which returned the wrong value for zero.
2461
2462 * 2003-06-24
2463 ** Added `_export`, for calling from C to SML.
2464
2465 * 2003-06-18
2466 ** Regularization of options:
2467 *** `-diag` -> `-diag-pass`
2468 *** `-drop-pass` takes a regexp
2469
2470 * 2003-06-06
2471 ** Fixed bug in `OS.IO.poll` that caused it to return the input event types
2472 polled for instead of what was actually available.
2473
2474 * 2003-06-04
2475 ** Fixed bug in KnownCase SSA optimization that could case incorrect results
2476 in compiled programs.
2477
2478 * 2003-06-03
2479 ** Fixed bug in SSA optimizer that could cause the error message:
2480 +
2481 ----
2482 Type error: Type.equals
2483 {from = char vector, to = unit vector}
2484 Type error: analyze raised exception loopStatement: ...
2485 unhandled exception: TypeError
2486 ----
2487
2488 * 2003-06-02
2489 ** Fixed `Real.rem` to work correctly on `inf`-s and `nan`-s.
2490 ** Fixed bug in profiling that caused the function name to be omitted on
2491 functions defined by `val rec`.
2492
2493 * 2003-05-31
2494 ** `Fixed Real.{fmt,fromString,scan,toString}` to match the basis library
2495 spec.
2496 ** Added `IEEEReal.{fromString,scan}`.
2497 ** Added `Real.{from,to}Decimal`.
2498
2499 * 2003-05-25
2500 ** Added `Real.nextAfter`.
2501 ** Added `OS.Path.{from,to}UnixPath`, which are the identity function on Unix.
2502
2503 * 2003-05-20
2504 ** Added type `MLton.pointer`, the type of C pointers, for use with the FFI.
2505
2506 * 2003-05-18
2507 ** Fixed two bugs in type inference that could cause the compiler to raise the
2508 `TypeError` exception, along with a lot of XML IL. The `type-check.sml`
2509 regression contains simple examples of what failed.
2510 ** Fixed a bug in the simplifier that could cause the message: `"shrinker
2511 raised Prim.apply raised assertion failure: SmallIntInf.fromWord"`.
2512
2513 * 2003-05-15
2514 ** Fixed bug in `Real.class` introduced on 04-28 that cause many regression
2515 failures with reals when using newer `gcc`-s.
2516 ** Replaced `MLton.Finalize` with `MLton.Finalizable`, which has a more robust
2517 approach to finalization.
2518
2519 * 2003-05-13
2520 ** Fixed bug in `MLton.FFI` on Cygwin that caused `Thread_returnToC` to be
2521 undefined.
2522
2523 * 2003-05-12
2524 ** Added support for finalization with `MLton.Finalize`.
2525
2526 * 2003-05-09
2527 ** Fixed a runtime system bug that could cause a segfault. This bug would
2528 happen after a GC during heap resizing when copying a heap, if the heap was
2529 allocated at a very low (<10M) address. The bug actually showed up on a
2530 Cygwin system.
2531
2532 * 2003-05-08
2533 ** Fixed bug in `HashType` that raised `"Vector.forall2"` when the arity of a
2534 type constructor is changed by `SimplifyTypes`, but a newly constructed type
2535 has the same hash value.
2536
2537 * 2003-05-02
2538 ** Switched over to new layered IO implementation, which completes the
2539 implementation of the `BinIO` and `TextIO` modules.
2540
2541 * 2003-04-28
2542 ** Fixed bug that caused an assertion failure when generating a jump table for
2543 a case dispatch on a non-word sized index with non-zero lower bound on the
2544 range.
2545
2546 * 2003-04-24
2547 ** Added `-align {4|8}`, which controls alignment of objects. With `-align
2548 8`, memory accesses to doubles are guaranteed to be aligned mod 8, and so
2549 don't need special routines to load or store.
2550
2551 * 2003-04-22
2552 ** Fixed bug that caused a total failure of time profiling with `-native
2553 false`. The bug was introduced with the C codegen improvements that split the
2554 C into multiple files. Now, the C codegen declares all profile labels used in
2555 each file so that they are global symbols.
2556
2557 * 2003-04-18
2558 ** Added `MLton.Weak`, which supports weak pointers.
2559
2560 * 2003-04-10
2561 ** Replaced the basis library's `MLton.hostType` with `MLton.Platform.arch`
2562 and `MLton.Platform.os`.
2563
2564 * 2003-04
2565 ** Added support for SPARC/SunOS using the C codegen.
2566
2567 * 2003-03-25
2568 ** Added `MLton.FFI`, which allows callbacks to SML from C.
2569
2570 * 2003-03-21
2571 ** Fixed `mlprof` so that the default `-graph arg` for data from
2572 `-profile-stack true` is `(thresh-stack x)`, not `(thresh x)`.
2573
2574
2575 == Version 20030312
2576
2577 Here are the changes from version 20020923 to 20030312.
2578
2579 === Summary
2580
2581 * Added source-level profiling of both time and allocation.
2582 * Updated basis library to 2002 specification. To obtain the old
2583 library, compile with `-basis 1997`.
2584 * Added many modules to basis library:
2585 ** `BinPrimIO`, `GenericSock`, `ImperativeIO`, `INetSock`, `NetHostDB`,
2586 `NetProtDB`, `NetServDB`, `Socket`, `StreamIO`, `TextPrimIO`, `UnixSock`.
2587 * Completed implementation of `IntInf` and `OS.IO`.
2588
2589 === Details
2590
2591 * 2003-02-23
2592 ** Replaced `-profile-combine` wih `-profile-split`.
2593
2594 * 2003-02-11
2595 ** Regularization of options:
2596 *** `-l` -> `-link`
2597 *** `-L` -> `-lib-search`
2598 *** `-o` -> `-output`
2599 *** `-v` -> `-verbose`
2600
2601 * 2003-02-10
2602 ** Added option to `mlton`: `-profile-combine {false|true}`
2603
2604 * 2003-02-09
2605 ** Added options to `mlprof`: `-graph-title`, `-gray`, `-ignore`, `-mlmon`,
2606 `-tolerant`.
2607
2608 * 2002-11 - 2003-01
2609 ** Added source-level allocation and time profiling. This includes the new
2610 options to mlton: `-profile` and `-profile-stack`.
2611
2612 * 2002-12-28
2613 ** Added `NetHostDB`, `NetProtDB`, `NetServDB` structures.
2614 ** Added `Socket`, `GenericSock`, `INetSock`, `UnixSock` structures.
2615
2616 * 2002-12-19
2617 ** Fixed bug in signal check insertion that could cause some signals to be
2618 missed. The fix was to add a signal check on entry to each function in
2619 addition to at each loop header.
2620
2621 * 2002-12-10
2622 ** Fixed bug in runtime that might cause the message `"Unable to set
2623 cardMapForMutator"`.
2624
2625 * 2002-11-23
2626 ** Added support for the latest Basis Library specification.
2627 ** Added option `-basis` to choose Basis Library version. Currently available
2628 basis libraries are `2002`, `2002-strict`, `1997`, and `none`.
2629 ** Added `IntInf.{orb,xorb,andb,notb,<<,~>>}` values.
2630 ** Added `OS.IO.{poll_desc,poll_info}` types.
2631 ** Added `OS.IO.{pollDesc,pollToIODesc,infoToPollDesc,Poll}` values.
2632 ** Added `OS.IO.{pollIn,pollOut,pollPri,poll,isIn,isOut,isPri}` values.
2633 ** Added `BinPrimIO`, `TextPrimIO` structures.
2634 ** Added `StreamIO`, `ImperativeIO` functors.
2635
2636 * 2002-11-22
2637 ** Fixed bug that caused time profiling to fail (with a segfault) when
2638 resuming a saved world.
2639
2640 * 2002-11-07
2641 ** Fixed bug in `MLton.eq` that could arise when using `eq` on functions.
2642
2643 * 2002-11-05
2644 ** Improvements to polymorphic equality. Equality on IntInfs, vectors, and
2645 dataypes all do an `eq` test first before a more expensive comparison.
2646
2647 * 2002-11-01
2648 ** Added allocation profiling. Now, can compile with either `-profile alloc`
2649 or `-profile time`. Renamed `MLton.Profile` as `MLton.ProfileTime`. Added
2650 `MLton.ProfileAlloc`. Cleaned up and changed most `mlprof` option names.
2651
2652 * 2002-10-31
2653 ** Eliminated `MLton.debug`.
2654 ** Fixed bug in the optimizer that affected `IntInf.fmt`. The optimizer had
2655 been always using base 10, instead of the passed in radix.
2656
2657 * 2002-10-22
2658 ** Fixed `Real.toManExp` so that the mantissa is in [1, 2), not [0.5, 1).
2659 ** Added `Real.fromLargeInt`, `Real.toLargeInt`.
2660 ** Fixed `Real.split`, which would return an incorrect whole part due to the
2661 underlying primitive, `Real_modf`, being treated as functional instead of
2662 side-effecting.
2663
2664 * 2002-09-30
2665 ** Fixed `rpath` problem with packaging. All executables in packages
2666 previously made had included a setting for `RPATH`.
2667
2668
2669 == Version 20020923
2670
2671 Here are the changes from version 20020410 to 20020923.
2672
2673 === Summary
2674
2675 * MLton now runs on FreeBSD.
2676 * Major runtime system improvements. The runtime now implements mark-compact
2677 and generational collection, in addition to the copying collection that was
2678 there before. It automatically switches between the the collection strategies
2679 to improve performance and to try to avoid paging.
2680 * Performance when compiling `-exn-history true` has been improved.
2681 * Added `IntInf.log2`, `MLton.GC.pack`, `MLton.GC.unpack`.
2682 * Fixed bug in load world that could cause "sread failed" on Cygwin.
2683 * Fixed optimizer bug that could cause `"no analyze var value property"`
2684 message.
2685
2686 === Details
2687
2688 * 2002-09
2689 ** Integrated Sam Rushing's changes to port MLton to FreeBSD.
2690
2691 * 2002-08-25
2692 ** Changed the implementation of exception history to be completely
2693 functional. Now, the extra field in exceptions (when compiling `-exn-history
2694 true`) is a `string list` instead of a `string list ref`, and `raise` conses a
2695 new exception with a new element in the list instead of assigning to the list.
2696 This changes the semantics of exception history (for the better) on some
2697 programs. See `regression/exnHistory3.sml` for an example. It also
2698 significantly improves performance when compiling `-exn-history true`.
2699
2700 * 2002-07 and 2002-08
2701 ** Added generational GC, and code to the runtime that automatically turns it
2702 on and off.
2703
2704 * 2002-08-20
2705 ** Fixed SSA optimizer bug that could cause the following error message: `"x_0
2706 has no analyze var value property"`
2707
2708 * 2002-07-28
2709 ** Added `MLton.GC.{pack,unpack}`. `pack` shrinks the heap so that other
2710 processes can use the RAM, and its dual, `unpack`, resizes the heap to the
2711 desired size.
2712
2713 * 2002-06 and 2002-07
2714 ** Added mark compact GC.
2715 ** Changed array layout so that arrays have three, not two header words. The
2716 new word is a counter word that preceeds the array length and header.
2717 ** Changed all header words to be indices into an array of object descriptors.
2718
2719 * 2002-06-27
2720 ** Added patches from Michael Neumann to port runtime to FreeBSD 4.5.
2721
2722 * 2002-06-05
2723 ** Output file and intermediate file are now saved in the current directory
2724 instead of in the directory containing the input file.
2725
2726 * 2002-05-31
2727 ** Fixed bug in overloading of `/` so that the following now type checks:
2728 +
2729 [source,sml]
2730 ----
2731 fun f (x, y) = x + y / y
2732 ----
2733
2734 * 2002-04-26
2735 ** Added back `max-heap` runtime option.
2736
2737 * 2002-04-25
2738 ** Fixed load/save world so that they use binary mode. This should fix the
2739 `sread failed` problem that Byron Hale saw on Cygwin that caused `mlton` to
2740 fail to start.
2741 ** Added `IntInf.log2`.
2742 ** Changed call to linker to use `libgmp.a` (if it exists) instead of
2743 `libgmp.so`. This is because the linker adds a dependency to a shared library
2744 even if there are no references to it
2745
2746 * 2002-04-23
2747 ** Rewrote heap resizing code. This fixed bug that was triggered with large
2748 heaps and could cause a spurious out of memory error.
2749 ** Removed GnuMP from MLton sources (again :-).
2750
2751
2752 == Version 20020410
2753
2754 Here are the changes from version 20011006 to version 20020410.
2755
2756 === Details
2757
2758 * 2002-03-28
2759 ** Added BinIO.
2760
2761 * 2002-03-27
2762 ** Regularization of options
2763 *** `-g` -> `-degug {false|true}`
2764 *** `-h n` -> `-fixed-heap n`
2765 *** `-p` -> `-profile {false|true}`
2766
2767 * 2002-03-22
2768 ** Set up the stubs so that MLton can be compiled in the standard basis
2769 library, with no `MLton` structure. Thus it is now easy to compile MLton with
2770 an older (or newer) version of itself that has a different `MLton` structure.
2771
2772 * 2002-03-17
2773 ** Added `MLton.Process.{spawn,spawne,spawnp}`, which use primitives when
2774 running on Cygwin and fork/exec when running on Linux.
2775
2776 * 2002-02 - 2002-03
2777 ** Added the ability to cross-compile to Cygwin/Windows.
2778
2779 * 2002-02-24
2780 ** Added GnuMP back for use with Cygwin.
2781
2782 * 2002-02-10
2783 ** Reworked object header words so that `Array.maxLen = valOf Int.maxInt`.
2784 Also fixed a long-standing minor bug in MLton, where `Array.array
2785 (Array.maxLen, ...)` would raise `Size` instead of attempting to allocate the
2786 array. It was an off-by-one error in the meaning of `Array.maxLen`.
2787
2788 * 2002-02-08
2789 ** Modifications to runtime to behave better in situations where the amount of
2790 live data is a signifant fraction of the amount of RAM, based on code from
2791 PolySpace. MLton executables by default can now use more than the available
2792 amount of RAM. Executables will still respect the `max-heap` runtime arg if
2793 it is set.
2794
2795 * 2002-02-04
2796 ** Improvements to runtime so that it fails to get space, it attempts to get
2797 less space instead of failing. Based on PolySpace's modifications.
2798 ** Added `MLton.eq`.
2799
2800 * 2002-02-03
2801 ** Added `MLton.IntInf.gcd`.
2802 ** Removed GnuMP from MLton sources. We now link with `/usr/lib/libgmp.a`.
2803 ** Added `TextIO.getPosOut`.
2804 ** Renamed type `MLton.Itimer.which` to `MLton.Itimer.t` and
2805 `MLton.Itimer.whichSignal` to `MLton.Itimer.signal`.
2806 ** Added `-coalesce` flag, for use with the C backend.
2807
2808 * 2002-01-26
2809 ** Added `-show-basis-used`, which prints out the parts of the basis library
2810 that the input program uses.
2811 ** Changed several other flags (`-print-at-fun-entry`, `-show-basis`,
2812 `-static`) to follow the `{false|true}` convention.
2813
2814 * 2002-01-22
2815 ** Improved `MLton.profile` so that multiple profile arrays can exist
2816 simultaneously and so that the current one being used can be set from the SML
2817 side.
2818
2819 * 2002-01-18
2820 ** The Machine IL has been replaced with an RSSA (representation explicit SSA)
2821 IL and an improved Machine IL.
2822
2823 * 2002-01-16
2824 ** Added KnownCase SSA optimization
2825
2826 * 2002-01-14
2827 ** Added rudimentary profiling control from with a MLton compile program via
2828 the `MLton.Profile` structure.
2829
2830 * 2002-01-09
2831 ** Fixed bug in match compiler that caused case expressions on datatypes with
2832 redundant cases to be compiled incorrectly.
2833
2834 * 2002-01-08
2835 ** Added redundant tuple construction elimination to SSA shrinker.
2836 ** Improved Flatten SSA optimization.
2837
2838 * 2001-12-06
2839 ** Changed the interface for `MLton.Signal`. There is no longer a separate
2840 `Handler` substructure. This was done so that programs that just use
2841 `default` and `ignore` signal handlers don't bring in the entire thread
2842 mechanism.
2843
2844 * 2001-12-05
2845 ** Added LocalRef elimination SSA optimization.
2846
2847 * 2001-11-19
2848 ** The CPS IL has been replaced with an SSA (static-single assignment) IL.
2849 All of the optimizations have been ported from CPS to SSA.
2850
2851 * 2001-10-24
2852 ** Fixed bug in `Thread_atomicEnd` -- `limit` was mistakenly set to `base`
2853 instead of to 0. This caused assertion failures when for executables compiled
2854 `-g` because `GC_enter` didn't reset `limit`.
2855 ** Fixed bug in register allocation of byte registers.
2856
2857 * 2001-10-23
2858 ** Added `-D` option to `cmcat` for preprocessor defines. Thanks to Anoq for
2859 sending the code.
2860 ** Changed limit check insertion so that limit checks are only coalesced
2861 within a single basic block -- not across blocks. This slows many benchmarks
2862 down, but is needed to fix a bug in the way that limit checks were coalesced
2863 across blocks. Hopefully we will figure out a better fix soon.
2864
2865 * 2001-10-18
2866 ** Fixed type inference of flexrecord so that it now follows the Definition.
2867 Many programs containing flexrecords were incorrectly rejected. Added many
2868 new tests to regression/flexrecord.sml.
2869 ** Changed the behavior of `-keep dot` combined with `-keep pass` for SSA
2870 passes. Dot files are now saved for the program before and after, instead of
2871 just after.
2872
2873 * 2001-10-11
2874 ** Fixed a bug in the type inference that caused type variables to be
2875 mistakenly generalized. The bug was exposed in Norman Ramsey's `sled.sml`.
2876 Added a test to `regression/flexrecord.sml` to catch the problem.
2877
2878
2879 == Version 20011006
2880
2881 Here are the changes from version 20010806 to version 20011006.
2882
2883 === Summary
2884
2885 * Added `MLton.Exn.history`, which is similar to `SMLofNJ.exnHistory`.
2886 * Support for `#line` directives of the form `(*#line line.col "file"*)`.
2887 * Performance improvements in native codegenerator.
2888 * Bug fixes in front-end, optimizer, register allocator,
2889 `Real.{maxFinite,minPos,toManExp}`, and in heap save and restore.
2890
2891 === Details
2892
2893 * 2001-10-05
2894 ** Fixed a bug in polymorphic layered patterns, like
2895 +
2896 [source,sml]
2897 ----
2898 val 'a a as b = []
2899 ----
2900 +
2901 These would always fail due to the variable `a` not being handled correctly.
2902 ** Fixed the syntax of `val rec` so that a pattern is allowed on the left-hand
2903 side of the `=`. Thus, we used to reject, but now accept, the following.
2904 +
2905 [source,sml]
2906 ----
2907 val rec a as b as c = fn _ => ()
2908 val rec a : unit -> unit : unit -> unit = fn () => ()
2909 ----
2910 +
2911 Thanks again to Andreas Rossberg's test files. This is now tested for in
2912 `valrec.sml`.
2913 ** Fixed dynamic semantics of `val rec` so that if `val rec` is used to
2914 override constructor status, then at run time, the `Bind` exception is raised
2915 as per rule 126 of the Definition. So, for example, the following program
2916 type checks and compiles, but raises `Bind` at run time.
2917 +
2918 [source,sml]
2919 ----
2920 val rec NONE = fn () => ()
2921 val _ = NONE ()
2922 ----
2923 +
2924 Again, this is checked in `valrec.sml`.
2925 ** Added `\r\n` to ml.lex so that Windows style newlines are acceptable in
2926 input files.
2927
2928 * 2001-10-04
2929 ** Fixed bug in the implementation of `open` declarations, which in the case
2930 of `open A B` had opened `A` and then looked up `B` in the resulting
2931 environment. The correct behaviour (see rule 22 of the Definition) is to
2932 lookup each _longstrid_ in the current environment, and then open them all in
2933 sequence. This is now checked for in the `open.sml` regression test. Thanks
2934 to Andreas Rossberg for pointing this bug out.
2935 ** Fixed bug that caused tyvars of length 1 (i.e. `'`) to be rejected. This
2936 is now checked in the `id.sml` regression test. Again, thanks to Andreas
2937 Rossberg for the test.
2938
2939 * 2001-10-02
2940 ** Fixed bugs in `Real.toManExp` (which always returned the wrong result
2941 because the call to `frexp` was not treated as side-effecting by the
2942 optimizer) and in `Real.minPos`, which was zero because of a mistake with
2943 extra precision bits.
2944
2945 * 2001-10-01
2946 ** Added `MLton.Exn.history`.
2947 ** Fixed register allocation bug with `fucom` instruction. Was allowing
2948 `fucomp` when the first source was not removable.
2949 ** Changed `Real.isFinite` to use the C `math.h` `finite` function. This
2950 fixed the nontermination bug which occurred in any program that used
2951 `Real.maxFinite`.
2952
2953 * 2001-09-22
2954 ** Bug fixes found from Ramsey's `lrtl` in `contify.fun` and
2955 `unused-args.fun`, both of which caused compile-time exceptions to be raised.
2956
2957 * 2001-09-21
2958 ** Fixed `MLton.World.{load,save}` so that the saved world does not store the
2959 max heap size. Instead, the max heap size is computed upon load world in
2960 exactly the same way as at program startup. This fixes a long-standing (but
2961 only recently noticed) problem in which `mlton` (which uses a saved world)
2962 would attempt to use as much memory as was on the machine used to build
2963 `world.mlton`.
2964
2965 * 2001-08-29
2966 ** Overlow checking is now on by default in the C backend. This is a huge
2967 performance hit, but who cares, since we never use the C backend except for
2968 testing anyways.
2969
2970 * 2001-08-22
2971 ** Added support for #line directives of the form
2972 +
2973 [source,sml]
2974 ----
2975 (*#line line.col "file"*)
2976 ----
2977 +
2978 These directives only affect error messages produced by the parser and
2979 elaborator.
2980
2981 * 2001-08-17
2982 ** Fixed bug in RemoveUnused optimzation that caused the following program to
2983 fail to compile.
2984 +
2985 [source,sml]
2986 ----
2987 fun f l = case l of [] => f l | _ :: l => f l
2988 val _ = f [13]
2989 ----
2990
2991 * 2001-08-14
2992 ** New x86-codegen infrastructure.
2993 *** support for tracking liveness of stack slots and carrying them in
2994 registers across basic blocks
2995 *** more specific `Entry` and `Transfer` datatypes to make calling convention
2996 distinctions more explicit
2997 *** new heuristic for carrying values in registers across basic blocks (look
2998 Ma, no Overflows!)
2999 *** new "predict" model for generating register allocation hints
3000 *** additional bug fixes
3001
3002 * 2001-08-07
3003 ** `MLton.Socket.shutdownWrite` flushes the outstream.
3004
3005
3006 == Version 20010806
3007
3008 Here are the changes from version 20010706 to version 20010806.
3009
3010 === Summary
3011
3012 * `Word.andb (w, 0xFF)` now works correctly
3013 * `MLton.Rusage.rusage` has a patch to work around a linux kernel bug
3014 * Programs of the form `_exp_ ; _program_` are now accepted
3015 * Added the `MLton.Rlimit` structure
3016 * Added the `-keep dot` flag, which produces call graphs, intraprocedural
3017 control-flow graphs, and dominator trees
3018
3019 === Details
3020
3021 * 2001-08-06
3022 ** Added simple CommonBlock elimination CPS optimization.
3023
3024 * 2001-08-02
3025 ** Took out `-keep il`.
3026
3027 * 2001-07-31
3028 ** Performance improvements to `TextIO.{input, output, output1}`.
3029
3030 * 2001-07-25
3031 ** Added RedundantTest elimination CPS optimization.
3032
3033 * 2001-07-21
3034 ** Added CommonSubexp elimination CPS optimization.
3035
3036 * 2001-07-20
3037 ** Bug fix to x86 codegen. The `commuteBinALMD` peephole optimization would
3038 rewrite `mov 2,Y; add Y,Y` as `mov Y,Y; add 2,Y`. Now the appropriate
3039 interference checks are made.
3040 ** Added intraprocedural unused argument removal.
3041 ** Added intraprocedural flattener. This avoids some stupid tuple allocations
3042 in loops. Decent speedup on a few benchmarks (`count-graphs`, `psdes-random`,
3043 `wc-scanStream`) and no noticeable slowdowns.
3044 ** Added `-keep dot` flag.
3045
3046 * 2001-07-17
3047 ** Modified grammar to properly handle `val rec`. There were several problems.
3048 *** MLton had accepted `val rec 'a ...` instead of `val 'a rec ...`
3049 *** MLton had not accepted `val x = 13 and rec f = fn () => ()`
3050 *** MLton had not accepted `val rec rec f = fn () => ()`
3051 *** MLton had not accepted `val rec f = fn () => () and rec g = fn () => ()`
3052
3053 * 2001-07-16
3054 ** Workaround for Linux kernel bug that can cause `getrusage` to return a wrong
3055 system time value (low by one second). See `fixedGetrusage` in `gc.c`.
3056 ** Bug fix to x86 codegen. The register allocator could get confused when
3057 doing comparisons of floating point numbers and use the wrong operand. The
3058 bug seems to have never been detected because it only happens when both of the
3059 operands are already on the floating point stack, which is rare, since one is
3060 almost always in memory since we don't carry floating point values in the
3061 stack across basic blocks.
3062 ** Added production to the grammar on page 58 of the Definition that had been
3063 missing from MLton since day one.
3064 +
3065 ----
3066 program ::= exp ; <program>
3067 ----
3068 +
3069 Also updated docs to reflect change.
3070 ** Modified grammar to accept the empty program.
3071 ** Added `-type-check` expert flag to turn on type checking in ILs.
3072
3073 * 2001-07-15
3074 ** Bug fix to the algebraic simplifier. It had been rewriting
3075 `Word32.andb (w, 0wxFF)` to `w` instead of
3076 `Word32.andb (w, 0wxFFFFFFFF)` to `w`.
3077
3078 * 2001-07-13
3079 ** Improved CPS shrinker so that `if`-tests where the `then` and `else` branch
3080 jump to the same label is turned into a direct jump.
3081 ** Improved CPS shrinker (`Prim.apply`) to handle constructors
3082 *** `A = A` -> `true`
3083 *** `A = B` -> `false`
3084 *** `A x` = `B y` -> `false`
3085 ** Rewrote a lot of loops in the basis library to use inequalities instead of
3086 equality for the loop termination test so that the (forthcoming) overflow
3087 detection elimination will work on the loop index variable.
3088
3089 * 2001-07-11
3090 ** Fixed minor bugs in `Array2.{array,tabulate}`, `Substring.{slice}` that
3091 caused the `Overflow` exception to be raised instead of `Size` or `Subscript`
3092 ** Fixed bug in `Pack32Big.update` that caused the wrong location to be updated.
3093 ** Fixed several bugs in `Pack32{Big,Little}.{subArr,subVec,update}` that
3094 caused `Overflow` to be raised instead of `Subscript`. Also, improved the
3095 implementation so that bounds checking only occurs once per call (instead of
3096 four times, which was sometimes happening.
3097 ** Fixed bugs in `Time.{toMilliseconds,toMicroseconds}` that could cause a
3098 spurious `Overflow` exception.
3099 ** Fixed bugs in `Time.{fromMilliseconds,fromMicroseconds}` that could cause a
3100 spurious `Time` exception.
3101 ** Improved `Pack32.sub*` by reordering the `orb`-s.
3102 ** Improved `{Int,IntInf}.mod` to increase chances of constant folding.
3103 ** Switched many uses of `+`, `-`, `*` in basis library to the non-overflow
3104 checked versions. Modules changed were: `Array`, `Array2`, `Byte`, `Char`,
3105 `Int`, `IntInf`, `List`, `Pack32{Big,Little}`, `Util`, `String`, `StringCvt`,
3106 `Substring`, `TextIO`, `Time`, `Vector`.
3107 ** Added regression tests for `Array2`, `Int` (overflow checking), `Pack32`,
3108 `Substring`, `Time`.
3109 ** Changed CPS output so that it includes a dot graph for each CPS function.
3110
3111 * 2001-07-09
3112 ** Change `OS.Process.exit` so that it raises an exception if the exit status
3113 is not in [0, 256).
3114 ** Added `MLton.Rlimit` to provide access to `getrlimit` and `setrlimit`.
3115
3116
3117 == Version 20010706
3118
3119 Here are the changes from the 20000906 version to the 20010706 version.
3120
3121 === Summary
3122
3123 * Native X86 code generator (instead of using `gcc`)
3124 * Significantly improved compile times
3125 * Significantly improved run times for generated executables
3126 * Many bug fixes
3127 * Correct raising of the `Overflow` exception for integer arithmetic
3128 * New modules in the `MLton` structure
3129
3130 === Details
3131
3132 * 2001-07-06
3133 ** GC mods from Henry. Mostly adding `inline` declarations.
3134
3135 * 2001-07-05
3136 ** Fixed several runtime bugs involving threads, critical sections, and
3137 signals.
3138
3139 * 2001-06-29
3140 ** Fixed performance bug in `cps/two-point-lattice.fun` that caused quadratic
3141 behavior. This affects the raise-to-jump and useless analayses. In
3142 particular, the useless analysis was blowing up when compiling `fxp`.
3143
3144 * 2001-06-27
3145 ** Henry improved `wordAlign` -- this sped up GC by 27% (during a self
3146 compile).
3147
3148 * 2001-06-20
3149 ** Moved `MLton.random` to `MLton.Random.rand` and added other stuff to
3150 `MLton.Random`
3151 ** Added `MLton.TextIO.mkstemp`.
3152 ** Made `Int.{div,quot}` respect the `-detect-overflow` switch.
3153
3154 * 2001-06-20
3155 ** Added `MLton.Syslog`.
3156
3157 * 2001-06-07
3158 ** Fixed bug in `MLton.Socket.accept` that was in the runtime implementation
3159 `Socket_accept`. It did a `setsockopt SO_REUSEADDR` after the `accept`. It
3160 should have been after the call to `socket` in `Socket_listen`. Thanks to
3161 Doug Bagley for the fix.
3162
3163 * 2001-05-30
3164 ** Fixed bug in remove-unused that caused polymorphic equality to return
3165 `true` sometimes when constructors were never used in a pattern match. For
3166 example, the following (in which `A` and `B` are not used as patterns):
3167 +
3168 [source,sml]
3169 ----
3170 datatype t = A | B
3171 datatype u = C of t
3172 val _ = if C A = C B then raise Fail "bug" else ()
3173 ----
3174
3175 * 2001-03-27
3176 ** Fixed bug that caused all of the following to fail:
3177 `{LargeWord,Word,SysWord}.{toLargeInt,toLargeIntX,fromLargeInt}` The problem
3178 was the basis library file `integer/patch.sml` which fixed `Word32` but not
3179 the other structures that are the same.
3180
3181 * 2001-02-12
3182 ** Fixed bug in match compiler that caused it to spend a lot of extra time in
3183 deep patterns. It still could be exponential however. Hopefully this will
3184 get fixed in the release after next. This bug could cause very slow compile
3185 times in some cases. Anyways, this fix cut the `finish infer` time of a self
3186 compile down from 22 to under 4 seconds. I.E. most of the time used to be
3187 spent due to this bug.
3188
3189 * 2001-02-06
3190 ** Fixed bug in frontend that caused the wrong file and line number to be
3191 reported with errors in functor bodys.
3192
3193 * 2001-01-03 - 2000-02-05
3194 ** Changes to CoreML, XML, SXML, and CPS ILs to replace lists by vectors in
3195 order to decrease space usage.
3196
3197 * 2001-01-16
3198 ** Fixed a bug in constant propagation where the length of vectors was not
3199 propagated properly.
3200
3201 * 2000-12-11 - 2001-01-03
3202 ** Major rewrite of elaborator to use a single hash table for each namespace
3203 instead of a hash table for every environment.
3204
3205 * 2000-12-20
3206 ** Fixed some bugs in the SML/NJ compatibility library,
3207 `src/lib/mlton-subs-in-smlnj`.
3208
3209 * 2000-12-08
3210 ** More careful removal of tracing code when compiling `MLton_debug=0`. This
3211 cut down self compile data size by 100k and compile time by a few seconds.
3212 ** Added built in character and word cases propagated throughout all ILs.
3213
3214 * 2000-12-06
3215 ** Added max stack size information to `gc-summary`.
3216
3217 * 2000-12-05
3218 ** Added `src/benchmark`, which contains an SML program that benchmarks all of
3219 the SML compilers I have my hands on. The script has lots of hardwired paths
3220 for now.
3221
3222 * 2000-12-04
3223 ** Fixed bug in `Posix.ProcEnv.environ,` which did not work correctly in a
3224 saved world (the original `environ` was saved). In fact, it did not work at
3225 all because the ML primitive expected a constant and the C was a nullary
3226 function. This caused a segfault with any program using
3227 `Posix.ProcEnv.environ`.
3228 ** `Added MLton.ProcEnv.setenv`, since there doesn't seem to be any `setenv`
3229 in the basis library.
3230
3231 * 2000-11-29
3232 ** Changed backend so that it should no longer generate machine programs with
3233 `void` operands.
3234 ** Added `-detect-overflow` and `-safe` flags.
3235
3236 * 2000-11-27 - 2000-11-28
3237 ** Changes in many places to use `List.revMap` instead of `List.map` to cut
3238 down on allocation.
3239
3240 * 2000-11-21
3241 ** Added `MLton.Word.~` and `MLton.Word8.~` to the `MLton` structure.
3242
3243 * 2000-11-20
3244 ** Fixed a bug in the CPS shrinker that could cause a compile-time failure.
3245 It was maintaining occurrence counts incorrectly.
3246
3247 * 2000-11-15
3248 ** Fixed a (performance) bug in constant propagation that caused the hashing
3249 to be bad.
3250 ** Improved translation to XML so that the match compiler isn't called on
3251 tuple or if expressions. This should speed up the translation and make the
3252 output smaller.
3253 ** Fixed a bug in the match compiler that caused it to not generate integer
3254 case statements. This should speed up the mlyacc benchmark and the MLton
3255 front end.
3256
3257 * 2000-11-09
3258 ** Added `IntInf_equal` and `IntInf_compare` primitives.
3259 ** Took out the automatic `-keep c` when compiling `-g`.
3260
3261 * 2000-11-08
3262 ** Added a whole bunch of algebraic laws to the CPS shrinker, including some
3263 specifically targeted to `IntInf` primitives.
3264
3265 * 2000-11-03
3266 ** Improved implementation of properties so that sets don't allocate.
3267 ** Improved implementation of type homomorphism in type inference. What was
3268 there before appears to have been a bug -- it didn't use the property on
3269 types.
3270
3271 * 2000-11-02
3272 ** Fixed timers used with `-v` option to use user + sys time.
3273
3274 * 2000-10-27
3275 ** Split the runtime basis library C files into many separate files so that
3276 only the needed code would be included by the linker.
3277 ** Fixed several bugs in the front end grammar and elaborator that caused type
3278 specifications to be handled incorrectly. The following three programs used
3279 to be handled incorrectly, but are now handled correctly.
3280 +
3281 [source,sml]
3282 ----
3283 signature S = sig type t and u = int end (* reject *)
3284 signature S = sig type t = int and u = t end (* accept *)
3285 signature S = sig eqtype t and u = int end (* reject *)
3286 ----
3287
3288 * 2000-10-25
3289 ** Changes to `main.sml` to run complete compiles with `-native` switch.
3290
3291 * 2000-10-24
3292 ** Removed defunctorizer.
3293
3294 * 2000-10-20
3295 ** Fixed bug in `cps-tree.fun` with `PrimExp.maySideEffect`. This bug could
3296 cause `"no operand"` failures in the backend.
3297 ** Fixed bug in the runtime implementation of `MLton.size`. The size for
3298 stack objects was using the `used` instead of `reserved`, and so was too low.
3299
3300 * 2000-10-19
3301 ** Replaced automatically generated dependencies in `src/runtime/Makefile`
3302 with hand generated ones. Took out `make depend` from `src/Makefile`. `make
3303 depend` was behaving really badly on RHAT 7.0.
3304 ** Tweaked compiler to shorten width of C output lines to work around bug in
3305 RHAT 7.0 `cpp` which silently truncates (very) long lines.
3306 ** Fixed bug in grammar that didn't allow `op` to occur in datatype and
3307 exception bindings, causing the following to fail
3308 +
3309 [source,sml]
3310 ----
3311 datatype t = op T
3312 exception op E = op Fail
3313 ----
3314
3315 ** Improved error messages in CM processor. Fixed bug in CM Alias handling.
3316
3317 * 2000-10-18
3318 ** Fixed two bugs in the gc that did comparisons with `+(s->limit -
3319 s->frontier)+`, which of course doesn't work if `frontier` is beyond `limit`,
3320 since these are unsigned. This could have caused segfaults, except that the
3321 mutator checks the `frontier` upon return from the GC.
3322
3323 * 2000-10-17
3324 ** Fixed bug in backend in the calculation of `maxFrameSize`. It could be
3325 wrong (low) in some situations.
3326 ** Improved CPS inliner's estimate of function sizes. The size of a function
3327 now takes into account other inlined functions that the function calls. This
3328 also changed the meaning of the size argument to the `-inline` switch. It now
3329 corresponds (roughly) to the product of the size of the function and the
3330 number of calls. In general, it should be larger than before.
3331
3332 * 2000-10-13
3333 ** Made some calls to `Array.sub` unsafe in the implementation of `Array2`.
3334 ** Integrated Matthew's new x86 backend with floating point support.
3335
3336 * 2000-10-09
3337 ** Fixed CM file processor so that MLton works if it is run from a different
3338 directory than the main CM file.
3339
3340 * 2000-10-04
3341 ** Changed LimitCheck so it loops on the `frontier > limit` check. This fixed
3342 a potential bug in threads caused when there is enough space available for a
3343 thread, `t`, before switching to another thread but not enough space when it
3344 resumes. This could have caused a segfault.
3345
3346 * 2000-10-03
3347 ** More rewrites of `TextIO.StreamIO` to improve speed.
3348 ** Changed `TextIO` so that only `TextIO.stdErr` is unbuffered.
3349 ** Changed `TextIO` so that FIFOs and sockets are buffered.
3350
3351 * 2000-10-02
3352 ** Combined remove-unused-constructors, remove-unused-functions, and
3353 remove-unused-globals into a single pass that runs to fixed-point and produces
3354 results at least as good as running the previous three in (any) sequence.
3355
3356 * 2000-09-29
3357 ** Added `GC_FIRST_CHECK`, which does a gc at each limit check the first time
3358 it reached.
3359 ** Reimplemented `TextIO.StreamIO` (from 2000-09-12) to use lists of strings
3360 instead of lists of characters so that the per char space overhead is small.
3361
3362 * 2000-09-21
3363 ** Fixed bug in profiling labels in C code. The label was always the basic
3364 block label instead of the cps function label.
3365 ** Added `-b` switch to `mlprof` to gather data at the basic block level.
3366 ** Improved performance of `TextIO.input1` by about 3X.
3367
3368 * 2000-09-15 - 2000-09-19
3369 ** Added overflow exceptions to CPS and Machine ILs.
3370
3371 * 2000-09-12
3372 ** Fixed `TextIO.scanStream`. It was very broken.
3373 ** Added `TextIO.{getInstream,mkInstream,setInstream}` and
3374 `TextIO.StreamIO.{canInput,closeIn,endOfStream,input1,input,inputAll,inputLine,inputN}`.
3375
3376 * 2000-09-11
3377 ** Fixed `Real_qequal` in `mlton-lib.h`. It was missing a paren that caused
3378 code using it to not even compile. It was also semantically incorrect.
3379 ** Noted that `Real_{equal,lt,le,gt,ge}` may not follow basis library spec,
3380 since ANSI does not require IEEE compliance, and hence these could return
3381 wrong results when nans are involved.
3382
3383
3384 == Version 20000906
3385
3386 Here are the changes from the 20000712 version to the 20000906 version.
3387
3388 === Summary
3389
3390 * Version 20000906 is mostly a bugfix release over 20000712. The other major
3391 changes are that `mllex` and `mlyacc` are now included and that `mlton` can now
3392 process a limited subset of CM files as input.
3393
3394 === Details
3395
3396 * 2000-09-06
3397 ** Fixed `Socket_listen` in `mlton-lib.c` so that it closes the socket if the
3398 `bind`, `listen`, or `getsockname` fails. This could have caused a file
3399 descriptor leak.
3400
3401 * 2000-09-05
3402 ** Added `-static` commandline switch.
3403 ** Changed default max heap size to .85 RAM from .95 RAM.
3404 ** Added `PackRealLittle` structure to basis library.
3405
3406 * 2000-08-25
3407 ** Added cases on integers to ILs (instead of using sequences of tests) so
3408 that backend can emit more efficient test (jump table, binary tree, ...).
3409
3410 * 2000-08-24
3411 ** Fixed bug in `gc.c`. `dfsInitializeStack` would `smummap` a `NULL` pointer
3412 whenver `toSpace` was `NULL`. This could cause `MLton.size` to segfault.
3413 ** Fixed bug in `Popt` that caused `-k` to fail with no keeps.
3414
3415 * 2000-08-22 - 2000-08-23
3416 ** Ported `mllex` and `mlyacc` from SML/NJ
3417
3418 * 2000-08-20 - 2000-08-21
3419 ** Added ability to use a `.cm` file as input to MLton.
3420
3421 * 2000-08-16
3422 ** Ported `mlprof` to SML.
3423 ** Fixed bug in `library/basic/assert.sml` that caused asserts to be run even
3424 when `MLton.debug = false`.
3425
3426 * 2000-08-15
3427 ** Fixed bug in backend -- computation of `maxFrameSize` was wrong. It didn't
3428 count slots in frames that didn't make nontail calls. This could lead to the
3429 stack being overwritten because a stack limit check didn't guarantee enough
3430 space, and lead to a segfault.
3431 ** Fixed bug in `gc.c` `newThreadOfSize`. If the thread allocation caused a
3432 gc, then the stack wasn't forwarded, leading to a segfault. The solution was
3433 to ensure enough memory all at once, and then fill in both objects.
3434
3435 * 2000-08-14
3436 ** Changed limit checks so that checks < 512 bytes are replaced by a check for
3437 0 bytes. The runtime also moves the limit down by 512. This is done so that
3438 the common case, a small limit check, has less code and is faster.
3439 ** Fixed bug in `cps/cps-tree.fun`. `Program.hasPrim` returned `true` for any
3440 program that had *any* primapp, not just programs satisfying the predicate.
3441 This caused `cps/once.fun` to be overly conservative, since it thought that
3442 every program used continuations.
3443
3444 * 2000-08-10
3445 ** Fixed bug in CPS typechecker. It didn't enforce that handlers should be
3446 defined before any reference to them -- including implicit references in
3447 `HandlerPops`. This caused an evil bug in the liveness analysis where a
3448 variable that was only live in the handler was missed in a continuation
3449 because the liveness for the handler wasn't computed yet.
3450 ** Limited the size for moving up limit checks for arrays whose size is known
3451 at compile time to avoid huge limit checks getting moved into loops.
3452 ** added `-indent`, `-kp`, `-show-types` switches.
3453 ** Put optimization in CPS IL suggested by Neal Glew. It determines for each
3454 toplevel function if it can raise an exception to its caller. Also, it
3455 removes `HanderPush` and `HandlerPop` for handlers that are not on top of the
3456 stack for any nontail call.
3457
3458 * 2000-08-08
3459 ** Changed register allocator so that continuation formals can be allocated in
3460 pseudo registers -- they aren't necessarily forced to the stack.
3461
3462 * 2000-08-03
3463 ** Fixed bug in constant folding. `Word8.>>` had been used to implement
3464 `Word8.~>>`.
3465 ** Fixed bug in allocate registers that was not forcing the size argument to
3466 `Primitive.Array.array` to be a stack slot. This could cause problems if
3467 there was a thread switch in the limit check, since upon return the size
3468 pseudo register would have a bogus value.
3469
3470 * 2000-08-01
3471 ** Turned back on XML simplification after monomorphisation.
3472
3473 * 2000-07-31
3474 ** Fixed bug in `MLton.Itimer.set` that caused the time to be doubled.
3475 ** Fixed bug in `MLton.Thread` that made it look like asynchronous exceptions
3476 were allowed by `throw`-ing an exception raising thunk to an interrupted
3477 thread obtained via a signal handler. Attempting asynchronous exceptions will
3478 now cause process death, with a helpful error message.
3479
3480 * 2000-07-27
3481 ** Updated docs to include `structure World: MLTON_WORLD` in `MLton`
3482 structure.
3483 ** Added toplevel signatures `MLTON_{CONT, ..., WORLD}` to basis library.
3484 ** Fixed broken link in docs to CM in `cmcat` section.
3485
3486 * 2000-07-26
3487 ** Eliminated `GC_switchToThread` and `Thread_switchTo1`, since the inlined
3488 version `Thread_switchTo` is all that's needed, and Matt's X86 backend now
3489 handles it.
3490 ** Added `MLton.Signal.vtalrm`, needed for `Itimer.Set{which =
3491 Itimer.Virtual, ...}`.
3492
3493 * 2000-07-25
3494 ** Added `MLton.Socket.shutdownWrite`.
3495
3496 * 2000-07-21
3497 ** Updated `mlton-lib.c` `MLton_bug` with new email ([email protected]).
3498
3499 * 2000-07-19
3500 ** Fixed `Posix.Process.kill` to check for errors.
3501
3502 * 2000-07-18
3503 ** Fixed the following `Posix.ProcEnv` functions to check for errors:
3504 `setgid`, `setpgid`, `setsid`, `setuid`.
3505 ** Fixed `doc/examples/callcc.sml`.
3506
3507
3508 == Version 20000712
3509
3510 Here are the changes from the 1999-07-12 to the 20000712 version.
3511
3512 === Details
3513
3514 * 2000-06-10 - 2000-07-12
3515 ** Too many changes to count: bug fixes, new basis library modules, optimizer
3516 improvements.
3517
3518 * 2000-06-30
3519 ** Fixed bug in monomorphiser that caused programs with non-value carrying
3520 exception declarations in polymorphic functions to have a compile-time error
3521 because of a duplicate label. The problem was that the exception constructor
3522 wasn't duplicated.
3523
3524 * 2000-05-22 - 2000-06-10
3525 ** Finished the changes for the new CPS IL.
3526
3527 * 2000-01-01
3528 ** Fixed some errors in the basis library:
3529 *** `Real.copySign`
3530 *** `Posix.FileSys.fpathconf`
3531 *** `Posix.IO.{lseek, getlk, setlk, setlkw}`
3532 *** `Posix.ProcEnv.setpgid`
3533 *** `Posix.TTY.getattr`
3534 *** `System.FileSys.realPath`
3535
3536 * 1999-12-22
3537 ** Fixed bug in `src/closure-convert/abstract-value.fun` that caused a
3538 compiler failure whenever a program had a vector where the element type
3539 contained an `+->+`.
3540
3541 * 1999-12-10
3542 ** Changed dead code elimination in `core-ml/dead-code.fun` so that wildcard
3543 declarations (`val _ = ...`) in the basis are kept. Changed places in the
3544 basis library to take advantage of this.
3545 ** Added `setTopLevelHander` primitive so that the basis library code can
3546 define the toplevel handler.
3547 ** Changed `basis-library/misc/suffix.sml` to call `OS.Process.exit`. Took
3548 out `Halt` transfer from CPS, since the program never should reach it.
3549 ** Cleaned up `basis-library/system/{process.sml, unix.sml}` to use the new
3550 signal handling stuff.
3551
3552 * 1999-11-28 - 1999-12-20
3553 ** Added support for threads and cleaned up signal handling. This involved a
3554 number of changes:
3555 *** The stack is now allocated as just another kind of heap object.
3556 *** Limit checks are inserted at all loop headers, whether or not there is
3557 any allocation. This is to ensure that the signal handler always has a
3558 chance to get called.
3559 *** The register allocator puts more variables in stack slots. The new rule
3560 is that a variable goes in a stack slot if it is ever live across a nontail
3561 call, in a handler, or (this is the new part) across a limit check.
3562 *** Arguments are passed on the stack, with the convention determined by
3563 argument types.
3564 *** The "locals" array of pointers that was copied to/from for GC is now
3565 gone, because no registers (in particular no pointer valued registers) can
3566 be live at a limit check point.
3567
3568 * 1999-11-21
3569 ** Runtime system
3570 *** Fixed a bug introduced by the signal code (presumably on 1999-08-09)
3571 that caused a gc to *not* be performed when doing a save world. This caused
3572 the heaps created by save world to be the same size as the heap -- not the
3573 live data. This was quite bad.
3574 *** Cleaned up the `Makefile`. Add make depend.
3575 *** Added max gc pause to `gc-summary` info.
3576 *** Move heap translation variables that had been file statics into the
3577 `GC_state`.
3578 ** Made `structure Position` available at toplevel.
3579 ** Basis Library
3580 *** Added `MLton.loadWorld`
3581 ** Added `Primitive.usesCallcc`
3582 ** Added `Primitive.safe`
3583 ** Removed special size functions from `cps/save-world` -- they are no longer
3584 necessary since size doesn't do a gc.
3585 ** Fixed another (sigh) bug in `cps/simplify-types.fun` that could cause it to
3586 not terminate.
3587
3588 * 1999-11-16
3589 ** Cleaned up `backend/machine.fun` a bit so that it spits out macros for
3590 allocation of objects and bumping of frontier. Added macros `MLTON_object`
3591 and `MLTON_incFrontier` to `include/mlton-lib.h`.
3592 ** Fixed a bug in `backend/limit-check.fun` that caused loops to not be
3593 detected if they were only reached by a case branch. This could cause there
3594 to be loop that allocates with no limit check. Needless to say, this could
3595 cause a segfault if the loop ran for long enough.
3596
3597 * 1999-10-18
3598 ** Added basis library function `Array2.copy`.
3599
3600 * 1999-08-15
3601 ** Turned off globalization of ref cells (`closure-convert/globalize.fun`)
3602 because it interacts badly with serialization.
3603
3604 * 1999-08-13
3605 ** Fixed bug in `mlton-lib.h` in `MLTON_allocArrayNoPointers` that was
3606 triggered when `bytesPerElt == 0`. The problem was that it wasn't reserving
3607 space for the forwarding pointer. This could cause a segfault.
3608
3609 * 1999-08-08 and 1999-08-09
3610 ** Added support for signal handling.
3611
3612 * 1999-08-07
3613 ** Fixed bugs in `Array.tabulate` (and other `tabulate` variants) caused if
3614 the function argument used `callcc`.
3615
3616 * 1999-08-01
3617 ** Added serialization, which was mostly code in `src/runtime/gc.c`. +
3618 `GC_serialize` converts an object to a `Word8Vector.vector`. +
3619 `GC_deserialize` undoes the conversion. + (de)Serialization should work for
3620 all objects except for functions, because I haven't yet added the support in
3621 the flow analysis.
3622
3623 * 1999-07-31
3624 ** Cleaned up the GC. Changed headers, by stealing a bit from the number of
3625 non pointers and making it a mark bit (used in `GC_size`).
3626 ** Rewrote `GC_size` so that it runs in time proportional to the number of
3627 pointers in the object. It does a depth-first-search now, using toSpace to
3628 hold the stack.
3629
3630 * 1999-07-30
3631 ** Fixed bug in `SUBSTRING`. `getc` had the wrong type. This bug wasn't
3632 noticed because MLton doesn't do enough type checking.
3633 ** Fixed bug (segfault) caused when a GC immediately followed a throw.
3634
3635 * 1999-07-29
3636 ** Fixed bug in `Date.fmt` (`basis-library/system/date.sml`). It was not
3637 setting `Tm.buf`, and hence the time was always 0 unless there had been a
3638 previous call to `setTmBuf`.
3639
3640 * 1999-07-28
3641 ** Fixed bugs in `Posix.IO.FLock.{getlk,setlk,setlkw}`, which would cause
3642 compilation to fail because `FLock.toInt` was defined as the C `castInt`,
3643 which no longer exists. Instead, expand `FLock.toInt` to
3644 `MLTON_pointerToInt`, which was added to `include/mlton-lib.h`.
3645 ** Changed `Posix.Primitive.Flock` to `Posix.Primitive.FLock`.
3646 ** Added `MLTON_chown`, `MLTON_ftruncate` to `include/mlton-posix.h`. They
3647 were missing. This would cause compilation of any program using
3648 `Posix.FileSys.{chown,ftruncate}` to fail. Also made it so all of the
3649 primitives in `basis-library/posix/primitive.sml` use `MLTON_` versions of
3650 functions, even if a wrapper is unnecessary.
3651
3652 * 1999-07-25
3653 ** Added some other missing signature definitions to toplevel.
3654
3655 * 1999-07-24
3656 ** Added missing `OS_*` signature definitions to
3657 `basis-library/top-level/top-level.sml`.
3658
3659 * 1999-07-19
3660 ** Fixed bug in `basis-library/arrays-and-vectors/mono-array.sml`. Used `:>`
3661 instead of `:` so that the monomorphic array types are abstract.
3662
3663
3664 == Version 19990712
3665
3666 Here are the changes from the 1999-03-19 version to the 1999-07-12 version.
3667
3668 === Details
3669
3670 * 1999-07-12
3671 ** Changed `src/backend/machine.fun` so that the 'pointer locals' array is
3672 only as large as neccessary in order to copy all pointer-valued locals, not as
3673 large as the number of pointer-valued locals.
3674
3675 * 1999-07-11
3676 ** Rewrote `src/backend/allocate-registers.fun` so that it does a better job
3677 of sharing "registers" (i.e. C local variables) and stack slots. This should
3678 cut down on the amount of copying that has to happen before and after a gc.
3679 It should also cut down on the size of stack slots.
3680
3681 * 1999-07-10
3682 ** Fixed a bug in `src/backend/parallel-move.fun` that should have been
3683 triggered on most any parallel move. I guess parallel moves almost never
3684 happened due to the old register allocation strategy -- but, with the new one
3685 (see note for 1999-07-12) parallel moves will be frequent.
3686
3687 * 1999-06-27
3688 ** Fixed `src/main.sml` so that when compiling `-p`, the `.c` file is compiled
3689 `-g` and the `.o` is linked `-p`.
3690 ** In `bakend/machine.fun`, added profiling comments before chunkswitches and
3691 put in an optimization to avoid printing repeated profiling comments. Also,
3692 profiling comments are only output when compiling `-p`.
3693
3694 * 1999-06-17
3695 ** Changed `-i` to `-inline`, `-f` to `-flatten`, `-np` to `-no-polyvariance`,
3696 `-u` to `-unsafe`.
3697 ** Added `-i`, `-I`, `-l`, `-L` flags for includes and libraries.
3698 ** Updated documentation for these options and for ffi.
3699
3700 * 1999-06-16
3701 ** Hardwired version number in `src/control/control.sml`. As it stood, the
3702 version number was computed when MLton was built after someone downloaded it,
3703 which was clearly wrong.
3704
3705 * 1999-06-16
3706 ** Fixed undefined variable `time` in `GC_done` in `src/runtime/gc.c`.
3707
3708 * 19990-06-08
3709 ** in `include/mlton-lib.h`:
3710 *** removed `#include <huge_val.h>`
3711 *** added `#include <math.h>`
3712 *** and deleted all of the function signatures I had copied from `math.h`
3713 ** Changed `Real.{minNormalPos, minPos, maxFinite}` so that they are computed
3714 in `real.sml` instead of appearing as constants in the C.
3715
3716 * 1999-06-07
3717 `IntInf.pow` added to basis library.
3718
3719 * 1999-06-04
3720 ** `bin/mlton` changed to use `.arch-n-opsys` if it exists.
3721
3722 * 1999-06-03
3723 ** `src/Makefile` changed to use `sml-cm` instead of `sml`
3724
3725 * 1999-05-10
3726 ** Patch to `src/atoms/small-int-inf.fun` to work around a bug in the SML/NJ
3727 implementation of bignums. This bug was causing some hex bignum constants to
3728 be lexed incorrectly.
3729
3730 * 1999-04-15
3731 ** Comments emitted in C code for profiling. The comments identify the CPS
3732 function responsible for each C statement.
3733
3734 * 1999-04-15
3735 ** `callcc` and `throw` added.
3736
3737 * 1999-04-15
3738 ** Bug in `src/cps/simplify-types` fixed. The bug caused nontermination
3739 whenever there was a circular datatype with a vector on the rhs.
3740 E.g. `datatype t = T of t vector`
3741
3742
3743 == Version 19990319
3744
3745 Here are the changes from the 1998-08-26 version to the 1999-03-19 version.
3746
3747 === Summary
3748
3749 * Compile time and code size have decreased.
3750 * Runtime performance of executables has improved.
3751 * Large programs can now be compiled.
3752 * MLton is self hosting.
3753 * The basis library is mostly complete and many bugs have been fixed.
3754 * The monomorphiser (`-m`) is no longer available.
3755 * The heap and stack are automatically resized.
3756 * There are now facilities for heap checkpointing (`MLton.saveWorld`) and object
3757 size computation (`MLton.size`).
3758 * MLton uses the GNU multiprecision (GnuMP) library to provide a fast
3759 implementation of `IntInf`.