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