Skip to content

Commit 7220011

Browse files
committed
Merge ocaml-jst#97
2 parents 4da84c4 + 2270ed1 commit 7220011

File tree

6 files changed

+50
-21
lines changed

6 files changed

+50
-21
lines changed

ocaml/.github/workflows/build.yml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -46,58 +46,58 @@ jobs:
4646
with:
4747
path: 'ocaml-jst'
4848

49-
- name: Cache OCaml 4.12 and dune
49+
- name: Cache OCaml 4.14 and dune
5050
uses: actions/cache@v1
5151
id: cache
5252
with:
53-
path: ${{ github.workspace }}/ocaml-412/_install
54-
key: ${{ matrix.os }}-cache-ocaml-412-dune-341-bits-${{ matrix.boot_cachekey }}
53+
path: ${{ github.workspace }}/ocaml-414/_install
54+
key: ${{ matrix.os }}-cache-ocaml-414-dune-361-bits-${{ matrix.boot_cachekey }}
5555

56-
- name: Checkout OCaml 4.12
56+
- name: Checkout OCaml 4.14
5757
uses: actions/checkout@master
5858
if: steps.cache.outputs.cache-hit != 'true'
5959
with:
6060
repository: 'ocaml/ocaml'
61-
path: 'ocaml-412'
62-
ref: '4.12'
61+
path: 'ocaml-414'
62+
ref: '4.14'
6363

6464
- name: Setup 32-bit C compiler
6565
if: matrix.name == 'i386' && steps.cache.outputs.cache-hit != 'true'
6666
run: |
67-
mkdir -p ocaml-412/_install/bin
68-
{ echo '#!/bin/sh'; echo 'exec gcc -m32 "$@"'; } > ocaml-412/_install/bin/cc32
69-
chmod +x ocaml-412/_install/bin/cc32
67+
mkdir -p ocaml-414/_install/bin
68+
{ echo '#!/bin/sh'; echo 'exec gcc -m32 "$@"'; } > ocaml-414/_install/bin/cc32
69+
chmod +x ocaml-414/_install/bin/cc32
7070
71-
- name: Build OCaml 4.12
71+
- name: Build OCaml 4.14
7272
if: steps.cache.outputs.cache-hit != 'true'
73-
working-directory: ocaml-412
73+
working-directory: ocaml-414
7474
run: |
75-
export PATH=$GITHUB_WORKSPACE/ocaml-412/_install/bin:$PATH
76-
./configure --prefix=$GITHUB_WORKSPACE/ocaml-412/_install ${{ matrix.boot_config }}
75+
export PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH
76+
./configure --prefix=$GITHUB_WORKSPACE/ocaml-414/_install ${{ matrix.boot_config }}
7777
make -j $J world.opt
7878
make install
7979
# Remove unneeded parts to shrink cache file
80-
rm -rf $GITHUB_WORKSPACE/ocaml-412/_install/{lib/ocaml/compiler-libs,lib/ocaml/expunge,bin/*.byte}
80+
rm -rf $GITHUB_WORKSPACE/ocaml-414/_install/{lib/ocaml/compiler-libs,lib/ocaml/expunge,bin/*.byte}
8181
8282
- name: Checkout dune github repo
8383
uses: actions/checkout@master
8484
if: steps.cache.outputs.cache-hit != 'true'
8585
with:
8686
repository: 'ocaml/dune'
87-
ref: '3.4.1'
87+
ref: '3.6.1'
8888
path: 'dune'
8989

9090
- name: Build dune
9191
working-directory: dune
9292
if: steps.cache.outputs.cache-hit != 'true'
9393
run: |
94-
PATH=$GITHUB_WORKSPACE/ocaml-412/_install/bin:$PATH make release
95-
cp dune.exe $GITHUB_WORKSPACE/ocaml-412/_install/bin/dune
94+
PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH make release
95+
cp _boot/dune.exe $GITHUB_WORKSPACE/ocaml-414/_install/bin/dune
9696
9797
- name: Configure OCaml
9898
working-directory: ocaml-jst
9999
run: |
100-
export PATH=$GITHUB_WORKSPACE/ocaml-412/_install/bin:$PATH
100+
export PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH
101101
autoconf
102102
./configure \
103103
--prefix=$GITHUB_WORKSPACE/_install \
@@ -106,7 +106,7 @@ jobs:
106106
- name: Build, install and test ocaml-jst
107107
working-directory: ocaml-jst
108108
run: |
109-
export PATH=$GITHUB_WORKSPACE/ocaml-412/_install/bin:$PATH
109+
export PATH=$GITHUB_WORKSPACE/ocaml-414/_install/bin:$PATH
110110
make -f Makefile.jst runtest-upstream
111111
env:
112112
BUILD_OCAMLPARAM: ${{ matrix.ocamlparam }}

ocaml/.github/workflows/menhir.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: menhir
2+
on: [push, pull_request]
3+
jobs:
4+
menhir:
5+
name: Check Menhir version
6+
runs-on: ubuntu-latest
7+
steps:
8+
- name: Checkout the ocaml-jst repo
9+
uses: actions/checkout@master
10+
with:
11+
path: 'ocaml-jst'
12+
- name: Check Menhir version
13+
shell: bash
14+
run: |
15+
grep --count --max-count=1 --quiet 'MenhirLib.StaticVersion.require_20210419' ocaml-jst/boot/menhir/parser.ml

ocaml/boot/ocamlc

-213 Bytes
Binary file not shown.

ocaml/testsuite/tests/typing-local/crossing.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,4 +343,4 @@ module M : sig type t [@@immediate] end
343343
type t2 = { x : int; } [@@unboxed]
344344
val f : local_ M.t -> M.t = <fun>
345345
val f : local_ t2 -> t2 = <fun>
346-
|}]
346+
|}]
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
(* TEST
2+
* arch64
3+
** expect *)
4+
5+
(* Mode crossing works on immediate64 types *)
6+
module F (M : sig type t [@@immediate64] end) = struct
7+
let f : local_ M.t -> _ = fun t -> t
8+
end
9+
10+
[%%expect{|
11+
module F :
12+
functor (M : sig type t [@@immediate64] end) ->
13+
sig val f : local_ M.t -> M.t end
14+
|}]

ocaml/typing/typecore.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -559,7 +559,7 @@ let mode_cross env (ty : type_expr) mode =
559559
if is_principal ty then begin
560560
match immediacy env ty with
561561
| Type_immediacy.Always -> Value_mode.newvar ()
562-
| Type_immediacy.Always_on_64bits when !Clflags.native_code && Sys.word_size = 64 ->
562+
| Type_immediacy.Always_on_64bits when Sys.word_size = 64 ->
563563
Value_mode.newvar () (* floating and relaxed *)
564564
| _ -> mode
565565
end

0 commit comments

Comments
 (0)