From af97a3b3aa573401ab5ff8df73f13d2f231cb63e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Vouillon?= Date: Wed, 9 Jul 2025 19:25:36 +0200 Subject: [PATCH 1/2] Runtime: fix annotation of caml_lxm_next --- compiler/lib-wasm/generate.ml | 2 +- runtime/js/prng.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/lib-wasm/generate.ml b/compiler/lib-wasm/generate.ml index 6bbe9830c6..d0eb1f3764 100644 --- a/compiler/lib-wasm/generate.ml +++ b/compiler/lib-wasm/generate.ml @@ -115,7 +115,7 @@ module Generate (Target : Target_sig.S) = struct ; "caml_bytes_get64", (`Mutator, [ Value; Value ], Int64) ; "caml_bytes_set32", (`Mutator, [ Value; Value; Int32 ], Value) ; "caml_bytes_set64", (`Mutator, [ Value; Value; Int64 ], Value) - ; "caml_lxm_next", (`Pure, [ Value ], Int64) + ; "caml_lxm_next", (`Mutable, [ Value ], Int64) ; "caml_ba_uint8_get32", (`Mutator, [ Value; Value ], Int32) ; "caml_ba_uint8_get64", (`Mutator, [ Value; Value ], Int64) ; "caml_ba_uint8_set32", (`Mutator, [ Value; Value; Int32 ], Value) diff --git a/runtime/js/prng.js b/runtime/js/prng.js index f2a3b82f9c..0478bada3a 100644 --- a/runtime/js/prng.js +++ b/runtime/js/prng.js @@ -14,7 +14,7 @@ var caml_lxm_daba = caml_int64_of_string( caml_string_of_jsstring("0xdaba0b6eb09322e3"), ); -//Provides: caml_lxm_next const +//Provides: caml_lxm_next mutable //Requires: caml_int64_shift_left //Requires: caml_int64_shift_right_unsigned //Requires: caml_int64_or From 8ff4ae9b1410cacaef41ca7b7465a4aeb4cd902c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Vouillon?= Date: Wed, 23 Apr 2025 18:33:40 +0200 Subject: [PATCH 2/2] Runtime: fix annotation of caml_compare --- runtime/js/compare.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/js/compare.js b/runtime/js/compare.js index 0aa1289d93..7ccde88b71 100644 --- a/runtime/js/compare.js +++ b/runtime/js/compare.js @@ -251,7 +251,7 @@ function caml_compare_val(a, b, total) { b = b[i]; } } -//Provides: caml_compare (const, const) +//Provides: caml_compare mutable (const, const) //Requires: caml_compare_val function caml_compare(a, b) { return caml_compare_val(a, b, true);