5 Here are the changes from version 20130715 to version 20180206.
10 ** Added an experimental LLVM codegen (`-codegen llvm`); requires LLVM tools
11 (`llvm-as`, `opt`, `llc`) version ≥ 3.7.
12 ** Made many substantial cosmetic improvements to front-end diagnostic
13 messages, especially with respect to source location regions, type inference
14 for `fun` and `val rec` declarations, signature constraints applied to a
15 structure, `sharing type` specifications and `where type` signature
16 expressions, type constructor or type variable escaping scope, and
17 nonexhaustive pattern matching.
18 ** Fixed minor bugs with exception replication, precedence parsing of function
19 clauses, and simultaneous `sharing` of multiple structures.
20 ** Made compilation deterministic (eliminate output executable name from
21 compile-time specified `@MLton` runtime arguments; deterministically generate
22 magic constant for executable).
23 ** Updated `-show-basis` (recursively expand structures in environments,
24 displaying components with long identifiers; append `(* @ region *)`
25 annotations to items shown in environment).
26 ** Forced amd64 codegen to generate PIC on amd64-linux targets.
28 ** Added `gc-summary-file file` runtime option.
29 ** Reorganized runtime support for `IntInf` operations so that programs that
30 do not use `IntInf` compile to executables with no residual dependency on GMP.
31 ** Changed heap representation to store forwarding pointer for an object in
32 the object header (rather than in the object data and setting the header to a
35 ** Added support for selected SuccessorML features; see
36 http://mlton.org/SuccessorML for details.
37 ** Added `(*#showBasis "file" *)` directive; see
38 http://mlton.org/ShowBasisDirective for details.
40 *** Added `pure`, `impure`, and `reentrant` attributes to `_import`. An
41 unattributed `_import` is treated as `impure`. A `pure` `_import` may be
42 subject to more aggressive optimizations (common subexpression elimination,
43 dead-code elimination). An `_import`-ed C function that (directly or
44 indirectly) calls an `_export`-ed SML function should be attributed
46 ** ML Basis annotations.
47 *** Added `allowSuccessorML {false|true}` to enable all SuccessorML features
48 and other annotations to enable specific SuccessorML features; see
49 http://mlton.org/SuccessorML for details.
50 *** Split `nonexhaustiveMatch {warn|error|igore}` and `redundantMatch
51 {warn|error|ignore}` into `nonexhaustiveMatch` and `redundantMatch`
52 (controls diagnostics for `case` expressions, `fn` expressions, and `fun`
53 declarations (which may raise `Match` on failure)) and `nonexhaustiveBind`
54 and `redundantBind` (controls diagnostics for `val` declarations (which may
55 raise `Bind` on failure)).
56 *** Added `valrecConstr {warn|error|ignore}` to report when a `val rec` (or
57 `fun`) declaration redefines an identifier that previously had constructor
61 *** Improved performance of `Array.copy`, `Array.copyVec`, `Vector.append`,
62 `String.^`, `String.concat`, `String.concatWith`, and other related
63 functions by using `memmove` rather than element-by-element constructions.
64 ** `Unsafe` structure.
65 *** Added unsafe operations for array uninitialization and raw arrays; see
66 https://github.com/MLton/mlton/pull/207 for details.
68 *** Updated: ckit library, MLLPT library, MLRISC library, SML/NJ library
71 *** Updated to warn and skip (rather than abort) when encountering functions
72 with `struct`/`union` argument or return type.
77 ** Remove ancient and unused `cmcat` tool.
80 ** Upgrade `gdtoa.tgz`.
83 ** Remove docs from `all` target of `./Makefile`; this eliminates the
84 `all-no-docs` target (which was frequently used in favor of `all`).
87 ** Use C compiler with `-std=gnu11` (rather than `-std=gnu99`).
88 ** Revert rudimentary support for `./configure`; the support was so minimal
89 that it seems unhelpful to pretend that there are exhaustive compatibility
90 checks being performed. All of the basic configuration can be accomplished
91 with simple `make` variable definitions.
94 ** Remove (expert, undocumented) `-debug-format` option; the same effect can
95 be achieved with `-as-opt` and `-cc-opt`.
96 ** Propagate C compiler from `./configure` to `mlton` script.
99 ** Extend `-target-*-opt` options to support `arch-os` pairs.
100 ** Remove `./package/rpm/*` and corresponding targets in `./Makefile`;
101 upstream MLton has not produced RPMs for years.
104 ** Slightly improve performance of `Vector.concat` and
105 `String.{concat,concatWith,tokens,fields}` by avoiding `List.map`-s.
108 ** Restore, but deprecate, `-drop-pass` compile-time expert option.
111 ** Update SML/NJ libraries to SML/NJ 110.82.
114 ** Add support for `(*#showBasis "file" *)` directives. This feature is
115 meant to facilitate auto-completion via
116 https://github.com/MatthewFluet/company-mlton[`company-mlton`] and similar
120 ** Update performance comparison on website. Thanks to Curtis Dunham for the
124 ** Updates to `-show-basis`:
125 *** `-show-basis-flat`: Recursively expand structures in environments,
126 displaying components with long identifiers.
127 *** `-show-basis-def`: Appends `(* @ region *)` annotations to items shown
129 *** `-show-basis-compact`: Tries to optimize vertical space (at the expense
133 ** Drop `_BSD_SOURCE` and `_POSIX_C_SOURCE` feature macros in
137 ** Add a `Dockerfile` to build/test MLton. Thanks to Richard Laughlin for the
141 ** Remove `$PREFIX` and `$prefix` from top-level `Makefile.in`; use
142 `./configure --prefix path`. Thanks to Richard Laughlin for the pull
146 ** Fix heap invariant predicates.
149 ** Eliminate the use of (some) global mutable state for signal handling.
152 ** Store forwarding pointer for an object in the object header (rather than in
153 the object data and setting the header to a sentinel value).
156 ** Updates to stack management in backend:
157 *** Improve `Allocation.Stack.get`.
158 *** Do not force `Cont` block arguments to stack.
161 ** In `signature SSA_TO_RSSA_STRUCTS` share by `Rssa.Atoms = Ssa.Atoms`. This
162 is the idiom used elsewhere in the compiler, rather than sharing individual
163 sub-structures of `Atoms`.
164 ** Minor updates to `DirectedGraph` and `Tree` in MLton library.
167 ** Add `-seed-rand w` compile-time option, to seed the pseudo-random number
169 ** Add a new MachineShuffle pass (disabled by default) that shuffles the
170 collection of chunks within the program and shuffles the collection of blocks
171 within a chunk. With the `-seed-rand w` compile-time option, can be used to
172 generate executables with distinct code placements.
175 ** Use a relative path in the `mlton` script, rather than an absolute path.
176 The absolute path needed to be set to the intended installation directory,
177 which made it difficult to install a binary release in a local directory.
178 Undertaken by Maksim Yegorov at RIT supported by NSF CISE Research
179 Infrastructure (CRI) award.
182 ** Add unsafe operations for array uninitialization and raw arrays.
183 *** Rename `Array_uninit: SeqIndex.int -> 'a array` primitive to
184 `Array_alloc: SeqIndex.int -> 'a array`.
185 *** Add `Array_uninit: 'a array * SeqIndex.int -> unit` primitive to set all
186 objptrs in the element at the given index to a bogus non-objptr value
187 (`0wx1`). One motivation for this primitive is to support space-efficient
188 polymorphic resizeable arrays. When shrinking a resizeable array, we would
189 like to "`NULL`" out the elements that are no longer part of the logical
190 array, in order to avoid a (logical) space leak.
191 *** Add `Array_uninitIsNop: 'a array -> bool` primitive to answer if the
192 `Array_uninit` primitive applied to the same array would be a nop (i.e., if
193 the array has no objptrs in the elements). This can be used to skip a
194 bulk-`Array_uninit` loop when it is known that the `Array_uninit` operations
196 *** Add `Array_allocRaw: SeqIndex.int -> 'a array` primitive to allocate an
197 array, but with a header that indicates that the array has no objptrs. Add
198 `Array_toArray: 'a array -> 'a array` primitive to update the header of an
199 `Array_allocRaw` allocated array to reveal the objptrs. One motiviation for
200 this primitive is that, in a parallel setting, the uninitialization of an
201 array can be a sequential bottleneck. The `Array_allocRaw` is a constant
202 time operation and the subsequent `Array_uninit` operations can be performed
204 *** Extend `structure Unsafe.Array` with additional operations. See
205 `./basis-library/sml-nj/unsafe.sig`.
208 ** Introduce ShareZeroVec SSA optimization to share zero-length vectors after
209 coercion-based optimizations. Undertaken by Maksim Yegorov at RIT supported
210 by NSF CISE Research Infrastructure (CRI) award.
213 ** New canonicalization strategy for CommonSubexp SSA optimization.
214 Previously, the canonicalization of commutative arithmetic primitives was
215 sensitive to variable hashes (created by an unseeded pseudo-random number
216 generator); now, the canonicalization of commutative arithmetic primitives is
217 sensitive to relative definition order of variables.
220 ** Fix bug in runtime argument option parsing.
223 ** Many updates and improvements to diagnostic messages. See
224 https://github.com/MLton/mlton/pull/195 for details.
227 ** Add rudimentary support for `./configure`; in particular, support
228 `--with-gmp-lib` and `--with-gmp-include` to set location of GMP and
229 `--prefix` to specify an install prefix. Undertaken by Maksim Yegorov at RIT
230 supported by NSF CISE Research Infrastructure (CRI) award.
233 ** Introduce `Array_copyArray: 'a array * SeqIndex.int * 'a array *
234 SeqIndex.int * SeqIndex.int -> unit` and `Array_copyVector: 'a array *
235 SeqIndex.int * 'a vector * SeqIndex.int * SeqIndex.int -> unit` primitives
236 which are used to implement a number of array and vector construction
237 functions, particularly `append`, `concat`, and `concatWith`. The primitives
238 compile to `memmove` operations, which (significantly) outperforms MLton's
239 element-by-element construction for large sequences. Undertaken by Bryan Camp
240 at RIT supported by NSF CISE Research Infrastructure (CRI) award.
243 ** Force PIC generation on amd64-linux targets. Thanks to Kuen-Bang Hou
244 (Favonia) for the pull request.
247 ** Generalize the `subWord` primitives to
250 | WordArray_subWord of {seqSize:WordSize.t, eleSize: WordSize.t}
251 | WordArray_updateWord of {seqSize: WordSize.t, eleSize: WordSize.t}
252 | WordVector_subWord of {seqSize: WordSize.t, eleSize: WordSize.t}
255 Undertaken by Bryan Camp at RIT supported by NSF CISE Research Infrastructure
259 ** Add a parser combinator library (`structure StreamParser`) to the MLton
260 Library. Undertaken by Jason Carr at RIT supported by NSF CISE Research
261 Infrastructure (CRI) award.
262 ** Add a parser for the SXML IR (`structure ParseSxml`). Undertaken by Jason
263 Carr at RIT supported by NSF CISE Research Infrastructure (CRI) award.
264 ** Allow compilation to start with a `.sxml` file. Undertaken by Jason Carr
265 at RIT supported by NSF CISE Research Infrastructure (CRI) award.
268 ** Replace `-drop-pass regex` compile-time option with `-disable-pass regex`
269 compile option and add `-enable-pass regex` compile option. Various XML,
270 SXML, SSA, SSA2, RSSA, and Machine IR optimization passes are initialized with
271 a default status, which can be overriden by `-{disable,enable}-pass`. In
272 particular, it is now easy to add a work-in-progress (and potentially buggy)
273 pass to the simplification pipeline with `execute = false` default status, to
274 be selectively executed with `-enable-pass`. Undertaken by Bryan Camp at RIT
275 supported by NSF CISE Research Infrastructure (CRI) award.
276 ** Add LoopUnswitch and LoopUnroll SSA optimizations (undertaken by Matthew
277 Surawski as an RIT CS MS Capstone Project). Initial evaluation demonstrates
278 some non-trivial performance gains, no non-trivial performance losses, and
279 only minor code size increases, but currently disabled pending a more thorough
283 ** Expand the set of MLB annotations:
284 *** `nonexhaustiveBind`, `nonexhaustiveExnBind`, `redundantBind`: controls
285 diagnostics for `val` declarations (which may raise `Bind` on failure).
286 *** `nonexhaustiveMatch`, `nonexhaustiveExnMatch`, `redundantMatch`:
287 controls diagnostics for `case` expressions, `fn` expressions, and `fun`
288 declarations (which may raise `Match` on failure).
289 *** `nonexhaustiveRaise`, `nonexhaustiveExnRaise`, `redundantRaise`:
290 controls diagnostics for `handle` expressions (which implicitly re-raise on
291 failure). Note that `nonexhaustiveRaise` and `nonexhaustiveExnRaise`
292 default to `ignore`. The combination of `nonexhaustiveRaise warn` and
293 `nonexhaustiveExnRaise ignore` can be useful for finding handlers that
294 handle some, but not all, values of an exception variant.
295 ** Make a number of improvements to diagnostic messages:
296 *** Display nonexhaustive exception patterns as `_ : exn`, rather than
298 *** Normalize nonexhaustive patterns by sorting (e.g., by `ConApp` name).
299 *** Report complete enumeration of unhandled constants, rather than a single
301 *** Report nonexhaustive patterns of record type as records, rather than as
305 ** Updates to SSA, SSA2, and RSSA IR support infrastructure
306 *** Display more context when reporting SSA and SSA2 IR type errors.
307 *** Add `-layout-width n` compile expert option to control the target width
308 for the pretty printer.
309 *** Make cosmetic improvments to SSA and SSA2 IR display (uses of global
310 variables bound to small constants and conapps are commented with the
311 corresponding value; include loop forest for functions with `-keep dot`).
312 *** Improve RSSA constant folding and copy propagation.
313 *** Limit Machine IR `Globals` to variables used outside of the `main`
317 ** Add `gc-summary-file file` runtime option.
320 ** Rename and add `smlnj-mlton-x{2,4,8,16}` top-level `Makefile` targets.
321 ** Update SML/NJ librarys to SML/NJ 110.80 (making use of supported
322 SuccessorML features).
323 ** Not support for SML/NJ extensions via SuccessorML MLB annotations on
327 ** Add support for vector expressions (`#[e1, e2, ..., en]`) and vector
328 patterns (`#[p1, p2, ..., pn]`) and add `Vector_vector` n-ary primitive.
329 Initial support for vector expressions and the `Vector_vector` primitive were
330 undertaken by Krishna Ravikumar as an RIT CS MS Capstone Project.
333 ** Update DOS eol handling and tweak error messages in lexer.
336 ** Correct off-by-one error in column numbers. Thanks to Jacob Zimmerman for
337 the error report and pull request.
340 ** Updates to SuccessorML support:
341 *** Add an `allowSuccessorML {false|true}` MLB annotation to enable all
342 Successor ML features with a single annotation.
343 *** Fix parsing of numeric labels to only accept an INT token that does not
344 begin with 0, is not an extended literal, is not negative, and is decimal.
345 *** Drop the alternate word prefixes (`0xw` and `0bw`).
346 *** Unconditionally allow line comments in MLB files.
347 *** Allow UTF-8 byte sequences in text constants.
348 *** Refactor `ml.lex` and `mlb.lex` to be more maintainable.
349 *** Rename `allowRecPunning` annotation to `allowRecordPunExps`.
352 ** Update ML-Yacc examples (`calc`, `fol`, `pascal`) to comply with MLton
353 build process. Thanks to Hai Nguyen Van for the pull request.
356 ** Update PortingMLton documentation and `./bin/add-cross` script. Thanks to
357 Daniel Moerner for the pull request.
360 ** Constant fold `CPointer_equal(NULL, NULL)` to `true`.
363 ** Introduce `NEEDS_SIGALTSTACK_EXEC` config in runtime system.
366 ** Construct a devel build version string from last commit time and last
368 ** Omit build date and build node from version banner; makes self-compiles
370 ** Remove `upgrade-basis.sml` from build. The generated `upgrade-basis.sml`
371 was introduced to handle incompatibilities in the Basis Library provided by an
372 old version of MLton and the Basis Library assumed by the current sources.
373 However, there are no incompatibilities with MLton 20130715, MLton 20100608,
374 or MLton 20070826. Nonetheless, the feature testing performed by
375 `./bin/upgrade-basis` to generate `upgrade-basis.sml` is time consuming,
376 especially when trying to simply type check the compiler sources.
379 ** Do not `gzip` man pages on OpenBSD. Thanks to Alexander Abushkevich for
383 ** Generate position independent code for OpenBSD. Thanks to Alexander
384 Abushkevich for the pull request.
387 ** Fix profiling for amd64-openbsd and x86-openbsd. Thanks to Alexander
388 Abushkevich for the pull request.
391 ** Update SML/NJ librarys to SML/NJ 110.79.
394 ** Update LLVM codegen to support (and require) >= llvm-3.7. Thanks to Eugene
395 Akentyev for the pull request.
398 ** Configure GMP location via `Makefile`.
401 ** Fix typo in `mlb-formal.tex`. Thanks to Jon Sterling for the pull request.
404 ** Update SML/NJ librarys to SML/NJ 110.78. Use `allowOrPats` and
405 `allowSigWithtype` to minimize diffs.
408 ** Fix elaboration of `withtype` in signature.
411 ** Add support for setting CM anchor bindings in `cm2mlb` tool.
414 ** Fix non-exhaustive match warnings with or-patterns. Thanks to Rob Simmons
416 ** Distinguish between partial and fully redundant matches.
417 ** Report partial redundancy in `val` declarations.
418 ** Lower precedence of or-patterns in parser.
419 ** Make a variety of cosmetic improvements to non-exhaustive and redundant
420 error/warning messages, primarily to be consistent in formatting between
421 quoted AST and generated messages.
424 ** Extend support for arm64 (aarch64). Thanks to Edmund Evans for the patch.
427 ** Introduce `valrecConstr {warn|error|ignore}` MLB annotation to report when
428 a `val rec` (or `fun`) declaration redefines an identifier that previously had
432 ** Add support for selected SuccessorML features (undertaken by Kevin Bradley
433 as an RIT CS MS Capstone Project).
434 *** `do`-declarations (`allowDoDecls`)
435 *** extended literals (`allowExtendedLiterals`)
436 *** line comments (`allowLineComments`)
437 *** optional leading bar in matches, fun decls, and datatype decls
439 *** optional trailing semicolon in sequence expressions (`allowOptSemicolon`)
440 *** or patterns (`allowOrPats`)
441 *** record expression punning (`allowRecPunning`)
442 *** withtype in signatures (`allowSigWithtype`)
445 ** Hide equality status of poly (and mono) vector and array slices.
446 ** Hide type equality of mono and poly `Word8.word` arrays and vectors.
449 ** Added `reentrant` attribute to `_import`. An `_import`-ed C function that
450 (directly or indirectly) calls an `_export`-ed SML function should be
451 attributed `reentrant`.
454 ** Make compilation deterministic:
455 *** Eliminate output executable name from compile-time specified `@MLton`
457 *** Deterministically generate magic constant for executable.
460 ** Add `-keep ast` compile option. Undertaken by Ross Bayer at RIT supported
461 by NSF CISE Research Infrastructure (CRI) award.
464 ** Updates to Debian packaging. Thanks to Christopher Cramer for the pull
468 ** Use `LANG=en_us` when computing version and build date. Thanks to Eugene
469 Akentyev for the pull request.
472 ** Update `mlnlffigen` to warn and skip functions with `struct`/`union`
473 arguments. Thanks to Armando Doval for the pull request.
476 ** Move pervasive constructs from `./mlton/ast` to `./mlton/atoms`, so that
477 `./mlton/ast/sources.mlb` depends on `./mlton/atoms/sources.mlb` (and not the
478 other way around). Undertaken by Vedant Raiththa at RIT supported by NSF CISE
479 Research Infrastructure (CRI) award.
482 ** Cache a worker thread to service calls of `_export`-ed functions. Thanks
483 to Bernard Berthomieu for the bug report.
486 ** Post-process generated front-end files for compatibility with SML/NJ's
487 recent `ml-lex` and `ml-yacc` tools that generate log identifiers rather than
488 unqualified (top-level environment) identifiers.
489 ** Corrected documentation for SML/NJ `Makefile` target and fixed
490 `bootstrap-nj` target. Thanks to Daniel Rosenwasser for the pull request.
493 ** Reorganized runtime support for `IntInf` operations so that programs that
494 do not use `IntInf` compile to executables with no residual dependency on GMP.
495 ** Fixed bug in `MLton.IntInf.fromRep` that could yield values that violate
496 the `IntInf` representation invariants. Thanks to Rob Simmons for the bug
500 ** Added `pure` and `impure` attributes to `_import`. An unattributed
501 `_import` is treated as `impure`. A `pure` `_import` may be subject to more
502 aggressive optimizations (common subexpression elimination, dead-code
503 elimination). Undertaken by Vedant Raiththa at RIT supported by NSF CISE
504 Research Infrastructure (CRI) award.
507 ** Various updates to treatment of `IntInf` constants in the compiler.
508 *** Recognize both `Big` and `Small` representations of `IntInf`-s.
509 *** Translate `IntInf` consts to `Big` and `Small` representations in
510 conversion from SSA to RSSA. This is consistent with the treatment of other
511 `IntInf` operations in the conversion. After the conversion, `IntInf` is no
512 longer treated as a primitive.
513 *** Remove `initIntInfs` from program initialization.
514 *** Constant fold `IntInf_toVector` and `WordVector_toIntInf` primitives.
517 ** Various updates to `structure WordXVector` in compiler proper.
518 *** Update the `WordXVector.layout` function. If the `elementSize` is
519 `WordX.word8` and more than 90% of the characters satisfy `Char.isGraph
520 orelse Char.isSpace`, then display as an SML string constant (with
521 non-printable characters SML-escaped). Otherwise, display as an SML/NJ-style
522 `#[0x0, 0xF]` vector literal.
523 *** Update initialization of `static struct GC_vectorInit vectorInits[]`
524 constants in runtime. If the `WordXVector`'s (primitive) `elementSize` is
525 `WordSize.W8`, then emit a C-escaped string constant. Otherwise, emit a
526 C-array initialization.
529 ** More updates to benchmark infrastructure.
530 *** Make `update-counts.sh` script more robust.
531 *** Update `hamlet.sml` benchmark program to close input file after each
533 *** Update `fft.sml` benchmark program to only invoke `test` function with
534 power-of-2 arguments.
535 *** Update `model-elimination.sml` benchmark program to iterate `main ()`
536 according to `doit` size parameter.
539 ** Include `winsock2.h` before `windows.h` in MinGW port. Thanks to Shu-Hung
540 You for the pull request.
543 ** Refactor array and vector implementation in Basis Library into a primitive
544 implementation (using `SeqInt.int` for indexing) and a wrapper implementation
545 (using the default `Int.int` for indexing). Thanks to Rob Simmons for the
547 ** Correct description of `MLton.{Vector,Array}.unfoldi` on website. Thanks
548 to Rob Simmons for the pull request.
551 ** Updates to benchmark infrastructure.
552 *** Add `even-odd.sml` benchmark that exercises mutual tail recursion.
553 *** Add `update-counts.sh` script to calculate appropriate benchmark
554 iteration counts and update benchmark iteration counts so that all
555 benchmarks run for at least 30 seconds.
556 *** Updates to benchmark driver program.
559 ** Change `./basis-library/integer/int-inf.sml` to reduce dependency on
560 GMP-specific details of `./basis-library/integer/int-inf0.sml`. Thanks to Rob
561 Simmons for the pull request.
562 ** Correct type and description of `MLton.IntInf.fromRep` on website. Thanks
563 to Rob Simmons for the pull request.
566 ** Add experimental LLVM codegen (undertaken by Brian Leibig as an RIT CS MS
570 ** Update `CallingFromSMLToC` page on website. Thanks to Bikal Gurung for the
574 ** Updates for MinGW port.
577 ** Update AsciiDoc sources for website.
580 ** Various updates to website. Thanks to Mauricio C Antunes for the pull
582 *** Add Tofte's tutorial and Rossberg's grammar.
583 *** Fix links to implementations.
586 ** Update links from `References` page on website. Thanks to Mauricio C
587 Antunes for the pull request.
590 ** Fix example for `Lazy` page on website. Thanks to Daniel Rosenwasser for
595 Here are the changes from version 20100608 to version 20130715.
600 ** Cosmetic improvements to type-error messages.
602 *** Bytecode codegen: The bytecode codegen had not seen significant use and
603 it was not well understood by any of the active developers.
604 *** Support for `.cm` files as input: The ML Basis system provides much
605 better infrastructure for "programming in the very large" than the (very)
606 limited support for CM. The `cm2mlb` tool (available in the source
607 distribution) can be used to convert CM projects to MLB projects, preserving
608 the CM scoping of module identifiers.
609 ** Bug fixes: see changelog
611 ** Bug fixes: see changelog
613 ** Interpret `(*#line line:col "file" *)` directives as relative
615 ** ML Basis annotations.
616 *** Added: `resolveScope`
619 *** Improved performance of `String.concatWith`.
620 *** Use bit operations for `REAL.class` and other low-level operations.
621 *** Support additional variables with `Posix.ProcEnv.sysconf`.
622 *** Bug fixes: see changelog
623 ** `MLton` structure.
624 *** Removed: `MLton.Socket`
626 *** Updated: ckit library, MLRISC library, SML/NJ library
627 *** Added: MLLPT library
630 *** Generate `(*#line line:col "file.lex" *)` directives with simple
631 (relative) file names, rather than absolute paths.
633 *** Generate `(*#line line:col "file.grm" *)` directives with simple
634 (relative) file names, rather than absolute paths.
635 *** Fixed bug in comment-handling in lexer.
640 ** Update SML/NJ libraries to SML/NJ 110.76.
643 ** Upgrade `gdtoa.tgz`; fixed bug in `Real32.{fmt,toDecimal,toString}`, which
644 in some cases produced too many digits
647 ** Removed `MLton.Socket` structure (deprecated in last release).
650 ** Improved performance of `String.concatWith`.
653 ** Update SML/NJ libraries to SML/NJ 110.75.
656 ** Detect PowerPC 64 architecture.
659 ** Fixed bug in elaboration that erroneously accepted the following:
661 signature S = sig structure A : sig type t end
662 and B : sig type t end where type t = A.t end
665 ** Introduce an MLB annotation to control overload and flex record resolution
666 scope: `resolveScope {strdec|dec|topdec|program}`.
669 ** Simplify use of `getsockopt` and `setsockopt` in Basis Library.
670 ** Direct implementation of `Socket.Ctl.{getATMARK,getNREAD}` in runtime
671 system, rather than indirect implementation in Basis Library via `ioctl`.
672 ** Replace use of casting through a union with `memcpy` in runtime.
675 ** Use bit operations for `REAL.class` and other low-level operations.
676 ** Fixed bugs in `REAL.copySign`, `REAL.signBit`, and `REAL.{to,from}Decimal`.
679 ** Cosmetic improvements to type-error messages.
680 ** Fixed bug in elaboration that erroneously rejected the following:
682 datatype ('a, ''a) t = T
683 type ('a, ''a) u = unit
685 and erroneously accepted the following:
687 fun f (x: 'a) : ''a = x
688 fun g (x: 'a) : ''a = if x = x then x else x
691 ** Fixed bug in redundant SSA optimization.
694 ** Support additional variables with `Posix.ProcEnv.sysconf`.
697 ** Change `mllex` and `mlyacc` to generate `#line` directives with simple file
698 names, rather than absolute paths.
699 ** Interpret `#line` directives as relative file names.
702 ** Fixed bug in SSA/SSA2 shrinker that could erroneously turn a non-tail
703 function call with a `Bug` transfer as its continuation into a tail function
707 ** Update SML/NJ libraries to SML/NJ 110.73 and add ML-LPT library.
710 ** Fixed bug in translation from SSA2 to RSSA with case expressions over
711 non-primitive-sized words.
712 ** Fixed bug in SSA/SSA2 type checking of case expressions over words.
715 ** Upgrade `gdtoa.tgz`.
716 ** Remove bytecode codegen.
717 ** Remove support for `.cm` files as input.
720 ** Fixed a bug with the treatment of `as`-patterns, which should not allow the
721 redefinition of constructor status.
724 ** Fixed bug with treatment of nan in common subexpression elimination SSA
728 ** Fixed bug in translation from SSA2 to RSSA with weak pointers.
731 ** Fixed bug in amd64 codegen calling convention for varargs C calls.
734 ** Fixed bug in comment-handling in lexer for `mlyacc`'s input language.
737 ** Fixed bug in elaboration of function clauses with different numbers of
738 arguments that would raise an uncaught `Subscript` exception.
743 Here are the changes from version 20070826 to version 20100608.
751 ** Command-line switches.
752 *** Added: `-mlb-path-var '<name> <value>'`
753 *** Removed: `-keep sml`, `-stop sml`
754 ** Improved constant folding of floating-point operations.
755 ** Experimental: Support for compiling to a C library; see wiki documentation.
756 ** Extended `-show-def-use` output to include types of variable definitions.
757 ** Deprecated features (to be removed in a future release)
758 *** Bytecode codegen: The bytecode codegen has not seen significant use and
759 it is not well understood by any of the active developers.
760 *** Support for `.cm` files as input: The ML Basis system provides much
761 better infrastructure for "programming in the very large" than the (very)
762 limited support for CM. The `cm2mlb` tool (available in the source
763 distribution) can be used to convert CM projects to MLB projects, preserving
764 the CM scoping of module identifiers.
765 ** Bug fixes: see changelog
767 ** `@MLton` switches.
768 *** Added: `may-page-heap {false|true}`
769 ** `may-page-heap`: By default, MLton will not page the heap to disk when
770 unable to grow the heap to accomodate an allocation. (Previously, this
771 behavior was the default, with no means to disable, with security an
772 least-surprise issues.)
773 ** Bug fixes: see changelog
775 ** Allow numeric characters in ML Basis path variables.
778 *** Bug fixes: see changelog.
779 ** `MLton` structure.
780 *** Added: `MLton.equal`, `MLton.hash`, `MLton.Cont.isolate`,
781 `MLton.GC.Statistics, `MLton.Pointer.sizeofPointer`,
782 `MLton.Socket.Address.toVector`
784 *** Deprecated: `MLton.Socket`
785 ** `Unsafe` structure.
786 *** Added versions of all of the monomorphic array and vector structures.
788 *** Updated: ckit library, MLRISC library, SML/NJ library.
791 *** Eliminated top-level `type int = Int.int` in output.
792 *** Include `(*#line line:col "file.lex" *)` directives in output.
793 *** Added `%posint` command, to set the `yypos` type and allow the lexing of
794 multi-gigabyte files.
796 *** Added command-line switches `-linkage archive` and `-linkage shared`.
797 *** Deprecated command-line switch `-linkage static`.
798 *** Added support for ia64 and hppa targets.
800 *** Eliminated top-level `type int = Int.int` in output.
801 *** Include `(*#line line:col "file.grm" *)` directives in output.
806 ** Fixed bug in the mark-compact garbage collector where the C library's
807 `memcpy` was used to move objects during the compaction phase; this could lead
808 to heap corruption and segmentation faults with newer versions of `gcc` and/or
809 `glibc`, which assume that src and dst in a `memcpy` do not overlap.
812 ** Fixed bug in elaboration of `datatype` declarations with `withtype`
816 ** Fixed performance bug in RefFlatten SSA2 optimization.
819 ** Fixed performance bug in SimplifyTypes SSA optimization.
822 ** Fixed bug in amd64 codegen register allocation of indirect C calls.
825 ** Fixed bug in `IntInf.scan` and `IntInf.fromString` where leading spaces
826 were only accepted if the stream had an explicit sign character.
829 ** Added CombineConversions SSA optimization.
832 ** Removed deprecated command line switch `-show-anns {false, true}`.
835 ** Removed command line switches `-keep sml` and `-stop sml`. Their meaning
836 was unclear with `.mlb` files; their effect with `.cm` files can be achieved
840 ** Fixed bug in `IntInf.~>>` that could cause a `glibc` assertion failure.
843 ** Fixed exported type of `MLton.Process.reap`.
846 ** Added `MLton.Socket.Address.toVector` to get the network-byte-order
847 representation of an IP address.
850 ** Fixed bug in `MLton.size` and `MLton.share` when tracing the current stack.
853 ** Fixed phantom typing of sockets by hiding the representation of socket
854 types. Previously the representation of sockets was revealed rendering the
855 phantom types useless.
858 ** Fixed bug in nested `_export`/`_import` functions.
861 ** Improved constant folding of floating point operations.
864 ** Store the card/cross map at the end of the allocated ML heap; avoids
865 possible out of memory errors when resizing the ML heap cannot be followed by
866 a card/cross map allocation.
869 ** Added support for compiling to a C library. The relevant new compiler
870 options are `-ar` and `-format`. Libraries are named based on the name of the
871 `-export-header` file. Libraries have two extra methods:
872 *** `NAME_open(argc, argv)` initializes the library and runs the SML code
873 until it reaches the end of the program. If the SML code exits or raises an
874 uncaught exception, the entire program will terminate.
875 *** `NAME_close()` will execute any registered atExit functions, any
876 outstanding finalizers, and frees the ML heap.
879 ** Fixed bug in the name mangling of `_import`-ed functions with the `stdcall`
883 ** Added `MLton.Pointer.sizeofPointer`.
886 ** Added expert command line switch `-emit-main {true|false}`.
889 ** Fixed bug in Windows code to page the heap to disk when unable to grow the
890 heap to a desired size. Thanks to Sami Evangelista for the bug report.
893 ** Implemented `MLton.Cont.isolate`.
896 ** Fixed bug in *NIX code to page the heap to disk when unable to grow the
897 heap to a desired size. Thanks to Nicolas Bertolotti for the bug report and
901 ** More flexible active/paused stack resizing policy. +
902 Removed `thread-shrink-ratio` runtime option. + Added
903 `stack-current-grow-ratio`, `stack-current-max-reserved-ratio`,
904 `stack-current-permit-ratio`, `stack-current-shrink-ratio`,
905 `stack-max-reserved-ratio`, and `stack-shrink-ratio` runtime options.
908 ** Fixed bugs in Basis Library where the representations of `OS.IO.iodesc`,
909 `Posix.IO.file_desc`, `Posix.Signal.signal`, `Socket.sock`,
910 `Socket.SOGK.sock_type` as integers were exposed.
913 ** Added unsafe versions of all of the monomorphic array and vector
917 ** Fixed bug in Basis Library where the representation of `OS.Process.status`
918 as an integer was exposed.
921 ** Fixed space-safety bug in RefFlatten optimization (to flatten refs into
922 containing data structure). Thanks to Daniel Spoonhower for the bug report and
923 initial diagnosis and patch.
926 ** Various updates to GC statistics gathering. Some basic GC statistics can
927 be accessed from SML by `MLton.GC.Statistics.*` functions.
930 ** Added primitive (structural) polymorphic hash.
933 ** Fixed frontend to accept `op _longvid_` patterns and expressions. Thanks to
934 Florian Weimer for the bug report.
937 ** Extended `-show-def-use` output to include types of variable definitions.
940 ** Extended `MLton_equal` to be a structural equality on all types, including
941 `real` and `->` types.
944 ** Changed ML-Yacc and ML-Lex to output line directives so that MLton's
945 def-use information points to the source files (`.grm` and `.lex`) instead of
946 the generated implementations (`.grm.sml` and `.lex.sml`).
949 ** Added runtime option `may-page-heap {false|true}`. By default, MLton will
950 not page the heap to disk when unable to grow the heap to a desired size.
951 (Previously, this behavior was the default, with no means to disable, with
952 security and least-surprise concerns.) Thanks to Wesley Terpstra for the
954 ** Fixed bug the FFI visible representation of `Int16.int ref` (and references
955 of other primitive types smaller than 32-bits) on big-endian platforms. Thanks
956 to Dave Herman for the bug report.
959 ** Fixed bug in `ImperativeIOExtra.canInput` (`TextIO.canInput`). Thanks to
960 Ville Laurikari for the bug report.
963 ** Better constant folding of `IntInf` operations.
966 ** Fixed bug in algebraic simplification of `RealX` primitives. `Real.<= (x,
967 x)` is `false` when `x` is `NaN`.
970 ** Fixed bug in type inference of flexible records. This would later cause
971 the compiler to raise the `TypeError` exception. Thanks to Wesley Terpstra for
975 ** Fixed bug in cross-compilation of `gdtoa` library. Thanks to Wesley
976 Terpstra for the bug report and patch.
979 ** Fixed bug in RefFlatten optimization (pass to flatten refs into containing
980 data structure). Thanks to Ruy LeyWild for the bug report.
983 ** Fixed bug in the handling of weak pointers by the mark-compact garbage
984 collector. Thanks to Sean McLaughlin for the bug report and Florian Weimer for
985 the initial diagnosis.
988 ** Added `%posint` command to `ml-lex`, to set the `yypos` type and allow the
989 lexing of multi-gigabyte input files. Thanks to Florian Weimer for the feature
990 concept and original patch.
993 ** Added command-line switch `-mlb-path-var '<name> <value>'` for specifying
997 ** Allow numeric characters in MLB path variables.
1000 ** Fixed bug in elaboration of structures with signature constraints. This
1001 would later cause the compiler to raise the `TypeError` exception. Thanks to
1002 Vesa Karvonen for the bug report.
1005 ** Fixed bug in interaction of `_export`-ed functions and signal
1006 handlers. Thanks to Sean McLaughlin for the bug report.
1009 ** Fixed bug in implementation of `_export`-ed functions using `char`
1010 type. Thanks to Katsuhiro Ueno for the bug report.
1015 Here are the changes from version 20051202 to version 20070826.
1020 ** amd64-linux, amd64-freebsd
1023 ** x86-darwin (Mac OS X)
1025 ** Support for 64-bit platforms.
1026 *** Native amd64 codegen.
1027 ** Command-line switches.
1028 *** Added: `-codegen amd64`, `-codegen x86`, `-default-type <type>`,
1029 `-profile-val {false|true}`.
1030 *** Changed: `-stop f` (file listing now includes `.mlb` files)
1031 ** Bytecode codegen.
1032 *** Support for profiling.
1033 *** Support for exception history.
1035 ** ML Basis annotations.
1036 *** Removed: `allowExport`, `allowImport`, `sequenceUnit`, `warnMatch`.
1039 *** Added: `PackWord16Big, `PackWord16Little`, `PackWord64Big`,
1041 *** Bug Fixes: see changelog.
1042 ** `MLton` structure.
1043 *** Added: `MLTON_MONO_ARRAY`, `MLTON_MONO_VECTOR`, `MLTON_REAL`,
1044 `MLton.BinIO.tempPrefix`, `MLton.CharArray`, `MLton.CharVector`,
1045 `MLton.IntInf.BigWord`, `MLton.IntInf.SmallInt`,
1046 `MLton.Exn.defaultTopLevelHandler`, `MLton.Exn.getTopLevelHandler`,
1047 `MLton.Exn.setTopLevelHandler`, `MLton.LargeReal`, `MLton.LargeWord`,
1048 `MLton.Real`, `MLton.Real32`, `MLton.Real64`, `MLton.Rlimit.Rlim`,
1049 `MLton.TextIO.tempPrefix`, `MLton.Vector.create`, `MLton.Word.bswap`,
1050 `MLton.Word8.bswap`, `MLton.Word16`, `MLton.Word32`, `MLton.Word64`,
1051 `MLton.Word8Array`, `MLton.Word8Vector`.
1052 *** Changed: `MLton.Array.unfoldi`, `MLton.IntInf.rep`, `MLton.Rlimit`,
1053 `MLton.Vector.unfoldi`.
1054 *** Deprecated: `MLton.Socket`
1056 *** Added: MLRISC libary.
1057 *** Updated: ckit library, SML/NJ library.
1063 ** Removed deprecated ML Basis annotations.
1066 ** Fixed bug in treatment of `Real<N>.{scan,fromString}` operations.
1067 `Real<N>.{scan,fromString}` were using `TO_NEAREST` semantics, but should obey
1068 current rounding mode. (Only `Real<N>.fromDecimal` is specified to always
1069 have `TO_NEAREST` semantics.) Thanks to Sean McLaughlin for the bug report.
1072 ** Fixed bugs in constant-folding of floating-point operations with C codegen.
1075 ** Fixed bug in treatment of floating-point operations. Floating-point
1076 operations depend on the current rounding mode, but were being treated as
1077 pure. Thanks to Sean McLaughlin for the bug report.
1080 ** Added `MLton.Exn.{default,get,set}TopLevelHandler`.
1083 ** Restored `native` option to `-codegen` flag.
1086 ** Fixed bug in `Real32.toInt`: conversion of real values close to
1087 `Int.maxInt` could be incorrect.
1090 ** Updates to bytecode code generator: support for amd64-* targets, support
1091 for profiling (including exception history).
1092 ** Fixed bug in `Socket` module of Basis Library; unmarshalling of socket
1093 options (for `get*` functions) used `andb` rather than `orb`. Thanks to Anders
1094 Petersson for the bug report (and patch).
1097 ** Fixed bug in `Date` module of Basis Library; some functions would
1098 erroneously raise `Date` when given a year <= 1900. Thanks to Joe Hurd for the
1100 ** Fixed a long-standing bug in monomorphisation pass. Thanks to Vesa Karvonen
1104 ** Native amd64 code generator for amd64-* targets.
1105 ** Eliminate `native` option from `-codegen` flag.
1106 ** Add `x86` and `amd64` options to `-codegen` flag.
1109 ** Improved type checking of RSSA and Machine ILs.
1112 ** Fixed aliasing issues with `basis/Real/*.c` files.
1113 ** Added real/word casts in `MLton` structure.
1116 ** Added primitives for bit cast of word to/from real.
1117 ** Implement `PackReal<N>{Big,Little}` using `PackWord<N>{Big,Little}` and bit
1121 ** Move all system header `#include`-s to `platform/` os headers.
1122 ** Use C99 `<assert.h>`, rather than custom `"assert.{h,c}"`.
1125 ** Implement `PackWord<N>{Big,Little}` entirely in ML, using an ML byte swap
1129 ** Change amd64-* target platforms from 32-bit compatibility mode (i.e.,
1130 `-m32`) to 64-bit mode (i.e., `-m64`). Currently, only the C codegen is able
1131 to generate 64-bit executables.
1134 ** Removed expert command line switch `-coalesce <n>`.
1135 ** Added expert command line switch `-chunkify {coalesce<n>|func|one}`.
1138 ** Fixed bug in `PackReal<N>.toBytes`. Thanks to Eric McCorkle for the bug
1142 ** Added command line switch `-profile-val`, to profile the evaluation of
1143 `val` bindings; this is particularly useful with exception history for
1144 debugging uncaught exceptions at the top-level.
1147 ** Added command line switch `-show {anns|path-map}` and deprecated command
1148 line switch `-show-anns {false|true}`. Use `-show path-map` to see the
1149 complete MLB path map as seen by the compiler.
1152 ** Changed the output of command line switch `-stop f` to include `.mlb`
1153 files. This is useful for generating Makefile dependencies. The old output
1154 is easy to recover if necessary (e.g. `grep -v '\.mlb$'`).
1157 ** Added command line switches `-{,target}-{as,cc,link}-opt-quote`, which pass
1158 their argument as a single argument to `gcc` (i.e., without tokenization at
1159 spaces). These options support using headers and libraries (including the
1160 MLton runtime headers and libraries) from a path with spaces.
1163 ** Extensive reorganization of garbage collector, runtime system, and Basis
1164 Library implementation. (This is in preparation for future 64bit support.)
1165 They should be more C standards compliant and easier to port to new systems.
1167 *** Disallow nested indirect types (e.g., `int array array`).
1170 ** Fixed a bug in elaboration of FFI forms; unary FFI types (e.g., `array`,
1171 `ref`, `vector`) could be used in places where `MLton.Pointer.t` was required.
1172 This would later cause the compiler to raise the `TypeError` exception, along
1173 with a lot of XML IL.
1176 ** On *-darwin, work with GnuMP installed via Fink or MacPorts.
1179 ** Ported to x86-darwin.
1182 ** Added missing specification of `find` to the `MONO_VECTOR` signature.
1185 ** Fixed a bug in Useless SSA optimization, caused by calling an imported C
1186 function and then ignoring the result.
1189 ** Fixed a bug in pass to flatten data structures. Thanks to Joe Hurd for the
1193 ** Fixed a bug in the native codegen's implementation of the C-calling
1197 ** Ported to PowerPC-AIX.
1198 ** Fixed a bug in the runtime for the cases where nonblocking IO with sockets
1199 was implemented using `MSG_DONTWAIT`. This flag does not exist on AIX,
1200 Cygwin, HPUX, and MinGW and was previously just ignored. Now the runtime
1201 simulates the flag for these platforms (except MinGW, yet, where it's still
1205 ** Added `-default-type '<ty><N>'` for specifying the binding of default types
1206 in the Basis Library (e.g., `Int.int`).
1209 ** Ported to HPPA-HPUX.
1210 ** Fixed `PackReal{,32,64}{Big,Little}` to follow the Basis Library
1214 ** Fixed a bug in `MLton.share` that could cause a segfault.
1217 ** Changed `MLton.Vector.unfoldi` to return the state in addition to the
1221 ** Added `MLton.Vector.create`, a more powerful vector-creation function than
1222 is available in the basis library.
1225 ** Added MLRISC from SML/NJ 110.57 to standard distribution.
1228 ** Fixed bug in SSA simplifier that could eliminate an irredundant test.
1231 ** Ported a bugfix from SML/NJ for a bug with the combination of `withNack`
1235 ** Support compiler specific annotations in ML Basis files. If an annotation
1236 contains `:`, then the text preceding the `:` is meant to denote a compiler.
1237 For MLton, if the text preceding the `:` is equal to `mlton`, then the
1238 remaining annotation is scanned as a normal annotation. If the text preceding
1239 the `:` is not-equal to `mlton`, then the annotation is ignored, and no
1243 ** Fixed bug in elaboration of functors; a program with a very large number of
1244 functors could exhibit the error `ElaborateEnv.functorClosure: firstTycons`.
1249 Here are the changes from version 20041109 to version 20051202.
1253 * New license: BSD-style instead of GPL.
1255 ** hppa: Debian Linux.
1258 ** improved exception history.
1259 ** Command-line switches.
1260 *** Added: `-as-opt`, `-mlb-path-map`, `-target-as-opt`, `-target-cc-opt`.
1261 *** Deprecated: none.
1262 *** Removed: `-native`, `-sequence-unit`, `-warn-match`, `-warn-unused`.
1264 ** FFI syntax changes and extensions.
1265 *** Added: `_symbol`.
1266 *** Changed: `_export`, `_import`.
1267 *** Removed: `_ffi`.
1268 ** ML Basis annotations.
1269 *** Added: `allowFFI`, `nonexhaustiveExnMatch`, `nonexhaustiveMatch`,
1270 `redundantMatch`, `sequenceNonUnit`.
1271 *** Deprecated: `allowExport`, `allowImport`, `sequenceUnit`, `warnMatch`.
1274 *** Added: `Int1`, `Word1`.
1275 ** `MLton` structure.
1276 *** Added: `Process.create`, `ProcEnv.setgroups`, `Rusage.measureGC`,
1277 `Socket.fdToSock`, `Socket.Ctl.getError`.
1278 *** Changed: `MLton.Platform.Arch`.
1280 *** Added: ckit library, ML-NLFFI library, SML/NJ library.
1282 ** updates of `mllex` and `mlyacc` from SML/NJ.
1283 ** added `mlnlffigen`.
1284 ** profiling supports better inclusion/exclusion of code.
1289 ** Updated SML/NJ Library and CKit Library from SML/NJ 110.57.
1292 ** Fixed a bug in `MLton.ProcEnv.setgroups`.
1295 ** Fixed a bug in the interleaving of lexing/parsing and elaborating of ML
1296 Basis files, which would raise an unhandled `Force` exception on cyclic basis
1297 references. Thanks to John Dias for the bug report.
1300 ** Fixed two bugs in `Time.scan`. One would raise `Time` on a string with a
1301 large fractional component. Thanks to Carsten Varming for the bug report.
1302 The other failed to scan strings with an explicit sign followed by a decimal
1306 ** Removed `MLton.GC.setRusage`.
1307 ** Added `MLton.Rusage.measureGC`.
1310 ** Fixed bug in display of types with large numbers of type variables, which
1311 could cause unhandled exception `Chr`.
1314 ** Fixed bug in type inference of flexible records that would show up as
1315 `"Type error: variable applied to wrong number of type args"`.
1318 ** Fixed bug in `Real.signBit`, which had assumed that the underlying C
1319 signbit returned 0 or 1, when in fact any nonzero value is allowed to indicate
1323 ** Added `-mlb-path-map` switch.
1326 ** Fixed bug in `MLton.Finalizable.touch`, which was not keeping alive
1327 finalizable values in all cases.
1330 ** Added SML/NJ Library and CKit Library from SML/NJ 110.55 to standard
1332 ** Fixed bug in `Socket.Ctl.*`, which got the endianness wrong on big-endian
1333 machines. Thanks to Wesley Terpstra for the bug report and fix.
1334 ** Added `MLton.GC.setRusage`.
1335 ** Fixed bug in `mllex`, which had file positions starting at 2. They now
1339 ** Fixed bug in `LargeInt.scan`, which should skip leading `"0x"` and `"0X"`.
1340 Thanks to Wesley Terpstra for the bug report and fix.
1343 ** Additional revisions of FFI:
1344 *** Deprecated `_export` with incomplete annotation.
1345 *** Added `_address` for address of C objects.
1346 *** Eliminated address component of `_symbol`.
1347 *** Changed the type of the `_symbol*` expression.
1348 *** See documentation for more detail.
1351 ** Annotation changes:
1352 *** Deprecated: `sequenceUnit`
1353 *** Added: `sequenceNonUnit`
1356 ** Annotation changes:
1357 *** Deprecated: `allowExport`, `allowImport`, `warnMatch`
1358 *** Added: `allowFFI`, `nonexhaustiveExnMatch`, `nonexhaustiveMatch`,
1362 ** Update `mllex` and `mlyacc` with SML/NJ 110.55+ versions. This
1363 incorporates a small number of minor bug fixes.
1366 ** Fixed bug in pass to flatten refs into containing data structure.
1370 *** Deprecated `_import` of C base types.
1371 *** Added `_symbol` for address, getter, and setter of C base types.
1372 *** See documentation for more detail.
1375 ** Update `mllex` and `mlyacc` with SML/NJ 110.55 versions. This incorporates
1376 a small number of minor bug fixes.
1379 ** Fixed bug in front end that allowed unary constructors to be used without
1380 an argument in patterns.
1383 ** Eliminated `_ffi`, which has been deprecated for some time.
1386 ** Fixed bug in runtime that caused getrusage to be called on every GC, even
1387 if timing info isn't needed.
1390 ** Fixed bug in closure conversion tickled by making a weak pointer to a
1394 ** Changed `{OS,Posix}.Process.sleep` to call `nanosleep()` instead of
1396 ** Added `MLton.ProcEnv.setgroups`.
1399 ** `InetSock.{any,toAddr}` raise `SysErr` if port is not in [0, 2^16^).
1402 ** Fixed bug in `Socket.recvVecFrom{,',NB,NB'}`. The type was too polymorphic
1403 and allowed the creation of a bogus `sock_addr`.
1406 ** The front end now reports errors on encountering undefined or cyclicly
1407 defined MLB path variables.
1410 ** Fixed bug in `Posix.IO.{getlk,setlk,setlkw}` that caused a link-time error:
1411 undefined reference to `Posix_IO_FLock_typ`.
1412 ** Improved exception history so that the first entry in the history is the
1413 source position of the raise, and the rest is the call stack.
1416 ** Improved exception history for `Overflow` exceptions.
1419 ** Fixed a bug in pass to flatten refs into containing data structure.
1422 ** Fixed a front-end bug that could cause an internal bug message of the form
1423 `"missing flexInst"`.
1426 ** Fixed a bug in the representation of flat arrays/vectors that caused
1427 incorrect behavior when the element size was 2 or 4 bytes and there were
1428 multiple components to the element (e.g. `(char * char) vector`).
1431 ** Fixed a bug in `GC_arrayAllocate` that could cause a segfault.
1434 ** Added structures `Int1`, `Word1`.
1437 ** Fixed a bug that caused `Socket.Ctl.{get,set}LINGER` to raise `Subscript`.
1438 The problem was in the use of `PackWord32Little.update`, which scales the
1439 supplied index by `bytesPerElem`.
1442 ** Fixed a bug in CML mailboxes.
1445 ** Fixed an off-by-one error in `mkstemp` defined in `mingw.c`.
1448 ** Added `mlnlffigen` tool (heavily adapted from SML/NJ).
1451 ** Added MLNLFFI Library (heavily adapted from SML/NJ) to standard
1455 ** Fixed a bug in `OS.path.toString`, which did not raise `InvalidArc` when
1459 ** Fixed a bug in `OS.Path.joinDirFile`, which did not raise `InvalidArc` when
1460 passed a file that was not an arc.
1463 ** Fixed a front end bug that incorrectly rejected expansive __valbind__s with
1464 useless bound type variables.
1467 ** Fixed x86 codegen bug which failed to account for the possibility that a
1468 64-bit move could interfere with itself (as simulated by 32-bit moves).
1471 ** Fixed `Real32.fmt StringCvt.EXACT`, which had been producing too many
1472 digits of precision because it was converting to a `Real64.real`.
1475 ** Replaced MLB path variable `MLTON_ROOT` with `SML_LIB`, to use a more
1476 compiler-independent name. We will keep `MLTON_ROOT` aliased to `SML_LIB`
1477 until after the next release.
1480 ** `Unix.create` now works on all platforms (including Cygwin and MinGW).
1483 ** Added support for `MLton.Process.create`, which works on all platforms
1484 (including Windows-based ones like Cygwin and MinGW) and allows better control
1485 over `std{in,out,err}` for child process.
1490 Here are the changes from version 20040227 to 20041109.
1495 ** x86: FreeBSD 5.x, OpenBSD
1496 ** PowerPC: Darwin (MacOSX)
1497 * Support for MLBasis files.
1498 * Support for dynamic libraries.
1499 * Support for Concurrent ML (CML).
1500 * New structures: `Int2`, `Int3`, ..., `Int31` and `Word2`, `Word3`, ..., `Word31`.
1501 * A new form of profiling: `-profile count`.
1502 * A bytecode generator.
1503 * Data representation improvements.
1504 * `MLton` structure changes.
1505 ** Added: `share`, `shareAll`
1506 ** Changed: `Exn`, `IntInf`, `Signal`, `Thread`.
1507 * Command-line switch changes.
1509 *** `-native` (use `-codegen`)
1510 *** `-sequence-unit` (use `-default-ann`)
1511 *** `-warn-match` (use `-default-ann`)
1512 *** `-warn-unused` (use `-default-ann`)
1514 *** `-detect-overflow`
1515 *** `-exn-history` (use `-const`)
1517 *** `-show-basis-used`
1523 *** `-profile-branch`
1524 *** `-target-link-opt`
1529 ** Extended `_import` to support indirect function calls.
1532 ** Made `Date.{fromString,scan}` accept a space (treated as zero) in the first
1533 character of the day of the month.
1536 ** Fixed bug in `IntInf` that could cause a segfault.
1537 ** Remove `MLton.IntInf.size`.
1540 ** Made `-detect-overflow` and `-safe` expert options.
1543 ** Added `val MLton.share: 'a -> unit`, which maximizes sharing in a heap
1547 ** Fixed bug in `Real.toLargeInt`. It would incorrectly raise `Option`
1548 instead of `Overflow` in the case when the real was not an `INF`, but rounding
1550 ** Fixed bugs in `Date.{fmt,fromString,scan,toString}`. They incorrectly
1551 allowed a space for the first character in the day of the month.
1554 ** Changed `MLton.{Thread,Signal,World}` to distinguish between implicitly and
1555 explicitly paused threads.
1558 ** Added support for programming in the large using the ML Basis system.
1561 ** Fixed bugs in `ListPair.*Eq` functions, which incorrectly raised the
1562 `UnequalLengths` exception.
1565 ** Added `val MLton.Exn.addExnMessager: (exn -> string option) -> unit`.
1568 ** Runtime system options that take memory sizes now accept a "`g`" suffix
1569 indicating gigabytes. They also now take a real instead of an integer,
1570 e.g. `fixed-heap 0.5g`. They also now accept uppercase, e.g. `150M`.
1573 ** Added support for OpenBSD.
1576 ** Added support for FreeBSD 5.x.
1579 ** Deprecated the `-native` flag. Instead, use the new flag `-codegen
1580 {native|bytecode|C}`. This is in anticipation of adding a bytecode compiler.
1583 ** Fixed a front-end bug that could cause cascading error to print a very
1584 large and unreadable internal bug message of the form `"datatype ... realized
1585 with scheme Unknown"`.
1588 ** Automatically restart functions in the Basis Library that correspond
1589 directly to interruptable system calls.
1592 ** Added `-profile count`, for dynamic counts of function calls and branches.
1593 ** Equate the types `Posix.Signal.signal` and `Unix.signal`.
1596 ** Fixed a bug with `-basis 1997` that would cause type errors due to
1597 differences between types in the MLton structure and types in the rest of the
1601 ** Fixed a bug with sharing constraints in signatures that would sometimes
1602 mistakenly treat two structures as identical when they shouldn't have been.
1603 This would cause some programs to be mistakenly rejected.
1606 ** Added `MLton.Signal.{handled,restart}`.
1609 ** Added `Timer.checkCPUTimes`, and updated the `Timer` structure to match the
1610 latest basis spec. Also fixed `totalCPUTimer` and `totalRealTimer`, which
1614 ** Added `MLton.Signal.Mask.{getBlocked,isMember}`.
1617 ** Fix bug that mistakenly generalized variable types containing unknown types
1618 when matching against a signature.
1619 ** Reasonable front-end error message when unification causes recursive
1623 ** Fixed bug in sharing constraints so that `sharing A = B = C` means that all
1624 pairs `A = B`, `A = C`, `B = C` are shared, not just `A = B` and `B = C`.
1625 This matters in some situations.
1628 ** Fixed `Time.now` which was treating microseconds as nanoseconds.
1631 ** Fixed SSA optimizer bug that could cause the error `"<type> has no
1632 tyconInfo property"`.
1635 ** Fixed `Time.fromReal` to raise `Time`, not `Overflow`, on unrepresentable
1639 ** Added structures `Word2`, `Word3`, ..., `Word31`.
1642 ** Added structures `Int2`, `Int3`, ..., `Int31`.
1643 ** Fixed bug in elaboration of `and` with signatures, structures, and functors
1644 so that it now evaluates all right-hand sides before binding any left-hand
1650 Here are the changes from version 20030716 to 20040227.
1654 * The front end now follows the Definition of SML and produces readable error
1656 * Added support for NetBSD.
1657 * Basis library changes tracking revisions to the specification.
1658 * Added structures: `Int64`, `Real32`, `Word64`.
1659 * File positions use `Int64`.
1660 * Major improvements to `-show-basis`, which now displays the basis in a very
1661 readable way with full type information.
1662 * Command-line switch changes.
1663 ** Deprecated: `-basis`.
1664 ** Removed: `-lib-search`, `-link`, `-may-load-world`, `-static`.
1665 ** Added: `-link-opt`, `-runtime`, `-sequence-unit`, `-show-def-use`,
1666 `-stop tc`, `-warn-match`, `-warn-unused`.
1667 ** Changed: `-export-header`, `-show-basis`, `-show-basis-used`.
1668 ** Renamed: `-host` to `-target`.
1670 ** Renamed `_ffi` as `_import`.
1671 ** Added `cdecl` and `stdcall` attributes to `_import` and `_export`
1673 * MLton structure changes.
1676 ** Changed: `Finalizable`, `IntInf`, `Platform`, `Random`, `Signal`, `Word`.
1681 ** Changed `-export-header`, `-show-basis`, `-show-basis-used` to take a file
1682 name argument, and they no longer force compilation to halt.
1683 ** Added `-show-def-use` and `-warn-unused`, which deal with def-use
1687 ** Added flag `-sequence-unit`, which imposes the constraint that in the
1688 sequence expression `(e1; e2)`, `e1` must be of type `unit`.
1691 ** Lots of changes to `MLton.Signal`: name changes, removal of superfluous
1692 functions, additional functions.
1695 ** Extended `-show-basis` so that when used with an input program, it shows
1696 the basis defined by the input program.
1697 ** Added `stop` runtime argument.
1698 ** Made `-call-graph {false|true}` an option to `mlprof` that determines
1699 whether or not a call graph file is written.
1702 ** Fixed a bug in `IEEEReal.{fromString,scan}`, which would improperly return
1703 `INF` instead of `ZERO` for things like `"0.0000e123456789012345"`.
1704 ** Fixed a bug in `Real.{fromDecimal,fromString,scan}`, which didn't return an
1705 appropriately signed zero for `~0.0`.
1706 ** Fixed a bug in `Real.{toDecimal,fmt}`, which didn't correctly handle
1708 ** Report a compile-time error on unrepresentable real constants.
1711 ** Removed option `-may-load-world`. You can now use `-runtime no-load-world`
1713 ** Removed option `-static`. You can now use `-link-opt -static` instead.
1714 ** Changed `MLton.IntInf.size` to return 0 instead of 1 on small ints.
1717 ** Fixed horrible bug in `MLton.Random.alphaNumString` that caused it to
1718 return 0 for all characters beyond position 11.
1721 ** Removed `-basis` as a normal flag. It is still available as an expert
1722 flag, but its use is deprecated. It will almost certainly disappear after the
1726 ** Allow multiple `@MLton --` runtime args in sequnce. This makes it easier
1727 for scripts to prefix `@MLton` args without having to splice them with other
1731 ** Added support for files larger than 2G. This included changing
1732 `Position` from `Int32` to `Int64`.
1735 ** Added `structure MLton.Pointer`, which includes a `type t` for pointers
1736 (memory addresses, not SML heap pointers) and operations for loading from and
1740 ** Fixed `Timer.checkGCTime` so that only the GC user time is included, not GC
1744 ** Added `-warn-match` to control display nonexhaustive and redundant
1746 ** Fixed space leak in `StreamIO` causing the entire stream to be retained.
1747 Thanks to Jared Showalter for the bug report and fix.
1750 ** Added `-stop tc` switch to stop after type checking.
1753 ** Fixed `Posix.IO.getfl`, which had mistakenly called `fcntl` with `F_GETFD`
1754 instead of `F_GETFL`.
1755 ** Tracking basis library changes:
1756 *** `Socket` module datagram functions no longer return amount written,
1757 since they always write the entire amount or fail. So,
1758 `send{Arr,Vec}To{,'}` now return `unit` instead of `int`.
1759 *** Added nonblocking versions of all the send and recv functions, as well
1760 as accept and connect. So, we now have: `acceptNB`, `connectNB`,
1761 `recv{Arr,Vec}{,From}NB{,'}`, `send{Arr,Vec}{,To}NB{,'}`.
1764 ** Tracking basis library changes:
1765 *** `TextIO.inputLine` now returns a `string option`.
1766 *** Slices used in `Byte`, `PRIM_IO`, `PrimIO`, `Posix.IO`, `StreamIO`.
1767 *** `Posix.IO.readVec` raises `Size`, not `Subscript`, with negative
1771 ** Fixed `Real.toManExp` so that the mantissa is in [0.5, 1), not [1, 2). The
1772 spec says that 1.0 <= man * radix < radix, which since radix is 2, implies
1773 that the mantissa is in [0.5, 1).
1774 ** Added `Time.{from,to}Nanoseconds`.
1777 ** Added `Real.realRound`.
1778 ** Added `Char{Array,Vector}Slice` to `Text`.
1781 ** `OS.IO.poll` and `Socket.select` now raise errors on negative timeouts.
1782 ** `Time.time` is now implemented using `IntInf` instead of `Int`, which means
1783 that a much larger range of time values is representable.
1786 ** `Word64` is now there.
1789 ** Replaced `Pack32{Big,Little}` with `PackWord32{Big,Little}`.
1790 ** Fixed bug in `OS.FileSys.fullPath`, which mistakenly stopped as soon as it
1791 hit a symbolic link.
1794 ** Fixed `@MLton max-heap`, which was mistakenly ignored. Cleaned up `@MLton
1795 fixed-heap`. Both `fixed-heap` and `max-heap` can use copying or mark-compact
1799 ** `Int64` is completely there.
1800 ** Fixed `OS.FileSys.tmpName` so that it creates the file, and doesn't use
1801 `tmpnam`. This eliminates an annoying linker warning message.
1804 ** Added structures `{LargeInt,LargeReal,LargeWord,Word}{Array,Array2,ArraySlice,Vector,VectorSlice}`
1805 ** Fixed bug in `Real.toDecimal`, which return class `NORMAL` for subnormals.
1806 ** Fixed bug in `Real.toLargeInt`, which didn't return as precise an integer
1810 ** Lots of fixes to `REAL` functions.
1811 *** `Real32` is now completely in place, except for `Real32.nextAfter` on
1813 *** Fixed `Real.Math.exp` on x86 to return the right value when applied to
1814 `posInf` and `negInf`.
1815 *** Changed `Real.Math.{cos,sin,tan}` on x86 to always use a call to the C
1816 math library instead of using the x86 instruction. This eliminates some
1817 anomalies between compiling `-native false` and `-native true`.
1818 *** Change `Real.Math.pow` to handle exceptional cases in the SML code.
1819 *** Fixed `Real.signBit` on Sparcs.
1822 ** Fixed `PackReal{,64}Little` to work correctly on Sparc.
1823 ** Added `PackReal{,64}Big`, `PackReal32{Big,Little}`.
1824 ** Added `-runtime` switch, which passes arguments to the runtime via
1825 `@MLton`. These arguments are processed before command line switches.
1826 ** Eliminated MLton switch `-may-load-world`. Can use `-runtime` combined
1827 with new runtime switch `-no-load-world` to disable load world in an
1831 ** Changed `-host` to `-target`.
1832 ** Split `MLton.Platform.{arch,os}` into `MLton.Platform.{Arch,OS}.t`.
1835 ** Fixed bug in C codegen that would cause undefined references to
1836 `Real_{fetch,move,store}` when compiling on Sparcs with `-align 4`.
1839 ** Eliminated `-link` and `-lib-search`, which are no longer needed.
1840 Eliminated support for passing `-l*`, `-L*`, and `*.a` on the command line.
1841 Use `-link-opt` instead.
1844 ** Added `-link-opt`, for passing options to `gcc` when linking.
1847 ** Renamed `_ffi` as `_import`. The old `_ffi` will remain for a while, but
1848 is deprecated and should be replaced with `_import`.
1849 ** Added attributes to `_export` and `_import`. For now, the only attributes
1850 are `cdecl` and `stdcall`.
1855 Here are the changes from version 20030711 to 20030716.
1859 * Fixed several serious bugs with the 20030711 release.
1864 ** Fixed bug that caused a segfault when attempting to create an
1865 array that was too large, e.g
1867 1 + Array.sub (Array.tabulate (valOf Int.maxInt, fn i => i), 0)
1869 ** mlton now checks the command line arguments following the file to compile
1870 that are passed to the linker to make sure they are reasonable.
1873 ** Fixed packaging for Cygwin and Sparc to include `libgmp.a`.
1874 ** Eliminated bootstrap target. The `Makefile` automatically determines
1875 whether to bootstrap or not.
1876 ** Fixed XML type checker bug that could cause error: `"empty tyvars in
1880 ** Turned off `FORCE_GENERATIONAL` in gc. It had been set, which caused the
1881 gc to always use generational collection. This could seriously slow apps down
1887 Here are the changes from version 20030312 to 20030711.
1891 * Added support for Sparc/SunOS using the C code generator.
1892 * Completed the basis library implementation. At this point, the only missing
1893 basis library function is `use`.
1894 * Added `_export`, which allows one to call SML functions from C.
1895 * Added weak pointers (via `MLton.Weak`) and finalization (via
1896 `MLton.Finalizable`).
1897 * Added new integer modules: `Int8`, `Int16`.
1898 * Better profiling call graphs
1899 * Fixed conversions between reals and their decimal representations to be
1900 correct using the gdtoa library.
1905 ** Profiling improvements:
1906 *** Eliminated `mlton -profile-split`. Added `mlprof -split`. Now the
1907 profiling infrastructure keeps track of the splits and allows one to decide
1908 which splits to make (if any) when `mlprof` is run, which is much better
1909 than having to decide at compile time.
1910 *** Changed `mlprof -graph` to `mlprof -keep`, and changed the behavior so
1911 that `-keep` also controls which functions are displayed in the table.
1912 *** Eliminated `mlprof -ignore`: it's behavior is now subsumed by `-keep`,
1913 whose meaning has changed to be more like -ignore on nodes that are not
1915 ** When calling `gcc` for linking, put `-link` args in same order as they
1916 appeared on the MLton command line (they used to be reversed).
1919 ** Making `OS.Process.{atExit,exit}` conform to the basis library spec in that
1920 exceptions raised during cleaners are caught and ignored. Also, calls to
1921 `exit` from cleaners cause the rest of cleaners to run.
1924 ** Fixed bug with negative `IntInf` constants that could cause compile time
1925 error message: `"x86Translate.translateChunk ... strange Offset: base: ..."`
1926 ** Changed argument type of `MLton.IntInf.Small` from `word` to `int`.
1927 ** Added fix to profiling so that the `mlmon.out` file is written even when
1928 the program terminates due to running out of memory.
1931 ** Added `{Int{8,16},Word8}{,Array,ArraySlice,Vector,VectorSlice,Array2}`
1935 ** Fixed bug in `IntInf.sign`, which returned the wrong value for zero.
1938 ** Added `_export`, for calling from C to SML.
1941 ** Regularization of options:
1942 *** `-diag` --> `-diag-pass`
1943 *** `-drop-pass` takes a regexp
1946 ** Fixed bug in `OS.IO.poll` that caused it to return the input event types
1947 polled for instead of what was actually available.
1950 ** Fixed bug in KnownCase SSA optimization that could case incorrect results
1951 in compiled programs.
1954 ** Fixed bug in SSA optimizer that could cause the error message:
1956 Type error: Type.equals
1957 {from = char vector, to = unit vector}
1958 Type error: analyze raised exception loopStatement: ...
1959 unhandled exception: TypeError
1962 ** Fixed `Real.rem` to work correctly on `inf`-s and `nan`-s.
1963 ** Fixed bug in profiling that caused the function name to be omitted on
1964 functions defined by `val rec`.
1967 ** `Fixed Real.{fmt,fromString,scan,toString}` to match the basis library
1969 ** Added `IEEEReal.{fromString,scan}`.
1970 ** Added `Real.{from,to}Decimal`.
1973 ** Added `Real.nextAfter`.
1974 ** Added `OS.Path.{from,to}UnixPath`, which are the identity function on Unix.
1977 ** Added type `MLton.pointer`, the type of C pointers, for use with the FFI.
1980 ** Fixed two bugs in type inference that could cause the compiler to raise the
1981 `TypeError` exception, along with a lot of XML IL. The `type-check.sml`
1982 regression contains simple examples of what failed.
1983 ** Fixed a bug in the simplifier that could cause the message: `"shrinker
1984 raised Prim.apply raised assertion failure: SmallIntInf.fromWord"`.
1987 ** Fixed bug in `Real.class` introduced on 04-28 that cause many regression
1988 failures with reals when using newer `gcc`-s.
1989 ** Replaced `MLton.Finalize` with `MLton.Finalizable`, which has a more robust
1990 approach to finalization.
1993 ** Fixed bug in `MLton.FFI` on Cygwin that caused `Thread_returnToC` to be
1997 ** Added support for finalization with `MLton.Finalize`.
2000 ** Fixed a runtime system bug that could cause a segfault. This bug would
2001 happen after a GC during heap resizing when copying a heap, if the heap was
2002 allocated at a very low (<10M) address. The bug actually showed up on a
2006 ** Fixed bug in `HashType` that raised `"Vector.forall2"` when the arity of a
2007 type constructor is changed by `SimplifyTypes`, but a newly constructed type
2008 has the same hash value.
2011 ** Switched over to new layered IO implementation, which completes the
2012 implementation of the `BinIO` and `TextIO` modules.
2015 ** Fixed bug that caused an assertion failure when generating a jump table for
2016 a case dispatch on a non-word sized index with non-zero lower bound on the
2020 ** Added `-align {4|8}`, which controls alignment of objects. With `-align
2021 8`, memory accesses to doubles are guaranteed to be aligned mod 8, and so
2022 don't need special routines to load or store.
2025 ** Fixed bug that caused a total failure of time profiling with `-native
2026 false`. The bug was introduced with the C codegen improvements that split the
2027 C into multiple files. Now, the C codegen declares all profile labels used in
2028 each file so that they are global symbols.
2031 ** Added `MLton.Weak`, which supports weak pointers.
2034 ** Replaced the basis library's `MLton.hostType` with `MLton.Platform.arch`
2035 and `MLton.Platform.os`.
2038 ** Added support for SPARC/SunOS using the C codegen.
2041 ** Added `MLton.FFI`, which allows callbacks to SML from C.
2044 ** Fixed `mlprof` so that the default `-graph arg` for data from
2045 `-profile-stack true` is `(thresh-stack x)`, not `(thresh x)`.
2050 Here are the changes from version 20020923 to 20030312.
2054 * Added source-level profiling of both time and allocation.
2055 * Updated basis library to 2002 specification. To obtain the old
2056 library, compile with `-basis 1997`.
2057 * Added many modules to basis library:
2058 ** `BinPrimIO`, `GenericSock`, `ImperativeIO`, `INetSock`, `NetHostDB`,
2059 `NetProtDB`, `NetServDB`, `Socket`, `StreamIO`, `TextPrimIO`, `UnixSock`.
2060 * Completed implementation of `IntInf` and `OS.IO`.
2065 ** Replaced `-profile-combine` wih `-profile-split`.
2068 ** Regularization of options:
2069 *** `-l` --> `-link`
2070 *** `-L` --> `-lib-search`
2071 *** `-o` --> `-output`
2072 *** `-v` --> `-verbose`
2075 ** Added option to `mlton`: `-profile-combine {false|true}`
2078 ** Added options to `mlprof`: `-graph-title`, `-gray`, `-ignore`, `-mlmon`,
2082 ** Added source-level allocation and time profiling. This includes the new
2083 options to mlton: `-profile` and `-profile-stack`.
2086 ** Added `NetHostDB`, `NetProtDB`, `NetServDB` structures.
2087 ** Added `Socket`, `GenericSock`, `INetSock`, `UnixSock` structures.
2090 ** Fixed bug in signal check insertion that could cause some signals to be
2091 missed. The fix was to add a signal check on entry to each function in
2092 addition to at each loop header.
2095 ** Fixed bug in runtime that might cause the message `"Unable to set
2096 cardMapForMutator"`.
2099 ** Added support for the latest Basis Library specification.
2100 ** Added option `-basis` to choose Basis Library version. Currently available
2101 basis libraries are `2002`, `2002-strict`, `1997`, and `none`.
2102 ** Added `IntInf.{orb,xorb,andb,notb,<<,~>>}` values.
2103 ** Added `OS.IO.{poll_desc,poll_info}` types.
2104 ** Added `OS.IO.{pollDesc,pollToIODesc,infoToPollDesc,Poll}` values.
2105 ** Added `OS.IO.{pollIn,pollOut,pollPri,poll,isIn,isOut,isPri}` values.
2106 ** Added `BinPrimIO`, `TextPrimIO` structures.
2107 ** Added `StreamIO`, `ImperativeIO` functors.
2110 ** Fixed bug that caused time profiling to fail (with a segfault) when
2111 resuming a saved world.
2114 ** Fixed bug in `MLton.eq` that could arise when using `eq` on functions.
2117 ** Improvements to polymorphic equality. Equality on IntInfs, vectors, and
2118 dataypes all do an `eq` test first before a more expensive comparison.
2121 ** Added allocation profiling. Now, can compile with either `-profile alloc`
2122 or `-profile time`. Renamed `MLton.Profile` as `MLton.ProfileTime`. Added
2123 `MLton.ProfileAlloc`. Cleaned up and changed most `mlprof` option names.
2126 ** Eliminated `MLton.debug`.
2127 ** Fixed bug in the optimizer that affected `IntInf.fmt`. The optimizer had
2128 been always using base 10, instead of the passed in radix.
2131 ** Fixed `Real.toManExp` so that the mantissa is in [1, 2), not [0.5, 1).
2132 ** Added `Real.fromLargeInt`, `Real.toLargeInt`.
2133 ** Fixed `Real.split`, which would return an incorrect whole part due to the
2134 underlying primitive, `Real_modf`, being treated as functional instead of
2138 ** Fixed `rpath` problem with packaging. All executables in packages
2139 previously made had included a setting for `RPATH`.
2144 Here are the changes from version 20020410 to 20020923.
2148 * MLton now runs on FreeBSD.
2149 * Major runtime system improvements. The runtime now implements mark-compact
2150 and generational collection, in addition to the copying collection that was
2151 there before. It automatically switches between the the collection strategies
2152 to improve performance and to try to avoid paging.
2153 * Performance when compiling `-exn-history true` has been improved.
2154 * Added `IntInf.log2`, `MLton.GC.pack`, `MLton.GC.unpack`.
2155 * Fixed bug in load world that could cause "sread failed" on Cygwin.
2156 * Fixed optimizer bug that could cause `"no analyze var value property"`
2162 ** Integrated Sam Rushing's changes to port MLton to FreeBSD.
2165 ** Changed the implementation of exception history to be completely
2166 functional. Now, the extra field in exceptions (when compiling `-exn-history
2167 true`) is a `string list` instead of a `string list ref`, and `raise` conses a
2168 new exception with a new element in the list instead of assigning to the list.
2169 This changes the semantics of exception history (for the better) on some
2170 programs. See `regression/exnHistory3.sml` for an example. It also
2171 significantly improves performance when compiling `-exn-history true`.
2173 * 2002-07 and 2002-08
2174 ** Added generational GC, and code to the runtime that automatically turns it
2178 ** Fixed SSA optimizer bug that could cause the following error message: `"x_0
2179 has no analyze var value property"`
2182 ** Added `MLton.GC.{pack,unpack}`. `pack` shrinks the heap so that other
2183 processes can use the RAM, and its dual, `unpack`, resizes the heap to the
2186 * 2002-06 and 2002-07
2187 ** Added mark compact GC.
2188 ** Changed array layout so that arrays have three, not two header words. The
2189 new word is a counter word that preceeds the array length and header.
2190 ** Changed all header words to be indices into an array of object descriptors.
2193 ** Added patches from Michael Neumann to port runtime to FreeBSD 4.5.
2196 ** Output file and intermediate file are now saved in the current directory
2197 instead of in the directory containing the input file.
2200 ** Fixed bug in overloading of `/` so that the following now type checks:
2202 fun f (x, y) = x + y / y
2205 ** Added back `max-heap` runtime option.
2208 ** Fixed load/save world so that they use binary mode. This should fix the
2209 `sread failed` problem that Byron Hale saw on Cygwin that caused `mlton` to
2211 ** Added `IntInf.log2`.
2212 ** Changed call to linker to use `libgmp.a` (if it exists) instead of
2213 `libgmp.so`. This is because the linker adds a dependency to a shared library
2214 even if there are no references to it
2217 ** Rewrote heap resizing code. This fixed bug that was triggered with large
2218 heaps and could cause a spurious out of memory error.
2219 ** Removed GnuMP from MLton sources (again :-).
2224 Here are the changes from version 20011006 to version 20020410.
2232 ** Regularization of options
2233 *** `-g` --> `-degug {false|true}`
2234 *** `-h n` --> `-fixed-heap n`
2235 *** `-p` --> `-profile {false|true}`
2238 ** Set up the stubs so that MLton can be compiled in the standard basis
2239 library, with no `MLton` structure. Thus it is now easy to compile MLton with
2240 an older (or newer) version of itself that has a different `MLton` structure.
2243 ** Added `MLton.Process.{spawn,spawne,spawnp}`, which use primitives when
2244 running on Cygwin and fork/exec when running on Linux.
2247 ** Added the ability to cross-compile to Cygwin/Windows.
2250 ** Added GnuMP back for use with Cygwin.
2253 ** Reworked object header words so that `Array.maxLen = valOf Int.maxInt`.
2254 Also fixed a long-standing minor bug in MLton, where `Array.array
2255 (Array.maxLen, ...)` would raise `Size` instead of attempting to allocate the
2256 array. It was an off-by-one error in the meaning of `Array.maxLen`.
2259 ** Modifications to runtime to behave better in situations where the amount of
2260 live data is a signifant fraction of the amount of RAM, based on code from
2261 PolySpace. MLton executables by default can now use more than the available
2262 amount of RAM. Executables will still respect the `max-heap` runtime arg if
2266 ** Improvements to runtime so that it fails to get space, it attempts to get
2267 less space instead of failing. Based on PolySpace's modifications.
2268 ** Added `MLton.eq`.
2271 ** Added `MLton.IntInf.gcd`.
2272 ** Removed GnuMP from MLton sources. We now link with `/usr/lib/libgmp.a`.
2273 ** Added `TextIO.getPosOut`.
2274 ** Renamed type `MLton.Itimer.which` to `MLton.Itimer.t` and
2275 `MLton.Itimer.whichSignal` to `MLton.Itimer.signal`.
2276 ** Added `-coalesce` flag, for use with the C backend.
2279 ** Added `-show-basis-used`, which prints out the parts of the basis library
2280 that the input program uses.
2281 ** Changed several other flags (`-print-at-fun-entry`, `-show-basis`,
2282 `-static`) to follow the `{false|true}` convention.
2285 ** Improved `MLton.profile` so that multiple profile arrays can exist
2286 simultaneously and so that the current one being used can be set from the SML
2290 ** The Machine IL has been replaced with an RSSA (representation explicit SSA)
2291 IL and an improved Machine IL.
2294 ** Added KnownCase SSA optimization
2297 ** Added rudimentary profiling control from with a MLton compile program via
2298 the `MLton.Profile` structure.
2301 ** Fixed bug in match compiler that caused case expressions on datatypes with
2302 redundant cases to be compiled incorrectly.
2305 ** Added redundant tuple construction elimination to SSA shrinker.
2306 ** Improved Flatten SSA optimization.
2309 ** Changed the interface for `MLton.Signal`. There is no longer a separate
2310 `Handler` substructure. This was done so that programs that just use
2311 `default` and `ignore` signal handlers don't bring in the entire thread
2315 ** Added LocalRef elimination SSA optimization.
2318 ** The CPS IL has been replaced with an SSA (static-single assignment) IL.
2319 All of the optimizations have been ported from CPS to SSA.
2322 ** Fixed bug in `Thread_atomicEnd` -- `limit` was mistakenly set to `base`
2323 instead of to 0. This caused assertion failures when for executables compiled
2324 `-g` because `GC_enter` didn't reset `limit`.
2325 ** Fixed bug in register allocation of byte registers.
2328 ** Added `-D` option to `cmcat` for preprocessor defines. Thanks to Anoq for
2330 ** Changed limit check insertion so that limit checks are only coalesced
2331 within a single basic block -- not across blocks. This slows many benchmarks
2332 down, but is needed to fix a bug in the way that limit checks were coalesced
2333 across blocks. Hopefully we will figure out a better fix soon.
2336 ** Fixed type inference of flexrecord so that it now follows the Definition.
2337 Many programs containing flexrecords were incorrectly rejected. Added many
2338 new tests to regression/flexrecord.sml.
2339 ** Changed the behavior of `-keep dot` combined with `-keep pass` for SSA
2340 passes. Dot files are now saved for the program before and after, instead of
2344 ** Fixed a bug in the type inference that caused type variables to be
2345 mistakenly generalized. The bug was exposed in Norman Ramsey's `sled.sml`.
2346 Added a test to `regression/flexrecord.sml` to catch the problem.
2351 Here are the changes from version 20010806 to version 20011006.
2355 * Added `MLton.Exn.history`, which is similar to `SMLofNJ.exnHistory`.
2356 * Support for `#line` directives of the form `(*#line line.col "file"*)`.
2357 * Performance improvements in native codegenerator.
2358 * Bug fixes in front-end, optimizer, register allocator,
2359 `Real.{maxFinite,minPos,toManExp}`, and in heap save and restore.
2364 ** Fixed a bug in polymorphic layered patterns, like
2368 These would always fail due to the variable `a` not being handled correctly.
2369 ** Fixed the syntax of `val rec` so that a pattern is allowed on the left-hand
2370 side of the `=`. Thus, we used to reject, but now accept, the following.
2372 val rec a as b as c = fn _ => ()
2373 val rec a : unit -> unit : unit -> unit = fn () => ()
2375 Thanks again to Andreas Rossberg's test files. This is now tested for in
2377 ** Fixed dynamic semantics of `val rec` so that if `val rec` is used to
2378 override constructor status, then at run time, the `Bind` exception is raised
2379 as per rule 126 of the Definition. So, for example, the following program
2380 type checks and compiles, but raises `Bind` at run time.
2382 val rec NONE = fn () => ()
2385 Again, this is checked in `valrec.sml`.
2386 ** Added `\r\n` to ml.lex so that Windows style newlines are acceptable in
2390 ** Fixed bug in the implementation of `open` declarations, which in the case
2391 of `open A B` had opened `A` and then looked up `B` in the resulting
2392 environment. The correct behaviour (see rule 22 of the Definition) is to
2393 lookup each _longstrid_ in the current environment, and then open them all in
2394 sequence. This is now checked for in the `open.sml` regression test. Thanks
2395 to Andreas Rossberg for pointing this bug out.
2396 ** Fixed bug that caused tyvars of length 1 (i.e. `'`) to be rejected. This
2397 is now checked in the `id.sml` regression test. Again, thanks to Andreas
2398 Rossberg for the test.
2401 ** Fixed bugs in `Real.toManExp` (which always returned the wrong result
2402 because the call to `frexp` was not treated as side-effecting by the
2403 optimizer) and in `Real.minPos`, which was zero because of a mistake with
2404 extra precision bits.
2407 ** Added `MLton.Exn.history`.
2408 ** Fixed register allocation bug with `fucom` instruction. Was allowing
2409 `fucomp` when the first source was not removable.
2410 ** Changed `Real.isFinite` to use the C `math.h` `finite` function. This
2411 fixed the nontermination bug which occurred in any program that used
2415 ** Bug fixes found from Ramsey's `lrtl` in `contify.fun` and
2416 `unused-args.fun`, both of which caused compile-time exceptions to be raised.
2419 ** Fixed `MLton.World.{load,save}` so that the saved world does not store the
2420 max heap size. Instead, the max heap size is computed upon load world in
2421 exactly the same way as at program startup. This fixes a long-standing (but
2422 only recently noticed) problem in which `mlton` (which uses a saved world)
2423 would attempt to use as much memory as was on the machine used to build
2427 ** Overlow checking is now on by default in the C backend. This is a huge
2428 performance hit, but who cares, since we never use the C backend except for
2432 ** Added support for #line directives of the form
2434 (*#line line.col "file"*)
2436 These directives only affect error messages produced by the parser and
2440 ** Fixed bug in RemoveUnused optimzation that caused the following program to
2443 fun f l = case l of [] => f l | _ :: l => f l
2447 ** New x86-codegen infrastructure.
2448 *** support for tracking liveness of stack slots and carrying them in
2449 registers across basic blocks
2450 *** more specific `Entry` and `Transfer` datatypes to make calling convention
2451 distinctions more explicit
2452 *** new heuristic for carrying values in registers across basic blocks (look
2454 *** new "predict" model for generating register allocation hints
2455 *** additional bug fixes
2458 ** `MLton.Socket.shutdownWrite` flushes the outstream.
2463 Here are the changes from version 20010706 to version 20010806.
2467 * `Word.andb (w, 0xFF)` now works correctly
2468 * `MLton.Rusage.rusage` has a patch to work around a linux kernel bug
2469 * Programs of the form `_exp_ ; _program_` are now accepted
2470 * Added the `MLton.Rlimit` structure
2471 * Added the `-keep dot` flag, which produces call graphs, intraprocedural
2472 control-flow graphs, and dominator trees
2477 ** Added simple CommonBlock elimination CPS optimization.
2480 ** Took out `-keep il`.
2483 ** Performance improvements to `TextIO.{input, output, output1}`.
2486 ** Added RedundantTest elimination CPS optimization.
2489 ** Added CommonSubexp elimination CPS optimization.
2492 ** Bug fix to x86 codegen. The `commuteBinALMD` peephole optimization would
2493 rewrite `mov 2,Y; add Y,Y` as `mov Y,Y; add 2,Y`. Now the appropriate
2494 interference checks are made.
2495 ** Added intraprocedural unused argument removal.
2496 ** Added intraprocedural flattener. This avoids some stupid tuple allocations
2497 in loops. Decent speedup on a few benchmarks (`count-graphs`, `psdes-random`,
2498 `wc-scanStream`) and no noticeable slowdowns.
2499 ** Added `-keep dot` flag.
2502 ** Modified grammar to properly handle `val rec`. There were several problems.
2503 *** MLton had accepted `val rec 'a ...` instead of `val 'a rec ...`
2504 *** MLton had not accepted `val x = 13 and rec f = fn () => ()`
2505 *** MLton had not accepted `val rec rec f = fn () => ()`
2506 *** MLton had not accepted `val rec f = fn () => () and rec g = fn () => ()`
2509 ** Workaround for Linux kernel bug that can cause `getrusage` to return a wrong
2510 system time value (low by one second). See `fixedGetrusage` in `gc.c`.
2511 ** Bug fix to x86 codegen. The register allocator could get confused when
2512 doing comparisons of floating point numbers and use the wrong operand. The
2513 bug seems to have never been detected because it only happens when both of the
2514 operands are already on the floating point stack, which is rare, since one is
2515 almost always in memory since we don't carry floating point values in the
2516 stack across basic blocks.
2517 ** Added production to the grammar on page 58 of the Definition that had been
2518 missing from MLton since day one.
2520 program ::= exp ; <program>
2522 Also updated docs to reflect change.
2523 ** Modified grammar to accept the empty program.
2524 ** Added `-type-check` expert flag to turn on type checking in ILs.
2527 ** Bug fix to the algebraic simplifier. It had been rewriting
2528 `Word32.andb (w, 0wxFF)` to `w` instead of
2529 `Word32.andb (w, 0wxFFFFFFFF)` to `w`.
2532 ** Improved CPS shrinker so that `if`-tests where the `then` and `else` branch
2533 jump to the same label is turned into a direct jump.
2534 ** Improved CPS shrinker (`Prim.apply`) to handle constructors
2535 *** `A = A` --> `true`
2536 *** `A = B` --> `false`
2537 *** `A x` = `B y` --> `false`
2538 ** Rewrote a lot of loops in the basis library to use inequalities instead of
2539 equality for the loop termination test so that the (forthcoming) overflow
2540 detection elimination will work on the loop index variable.
2543 ** Fixed minor bugs in `Array2.{array,tabulate}`, `Substring.{slice}` that
2544 caused the `Overflow` exception to be raised instead of `Size` or `Subscript`
2545 ** Fixed bug in `Pack32Big.update` that caused the wrong location to be updated.
2546 ** Fixed several bugs in `Pack32{Big,Little}.{subArr,subVec,update}` that
2547 caused `Overflow` to be raised instead of `Subscript`. Also, improved the
2548 implementation so that bounds checking only occurs once per call (instead of
2549 four times, which was sometimes happening.
2550 ** Fixed bugs in `Time.{toMilliseconds,toMicroseconds}` that could cause a
2551 spurious `Overflow` exception.
2552 ** Fixed bugs in `Time.{fromMilliseconds,fromMicroseconds}` that could cause a
2553 spurious `Time` exception.
2554 ** Improved `Pack32.sub*` by reordering the `orb`-s.
2555 ** Improved `{Int,IntInf}.mod` to increase chances of constant folding.
2556 ** Switched many uses of `+`, `-`, `*` in basis library to the non-overflow
2557 checked versions. Modules changed were: `Array`, `Array2`, `Byte`, `Char`,
2558 `Int`, `IntInf`, `List`, `Pack32{Big,Little}`, `Util`, `String`, `StringCvt`,
2559 `Substring`, `TextIO`, `Time`, `Vector`.
2560 ** Added regression tests for `Array2`, `Int` (overflow checking), `Pack32`,
2561 `Substring`, `Time`.
2562 ** Changed CPS output so that it includes a dot graph for each CPS function.
2565 ** Change `OS.Process.exit` so that it raises an exception if the exit status
2567 ** Added `MLton.Rlimit` to provide access to `getrlimit` and `setrlimit`.
2572 Here are the changes from the 20000906 version to the 20010706 version.
2576 * Native X86 code generator (instead of using `gcc`)
2577 * Significantly improved compile times
2578 * Significantly improved run times for generated executables
2580 * Correct raising of the `Overflow` exception for integer arithmetic
2581 * New modules in the `MLton` structure
2586 ** GC mods from Henry. Mostly adding `inline` declarations.
2589 ** Fixed several runtime bugs involving threads, critical sections, and
2593 ** Fixed performance bug in `cps/two-point-lattice.fun` that caused quadratic
2594 behavior. This affects the raise-to-jump and useless analayses. In
2595 particular, the useless analysis was blowing up when compiling `fxp`.
2598 ** Henry improved `wordAlign` -- this sped up GC by 27% (during a self
2602 ** Moved `MLton.random` to `MLton.Random.rand` and added other stuff to
2604 ** Added `MLton.TextIO.mkstemp`.
2605 ** Made `Int.{div,quot}` respect the `-detect-overflow` switch.
2608 ** Added `MLton.Syslog`.
2611 ** Fixed bug in `MLton.Socket.accept` that was in the runtime implementation
2612 `Socket_accept`. It did a `setsockopt SO_REUSEADDR` after the `accept`. It
2613 should have been after the call to `socket` in `Socket_listen`. Thanks to
2614 Doug Bagley for the fix.
2617 ** Fixed bug in remove-unused that caused polymorphic equality to return
2618 `true` sometimes when constructors were never used in a pattern match. For
2619 example, the following (in which `A` and `B` are not used as patterns):
2623 val _ = if C A = C B then raise Fail "bug" else ()
2626 ** Fixed bug that caused all of the following to fail:
2627 `{LargeWord,Word,SysWord}.{toLargeInt,toLargeIntX,fromLargeInt}` The problem
2628 was the basis library file `integer/patch.sml` which fixed `Word32` but not
2629 the other structures that are the same.
2632 ** Fixed bug in match compiler that caused it to spend a lot of extra time in
2633 deep patterns. It still could be exponential however. Hopefully this will
2634 get fixed in the release after next. This bug could cause very slow compile
2635 times in some cases. Anyways, this fix cut the `finish infer` time of a self
2636 compile down from 22 to under 4 seconds. I.E. most of the time used to be
2637 spent due to this bug.
2640 ** Fixed bug in frontend that caused the wrong file and line number to be
2641 reported with errors in functor bodys.
2643 * 2001-01-03 - 2000-02-05
2644 ** Changes to CoreML, XML, SXML, and CPS ILs to replace lists by vectors in
2645 order to decrease space usage.
2648 ** Fixed a bug in constant propagation where the length of vectors was not
2649 propagated properly.
2651 * 2000-12-11 - 2001-01-03
2652 ** Major rewrite of elaborator to use a single hash table for each namespace
2653 instead of a hash table for every environment.
2656 ** Fixed some bugs in the SML/NJ compatibility library,
2657 `src/lib/mlton-subs-in-smlnj`.
2660 ** More careful removal of tracing code when compiling `MLton_debug=0`. This
2661 cut down self compile data size by 100k and compile time by a few seconds.
2662 ** Added built in character and word cases propagated throughout all ILs.
2665 ** Added max stack size information to `gc-summary`.
2668 ** Added `src/benchmark`, which contains an SML program that benchmarks all of
2669 the SML compilers I have my hands on. The script has lots of hardwired paths
2673 ** Fixed bug in `Posix.ProcEnv.environ,` which did not work correctly in a
2674 saved world (the original `environ` was saved). In fact, it did not work at
2675 all because the ML primitive expected a constant and the C was a nullary
2676 function. This caused a segfault with any program using
2677 `Posix.ProcEnv.environ`.
2678 ** `Added MLton.ProcEnv.setenv`, since there doesn't seem to be any `setenv`
2679 in the basis library.
2682 ** Changed backend so that it should no longer generate machine programs with
2684 ** Added `-detect-overflow` and `-safe` flags.
2686 * 2000-11-27 - 2000-11-28
2687 ** Changes in many places to use `List.revMap` instead of `List.map` to cut
2691 ** Added `MLton.Word.~` and `MLton.Word8.~` to the `MLton` structure.
2694 ** Fixed a bug in the CPS shrinker that could cause a compile-time failure.
2695 It was maintaining occurrence counts incorrectly.
2698 ** Fixed a (performance) bug in constant propagation that caused the hashing
2700 ** Improved translation to XML so that the match compiler isn't called on
2701 tuple or if expressions. This should speed up the translation and make the
2703 ** Fixed a bug in the match compiler that caused it to not generate integer
2704 case statements. This should speed up the mlyacc benchmark and the MLton
2708 ** Added `IntInf_equal` and `IntInf_compare` primitives.
2709 ** Took out the automatic `-keep c` when compiling `-g`.
2712 ** Added a whole bunch of algebraic laws to the CPS shrinker, including some
2713 specifically targeted to `IntInf` primitives.
2716 ** Improved implementation of properties so that sets don't allocate.
2717 ** Improved implementation of type homomorphism in type inference. What was
2718 there before appears to have been a bug -- it didn't use the property on
2722 ** Fixed timers used with `-v` option to use user + sys time.
2725 ** Split the runtime basis library C files into many separate files so that
2726 only the needed code would be included by the linker.
2727 ** Fixed several bugs in the front end grammar and elaborator that caused type
2728 specifications to be handled incorrectly. The following three programs used
2729 to be handled incorrectly, but are now handled correctly.
2731 signature S = sig type t and u = int end (* reject *)
2732 signature S = sig type t = int and u = t end (* accept *)
2733 signature S = sig eqtype t and u = int end (* reject *)
2736 ** Changes to `main.sml` to run complete compiles with `-native` switch.
2739 ** Removed defunctorizer.
2742 ** Fixed bug in `cps-tree.fun` with `PrimExp.maySideEffect`. This bug could
2743 cause `"no operand"` failures in the backend.
2744 ** Fixed bug in the runtime implementation of `MLton.size`. The size for
2745 stack objects was using the `used` instead of `reserved`, and so was too low.
2748 ** Replaced automatically generated dependencies in `src/runtime/Makefile`
2749 with hand generated ones. Took out `make depend` from `src/Makefile`. `make
2750 depend` was behaving really badly on RHAT 7.0.
2751 ** Tweaked compiler to shorten width of C output lines to work around bug in
2752 RHAT 7.0 `cpp` which silently truncates (very) long lines.
2753 ** Fixed bug in grammar that didn't allow `op` to occur in datatype and
2754 exception bindings, causing the following to fail
2757 exception op E = op Fail
2759 ** Improved error messages in CM processor. Fixed bug in CM Alias handling.
2762 ** Fixed two bugs in the gc that did comparisons with `(s->limit -
2763 s->frontier)`, which of course doesn't work if `frontier` is beyond `limit`,
2764 since these are unsigned. This could have caused segfaults, except that the
2765 mutator checks the `frontier` upon return from the GC.
2768 ** Fixed bug in backend in the calculation of `maxFrameSize`. It could be
2769 wrong (low) in some situations.
2770 ** Improved CPS inliner's estimate of function sizes. The size of a function
2771 now takes into account other inlined functions that the function calls. This
2772 also changed the meaning of the size argument to the `-inline` switch. It now
2773 corresponds (roughly) to the product of the size of the function and the
2774 number of calls. In general, it should be larger than before.
2777 ** Made some calls to `Array.sub` unsafe in the implementation of `Array2`.
2778 ** Integrated Matthew's new x86 backend with floating point support.
2781 ** Fixed CM file processor so that MLton works if it is run from a different
2782 directory than the main CM file.
2785 ** Changed LimitCheck so it loops on the `frontier > limit` check. This fixed
2786 a potential bug in threads caused when there is enough space available for a
2787 thread, `t`, before switching to another thread but not enough space when it
2788 resumes. This could have caused a segfault.
2791 ** More rewrites of `TextIO.StreamIO` to improve speed.
2792 ** Changed `TextIO` so that only `TextIO.stdErr` is unbuffered.
2793 ** Changed `TextIO` so that FIFOs and sockets are buffered.
2796 ** Combined remove-unused-constructors, remove-unused-functions, and
2797 remove-unused-globals into a single pass that runs to fixed-point and produces
2798 results at least as good as running the previous three in (any) sequence.
2801 ** Added `GC_FIRST_CHECK`, which does a gc at each limit check the first time
2803 ** Reimplemented `TextIO.StreamIO` (from 2000-09-12) to use lists of strings
2804 instead of lists of characters so that the per char space overhead is small.
2807 ** Fixed bug in profiling labels in C code. The label was always the basic
2808 block label instead of the cps function label.
2809 ** Added `-b` switch to `mlprof` to gather data at the basic block level.
2810 ** Improved performance of `TextIO.input1` by about 3X.
2812 * 2000-09-15 - 2000-09-19
2813 ** Added overflow exceptions to CPS and Machine ILs.
2816 ** Fixed `TextIO.scanStream`. It was very broken.
2817 ** Added `TextIO.{getInstream,mkInstream,setInstream}` and
2818 `TextIO.StreamIO.{canInput,closeIn,endOfStream,input1,input,inputAll,inputLine,inputN}`.
2821 ** Fixed `Real_qequal` in `mlton-lib.h`. It was missing a paren that caused
2822 code using it to not even compile. It was also semantically incorrect.
2823 ** Noted that `Real_{equal,lt,le,gt,ge}` may not follow basis library spec,
2824 since ANSI does not require IEEE compliance, and hence these could return
2825 wrong results when nans are involved.
2830 Here are the changes from the 20000712 version to the 20000906 version.
2834 * Version 20000906 is mostly a bugfix release over 20000712. The other major
2835 changes are that `mllex` and `mlyacc` are now included and that `mlton` can now
2836 process a limited subset of CM files as input.
2841 ** Fixed `Socket_listen` in `mlton-lib.c` so that it closes the socket if the
2842 `bind`, `listen`, or `getsockname` fails. This could have caused a file
2846 ** Added `-static` commandline switch.
2847 ** Changed default max heap size to .85 RAM from .95 RAM.
2848 ** Added `PackRealLittle` structure to basis library.
2851 ** Added cases on integers to ILs (instead of using sequences of tests) so
2852 that backend can emit more efficient test (jump table, binary tree, ...).
2855 ** Fixed bug in `gc.c`. `dfsInitializeStack` would `smummap` a `NULL` pointer
2856 whenver `toSpace` was `NULL`. This could cause `MLton.size` to segfault.
2857 ** Fixed bug in `Popt` that caused `-k` to fail with no keeps.
2859 * 2000-08-22 - 2000-08-23
2860 ** Ported `mllex` and `mlyacc` from SML/NJ
2862 * 2000-08-20 - 2000-08-21
2863 ** Added ability to use a `.cm` file as input to MLton.
2866 ** Ported `mlprof` to SML.
2867 ** Fixed bug in `library/basic/assert.sml` that caused asserts to be run even
2868 when `MLton.debug = false`.
2871 ** Fixed bug in backend -- computation of `maxFrameSize` was wrong. It didn't
2872 count slots in frames that didn't make nontail calls. This could lead to the
2873 stack being overwritten because a stack limit check didn't guarantee enough
2874 space, and lead to a segfault.
2875 ** Fixed bug in `gc.c` `newThreadOfSize`. If the thread allocation caused a
2876 gc, then the stack wasn't forwarded, leading to a segfault. The solution was
2877 to ensure enough memory all at once, and then fill in both objects.
2880 ** Changed limit checks so that checks < 512 bytes are replaced by a check for
2881 0 bytes. The runtime also moves the limit down by 512. This is done so that
2882 the common case, a small limit check, has less code and is faster.
2883 ** Fixed bug in `cps/cps-tree.fun`. `Program.hasPrim` returned `true` for any
2884 program that had *any* primapp, not just programs satisfying the predicate.
2885 This caused `cps/once.fun` to be overly conservative, since it thought that
2886 every program used continuations.
2889 ** Fixed bug in CPS typechecker. It didn't enforce that handlers should be
2890 defined before any reference to them -- including implicit references in
2891 `HandlerPops`. This caused an evil bug in the liveness analysis where a
2892 variable that was only live in the handler was missed in a continuation
2893 because the liveness for the handler wasn't computed yet.
2894 ** Limited the size for moving up limit checks for arrays whose size is known
2895 at compile time to avoid huge limit checks getting moved into loops.
2896 ** added `-indent`, `-kp`, `-show-types` switches.
2897 ** Put optimization in CPS IL suggested by Neal Glew. It determines for each
2898 toplevel function if it can raise an exception to its caller. Also, it
2899 removes `HanderPush` and `HandlerPop` for handlers that are not on top of the
2900 stack for any nontail call.
2903 ** Changed register allocator so that continuation formals can be allocated in
2904 pseudo registers -- they aren't necessarily forced to the stack.
2907 ** Fixed bug in constant folding. `Word8.>>` had been used to implement
2909 ** Fixed bug in allocate registers that was not forcing the size argument to
2910 `Primitive.Array.array` to be a stack slot. This could cause problems if
2911 there was a thread switch in the limit check, since upon return the size
2912 pseudo register would have a bogus value.
2915 ** Turned back on XML simplification after monomorphisation.
2918 ** Fixed bug in `MLton.Itimer.set` that caused the time to be doubled.
2919 ** Fixed bug in `MLton.Thread` that made it look like asynchronous exceptions
2920 were allowed by `throw`-ing an exception raising thunk to an interrupted
2921 thread obtained via a signal handler. Attempting asynchronous exceptions will
2922 now cause process death, with a helpful error message.
2925 ** Updated docs to include `structure World: MLTON_WORLD` in `MLton`
2927 ** Added toplevel signatures `MLTON_{CONT, ..., WORLD}` to basis library.
2928 ** Fixed broken link in docs to CM in `cmcat` section.
2931 ** Eliminated `GC_switchToThread` and `Thread_switchTo1`, since the inlined
2932 version `Thread_switchTo` is all that's needed, and Matt's X86 backend now
2934 ** Added `MLton.Signal.vtalrm`, needed for `Itimer.Set{which =
2935 Itimer.Virtual, ...}`.
2938 ** Added `MLton.Socket.shutdownWrite`.
2941 ** Updated `mlton-lib.c` `MLton_bug` with new email (MLton@sourcelight.com).
2944 ** Fixed `Posix.Process.kill` to check for errors.
2947 ** Fixed the following `Posix.ProcEnv` functions to check for errors:
2948 `setgid`, `setpgid`, `setsid`, `setuid`.
2949 ** Fixed `doc/examples/callcc.sml`.
2954 Here are the changes from the 1999-07-12 to the 20000712 version.
2958 * 2000-06-10 - 2000-07-12
2959 ** Too many changes to count: bug fixes, new basis library modules, optimizer
2963 ** Fixed bug in monomorphiser that caused programs with non-value carrying
2964 exception declarations in polymorphic functions to have a compile-time error
2965 because of a duplicate label. The problem was that the exception constructor
2968 * 2000-05-22 - 2000-06-10
2969 ** Finished the changes for the new CPS IL.
2972 ** Fixed some errors in the basis library:
2974 *** `Posix.FileSys.fpathconf`
2975 *** `Posix.IO.{lseek, getlk, setlk, setlkw}`
2976 *** `Posix.ProcEnv.setpgid`
2977 *** `Posix.TTY.getattr`
2978 *** `System.FileSys.realPath`
2981 ** Fixed bug in `src/closure-convert/abstract-value.fun` that caused a
2982 compiler failure whenever a program had a vector where the element type
2986 ** Changed dead code elimination in `core-ml/dead-code.fun` so that wildcard
2987 declarations (`val _ = ...`) in the basis are kept. Changed places in the
2988 basis library to take advantage of this.
2989 ** Added `setTopLevelHander` primitive so that the basis library code can
2990 define the toplevel handler.
2991 ** Changed `basis-library/misc/suffix.sml` to call `OS.Process.exit`. Took
2992 out `Halt` transfer from CPS, since the program never should reach it.
2993 ** Cleaned up `basis-library/system/{process.sml, unix.sml}` to use the new
2994 signal handling stuff.
2996 * 1999-11-28 - 1999-12-20
2997 ** Added support for threads and cleaned up signal handling. This involved a
2999 *** The stack is now allocated as just another kind of heap object.
3000 *** Limit checks are inserted at all loop headers, whether or not there is
3001 any allocation. This is to ensure that the signal handler always has a
3002 chance to get called.
3003 *** The register allocator puts more variables in stack slots. The new rule
3004 is that a variable goes in a stack slot if it is ever live across a nontail
3005 call, in a handler, or (this is the new part) across a limit check.
3006 *** Arguments are passed on the stack, with the convention determined by
3008 *** The "locals" array of pointers that was copied to/from for GC is now
3009 gone, because no registers (in particular no pointer valued registers) can
3010 be live at a limit check point.
3014 *** Fixed a bug introduced by the signal code (presumably on 1999-08-09)
3015 that caused a gc to *not* be performed when doing a save world. This caused
3016 the heaps created by save world to be the same size as the heap -- not the
3017 live data. This was quite bad.
3018 *** Cleaned up the `Makefile`. Add make depend.
3019 *** Added max gc pause to `gc-summary` info.
3020 *** Move heap translation variables that had been file statics into the
3022 ** Made `structure Position` available at toplevel.
3024 *** Added `MLton.loadWorld`
3025 ** Added `Primitive.usesCallcc`
3026 ** Added `Primitive.safe`
3027 ** Removed special size functions from `cps/save-world` -- they are no longer
3028 necessary since size doesn't do a gc.
3029 ** Fixed another (sigh) bug in `cps/simplify-types.fun` that could cause it to
3033 ** Cleaned up `backend/machine.fun` a bit so that it spits out macros for
3034 allocation of objects and bumping of frontier. Added macros `MLTON_object`
3035 and `MLTON_incFrontier` to `include/mlton-lib.h`.
3036 ** Fixed a bug in `backend/limit-check.fun` that caused loops to not be
3037 detected if they were only reached by a case branch. This could cause there
3038 to be loop that allocates with no limit check. Needless to say, this could
3039 cause a segfault if the loop ran for long enough.
3042 ** Added basis library function `Array2.copy`.
3045 ** Turned off globalization of ref cells (`closure-convert/globalize.fun`)
3046 because it interacts badly with serialization.
3049 ** Fixed bug in `mlton-lib.h` in `MLTON_allocArrayNoPointers` that was
3050 triggered when `bytesPerElt == 0`. The problem was that it wasn't reserving
3051 space for the forwarding pointer. This could cause a segfault.
3053 * 1999-08-08 and 1999-08-09
3054 ** Added support for signal handling.
3057 ** Fixed bugs in `Array.tabulate` (and other `tabulate` variants) caused if
3058 the function argument used `callcc`.
3061 ** Added serialization, which was mostly code in `src/runtime/gc.c`. +
3062 `GC_serialize` converts an object to a `Word8Vector.vector`. +
3063 `GC_deserialize` undoes the conversion. + (de)Serialization should work for
3064 all objects except for functions, because I haven't yet added the support in
3068 ** Cleaned up the GC. Changed headers, by stealing a bit from the number of
3069 non pointers and making it a mark bit (used in `GC_size`).
3070 ** Rewrote `GC_size` so that it runs in time proportional to the number of
3071 pointers in the object. It does a depth-first-search now, using toSpace to
3075 ** Fixed bug in `SUBSTRING`. `getc` had the wrong type. This bug wasn't
3076 noticed because MLton doesn't do enough type checking.
3077 ** Fixed bug (segfault) caused when a GC immediately followed a throw.
3080 ** Fixed bug in `Date.fmt` (`basis-library/system/date.sml`). It was not
3081 setting `Tm.buf`, and hence the time was always 0 unless there had been a
3082 previous call to `setTmBuf`.
3085 ** Fixed bugs in `Posix.IO.FLock.{getlk,setlk,setlkw}`, which would cause
3086 compilation to fail because `FLock.toInt` was defined as the C `castInt`,
3087 which no longer exists. Instead, expand `FLock.toInt` to
3088 `MLTON_pointerToInt`, which was added to `include/mlton-lib.h`.
3089 ** Changed `Posix.Primitive.Flock` to `Posix.Primitive.FLock`.
3090 ** Added `MLTON_chown`, `MLTON_ftruncate` to `include/mlton-posix.h`. They
3091 were missing. This would cause compilation of any program using
3092 `Posix.FileSys.{chown,ftruncate}` to fail. Also made it so all of the
3093 primitives in `basis-library/posix/primitive.sml` use `MLTON_` versions of
3094 functions, even if a wrapper is unnecessary.
3097 ** Added some other missing signature definitions to toplevel.
3100 ** Added missing `OS_*` signature definitions to
3101 `basis-library/top-level/top-level.sml`.
3104 ** Fixed bug in `basis-library/arrays-and-vectors/mono-array.sml`. Used `:>`
3105 instead of `:` so that the monomorphic array types are abstract.
3110 Here are the changes from the 1999-03-19 version to the 1999-07-12 version.
3115 ** Changed `src/backend/machine.fun` so that the 'pointer locals' array is
3116 only as large as neccessary in order to copy all pointer-valued locals, not as
3117 large as the number of pointer-valued locals.
3120 ** Rewrote `src/backend/allocate-registers.fun` so that it does a better job
3121 of sharing "registers" (i.e. C local variables) and stack slots. This should
3122 cut down on the amount of copying that has to happen before and after a gc.
3123 It should also cut down on the size of stack slots.
3126 ** Fixed a bug in `src/backend/parallel-move.fun` that should have been
3127 triggered on most any parallel move. I guess parallel moves almost never
3128 happened due to the old register allocation strategy -- but, with the new one
3129 (see note for 1999-07-12) parallel moves will be frequent.
3132 ** Fixed `src/main.sml` so that when compiling `-p`, the `.c` file is compiled
3133 `-g` and the `.o` is linked `-p`.
3134 ** In `bakend/machine.fun`, added profiling comments before chunkswitches and
3135 put in an optimization to avoid printing repeated profiling comments. Also,
3136 profiling comments are only output when compiling `-p`.
3139 ** Changed `-i` to `-inline`, `-f` to `-flatten`, `-np` to `-no-polyvariance`,
3141 ** Added `-i`, `-I`, `-l`, `-L` flags for includes and libraries.
3142 ** Updated documentation for these options and for ffi.
3145 ** Hardwired version number in `src/control/control.sml`. As it stood, the
3146 version number was computed when MLton was built after someone downloaded it,
3147 which was clearly wrong.
3150 ** Fixed undefined variable `time` in `GC_done` in `src/runtime/gc.c`.
3153 ** in `include/mlton-lib.h`:
3154 *** removed `#include <huge_val.h>`
3155 *** added `#include <math.h>`
3156 *** and deleted all of the function signatures I had copied from `math.h`
3157 ** Changed `Real.{minNormalPos, minPos, maxFinite}` so that they are computed
3158 in `real.sml` instead of appearing as constants in the C.
3161 `IntInf.pow` added to basis library.
3164 ** `bin/mlton` changed to use `.arch-n-opsys` if it exists.
3167 ** `src/Makefile` changed to use `sml-cm` instead of `sml`
3170 ** Patch to `src/atoms/small-int-inf.fun` to work around a bug in the SML/NJ
3171 implementation of bignums. This bug was causing some hex bignum constants to
3172 be lexed incorrectly.
3175 ** Comments emitted in C code for profiling. The comments identify the CPS
3176 function responsible for each C statement.
3179 ** `callcc` and `throw` added.
3182 ** Bug in `src/cps/simplify-types` fixed. The bug caused nontermination
3183 whenever there was a circular datatype with a vector on the rhs.
3184 E.g. `datatype t = T of t vector`
3189 Here are the changes from the 1998-08-26 version to the 1999-03-19 version.
3193 * Compile time and code size have decreased.
3194 * Runtime performance of executables has improved.
3195 * Large programs can now be compiled.
3196 * MLton is self hosting.
3197 * The basis library is mostly complete and many bugs have been fixed.
3198 * The monomorphiser (`-m`) is no longer available.
3199 * The heap and stack are automatically resized.
3200 * There are now facilities for heap checkpointing (`MLton.saveWorld`) and object
3201 size computation (`MLton.size`).
3202 * MLton uses the GNU multiprecision (GnuMP) library to provide a fast
3203 implementation of `IntInf`.