File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change 1717 (func $caml_wrap_exception (param externref ) (result (ref eq))))
1818 (import " stdlib" " caml_main_wrapper"
1919 (global $caml_main_wrapper (mut (ref null $wrapper_func ))))
20+ (import " effect" " effect_allowed" (global $effect_allowed (mut i32 )))
2021
2122 (type $block (array (mut (ref eq))))
2223 (type $string (array (mut i8 )))
180181
181182 (func (export " %perform" ) (param $eff (ref eq)) (result (ref eq))
182183 (local $res (tuple (ref eq) (ref eq)))
184+ (if (i32.eqz (global.get $effect_allowed ))
185+ (then
186+ (return_call $raise_unhandled
187+ (local.get $eff ) (ref.i31 (i32.const 0 )))))
183188 (local.set $res (suspend $effect (local.get $eff )))
184189 (return_call_ref $function_1 (tuple.extract 2 1 (local.get $res ))
185190 (tuple.extract 2 0 (local.get $res ))
Original file line number Diff line number Diff line change 8080 (call $caml_fresh_oo_id (ref.i31 (i32.const 0 )))))
8181 (ref.i31 (i32.const 0 )))
8282
83- (global $effect_allowed (mut i32 ) (i32.const 1 ))
83+ (global $effect_allowed (export " effect_allowed " ) ( mut i32 ) (i32.const 1 ))
8484
8585(@if (not wasi)
8686(@then
You can’t perform that action at this time.
0 commit comments