Skip to content

Commit

Permalink
Merge pull request ocaml#87 from mshinwell/merge-4.14.1
Browse files Browse the repository at this point in the history
Merge 4.14.1
  • Loading branch information
mshinwell committed Dec 27, 2022
2 parents 3da21bc + ac5c7c8 commit e012992
Show file tree
Hide file tree
Showing 29 changed files with 345 additions and 73 deletions.
50 changes: 49 additions & 1 deletion Changes
@@ -1,6 +1,22 @@
OCaml 4.14 maintenance branch
OCaml 4.14.1 (20 December 2022)
------------------------------

### Bug fixes:

- #11803, #11808: on x86, the destination of an integer comparison must be
a register, it cannot be a stack slot.
(Vincent Laviron, review by Xavier Leroy, report by
Emilio Jesús Gallego Arias)


OCaml 4.14.1
-----------------------------

### Compiler user-interface and warnings:

- #11184, #11670: Stop calling ranlib on created / installed libraries
(Sébastien Hinderer and Xavier Leroy, review by the same)

### Build system:

- #11370, #11373: Don't pass CFLAGS to flexlink during configure.
Expand All @@ -12,6 +28,10 @@ OCaml 4.14 maintenance branch

### Bug fixes:

- #10768, #11340: Fix typechecking regression when combining first class
modules and GADTs.
(Jacques Garrigue, report by François Thiré, review by Matthew Ryan)

- #11204: Fix regression introduced in 4.14.0 that would trigger Warning 17 when
calling virtual methods introduced by constraining the self type from within
the class definition.
Expand Down Expand Up @@ -50,6 +70,34 @@ OCaml 4.14 maintenance branch
- #11516, #11524: Fix the `deprecated_mutable` attribute.
(Chris Casinghino, review by Nicolás Ojeda Bär and Florian Angeletti)

- #11194, #11609: Fix inconsistent type variable names in "unbound type var"
messages
(Ulysse Gérard and Florian Angeletti, review Florian Angeletti and
Gabriel Scherer)

- #11622: Prevent stack overflow when printing a constructor or record
mismatch error involving recursive types.
(Florian Angeletti, review by Gabriel Scherer)

- #11732: Ensure that types from packed modules are always generalised
(Stephen Dolan and Leo White, review by Jacques Garrigue)

- #11737: Fix segfault condition in Unix.stat under Windows in the presence of
multiple threads.
(Marc Lasson, Nicolás Ojeda Bär, review by Gabriel Scherer and David Allsopp)

- #11776: Extend environment with functor parameters in `strengthen_lazy`.
(Chris Casinghino and Luke Maurer, review by Gabriel Scherer)

- #11533, #11534: follow synonyms again in #show_module_type
(this had stopped working in 4.14.0)
(Gabriel Scherer, review by Jacques Garrigue, report by Yaron Minsky)

- #11768, #11788: Fix crash at start-up of bytecode programs in
no-naked-pointers mode caused by wrong initialization of caml_global_data
(Xavier Leroy, report by Etienne Millon, review by Gabriel Scherer)


OCaml 4.14.0 (28 March 2022)
----------------------------

Expand Down
8 changes: 3 additions & 5 deletions README.win32.adoc
Expand Up @@ -63,9 +63,7 @@ Only the `make` Cygwin package is required. `diffutils` is required if you wish
to be able to run the test suite.

Unless you are also compiling the Cygwin port of OCaml, you do not need the
`gcc-core` or `flexdll` packages. If you do install them, care may be required
to ensure that a particular build is using the correct installation of
`flexlink`.
`gcc-core` or `flexdll` packages.

[[bmflex]]
In addition to Cygwin, FlexDLL must also be installed, which is available from
Expand Down Expand Up @@ -197,7 +195,7 @@ quickly as it will be unable to link `ocamlrun`.

Now run:

./configure --build=i686-pc-cygwin --host=i686-pc-windows
./configure --build=x86_64-pc-cygwin --host=i686-pc-windows

for 32-bit, or:

Expand Down Expand Up @@ -262,7 +260,7 @@ the WinZip Options Window.)

Now run:

./configure --build=i686-pc-cygwin --host=i686-w64-mingw32
./configure --build=x86_64-pc-cygwin --host=i686-w64-mingw32

for 32-bit, or:

Expand Down
2 changes: 1 addition & 1 deletion VERSION
@@ -1,4 +1,4 @@
4.14.0+jst
4.14.1+jst

