Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e51a8c9
Runtime: add caml_blake2_bytes
hhugo Nov 18, 2024
a19870e
Runtime: missing array primitives
hhugo Nov 18, 2024
4132da0
Runtime: runtime_events primitive
hhugo Nov 18, 2024
77e7fdc
Tests: check-prim uses dynlink.js
hhugo Nov 18, 2024
cb60c0a
Tests: recursive value compilation
hhugo Nov 18, 2024
d657000
Tests: promote with new compilation strategy
hhugo Nov 18, 2024
badd20a
Runtime: add caml_signbit
hhugo Nov 18, 2024
3177e67
Runtime: add is_digit_normalized
hhugo Nov 18, 2024
f4090d0
Runtime: adjust runtime for 5.1
hhugo Nov 18, 2024
30789f1
Runtime: adjust runtime for 5.0
hhugo Nov 18, 2024
3014c1f
Runtime: adjust runtime for 4.14
hhugo Nov 18, 2024
68ec5cc
Runtime: adjust domain.js
hhugo Nov 18, 2024
93f3e95
Runtime: adjust spacetime prims
hhugo Nov 18, 2024
6a4b271
Runtime: adjust str prims
hhugo Nov 18, 2024
be25f57
Runtime: adjust marshal prims
hhugo Nov 18, 2024
a9e4793
Runtime: adjust obj prims
hhugo Nov 19, 2024
949bf9b
Runtime: adjust nat prims
hhugo Nov 19, 2024
730ff0c
Runtime: adjust hash prims
hhugo Nov 19, 2024
a5cb759
Runtime: adjust io prims
hhugo Nov 19, 2024
792f67b
Runtime: adjust toplevel prims
hhugo Nov 19, 2024
aba317b
Runtime: adjust dynlink prims
hhugo Nov 19, 2024
55a43f0
Runtime: adjust mlbytes prims
hhugo Nov 19, 2024
f898c1d
Runtime: remove caml_new_string
hhugo Nov 19, 2024
2e4d428
Runtime: adjust gc prims
hhugo Nov 19, 2024
7390a14
Runtime: adjust effects prims
hhugo Nov 19, 2024
07e826a
Changes
hhugo Nov 19, 2024
6c4a5bd
Runtime: fmt
hhugo Nov 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
* Lib: add details element and toggle event (#1728)
* Toplevel: no longer set globals for toplevel initialization
* Runtime: precompute constants used in `caml_lxm_next` (#1730)
* Runtime: cleanup runtime
* Runtime: add support for OCaml 5.3

## Bug fixes
* Runtime: fix parsing of unsigned integers (0u2147483648) (#1633, #1666)
Expand Down
46 changes: 38 additions & 8 deletions compiler/tests-check-prim/dune
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
(executables
(names main)
(libraries js_of_ocaml num)
(libraries js_of_ocaml num str)
(link_flags
(:standard -linkall))
(modules main)
(modes byte))

(executables
(names unix)
(libraries js_of_ocaml num unix)
(libraries js_of_ocaml num str unix)
(link_flags
(:standard -linkall))
(modules unix)
Expand All @@ -23,7 +23,12 @@
(action
(with-stdout-to
%{targets}
(run %{bin:js_of_ocaml} check-runtime +toplevel.js %{dep:main.bc}))))
(run
%{bin:js_of_ocaml}
check-runtime
+dynlink.js
+toplevel.js
%{dep:main.bc}))))

(rule
(targets unix-unix.output)
Expand All @@ -36,7 +41,12 @@
(action
(with-stdout-to
%{targets}
(run %{bin:js_of_ocaml} check-runtime +toplevel.js %{dep:unix.bc}))))
(run
%{bin:js_of_ocaml}
check-runtime
+dynlink.js
+toplevel.js
%{dep:unix.bc}))))

