Skip to content

Commit 7161b7e

Browse files
authored
Merge branch 'master' into optim_effects
2 parents 0eeaafe + 4587ff5 commit 7161b7e

File tree

7 files changed

+44
-23
lines changed

7 files changed

+44
-23
lines changed

compiler/tests-full/dune

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
(rule
22
(targets stdlib.cma.js)
33
(enabled_if
4-
(= %{ocaml_version} "5.2.0"))
4+
(and
5+
(>= %{ocaml_version} "5.2")
6+
(< %{ocaml_version} "5.3")))
57
(action
68
(run
79
%{bin:js_of_ocaml}
@@ -14,7 +16,9 @@
1416
(rule
1517
(targets stdlib.cma.output.js)
1618
(enabled_if
17-
(= %{ocaml_version} "5.2.0"))
19+
(and
20+
(>= %{ocaml_version} "5.2")
21+
(< %{ocaml_version} "5.3")))
1822
(action
1923
(with-stdout-to
2024
%{targets}
@@ -23,7 +27,9 @@
2327
(rule
2428
(alias runtest)
2529
(enabled_if
26-
(= %{ocaml_version} "5.2.0"))
30+
(and
31+
(>= %{ocaml_version} "5.2")
32+
(< %{ocaml_version} "5.3")))
2733
(action
2834
(diff stdlib.cma.expected.js stdlib.cma.output.js)))
2935

compiler/tests-full/stdlib.cma.expected.js

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1121,8 +1121,8 @@
11211121
caml_maybe_attach_backtrace = runtime.caml_maybe_attach_backtrace,
11221122
caml_wrap_exception = runtime.caml_wrap_exception,
11231123
global_data = runtime.caml_get_global_data(),
1124-
ocaml_version = "5.2.0",
1125-
ocaml_release = [0, 5, 2, 0, 0],
1124+
ocaml_version = "5.2.1",
1125+
ocaml_release = [0, 5, 2, 1, 0],
11261126
Stdlib = global_data.Stdlib,
11271127
executable_name =
11281128
/*<<sys.ml.in:36:22>>*/ runtime.caml_sys_executable_name(0),
@@ -23571,26 +23571,26 @@
2357123571
/*<<gc.ml:115:21>>*/ return caml_call2(Stdlib_Atomic[4], a, 0) /*<<gc.ml:115:39>>*/ ;
2357223572
}
2357323573
function create_alarm(f){
23574-
var _y_ = /*<<gc.ml:118:24>>*/ caml_call1(Stdlib_Atomic[1], 1);
23575-
/*<<gc.ml:119:2>>*/ caml_call1
23574+
var alarm = /*<<gc.ml:119:14>>*/ caml_call1(Stdlib_Atomic[1], 1);
23575+
/*<<gc.ml:120:2>>*/ caml_call1
2357623576
(Stdlib_Domain[6],
2357723577
function(param){
23578-
/*<<gc.ml:119:28>>*/ return delete_alarm(_y_) /*<<gc.ml:119:52>>*/ ;
23578+
/*<<gc.ml:120:28>>*/ return delete_alarm(alarm) /*<<gc.ml:120:46>>*/ ;
2357923579
});
23580-
/*<<gc.ml:120:26>>*/ return _y_;
23581-
/*<<gc.ml:121:13>>*/ }
23580+
/*<<gc.ml:122:26>>*/ return alarm;
23581+
/*<<gc.ml:123:7>>*/ }
2358223582
var
2358323583
null_tracker =
2358423584
/*<<?>>*/ [0,
23585-
function(param){ /*<<gc.ml:143:30>>*/ return 0; /*<<gc.ml:143:34>>*/ },
23586-
function(param){ /*<<gc.ml:144:30>>*/ return 0; /*<<gc.ml:144:34>>*/ },
23587-
function(param){ /*<<gc.ml:145:26>>*/ return 0; /*<<gc.ml:145:30>>*/ },
23588-
function(param){ /*<<gc.ml:146:32>>*/ return 0; /*<<gc.ml:146:34>>*/ },
23589-
function(param){ /*<<gc.ml:147:32>>*/ return 0; /*<<gc.ml:147:34>>*/ }];
23585+
function(param){ /*<<gc.ml:145:30>>*/ return 0; /*<<gc.ml:145:34>>*/ },
23586+
function(param){ /*<<gc.ml:146:30>>*/ return 0; /*<<gc.ml:146:34>>*/ },
23587+
function(param){ /*<<gc.ml:147:26>>*/ return 0; /*<<gc.ml:147:30>>*/ },
23588+
function(param){ /*<<gc.ml:148:32>>*/ return 0; /*<<gc.ml:148:34>>*/ },
23589+
function(param){ /*<<gc.ml:149:32>>*/ return 0; /*<<gc.ml:149:34>>*/ }];
2359023590
function start(sampling_rate, opt, tracker){
23591-
var callstack_size = /*<<gc.ml:155:6>>*/ opt ? opt[1] : Stdlib[19];
23592-
/*<<gc.ml:158:6>>*/ return runtime.caml_memprof_start
23593-
(sampling_rate, callstack_size, tracker) /*<<gc.ml:158:50>>*/ ;
23591+
var callstack_size = /*<<gc.ml:157:6>>*/ opt ? opt[1] : Stdlib[19];
23592+
/*<<gc.ml:160:6>>*/ return runtime.caml_memprof_start
23593+
(sampling_rate, callstack_size, tracker) /*<<gc.ml:160:50>>*/ ;
2359423594
}
2359523595
var
2359623596
Stdlib_Gc =

