Skip to content

Commit fb9d823

Browse files
committed
Add caml_js_exceptions imports
1 parent 574b53b commit fb9d823

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

jscomp/core/js_block_runtime.ml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,13 @@ let option_id = Ident.create_persistent Js_runtime_modules.option
2626

2727
let curry_id = Ident.create_persistent Js_runtime_modules.curry
2828

29+
let caml_js_exceptions_id = Ident.create_persistent Js_runtime_modules.caml_js_exceptions
30+
31+
(* This function is responsible for checking the expressions used in the file,
32+
and listing the additional runtime dependencies it requires *)
2933
let check_additional_id (x : J.expression) : Ident.t option =
3034
match x.expression_desc with
3135
| Optional_block (_, false) -> Some option_id
3236
| Call (_, _, { arity = NA }) -> Some curry_id
37+
| Caml_block (el, _, _, ((Blk_extension { is_exception = true } | Blk_record_ext { is_exception = true }))) -> Some caml_js_exceptions_id
3338
| _ -> None

0 commit comments

Comments
 (0)