Skip to content

Commit 5bf2820

Browse files
committed
Merge OCaml 4.14 (ocaml#55)
2 parents 05e2ed4 + 34432be commit 5bf2820

File tree

1,466 files changed

+78219
-38233
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,466 files changed

+78219
-38233
lines changed

.depend

Lines changed: 520 additions & 295 deletions
Large diffs are not rendered by default.

.gitattributes

Lines changed: 24 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,10 @@
4545
# No header for text files (would be too obtrusive).
4646
*.md typo.missing-header
4747
README* typo.missing-header
48+
VERSION typo.missing-header
4849
*.adoc typo.missing-header
49-
stdlib/*.mld typo.missing-header
50+
api_docgen/*.mld typo.missing-header
51+
api_docgen/alldoc.tex typo.missing-header
5052
tools/mantis2gh_stripped.csv typo.missing-header
5153

5254
*.adoc typo.long-line=may
@@ -63,7 +65,6 @@ tools/mantis2gh_stripped.csv typo.missing-header
6365
# tools/ci/appveyor/appveyor_build.cmd only has missing-header because
6466
# dra27 too lazy to update check-typo to interpret Cmd-style comments!
6567
/tools/ci/appveyor/appveyor_build.cmd typo.very-long-line typo.missing-header typo.non-ascii
66-
/tools/ci/appveyor/appveyor_build.sh typo.non-ascii
6768
/tools/ci/inria/bootstrap/remove-sinh-primitive.patch typo.prune
6869
/release-info/howto.md typo.missing-header typo.long-line
6970
/release-info/templates/*.md typo.missing-header typo.very-long-line=may
@@ -72,7 +73,7 @@ tools/mantis2gh_stripped.csv typo.missing-header
7273
/.depend.menhir typo.prune
7374

7475
# Makefiles may contain tabs
75-
Makefile* typo.tab=may
76+
Makefile* typo.makefile-whitespace=may
7677

7778
asmcomp/*/emit.mlp typo.tab=may typo.long-line=may
7879

@@ -101,6 +102,9 @@ otherlibs/win32unix/readlink.c typo.long-line
101102
otherlibs/win32unix/stat.c typo.long-line
102103
otherlibs/win32unix/symlink.c typo.long-line
103104

105+
runtime/sak.c typo.non-ascii
106+
runtime/caml/compatibility.h typo.very-long-line
107+
104108
stdlib/hashbang typo.white-at-eol typo.missing-lf
105109

106110
testsuite/tests/** typo.missing-header typo.long-line=may
@@ -110,9 +114,11 @@ testsuite/tests/misc-unsafe/almabench.ml typo.long-line
110114
testsuite/tests/tool-toplevel/strings.ml typo.utf8
111115
testsuite/tests/win-unicode/*.ml typo.utf8
112116
testsuite/tests/asmgen/immediates.cmm typo.very-long-line
117+
testsuite/tests/generated-parse-errors/errors.* typo.very-long-line
113118
testsuite/tools/*.S typo.missing-header
114119
testsuite/tools/*.asm typo.missing-header
115120
testsuite/typing typo.missing-header
121+
testsuite/tests/messages/highlight_tabs.ml typo.tab
116122

117123
# prune testsuite reference files
118124
testsuite/tests/**/*.reference typo.prune
@@ -150,6 +156,7 @@ menhir-bench.bash typo.missing-header typo.utf8
150156

151157
/tools/ci/appveyor/appveyor_build.cmd text eol=crlf
152158

159+
aclocal.m4 typo.tab
153160
configure.ac text eol=lf
154161
build-aux/compile text eol=lf
155162
build-aux/config.guess text eol=lf
@@ -164,19 +171,17 @@ stdlib/sharpbang text eol=lf
164171
tools/autogen text eol=lf
165172
tools/ci/inria/remove-sinh-primitive.patch text eol=lf
166173
tools/check-typo text eol=lf
174+
tools/check-symbol-names text eol=lf
167175
tools/ci-build text eol=lf
168176
tools/msvs-promote-path text eol=lf
169177
tools/gdb-macros text eol=lf
170178
tools/magic text eol=lf
171179
tools/make-opcodes text eol=lf
172180
tools/make-package-macosx text eol=lf
173181
tools/ocaml-objcopy-macosx text eol=lf
174-
tools/ocamlmktop.tpl text eol=lf
175182
tools/ocamlsize text eol=lf
176183
tools/pre-commit-githook text eol=lf
177184
tools/markdown-add-pr-links.sh text eol=lf
178-
runtime/caml/m.h.in text eol=lf
179-
runtime/caml/s.h.in text eol=lf
180185
runtime/caml/compatibility.h typo.long-line=may
181186

182187
# These are all Perl scripts, so may not actually require this
@@ -189,73 +194,23 @@ manual/tools/texexpand text eol=lf
189194

190195
# Tests which include references spanning multiple lines fail with \r\n
191196
# endings, so use \n endings only, even on Windows.
197+
testsuite/tests/backtrace/names.ml text eol=lf
192198
testsuite/tests/basic-modules/anonymous.ml text eol=lf
193-
testsuite/tests/basic-more/morematch.ml text eol=lf
194-
testsuite/tests/basic-more/robustmatch.ml text eol=lf
195-
testsuite/tests/parsing/*.ml text eol=lf
196-
testsuite/tests/docstrings/empty.ml text eol=lf
199+
testsuite/tests/formatting/test_locations.ml text eol=lf
197200
testsuite/tests/functors/functors.ml text eol=lf
201+
testsuite/tests/lib-dynlink-initializers/test10_main.ml text eol=lf
202+
testsuite/tests/parsing/attributes.ml text eol=lf
203+
testsuite/tests/parsing/extensions.ml text eol=lf
204+
testsuite/tests/parsing/hash_ambiguity.ml text eol=lf
205+
testsuite/tests/parsing/int_and_float_with_modifier.ml text eol=lf
206+
testsuite/tests/parsing/pr6865.ml text eol=lf
207+
testsuite/tests/parsing/quotedextensions.ml text eol=lf
208+
testsuite/tests/parsing/shortcut_ext_attr.ml text eol=lf
198209
testsuite/tests/tool-ocamlc-stop-after/stop_after_parsing_impl.ml text eol=lf
199210
testsuite/tests/tool-ocamlc-stop-after/stop_after_parsing_intf.mli text eol=lf
200211
testsuite/tests/tool-ocamlc-stop-after/stop_after_typing_impl.ml text eol=lf
201-
testsuite/tests/tool-toplevel/error_highlighting.ml text eol=lf
202-
testsuite/tests/tool-toplevel/error_highlighting_use4.ml text eol=lf
203212
testsuite/tests/translprim/module_coercion.ml text eol=lf
204-
testsuite/tests/typing-objects-bugs/pr3968_bad.ml text eol=lf
205-
testsuite/tests/typing-ocamlc-i/pr7402.ml text eol=lf
206-
testsuite/tests/typing-ocamlc-i/pervasives_leitmotiv.ml text eol=lf
207-
testsuite/tests/typing-recmod/t12bad.ml text eol=lf
208-
testsuite/tests/typing-safe-linking/b_bad.ml text eol=lf
209-
testsuite/tests/warnings/w04.ml text eol=lf
210-
testsuite/tests/warnings/w04_failure.ml text eol=lf
211-
testsuite/tests/warnings/w32.ml text eol=lf
212-
213-
# These are forced to \n to allow the Cygwin testsuite to pass on a
213+
214+
# This is forced to \n to allow the Cygwin testsuite to pass on a
214215
# Windows-checkout
215-
testsuite/tests/formatting/margins.ml text eol=lf
216-
testsuite/tests/letrec-check/pr7706.ml text eol=lf
217-
testsuite/tests/letrec-disallowed/disallowed.ml text eol=lf
218-
testsuite/tests/letrec-disallowed/extension_constructor.ml text eol=lf
219-
testsuite/tests/letrec-disallowed/float_block_allowed.ml text eol=lf
220-
testsuite/tests/letrec-disallowed/float_block_disallowed.ml text eol=lf
221-
testsuite/tests/letrec-disallowed/generic_arrays.ml text eol=lf
222-
testsuite/tests/letrec-disallowed/lazy_.ml text eol=lf
223-
testsuite/tests/letrec-disallowed/module_constraints.ml text eol=lf
224-
testsuite/tests/letrec-disallowed/unboxed.ml text eol=lf
225-
testsuite/tests/letrec-disallowed/pr7215.ml text eol=lf
226-
testsuite/tests/letrec-disallowed/pr7231.ml text eol=lf
227-
testsuite/tests/letrec-disallowed/pr7706.ml text eol=lf
228-
testsuite/tests/lexing/uchar_esc.ml text eol=lf
229-
testsuite/tests/match-exception-warnings/exhaustiveness_warnings.ml text eol=lf
230-
testsuite/tests/tool-toplevel/pr7060.ml text eol=lf
231-
testsuite/tests/typing-extension-constructor/test.ml text eol=lf
232-
testsuite/tests/typing-extensions/extensions.ml text eol=lf
233-
testsuite/tests/typing-extensions/open_types.ml text eol=lf
234-
testsuite/tests/typing-objects/Exemples.ml text eol=lf
235-
testsuite/tests/typing-objects/pr5619_bad.ml text eol=lf
236-
testsuite/tests/typing-objects/pr6123_bad.ml text eol=lf
237-
testsuite/tests/typing-objects/pr6907_bad.ml text eol=lf
238-
testsuite/tests/typing-objects/Tests.ml text eol=lf
239-
testsuite/tests/typing-pattern_open/pattern_open.ml text eol=lf
240-
testsuite/tests/typing-private/private.ml text eol=lf
241-
testsuite/tests/typing-recordarg/recordarg.ml text eol=lf
242-
testsuite/tests/typing-short-paths/pr5918.ml text eol=lf
243-
testsuite/tests/typing-sigsubst/sigsubst.ml text eol=lf
244-
testsuite/tests/typing-typeparam/newtype.ml text eol=lf
245-
testsuite/tests/typing-unboxed/test.ml text eol=lf
246-
testsuite/tests/typing-unboxed-types/test.ml text eol=lf
247-
testsuite/tests/typing-unboxed-types/test_flat.ml text eol=lf
248-
testsuite/tests/typing-unboxed-types/test_no_flat.ml text eol=lf
249-
testsuite/tests/typing-warnings/ambiguous_guarded_disjunction.ml text eol=lf
250-
testsuite/tests/typing-warnings/application.ml text eol=lf
251-
testsuite/tests/typing-warnings/coercions.ml text eol=lf
252-
testsuite/tests/typing-warnings/exhaustiveness.ml text eol=lf
253-
testsuite/tests/typing-warnings/pr6587.ml text eol=lf
254-
testsuite/tests/typing-warnings/pr6872.ml text eol=lf
255-
testsuite/tests/typing-warnings/pr7085.ml text eol=lf
256-
testsuite/tests/typing-warnings/pr7115.ml text eol=lf
257-
testsuite/tests/typing-warnings/pr7261.ml text eol=lf
258-
testsuite/tests/typing-warnings/pr7297.ml text eol=lf
259-
testsuite/tests/typing-warnings/pr7553.ml text eol=lf
260-
testsuite/tests/typing-warnings/records.ml text eol=lf
261-
testsuite/tests/typing-warnings/unused_types.ml text eol=lf
216+
testsuite/tests/parsetree/locations_test.ml text eol=lf

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
- name: flambda-local
1919
config: --enable-flambda --enable-stack-allocation
2020
os: ubuntu-latest
21+
use_runtime: d
22+
ocamlrunparam: "v=0,V=1"
2123

2224
- name: i386
2325
config: CC='cc32' AS='as --32' ASPP='gcc -m32 -c' -host i386-linux PARTIALLD='ld -r -melf_i386'
@@ -108,3 +110,5 @@ jobs:
108110
make -f Makefile.jst runtest-upstream
109111
env:
110112
BUILD_OCAMLPARAM: ${{ matrix.ocamlparam }}
113+
OCAMLRUNPARAM: ${{ matrix.ocamlrunparam }}
114+
USE_RUNTIME: ${{ matrix.use_runtime }}

.gitignore

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ _build
4848
/ocaml-*.cache
4949
/config.log
5050
/config.status
51+
/flexlink.opt
5152
/libtool
5253
/ocamlc.opt
5354
/expunge
@@ -60,6 +61,7 @@ _build
6061
/*.sexp
6162
/_install
6263
/_runtest
64+
/_opam
6365

6466
# specific files and patterns in sub-directories
6567

@@ -72,8 +74,10 @@ _build
7274
/asmcomp/CSE.ml
7375

7476
/boot/ocamlrun
77+
/boot/ocamlruns
7578
/boot/camlheader
7679
/boot/ocamlc.opt
80+
/boot/flexlink.byte
7781

7882
/bytecomp/opcodes.ml
7983
/bytecomp/opcodes.mli
@@ -86,6 +90,8 @@ _build
8690
/emacs/ocamltags
8791
/emacs/*.elc
8892

93+
/flexdll-sources
94+
8995
/lambda/runtimedef.ml
9096

9197
/lex/parser.ml
@@ -95,8 +101,13 @@ _build
95101
/lex/ocamllex.opt
96102
/lex/parser.output
97103

98-
/manual/manual/cmds/warnings-help.etex
99-
/manual/manual/warnings-help.etex
104+
/manual/src/cmds/warnings-help.etex
105+
/manual/src/html_processing/src/common.ml
106+
/manual/src/warnings-help.etex
107+
108+
/api_docgen/build
109+
/api_docgen/odoc/build
110+
/api_docgen/ocamldoc/build
100111

101112
/ocamldoc/ocamldoc
102113
/ocamldoc/ocamldoc.opt
@@ -110,10 +121,6 @@ _build
110121
/ocamldoc/odoc_text_lexer.ml
111122
/ocamldoc/odoc_text_parser.ml
112123
/ocamldoc/odoc_text_parser.mli
113-
/ocamldoc/stdlib_man
114-
/ocamldoc/stdlib_html
115-
/ocamldoc/stdlib_latex
116-
/ocamldoc/stdlib_texi
117124
/ocamldoc/*.output
118125
/ocamldoc/test_stdlib
119126
/ocamldoc/test_latex
@@ -178,6 +185,7 @@ _build
178185
/parsing/parser.output
179186
/parsing/parser.automaton
180187
/parsing/parser.conflicts
188+
/parsing/parser.auto.messages
181189
/parsing/camlinternalMenhirLib.ml
182190
/parsing/camlinternalMenhirLib.mli
183191

@@ -195,6 +203,8 @@ _build
195203
/runtime/ld.conf
196204
/runtime/.gdb_history
197205
/runtime/.dep
206+
/runtime/build_config.h
207+
/runtime/sak
198208
/runtime/domain_state32.inc
199209
/runtime/domain_state64.inc
200210

@@ -250,7 +260,6 @@ _build
250260
/tools/keywords
251261
/tools/ocamlmklib
252262
/tools/ocamlmklib.opt
253-
/tools/ocamlmklibconfig.ml
254263
/tools/ocamlcmt
255264
/tools/ocamlcmt.opt
256265
/tools/cmpbyt
@@ -262,6 +271,13 @@ _build
262271
/tools/caml-tex
263272
/tools/eventlog_metadata
264273

274+
/toplevel/byte/topeval.mli
275+
/toplevel/byte/trace.mli
276+
/toplevel/byte/topmain.mli
277+
/toplevel/native/topeval.mli
278+
/toplevel/native/trace.mli
279+
/toplevel/native/topmain.mli
280+
265281
/utils/config.ml
266282
/utils/domainstate.ml
267283
/utils/domainstate.mli

.mailmap

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,21 @@ cvs2svn <[email protected]>
2828
Damien Doligez <[email protected]> Some Name <[email protected]>
2929
Damien Doligez <[email protected]> doligez <[email protected]>
3030
Mohamed Iguernelala <[email protected]>
31-
Jérémie Dimino <[email protected]>
31+
Jérémie Dimino <[email protected]>
32+
3233
Jeremy Yallop <[email protected]> yallop <[email protected]>
3334
Nicolás Ojeda Bär <[email protected]>
34-
35+
Nicolás Ojeda Bär <[email protected]> <[email protected]>
36+
François Pottier <[email protected]>
37+
Jérôme Vouillon <[email protected]>
38+
Frédéric Bour <[email protected]>
39+
40+
Armaël Guéneau <[email protected]>
41+
42+
43+
Edwin Török <[email protected]>
44+
45+
3546

3647
### Approved Approvers
3748

@@ -121,6 +132,7 @@ Joris Giovannangeli <joris@mantis>
121132
Wilfred Hughes <[email protected]> <wilfred@mantis>
122133
John Skaller <skaller@mantis>
123134
Eduardo Rafael <EduardoRFS@github>
135+
Runhang Li <objmagic@github>
124136

125137
# These contributors prefer to be referred to pseudonymously
126138
whitequark <[email protected]>

BOOTSTRAP.adoc

Lines changed: 49 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ Here is how to perform a change that requires a bootstrap:
3131
safer. Similarly, `make world.opt` will also bring you to such a stable
3232
state but builds more things than actually required.)
3333

34-
4. Now, and only now, edit the sources. Changes here may include adding,
35-
removing or renaming a primitive in the runtime, changing the magic
34+
4. Now, and only now, edit the sources. Changes here may include removing
35+
or renaming a primitive in the runtime, changing the magic
3636
number of bytecode executable files, changing the way types are
3737
represented or anything else in the format of .cmi files, etc.
3838
@@ -53,10 +53,57 @@ This will rebuild runtime/ocamlrun, ocamlc, etc.
5353
5454
make bootstrap
5555
56+
= Problems
57+
5658
If you notice that this procedure fails for a given change you are
5759
trying to implement, please report it so that the procedure can be
5860
updated to also cope with your change.
5961

62+
= Upstreaming
63+
6064
If you want to upstream your changes, indicate in the message of the
6165
commit that the changes need a bootstrap. Perform the bootstrap and
6266
commit the result of the bootstrap separately, after that commit.
67+
68+
= Adding, removing and renaming primitives
69+
70+
Primitives can be added without having to bootstrap, however it is necessary
71+
to repeat `make coldstart` in order to use your new primitive in the standard
72+
library.
73+
74+
There are five steps to renaming a primitive:
75+
76+
1. Rename the primitive and its uses
77+
78+
2. Create a temporary stub with the old primitive's name. This stub simply
79+
passes its arguments on to the new primitive:
80+
81+
CAMLprim value caml_old_primitive(value a1, value a2) {
82+
return caml_new_primitive(a1, a2);
83+
}
84+
85+
3. Deal with the addition of the new primitive:
86+
87+
make coldstart
88+
89+
4. Ensure the system still works:
90+
91+
make coreall
92+
93+
5. Now remove the old primitive stub and issue:
94+
95+
make bootstrap
96+
97+
It is desirable for bootstraps to be easily repeatable, so you should commit
98+
changes after step 4.
99+
100+
= Bootstrap test script
101+
102+
A script is provided (and used on Inria's continuous
103+
integration infrastructure) to make sure the bootstrap works. This
104+
script implements the bootstrap procedure described above and performs
105+
two changes to the compiler: it updates the magic numbers and removes
106+
a primitive from the runtime. It then makes sure the bootstrap still
107+
works after these changes. This script can be run locally as follows:
108+
109+
OCAML_ARCH=linux ./tools/ci/inria/bootstrap

0 commit comments

Comments
 (0)