dune

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,6 @@
4646
%{dep:VERSION}
4747
%{dep:tools/version/GIT-VERSION}))))
4848

49-
(data_only_dirs _wikidoc doc-dev)
49+
(data_only_dirs _wikidoc doc-dev jane-street)
50+
51+
(vendored_dirs)

runtime/wasm/effect.wat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
(func $caml_fresh_oo_id (param (ref eq)) (result (ref eq))))
2525
(import "obj" "cont_tag" (global $cont_tag i32))
2626
(import "stdlib" "caml_named_value"
27-
(func $caml_named_value (param (ref $string)) (result (ref null eq))))
27+
(func $caml_named_value (param (ref eq)) (result (ref null eq))))
2828
(import "fail" "ocaml_exception" (tag $ocaml_exception (param (ref eq))))
2929
(import "fail" "javascript_exception"
3030
(tag $javascript_exception (param externref)))

runtime/wasm/jslib.wat

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
(import "fail" "caml_failwith_tag"
7878
(func $caml_failwith_tag (result (ref eq))))
7979
(import "stdlib" "caml_named_value"
80-
(func $caml_named_value (param (ref $string)) (result (ref null eq))))
80+
(func $caml_named_value (param (ref eq)) (result (ref null eq))))
8181
(import "obj" "caml_callback_1"
8282
(func $caml_callback_1
8383
(param (ref eq)) (param (ref eq)) (result (ref eq))))
@@ -89,6 +89,9 @@
8989
(func $jsstring_of_string (param (ref $string)) (result anyref)))
9090
(import "jsstring" "string_of_jsstring"
9191
(func $string_of_jsstring (param anyref) (result (ref $string))))
92+
(import "jsstring" "jsstring_of_substring"
93+
(func $jsstring_of_substring
94+
(param (ref $string) i32 i32) (result anyref)))
9295
(import "int32" "caml_copy_int32"
9396
(func $caml_copy_int32 (param i32) (result (ref eq))))
9497
(import "int32" "Int32_val"
@@ -459,6 +462,16 @@
459462
(local.set $s (ref.cast (ref $string) (local.get 0)))
460463
(return (struct.new $js (call $jsstring_of_string (local.get $s)))))
461464

465+
(func (export "caml_jsstring_of_substring")
466+
(param $s (ref eq)) (param $i (ref eq)) (param $l (ref eq))
467+
(result (ref eq))
468+
(return
469+
(struct.new $js
470+
(call $jsstring_of_substring
471+
(ref.cast (ref $string) (local.get $s))
472+
(i31.get_u (ref.cast (ref i31) (local.get $i)))
473+
(i31.get_u (ref.cast (ref i31) (local.get $l)))))))
474+
462475
(func $caml_jsbytes_of_string (export "caml_jsbytes_of_string")
463476
(param (ref eq)) (result (ref eq))
464477
(local $s (ref $string))

runtime/wasm/stdlib.wat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
(br $loop))))
8080

8181
(func $caml_named_value (export "caml_named_value")
82-
(param $s (ref $string)) (result (ref null eq))
82+
(param $s (ref eq)) (result (ref null eq))
8383
(block $not_found
8484
(return
8585
(struct.get $assoc 1

tools/ci_setup.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ let () =
266266
let branch =
267267
if is_forked nm
268268
then
269-
if List.mem nm [ "bonsai"; "virtual_dom"; "async_js" ]
269+
if List.mem nm [ "bonsai"; "virtual_dom"; "async_js"; "zarith_stubs_js" ]
270270
then Some "jsoo-6"
271271
else Some "wasm"
272272
else None

0 commit comments

Comments
 (0)