4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="AsciiDoc 8.6.9">
6 <title>Changelog</title>
7 <link rel="stylesheet" href="./asciidoc.css" type="text/css">
8 <link rel="stylesheet" href="./pygments.css" type="text/css">
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
19 <body class="article">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
30 <div class="sectionbody">
31 <div class="ulist"><ul>
34 <a href="https://github.com/MLton/mlton/blob/master/CHANGELOG.adoc"><span class="monospaced">CHANGELOG.adoc</span></a>
38 <div class="listingblock">
39 <div class="content monospaced">
44 Here are the changes from version 20130715 to version 20180206.
49 ** Added an experimental LLVM codegen (`-codegen llvm`); requires LLVM tools
50 (`llvm-as`, `opt`, `llc`) version &ge; 3.7.
51 ** Made many substantial cosmetic improvements to front-end diagnostic
52 messages, especially with respect to source location regions, type inference
53 for `fun` and `val rec` declarations, signature constraints applied to a
54 structure, `sharing type` specifications and `where type` signature
55 expressions, type constructor or type variable escaping scope, and
56 nonexhaustive pattern matching.
57 ** Fixed minor bugs with exception replication, precedence parsing of function
58 clauses, and simultaneous `sharing` of multiple structures.
59 ** Made compilation deterministic (eliminate output executable name from
60 compile-time specified `@MLton` runtime arguments; deterministically generate
61 magic constant for executable).
62 ** Updated `-show-basis` (recursively expand structures in environments,
63 displaying components with long identifiers; append `(* @ region *)`
64 annotations to items shown in environment).
65 ** Forced amd64 codegen to generate PIC on amd64-linux targets.
67 ** Added `gc-summary-file file` runtime option.
68 ** Reorganized runtime support for `IntInf` operations so that programs that
69 do not use `IntInf` compile to executables with no residual dependency on GMP.
70 ** Changed heap representation to store forwarding pointer for an object in
71 the object header (rather than in the object data and setting the header to a
74 ** Added support for selected SuccessorML features; see
75 http://mlton.org/SuccessorML for details.
76 ** Added `(*#showBasis "file" *)` directive; see
77 http://mlton.org/ShowBasisDirective for details.
79 *** Added `pure`, `impure`, and `reentrant` attributes to `_import`. An
80 unattributed `_import` is treated as `impure`. A `pure` `_import` may be
81 subject to more aggressive optimizations (common subexpression elimination,
82 dead-code elimination). An `_import`-ed C function that (directly or
83 indirectly) calls an `_export`-ed SML function should be attributed
85 ** ML Basis annotations.
86 *** Added `allowSuccessorML {false|true}` to enable all SuccessorML features
87 and other annotations to enable specific SuccessorML features; see
88 http://mlton.org/SuccessorML for details.
89 *** Split `nonexhaustiveMatch {warn|error|igore}` and `redundantMatch
90 {warn|error|ignore}` into `nonexhaustiveMatch` and `redundantMatch`
91 (controls diagnostics for `case` expressions, `fn` expressions, and `fun`
92 declarations (which may raise `Match` on failure)) and `nonexhaustiveBind`
93 and `redundantBind` (controls diagnostics for `val` declarations (which may
94 raise `Bind` on failure)).
95 *** Added `valrecConstr {warn|error|ignore}` to report when a `val rec` (or
96 `fun`) declaration redefines an identifier that previously had constructor
100 *** Improved performance of `Array.copy`, `Array.copyVec`, `Vector.append`,
101 `String.^`, `String.concat`, `String.concatWith`, and other related
102 functions by using `memmove` rather than element-by-element constructions.
103 ** `Unsafe` structure.
104 *** Added unsafe operations for array uninitialization and raw arrays; see
105 https://github.com/MLton/mlton/pull/207 for details.
107 *** Updated: ckit library, MLLPT library, MLRISC library, SML/NJ library
110 *** Updated to warn and skip (rather than abort) when encountering functions
111 with `struct`/`union` argument or return type.
116 ** Remove ancient and unused `cmcat` tool.
119 ** Upgrade `gdtoa.tgz`.
122 ** Remove docs from `all` target of `./Makefile`; this eliminates the
123 `all-no-docs` target (which was frequently used in favor of `all`).
126 ** Use C compiler with `-std=gnu11` (rather than `-std=gnu99`).
127 ** Revert rudimentary support for `./configure`; the support was so minimal
128 that it seems unhelpful to pretend that there are exhaustive compatibility
129 checks being performed. All of the basic configuration can be accomplished
130 with simple `make` variable definitions.
133 ** Remove (expert, undocumented) `-debug-format` option; the same effect can
134 be achieved with `-as-opt` and `-cc-opt`.
135 ** Propagate C compiler from `./configure` to `mlton` script.
138 ** Extend `-target-*-opt` options to support `arch-os` pairs.
139 ** Remove `./package/rpm/*` and corresponding targets in `./Makefile`;
140 upstream MLton has not produced RPMs for years.
143 ** Slightly improve performance of `Vector.concat` and
144 `String.{concat,concatWith,tokens,fields}` by avoiding `List.map`-s.
147 ** Restore, but deprecate, `-drop-pass` compile-time expert option.
150 ** Update SML/NJ libraries to SML/NJ 110.82.
153 ** Add support for `(*#showBasis "file" *)` directives. This feature is
154 meant to facilitate auto-completion via
155 https://github.com/MatthewFluet/company-mlton[`company-mlton`] and similar
159 ** Update performance comparison on website. Thanks to Curtis Dunham for the
163 ** Updates to `-show-basis`:
164 *** `-show-basis-flat`: Recursively expand structures in environments,
165 displaying components with long identifiers.
166 *** `-show-basis-def`: Appends `(* @ region *)` annotations to items shown
168 *** `-show-basis-compact`: Tries to optimize vertical space (at the expense
172 ** Drop `_BSD_SOURCE` and `_POSIX_C_SOURCE` feature macros in
176 ** Add a `Dockerfile` to build/test MLton. Thanks to Richard Laughlin for the
180 ** Remove `$PREFIX` and `$prefix` from top-level `Makefile.in`; use
181 `./configure --prefix path`. Thanks to Richard Laughlin for the pull
185 ** Fix heap invariant predicates.
188 ** Eliminate the use of (some) global mutable state for signal handling.
191 ** Store forwarding pointer for an object in the object header (rather than in
192 the object data and setting the header to a sentinel value).
195 ** Updates to stack management in backend:
196 *** Improve `Allocation.Stack.get`.
197 *** Do not force `Cont` block arguments to stack.
200 ** In `signature SSA_TO_RSSA_STRUCTS` share by `Rssa.Atoms = Ssa.Atoms`. This
201 is the idiom used elsewhere in the compiler, rather than sharing individual
202 sub-structures of `Atoms`.
203 ** Minor updates to `DirectedGraph` and `Tree` in MLton library.
206 ** Add `-seed-rand w` compile-time option, to seed the pseudo-random number
208 ** Add a new MachineShuffle pass (disabled by default) that shuffles the
209 collection of chunks within the program and shuffles the collection of blocks
210 within a chunk. With the `-seed-rand w` compile-time option, can be used to
211 generate executables with distinct code placements.
214 ** Use a relative path in the `mlton` script, rather than an absolute path.
215 The absolute path needed to be set to the intended installation directory,
216 which made it difficult to install a binary release in a local directory.
217 Undertaken by Maksim Yegorov at RIT supported by NSF CISE Research
218 Infrastructure (CRI) award.
221 ** Add unsafe operations for array uninitialization and raw arrays.
222 *** Rename `Array_uninit: SeqIndex.int -> 'a array` primitive to
223 `Array_alloc: SeqIndex.int -> 'a array`.
224 *** Add `Array_uninit: 'a array * SeqIndex.int -> unit` primitive to set all
225 objptrs in the element at the given index to a bogus non-objptr value
226 (`0wx1`). One motivation for this primitive is to support space-efficient
227 polymorphic resizeable arrays. When shrinking a resizeable array, we would
228 like to "`NULL`" out the elements that are no longer part of the logical
229 array, in order to avoid a (logical) space leak.
230 *** Add `Array_uninitIsNop: 'a array -> bool` primitive to answer if the
231 `Array_uninit` primitive applied to the same array would be a nop (i.e., if
232 the array has no objptrs in the elements). This can be used to skip a
233 bulk-`Array_uninit` loop when it is known that the `Array_uninit` operations
235 *** Add `Array_allocRaw: SeqIndex.int -> 'a array` primitive to allocate an
236 array, but with a header that indicates that the array has no objptrs. Add
237 `Array_toArray: 'a array -> 'a array` primitive to update the header of an
238 `Array_allocRaw` allocated array to reveal the objptrs. One motiviation for
239 this primitive is that, in a parallel setting, the uninitialization of an
240 array can be a sequential bottleneck. The `Array_allocRaw` is a constant
241 time operation and the subsequent `Array_uninit` operations can be performed
243 *** Extend `structure Unsafe.Array` with additional operations. See
244 `./basis-library/sml-nj/unsafe.sig`.
247 ** Introduce ShareZeroVec SSA optimization to share zero-length vectors after
248 coercion-based optimizations. Undertaken by Maksim Yegorov at RIT supported
249 by NSF CISE Research Infrastructure (CRI) award.
252 ** New canonicalization strategy for CommonSubexp SSA optimization.
253 Previously, the canonicalization of commutative arithmetic primitives was
254 sensitive to variable hashes (created by an unseeded pseudo-random number
255 generator); now, the canonicalization of commutative arithmetic primitives is
256 sensitive to relative definition order of variables.
259 ** Fix bug in runtime argument option parsing.
262 ** Many updates and improvements to diagnostic messages. See
263 https://github.com/MLton/mlton/pull/195 for details.
266 ** Add rudimentary support for `./configure`; in particular, support
267 `--with-gmp-lib` and `--with-gmp-include` to set location of GMP and
268 `--prefix` to specify an install prefix. Undertaken by Maksim Yegorov at RIT
269 supported by NSF CISE Research Infrastructure (CRI) award.
272 ** Introduce `Array_copyArray: 'a array * SeqIndex.int * 'a array *
273 SeqIndex.int * SeqIndex.int -> unit` and `Array_copyVector: 'a array *
274 SeqIndex.int * 'a vector * SeqIndex.int * SeqIndex.int -> unit` primitives
275 which are used to implement a number of array and vector construction
276 functions, particularly `append`, `concat`, and `concatWith`. The primitives
277 compile to `memmove` operations, which (significantly) outperforms MLton's
278 element-by-element construction for large sequences. Undertaken by Bryan Camp
279 at RIT supported by NSF CISE Research Infrastructure (CRI) award.
282 ** Force PIC generation on amd64-linux targets. Thanks to Kuen-Bang Hou
283 (Favonia) for the pull request.
286 ** Generalize the `subWord` primitives to
289 | WordArray_subWord of {seqSize:WordSize.t, eleSize: WordSize.t}
290 | WordArray_updateWord of {seqSize: WordSize.t, eleSize: WordSize.t}
291 | WordVector_subWord of {seqSize: WordSize.t, eleSize: WordSize.t}
294 Undertaken by Bryan Camp at RIT supported by NSF CISE Research Infrastructure
298 ** Add a parser combinator library (`structure StreamParser`) to the MLton
299 Library. Undertaken by Jason Carr at RIT supported by NSF CISE Research
300 Infrastructure (CRI) award.
301 ** Add a parser for the SXML IR (`structure ParseSxml`). Undertaken by Jason
302 Carr at RIT supported by NSF CISE Research Infrastructure (CRI) award.
303 ** Allow compilation to start with a `.sxml` file. Undertaken by Jason Carr
304 at RIT supported by NSF CISE Research Infrastructure (CRI) award.
307 ** Replace `-drop-pass regex` compile-time option with `-disable-pass regex`
308 compile option and add `-enable-pass regex` compile option. Various XML,
309 SXML, SSA, SSA2, RSSA, and Machine IR optimization passes are initialized with
310 a default status, which can be overriden by `-{disable,enable}-pass`. In
311 particular, it is now easy to add a work-in-progress (and potentially buggy)
312 pass to the simplification pipeline with `execute = false` default status, to
313 be selectively executed with `-enable-pass`. Undertaken by Bryan Camp at RIT
314 supported by NSF CISE Research Infrastructure (CRI) award.
315 ** Add LoopUnswitch and LoopUnroll SSA optimizations (undertaken by Matthew
316 Surawski as an RIT CS MS Capstone Project). Initial evaluation demonstrates
317 some non-trivial performance gains, no non-trivial performance losses, and
318 only minor code size increases, but currently disabled pending a more thorough
322 ** Expand the set of MLB annotations:
323 *** `nonexhaustiveBind`, `nonexhaustiveExnBind`, `redundantBind`: controls
324 diagnostics for `val` declarations (which may raise `Bind` on failure).
325 *** `nonexhaustiveMatch`, `nonexhaustiveExnMatch`, `redundantMatch`:
326 controls diagnostics for `case` expressions, `fn` expressions, and `fun`
327 declarations (which may raise `Match` on failure).
328 *** `nonexhaustiveRaise`, `nonexhaustiveExnRaise`, `redundantRaise`:
329 controls diagnostics for `handle` expressions (which implicitly re-raise on
330 failure). Note that `nonexhaustiveRaise` and `nonexhaustiveExnRaise`
331 default to `ignore`. The combination of `nonexhaustiveRaise warn` and
332 `nonexhaustiveExnRaise ignore` can be useful for finding handlers that
333 handle some, but not all, values of an exception variant.
334 ** Make a number of improvements to diagnostic messages:
335 *** Display nonexhaustive exception patterns as `_ : exn`, rather than
337 *** Normalize nonexhaustive patterns by sorting (e.g., by `ConApp` name).
338 *** Report complete enumeration of unhandled constants, rather than a single
340 *** Report nonexhaustive patterns of record type as records, rather than as
344 ** Updates to SSA, SSA2, and RSSA IR support infrastructure
345 *** Display more context when reporting SSA and SSA2 IR type errors.
346 *** Add `-layout-width n` compile expert option to control the target width
347 for the pretty printer.
348 *** Make cosmetic improvments to SSA and SSA2 IR display (uses of global
349 variables bound to small constants and conapps are commented with the
350 corresponding value; include loop forest for functions with `-keep dot`).
351 *** Improve RSSA constant folding and copy propagation.
352 *** Limit Machine IR `Globals` to variables used outside of the `main`
356 ** Add `gc-summary-file file` runtime option.
359 ** Rename and add `smlnj-mlton-x{2,4,8,16}` top-level `Makefile` targets.
360 ** Update SML/NJ librarys to SML/NJ 110.80 (making use of supported
361 SuccessorML features).
362 ** Not support for SML/NJ extensions via SuccessorML MLB annotations on
366 ** Add support for vector expressions (`#[e1, e2, ..., en]`) and vector
367 patterns (`#[p1, p2, ..., pn]`) and add `Vector_vector` n-ary primitive.
368 Initial support for vector expressions and the `Vector_vector` primitive were
369 undertaken by Krishna Ravikumar as an RIT CS MS Capstone Project.
372 ** Update DOS eol handling and tweak error messages in lexer.
375 ** Correct off-by-one error in column numbers. Thanks to Jacob Zimmerman for
376 the error report and pull request.
379 ** Updates to SuccessorML support:
380 *** Add an `allowSuccessorML {false|true}` MLB annotation to enable all
381 Successor ML features with a single annotation.
382 *** Fix parsing of numeric labels to only accept an INT token that does not
383 begin with 0, is not an extended literal, is not negative, and is decimal.
384 *** Drop the alternate word prefixes (`0xw` and `0bw`).
385 *** Unconditionally allow line comments in MLB files.
386 *** Allow UTF-8 byte sequences in text constants.
387 *** Refactor `ml.lex` and `mlb.lex` to be more maintainable.
388 *** Rename `allowRecPunning` annotation to `allowRecordPunExps`.
391 ** Update ML-Yacc examples (`calc`, `fol`, `pascal`) to comply with MLton
392 build process. Thanks to Hai Nguyen Van for the pull request.
395 ** Update PortingMLton documentation and `./bin/add-cross` script. Thanks to
396 Daniel Moerner for the pull request.
399 ** Constant fold `CPointer_equal(NULL, NULL)` to `true`.
402 ** Introduce `NEEDS_SIGALTSTACK_EXEC` config in runtime system.
405 ** Construct a devel build version string from last commit time and last
407 ** Omit build date and build node from version banner; makes self-compiles
409 ** Remove `upgrade-basis.sml` from build. The generated `upgrade-basis.sml`
410 was introduced to handle incompatibilities in the Basis Library provided by an
411 old version of MLton and the Basis Library assumed by the current sources.
412 However, there are no incompatibilities with MLton 20130715, MLton 20100608,
413 or MLton 20070826. Nonetheless, the feature testing performed by
414 `./bin/upgrade-basis` to generate `upgrade-basis.sml` is time consuming,
415 especially when trying to simply type check the compiler sources.
418 ** Do not `gzip` man pages on OpenBSD. Thanks to Alexander Abushkevich for
422 ** Generate position independent code for OpenBSD. Thanks to Alexander
423 Abushkevich for the pull request.
426 ** Fix profiling for amd64-openbsd and x86-openbsd. Thanks to Alexander
427 Abushkevich for the pull request.
430 ** Update SML/NJ librarys to SML/NJ 110.79.
433 ** Update LLVM codegen to support (and require) >= llvm-3.7. Thanks to Eugene
434 Akentyev for the pull request.
437 ** Configure GMP location via `Makefile`.
440 ** Fix typo in `mlb-formal.tex`. Thanks to Jon Sterling for the pull request.
443 ** Update SML/NJ librarys to SML/NJ 110.78. Use `allowOrPats` and
444 `allowSigWithtype` to minimize diffs.
447 ** Fix elaboration of `withtype` in signature.
450 ** Add support for setting CM anchor bindings in `cm2mlb` tool.
453 ** Fix non-exhaustive match warnings with or-patterns. Thanks to Rob Simmons
455 ** Distinguish between partial and fully redundant matches.
456 ** Report partial redundancy in `val` declarations.
457 ** Lower precedence of or-patterns in parser.
458 ** Make a variety of cosmetic improvements to non-exhaustive and redundant
459 error/warning messages, primarily to be consistent in formatting between
460 quoted AST and generated messages.
463 ** Extend support for arm64 (aarch64). Thanks to Edmund Evans for the patch.
466 ** Introduce `valrecConstr {warn|error|ignore}` MLB annotation to report when
467 a `val rec` (or `fun`) declaration redefines an identifier that previously had
471 ** Add support for selected SuccessorML features (undertaken by Kevin Bradley
472 as an RIT CS MS Capstone Project).
473 *** `do`-declarations (`allowDoDecls`)
474 *** extended literals (`allowExtendedLiterals`)
475 *** line comments (`allowLineComments`)
476 *** optional leading bar in matches, fun decls, and datatype decls
478 *** optional trailing semicolon in sequence expressions (`allowOptSemicolon`)
479 *** or patterns (`allowOrPats`)
480 *** record expression punning (`allowRecPunning`)
481 *** withtype in signatures (`allowSigWithtype`)
484 ** Hide equality status of poly (and mono) vector and array slices.
485 ** Hide type equality of mono and poly `Word8.word` arrays and vectors.
488 ** Added `reentrant` attribute to `_import`. An `_import`-ed C function that
489 (directly or indirectly) calls an `_export`-ed SML function should be
490 attributed `reentrant`.
493 ** Make compilation deterministic:
494 *** Eliminate output executable name from compile-time specified `@MLton`
496 *** Deterministically generate magic constant for executable.
499 ** Add `-keep ast` compile option. Undertaken by Ross Bayer at RIT supported
500 by NSF CISE Research Infrastructure (CRI) award.
503 ** Updates to Debian packaging. Thanks to Christopher Cramer for the pull
507 ** Use `LANG=en_us` when computing version and build date. Thanks to Eugene
508 Akentyev for the pull request.
511 ** Update `mlnlffigen` to warn and skip functions with `struct`/`union`
512 arguments. Thanks to Armando Doval for the pull request.
515 ** Move pervasive constructs from `./mlton/ast` to `./mlton/atoms`, so that
516 `./mlton/ast/sources.mlb` depends on `./mlton/atoms/sources.mlb` (and not the
517 other way around). Undertaken by Vedant Raiththa at RIT supported by NSF CISE
518 Research Infrastructure (CRI) award.
521 ** Cache a worker thread to service calls of `_export`-ed functions. Thanks
522 to Bernard Berthomieu for the bug report.
525 ** Post-process generated front-end files for compatibility with SML/NJ's
526 recent `ml-lex` and `ml-yacc` tools that generate log identifiers rather than
527 unqualified (top-level environment) identifiers.
528 ** Corrected documentation for SML/NJ `Makefile` target and fixed
529 `bootstrap-nj` target. Thanks to Daniel Rosenwasser for the pull request.
532 ** Reorganized runtime support for `IntInf` operations so that programs that
533 do not use `IntInf` compile to executables with no residual dependency on GMP.
534 ** Fixed bug in `MLton.IntInf.fromRep` that could yield values that violate
535 the `IntInf` representation invariants. Thanks to Rob Simmons for the bug
539 ** Added `pure` and `impure` attributes to `_import`. An unattributed
540 `_import` is treated as `impure`. A `pure` `_import` may be subject to more
541 aggressive optimizations (common subexpression elimination, dead-code
542 elimination). Undertaken by Vedant Raiththa at RIT supported by NSF CISE
543 Research Infrastructure (CRI) award.
546 ** Various updates to treatment of `IntInf` constants in the compiler.
547 *** Recognize both `Big` and `Small` representations of `IntInf`-s.
548 *** Translate `IntInf` consts to `Big` and `Small` representations in
549 conversion from SSA to RSSA. This is consistent with the treatment of other
550 `IntInf` operations in the conversion. After the conversion, `IntInf` is no
551 longer treated as a primitive.
552 *** Remove `initIntInfs` from program initialization.
553 *** Constant fold `IntInf_toVector` and `WordVector_toIntInf` primitives.
556 ** Various updates to `structure WordXVector` in compiler proper.
557 *** Update the `WordXVector.layout` function. If the `elementSize` is
558 `WordX.word8` and more than 90% of the characters satisfy `Char.isGraph
559 orelse Char.isSpace`, then display as an SML string constant (with
560 non-printable characters SML-escaped). Otherwise, display as an SML/NJ-style
561 `#[0x0, 0xF]` vector literal.
562 *** Update initialization of `static struct GC_vectorInit vectorInits[]`
563 constants in runtime. If the `WordXVector`'s (primitive) `elementSize` is
564 `WordSize.W8`, then emit a C-escaped string constant. Otherwise, emit a
565 C-array initialization.
568 ** More updates to benchmark infrastructure.
569 *** Make `update-counts.sh` script more robust.
570 *** Update `hamlet.sml` benchmark program to close input file after each
572 *** Update `fft.sml` benchmark program to only invoke `test` function with
573 power-of-2 arguments.
574 *** Update `model-elimination.sml` benchmark program to iterate `main ()`
575 according to `doit` size parameter.
578 ** Include `winsock2.h` before `windows.h` in MinGW port. Thanks to Shu-Hung
579 You for the pull request.
582 ** Refactor array and vector implementation in Basis Library into a primitive
583 implementation (using `SeqInt.int` for indexing) and a wrapper implementation
584 (using the default `Int.int` for indexing). Thanks to Rob Simmons for the
586 ** Correct description of `MLton.{Vector,Array}.unfoldi` on website. Thanks
587 to Rob Simmons for the pull request.
590 ** Updates to benchmark infrastructure.
591 *** Add `even-odd.sml` benchmark that exercises mutual tail recursion.
592 *** Add `update-counts.sh` script to calculate appropriate benchmark
593 iteration counts and update benchmark iteration counts so that all
594 benchmarks run for at least 30 seconds.
595 *** Updates to benchmark driver program.
598 ** Change `./basis-library/integer/int-inf.sml` to reduce dependency on
599 GMP-specific details of `./basis-library/integer/int-inf0.sml`. Thanks to Rob
600 Simmons for the pull request.
601 ** Correct type and description of `MLton.IntInf.fromRep` on website. Thanks
602 to Rob Simmons for the pull request.
605 ** Add experimental LLVM codegen (undertaken by Brian Leibig as an RIT CS MS
609 ** Update `CallingFromSMLToC` page on website. Thanks to Bikal Gurung for the
613 ** Updates for MinGW port.
616 ** Update AsciiDoc sources for website.
619 ** Various updates to website. Thanks to Mauricio C Antunes for the pull
621 *** Add Tofte's tutorial and Rossberg's grammar.
622 *** Fix links to implementations.
625 ** Update links from `References` page on website. Thanks to Mauricio C
626 Antunes for the pull request.
629 ** Fix example for `Lazy` page on website. Thanks to Daniel Rosenwasser for
634 Here are the changes from version 20100608 to version 20130715.
639 ** Cosmetic improvements to type-error messages.
641 *** Bytecode codegen: The bytecode codegen had not seen significant use and
642 it was not well understood by any of the active developers.
643 *** Support for `.cm` files as input: The ML Basis system provides much
644 better infrastructure for "programming in the very large" than the (very)
645 limited support for CM. The `cm2mlb` tool (available in the source
646 distribution) can be used to convert CM projects to MLB projects, preserving
647 the CM scoping of module identifiers.
648 ** Bug fixes: see changelog
650 ** Bug fixes: see changelog
652 ** Interpret `(*#line line:col "file" *)` directives as relative
654 ** ML Basis annotations.
655 *** Added: `resolveScope`
658 *** Improved performance of `String.concatWith`.
659 *** Use bit operations for `REAL.class` and other low-level operations.
660 *** Support additional variables with `Posix.ProcEnv.sysconf`.
661 *** Bug fixes: see changelog
662 ** `MLton` structure.
663 *** Removed: `MLton.Socket`
665 *** Updated: ckit library, MLRISC library, SML/NJ library
666 *** Added: MLLPT library
669 *** Generate `(*#line line:col "file.lex" *)` directives with simple
670 (relative) file names, rather than absolute paths.
672 *** Generate `(*#line line:col "file.grm" *)` directives with simple
673 (relative) file names, rather than absolute paths.
674 *** Fixed bug in comment-handling in lexer.
679 ** Update SML/NJ libraries to SML/NJ 110.76.
682 ** Upgrade `gdtoa.tgz`; fixed bug in `Real32.{fmt,toDecimal,toString}`, which
683 in some cases produced too many digits
686 ** Removed `MLton.Socket` structure (deprecated in last release).
689 ** Improved performance of `String.concatWith`.
692 ** Update SML/NJ libraries to SML/NJ 110.75.
695 ** Detect PowerPC 64 architecture.
698 ** Fixed bug in elaboration that erroneously accepted the following:
700 signature S = sig structure A : sig type t end
701 and B : sig type t end where type t = A.t end
704 ** Introduce an MLB annotation to control overload and flex record resolution
705 scope: `resolveScope {strdec|dec|topdec|program}`.
708 ** Simplify use of `getsockopt` and `setsockopt` in Basis Library.
709 ** Direct implementation of `Socket.Ctl.{getATMARK,getNREAD}` in runtime
710 system, rather than indirect implementation in Basis Library via `ioctl`.
711 ** Replace use of casting through a union with `memcpy` in runtime.
714 ** Use bit operations for `REAL.class` and other low-level operations.
715 ** Fixed bugs in `REAL.copySign`, `REAL.signBit`, and `REAL.{to,from}Decimal`.
718 ** Cosmetic improvements to type-error messages.
719 ** Fixed bug in elaboration that erroneously rejected the following:
721 datatype ('a, ''a) t = T
722 type ('a, ''a) u = unit
724 and erroneously accepted the following:
726 fun f (x: 'a) : ''a = x
727 fun g (x: 'a) : ''a = if x = x then x else x
730 ** Fixed bug in redundant SSA optimization.
733 ** Support additional variables with `Posix.ProcEnv.sysconf`.
736 ** Change `mllex` and `mlyacc` to generate `#line` directives with simple file
737 names, rather than absolute paths.
738 ** Interpret `#line` directives as relative file names.
741 ** Fixed bug in SSA/SSA2 shrinker that could erroneously turn a non-tail
742 function call with a `Bug` transfer as its continuation into a tail function
746 ** Update SML/NJ libraries to SML/NJ 110.73 and add ML-LPT library.
749 ** Fixed bug in translation from SSA2 to RSSA with case expressions over
750 non-primitive-sized words.
751 ** Fixed bug in SSA/SSA2 type checking of case expressions over words.
754 ** Upgrade `gdtoa.tgz`.
755 ** Remove bytecode codegen.
756 ** Remove support for `.cm` files as input.
759 ** Fixed a bug with the treatment of `as`-patterns, which should not allow the
760 redefinition of constructor status.
763 ** Fixed bug with treatment of nan in common subexpression elimination SSA
767 ** Fixed bug in translation from SSA2 to RSSA with weak pointers.
770 ** Fixed bug in amd64 codegen calling convention for varargs C calls.
773 ** Fixed bug in comment-handling in lexer for `mlyacc`'s input language.
776 ** Fixed bug in elaboration of function clauses with different numbers of
777 arguments that would raise an uncaught `Subscript` exception.
782 Here are the changes from version 20070826 to version 20100608.
790 ** Command-line switches.
791 *** Added: `-mlb-path-var '<name> <value>'`
792 *** Removed: `-keep sml`, `-stop sml`
793 ** Improved constant folding of floating-point operations.
794 ** Experimental: Support for compiling to a C library; see wiki documentation.
795 ** Extended `-show-def-use` output to include types of variable definitions.
796 ** Deprecated features (to be removed in a future release)
797 *** Bytecode codegen: The bytecode codegen has not seen significant use and
798 it is not well understood by any of the active developers.
799 *** Support for `.cm` files as input: The ML Basis system provides much
800 better infrastructure for "programming in the very large" than the (very)
801 limited support for CM. The `cm2mlb` tool (available in the source
802 distribution) can be used to convert CM projects to MLB projects, preserving
803 the CM scoping of module identifiers.
804 ** Bug fixes: see changelog
806 ** `@MLton` switches.
807 *** Added: `may-page-heap {false|true}`
808 ** `may-page-heap`: By default, MLton will not page the heap to disk when
809 unable to grow the heap to accomodate an allocation. (Previously, this
810 behavior was the default, with no means to disable, with security an
811 least-surprise issues.)
812 ** Bug fixes: see changelog
814 ** Allow numeric characters in ML Basis path variables.
817 *** Bug fixes: see changelog.
818 ** `MLton` structure.
819 *** Added: `MLton.equal`, `MLton.hash`, `MLton.Cont.isolate`,
820 `MLton.GC.Statistics, `MLton.Pointer.sizeofPointer`,
821 `MLton.Socket.Address.toVector`
823 *** Deprecated: `MLton.Socket`
824 ** `Unsafe` structure.
825 *** Added versions of all of the monomorphic array and vector structures.
827 *** Updated: ckit library, MLRISC library, SML/NJ library.
830 *** Eliminated top-level `type int = Int.int` in output.
831 *** Include `(*#line line:col "file.lex" *)` directives in output.
832 *** Added `%posint` command, to set the `yypos` type and allow the lexing of
833 multi-gigabyte files.
835 *** Added command-line switches `-linkage archive` and `-linkage shared`.
836 *** Deprecated command-line switch `-linkage static`.
837 *** Added support for ia64 and hppa targets.
839 *** Eliminated top-level `type int = Int.int` in output.
840 *** Include `(*#line line:col "file.grm" *)` directives in output.
845 ** Fixed bug in the mark-compact garbage collector where the C library's
846 `memcpy` was used to move objects during the compaction phase; this could lead
847 to heap corruption and segmentation faults with newer versions of `gcc` and/or
848 `glibc`, which assume that src and dst in a `memcpy` do not overlap.
851 ** Fixed bug in elaboration of `datatype` declarations with `withtype`
855 ** Fixed performance bug in RefFlatten SSA2 optimization.
858 ** Fixed performance bug in SimplifyTypes SSA optimization.
861 ** Fixed bug in amd64 codegen register allocation of indirect C calls.
864 ** Fixed bug in `IntInf.scan` and `IntInf.fromString` where leading spaces
865 were only accepted if the stream had an explicit sign character.
868 ** Added CombineConversions SSA optimization.
871 ** Removed deprecated command line switch `-show-anns {false, true}`.
874 ** Removed command line switches `-keep sml` and `-stop sml`. Their meaning
875 was unclear with `.mlb` files; their effect with `.cm` files can be achieved
879 ** Fixed bug in `IntInf.~>>` that could cause a `glibc` assertion failure.
882 ** Fixed exported type of `MLton.Process.reap`.
885 ** Added `MLton.Socket.Address.toVector` to get the network-byte-order
886 representation of an IP address.
889 ** Fixed bug in `MLton.size` and `MLton.share` when tracing the current stack.
892 ** Fixed phantom typing of sockets by hiding the representation of socket
893 types. Previously the representation of sockets was revealed rendering the
894 phantom types useless.
897 ** Fixed bug in nested `_export`/`_import` functions.
900 ** Improved constant folding of floating point operations.
903 ** Store the card/cross map at the end of the allocated ML heap; avoids
904 possible out of memory errors when resizing the ML heap cannot be followed by
905 a card/cross map allocation.
908 ** Added support for compiling to a C library. The relevant new compiler
909 options are `-ar` and `-format`. Libraries are named based on the name of the
910 `-export-header` file. Libraries have two extra methods:
911 *** `NAME_open(argc, argv)` initializes the library and runs the SML code
912 until it reaches the end of the program. If the SML code exits or raises an
913 uncaught exception, the entire program will terminate.
914 *** `NAME_close()` will execute any registered atExit functions, any
915 outstanding finalizers, and frees the ML heap.
918 ** Fixed bug in the name mangling of `_import`-ed functions with the `stdcall`
922 ** Added `MLton.Pointer.sizeofPointer`.
925 ** Added expert command line switch `-emit-main {true|false}`.
928 ** Fixed bug in Windows code to page the heap to disk when unable to grow the
929 heap to a desired size. Thanks to Sami Evangelista for the bug report.
932 ** Implemented `MLton.Cont.isolate`.
935 ** Fixed bug in *NIX code to page the heap to disk when unable to grow the
936 heap to a desired size. Thanks to Nicolas Bertolotti for the bug report and
940 ** More flexible active/paused stack resizing policy. +
941 Removed `thread-shrink-ratio` runtime option. + Added
942 `stack-current-grow-ratio`, `stack-current-max-reserved-ratio`,
943 `stack-current-permit-ratio`, `stack-current-shrink-ratio`,
944 `stack-max-reserved-ratio`, and `stack-shrink-ratio` runtime options.
947 ** Fixed bugs in Basis Library where the representations of `OS.IO.iodesc`,
948 `Posix.IO.file_desc`, `Posix.Signal.signal`, `Socket.sock`,
949 `Socket.SOGK.sock_type` as integers were exposed.
952 ** Added unsafe versions of all of the monomorphic array and vector
956 ** Fixed bug in Basis Library where the representation of `OS.Process.status`
957 as an integer was exposed.
960 ** Fixed space-safety bug in RefFlatten optimization (to flatten refs into
961 containing data structure). Thanks to Daniel Spoonhower for the bug report and
962 initial diagnosis and patch.
965 ** Various updates to GC statistics gathering. Some basic GC statistics can
966 be accessed from SML by `MLton.GC.Statistics.*` functions.
969 ** Added primitive (structural) polymorphic hash.
972 ** Fixed frontend to accept `op _longvid_` patterns and expressions. Thanks to
973 Florian Weimer for the bug report.
976 ** Extended `-show-def-use` output to include types of variable definitions.
979 ** Extended `MLton_equal` to be a structural equality on all types, including
980 `real` and `->` types.
983 ** Changed ML-Yacc and ML-Lex to output line directives so that MLton's
984 def-use information points to the source files (`.grm` and `.lex`) instead of
985 the generated implementations (`.grm.sml` and `.lex.sml`).
988 ** Added runtime option `may-page-heap {false|true}`. By default, MLton will
989 not page the heap to disk when unable to grow the heap to a desired size.
990 (Previously, this behavior was the default, with no means to disable, with
991 security and least-surprise concerns.) Thanks to Wesley Terpstra for the
993 ** Fixed bug the FFI visible representation of `Int16.int ref` (and references
994 of other primitive types smaller than 32-bits) on big-endian platforms. Thanks
995 to Dave Herman for the bug report.
998 ** Fixed bug in `ImperativeIOExtra.canInput` (`TextIO.canInput`). Thanks to
999 Ville Laurikari for the bug report.
1002 ** Better constant folding of `IntInf` operations.
1005 ** Fixed bug in algebraic simplification of `RealX` primitives. `Real.<= (x,
1006 x)` is `false` when `x` is `NaN`.
1009 ** Fixed bug in type inference of flexible records. This would later cause
1010 the compiler to raise the `TypeError` exception. Thanks to Wesley Terpstra for
1014 ** Fixed bug in cross-compilation of `gdtoa` library. Thanks to Wesley
1015 Terpstra for the bug report and patch.
1018 ** Fixed bug in RefFlatten optimization (pass to flatten refs into containing
1019 data structure). Thanks to Ruy LeyWild for the bug report.
1022 ** Fixed bug in the handling of weak pointers by the mark-compact garbage
1023 collector. Thanks to Sean McLaughlin for the bug report and Florian Weimer for
1024 the initial diagnosis.
1027 ** Added `%posint` command to `ml-lex`, to set the `yypos` type and allow the
1028 lexing of multi-gigabyte input files. Thanks to Florian Weimer for the feature
1029 concept and original patch.
1032 ** Added command-line switch `-mlb-path-var '<name> <value>'` for specifying
1036 ** Allow numeric characters in MLB path variables.
1039 ** Fixed bug in elaboration of structures with signature constraints. This
1040 would later cause the compiler to raise the `TypeError` exception. Thanks to
1041 Vesa Karvonen for the bug report.
1044 ** Fixed bug in interaction of `_export`-ed functions and signal
1045 handlers. Thanks to Sean McLaughlin for the bug report.
1048 ** Fixed bug in implementation of `_export`-ed functions using `char`
1049 type. Thanks to Katsuhiro Ueno for the bug report.
1054 Here are the changes from version 20051202 to version 20070826.
1059 ** amd64-linux, amd64-freebsd
1062 ** x86-darwin (Mac OS X)
1064 ** Support for 64-bit platforms.
1065 *** Native amd64 codegen.
1066 ** Command-line switches.
1067 *** Added: `-codegen amd64`, `-codegen x86`, `-default-type <type>`,
1068 `-profile-val {false|true}`.
1069 *** Changed: `-stop f` (file listing now includes `.mlb` files)
1070 ** Bytecode codegen.
1071 *** Support for profiling.
1072 *** Support for exception history.
1074 ** ML Basis annotations.
1075 *** Removed: `allowExport`, `allowImport`, `sequenceUnit`, `warnMatch`.
1078 *** Added: `PackWord16Big, `PackWord16Little`, `PackWord64Big`,
1080 *** Bug Fixes: see changelog.
1081 ** `MLton` structure.
1082 *** Added: `MLTON_MONO_ARRAY`, `MLTON_MONO_VECTOR`, `MLTON_REAL`,
1083 `MLton.BinIO.tempPrefix`, `MLton.CharArray`, `MLton.CharVector`,
1084 `MLton.IntInf.BigWord`, `MLton.IntInf.SmallInt`,
1085 `MLton.Exn.defaultTopLevelHandler`, `MLton.Exn.getTopLevelHandler`,
1086 `MLton.Exn.setTopLevelHandler`, `MLton.LargeReal`, `MLton.LargeWord`,
1087 `MLton.Real`, `MLton.Real32`, `MLton.Real64`, `MLton.Rlimit.Rlim`,
1088 `MLton.TextIO.tempPrefix`, `MLton.Vector.create`, `MLton.Word.bswap`,
1089 `MLton.Word8.bswap`, `MLton.Word16`, `MLton.Word32`, `MLton.Word64`,
1090 `MLton.Word8Array`, `MLton.Word8Vector`.
1091 *** Changed: `MLton.Array.unfoldi`, `MLton.IntInf.rep`, `MLton.Rlimit`,
1092 `MLton.Vector.unfoldi`.
1093 *** Deprecated: `MLton.Socket`
1095 *** Added: MLRISC libary.
1096 *** Updated: ckit library, SML/NJ library.
1102 ** Removed deprecated ML Basis annotations.
1105 ** Fixed bug in treatment of `Real<N>.{scan,fromString}` operations.
1106 `Real<N>.{scan,fromString}` were using `TO_NEAREST` semantics, but should obey
1107 current rounding mode. (Only `Real<N>.fromDecimal` is specified to always
1108 have `TO_NEAREST` semantics.) Thanks to Sean McLaughlin for the bug report.
1111 ** Fixed bugs in constant-folding of floating-point operations with C codegen.
1114 ** Fixed bug in treatment of floating-point operations. Floating-point
1115 operations depend on the current rounding mode, but were being treated as
1116 pure. Thanks to Sean McLaughlin for the bug report.
1119 ** Added `MLton.Exn.{default,get,set}TopLevelHandler`.
1122 ** Restored `native` option to `-codegen` flag.
1125 ** Fixed bug in `Real32.toInt`: conversion of real values close to
1126 `Int.maxInt` could be incorrect.
1129 ** Updates to bytecode code generator: support for amd64-* targets, support
1130 for profiling (including exception history).
1131 ** Fixed bug in `Socket` module of Basis Library; unmarshalling of socket
1132 options (for `get*` functions) used `andb` rather than `orb`. Thanks to Anders
1133 Petersson for the bug report (and patch).
1136 ** Fixed bug in `Date` module of Basis Library; some functions would
1137 erroneously raise `Date` when given a year <= 1900. Thanks to Joe Hurd for the
1139 ** Fixed a long-standing bug in monomorphisation pass. Thanks to Vesa Karvonen
1143 ** Native amd64 code generator for amd64-* targets.
1144 ** Eliminate `native` option from `-codegen` flag.
1145 ** Add `x86` and `amd64` options to `-codegen` flag.
1148 ** Improved type checking of RSSA and Machine ILs.
1151 ** Fixed aliasing issues with `basis/Real/*.c` files.
1152 ** Added real/word casts in `MLton` structure.
1155 ** Added primitives for bit cast of word to/from real.
1156 ** Implement `PackReal<N>{Big,Little}` using `PackWord<N>{Big,Little}` and bit
1160 ** Move all system header `#include`-s to `platform/` os headers.
1161 ** Use C99 `<assert.h>`, rather than custom `"assert.{h,c}"`.
1164 ** Implement `PackWord<N>{Big,Little}` entirely in ML, using an ML byte swap
1168 ** Change amd64-* target platforms from 32-bit compatibility mode (i.e.,
1169 `-m32`) to 64-bit mode (i.e., `-m64`). Currently, only the C codegen is able
1170 to generate 64-bit executables.
1173 ** Removed expert command line switch `-coalesce <n>`.
1174 ** Added expert command line switch `-chunkify {coalesce<n>|func|one}`.
1177 ** Fixed bug in `PackReal<N>.toBytes`. Thanks to Eric McCorkle for the bug
1181 ** Added command line switch `-profile-val`, to profile the evaluation of
1182 `val` bindings; this is particularly useful with exception history for
1183 debugging uncaught exceptions at the top-level.
1186 ** Added command line switch `-show {anns|path-map}` and deprecated command
1187 line switch `-show-anns {false|true}`. Use `-show path-map` to see the
1188 complete MLB path map as seen by the compiler.
1191 ** Changed the output of command line switch `-stop f` to include `.mlb`
1192 files. This is useful for generating Makefile dependencies. The old output
1193 is easy to recover if necessary (e.g. `grep -v '\.mlb$'`).
1196 ** Added command line switches `-{,target}-{as,cc,link}-opt-quote`, which pass
1197 their argument as a single argument to `gcc` (i.e., without tokenization at
1198 spaces). These options support using headers and libraries (including the
1199 MLton runtime headers and libraries) from a path with spaces.
1202 ** Extensive reorganization of garbage collector, runtime system, and Basis
1203 Library implementation. (This is in preparation for future 64bit support.)
1204 They should be more C standards compliant and easier to port to new systems.
1206 *** Disallow nested indirect types (e.g., `int array array`).
1209 ** Fixed a bug in elaboration of FFI forms; unary FFI types (e.g., `array`,
1210 `ref`, `vector`) could be used in places where `MLton.Pointer.t` was required.
1211 This would later cause the compiler to raise the `TypeError` exception, along
1212 with a lot of XML IL.
1215 ** On *-darwin, work with GnuMP installed via Fink or MacPorts.
1218 ** Ported to x86-darwin.
1221 ** Added missing specification of `find` to the `MONO_VECTOR` signature.
1224 ** Fixed a bug in Useless SSA optimization, caused by calling an imported C
1225 function and then ignoring the result.
1228 ** Fixed a bug in pass to flatten data structures. Thanks to Joe Hurd for the
1232 ** Fixed a bug in the native codegen's implementation of the C-calling
1236 ** Ported to PowerPC-AIX.
1237 ** Fixed a bug in the runtime for the cases where nonblocking IO with sockets
1238 was implemented using `MSG_DONTWAIT`. This flag does not exist on AIX,
1239 Cygwin, HPUX, and MinGW and was previously just ignored. Now the runtime
1240 simulates the flag for these platforms (except MinGW, yet, where it's still
1244 ** Added `-default-type '<ty><N>'` for specifying the binding of default types
1245 in the Basis Library (e.g., `Int.int`).
1248 ** Ported to HPPA-HPUX.
1249 ** Fixed `PackReal{,32,64}{Big,Little}` to follow the Basis Library
1253 ** Fixed a bug in `MLton.share` that could cause a segfault.
1256 ** Changed `MLton.Vector.unfoldi` to return the state in addition to the
1260 ** Added `MLton.Vector.create`, a more powerful vector-creation function than
1261 is available in the basis library.
1264 ** Added MLRISC from SML/NJ 110.57 to standard distribution.
1267 ** Fixed bug in SSA simplifier that could eliminate an irredundant test.
1270 ** Ported a bugfix from SML/NJ for a bug with the combination of `withNack`
1274 ** Support compiler specific annotations in ML Basis files. If an annotation
1275 contains `:`, then the text preceding the `:` is meant to denote a compiler.
1276 For MLton, if the text preceding the `:` is equal to `mlton`, then the
1277 remaining annotation is scanned as a normal annotation. If the text preceding
1278 the `:` is not-equal to `mlton`, then the annotation is ignored, and no
1282 ** Fixed bug in elaboration of functors; a program with a very large number of
1283 functors could exhibit the error `ElaborateEnv.functorClosure: firstTycons`.
1288 Here are the changes from version 20041109 to version 20051202.
1292 * New license: BSD-style instead of GPL.
1294 ** hppa: Debian Linux.
1297 ** improved exception history.
1298 ** Command-line switches.
1299 *** Added: `-as-opt`, `-mlb-path-map`, `-target-as-opt`, `-target-cc-opt`.
1300 *** Deprecated: none.
1301 *** Removed: `-native`, `-sequence-unit`, `-warn-match`, `-warn-unused`.
1303 ** FFI syntax changes and extensions.
1304 *** Added: `_symbol`.
1305 *** Changed: `_export`, `_import`.
1306 *** Removed: `_ffi`.
1307 ** ML Basis annotations.
1308 *** Added: `allowFFI`, `nonexhaustiveExnMatch`, `nonexhaustiveMatch`,
1309 `redundantMatch`, `sequenceNonUnit`.
1310 *** Deprecated: `allowExport`, `allowImport`, `sequenceUnit`, `warnMatch`.
1313 *** Added: `Int1`, `Word1`.
1314 ** `MLton` structure.
1315 *** Added: `Process.create`, `ProcEnv.setgroups`, `Rusage.measureGC`,
1316 `Socket.fdToSock`, `Socket.Ctl.getError`.
1317 *** Changed: `MLton.Platform.Arch`.
1319 *** Added: ckit library, ML-NLFFI library, SML/NJ library.
1321 ** updates of `mllex` and `mlyacc` from SML/NJ.
1322 ** added `mlnlffigen`.
1323 ** profiling supports better inclusion/exclusion of code.
1328 ** Updated SML/NJ Library and CKit Library from SML/NJ 110.57.
1331 ** Fixed a bug in `MLton.ProcEnv.setgroups`.
1334 ** Fixed a bug in the interleaving of lexing/parsing and elaborating of ML
1335 Basis files, which would raise an unhandled `Force` exception on cyclic basis
1336 references. Thanks to John Dias for the bug report.
1339 ** Fixed two bugs in `Time.scan`. One would raise `Time` on a string with a
1340 large fractional component. Thanks to Carsten Varming for the bug report.
1341 The other failed to scan strings with an explicit sign followed by a decimal
1345 ** Removed `MLton.GC.setRusage`.
1346 ** Added `MLton.Rusage.measureGC`.
1349 ** Fixed bug in display of types with large numbers of type variables, which
1350 could cause unhandled exception `Chr`.
1353 ** Fixed bug in type inference of flexible records that would show up as
1354 `"Type error: variable applied to wrong number of type args"`.
1357 ** Fixed bug in `Real.signBit`, which had assumed that the underlying C
1358 signbit returned 0 or 1, when in fact any nonzero value is allowed to indicate
1362 ** Added `-mlb-path-map` switch.
1365 ** Fixed bug in `MLton.Finalizable.touch`, which was not keeping alive
1366 finalizable values in all cases.
1369 ** Added SML/NJ Library and CKit Library from SML/NJ 110.55 to standard
1371 ** Fixed bug in `Socket.Ctl.*`, which got the endianness wrong on big-endian
1372 machines. Thanks to Wesley Terpstra for the bug report and fix.
1373 ** Added `MLton.GC.setRusage`.
1374 ** Fixed bug in `mllex`, which had file positions starting at 2. They now
1378 ** Fixed bug in `LargeInt.scan`, which should skip leading `"0x"` and `"0X"`.
1379 Thanks to Wesley Terpstra for the bug report and fix.
1382 ** Additional revisions of FFI:
1383 *** Deprecated `_export` with incomplete annotation.
1384 *** Added `_address` for address of C objects.
1385 *** Eliminated address component of `_symbol`.
1386 *** Changed the type of the `_symbol*` expression.
1387 *** See documentation for more detail.
1390 ** Annotation changes:
1391 *** Deprecated: `sequenceUnit`
1392 *** Added: `sequenceNonUnit`
1395 ** Annotation changes:
1396 *** Deprecated: `allowExport`, `allowImport`, `warnMatch`
1397 *** Added: `allowFFI`, `nonexhaustiveExnMatch`, `nonexhaustiveMatch`,
1401 ** Update `mllex` and `mlyacc` with SML/NJ 110.55+ versions. This
1402 incorporates a small number of minor bug fixes.
1405 ** Fixed bug in pass to flatten refs into containing data structure.
1409 *** Deprecated `_import` of C base types.
1410 *** Added `_symbol` for address, getter, and setter of C base types.
1411 *** See documentation for more detail.
1414 ** Update `mllex` and `mlyacc` with SML/NJ 110.55 versions. This incorporates
1415 a small number of minor bug fixes.
1418 ** Fixed bug in front end that allowed unary constructors to be used without
1419 an argument in patterns.
1422 ** Eliminated `_ffi`, which has been deprecated for some time.
1425 ** Fixed bug in runtime that caused getrusage to be called on every GC, even
1426 if timing info isn't needed.
1429 ** Fixed bug in closure conversion tickled by making a weak pointer to a
1433 ** Changed `{OS,Posix}.Process.sleep` to call `nanosleep()` instead of
1435 ** Added `MLton.ProcEnv.setgroups`.
1438 ** `InetSock.{any,toAddr}` raise `SysErr` if port is not in [0, 2^16^).
1441 ** Fixed bug in `Socket.recvVecFrom{,',NB,NB'}`. The type was too polymorphic
1442 and allowed the creation of a bogus `sock_addr`.
1445 ** The front end now reports errors on encountering undefined or cyclicly
1446 defined MLB path variables.
1449 ** Fixed bug in `Posix.IO.{getlk,setlk,setlkw}` that caused a link-time error:
1450 undefined reference to `Posix_IO_FLock_typ`.
1451 ** Improved exception history so that the first entry in the history is the
1452 source position of the raise, and the rest is the call stack.
1455 ** Improved exception history for `Overflow` exceptions.
1458 ** Fixed a bug in pass to flatten refs into containing data structure.
1461 ** Fixed a front-end bug that could cause an internal bug message of the form
1462 `"missing flexInst"`.
1465 ** Fixed a bug in the representation of flat arrays/vectors that caused
1466 incorrect behavior when the element size was 2 or 4 bytes and there were
1467 multiple components to the element (e.g. `(char * char) vector`).
1470 ** Fixed a bug in `GC_arrayAllocate` that could cause a segfault.
1473 ** Added structures `Int1`, `Word1`.
1476 ** Fixed a bug that caused `Socket.Ctl.{get,set}LINGER` to raise `Subscript`.
1477 The problem was in the use of `PackWord32Little.update`, which scales the
1478 supplied index by `bytesPerElem`.
1481 ** Fixed a bug in CML mailboxes.
1484 ** Fixed an off-by-one error in `mkstemp` defined in `mingw.c`.
1487 ** Added `mlnlffigen` tool (heavily adapted from SML/NJ).
1490 ** Added MLNLFFI Library (heavily adapted from SML/NJ) to standard
1494 ** Fixed a bug in `OS.path.toString`, which did not raise `InvalidArc` when
1498 ** Fixed a bug in `OS.Path.joinDirFile`, which did not raise `InvalidArc` when
1499 passed a file that was not an arc.
1502 ** Fixed a front end bug that incorrectly rejected expansive __valbind__s with
1503 useless bound type variables.
1506 ** Fixed x86 codegen bug which failed to account for the possibility that a
1507 64-bit move could interfere with itself (as simulated by 32-bit moves).
1510 ** Fixed `Real32.fmt StringCvt.EXACT`, which had been producing too many
1511 digits of precision because it was converting to a `Real64.real`.
1514 ** Replaced MLB path variable `MLTON_ROOT` with `SML_LIB`, to use a more
1515 compiler-independent name. We will keep `MLTON_ROOT` aliased to `SML_LIB`
1516 until after the next release.
1519 ** `Unix.create` now works on all platforms (including Cygwin and MinGW).
1522 ** Added support for `MLton.Process.create`, which works on all platforms
1523 (including Windows-based ones like Cygwin and MinGW) and allows better control
1524 over `std{in,out,err}` for child process.
1529 Here are the changes from version 20040227 to 20041109.
1534 ** x86: FreeBSD 5.x, OpenBSD
1535 ** PowerPC: Darwin (MacOSX)
1536 * Support for MLBasis files.
1537 * Support for dynamic libraries.
1538 * Support for Concurrent ML (CML).
1539 * New structures: `Int2`, `Int3`, ..., `Int31` and `Word2`, `Word3`, ..., `Word31`.
1540 * A new form of profiling: `-profile count`.
1541 * A bytecode generator.
1542 * Data representation improvements.
1543 * `MLton` structure changes.
1544 ** Added: `share`, `shareAll`
1545 ** Changed: `Exn`, `IntInf`, `Signal`, `Thread`.
1546 * Command-line switch changes.
1548 *** `-native` (use `-codegen`)
1549 *** `-sequence-unit` (use `-default-ann`)
1550 *** `-warn-match` (use `-default-ann`)
1551 *** `-warn-unused` (use `-default-ann`)
1553 *** `-detect-overflow`
1554 *** `-exn-history` (use `-const`)
1556 *** `-show-basis-used`
1562 *** `-profile-branch`
1563 *** `-target-link-opt`
1568 ** Extended `_import` to support indirect function calls.
1571 ** Made `Date.{fromString,scan}` accept a space (treated as zero) in the first
1572 character of the day of the month.
1575 ** Fixed bug in `IntInf` that could cause a segfault.
1576 ** Remove `MLton.IntInf.size`.
1579 ** Made `-detect-overflow` and `-safe` expert options.
1582 ** Added `val MLton.share: 'a -> unit`, which maximizes sharing in a heap
1586 ** Fixed bug in `Real.toLargeInt`. It would incorrectly raise `Option`
1587 instead of `Overflow` in the case when the real was not an `INF`, but rounding
1589 ** Fixed bugs in `Date.{fmt,fromString,scan,toString}`. They incorrectly
1590 allowed a space for the first character in the day of the month.
1593 ** Changed `MLton.{Thread,Signal,World}` to distinguish between implicitly and
1594 explicitly paused threads.
1597 ** Added support for programming in the large using the ML Basis system.
1600 ** Fixed bugs in `ListPair.*Eq` functions, which incorrectly raised the
1601 `UnequalLengths` exception.
1604 ** Added `val MLton.Exn.addExnMessager: (exn -> string option) -> unit`.
1607 ** Runtime system options that take memory sizes now accept a "`g`" suffix
1608 indicating gigabytes. They also now take a real instead of an integer,
1609 e.g. `fixed-heap 0.5g`. They also now accept uppercase, e.g. `150M`.
1612 ** Added support for OpenBSD.
1615 ** Added support for FreeBSD 5.x.
1618 ** Deprecated the `-native` flag. Instead, use the new flag `-codegen
1619 {native|bytecode|C}`. This is in anticipation of adding a bytecode compiler.
1622 ** Fixed a front-end bug that could cause cascading error to print a very
1623 large and unreadable internal bug message of the form `"datatype ... realized
1624 with scheme Unknown"`.
1627 ** Automatically restart functions in the Basis Library that correspond
1628 directly to interruptable system calls.
1631 ** Added `-profile count`, for dynamic counts of function calls and branches.
1632 ** Equate the types `Posix.Signal.signal` and `Unix.signal`.
1635 ** Fixed a bug with `-basis 1997` that would cause type errors due to
1636 differences between types in the MLton structure and types in the rest of the
1640 ** Fixed a bug with sharing constraints in signatures that would sometimes
1641 mistakenly treat two structures as identical when they shouldn't have been.
1642 This would cause some programs to be mistakenly rejected.
1645 ** Added `MLton.Signal.{handled,restart}`.
1648 ** Added `Timer.checkCPUTimes`, and updated the `Timer` structure to match the
1649 latest basis spec. Also fixed `totalCPUTimer` and `totalRealTimer`, which
1653 ** Added `MLton.Signal.Mask.{getBlocked,isMember}`.
1656 ** Fix bug that mistakenly generalized variable types containing unknown types
1657 when matching against a signature.
1658 ** Reasonable front-end error message when unification causes recursive
1662 ** Fixed bug in sharing constraints so that `sharing A = B = C` means that all
1663 pairs `A = B`, `A = C`, `B = C` are shared, not just `A = B` and `B = C`.
1664 This matters in some situations.
1667 ** Fixed `Time.now` which was treating microseconds as nanoseconds.
1670 ** Fixed SSA optimizer bug that could cause the error `"<type> has no
1671 tyconInfo property"`.
1674 ** Fixed `Time.fromReal` to raise `Time`, not `Overflow`, on unrepresentable
1678 ** Added structures `Word2`, `Word3`, ..., `Word31`.
1681 ** Added structures `Int2`, `Int3`, ..., `Int31`.
1682 ** Fixed bug in elaboration of `and` with signatures, structures, and functors
1683 so that it now evaluates all right-hand sides before binding any left-hand
1689 Here are the changes from version 20030716 to 20040227.
1693 * The front end now follows the Definition of SML and produces readable error
1695 * Added support for NetBSD.
1696 * Basis library changes tracking revisions to the specification.
1697 * Added structures: `Int64`, `Real32`, `Word64`.
1698 * File positions use `Int64`.
1699 * Major improvements to `-show-basis`, which now displays the basis in a very
1700 readable way with full type information.
1701 * Command-line switch changes.
1702 ** Deprecated: `-basis`.
1703 ** Removed: `-lib-search`, `-link`, `-may-load-world`, `-static`.
1704 ** Added: `-link-opt`, `-runtime`, `-sequence-unit`, `-show-def-use`,
1705 `-stop tc`, `-warn-match`, `-warn-unused`.
1706 ** Changed: `-export-header`, `-show-basis`, `-show-basis-used`.
1707 ** Renamed: `-host` to `-target`.
1709 ** Renamed `_ffi` as `_import`.
1710 ** Added `cdecl` and `stdcall` attributes to `_import` and `_export`
1712 * MLton structure changes.
1715 ** Changed: `Finalizable`, `IntInf`, `Platform`, `Random`, `Signal`, `Word`.
1720 ** Changed `-export-header`, `-show-basis`, `-show-basis-used` to take a file
1721 name argument, and they no longer force compilation to halt.
1722 ** Added `-show-def-use` and `-warn-unused`, which deal with def-use
1726 ** Added flag `-sequence-unit`, which imposes the constraint that in the
1727 sequence expression `(e1; e2)`, `e1` must be of type `unit`.
1730 ** Lots of changes to `MLton.Signal`: name changes, removal of superfluous
1731 functions, additional functions.
1734 ** Extended `-show-basis` so that when used with an input program, it shows
1735 the basis defined by the input program.
1736 ** Added `stop` runtime argument.
1737 ** Made `-call-graph {false|true}` an option to `mlprof` that determines
1738 whether or not a call graph file is written.
1741 ** Fixed a bug in `IEEEReal.{fromString,scan}`, which would improperly return
1742 `INF` instead of `ZERO` for things like `"0.0000e123456789012345"`.
1743 ** Fixed a bug in `Real.{fromDecimal,fromString,scan}`, which didn't return an
1744 appropriately signed zero for `~0.0`.
1745 ** Fixed a bug in `Real.{toDecimal,fmt}`, which didn't correctly handle
1747 ** Report a compile-time error on unrepresentable real constants.
1750 ** Removed option `-may-load-world`. You can now use `-runtime no-load-world`
1752 ** Removed option `-static`. You can now use `-link-opt -static` instead.
1753 ** Changed `MLton.IntInf.size` to return 0 instead of 1 on small ints.
1756 ** Fixed horrible bug in `MLton.Random.alphaNumString` that caused it to
1757 return 0 for all characters beyond position 11.
1760 ** Removed `-basis` as a normal flag. It is still available as an expert
1761 flag, but its use is deprecated. It will almost certainly disappear after the
1765 ** Allow multiple `@MLton --` runtime args in sequnce. This makes it easier
1766 for scripts to prefix `@MLton` args without having to splice them with other
1770 ** Added support for files larger than 2G. This included changing
1771 `Position` from `Int32` to `Int64`.
1774 ** Added `structure MLton.Pointer`, which includes a `type t` for pointers
1775 (memory addresses, not SML heap pointers) and operations for loading from and
1779 ** Fixed `Timer.checkGCTime` so that only the GC user time is included, not GC
1783 ** Added `-warn-match` to control display nonexhaustive and redundant
1785 ** Fixed space leak in `StreamIO` causing the entire stream to be retained.
1786 Thanks to Jared Showalter for the bug report and fix.
1789 ** Added `-stop tc` switch to stop after type checking.
1792 ** Fixed `Posix.IO.getfl`, which had mistakenly called `fcntl` with `F_GETFD`
1793 instead of `F_GETFL`.
1794 ** Tracking basis library changes:
1795 *** `Socket` module datagram functions no longer return amount written,
1796 since they always write the entire amount or fail. So,
1797 `send{Arr,Vec}To{,'}` now return `unit` instead of `int`.
1798 *** Added nonblocking versions of all the send and recv functions, as well
1799 as accept and connect. So, we now have: `acceptNB`, `connectNB`,
1800 `recv{Arr,Vec}{,From}NB{,'}`, `send{Arr,Vec}{,To}NB{,'}`.
1803 ** Tracking basis library changes:
1804 *** `TextIO.inputLine` now returns a `string option`.
1805 *** Slices used in `Byte`, `PRIM_IO`, `PrimIO`, `Posix.IO`, `StreamIO`.
1806 *** `Posix.IO.readVec` raises `Size`, not `Subscript`, with negative
1810 ** Fixed `Real.toManExp` so that the mantissa is in [0.5, 1), not [1, 2). The
1811 spec says that 1.0 <= man * radix < radix, which since radix is 2, implies
1812 that the mantissa is in [0.5, 1).
1813 ** Added `Time.{from,to}Nanoseconds`.
1816 ** Added `Real.realRound`.
1817 ** Added `Char{Array,Vector}Slice` to `Text`.
1820 ** `OS.IO.poll` and `Socket.select` now raise errors on negative timeouts.
1821 ** `Time.time` is now implemented using `IntInf` instead of `Int`, which means
1822 that a much larger range of time values is representable.
1825 ** `Word64` is now there.
1828 ** Replaced `Pack32{Big,Little}` with `PackWord32{Big,Little}`.
1829 ** Fixed bug in `OS.FileSys.fullPath`, which mistakenly stopped as soon as it
1830 hit a symbolic link.
1833 ** Fixed `@MLton max-heap`, which was mistakenly ignored. Cleaned up `@MLton
1834 fixed-heap`. Both `fixed-heap` and `max-heap` can use copying or mark-compact
1838 ** `Int64` is completely there.
1839 ** Fixed `OS.FileSys.tmpName` so that it creates the file, and doesn't use
1840 `tmpnam`. This eliminates an annoying linker warning message.
1843 ** Added structures `{LargeInt,LargeReal,LargeWord,Word}{Array,Array2,ArraySlice,Vector,VectorSlice}`
1844 ** Fixed bug in `Real.toDecimal`, which return class `NORMAL` for subnormals.
1845 ** Fixed bug in `Real.toLargeInt`, which didn't return as precise an integer
1849 ** Lots of fixes to `REAL` functions.
1850 *** `Real32` is now completely in place, except for `Real32.nextAfter` on
1852 *** Fixed `Real.Math.exp` on x86 to return the right value when applied to
1853 `posInf` and `negInf`.
1854 *** Changed `Real.Math.{cos,sin,tan}` on x86 to always use a call to the C
1855 math library instead of using the x86 instruction. This eliminates some
1856 anomalies between compiling `-native false` and `-native true`.
1857 *** Change `Real.Math.pow` to handle exceptional cases in the SML code.
1858 *** Fixed `Real.signBit` on Sparcs.
1861 ** Fixed `PackReal{,64}Little` to work correctly on Sparc.
1862 ** Added `PackReal{,64}Big`, `PackReal32{Big,Little}`.
1863 ** Added `-runtime` switch, which passes arguments to the runtime via
1864 `@MLton`. These arguments are processed before command line switches.
1865 ** Eliminated MLton switch `-may-load-world`. Can use `-runtime` combined
1866 with new runtime switch `-no-load-world` to disable load world in an
1870 ** Changed `-host` to `-target`.
1871 ** Split `MLton.Platform.{arch,os}` into `MLton.Platform.{Arch,OS}.t`.
1874 ** Fixed bug in C codegen that would cause undefined references to
1875 `Real_{fetch,move,store}` when compiling on Sparcs with `-align 4`.
1878 ** Eliminated `-link` and `-lib-search`, which are no longer needed.
1879 Eliminated support for passing `-l*`, `-L*`, and `*.a` on the command line.
1880 Use `-link-opt` instead.
1883 ** Added `-link-opt`, for passing options to `gcc` when linking.
1886 ** Renamed `_ffi` as `_import`. The old `_ffi` will remain for a while, but
1887 is deprecated and should be replaced with `_import`.
1888 ** Added attributes to `_export` and `_import`. For now, the only attributes
1889 are `cdecl` and `stdcall`.
1894 Here are the changes from version 20030711 to 20030716.
1898 * Fixed several serious bugs with the 20030711 release.
1903 ** Fixed bug that caused a segfault when attempting to create an
1904 array that was too large, e.g
1906 1 + Array.sub (Array.tabulate (valOf Int.maxInt, fn i => i), 0)
1908 ** mlton now checks the command line arguments following the file to compile
1909 that are passed to the linker to make sure they are reasonable.
1912 ** Fixed packaging for Cygwin and Sparc to include `libgmp.a`.
1913 ** Eliminated bootstrap target. The `Makefile` automatically determines
1914 whether to bootstrap or not.
1915 ** Fixed XML type checker bug that could cause error: `"empty tyvars in
1919 ** Turned off `FORCE_GENERATIONAL` in gc. It had been set, which caused the
1920 gc to always use generational collection. This could seriously slow apps down
1926 Here are the changes from version 20030312 to 20030711.
1930 * Added support for Sparc/SunOS using the C code generator.
1931 * Completed the basis library implementation. At this point, the only missing
1932 basis library function is `use`.
1933 * Added `_export`, which allows one to call SML functions from C.
1934 * Added weak pointers (via `MLton.Weak`) and finalization (via
1935 `MLton.Finalizable`).
1936 * Added new integer modules: `Int8`, `Int16`.
1937 * Better profiling call graphs
1938 * Fixed conversions between reals and their decimal representations to be
1939 correct using the gdtoa library.
1944 ** Profiling improvements:
1945 *** Eliminated `mlton -profile-split`. Added `mlprof -split`. Now the
1946 profiling infrastructure keeps track of the splits and allows one to decide
1947 which splits to make (if any) when `mlprof` is run, which is much better
1948 than having to decide at compile time.
1949 *** Changed `mlprof -graph` to `mlprof -keep`, and changed the behavior so
1950 that `-keep` also controls which functions are displayed in the table.
1951 *** Eliminated `mlprof -ignore`: it's behavior is now subsumed by `-keep`,
1952 whose meaning has changed to be more like -ignore on nodes that are not
1954 ** When calling `gcc` for linking, put `-link` args in same order as they
1955 appeared on the MLton command line (they used to be reversed).
1958 ** Making `OS.Process.{atExit,exit}` conform to the basis library spec in that
1959 exceptions raised during cleaners are caught and ignored. Also, calls to
1960 `exit` from cleaners cause the rest of cleaners to run.
1963 ** Fixed bug with negative `IntInf` constants that could cause compile time
1964 error message: `"x86Translate.translateChunk ... strange Offset: base: ..."`
1965 ** Changed argument type of `MLton.IntInf.Small` from `word` to `int`.
1966 ** Added fix to profiling so that the `mlmon.out` file is written even when
1967 the program terminates due to running out of memory.
1970 ** Added `{Int{8,16},Word8}{,Array,ArraySlice,Vector,VectorSlice,Array2}`
1974 ** Fixed bug in `IntInf.sign`, which returned the wrong value for zero.
1977 ** Added `_export`, for calling from C to SML.
1980 ** Regularization of options:
1981 *** `-diag` --> `-diag-pass`
1982 *** `-drop-pass` takes a regexp
1985 ** Fixed bug in `OS.IO.poll` that caused it to return the input event types
1986 polled for instead of what was actually available.
1989 ** Fixed bug in KnownCase SSA optimization that could case incorrect results
1990 in compiled programs.
1993 ** Fixed bug in SSA optimizer that could cause the error message:
1995 Type error: Type.equals
1996 {from = char vector, to = unit vector}
1997 Type error: analyze raised exception loopStatement: ...
1998 unhandled exception: TypeError
2001 ** Fixed `Real.rem` to work correctly on `inf`-s and `nan`-s.
2002 ** Fixed bug in profiling that caused the function name to be omitted on
2003 functions defined by `val rec`.
2006 ** `Fixed Real.{fmt,fromString,scan,toString}` to match the basis library
2008 ** Added `IEEEReal.{fromString,scan}`.
2009 ** Added `Real.{from,to}Decimal`.
2012 ** Added `Real.nextAfter`.
2013 ** Added `OS.Path.{from,to}UnixPath`, which are the identity function on Unix.
2016 ** Added type `MLton.pointer`, the type of C pointers, for use with the FFI.
2019 ** Fixed two bugs in type inference that could cause the compiler to raise the
2020 `TypeError` exception, along with a lot of XML IL. The `type-check.sml`
2021 regression contains simple examples of what failed.
2022 ** Fixed a bug in the simplifier that could cause the message: `"shrinker
2023 raised Prim.apply raised assertion failure: SmallIntInf.fromWord"`.
2026 ** Fixed bug in `Real.class` introduced on 04-28 that cause many regression
2027 failures with reals when using newer `gcc`-s.
2028 ** Replaced `MLton.Finalize` with `MLton.Finalizable`, which has a more robust
2029 approach to finalization.
2032 ** Fixed bug in `MLton.FFI` on Cygwin that caused `Thread_returnToC` to be
2036 ** Added support for finalization with `MLton.Finalize`.
2039 ** Fixed a runtime system bug that could cause a segfault. This bug would
2040 happen after a GC during heap resizing when copying a heap, if the heap was
2041 allocated at a very low (<10M) address. The bug actually showed up on a
2045 ** Fixed bug in `HashType` that raised `"Vector.forall2"` when the arity of a
2046 type constructor is changed by `SimplifyTypes`, but a newly constructed type
2047 has the same hash value.
2050 ** Switched over to new layered IO implementation, which completes the
2051 implementation of the `BinIO` and `TextIO` modules.
2054 ** Fixed bug that caused an assertion failure when generating a jump table for
2055 a case dispatch on a non-word sized index with non-zero lower bound on the
2059 ** Added `-align {4|8}`, which controls alignment of objects. With `-align
2060 8`, memory accesses to doubles are guaranteed to be aligned mod 8, and so
2061 don't need special routines to load or store.
2064 ** Fixed bug that caused a total failure of time profiling with `-native
2065 false`. The bug was introduced with the C codegen improvements that split the
2066 C into multiple files. Now, the C codegen declares all profile labels used in
2067 each file so that they are global symbols.
2070 ** Added `MLton.Weak`, which supports weak pointers.
2073 ** Replaced the basis library's `MLton.hostType` with `MLton.Platform.arch`
2074 and `MLton.Platform.os`.
2077 ** Added support for SPARC/SunOS using the C codegen.
2080 ** Added `MLton.FFI`, which allows callbacks to SML from C.
2083 ** Fixed `mlprof` so that the default `-graph arg` for data from
2084 `-profile-stack true` is `(thresh-stack x)`, not `(thresh x)`.
2089 Here are the changes from version 20020923 to 20030312.
2093 * Added source-level profiling of both time and allocation.
2094 * Updated basis library to 2002 specification. To obtain the old
2095 library, compile with `-basis 1997`.
2096 * Added many modules to basis library:
2097 ** `BinPrimIO`, `GenericSock`, `ImperativeIO`, `INetSock`, `NetHostDB`,
2098 `NetProtDB`, `NetServDB`, `Socket`, `StreamIO`, `TextPrimIO`, `UnixSock`.
2099 * Completed implementation of `IntInf` and `OS.IO`.
2104 ** Replaced `-profile-combine` wih `-profile-split`.
2107 ** Regularization of options:
2108 *** `-l` --> `-link`
2109 *** `-L` --> `-lib-search`
2110 *** `-o` --> `-output`
2111 *** `-v` --> `-verbose`
2114 ** Added option to `mlton`: `-profile-combine {false|true}`
2117 ** Added options to `mlprof`: `-graph-title`, `-gray`, `-ignore`, `-mlmon`,
2121 ** Added source-level allocation and time profiling. This includes the new
2122 options to mlton: `-profile` and `-profile-stack`.
2125 ** Added `NetHostDB`, `NetProtDB`, `NetServDB` structures.
2126 ** Added `Socket`, `GenericSock`, `INetSock`, `UnixSock` structures.
2129 ** Fixed bug in signal check insertion that could cause some signals to be
2130 missed. The fix was to add a signal check on entry to each function in
2131 addition to at each loop header.
2134 ** Fixed bug in runtime that might cause the message `"Unable to set
2135 cardMapForMutator"`.
2138 ** Added support for the latest Basis Library specification.
2139 ** Added option `-basis` to choose Basis Library version. Currently available
2140 basis libraries are `2002`, `2002-strict`, `1997`, and `none`.
2141 ** Added `IntInf.{orb,xorb,andb,notb,<<,~>>}` values.
2142 ** Added `OS.IO.{poll_desc,poll_info}` types.
2143 ** Added `OS.IO.{pollDesc,pollToIODesc,infoToPollDesc,Poll}` values.
2144 ** Added `OS.IO.{pollIn,pollOut,pollPri,poll,isIn,isOut,isPri}` values.
2145 ** Added `BinPrimIO`, `TextPrimIO` structures.
2146 ** Added `StreamIO`, `ImperativeIO` functors.
2149 ** Fixed bug that caused time profiling to fail (with a segfault) when
2150 resuming a saved world.
2153 ** Fixed bug in `MLton.eq` that could arise when using `eq` on functions.
2156 ** Improvements to polymorphic equality. Equality on IntInfs, vectors, and
2157 dataypes all do an `eq` test first before a more expensive comparison.
2160 ** Added allocation profiling. Now, can compile with either `-profile alloc`
2161 or `-profile time`. Renamed `MLton.Profile` as `MLton.ProfileTime`. Added
2162 `MLton.ProfileAlloc`. Cleaned up and changed most `mlprof` option names.
2165 ** Eliminated `MLton.debug`.
2166 ** Fixed bug in the optimizer that affected `IntInf.fmt`. The optimizer had
2167 been always using base 10, instead of the passed in radix.
2170 ** Fixed `Real.toManExp` so that the mantissa is in [1, 2), not [0.5, 1).
2171 ** Added `Real.fromLargeInt`, `Real.toLargeInt`.
2172 ** Fixed `Real.split`, which would return an incorrect whole part due to the
2173 underlying primitive, `Real_modf`, being treated as functional instead of
2177 ** Fixed `rpath` problem with packaging. All executables in packages
2178 previously made had included a setting for `RPATH`.
2183 Here are the changes from version 20020410 to 20020923.
2187 * MLton now runs on FreeBSD.
2188 * Major runtime system improvements. The runtime now implements mark-compact
2189 and generational collection, in addition to the copying collection that was
2190 there before. It automatically switches between the the collection strategies
2191 to improve performance and to try to avoid paging.
2192 * Performance when compiling `-exn-history true` has been improved.
2193 * Added `IntInf.log2`, `MLton.GC.pack`, `MLton.GC.unpack`.
2194 * Fixed bug in load world that could cause "sread failed" on Cygwin.
2195 * Fixed optimizer bug that could cause `"no analyze var value property"`
2201 ** Integrated Sam Rushing's changes to port MLton to FreeBSD.
2204 ** Changed the implementation of exception history to be completely
2205 functional. Now, the extra field in exceptions (when compiling `-exn-history
2206 true`) is a `string list` instead of a `string list ref`, and `raise` conses a
2207 new exception with a new element in the list instead of assigning to the list.
2208 This changes the semantics of exception history (for the better) on some
2209 programs. See `regression/exnHistory3.sml` for an example. It also
2210 significantly improves performance when compiling `-exn-history true`.
2212 * 2002-07 and 2002-08
2213 ** Added generational GC, and code to the runtime that automatically turns it
2217 ** Fixed SSA optimizer bug that could cause the following error message: `"x_0
2218 has no analyze var value property"`
2221 ** Added `MLton.GC.{pack,unpack}`. `pack` shrinks the heap so that other
2222 processes can use the RAM, and its dual, `unpack`, resizes the heap to the
2225 * 2002-06 and 2002-07
2226 ** Added mark compact GC.
2227 ** Changed array layout so that arrays have three, not two header words. The
2228 new word is a counter word that preceeds the array length and header.
2229 ** Changed all header words to be indices into an array of object descriptors.
2232 ** Added patches from Michael Neumann to port runtime to FreeBSD 4.5.
2235 ** Output file and intermediate file are now saved in the current directory
2236 instead of in the directory containing the input file.
2239 ** Fixed bug in overloading of `/` so that the following now type checks:
2241 fun f (x, y) = x + y / y
2244 ** Added back `max-heap` runtime option.
2247 ** Fixed load/save world so that they use binary mode. This should fix the
2248 `sread failed` problem that Byron Hale saw on Cygwin that caused `mlton` to
2250 ** Added `IntInf.log2`.
2251 ** Changed call to linker to use `libgmp.a` (if it exists) instead of
2252 `libgmp.so`. This is because the linker adds a dependency to a shared library
2253 even if there are no references to it
2256 ** Rewrote heap resizing code. This fixed bug that was triggered with large
2257 heaps and could cause a spurious out of memory error.
2258 ** Removed GnuMP from MLton sources (again :-).
2263 Here are the changes from version 20011006 to version 20020410.
2271 ** Regularization of options
2272 *** `-g` --> `-degug {false|true}`
2273 *** `-h n` --> `-fixed-heap n`
2274 *** `-p` --> `-profile {false|true}`
2277 ** Set up the stubs so that MLton can be compiled in the standard basis
2278 library, with no `MLton` structure. Thus it is now easy to compile MLton with
2279 an older (or newer) version of itself that has a different `MLton` structure.
2282 ** Added `MLton.Process.{spawn,spawne,spawnp}`, which use primitives when
2283 running on Cygwin and fork/exec when running on Linux.
2286 ** Added the ability to cross-compile to Cygwin/Windows.
2289 ** Added GnuMP back for use with Cygwin.
2292 ** Reworked object header words so that `Array.maxLen = valOf Int.maxInt`.
2293 Also fixed a long-standing minor bug in MLton, where `Array.array
2294 (Array.maxLen, ...)` would raise `Size` instead of attempting to allocate the
2295 array. It was an off-by-one error in the meaning of `Array.maxLen`.
2298 ** Modifications to runtime to behave better in situations where the amount of
2299 live data is a signifant fraction of the amount of RAM, based on code from
2300 PolySpace. MLton executables by default can now use more than the available
2301 amount of RAM. Executables will still respect the `max-heap` runtime arg if
2305 ** Improvements to runtime so that it fails to get space, it attempts to get
2306 less space instead of failing. Based on PolySpace's modifications.
2307 ** Added `MLton.eq`.
2310 ** Added `MLton.IntInf.gcd`.
2311 ** Removed GnuMP from MLton sources. We now link with `/usr/lib/libgmp.a`.
2312 ** Added `TextIO.getPosOut`.
2313 ** Renamed type `MLton.Itimer.which` to `MLton.Itimer.t` and
2314 `MLton.Itimer.whichSignal` to `MLton.Itimer.signal`.
2315 ** Added `-coalesce` flag, for use with the C backend.
2318 ** Added `-show-basis-used`, which prints out the parts of the basis library
2319 that the input program uses.
2320 ** Changed several other flags (`-print-at-fun-entry`, `-show-basis`,
2321 `-static`) to follow the `{false|true}` convention.
2324 ** Improved `MLton.profile` so that multiple profile arrays can exist
2325 simultaneously and so that the current one being used can be set from the SML
2329 ** The Machine IL has been replaced with an RSSA (representation explicit SSA)
2330 IL and an improved Machine IL.
2333 ** Added KnownCase SSA optimization
2336 ** Added rudimentary profiling control from with a MLton compile program via
2337 the `MLton.Profile` structure.
2340 ** Fixed bug in match compiler that caused case expressions on datatypes with
2341 redundant cases to be compiled incorrectly.
2344 ** Added redundant tuple construction elimination to SSA shrinker.
2345 ** Improved Flatten SSA optimization.
2348 ** Changed the interface for `MLton.Signal`. There is no longer a separate
2349 `Handler` substructure. This was done so that programs that just use
2350 `default` and `ignore` signal handlers don't bring in the entire thread
2354 ** Added LocalRef elimination SSA optimization.
2357 ** The CPS IL has been replaced with an SSA (static-single assignment) IL.
2358 All of the optimizations have been ported from CPS to SSA.
2361 ** Fixed bug in `Thread_atomicEnd` -- `limit` was mistakenly set to `base`
2362 instead of to 0. This caused assertion failures when for executables compiled
2363 `-g` because `GC_enter` didn't reset `limit`.
2364 ** Fixed bug in register allocation of byte registers.
2367 ** Added `-D` option to `cmcat` for preprocessor defines. Thanks to Anoq for
2369 ** Changed limit check insertion so that limit checks are only coalesced
2370 within a single basic block -- not across blocks. This slows many benchmarks
2371 down, but is needed to fix a bug in the way that limit checks were coalesced
2372 across blocks. Hopefully we will figure out a better fix soon.
2375 ** Fixed type inference of flexrecord so that it now follows the Definition.
2376 Many programs containing flexrecords were incorrectly rejected. Added many
2377 new tests to regression/flexrecord.sml.
2378 ** Changed the behavior of `-keep dot` combined with `-keep pass` for SSA
2379 passes. Dot files are now saved for the program before and after, instead of
2383 ** Fixed a bug in the type inference that caused type variables to be
2384 mistakenly generalized. The bug was exposed in Norman Ramsey's `sled.sml`.
2385 Added a test to `regression/flexrecord.sml` to catch the problem.
2390 Here are the changes from version 20010806 to version 20011006.
2394 * Added `MLton.Exn.history`, which is similar to `SMLofNJ.exnHistory`.
2395 * Support for `#line` directives of the form `(*#line line.col "file"*)`.
2396 * Performance improvements in native codegenerator.
2397 * Bug fixes in front-end, optimizer, register allocator,
2398 `Real.{maxFinite,minPos,toManExp}`, and in heap save and restore.
2403 ** Fixed a bug in polymorphic layered patterns, like
2407 These would always fail due to the variable `a` not being handled correctly.
2408 ** Fixed the syntax of `val rec` so that a pattern is allowed on the left-hand
2409 side of the `=`. Thus, we used to reject, but now accept, the following.
2411 val rec a as b as c = fn _ => ()
2412 val rec a : unit -> unit : unit -> unit = fn () => ()
2414 Thanks again to Andreas Rossberg's test files. This is now tested for in
2416 ** Fixed dynamic semantics of `val rec` so that if `val rec` is used to
2417 override constructor status, then at run time, the `Bind` exception is raised
2418 as per rule 126 of the Definition. So, for example, the following program
2419 type checks and compiles, but raises `Bind` at run time.
2421 val rec NONE = fn () => ()
2424 Again, this is checked in `valrec.sml`.
2425 ** Added `\r\n` to ml.lex so that Windows style newlines are acceptable in
2429 ** Fixed bug in the implementation of `open` declarations, which in the case
2430 of `open A B` had opened `A` and then looked up `B` in the resulting
2431 environment. The correct behaviour (see rule 22 of the Definition) is to
2432 lookup each _longstrid_ in the current environment, and then open them all in
2433 sequence. This is now checked for in the `open.sml` regression test. Thanks
2434 to Andreas Rossberg for pointing this bug out.
2435 ** Fixed bug that caused tyvars of length 1 (i.e. `'`) to be rejected. This
2436 is now checked in the `id.sml` regression test. Again, thanks to Andreas
2437 Rossberg for the test.
2440 ** Fixed bugs in `Real.toManExp` (which always returned the wrong result
2441 because the call to `frexp` was not treated as side-effecting by the
2442 optimizer) and in `Real.minPos`, which was zero because of a mistake with
2443 extra precision bits.
2446 ** Added `MLton.Exn.history`.
2447 ** Fixed register allocation bug with `fucom` instruction. Was allowing
2448 `fucomp` when the first source was not removable.
2449 ** Changed `Real.isFinite` to use the C `math.h` `finite` function. This
2450 fixed the nontermination bug which occurred in any program that used
2454 ** Bug fixes found from Ramsey's `lrtl` in `contify.fun` and
2455 `unused-args.fun`, both of which caused compile-time exceptions to be raised.
2458 ** Fixed `MLton.World.{load,save}` so that the saved world does not store the
2459 max heap size. Instead, the max heap size is computed upon load world in
2460 exactly the same way as at program startup. This fixes a long-standing (but
2461 only recently noticed) problem in which `mlton` (which uses a saved world)
2462 would attempt to use as much memory as was on the machine used to build
2466 ** Overlow checking is now on by default in the C backend. This is a huge
2467 performance hit, but who cares, since we never use the C backend except for
2471 ** Added support for #line directives of the form
2473 (*#line line.col "file"*)
2475 These directives only affect error messages produced by the parser and
2479 ** Fixed bug in RemoveUnused optimzation that caused the following program to
2482 fun f l = case l of [] => f l | _ :: l => f l
2486 ** New x86-codegen infrastructure.
2487 *** support for tracking liveness of stack slots and carrying them in
2488 registers across basic blocks
2489 *** more specific `Entry` and `Transfer` datatypes to make calling convention
2490 distinctions more explicit
2491 *** new heuristic for carrying values in registers across basic blocks (look
2493 *** new "predict" model for generating register allocation hints
2494 *** additional bug fixes
2497 ** `MLton.Socket.shutdownWrite` flushes the outstream.
2502 Here are the changes from version 20010706 to version 20010806.
2506 * `Word.andb (w, 0xFF)` now works correctly
2507 * `MLton.Rusage.rusage` has a patch to work around a linux kernel bug
2508 * Programs of the form `_exp_ ; _program_` are now accepted
2509 * Added the `MLton.Rlimit` structure
2510 * Added the `-keep dot` flag, which produces call graphs, intraprocedural
2511 control-flow graphs, and dominator trees
2516 ** Added simple CommonBlock elimination CPS optimization.
2519 ** Took out `-keep il`.
2522 ** Performance improvements to `TextIO.{input, output, output1}`.
2525 ** Added RedundantTest elimination CPS optimization.
2528 ** Added CommonSubexp elimination CPS optimization.
2531 ** Bug fix to x86 codegen. The `commuteBinALMD` peephole optimization would
2532 rewrite `mov 2,Y; add Y,Y` as `mov Y,Y; add 2,Y`. Now the appropriate
2533 interference checks are made.
2534 ** Added intraprocedural unused argument removal.
2535 ** Added intraprocedural flattener. This avoids some stupid tuple allocations
2536 in loops. Decent speedup on a few benchmarks (`count-graphs`, `psdes-random`,
2537 `wc-scanStream`) and no noticeable slowdowns.
2538 ** Added `-keep dot` flag.
2541 ** Modified grammar to properly handle `val rec`. There were several problems.
2542 *** MLton had accepted `val rec 'a ...` instead of `val 'a rec ...`
2543 *** MLton had not accepted `val x = 13 and rec f = fn () => ()`
2544 *** MLton had not accepted `val rec rec f = fn () => ()`
2545 *** MLton had not accepted `val rec f = fn () => () and rec g = fn () => ()`
2548 ** Workaround for Linux kernel bug that can cause `getrusage` to return a wrong
2549 system time value (low by one second). See `fixedGetrusage` in `gc.c`.
2550 ** Bug fix to x86 codegen. The register allocator could get confused when
2551 doing comparisons of floating point numbers and use the wrong operand. The
2552 bug seems to have never been detected because it only happens when both of the
2553 operands are already on the floating point stack, which is rare, since one is
2554 almost always in memory since we don't carry floating point values in the
2555 stack across basic blocks.
2556 ** Added production to the grammar on page 58 of the Definition that had been
2557 missing from MLton since day one.
2559 program ::= exp ; <program>
2561 Also updated docs to reflect change.
2562 ** Modified grammar to accept the empty program.
2563 ** Added `-type-check` expert flag to turn on type checking in ILs.
2566 ** Bug fix to the algebraic simplifier. It had been rewriting
2567 `Word32.andb (w, 0wxFF)` to `w` instead of
2568 `Word32.andb (w, 0wxFFFFFFFF)` to `w`.
2571 ** Improved CPS shrinker so that `if`-tests where the `then` and `else` branch
2572 jump to the same label is turned into a direct jump.
2573 ** Improved CPS shrinker (`Prim.apply`) to handle constructors
2574 *** `A = A` --> `true`
2575 *** `A = B` --> `false`
2576 *** `A x` = `B y` --> `false`
2577 ** Rewrote a lot of loops in the basis library to use inequalities instead of
2578 equality for the loop termination test so that the (forthcoming) overflow
2579 detection elimination will work on the loop index variable.
2582 ** Fixed minor bugs in `Array2.{array,tabulate}`, `Substring.{slice}` that
2583 caused the `Overflow` exception to be raised instead of `Size` or `Subscript`
2584 ** Fixed bug in `Pack32Big.update` that caused the wrong location to be updated.
2585 ** Fixed several bugs in `Pack32{Big,Little}.{subArr,subVec,update}` that
2586 caused `Overflow` to be raised instead of `Subscript`. Also, improved the
2587 implementation so that bounds checking only occurs once per call (instead of
2588 four times, which was sometimes happening.
2589 ** Fixed bugs in `Time.{toMilliseconds,toMicroseconds}` that could cause a
2590 spurious `Overflow` exception.
2591 ** Fixed bugs in `Time.{fromMilliseconds,fromMicroseconds}` that could cause a
2592 spurious `Time` exception.
2593 ** Improved `Pack32.sub*` by reordering the `orb`-s.
2594 ** Improved `{Int,IntInf}.mod` to increase chances of constant folding.
2595 ** Switched many uses of `+`, `-`, `*` in basis library to the non-overflow
2596 checked versions. Modules changed were: `Array`, `Array2`, `Byte`, `Char`,
2597 `Int`, `IntInf`, `List`, `Pack32{Big,Little}`, `Util`, `String`, `StringCvt`,
2598 `Substring`, `TextIO`, `Time`, `Vector`.
2599 ** Added regression tests for `Array2`, `Int` (overflow checking), `Pack32`,
2600 `Substring`, `Time`.
2601 ** Changed CPS output so that it includes a dot graph for each CPS function.
2604 ** Change `OS.Process.exit` so that it raises an exception if the exit status
2606 ** Added `MLton.Rlimit` to provide access to `getrlimit` and `setrlimit`.
2611 Here are the changes from the 20000906 version to the 20010706 version.
2615 * Native X86 code generator (instead of using `gcc`)
2616 * Significantly improved compile times
2617 * Significantly improved run times for generated executables
2619 * Correct raising of the `Overflow` exception for integer arithmetic
2620 * New modules in the `MLton` structure
2625 ** GC mods from Henry. Mostly adding `inline` declarations.
2628 ** Fixed several runtime bugs involving threads, critical sections, and
2632 ** Fixed performance bug in `cps/two-point-lattice.fun` that caused quadratic
2633 behavior. This affects the raise-to-jump and useless analayses. In
2634 particular, the useless analysis was blowing up when compiling `fxp`.
2637 ** Henry improved `wordAlign` -- this sped up GC by 27% (during a self
2641 ** Moved `MLton.random` to `MLton.Random.rand` and added other stuff to
2643 ** Added `MLton.TextIO.mkstemp`.
2644 ** Made `Int.{div,quot}` respect the `-detect-overflow` switch.
2647 ** Added `MLton.Syslog`.
2650 ** Fixed bug in `MLton.Socket.accept` that was in the runtime implementation
2651 `Socket_accept`. It did a `setsockopt SO_REUSEADDR` after the `accept`. It
2652 should have been after the call to `socket` in `Socket_listen`. Thanks to
2653 Doug Bagley for the fix.
2656 ** Fixed bug in remove-unused that caused polymorphic equality to return
2657 `true` sometimes when constructors were never used in a pattern match. For
2658 example, the following (in which `A` and `B` are not used as patterns):
2662 val _ = if C A = C B then raise Fail "bug" else ()
2665 ** Fixed bug that caused all of the following to fail:
2666 `{LargeWord,Word,SysWord}.{toLargeInt,toLargeIntX,fromLargeInt}` The problem
2667 was the basis library file `integer/patch.sml` which fixed `Word32` but not
2668 the other structures that are the same.
2671 ** Fixed bug in match compiler that caused it to spend a lot of extra time in
2672 deep patterns. It still could be exponential however. Hopefully this will
2673 get fixed in the release after next. This bug could cause very slow compile
2674 times in some cases. Anyways, this fix cut the `finish infer` time of a self
2675 compile down from 22 to under 4 seconds. I.E. most of the time used to be
2676 spent due to this bug.
2679 ** Fixed bug in frontend that caused the wrong file and line number to be
2680 reported with errors in functor bodys.
2682 * 2001-01-03 - 2000-02-05
2683 ** Changes to CoreML, XML, SXML, and CPS ILs to replace lists by vectors in
2684 order to decrease space usage.
2687 ** Fixed a bug in constant propagation where the length of vectors was not
2688 propagated properly.
2690 * 2000-12-11 - 2001-01-03
2691 ** Major rewrite of elaborator to use a single hash table for each namespace
2692 instead of a hash table for every environment.
2695 ** Fixed some bugs in the SML/NJ compatibility library,
2696 `src/lib/mlton-subs-in-smlnj`.
2699 ** More careful removal of tracing code when compiling `MLton_debug=0`. This
2700 cut down self compile data size by 100k and compile time by a few seconds.
2701 ** Added built in character and word cases propagated throughout all ILs.
2704 ** Added max stack size information to `gc-summary`.
2707 ** Added `src/benchmark`, which contains an SML program that benchmarks all of
2708 the SML compilers I have my hands on. The script has lots of hardwired paths
2712 ** Fixed bug in `Posix.ProcEnv.environ,` which did not work correctly in a
2713 saved world (the original `environ` was saved). In fact, it did not work at
2714 all because the ML primitive expected a constant and the C was a nullary
2715 function. This caused a segfault with any program using
2716 `Posix.ProcEnv.environ`.
2717 ** `Added MLton.ProcEnv.setenv`, since there doesn't seem to be any `setenv`
2718 in the basis library.
2721 ** Changed backend so that it should no longer generate machine programs with
2723 ** Added `-detect-overflow` and `-safe` flags.
2725 * 2000-11-27 - 2000-11-28
2726 ** Changes in many places to use `List.revMap` instead of `List.map` to cut
2730 ** Added `MLton.Word.~` and `MLton.Word8.~` to the `MLton` structure.
2733 ** Fixed a bug in the CPS shrinker that could cause a compile-time failure.
2734 It was maintaining occurrence counts incorrectly.
2737 ** Fixed a (performance) bug in constant propagation that caused the hashing
2739 ** Improved translation to XML so that the match compiler isn't called on
2740 tuple or if expressions. This should speed up the translation and make the
2742 ** Fixed a bug in the match compiler that caused it to not generate integer
2743 case statements. This should speed up the mlyacc benchmark and the MLton
2747 ** Added `IntInf_equal` and `IntInf_compare` primitives.
2748 ** Took out the automatic `-keep c` when compiling `-g`.
2751 ** Added a whole bunch of algebraic laws to the CPS shrinker, including some
2752 specifically targeted to `IntInf` primitives.
2755 ** Improved implementation of properties so that sets don't allocate.
2756 ** Improved implementation of type homomorphism in type inference. What was
2757 there before appears to have been a bug -- it didn't use the property on
2761 ** Fixed timers used with `-v` option to use user + sys time.
2764 ** Split the runtime basis library C files into many separate files so that
2765 only the needed code would be included by the linker.
2766 ** Fixed several bugs in the front end grammar and elaborator that caused type
2767 specifications to be handled incorrectly. The following three programs used
2768 to be handled incorrectly, but are now handled correctly.
2770 signature S = sig type t and u = int end (* reject *)
2771 signature S = sig type t = int and u = t end (* accept *)
2772 signature S = sig eqtype t and u = int end (* reject *)
2775 ** Changes to `main.sml` to run complete compiles with `-native` switch.
2778 ** Removed defunctorizer.
2781 ** Fixed bug in `cps-tree.fun` with `PrimExp.maySideEffect`. This bug could
2782 cause `"no operand"` failures in the backend.
2783 ** Fixed bug in the runtime implementation of `MLton.size`. The size for
2784 stack objects was using the `used` instead of `reserved`, and so was too low.
2787 ** Replaced automatically generated dependencies in `src/runtime/Makefile`
2788 with hand generated ones. Took out `make depend` from `src/Makefile`. `make
2789 depend` was behaving really badly on RHAT 7.0.
2790 ** Tweaked compiler to shorten width of C output lines to work around bug in
2791 RHAT 7.0 `cpp` which silently truncates (very) long lines.
2792 ** Fixed bug in grammar that didn't allow `op` to occur in datatype and
2793 exception bindings, causing the following to fail
2796 exception op E = op Fail
2798 ** Improved error messages in CM processor. Fixed bug in CM Alias handling.
2801 ** Fixed two bugs in the gc that did comparisons with `(s->limit -
2802 s->frontier)`, which of course doesn't work if `frontier` is beyond `limit`,
2803 since these are unsigned. This could have caused segfaults, except that the
2804 mutator checks the `frontier` upon return from the GC.
2807 ** Fixed bug in backend in the calculation of `maxFrameSize`. It could be
2808 wrong (low) in some situations.
2809 ** Improved CPS inliner's estimate of function sizes. The size of a function
2810 now takes into account other inlined functions that the function calls. This
2811 also changed the meaning of the size argument to the `-inline` switch. It now
2812 corresponds (roughly) to the product of the size of the function and the
2813 number of calls. In general, it should be larger than before.
2816 ** Made some calls to `Array.sub` unsafe in the implementation of `Array2`.
2817 ** Integrated Matthew's new x86 backend with floating point support.
2820 ** Fixed CM file processor so that MLton works if it is run from a different
2821 directory than the main CM file.
2824 ** Changed LimitCheck so it loops on the `frontier > limit` check. This fixed
2825 a potential bug in threads caused when there is enough space available for a
2826 thread, `t`, before switching to another thread but not enough space when it
2827 resumes. This could have caused a segfault.
2830 ** More rewrites of `TextIO.StreamIO` to improve speed.
2831 ** Changed `TextIO` so that only `TextIO.stdErr` is unbuffered.
2832 ** Changed `TextIO` so that FIFOs and sockets are buffered.
2835 ** Combined remove-unused-constructors, remove-unused-functions, and
2836 remove-unused-globals into a single pass that runs to fixed-point and produces
2837 results at least as good as running the previous three in (any) sequence.
2840 ** Added `GC_FIRST_CHECK`, which does a gc at each limit check the first time
2842 ** Reimplemented `TextIO.StreamIO` (from 2000-09-12) to use lists of strings
2843 instead of lists of characters so that the per char space overhead is small.
2846 ** Fixed bug in profiling labels in C code. The label was always the basic
2847 block label instead of the cps function label.
2848 ** Added `-b` switch to `mlprof` to gather data at the basic block level.
2849 ** Improved performance of `TextIO.input1` by about 3X.
2851 * 2000-09-15 - 2000-09-19
2852 ** Added overflow exceptions to CPS and Machine ILs.
2855 ** Fixed `TextIO.scanStream`. It was very broken.
2856 ** Added `TextIO.{getInstream,mkInstream,setInstream}` and
2857 `TextIO.StreamIO.{canInput,closeIn,endOfStream,input1,input,inputAll,inputLine,inputN}`.
2860 ** Fixed `Real_qequal` in `mlton-lib.h`. It was missing a paren that caused
2861 code using it to not even compile. It was also semantically incorrect.
2862 ** Noted that `Real_{equal,lt,le,gt,ge}` may not follow basis library spec,
2863 since ANSI does not require IEEE compliance, and hence these could return
2864 wrong results when nans are involved.
2869 Here are the changes from the 20000712 version to the 20000906 version.
2873 * Version 20000906 is mostly a bugfix release over 20000712. The other major
2874 changes are that `mllex` and `mlyacc` are now included and that `mlton` can now
2875 process a limited subset of CM files as input.
2880 ** Fixed `Socket_listen` in `mlton-lib.c` so that it closes the socket if the
2881 `bind`, `listen`, or `getsockname` fails. This could have caused a file
2885 ** Added `-static` commandline switch.
2886 ** Changed default max heap size to .85 RAM from .95 RAM.
2887 ** Added `PackRealLittle` structure to basis library.
2890 ** Added cases on integers to ILs (instead of using sequences of tests) so
2891 that backend can emit more efficient test (jump table, binary tree, ...).
2894 ** Fixed bug in `gc.c`. `dfsInitializeStack` would `smummap` a `NULL` pointer
2895 whenver `toSpace` was `NULL`. This could cause `MLton.size` to segfault.
2896 ** Fixed bug in `Popt` that caused `-k` to fail with no keeps.
2898 * 2000-08-22 - 2000-08-23
2899 ** Ported `mllex` and `mlyacc` from SML/NJ
2901 * 2000-08-20 - 2000-08-21
2902 ** Added ability to use a `.cm` file as input to MLton.
2905 ** Ported `mlprof` to SML.
2906 ** Fixed bug in `library/basic/assert.sml` that caused asserts to be run even
2907 when `MLton.debug = false`.
2910 ** Fixed bug in backend -- computation of `maxFrameSize` was wrong. It didn't
2911 count slots in frames that didn't make nontail calls. This could lead to the
2912 stack being overwritten because a stack limit check didn't guarantee enough
2913 space, and lead to a segfault.
2914 ** Fixed bug in `gc.c` `newThreadOfSize`. If the thread allocation caused a
2915 gc, then the stack wasn't forwarded, leading to a segfault. The solution was
2916 to ensure enough memory all at once, and then fill in both objects.
2919 ** Changed limit checks so that checks < 512 bytes are replaced by a check for
2920 0 bytes. The runtime also moves the limit down by 512. This is done so that
2921 the common case, a small limit check, has less code and is faster.
2922 ** Fixed bug in `cps/cps-tree.fun`. `Program.hasPrim` returned `true` for any
2923 program that had *any* primapp, not just programs satisfying the predicate.
2924 This caused `cps/once.fun` to be overly conservative, since it thought that
2925 every program used continuations.
2928 ** Fixed bug in CPS typechecker. It didn't enforce that handlers should be
2929 defined before any reference to them -- including implicit references in
2930 `HandlerPops`. This caused an evil bug in the liveness analysis where a
2931 variable that was only live in the handler was missed in a continuation
2932 because the liveness for the handler wasn't computed yet.
2933 ** Limited the size for moving up limit checks for arrays whose size is known
2934 at compile time to avoid huge limit checks getting moved into loops.
2935 ** added `-indent`, `-kp`, `-show-types` switches.
2936 ** Put optimization in CPS IL suggested by Neal Glew. It determines for each
2937 toplevel function if it can raise an exception to its caller. Also, it
2938 removes `HanderPush` and `HandlerPop` for handlers that are not on top of the
2939 stack for any nontail call.
2942 ** Changed register allocator so that continuation formals can be allocated in
2943 pseudo registers -- they aren't necessarily forced to the stack.
2946 ** Fixed bug in constant folding. `Word8.>>` had been used to implement
2948 ** Fixed bug in allocate registers that was not forcing the size argument to
2949 `Primitive.Array.array` to be a stack slot. This could cause problems if
2950 there was a thread switch in the limit check, since upon return the size
2951 pseudo register would have a bogus value.
2954 ** Turned back on XML simplification after monomorphisation.
2957 ** Fixed bug in `MLton.Itimer.set` that caused the time to be doubled.
2958 ** Fixed bug in `MLton.Thread` that made it look like asynchronous exceptions
2959 were allowed by `throw`-ing an exception raising thunk to an interrupted
2960 thread obtained via a signal handler. Attempting asynchronous exceptions will
2961 now cause process death, with a helpful error message.
2964 ** Updated docs to include `structure World: MLTON_WORLD` in `MLton`
2966 ** Added toplevel signatures `MLTON_{CONT, ..., WORLD}` to basis library.
2967 ** Fixed broken link in docs to CM in `cmcat` section.
2970 ** Eliminated `GC_switchToThread` and `Thread_switchTo1`, since the inlined
2971 version `Thread_switchTo` is all that's needed, and Matt's X86 backend now
2973 ** Added `MLton.Signal.vtalrm`, needed for `Itimer.Set{which =
2974 Itimer.Virtual, ...}`.
2977 ** Added `MLton.Socket.shutdownWrite`.
2980 ** Updated `mlton-lib.c` `MLton_bug` with new email (MLton@sourcelight.com).
2983 ** Fixed `Posix.Process.kill` to check for errors.
2986 ** Fixed the following `Posix.ProcEnv` functions to check for errors:
2987 `setgid`, `setpgid`, `setsid`, `setuid`.
2988 ** Fixed `doc/examples/callcc.sml`.
2993 Here are the changes from the 1999-07-12 to the 20000712 version.
2997 * 2000-06-10 - 2000-07-12
2998 ** Too many changes to count: bug fixes, new basis library modules, optimizer
3002 ** Fixed bug in monomorphiser that caused programs with non-value carrying
3003 exception declarations in polymorphic functions to have a compile-time error
3004 because of a duplicate label. The problem was that the exception constructor
3007 * 2000-05-22 - 2000-06-10
3008 ** Finished the changes for the new CPS IL.
3011 ** Fixed some errors in the basis library:
3013 *** `Posix.FileSys.fpathconf`
3014 *** `Posix.IO.{lseek, getlk, setlk, setlkw}`
3015 *** `Posix.ProcEnv.setpgid`
3016 *** `Posix.TTY.getattr`
3017 *** `System.FileSys.realPath`
3020 ** Fixed bug in `src/closure-convert/abstract-value.fun` that caused a
3021 compiler failure whenever a program had a vector where the element type
3022 contained an `->`.
3025 ** Changed dead code elimination in `core-ml/dead-code.fun` so that wildcard
3026 declarations (`val _ = ...`) in the basis are kept. Changed places in the
3027 basis library to take advantage of this.
3028 ** Added `setTopLevelHander` primitive so that the basis library code can
3029 define the toplevel handler.
3030 ** Changed `basis-library/misc/suffix.sml` to call `OS.Process.exit`. Took
3031 out `Halt` transfer from CPS, since the program never should reach it.
3032 ** Cleaned up `basis-library/system/{process.sml, unix.sml}` to use the new
3033 signal handling stuff.
3035 * 1999-11-28 - 1999-12-20
3036 ** Added support for threads and cleaned up signal handling. This involved a
3038 *** The stack is now allocated as just another kind of heap object.
3039 *** Limit checks are inserted at all loop headers, whether or not there is
3040 any allocation. This is to ensure that the signal handler always has a
3041 chance to get called.
3042 *** The register allocator puts more variables in stack slots. The new rule
3043 is that a variable goes in a stack slot if it is ever live across a nontail
3044 call, in a handler, or (this is the new part) across a limit check.
3045 *** Arguments are passed on the stack, with the convention determined by
3047 *** The "locals" array of pointers that was copied to/from for GC is now
3048 gone, because no registers (in particular no pointer valued registers) can
3049 be live at a limit check point.
3053 *** Fixed a bug introduced by the signal code (presumably on 1999-08-09)
3054 that caused a gc to *not* be performed when doing a save world. This caused
3055 the heaps created by save world to be the same size as the heap -- not the
3056 live data. This was quite bad.
3057 *** Cleaned up the `Makefile`. Add make depend.
3058 *** Added max gc pause to `gc-summary` info.
3059 *** Move heap translation variables that had been file statics into the
3061 ** Made `structure Position` available at toplevel.
3063 *** Added `MLton.loadWorld`
3064 ** Added `Primitive.usesCallcc`
3065 ** Added `Primitive.safe`
3066 ** Removed special size functions from `cps/save-world` -- they are no longer
3067 necessary since size doesn't do a gc.
3068 ** Fixed another (sigh) bug in `cps/simplify-types.fun` that could cause it to
3072 ** Cleaned up `backend/machine.fun` a bit so that it spits out macros for
3073 allocation of objects and bumping of frontier. Added macros `MLTON_object`
3074 and `MLTON_incFrontier` to `include/mlton-lib.h`.
3075 ** Fixed a bug in `backend/limit-check.fun` that caused loops to not be
3076 detected if they were only reached by a case branch. This could cause there
3077 to be loop that allocates with no limit check. Needless to say, this could
3078 cause a segfault if the loop ran for long enough.
3081 ** Added basis library function `Array2.copy`.
3084 ** Turned off globalization of ref cells (`closure-convert/globalize.fun`)
3085 because it interacts badly with serialization.
3088 ** Fixed bug in `mlton-lib.h` in `MLTON_allocArrayNoPointers` that was
3089 triggered when `bytesPerElt == 0`. The problem was that it wasn't reserving
3090 space for the forwarding pointer. This could cause a segfault.
3092 * 1999-08-08 and 1999-08-09
3093 ** Added support for signal handling.
3096 ** Fixed bugs in `Array.tabulate` (and other `tabulate` variants) caused if
3097 the function argument used `callcc`.
3100 ** Added serialization, which was mostly code in `src/runtime/gc.c`. +
3101 `GC_serialize` converts an object to a `Word8Vector.vector`. +
3102 `GC_deserialize` undoes the conversion. + (de)Serialization should work for
3103 all objects except for functions, because I haven't yet added the support in
3107 ** Cleaned up the GC. Changed headers, by stealing a bit from the number of
3108 non pointers and making it a mark bit (used in `GC_size`).
3109 ** Rewrote `GC_size` so that it runs in time proportional to the number of
3110 pointers in the object. It does a depth-first-search now, using toSpace to
3114 ** Fixed bug in `SUBSTRING`. `getc` had the wrong type. This bug wasn't
3115 noticed because MLton doesn't do enough type checking.
3116 ** Fixed bug (segfault) caused when a GC immediately followed a throw.
3119 ** Fixed bug in `Date.fmt` (`basis-library/system/date.sml`). It was not
3120 setting `Tm.buf`, and hence the time was always 0 unless there had been a
3121 previous call to `setTmBuf`.
3124 ** Fixed bugs in `Posix.IO.FLock.{getlk,setlk,setlkw}`, which would cause
3125 compilation to fail because `FLock.toInt` was defined as the C `castInt`,
3126 which no longer exists. Instead, expand `FLock.toInt` to
3127 `MLTON_pointerToInt`, which was added to `include/mlton-lib.h`.
3128 ** Changed `Posix.Primitive.Flock` to `Posix.Primitive.FLock`.
3129 ** Added `MLTON_chown`, `MLTON_ftruncate` to `include/mlton-posix.h`. They
3130 were missing. This would cause compilation of any program using
3131 `Posix.FileSys.{chown,ftruncate}` to fail. Also made it so all of the
3132 primitives in `basis-library/posix/primitive.sml` use `MLTON_` versions of
3133 functions, even if a wrapper is unnecessary.
3136 ** Added some other missing signature definitions to toplevel.
3139 ** Added missing `OS_*` signature definitions to
3140 `basis-library/top-level/top-level.sml`.
3143 ** Fixed bug in `basis-library/arrays-and-vectors/mono-array.sml`. Used `:>`
3144 instead of `:` so that the monomorphic array types are abstract.
3149 Here are the changes from the 1999-03-19 version to the 1999-07-12 version.
3154 ** Changed `src/backend/machine.fun` so that the 'pointer locals' array is
3155 only as large as neccessary in order to copy all pointer-valued locals, not as
3156 large as the number of pointer-valued locals.
3159 ** Rewrote `src/backend/allocate-registers.fun` so that it does a better job
3160 of sharing "registers" (i.e. C local variables) and stack slots. This should
3161 cut down on the amount of copying that has to happen before and after a gc.
3162 It should also cut down on the size of stack slots.
3165 ** Fixed a bug in `src/backend/parallel-move.fun` that should have been
3166 triggered on most any parallel move. I guess parallel moves almost never
3167 happened due to the old register allocation strategy -- but, with the new one
3168 (see note for 1999-07-12) parallel moves will be frequent.
3171 ** Fixed `src/main.sml` so that when compiling `-p`, the `.c` file is compiled
3172 `-g` and the `.o` is linked `-p`.
3173 ** In `bakend/machine.fun`, added profiling comments before chunkswitches and
3174 put in an optimization to avoid printing repeated profiling comments. Also,
3175 profiling comments are only output when compiling `-p`.
3178 ** Changed `-i` to `-inline`, `-f` to `-flatten`, `-np` to `-no-polyvariance`,
3180 ** Added `-i`, `-I`, `-l`, `-L` flags for includes and libraries.
3181 ** Updated documentation for these options and for ffi.
3184 ** Hardwired version number in `src/control/control.sml`. As it stood, the
3185 version number was computed when MLton was built after someone downloaded it,
3186 which was clearly wrong.
3189 ** Fixed undefined variable `time` in `GC_done` in `src/runtime/gc.c`.
3192 ** in `include/mlton-lib.h`:
3193 *** removed `#include <huge_val.h>`
3194 *** added `#include <math.h>`
3195 *** and deleted all of the function signatures I had copied from `math.h`
3196 ** Changed `Real.{minNormalPos, minPos, maxFinite}` so that they are computed
3197 in `real.sml` instead of appearing as constants in the C.
3200 `IntInf.pow` added to basis library.
3203 ** `bin/mlton` changed to use `.arch-n-opsys` if it exists.
3206 ** `src/Makefile` changed to use `sml-cm` instead of `sml`
3209 ** Patch to `src/atoms/small-int-inf.fun` to work around a bug in the SML/NJ
3210 implementation of bignums. This bug was causing some hex bignum constants to
3211 be lexed incorrectly.
3214 ** Comments emitted in C code for profiling. The comments identify the CPS
3215 function responsible for each C statement.
3218 ** `callcc` and `throw` added.
3221 ** Bug in `src/cps/simplify-types` fixed. The bug caused nontermination
3222 whenever there was a circular datatype with a vector on the rhs.
3223 E.g. `datatype t = T of t vector`
3228 Here are the changes from the 1998-08-26 version to the 1999-03-19 version.
3232 * Compile time and code size have decreased.
3233 * Runtime performance of executables has improved.
3234 * Large programs can now be compiled.
3235 * MLton is self hosting.
3236 * The basis library is mostly complete and many bugs have been fixed.
3237 * The monomorphiser (`-m`) is no longer available.
3238 * The heap and stack are automatically resized.
3239 * There are now facilities for heap checkpointing (`MLton.saveWorld`) and object
3240 size computation (`MLton.size`).
3241 * MLton uses the GNU multiprecision (GnuMP) library to provide a fast
3242 implementation of `IntInf`.</pre>
3247 <div id="footnotes"><hr></div>
3249 <div id="footer-text">
3251 <div id="footer-badges">