(rule
(targets unix-win32.output)
Expand All @@ -49,7 +59,12 @@
(action
(with-stdout-to
%{targets}
(run %{bin:js_of_ocaml} check-runtime +toplevel.js %{dep:unix.bc}))))
(run
%{bin:js_of_ocaml}
check-runtime
+dynlink.js
+toplevel.js
%{dep:unix.bc}))))

(rule
(targets main.output5)
Expand All @@ -60,7 +75,12 @@
(action
(with-stdout-to
%{targets}
(run %{bin:js_of_ocaml} check-runtime +toplevel.js %{dep:main.bc}))))
(run
%{bin:js_of_ocaml}
check-runtime
+dynlink.js
+toplevel.js
%{dep:main.bc}))))

(rule
(targets unix-unix.output5)
Expand All @@ -73,7 +93,12 @@
(action
(with-stdout-to
%{targets}
(run %{bin:js_of_ocaml} check-runtime +toplevel.js %{dep:unix.bc}))))
(run
%{bin:js_of_ocaml}
check-runtime
+dynlink.js
+toplevel.js
%{dep:unix.bc}))))

(rule
(targets unix-win32.output5)
Expand All @@ -86,4 +111,9 @@
(action
(with-stdout-to
%{targets}
(run %{bin:js_of_ocaml} check-runtime +toplevel.js %{dep:unix.bc}))))
(run
%{bin:js_of_ocaml}
check-runtime
+dynlink.js
+toplevel.js
%{dep:unix.bc}))))
94 changes: 0 additions & 94 deletions compiler/tests-check-prim/main.output
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ Missing

From main.bc:
caml_alloc_dummy_function
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
Expand All @@ -19,9 +14,7 @@ caml_int64_sub_native
caml_int64_xor_native
caml_int_as_pointer
caml_reset_afl_instrumentation
caml_signbit
debugger
is_digit_normalized

Unused
-------
Expand All @@ -41,32 +34,7 @@ caml_bigstring_blit_string_to_ba
caml_bigstring_memcmp
caml_hash_mix_bigstring

From +domain.js:
caml_atomic_cas
caml_atomic_exchange
caml_atomic_fetch_add
caml_atomic_load
caml_atomic_make_contended
caml_domain_dls
caml_domain_dls_get
caml_domain_dls_set
caml_domain_id
caml_domain_spawn
caml_ml_domain_cpu_relax
caml_ml_domain_id
caml_ml_domain_set_name
caml_ml_domain_unique_token
caml_recommended_domain_count

From +effect.js:
caml_alloc_stack
caml_continuation_use_and_update_handler_noexc
caml_continuation_use_noexc
caml_get_continuation_callstack
caml_ml_condition_broadcast
caml_ml_condition_new
caml_ml_condition_signal
caml_ml_condition_wait
jsoo_effect_not_supported

From +fs.js:
Expand All @@ -76,10 +44,6 @@ caml_fs_init
jsoo_create_file
jsoo_create_file_extern

From +gc.js:
caml_memprof_discard
caml_memprof_set

From +graphics.js:
caml_gr_arc_aux
caml_gr_blit_image
Expand Down Expand Up @@ -129,18 +93,10 @@ caml_gr_text_size
caml_gr_wait_event
caml_gr_window_id

From +hash.js:
caml_string_hash

From +ints.js:
caml_div
caml_mod

From +io.js:
caml_input_value_to_outside_heap
caml_ml_input_bigarray
caml_ml_output_bigarray

From +jslib.js:
caml_is_js
caml_trampoline
Expand All @@ -149,62 +105,22 @@ caml_wrap_exception

From +marshal.js:
BigStringReader
caml_input_value_from_string
caml_marshal_constants

From +mlBytes.js:
caml_array_of_bytes
caml_array_of_string
caml_bytes_of_utf16_jsstring
caml_new_string
caml_string_concat
caml_string_set16
caml_string_set32
caml_string_set64
caml_string_unsafe_set
caml_to_js_string

From +nat.js:
compare_nat_real

