Skip to content

Commit 8f71b6c

Browse files
committed
Wip
1 parent 4f1b863 commit 8f71b6c

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,11 @@ jobs:
5757
skip-effects: false
5858
skip-test: false
5959
skip-doc: false
60+
- os: ubuntu-latest
61+
ocaml-compiler: "5.1"
62+
skip-effects: false
63+
skip-test: false
64+
skip-doc: true
6065
# Note this OCaml compiler is bytecode only
6166
- os: ubuntu-latest
6267
ocaml-compiler: "ocaml-variants.5.2.0+options,ocaml-option-32bit"

runtime/js/effect.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ function caml_resume_stack(stack, last, k) {
8686
);
8787
if (last === 0) {
8888
last = stack;
89+
// Pre OCaml 5.2, last/cont[2] was not populated.
90+
while (last.r.e !== 0) last = last.r.e;
8991
}
9092
var fiber = {
9193
h: last.sh,
@@ -189,7 +191,13 @@ function caml_continuation_use_and_update_handler_noexc(
189191
) {
190192
var stack = caml_continuation_use_noexc(cont);
191193
if (stack === 0) return stack;
192-
cont[2].sh = [0, hval, hexn, heff];
194+
var last = cont[2];
195+
if (last === 0) {
196+
last = stack;
197+
// Pre OCaml 5.2, last/cont[2] was not populated.
198+
while (last.r.e !== 0) last = last.r.e;
199+
}
200+
last.sh = [0, hval, hexn, heff];
193201
return stack;
194202
}
195203

0 commit comments

Comments
 (0)