Skip to content

Commit bd2f177

Browse files
committed
rename
1 parent a60db88 commit bd2f177

File tree

12 files changed

+20
-20
lines changed

12 files changed

+20
-20
lines changed

compiler/lib-wasm/gc_target.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1932,7 +1932,7 @@ let internal_primitives =
19321932
in
19331933
let l = List.map ~f:transl_prim_arg vl in
19341934
JavaScript.invoke_fragment name l);
1935-
register "caml_jsoo_runtime" (fun _ l ->
1935+
register "caml_jsoo_runtime_value" (fun _ l ->
19361936
match l with
19371937
| [ Pc (String name) ] when J.is_ident name ->
19381938
let* x =
@@ -1947,7 +1947,7 @@ let internal_primitives =
19471947
(Fun { params = [ JavaScript.anyref ]; result = [ Type.value ] })
19481948
in
19491949
return (W.Call (wrap, [ GlobalGet x ]))
1950-
| _ -> failwith "Jsoo_runtime.Sys.external_ expects a string literal.");
1950+
| _ -> failwith "Jsoo_runtime.Js.runtime_value expects a string literal.");
19511951
!l
19521952

19531953
let externref = W.Ref { nullable = true; typ = Extern }

compiler/lib/generate.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1547,13 +1547,13 @@ let rec translate_expr ctx loc x e level : (_ * J.statement_list) Expr_builder.t
15471547
| Some s -> Printf.sprintf ", file %S" s)
15481548
pi.Parse_info.line
15491549
pi.Parse_info.col))
1550-
| Extern "caml_jsoo_runtime", [ Pc (String nm) ] when J.is_ident nm ->
1550+
| Extern "caml_jsoo_runtime_value", [ Pc (String nm) ] when J.is_ident nm ->
15511551
let prim = Share.get_prim (runtime_fun ctx) nm ctx.Ctx.share in
15521552
return prim
1553-
| Extern "caml_jsoo_runtime", [ (Pc _ | Pv _) ] ->
1553+
| Extern "caml_jsoo_runtime_value", [ (Pc _ | Pv _) ] ->
15541554
failwith
15551555
(Printf.sprintf
1556-
"%scaml_jsoo_runtime expects a string literal."
1556+
"%sJsoo_runtime.Js.runtime_value expects a string literal."
15571557
(match (loc : J.location) with
15581558
| Pi { name = Some name; col; line; _ } ->
15591559
Printf.sprintf "%s:%d:%d: " name line col

compiler/lib/specialize_js.ml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,10 +188,10 @@ let specialize_instr opt_count ~target info i =
188188
incr opt_count;
189189
Let (x, Prim (Extern "%direct_int_mod", [ y; z ]))
190190
| _ -> i)
191-
| Let (x, Prim (Extern "caml_jsoo_runtime", [ nm ])), _ -> (
191+
| Let (x, Prim (Extern "caml_jsoo_runtime_value", [ nm ])), _ -> (
192192
match the_string_of info nm with
193193
| Some nm when Javascript.is_ident nm ->
194-
Let (x, Prim (Extern "caml_jsoo_runtime", [ Pc (String nm) ]))
194+
Let (x, Prim (Extern "caml_jsoo_runtime_value", [ Pc (String nm) ]))
195195
| _ -> i)
196196
| _, _ -> i
197197

compiler/tests-check-prim/main.4.14.output

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ caml_int64_or_native
1414
caml_int64_sub_native
1515
caml_int64_xor_native
1616
caml_int_as_pointer
17-
caml_jsoo_runtime
17+
caml_jsoo_runtime_value
1818
caml_reset_afl_instrumentation
1919
debugger
2020

compiler/tests-check-prim/main.5.4.output

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ From main.bc:
55
caml_assume_no_perform
66
caml_continuation_use
77
caml_int_as_pointer
8-
caml_jsoo_runtime
8+
caml_jsoo_runtime_value
99
caml_reset_afl_instrumentation
1010
debugger
1111

compiler/tests-check-prim/unix-Unix.4.14.output

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ caml_int64_or_native
1414
caml_int64_sub_native
1515
caml_int64_xor_native
1616
caml_int_as_pointer
17-
caml_jsoo_runtime
17+
caml_jsoo_runtime_value
1818
caml_reset_afl_instrumentation
1919
caml_unix_map_file_bytecode
2020
debugger

compiler/tests-check-prim/unix-Unix.5.4.output

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ From unix.bc:
55
caml_assume_no_perform
66
caml_continuation_use
77
caml_int_as_pointer
8-
caml_jsoo_runtime
8+
caml_jsoo_runtime_value
99
caml_reset_afl_instrumentation
1010
caml_unix_accept
1111
caml_unix_alarm

compiler/tests-check-prim/unix-Win32.4.14.output

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ caml_int64_or_native
1414
caml_int64_sub_native
1515
caml_int64_xor_native
1616
caml_int_as_pointer
17-
caml_jsoo_runtime
17+
caml_jsoo_runtime_value
1818
caml_reset_afl_instrumentation
1919
caml_unix_map_file_bytecode
2020
debugger

compiler/tests-check-prim/unix-Win32.5.4.output

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ From unix.bc:
55
caml_assume_no_perform
66
caml_continuation_use
77
caml_int_as_pointer
8-
caml_jsoo_runtime
8+
caml_jsoo_runtime_value
99
caml_reset_afl_instrumentation
1010
caml_unix_accept
1111
caml_unix_bind

compiler/tests-jsoo/test_custom.ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
open Js_of_ocaml
22

33
let () =
4-
let p : Js.js_string Js.t = Jsoo_runtime.Sys.external_ "process" in
5-
let o : _ Js.t = Jsoo_runtime.Sys.external_ "obj" in
6-
let del = Jsoo_runtime.Sys.external_ "caml_js_delete" in
4+
let p : Js.js_string Js.t = Jsoo_runtime.Js.runtime_value "process" in
5+
let o : _ Js.t = Jsoo_runtime.Js.runtime_value "obj" in
6+
let del = Jsoo_runtime.Js.runtime_value "caml_js_delete" in
77
ignore (Js.Unsafe.fun_call del [| o; Js.Unsafe.coerce (Js.string "process") |]);
88
print_endline (Js.to_string p)

0 commit comments

Comments
 (0)