Skip to content

Use javascript string by default #976

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion compiler/lib/config.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 2 additions & 0 deletions compiler/tests-check-prim/main.output
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions compiler/tests-check-prim/main.output5
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions compiler/tests-check-prim/unix-unix.output
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions compiler/tests-check-prim/unix-unix.output5
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 2 additions & 0 deletions compiler/tests-check-prim/unix-win32.output
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down