Skip to content

Commit 06795cf

Browse files
committed
Tests: promote
1 parent 16e71ae commit 06795cf

File tree

15 files changed

+6446
-4621
lines changed

15 files changed

+6446
-4621
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,10 +99,7 @@ jobs:
9999
dune-cache: true
100100
opam-depext: false
101101

102-
- run: opam pin add ppxlib git+https://github.com/hhugo/ppxlib.git#jsoo-ocaml-52 --no-action
103-
if: ${{ matrix.ocaml-compiler == 'ocaml-variants.5.3.0+trunk' }}
104-
105-
- run: opam pin add ocaml-compiler-libs git+https://github.com/art-w/ocaml-compiler-libs.git#ocaml-5.2-trunk --no-action
102+
- run: opam pin add ppxlib git+https://github.com/hhugo/ppxlib.git#trunk-support-53 --no-action
106103
if: ${{ matrix.ocaml-compiler == 'ocaml-variants.5.3.0+trunk' }}
107104

108105
- run: opam pin add ./ --no-action

CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
* Runtime: abort instead of exit when calling unimplemented
1616
js primitives in bytecode/native. It should help if one tries
1717
to understand the source of the call with gdb (see #677)
18+
* Compiler: initial support for OCaml 5.3
1819

1920
## Bug fixes
2021

compiler/lib/magic_number.ml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,12 @@ let v =
7777
| 5 :: 00 :: _ -> 32
7878
| 5 :: 01 :: _ -> 33
7979
| 5 :: 02 :: _ -> 34
80+
| 5 :: 03 :: _ -> 35
8081
| _ ->
81-
if Ocaml_version.compare current [ 4; 8 ] < 0
82+
if Ocaml_version.compare current [ 4; 08 ] < 0
8283
then failwith "OCaml version unsupported. Upgrade to OCaml 4.08 or newer."
8384
else (
84-
assert (Ocaml_version.compare current [ 5; 3 ] >= 0);
85+
assert (Ocaml_version.compare current [ 5; 04 ] >= 0);
8586
failwith "OCaml version unsupported. Upgrade js_of_ocaml.")
8687

8788
let current_exe = "Caml1999X", v

compiler/lib/parse_bytecode.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2412,7 +2412,6 @@ and compile infos pc state instrs =
24122412
| true -> State.pop 2 state
24132413
| false -> State.pop 3 state
24142414
in
2415-
24162415
compile
24172416
infos
24182417
(pc + 1)

compiler/tests-check-prim/main.output5

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,11 @@ Missing
44
From main.bc:
55
caml_alloc_dummy_function
66
caml_continuation_use
7-
caml_drop_continuation
87
caml_dynlink_add_primitive
98
caml_dynlink_close_lib
109
caml_dynlink_get_current_libs
1110
caml_dynlink_lookup_symbol
1211
caml_dynlink_open_lib
13-
caml_int64_add_native
14-
caml_int64_and_native
15-
caml_int64_div_native
16-
caml_int64_mod_native
17-
caml_int64_mul_native
18-
caml_int64_neg_native
19-
caml_int64_or_native
20-
caml_int64_sub_native
21-
caml_int64_xor_native
2212
caml_int_as_pointer
2313
caml_reset_afl_instrumentation
2414
caml_signbit
@@ -44,7 +34,6 @@ caml_bigstring_memcmp
4434
caml_hash_mix_bigstring
4535

4636
From +domain.js:
47-
caml_atomic_make_contended
4837
caml_ml_domain_set_name
4938

5039
From +effect.js:
@@ -63,7 +52,6 @@ caml_eventlog_resume
6352
caml_gc_huge_fallback_count
6453
caml_get_major_bucket
6554
caml_get_major_credit
66-
caml_memprof_discard
6755
caml_memprof_set
6856

6957
From +graphics.js:
@@ -119,10 +107,6 @@ From +ints.js:
119107
caml_div
120108
caml_mod
121109

122-
From +io.js:
123-
caml_ml_input_bigarray
124-
caml_ml_output_bigarray
125-
126110
From +jslib.js:
127111
caml_is_js
128112
caml_trampoline
@@ -155,12 +139,10 @@ caml_obj_set_tag
155139
caml_obj_truncate
156140

157141
From +runtime_events.js:
158-
caml_ml_runtime_events_pause
159-
caml_ml_runtime_events_resume
160-
caml_ml_runtime_events_start
161142
caml_runtime_events_create_cursor
162143
caml_runtime_events_free_cursor
163144
caml_runtime_events_read_poll
145+
caml_runtime_events_user_resolve
164146

165147
From +stdlib.js:
166148
caml_build_symbols
@@ -188,7 +170,6 @@ caml_spacetime_only_works_for_native_code
188170
caml_sys_const_naked_pointers_checked
189171

190172
From +toplevel.js:
191-
caml_dynlink_get_bytecode_sections
192173
caml_static_alloc
193174
caml_static_free
194175
caml_terminfo_backup

compiler/tests-check-prim/unix-unix.output5

Lines changed: 3 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,11 @@ Missing
44
From unix.bc:
55
caml_alloc_dummy_function
66
caml_continuation_use
7-
caml_drop_continuation
87
caml_dynlink_add_primitive
98
caml_dynlink_close_lib
109
caml_dynlink_get_current_libs
1110
caml_dynlink_lookup_symbol
1211
caml_dynlink_open_lib
13-
caml_int64_add_native
14-
caml_int64_and_native
15-
caml_int64_div_native
16-
caml_int64_mod_native
17-
caml_int64_mul_native
18-
caml_int64_neg_native
19-
caml_int64_or_native
20-
caml_int64_sub_native
21-
caml_int64_xor_native
2212
caml_int_as_pointer
2313
caml_reset_afl_instrumentation
2414
caml_signbit
@@ -92,6 +82,7 @@ caml_unix_outchannel_of_filedescr
9282
caml_unix_pipe
9383
caml_unix_putenv
9484
caml_unix_read
85+
caml_unix_read_bigarray
9586
caml_unix_realpath
9687
caml_unix_recv
9788
caml_unix_recvfrom
@@ -131,6 +122,7 @@ caml_unix_utimes
131122
caml_unix_wait
132123
caml_unix_waitpid
133124
caml_unix_write
125+
caml_unix_write_bigarray
134126
debugger
135127
is_digit_normalized
136128

@@ -153,7 +145,6 @@ caml_bigstring_memcmp
153145
caml_hash_mix_bigstring
154146

155147
From +domain.js:
156-
caml_atomic_make_contended
157148
caml_ml_domain_set_name
158149

159150
From +effect.js:
@@ -172,7 +163,6 @@ caml_eventlog_resume
172163
caml_gc_huge_fallback_count
173164
caml_get_major_bucket
174165
caml_get_major_credit
175-
caml_memprof_discard
176166
caml_memprof_set
177167

178168
From +graphics.js:
@@ -228,10 +218,6 @@ From +ints.js:
228218
caml_div
229219
caml_mod
230220

231-
From +io.js:
232-
caml_ml_input_bigarray
233-
caml_ml_output_bigarray
234-
235221
From +jslib.js:
236222
caml_is_js
237223
caml_trampoline
@@ -264,12 +250,10 @@ caml_obj_set_tag
264250
caml_obj_truncate
265251

266252
From +runtime_events.js:
267-
caml_ml_runtime_events_pause
268-
caml_ml_runtime_events_resume
269-
caml_ml_runtime_events_start
270253
caml_runtime_events_create_cursor
271254
caml_runtime_events_free_cursor
272255
caml_runtime_events_read_poll
256+
caml_runtime_events_user_resolve
273257

274258
From +stdlib.js:
275259
caml_build_symbols
@@ -297,7 +281,6 @@ caml_spacetime_only_works_for_native_code
297281
caml_sys_const_naked_pointers_checked
298282

299283
From +toplevel.js:
300-
caml_dynlink_get_bytecode_sections
301284
caml_static_alloc
302285
caml_static_free
303286
caml_terminfo_backup

compiler/tests-full/dune

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(rule
22
(targets stdlib.cma.js)
33
(enabled_if
4-
(= %{ocaml_version} "5.1.1"))
4+
(>= %{ocaml_version} "5.2.0"))
55
(action
66
(run
77
%{bin:js_of_ocaml}
@@ -14,7 +14,7 @@
1414
(rule
1515
(targets stdlib.cma.output.js)
1616
(enabled_if
17-
(= %{ocaml_version} "5.1.1"))
17+
(>= %{ocaml_version} "5.2.0"))
1818
(action
1919
(with-stdout-to
2020
%{targets}
@@ -23,6 +23,6 @@
2323
(rule
2424
(alias runtest)
2525
(enabled_if
26-
(= %{ocaml_version} "5.1.1"))
26+
(>= %{ocaml_version} "5.2.0"))
2727
(action
2828
(diff stdlib.cma.expected.js stdlib.cma.output.js)))

0 commit comments

Comments
 (0)