From +obj.js:
caml_lazy_read_result
caml_lazy_reset_to_lazy
caml_lazy_update_to_forcing
caml_lazy_update_to_forward
caml_obj_compare_and_swap
caml_obj_is_block
caml_obj_is_shared
caml_obj_update_tag

From +runtime_events.js:
caml_custom_event_index
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_register
caml_runtime_events_user_resolve
caml_runtime_events_user_write

From +stdlib.js:
caml_build_symbols
caml_is_printable
caml_maybe_print_stats
caml_register_global
jsoo_toplevel_reloc

From +str.js:
caml_str_initialize
re_match
re_partial_match
re_replacement_text
re_search_backward
re_search_forward
re_string_match

From +sync.js:
MlMutex
caml_ml_mutex_lock
Expand All @@ -216,20 +132,10 @@ From +sys.js:
caml_fatal_uncaught_exception
caml_format_exception
caml_is_special_exception
caml_register_channel_for_spacetime
caml_set_static_env
caml_spacetime_enabled
caml_spacetime_only_works_for_native_code
caml_sys_is_regular_file

From +toplevel.js:
caml_dynlink_get_bytecode_sections
caml_static_alloc
caml_static_free
caml_terminfo_backup
caml_terminfo_resume
caml_terminfo_setup
caml_terminfo_standout
jsoo_toplevel_init_compile
jsoo_toplevel_init_reloc

Expand Down
50 changes: 0 additions & 50 deletions compiler/tests-check-prim/main.output5
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,9 @@ 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_int_as_pointer
caml_reset_afl_instrumentation
caml_signbit
debugger
is_digit_normalized

Unused
-------
Expand All @@ -34,9 +27,6 @@ caml_bigstring_blit_string_to_ba
caml_bigstring_memcmp
caml_hash_mix_bigstring

From +domain.js:
caml_ml_domain_set_name

From +effect.js:
jsoo_effect_not_supported

Expand All @@ -47,14 +37,6 @@ caml_fs_init
jsoo_create_file
jsoo_create_file_extern

From +gc.js:
caml_eventlog_pause
caml_eventlog_resume
caml_gc_huge_fallback_count
caml_get_major_bucket
caml_get_major_credit
caml_memprof_set

From +graphics.js:
caml_gr_arc_aux
caml_gr_blit_image
Expand Down Expand Up @@ -116,29 +98,15 @@ caml_wrap_exception

From +marshal.js:
BigStringReader
caml_input_value_from_string
caml_marshal_constants

From +mlBytes.js:
caml_array_of_bytes
caml_array_of_string
caml_bytes_of_utf16_jsstring
caml_string_concat
caml_string_set16
caml_string_set32
caml_string_set64
caml_string_unsafe_set
caml_to_js_string

From +nat.js:
compare_nat_real

From +obj.js:
caml_obj_is_block
caml_obj_make_forward
caml_obj_set_tag
caml_obj_truncate

From +runtime_events.js:
caml_runtime_events_create_cursor
caml_runtime_events_free_cursor
Expand All @@ -152,33 +120,15 @@ caml_maybe_print_stats
caml_register_global
jsoo_toplevel_reloc

From +str.js:
caml_str_initialize
re_match
re_partial_match
re_replacement_text
re_search_backward
re_search_forward
re_string_match

From +sys.js:
caml_fatal_uncaught_exception
caml_format_exception
caml_is_special_exception
caml_register_channel_for_spacetime
caml_set_static_env
caml_spacetime_enabled
caml_spacetime_only_works_for_native_code
caml_sys_const_naked_pointers_checked

From +toplevel.js:
caml_get_section_table
caml_static_alloc
caml_static_free
caml_terminfo_backup
caml_terminfo_resume
caml_terminfo_setup
caml_terminfo_standout
jsoo_toplevel_init_compile
jsoo_toplevel_init_reloc

Expand Down
Loading
Loading