From 9458638dd96a3524d5719901a49cf46a76dff33f Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Fri, 3 Apr 2020 22:21:23 +0200 Subject: [PATCH 1/2] Compiler: use-js-string enabled by default --- compiler/lib/config.ml | 2 +- compiler/tests-check-prim/main.output | 2 ++ compiler/tests-check-prim/main.output5 | 2 ++ compiler/tests-check-prim/unix-unix.output | 2 ++ compiler/tests-check-prim/unix-unix.output5 | 2 ++ compiler/tests-check-prim/unix-win32.output | 2 ++ 6 files changed, 11 insertions(+), 1 deletion(-) diff --git a/compiler/lib/config.ml b/compiler/lib/config.ml index c775eaaef3..f07b28dedc 100644 --- a/compiler/lib/config.ml +++ b/compiler/lib/config.ml @@ -88,7 +88,7 @@ module Flag = struct let safe_string = o ~name:"safestring" ~default:true - let use_js_string = o ~name:"use-js-string" ~default:false + let use_js_string = o ~name:"use-js-string" ~default:true let check_magic = o ~name:"check-magic-number" ~default:true diff --git a/compiler/tests-check-prim/main.output b/compiler/tests-check-prim/main.output index aeb35d1583..5588efc282 100644 --- a/compiler/tests-check-prim/main.output +++ b/compiler/tests-check-prim/main.output @@ -161,10 +161,12 @@ caml_marshal_constants From +mlBytes.js: caml_array_of_bytes caml_array_of_string +caml_bytes_of_utf16_jsstring caml_new_string caml_string_set16 caml_string_set32 caml_string_set64 +caml_string_unsafe_set caml_to_js_string From +nat.js: diff --git a/compiler/tests-check-prim/main.output5 b/compiler/tests-check-prim/main.output5 index e2a2d66995..b3c5e8505c 100644 --- a/compiler/tests-check-prim/main.output5 +++ b/compiler/tests-check-prim/main.output5 @@ -144,9 +144,11 @@ caml_marshal_constants From +mlBytes.js: caml_array_of_bytes caml_array_of_string +caml_bytes_of_utf16_jsstring caml_string_set16 caml_string_set32 caml_string_set64 +caml_string_unsafe_set caml_to_js_string From +nat.js: diff --git a/compiler/tests-check-prim/unix-unix.output b/compiler/tests-check-prim/unix-unix.output index bb40100a23..6a098b2a8e 100644 --- a/compiler/tests-check-prim/unix-unix.output +++ b/compiler/tests-check-prim/unix-unix.output @@ -270,10 +270,12 @@ caml_marshal_constants From +mlBytes.js: caml_array_of_bytes caml_array_of_string +caml_bytes_of_utf16_jsstring caml_new_string caml_string_set16 caml_string_set32 caml_string_set64 +caml_string_unsafe_set caml_to_js_string From +nat.js: diff --git a/compiler/tests-check-prim/unix-unix.output5 b/compiler/tests-check-prim/unix-unix.output5 index f405ad8ff6..0b27a8d4a0 100644 --- a/compiler/tests-check-prim/unix-unix.output5 +++ b/compiler/tests-check-prim/unix-unix.output5 @@ -253,9 +253,11 @@ caml_marshal_constants From +mlBytes.js: caml_array_of_bytes caml_array_of_string +caml_bytes_of_utf16_jsstring caml_string_set16 caml_string_set32 caml_string_set64 +caml_string_unsafe_set caml_to_js_string From +nat.js: diff --git a/compiler/tests-check-prim/unix-win32.output b/compiler/tests-check-prim/unix-win32.output index cd02bb8453..862a3202c1 100644 --- a/compiler/tests-check-prim/unix-win32.output +++ b/compiler/tests-check-prim/unix-win32.output @@ -235,10 +235,12 @@ caml_marshal_constants From +mlBytes.js: caml_array_of_bytes caml_array_of_string +caml_bytes_of_utf16_jsstring caml_new_string caml_string_set16 caml_string_set32 caml_string_set64 +caml_string_unsafe_set caml_to_js_string From +nat.js: From d962c56b1e063bcbacd2921d9e17cb98692dd2df Mon Sep 17 00:00:00 2001 From: Hugo Heuzard Date: Wed, 9 Nov 2022 11:35:35 +0100 Subject: [PATCH 2/2] Changes --- CHANGES.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGES.md b/CHANGES.md index 1709deba06..6578212eab 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -71,6 +71,7 @@ Runtime: fix caml_read_file_content * Runtime: add support for unix_opendir, unix_readdir, unix_closedir, win_findfirst, win_findnext, win_findclose * Runtime: Dont use require when target-env is browser * Runtime: Implements Parsing.set_trace (#1308) +* Runtime: ocaml string are represented as javascript ones. * Test: track external used in the stdlib and unix ## Bug fixes