Skip to content

Commit 7fc0852

Browse files
committed
Runtime: adjust effects prims
1 parent 1b550a4 commit 7fc0852

File tree

4 files changed

+9
-24
lines changed

4 files changed

+9
-24
lines changed

compiler/tests-check-prim/main.output

-8
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,6 @@ caml_bigstring_memcmp
3535
caml_hash_mix_bigstring
3636

3737
From +effect.js:
38-
caml_alloc_stack
39-
caml_continuation_use_and_update_handler_noexc
40-
caml_continuation_use_noexc
41-
caml_get_continuation_callstack
42-
caml_ml_condition_broadcast
43-
caml_ml_condition_new
44-
caml_ml_condition_signal
45-
caml_ml_condition_wait
4638
jsoo_effect_not_supported
4739

4840
From +fs.js:

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

-8
Original file line numberDiff line numberDiff line change
@@ -144,14 +144,6 @@ caml_bigstring_memcmp
144144
caml_hash_mix_bigstring
145145

146146
From +effect.js:
147-
caml_alloc_stack
148-
caml_continuation_use_and_update_handler_noexc
149-
caml_continuation_use_noexc
150-
caml_get_continuation_callstack
151-
caml_ml_condition_broadcast
152-
caml_ml_condition_new
153-
caml_ml_condition_signal
154-
caml_ml_condition_wait
155147
jsoo_effect_not_supported
156148

157149
From +fs.js:

compiler/tests-check-prim/unix-win32.output

-8
Original file line numberDiff line numberDiff line change
@@ -109,14 +109,6 @@ caml_bigstring_memcmp
109109
caml_hash_mix_bigstring
110110

111111
From +effect.js:
112-
caml_alloc_stack
113-
caml_continuation_use_and_update_handler_noexc
114-
caml_continuation_use_noexc
115-
caml_get_continuation_callstack
116-
caml_ml_condition_broadcast
117-
caml_ml_condition_new
118-
caml_ml_condition_signal
119-
caml_ml_condition_wait
120112
jsoo_effect_not_supported
121113

122114
From +fs.js:

runtime/js/effect.js

+9
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,7 @@ function caml_perform_effect(eff, cont, k0) {
130130
//Provides: caml_alloc_stack
131131
//Requires: caml_pop_fiber, caml_fiber_stack, caml_call_gen, caml_stack_check_depth, caml_trampoline_return
132132
//If: effects
133+
//Version: >= 5.0
133134
function caml_alloc_stack(hv, hx, hf) {
134135
function call(i, x) {
135136
var f = caml_fiber_stack.h[i];
@@ -151,11 +152,13 @@ function caml_alloc_stack(hv, hx, hf) {
151152

152153
//Provides: caml_alloc_stack
153154
//If: !effects
155+
//Version: >= 5.0
154156
function caml_alloc_stack(hv, hx, hf) {
155157
return 0;
156158
}
157159

158160
//Provides: caml_continuation_use_noexc
161+
//Version: >= 5.0
159162
function caml_continuation_use_noexc(cont) {
160163
var stack = cont[1];
161164
cont[1] = 0;
@@ -164,6 +167,7 @@ function caml_continuation_use_noexc(cont) {
164167

165168
//Provides: caml_continuation_use_and_update_handler_noexc
166169
//Requires: caml_continuation_use_noexc
170+
//Version: >= 5.0
167171
function caml_continuation_use_and_update_handler_noexc(
168172
cont,
169173
hval,
@@ -176,26 +180,31 @@ function caml_continuation_use_and_update_handler_noexc(
176180
}
177181

178182
//Provides: caml_get_continuation_callstack
183+
//Version: >= 5.0
179184
function caml_get_continuation_callstack() {
180185
return [0];
181186
}
182187

183188
//Provides: caml_ml_condition_new
189+
//Version: >= 5.0
184190
function caml_ml_condition_new(unit) {
185191
return { condition: 1 };
186192
}
187193

188194
//Provides: caml_ml_condition_wait
195+
//Version: >= 5.0
189196
function caml_ml_condition_wait(t, mutext) {
190197
return 0;
191198
}
192199

193200
//Provides: caml_ml_condition_broadcast
201+
//Version: >= 5.0
194202
function caml_ml_condition_broadcast(t) {
195203
return 0;
196204
}
197205

198206
//Provides: caml_ml_condition_signal
207+
//Version: >= 5.0
199208
function caml_ml_condition_signal(t) {
200209
return 0;
201210
}

0 commit comments

Comments
 (0)