forked from ocaml/ocaml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Changes
7356 lines (6022 loc) · 304 KB
/
Changes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Working version
---------------
(Changes that can break existing programs are marked with a "*")
### Language features:
- GPR#1467: Allow expressions sequences inside extended indexing and bigarray
indexing operators, e.g.: e1.![e2; e3; ...], etc.
(Nicolás Ojeda Bär, review by Gabriel Radanne, Damien Doligez, Gabriel
Scherer)
### Type system:
- MPR#7611, GPR#1491: reject the use of generative functors as applicative
(Valentin Gatien-Baron)
- GPR#1469: Use the information from [@@immediate] annotations when
computing whether a type can be [@@unboxed]
(Damien Doligez, report by Stephan Muenzel, review by Alain Frisch)
- GPR#1516: Allow float array construction in recursive bindings
when configured with -no-flat-float-array
(Jeremy Yallop, report by Gabriel Scherer)
### Standard library:
- MPR#7690, GPR#1528: fix the float_of_string function for hexadecimal floats
with very large values of the exponent.
(Olivier Andrieu)
### Other libraries:
* GPR#1406: Unix.isatty now returns true in the native Windows ports when
passed a file descriptor connected to a Cygwin PTY. In particular, compiler
colors for the native Windows ports now work under Cygwin/MSYS2.
(Nicolás Ojeda Bär, review by Gabriel Scherer, David Allsopp, Xavier Leroy)
- GPR#1451: [getpwuid], [getgrgid], [getpwnam], [getgrnam] now raise Unix error
instead of returning [Not_found] when interrupted by a signal.
(Arseniy Alekseyev, review by Mark Shinwell and Xavier Leroy)
- GPR#1477: raw_spacetime_lib can now be used in bytecode.
(Nicolás Ojeda Bär, review by Mark Shinwell)
- GPR#1533: (a) The implementation of Thread.yield for system thread
now uses nanosleep(1) for enabling better preemption.
(b) Thread.delay is now an alias for Unix.sleepf.
### Compiler user-interface and warnings:
- GPR#1166: In OCAMLPARAM, an alternative separator can be specified as
first character (instead of comma) in the set ":|; ,"
(Fabrice Le Fessant)
- GPR#1428: give a non dummy location for warning 49 (no cmi found)
(Valentin Gatien-Baron)
- GPR#1472: Improve error reporting for missing 'rec' in let-bindings
(Arthur Charguéraud and Armaël Guéneau, with help from Gabriel Scherer and
Frédéric Bour)
- GPR#1491: Improve error reporting for ill-typed applicative functor
types, F(M).t.
(Valentin Gatien-Baron, review by Florian Angeletti and Gabriel Radanne)
- GPR#1496: Refactor the code printing explanation for unification type errors,
in order to avoid duplicating pattern matches
(Armaël Guéneau, review by Florian Angeletti and Gabriel Scherer)
- GPR#1505: Add specific error messages for unification errors involving
functions of type "unit -> _"
(Arthur Charguéraud and Armaël Guéneau, with help from Leo White, review by
Florian Angeletti and Gabriel Radanne)
- GPR#1510: Add specific explanation for unification errors caused by type
constraints propagated by keywords (such as if, while, for...)
(Armaël Guéneau and Gabriel Scherer, original design by Arthur Charguéraud,
review by Frédéric Bour, Gabriel Radanne and Alain Frisch)
- GPR#1534: Extend the warning printed when (*) is used, adding a hint to
suggest using ( * ) instead
(Armaël Guéneau, with help and review from Florian Angeletti and Gabriel
Scherer)
- GPR#1552: do not warn about ambiguous variables in guards (warning 57)
when the ambiguous values have been filtered by a previous clause
(Gabriel Scherer and Thomas Refis, review by Luc Maranget)
- GPR#1554: warnings 52 and 57: fix reference to manual detailed explanation
(Florian Angeletti, review by Thomas Refis and Gabriel Scherer)
### Code generation and optimizations:
- GPR#1370: Fix code duplication in Cmmgen
(Vincent Laviron, with help from Pierre Chambart,
reviews by Gabriel Scherer and Luc Maranget)
- GPR#1486: ARM 32-bit port: add support for ARMv8 in 32-bit mode,
a.k.a. AArch32.
For this platform, avoid ITE conditional instruction blocks and use
simpler IT blocks instead
(Xavier Leroy, review by Mark Shinwell)
### Runtime system:
- MPR#6411, GPR#1535: don't compile everything with -static-libgcc on mingw32,
only dllbigarray.dll and libbigarray.a. Allows the use of C++ libraries which
raise exceptions.
(David Allsopp)
- GPR#1431: remove ocamlrun dependencies on curses/terminfo/termcap C library
(Xavier Leroy, review by Daniel Bünzli)
- GPR#1478: The Spacetime profiler now works under Windows (but it is not yet
able to collect profiling information from C stubs).
(Nicolás Ojeda Bär, review by Xavier Leroy, Mark Shinwell)
- GPR#1526: install the debug and instrumented runtimes
(lib{caml,asm}run{d,i}.a)
(Gabriel Scherer, reminded by Julia Lawall)
- GPR#1563: simplify implementation of LSRINT and ASRINT
(Max Mouratov, review by Frédéric Bour)
### Tools:
- MPR#7643, GPR#1377: ocamldep, fix an exponential blowup in presence of nested
structures and signatures (e.g. "include struct … include(struct … end) … end")
(Florian Angeletti, review by Gabriel Scherer, report by Christophe Raffalli)
### Manual and documentation:
- PR#7647, GPR#1384: emphasize ocaml.org website and forum in README
(Yawar Amin, review by Gabriel Scherer)
- GPR#1540: manual, decouple verbatim and toplevel style in code examples
(Florian Angeletti, review by Gabriel Scherer)
- GPR#1556: manual, add a consistency test for manual references inside
the compiler source code.
(Florian Angeletti, review by Gabriel Scherer)
### Compiler distribution build system
- MPR#7679: make sure .a files are erased before calling ar rc, otherwise
leftover .a files from an earlier compilation may contain unwanted modules
(Xavier Leroy)
### Internal/compiler-libs changes:
- GPR#1488, GPR#1560: Refreshing parmatch
(Gabriel Scherer and Thomas Refis, review by Luc Maranget)
- GPR#1502: more command line options for expect tests
(Florian Angeletti, review by Gabriel Scherer)
- GPR#1511: show code at error location in expect-style tests,
using new Location.show_code_at_location function
(Gabriel Scherer and Armaël Guéneau,
review by Valentin Gatien-Baron and Damien Doligez)
- GPR#1519, GPR#1532, GRP#1570: migrate tests to ocamltest
(Sébastien Hinderer, review by Gabriel Scherer, Valentin Gatien-Baron
and Nicolás Ojeda Bär)
- GPR#1520: more robust implementation of Misc.no_overflow_mul
(Max Mouratov, review by Xavier Leroy)
### Bug fixes
- MPR#5250, GPR#1435: on Cygwin, when ocamlrun searches the path
for a bytecode executable file, skip directories and other
non-regular files, like other Unix variants do.
(Xavier Leroy)
- MPR#6394, GPR#1425: fix fatal_error from Parmatch.get_type_path
(Virgile Prevosto, review by David Allsopp, Thomas Refis and Jacques Garrigue)
* MPR#6604, GPR#931: Only allow directives with filename and at the beginning of
the line
(Tadeu Zagallo, report by Roberto Di Cosmo,
review by Hongbo Zhang, David Allsopp, Gabriel Scherer, Xavier Leroy)
- PR#7660, GPR#1445: Use native Windows API to implement Unix.utimes in order to
avoid unintended shifts of the argument timestamp depending on DST setting.
(Nicolás Ojeda Bär, review by David Allsopp, Xavier Leroy)
- MPR#7668: -principal is broken with polymorphic variants
(Jacques Garrigue, report by Jun Furuse)
- MPR#7680, GPR#1497: Incorrect interaction between Matching.for_let and
Simplif.simplify_exits
(Alain Frisch, report and review by Vincent Laviron)
- MPR#7682, GPR#1495: fix [@@unboxed] for records with 1 polymorphic field
(Alain Frisch, report by Stéphane Graham-Lengrand, review by Gabriel Scherer)
- MPR#7695, GPR#1541: Fatal error: exception Ctype.Unify(_) with field override
(Jacques Garrigue, report by Nicolás Ojeda Bär)
- MPR#7702, GPR#1553: refresh raise counts when inlining a function
(Vincent Laviron, Xavier Clerc, report by Cheng Sun)
- GPR#1517: More robust handling of type variables in mcomp
(Leo White and Thomas Refis, review by Jacques Garrigue)
- PR#4499, GPR#1479: Use native Windows API to implement Sys.getenv,
Unix.getenv and Unix.environment under Windows.
(Nicolás Ojeda Bär, report by Alain Frisch, review by David Allsopp, Xavier
Leroy)
- GPR#1550, GPR#1555: Make pattern matching warnings more robust
to ill-typed columns
(Thomas Refis, with help from Gabriel Scherer and Luc Maranget)
- MPR#7704, GPR#1564: use proper variant tag in non-exhaustiveness warning
(Jacques Garrigue, report by Thomas Refis)
- MPR#7705, GPR#1558: add missing bounds check in Bigarray.Genarray.nth_dim.
(Nicolás Ojeda Bär, report by Jeremy Yallop, review by Gabriel Scherer)
4.06 maintenance branch
-----------------------
### Bug fixes
- MPR#7661, GPR#1459: fix faulty compilation of patterns
using extensible variants constructors
(Luc Maranget, review by Thomas Refis and Gabriel Scherer, report
by Abdelraouf Ouadjaout and Thibault Suzanne)
- MPR#7704, GPR#1559: Soundness issue with private rows and pattern-matching
(Jacques Garrigue, report by Jeremy Yallop, review by Thomas Refis)
- GPR#1470: Don't commute negation with float comparison
(Leo White, review by Xavier Leroy)
- GPR#1538: Make pattern matching compilation more robust to ill-typed columns
(Gabriel Scherer and Thomas Refis, review by Luc Maranget)
OCaml 4.06.0 (3 Nov 2017):
--------------------------
(Changes that can break existing programs are marked with a "*")
### Language features:
- MPR#6271, MPR#7529, GPR#1249: Support "let open M in ..."
in class expressions and class type expressions.
(Alain Frisch, reviews by Thomas Refis and Jacques Garrigue)
- GPR#792: fix limitations of destructive substitutions, by
allowing "S with type t := type-expr",
"S with type M.t := type-expr", "S with module M.N := path"
(Valentin Gatien-Baron, review by Jacques Garrigue and Leo White)
* GPR#1064, GPR#1392: extended indexing operators, add a new class of
user-defined indexing operators, obtained by adding at least
one operator character after the dot symbol to the standard indexing
operators: e,g ".%()", ".?[]", ".@{}<-":
let ( .%() ) = List.nth in [0; 1; 2].%(1)
After this change, functions or methods with an explicit polymorphic type
annotation and of which the first argument is optional now requires a space
between the dot and the question mark,
e.g. "<f:'a.?opt:int->unit>" must now be written "<f:'a. ?opt:int->unit>".
(Florian Angeletti, review by Damien Doligez and Gabriel Radanne)
- GPR#1118: Support inherited field in object type expression
type t = < m : int >
type u = < n : int; t; k : int >
(Runhang Li, review by Jeremy Yallop, Leo White, Jacques Garrigue,
and Florian Angeletti)
* GPR#1232: Support Unicode character escape sequences in string
literals via the \u{X+} syntax. These escapes are substituted by the
UTF-8 encoding of the Unicode character.
(Daniel Bünzli, review by Damien Doligez, Alain Frisch, Xavier
Leroy and Leo White)
- GPR#1247: M.(::) construction for expressions
and patterns (plus fix printing of (::) in the toplevel)
(Florian Angeletti, review by Alain Frisch, Gabriel Scherer)
* GPR#1252: The default mode is now safe-string, can be overridden
at configure time or at compile time.
(See GPR#1386 below for the configure-time options)
This breaks the code that uses the 'string' type as mutable
strings (instead of Bytes.t, introduced by 4.02 in 2014).
(Damien Doligez)
* GPR#1253: Private extensible variants
This change breaks code relying on the undocumented ability to export
extension constructors for abstract type in signature. Briefly,
module type S = sig
type t
type t += A
end
must now be written
module type S = sig
type t = private ..
type t += A
end
(Leo White, review by Alain Frisch)
- GPR#1333: turn off warning 40 by default
(Constructor or label name used out of scope)
(Leo White)
- GPR#1348: accept anonymous type parameters in `with` constraints:
S with type _ t = int
(Valentin Gatien-Baron, report by Jeremy Yallop)
### Type system
- MPR#248, GPR#1225: unique names for weak type variables
# ref [];;
- : '_weak1 list ref = {contents = []}
(Florian Angeletti, review by Frédéric Bour, Jacques Garrigue,
Gabriel Radanne and Gabriel Scherer)
* MPR#6738, MPR#7215, MPR#7231, GPR#556: Add a new check that 'let rec'
bindings are well formed.
(Jeremy Yallop, reviews by Stephen Dolan, Gabriel Scherer, Leo
White, and Damien Doligez)
- GPR#1142: Mark assertions nonexpansive, so that 'assert false'
can be used as a placeholder for a polymorphic function.
(Stephen Dolan)
### Standard library:
- MPR#1771, MPR#7309, GPR#1026: Add update to maps. Allows to update a
binding in a map or create a new binding if the key had no binding
val update: key -> ('a option -> 'a option) -> 'a t -> 'a t
(Sébastien Briais, review by Daniel Bünzli, Alain Frisch and
Gabriel Scherer)
- MPR#7515, GPR#1147: Arg.align now optionally uses the tab character '\t' to
separate the "unaligned" and "aligned" parts of the documentation string. If
tab is not present, then space is used as a fallback. Allows to have spaces in
the unaligned part, which is useful for Tuple options.
(Nicolás Ojeda Bär, review by Alain Frisch and Gabriel Scherer)
* GPR#615: Format, add symbolic formatters that output symbolic
pretty-printing items. New fields have been added to the
formatter_out_functions record, thus this change will break any code building
such record from scratch.
When building Format.formatter_out_functions values redefining the out_spaces field,
"{ fmt_out_funs with out_spaces = f; }" should be replaced by
"{ fmt_out_funs with out_spaces = f; out_indent = f; }" to maintain the old behavior.
(Richard Bonichon and Pierre Weis, review by Alain Frisch, original request by
Spiros Eliopoulos in GPR#506)
* GPR#943: Fixed the divergence of the Pervasives module between the stdlib
and threads implementations. In rare circumstances this can change the
behavior of existing applications: the implementation of Pervasives.close_out
used when compiling with thread support was inconsistent with the manual.
It will now not suppress exceptions escaping Pervasives.flush anymore.
Developers who want the old behavior should use Pervasives.close_out_noerr
instead. The stdlib implementation, used by applications not compiled
with thread support, will now only suppress Sys_error exceptions in
Pervasives.flush_all. This should allow exceedingly unlikely assertion
exceptions to escape, which could help reveal bugs in the standard library.
(Markus Mottl, review by Hezekiah M. Carty, Jeremie Dimino, Damien Doligez,
Alain Frisch, Xavier Leroy, Gabriel Scherer and Mark Shinwell)
- GPR#1034: List.init : int -> (int -> 'a) -> 'a list
(Richard Degenne, review by David Allsopp, Thomas Braibant, Florian
Angeletti, Gabriel Scherer, Nathan Moreau, Alain Frisch)
- GRP#1091 Add the Uchar.{bom,rep} constants.
(Daniel Bünzli, Alain Frisch)
- GPR#1091: Add Buffer.add_utf_{8,16le,16be}_uchar to encode Uchar.t
values to the corresponding UTF-X transformation formats in Buffer.t
values.
(Daniel Bünzli, review by Damien Doligez, Max Mouratov)
- GPR#1175: Bigarray, add a change_layout function to each Array[N]
submodules.
(Florian Angeletti)
* GPR#1306: In the MSVC and Mingw ports, "Sys.rename src dst" no longer fails if
file "dst" exists, but replaces it with file "src", like in the other ports.
(Xavier Leroy)
- GPR#1314: Format, use the optional width information
when formatting a boolean: "%8B", "%-8B" for example
(Xavier Clerc, review by Gabriel Scherer)
- c9cc0f25138ce58e4f4e68c4219afe33e2a9d034: Resurrect tabulation boxes
in module Format. Rewrite/extend documentation of tabulation boxes.
(Pierre Weis)
### Other libraries:
- MPR#7564, GPR#1211: Allow forward slashes in the target of symbolic links
created by Unix.symlink under Windows.
(Nicolás Ojeda Bär, review by David Allsopp)
* MPR#7640, GPR#1414: reimplementation of Unix.execvpe to fix issues
with the 4.05 implementation. The main issue is that the current
directory was always searched (last), even if the current directory
is not listed in the PATH.
(Xavier Leroy, report by Louis Gesbert and Arseniy Alekseyev,
review by Ivan Gotovchits)
- GPR#997, GPR#1077: Deprecate Bigarray.*.map_file and add Unix.map_file as a
first step towards moving Bigarray to the stdlib
(Jérémie Dimino and Xavier Leroy)
* GPR#1178: remove the Num library for arbitrary-precision arithmetic.
It now lives as a separate project https://github.com/ocaml/num
with an OPAM package called "num".
(Xavier Leroy)
- GPR#1217: Restrict Unix.environment in privileged contexts; add
Unix.unsafe_environment.
(Jeremy Yallop, review by Mark Shinwell, Nicolás Ojeda Bär,
Damien Doligez and Hannes Mehnert)
- GPR#1321: Reimplement Unix.isatty on Windows. It no longer returns true for
the null device.
(David Allsopp)
### Compiler user-interface and warnings:
- MPR#7361, GPR#1248: support "ocaml.warning" in all attribute contexts, and
arrange so that "ocaml.ppwarning" is correctly scoped by surrounding
"ocaml.warning" attributes
(Alain Frisch, review by Florian Angeletti and Thomas Refis)
- MPR#7444, GPR#1138: trigger deprecation warning when a "deprecated"
attribute is hidden by signature coercion
(Alain Frisch, report by bmillwood, review by Leo White)
- MPR#7472: ensure .cmi files are created atomically,
to avoid corruption of .cmi files produced simultaneously by a run
of ocamlc and a run of ocamlopt.
(Xavier Leroy, from a suggestion by Gerd Stolpmann)
* MPR#7514, GPR#1152: add -dprofile option, similar to -dtimings but
also displays memory allocation and consumption.
The corresponding addition of a new compiler-internal
Profile module may affect some users of
compilers-libs/ocamlcommon (by creating module conflicts).
(Valentin Gatien-Baron, report by Gabriel Scherer)
- MPR#7620, GPR#1317: Typecore.force_delayed_checks does not run with -i option
(Jacques Garrigue, report by Jun Furuse)
- MPR#7624: handle warning attributes placed on let bindings
(Xavier Clerc, report by dinosaure, review by Alain Frisch)
- GPR#896: "-compat-32" is now taken into account when building .cmo/.cma
(Hugo Heuzard)
- GPR#948: the compiler now reports warnings-as-errors by prefixing
them with "Error (warning ..):", instead of "Warning ..:" and
a trailing "Error: Some fatal warnings were triggered" message.
(Valentin Gatien-Baron, review by Alain Frisch)
- GPR#1032: display the output of -dtimings as a hierarchy
(Valentin Gatien-Baron, review by Gabriel Scherer)
- GPR#1114, GPR#1393, GPR#1429: refine the (ocamlc -config) information
on C compilers: the variables `{bytecode,native}_c_compiler` are deprecated
(the distinction is now mostly meaningless) in favor of a single
`c_compiler` variable combined with `ocaml{c,opt}_cflags`
and `ocaml{c,opt}_cppflags`.
(Sébastien Hinderer, Jeremy Yallop, Gabriel Scherer, review by
Adrien Nader and David Allsopp)
* GPR#1189: allow MSVC ports to use -l option in ocamlmklib
(David Allsopp)
- GPR#1332: fix ocamlc handling of "-output-complete-obj"
(François Bobot)
- GPR#1336: -thread and -vmthread option information is propagated to
PPX rewriters.
(Jun Furuse, review by Alain Frisch)
### Code generation and optimizations:
- MPR#5324, GPR#375: An alternative Linear Scan register allocator for
ocamlopt, activated with the -linscan command-line flag. This
allocator represents a trade-off between worse generated code
performance for higher compilation speed (especially interesting in
some cases graph coloring is necessarily quadratic).
(Marcell Fischbach and Benedikt Meurer, adapted by Nicolás Ojeda Bär, review
by Nicolás Ojeda Bär and Alain Frisch)
- MPR#6927, GPR#988: On macOS, when compiling bytecode stubs, plugins,
and shared libraries through -output-obj, generate dylibs instead of
bundles.
(whitequark)
- MPR#7447, GPR#995: incorrect code generation for nested recursive bindings
(Leo White and Jeremy Yallop, report by Stephen Dolan)
- MPR#7501, GPR#1089: Consider arrays of length zero as constants
when using Flambda.
(Pierre Chambart, review by Mark Shinwell and Leo White)
- MPR#7531, GPR#1162: Erroneous code transformation at partial applications
(Mark Shinwell)
- MPR#7614, GPR#1313: Ensure that inlining does not depend on the order
of symbols (flambda)
(Leo White, Xavier Clerc, report by Alex, review by Gabriel Scherer
and Pierre Chambart)
- MPR#7616, GPR#1339: don't warn on mutation of zero size blocks.
(Leo White)
- MPR#7631, GPR#1355: "-linscan" option crashes ocamlopt
(Xavier Clerc, report by Paul Steckler)
- MPR#7642, GPR#1411: ARM port: wrong register allocation for integer
multiply on ARMv4 and ARMv5; possible wrong register allocation for
floating-point multiply and add on VFP and for floating-point
negation and absolute value on soft FP emulation.
(Xavier Leroy, report by Stéphane Glondu and Ximin Luo,
review and additional sightings by Mark Shinwell)
* GPR#659: Remove support for SPARC native code generation
(Mark Shinwell)
- GPR#850: Optimize away some physical equality
(Pierre Chambart, review by Mark Shinwell and Leo White)
- GPR#856: Register availability analysis
(Mark Shinwell, Thomas Refis, review by Pierre Chambart)
- GPR#1143: tweaked several allocation functions in the runtime by
checking for likely conditions before unlikely ones and eliminating
some redundant checks.
(Markus Mottl, review by Alain Frisch, Xavier Leroy, Gabriel Scherer,
Mark Shinwell and Leo White)
- GPR#1183: compile curried functors to multi-argument functions
earlier in the compiler pipeline; correctly propagate [@@inline]
attributes on such functors; mark functor coercion veneers as
stubs.
(Mark Shinwell, review by Pierre Chambart and Leo White)
- GPR#1195: Merge functions based on partiality rather than
Parmatch.irrefutable.
(Leo White, review by Thomas Refis, Alain Frisch and Gabriel Scherer)
- GPR#1215: Improve compilation of short-circuit operators
(Leo White, review by Frédéric Bour and Mark Shinwell)
- GPR#1250: illegal ARM64 assembly code generated for large combined allocations
(report and initial fix by Steve Walk, review and final fix by Xavier Leroy)
- GPR#1271: Don't generate Ialloc instructions for closures that exceed
Max_young_wosize; instead allocate them on the major heap. (Related
to GPR#1250.)
(Mark Shinwell)
- GPR#1294: Add a configure-time option to remove the dynamic float array
optimization and add a floatarray type to let the user choose when to
flatten float arrays. Note that float-only records are unchanged: they
are still optimized by unboxing their fields.
(Damien Doligez, review by Alain Frisch and Mark Shinwell)
- GPR#1304: Mark registers clobbered by PLT stubs as destroyed across
allocations.
(Mark Shinwell, Xavier Clerc, report and initial debugging by
Valentin Gatien-Baron)
- GPR#1323: make sure that frame tables are generated in the data
section and not in the read-only data section, as was the case
before in the PPC and System-Z ports. This avoids relocations in
the text segment of shared libraries and position-independent
executables generated by ocamlopt.
(Xavier Leroy, review by Mark Shinwell)
- GPR#1330: when generating dynamically-linkable code on AArch64, always
reference symbols (even locally-defined ones) through the GOT.
(Mark Shinwell, review by Xavier Leroy)
### Tools:
- MPR#1956, GPR#973: tools/check-symbol-names checks for globally
linked names not namespaced with caml_
(Stephen Dolan)
- MPR#6928, GPR#1103: ocamldoc, do not introduce an empty <h1> in index.html
when no -title has been provided
(Pierre Boutillier)
- MPR#7048: ocamldoc, in -latex mode, don't escape Latin-1 accented letters
(Xavier Leroy, report by Hugo Herbelin)
* MPR#7351: ocamldoc, use semantic tags rather than <br> tags in the html
backend
(Florian Angeletti, request and review by Daniel Bünzli )
* MPR#7352, MPR#7353: ocamldoc, better paragraphs in html output
(Florian Angeletti, request by Daniel Bünzli)
* MPR#7363, GPR#830: ocamldoc, start heading levels at {1 not {2 or {6.
This change modifies the mapping between ocamldoc heading level and
html heading level, breaking custom css style for ocamldoc.
(Florian Angeletti, request and review by Daniel Bünzli)
* MPR#7478, GPR#1037: ocamldoc, do not use as a module preamble documentation
comments that occur after the first module element. This change may break
existing documenation. In particular, module preambles must now come before
any `open` statement.
(Florian Angeletti, review by David Allsopp and report by Daniel Bünzli)
- MPR#7521, GPR#1159: ocamldoc, end generated latex file with a new line
(Florian Angeletti)
- MPR#7575, GPR#1219: Switch compilers from -no-keep-locs
to -keep-locs by default: produced .cmi files will contain locations.
This provides better error messages. Note that, as a consequence,
.cmi digests now depend on the file path as given to the compiler.
(Daniel Bünzli)
- MPR#7610, GPR#1346: caml.el (the Emacs editing mode) was cleaned up
and made compatible with Emacs 25.
(Stefan Monnier, Christophe Troestler)
- MPR#7635, GPR#1383: ocamldoc, add an identifier to module
and module type elements
(Florian Angeletti, review by Yawar Amin and Gabriel Scherer)
- GPR#681, GPR#1426: Introduce ocamltest, a new test driver for the
OCaml compiler testsuite
(Sébastien Hinderer, review by Damien Doligez)
- GPR#1012: ocamlyacc, fix parsing of raw strings and nested comments, as well
as the handling of ' characters in identifiers.
(Demi Obenour)
- GPR#1045: ocamldep, add a "-shared" option to generate dependencies
for native plugin files (i.e. .cmxs files)
(Florian Angeletti, suggestion by Sébastien Hinderer)
- GPR#1078: add a subcommand "-depend" to "ocamlc" and "ocamlopt",
to behave as ocamldep. Should be used mostly to replace "ocamldep" in the
"boot" directory to reduce its size in the future.
(Fabrice Le Fessant)
- GPR#1036: ocamlcmt (tools/read_cmt) is installed, converts .cmt to .annot
(Fabrice Le Fessant)
- GPR#1180: Add support for recording numbers of direct and indirect
calls over the lifetime of a program when using Spacetime profiling
(Mark Shinwell)
- GPR#1457, ocamldoc: restore label for exception in the latex backend
(omitted since 4.04.0)
(Florian Angeletti, review by Gabriel Scherer)
### Toplevel:
- MPR#7570: remove unusable -plugin option from the toplevel
(Florian Angeletti)
- GPR#1041: -nostdlib no longer ignored by toplevel.
(David Allsopp, review by Xavier Leroy)
- GPR#1231: improved printing of unicode texts in the toplevel,
unless OCAMLTOP_UTF_8 is set to false.
(Florian Angeletti, review by Daniel Bünzli, Xavier Leroy and
Gabriel Scherer)
### Runtime system:
* MPR#3771, GPR#153, GPR#1200, GPR#1357, GPR#1362, GPR#1363, GPR#1369, GPR#1398,
GPR#1446, GPR#1448: Unicode support for the Windows runtime.
(ygrek, Nicolás Ojeda Bär, review by Alain Frisch, David Allsopp, Damien
Doligez)
* MPR#7594, GPR#1274, GPR#1368: String_val now returns 'const char*', not
'char*' when -safe-string is enabled at configure time. New macro Bytes_val
for accessing bytes values.
(Jeremy Yallop, reviews by Mark Shinwell and Xavier Leroy)
- GPR#71: The runtime can now be shut down gracefully by means of the new
caml_shutdown and caml_startup_pooled functions. The new 'c' flag in
OCAMLRUNPARAM enables shutting the runtime properly on process exit.
(Max Mouratov, review and discussion by Damien Doligez, Gabriel Scherer,
Mark Shinwell, Thomas Braibant, Stephen Dolan, Pierre Chambart,
François Bobot, Jacques Garrigue, David Allsopp, and Alain Frisch)
- GPR#938, GPR#1170, GPR#1289: Stack overflow detection on 64-bit Windows
(Olivier Andrieu, tweaked by David Allsopp)
- GPR#1070, GPR#1295: enable gcc typechecking for caml_alloc_sprintf,
caml_gc_message. Make caml_gc_message a variadic function. Fix many
caml_gc_message format strings.
(Olivier Andrieu, review and 32bit fix by David Allsopp)
- GPR#1073: Remove statically allocated compare stack.
(Stephen Dolan)
- GPR#1086: in Sys.getcwd, just fail instead of calling getwd()
if HAS_GETCWD is not set.
(Report and first fix by Sebastian Markbåge, final fix by Xavier Leroy,
review by Mark Shinwell)
- GPR#1269: Remove 50ms delay at exit for programs using threads
(Valentin Gatien-Baron, review by Stephen Dolan)
* GPR#1309: open files with O_CLOEXEC (or equivalent) in caml_sys_open, thus
unifying the semantics between Unix and Windows and also eliminating race
condition on Unix.
(David Allsopp, report by Andreas Hauptmann)
- GPR#1326: Enable use of CFI directives in AArch64 and ARM runtime
systems' assembly code (asmrun/arm64.S). Add CFI directives to enable
unwinding through [caml_c_call] and [caml_call_gc] with correct termination
of unwinding at [main].
(Mark Shinwell, review by Xavier Leroy and Gabriel Scherer, with thanks
to Daniel Bünzli and Fu Yong Quah for testing)
- GPR#1338: Add "-g" for bytecode runtime system compilation
(Mark Shinwell)
* GPR#1416, GPR#1444: switch the Windows 10 Console to UTF-8 encoding.
(David Allsopp, reviews by Nicolás Ojeda Bär and Xavier Leroy)
### Manual and documentation:
- MPR#6548: remove obsolete limitation in the description of private
type abbreviations
(Florian Angeletti, suggestion by Leo White)
- MPR#6676, GPR#1110: move record notation to tutorial
(Florian Angeletti, review by Gabriel Scherer)
- MPR#6676, GPR#1112: move local opens to tutorial
(Florian Angeletti)
- MPR#6676, GPR#1153: move overriding class definitions to reference
manual and tutorial
(Florian Angeletti)
- MPR#6709: document the associativity and precedence level of
pervasive operators
(Florian Angeletti, review by David Allsopp)
- MPR#7254, GPR#1096: Rudimentary documentation of ocamlnat
(Mark Shinwell)
- MPR#7281, GPR#1259: fix .TH macros in generated manpages
(Olaf Hering)
- MPR#7507: Align the description of the printf conversion
specification "%g" with the ISO C90 description.
(Florian Angeletti, suggestion by Armaël Guéneau)
- MPR#7551, GPR#1194 : make the final ";;" potentially optional in
caml_example
(Florian Angeletti, review and suggestion by Gabriel Scherer)
- MPR#7588, GPR#1291: make format documentation predictable
(Florian Angeletti, review by Gabriel Radanne)
- MPR#7604: Minor Ephemeron documentation fixes
(Miod Vallat, review by Florian Angeletti)
- GPR#594: New chapter on polymorphism troubles:
weakly polymorphic types, polymorphic recursion,and higher-ranked
polymorphism.
(Florian Angeletti, review by Damien Doligez, Gabriel Scherer,
and Gerd Stolpmann)
- GPR#1187: Minimal documentation for compiler plugins
(Florian Angeletti)
- GPR#1202: Fix Typos in comments as well as basic grammar errors.
(JP Rodi, review and suggestions by David Allsopp, Max Mouratov,
Florian Angeletti, Xavier Leroy, Mark Shinwell and Damien Doligez)
- GPR#1220: Fix "-keep-docs" option in ocamlopt manpage
(Etienne Millon)
### Compiler distribution build system:
- MPR#6373, GPR#1093: Suppress trigraph warnings from macOS assembler
(Mark Shinwell)
- MPR#7639, GPR#1371: fix configure script for correct detection of
int64 alignment on Mac OS X 10.13 (High Sierra) and above; fix bug in
configure script relating to such detection.
(Mark Shinwell, report by John Whitington, review by Xavier Leroy)
- GPR#558: enable shared library and natdynlink support on more Linux
platforms
(Felix Janda, Mark Shinwell)
* GPR#1104: remove support for the NeXTStep platform
(Sébastien Hinderer)
- GPR#1130: enable detection of IBM XL C compiler (one need to run configure
with "-cc <path to xlc compiler>"). Enable shared library support for
bytecode executables on AIX/xlc (tested on AIX 7.1, XL C 12).
To enable 64-bit, run both "configure" and "make world" with OBJECT_MODE=64.
(Konstantin Romanov, Enrique Naudon)
- GPR#1203: speed up the manual build by using ocamldoc.opt
(Gabriel Scherer, review by Florian Angeletti)
- GPR#1214: harden config/Makefile against '#' characters in PREFIX
(Gabriel Scherer, review by David Allsopp and Damien Doligez)
- GPR#1216: move Compplugin and friends from BYTECOMP to COMP
(Leo White, review by Mark Shinwell)
* GPR#1242: disable C plugins loading by default
(Alexey Egorov)
- GPR#1275: correct configure test for Spacetime availability
(Mark Shinwell)
- GPR#1278: discover presence of <sys/shm.h> during configure for afl runtime
(Hannes Mehnert)
- GPR#1386: provide configure-time options to fine-tune the safe-string
options and default settings changed by GPR#1525.
The previous configure option -safe-string is now
renamed -force-safe-string.
At configure-time, -force-safe-string forces all module to use
immutable strings (this disables the per-file, compile-time
-unsafe-string option). The new default-(un)safe-string options
let you set the default choice for the per-file compile-time
option. (The new GPR#1252 behavior corresponds to having
-default-safe-string, while 4.05 and older had
-default-unsafe-string).
(Gabriel Scherer, review by Jacques-Pascal Deplaix and Damien Doligez)
- GPR#1409: Fix to enable NetBSD/powerpc to work.
(Håvard Eidnes)
### Internal/compiler-libs changes:
- MPR#6826, GPR#828, GPR#834: improve compilation time for open
(Alain Frisch, review by Frédéric Bour and Jacques Garrigue)
- MPR#7127, GPR#454, GPR#1058: in toplevel, print bytes and strip
strings longer than the size specified by the "print_length" directive
(Fabrice Le Fessant, initial PR by Junsong Li)
- GPR#406: remove polymorphic comparison for Types.constructor_tag in compiler
(Dwight Guth, review by Gabriel Radanne, Damien Doligez, Gabriel Scherer,
Pierre Chambart, Mark Shinwell)
- GRP#1119: Change Set (private) type to inline records.
(Albin Coquereau)
* GPR#1127: move config/{m,s}.h to byterun/caml and install them.
User code should not have to include them directly since they are
included by other header files.
Previously {m,s}.h were not installed but they were substituted into
caml/config.h; they are now just #include-d by this file. This may
break some scripts relying on the (unspecified) presence of certain
#define in config.h instead of m.h and s.h -- they can be rewritten
to try to grep those files if they exist.
(Sébastien Hinderer)
- GPR#1281: avoid formatter flushes inside exported printers in Location
(Florian Angeletti, review by Gabriel Scherer)
### Bug fixes
- MPR#5927: Type equality broken for conjunctive polymorphic variant tags
(Jacques Garrigue, report by Leo White)
- MPR#6329, GPR#1437: Introduce padding word before "data_end" symbols
to ensure page table tests work correctly on an immediately preceding
block of zero size.
(Mark Shinwell, review by Xavier Leroy)
- MPR#6587: only elide Pervasives from printed type paths in unambiguous context
(Florian Angeletti and Jacques Garrigue)
- MPR#6934: nonrec misbehaves with GADTs
(Jacques Garrigue, report by Markus Mottl)
- MPR#7070, GPR#1139: Unexported values can cause non-generalisable variables
error
(Leo White)
- MPR#7261: Warn on type constraints in GADT declarations
(Jacques Garrigue, report by Fabrice Le Botlan)
- MPR#7321: Private type in signature clashes with type definition via
functor instantiation
(Jacques Garrigue, report by Markus Mottl)
- MPR#7372, GPR#834: fix type-checker bug with GADT and inline records
(Alain Frisch, review by Frédéric Bour and Jacques Garrigue)
- MPR#7344: Inconsistent behavior with type annotations on let
(Jacques Garrigue, report by Leo White)
- MPR#7468: possible GC problem in caml_alloc_sprintf
(Xavier Leroy, discovery by Olivier Andrieu)
- MPR#7496: Fixed conjunctive polymorphic variant tags do not unify
with themselves
(Jacques Garrigue, report by Leo White)
- MPR#7506: pprintast ignores attributes in tails of a list
(Alain Frisch, report by Kenichi Asai and Gabriel Scherer)
- MPR#7513: List.compare_length_with mishandles negative numbers / overflow
(Fabrice Le Fessant, report by Jeremy Yallop)
- MPR#7519: Incorrect rejection of program due to faux scope escape
(Jacques Garrigue, report by Markus Mottl)
- MPR#7540, GPR#1179: Fixed setting of breakpoints within packed modules
for ocamldebug
(Hugo Herbelin, review by Gabriel Scherer, Damien Doligez)
- MPR#7543: short-paths printtyp can fail on packed type error messages
(Florian Angeletti)
- MPR#7553, GPR#1191: Prevent repeated warnings with recursive modules.
(Leo White, review by Josh Berdine and Alain Frisch)
- MPR#7563, GPR#1210: code generation bug when a module alias and
an extension constructor have the same name in the same module
(Gabriel Scherer, report by Manuel Fähndrich,
review by Jacques Garrigue and Leo White)
- MPR#7591, GPR#1257: on x86-64, frame table is not 8-aligned
(Xavier Leroy, report by Mantis user "voglerr", review by Gabriel Scherer)
- MPR#7601, GPR#1320: It seems like a hidden non-generalized type variable
remains in some inferred signatures, which leads to strange errors
(Jacques Garrigue, report by Mandrikin)
- MPR#7609: use-after-free memory corruption if a program debugged
under ocamldebug calls Pervasives.flush_all
(Xavier Leroy, report by Paul Steckler, review by Gabriel Scherer)
- MPR#7612, GPR#1345: afl-instrumentation bugfix for classes.
(Stephen Dolan, review by Gabriel Scherer and David Allsopp)
- MPR#7617, MPR#7618, GPR#1318: Ambiguous (mistakenly) type escaping the
scope of its equation
(Jacques Garrigue, report by Thomas Refis)
- MPR#7619, GPR#1387: position of the optional last semi-column not included
in the position of the expression (same behavior as for lists)
(Christophe Raffalli, review by Gabriel Scherer)
- MPR#7638: in the Windows Mingw64 port, multithreaded programs compiled
to bytecode could crash when raising an exception from C code.
This looks like a Mingw64 issue, which we work around with GCC builtins.
(Xavier Leroy)
- MPR#7656, GPR#1423: false 'unused type/constructor/value' alarms
in the 4.06 development version
(Alain Frisch, review by Jacques Garrigue, report by Jacques-Pascal Deplaix)
- MPR#7657, GPR#1424: ensures correct call-by-value semantics when
eta-expanding functions to eliminate optional arguments
(Alain Frisch, report by sliquister, review by Leo White and Jacques
Garrigue)
- MPR#7658, GPR#1439: Fix Spacetime runtime system compilation with
-force-safe-string
(Mark Shinwell, report by Christoph Spiel, review by Gabriel Scherer)
- GPR#1155: Fix a race condition with WAIT_NOHANG on Windows
(Jérémie Dimino and David Allsopp)
- GPR#1199: Pretty-printing formatting cleanup in pprintast
(Ethan Aubin, suggestion by Gabriel Scherer, review by David Allsopp,
Florian Angeletti, and Gabriel Scherer)
- GPR#1223: Fix corruption of the environment when using -short-paths
with the toplevel.
(Leo White, review by Alain Frisch)
- GPR#1243: Fix pprintast for #... infix operators
(Alain Frisch, report by Omar Chebib)
- GPR#1324: ensure that flambda warning are printed only once
(Xavier Clerc)
- GPR#1329: Prevent recursive polymorphic variant names
(Jacques Garrigue, fix suggested by Leo White)
- GPR#1308: Only treat pure patterns as inactive