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