Skip to content

Commit

Permalink
Tests: promote
Browse files Browse the repository at this point in the history
  • Loading branch information
hhugo committed Apr 11, 2024
1 parent 16e71ae commit 06795cf
Show file tree
Hide file tree
Showing 15 changed files with 6,446 additions and 4,621 deletions.
5 changes: 1 addition & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ jobs:
dune-cache: true
opam-depext: false

- run: opam pin add ppxlib git+https://github.com/hhugo/ppxlib.git#jsoo-ocaml-52 --no-action
if: ${{ matrix.ocaml-compiler == 'ocaml-variants.5.3.0+trunk' }}

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

- run: opam pin add ./ --no-action
Expand Down
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* Runtime: abort instead of exit when calling unimplemented
js primitives in bytecode/native. It should help if one tries
to understand the source of the call with gdb (see #677)
* Compiler: initial support for OCaml 5.3

## Bug fixes

Expand Down
5 changes: 3 additions & 2 deletions compiler/lib/magic_number.ml
Original file line number Diff line number Diff line change
Expand Up @@ -77,11 +77,12 @@ let v =
| 5 :: 00 :: _ -> 32
| 5 :: 01 :: _ -> 33
| 5 :: 02 :: _ -> 34
| 5 :: 03 :: _ -> 35
| _ ->
if Ocaml_version.compare current [ 4; 8 ] < 0
if Ocaml_version.compare current [ 4; 08 ] < 0
then failwith "OCaml version unsupported. Upgrade to OCaml 4.08 or newer."
else (
assert (Ocaml_version.compare current [ 5; 3 ] >= 0);
assert (Ocaml_version.compare current [ 5; 04 ] >= 0);
failwith "OCaml version unsupported. Upgrade js_of_ocaml.")

let current_exe = "Caml1999X", v
Expand Down
1 change: 0 additions & 1 deletion compiler/lib/parse_bytecode.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2412,7 +2412,6 @@ and compile infos pc state instrs =
| true -> State.pop 2 state
| false -> State.pop 3 state
in

compile
infos
(pc + 1)
Expand Down
21 changes: 1 addition & 20 deletions compiler/tests-check-prim/main.output5
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,11 @@ Missing
From main.bc:
caml_alloc_dummy_function
caml_continuation_use
caml_drop_continuation
caml_dynlink_add_primitive
caml_dynlink_close_lib
caml_dynlink_get_current_libs
caml_dynlink_lookup_symbol
caml_dynlink_open_lib
caml_int64_add_native
caml_int64_and_native
caml_int64_div_native
caml_int64_mod_native
caml_int64_mul_native
caml_int64_neg_native
caml_int64_or_native
caml_int64_sub_native
caml_int64_xor_native
caml_int_as_pointer
caml_reset_afl_instrumentation
caml_signbit
Expand All @@ -44,7 +34,6 @@ caml_bigstring_memcmp
caml_hash_mix_bigstring

From +domain.js:
caml_atomic_make_contended
caml_ml_domain_set_name

From +effect.js:
Expand All @@ -63,7 +52,6 @@ caml_eventlog_resume
caml_gc_huge_fallback_count
caml_get_major_bucket
caml_get_major_credit
caml_memprof_discard
caml_memprof_set

From +graphics.js:
Expand Down Expand Up @@ -119,10 +107,6 @@ From +ints.js:
caml_div
caml_mod

From +io.js:
caml_ml_input_bigarray
caml_ml_output_bigarray

From +jslib.js:
caml_is_js
caml_trampoline
Expand Down Expand Up @@ -155,12 +139,10 @@ caml_obj_set_tag
caml_obj_truncate

From +runtime_events.js:
caml_ml_runtime_events_pause
caml_ml_runtime_events_resume
caml_ml_runtime_events_start
caml_runtime_events_create_cursor
caml_runtime_events_free_cursor
caml_runtime_events_read_poll
caml_runtime_events_user_resolve

From +stdlib.js:
caml_build_symbols
Expand Down Expand Up @@ -188,7 +170,6 @@ caml_spacetime_only_works_for_native_code
caml_sys_const_naked_pointers_checked

From +toplevel.js:
caml_dynlink_get_bytecode_sections
caml_static_alloc
caml_static_free
caml_terminfo_backup
Expand Down
23 changes: 3 additions & 20 deletions compiler/tests-check-prim/unix-unix.output5
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,11 @@ Missing
From unix.bc:
caml_alloc_dummy_function
caml_continuation_use
caml_drop_continuation
caml_dynlink_add_primitive
caml_dynlink_close_lib
caml_dynlink_get_current_libs
caml_dynlink_lookup_symbol
caml_dynlink_open_lib
caml_int64_add_native
caml_int64_and_native
caml_int64_div_native
caml_int64_mod_native
caml_int64_mul_native
caml_int64_neg_native
caml_int64_or_native
caml_int64_sub_native
caml_int64_xor_native
caml_int_as_pointer
caml_reset_afl_instrumentation
caml_signbit
Expand Down Expand Up @@ -92,6 +82,7 @@ caml_unix_outchannel_of_filedescr
caml_unix_pipe
caml_unix_putenv
caml_unix_read
caml_unix_read_bigarray
caml_unix_realpath
caml_unix_recv
caml_unix_recvfrom
Expand Down Expand Up @@ -131,6 +122,7 @@ caml_unix_utimes
caml_unix_wait
caml_unix_waitpid
caml_unix_write
caml_unix_write_bigarray
debugger
is_digit_normalized

Expand All @@ -153,7 +145,6 @@ caml_bigstring_memcmp
caml_hash_mix_bigstring

From +domain.js:
caml_atomic_make_contended
caml_ml_domain_set_name

From +effect.js:
Expand All @@ -172,7 +163,6 @@ caml_eventlog_resume
caml_gc_huge_fallback_count
caml_get_major_bucket
caml_get_major_credit
caml_memprof_discard
caml_memprof_set

From +graphics.js:
Expand Down Expand Up @@ -228,10 +218,6 @@ From +ints.js:
caml_div
caml_mod

From +io.js:
caml_ml_input_bigarray
caml_ml_output_bigarray

From +jslib.js:
caml_is_js
caml_trampoline
Expand Down Expand Up @@ -264,12 +250,10 @@ caml_obj_set_tag
caml_obj_truncate

From +runtime_events.js:
caml_ml_runtime_events_pause
caml_ml_runtime_events_resume
caml_ml_runtime_events_start
caml_runtime_events_create_cursor
caml_runtime_events_free_cursor
caml_runtime_events_read_poll
caml_runtime_events_user_resolve

From +stdlib.js:
caml_build_symbols
Expand Down Expand Up @@ -297,7 +281,6 @@ caml_spacetime_only_works_for_native_code
caml_sys_const_naked_pointers_checked

From +toplevel.js:
caml_dynlink_get_bytecode_sections
caml_static_alloc
caml_static_free
caml_terminfo_backup
Expand Down
6 changes: 3 additions & 3 deletions compiler/tests-full/dune
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
(rule
(targets stdlib.cma.js)
(enabled_if
(= %{ocaml_version} "5.1.1"))
(>= %{ocaml_version} "5.2.0"))
(action
(run
%{bin:js_of_ocaml}
Expand All @@ -14,7 +14,7 @@
(rule
(targets stdlib.cma.output.js)
(enabled_if
(= %{ocaml_version} "5.1.1"))
(>= %{ocaml_version} "5.2.0"))
(action
(with-stdout-to
%{targets}
Expand All @@ -23,6 +23,6 @@
(rule
(alias runtest)
(enabled_if
(= %{ocaml_version} "5.1.1"))
(>= %{ocaml_version} "5.2.0"))
(action
(diff stdlib.cma.expected.js stdlib.cma.output.js)))
Loading

0 comments on commit 06795cf

Please sign in to comment.