# Starting with OCaml 4.14, although the version string that appears above is
# still correct and this file can thus still be used to figure it out,
Expand Down
15 changes: 13 additions & 2 deletions asmcomp/amd64/reload.ml
Expand Up @@ -33,14 +33,15 @@ open Mach
Iload R R R
Istore R R
Iintop(Icomp) R R S
or S S R
or R S R
Iintop(Imul|Idiv|Imod) R R S
Iintop(Imulh) R R S
Iintop(shift) S S R
Iintop(others) R R S
or S S R
Iintop_imm(Iadd, n)/lea R R
Iintop_imm(Imul, n) R R
Iintop_imm(Icomp, n) R S
Iintop_imm(others) S S
Inegf...Idivf R R S
Ifloatofint R S
Expand All @@ -66,7 +67,14 @@ inherit Reloadgen.reload_generic as super

method! reload_operation op arg res =
match op with
| Iintop(Iadd|Isub|Iand|Ior|Ixor|Icomp _|Icheckbound) ->
| Iintop(Iadd|Isub|Iand|Ior|Ixor|Icheckbound) ->
(* One of the two arguments can reside in the stack, but not both *)
if stackp arg.(0) && stackp arg.(1)
then ([|arg.(0); self#makereg arg.(1)|], res)
else (arg, res)
| Iintop(Icomp _) ->
(* The result must be a register (PR#11803) *)
let res = self#makeregs res in
(* One of the two arguments can reside in the stack, but not both *)
if stackp arg.(0) && stackp arg.(1)
then ([|arg.(0); self#makereg arg.(1)|], res)
Expand All @@ -80,6 +88,9 @@ method! reload_operation op arg res =
if stackp arg.(0)
then (let r = self#makereg arg.(0) in ([|r|], [|r|]))
else (arg, res)
| Iintop_imm(Icomp _, _) ->
(* The result must be in a register (PR#11803) *)
(arg, self#makeregs res)
| Iintop(Imulh | Idiv | Imod | Ilsl | Ilsr | Iasr)
| Iintop_imm(_, _) ->
(* The argument(s) and results can be either in register or on stack *)
Expand Down
12 changes: 11 additions & 1 deletion asmcomp/i386/reload.ml
Expand Up @@ -40,7 +40,14 @@ method! makereg r =

method! reload_operation op arg res =
match op with
Iintop(Iadd|Isub|Iand|Ior|Ixor|Icomp _|Icheckbound) ->
Iintop(Iadd|Isub|Iand|Ior|Ixor|Icheckbound) ->
(* One of the two arguments can reside in the stack *)
if stackp arg.(0) && stackp arg.(1)
then ([|arg.(0); self#makereg arg.(1)|], res)
else (arg, res)
| Iintop(Icomp _) ->
(* The result must be a register (PR#11803) *)
let res = self#makeregs res in
(* One of the two arguments can reside in the stack *)
if stackp arg.(0) && stackp arg.(1)
then ([|arg.(0); self#makereg arg.(1)|], res)
Expand All @@ -60,6 +67,9 @@ method! reload_operation op arg res =
if stackp arg.(0)
then let r = self#makereg arg.(0) in ([|r|], [|r|])
else (arg, res)
| Iintop_imm(Icomp _, _) ->
(* The result must be in a register (PR#11803) *)
(arg, self#makeregs res)
| Iintop(Imulh | Ilsl | Ilsr | Iasr) | Iintop_imm(_, _)
| Ifloatofint | Iintoffloat | Ispecific(Ipush) ->
(* The argument(s) can be either in register or on stack *)
Expand Down
2 changes: 1 addition & 1 deletion asmcomp/reloadgen.ml
Expand Up @@ -46,7 +46,7 @@ method makereg r =
newr.spill_cost <- 100000;
newr

method private makeregs rv =
method makeregs rv =
let n = Array.length rv in
let newv = Array.make n Reg.dummy in
for i = 0 to n-1 do newv.(i) <- self#makereg rv.(i) done;
Expand Down
1 change: 1 addition & 0 deletions asmcomp/reloadgen.mli
Expand Up @@ -20,6 +20,7 @@ class reload_generic : object
(* Can be overridden to reflect instructions that can operate
directly on stack locations *)
method makereg : Reg.t -> Reg.t
method makeregs : Reg.t array -> Reg.t array
(* Can be overridden to avoid creating new registers of some class
(i.e. if all "registers" of that class are actually on stack) *)
method fundecl : Mach.fundecl -> int array -> Mach.fundecl * bool
Expand Down
Binary file modified boot/ocamlc
Binary file not shown.
Binary file modified boot/ocamllex
Binary file not shown.
2 changes: 1 addition & 1 deletion build-aux/ocaml_version.m4
Expand Up @@ -25,7 +25,7 @@
# The following macro, OCAML__DEVELOPMENT_VERSION, should be either
# [true] of [false].

m4_define([OCAML__DEVELOPMENT_VERSION], [true])
m4_define([OCAML__DEVELOPMENT_VERSION], [false])

# The three following components (major, minor and patch level) MUST be
# integers. They MUST NOT be left-padded with zeros and all of them,
Expand Down
40 changes: 20 additions & 20 deletions configure

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e012992

Please sign in to comment.