Skip to content

Commit 7cfbbcb

Browse files
committed
comment
1 parent 93b25fe commit 7cfbbcb

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

ocaml/lambda/lambda.mli

+12
Original file line numberDiff line numberDiff line change
@@ -566,6 +566,18 @@ type lambda =
566566
| Lstringswitch of
567567
lambda * (string * lambda) list * lambda option * scoped_location * layout
568568
| Lstaticraise of static_label * lambda list
569+
(* Concerning [Lstaticcatch], the regions that are open in the handler must be
570+
a subset of those open at the point of the [Lstaticraise] that jumps to it,
571+
as we can't reopen closed regions. All regions that were open at the point of
572+
the [Lstaticraise] but not in the handler will be closed just before the [Lstaticraise].
573+
574+
However, to be able to express the fact
575+
that the [Lstaticraise] might be under a [Lexclave], the [pop_region] flag
576+
is used to specify what regions are considered open in the handler. If it
577+
is [Same_region], it means that the same regions as those existing at the
578+
point of the [Lstaticraise] are considered open in the handler; if it is [Popped_region],
579+
it means that we consider the top region at the point of the [Lstaticcatch] to not be
580+
considered open inside the handler. *)
569581
| Lstaticcatch of
570582
lambda * (static_label * (Ident.t * layout) list) * lambda
571583
* pop_region * layout

0 commit comments

Comments
 (0)