Skip to content

Commit bcec5fe

Browse files
committed
Squashed 'ocaml/' changes from a09392d..c703f5f
c703f5f Incorporate upstream comments into type-variable refactor (oxcaml#121) 362ba23 Constrain curry modes to increase along applications (oxcaml#108) b1f0cf9 Simplify the extension handling (oxcaml#114) 4fd53a1 Remove pat_mode from typedtree (oxcaml#105) cf6fcbc Handle attributes on lambdas with locally abstract types (oxcaml#120) 5fa80fe Don't track attributes inside attributes for warning 53 (oxcaml#115) 8a69777 Handle unclosed `[: ... :]` patterns (via `Generic_array` machinery) (oxcaml#117) b0737f4 Add promote-one Makefile target (oxcaml#118) c6ad684 Refactoring and fixes around module lookup (oxcaml#107) b0a6495 Add documentation for global constructor arguments (oxcaml#69) dd79aec Print `nlocal` in the `-d(raw)lambda` output (oxcaml#112) 8035026 Fix `nlocal` in the generated Lambda for list comprehensions (oxcaml#113) afbcdf0 Immutable arrays (oxcaml#47) bfe1490 fix several issues when removing exp_mode (oxcaml#110) 8f46060 Better error message for under-applied functions (oxcaml#74) 27331d8 Consistently use Lmutvar or Lvar in comprehensions (oxcaml#111) 01e965b Skip failing test for now 0131357 Fix test case to use comprehensions_experimental 22a7368 Temporarily disable list comprehensions tests due to locals bug e08377d Make `comprehensions` into `comprehensions_experimental` for now (oxcaml#109) 947cf89 List and array comprehensions (oxcaml#46) bd9e051 remove exp_mode from typedtree (oxcaml#100) a9268d2 Fix misplaced attribute warning when using external parser (and some cleanup) (oxcaml#101) 2b33f24 Refactor toplevel local escape check (oxcaml#104) ed2aec6 Comment functions exported from TyVarEnv. 87838ba Move new variable creation into TyVarEnv. a3f60ab Encapsulate functions that work with tyvars 43d83a6 Prevent possibility of forgetting to re-widen 2f3dd34 Encapsulate context when narrowing type env't d78ff6d Make immediate64 things mode cross (oxcaml#97) aa25ab9 Fix version number (oxcaml#94) d01ffa0 Fix .depend file (oxcaml#93) 942f2ab Bootstrap (oxcaml#92) 05f7e38 Check Menhir version (oxcaml#91) 1569b58 Move the CI jobs from 4.12 to 4.14. (oxcaml#90) git-subtree-dir: ocaml git-subtree-split: c703f5f
1 parent 64caa59 commit bcec5fe

File tree

176 files changed

+32458
-10323
lines changed

Some content is hidden

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

176 files changed

+32458
-10323
lines changed

.depend

Lines changed: 134 additions & 36 deletions
Large diffs are not rendered by default.

.depend.menhir

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
1-
parsing/parser.cmo : parsing/syntaxerr.cmi parsing/parsetree.cmi \
2-
parsing/longident.cmi parsing/location.cmi parsing/docstrings.cmi \
3-
utils/clflags.cmi parsing/asttypes.cmi parsing/ast_helper.cmi \
1+
parsing/parser.cmo : \
2+
parsing/syntaxerr.cmi \
3+
parsing/parsetree.cmi \
4+
parsing/longident.cmi \
5+
parsing/location.cmi \
6+
parsing/extensions.cmi \
7+
parsing/docstrings.cmi \
8+
utils/clflags.cmi \
9+
parsing/builtin_attributes.cmi \
10+
parsing/asttypes.cmi \
11+
parsing/ast_helper.cmi \
412
parsing/parser.cmi
5-
parsing/parser.cmx : parsing/syntaxerr.cmx parsing/parsetree.cmi \
6-
parsing/longident.cmx parsing/location.cmx parsing/docstrings.cmx \
7-
utils/clflags.cmx parsing/asttypes.cmi parsing/ast_helper.cmx \
13+
parsing/parser.cmx : \
14+
parsing/syntaxerr.cmx \
15+
parsing/parsetree.cmi \
16+
parsing/longident.cmx \
17+
parsing/location.cmx \
18+
parsing/extensions.cmx \
19+
parsing/docstrings.cmx \
20+
utils/clflags.cmx \
21+
parsing/builtin_attributes.cmx \
22+
parsing/asttypes.cmi \
23+
parsing/ast_helper.cmx \
824
parsing/parser.cmi
9-
parsing/parser.cmi : parsing/parsetree.cmi parsing/location.cmi \
25+
parsing/parser.cmi : \
26+
parsing/parsetree.cmi \
27+
parsing/longident.cmi \
28+
parsing/location.cmi \
1029
parsing/docstrings.cmi
11-
parsing/parser.ml parsing/parser.mli: parsing/ast_helper.cmi parsing/asttypes.cmi utils/clflags.cmi parsing/docstrings.cmi parsing/location.cmi parsing/longident.cmi parsing/parsetree.cmi parsing/syntaxerr.cmi
30+
parsing/parser.ml parsing/parser.mli: parsing/ast_helper.cmi parsing/asttypes.cmi parsing/builtin_attributes.cmi utils/clflags.cmi parsing/docstrings.cmi parsing/extensions.cmi parsing/location.cmi parsing/longident.cmi parsing/parsetree.cmi parsing/syntaxerr.cmi

.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 }}

.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

Makefile.common-jst

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,15 @@ test-one: install_for_test
290290
export LIBRARY_PATH=$$(dirname $$(gfortran -print-file-name=libgfortran.a)); \
291291
fi; \
292292
cd _runtest/testsuite && make one $(if $(TEST),TEST="tests/$(TEST)") $(if $(DIR),DIR="tests/$(DIR)"))
293-
293+
294+
promote-one: install_for_test
295+
(export OCAMLSRCDIR=$$(pwd)/_runtest; \
296+
export CAML_LD_LIBRARY_PATH=$$(pwd)/_runtest/lib/ocaml/stublibs; \
297+
if $$(which gfortran > /dev/null 2>&1); then \
298+
export LIBRARY_PATH=$$(dirname $$(gfortran -print-file-name=libgfortran.a)); \
299+
fi; \
300+
cd _runtest/testsuite && make promote $(if $(TEST),TEST="tests/$(TEST)") $(if $(DIR),DIR="tests/$(DIR)"))
301+
294302
# This target is like a polling version of upstream "make ocamlopt"
295303
.PHONY: hacking
296304
hacking: _build/_bootinstall

asmcomp/cmm_helpers.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2347,8 +2347,8 @@ let assignment_kind
23472347
(ptr: Lambda.immediate_or_pointer)
23482348
(init: Lambda.initialization_or_assignment) =
23492349
match init, ptr with
2350-
| Assignment Alloc_heap, Pointer -> Caml_modify
2351-
| Assignment Alloc_local, Pointer ->
2350+
| Assignment Modify_heap, Pointer -> Caml_modify
2351+
| Assignment Modify_maybe_stack, Pointer ->
23522352
assert Config.stack_allocation;
23532353
Caml_modify_local
23542354
| Heap_initialization, _ ->

0 commit comments

Comments
 (0)