diff options
Diffstat (limited to 'bytecomp/lambda.ml')
-rw-r--r-- | bytecomp/lambda.ml | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/bytecomp/lambda.ml b/bytecomp/lambda.ml index 863a4439c..825389866 100644 --- a/bytecomp/lambda.ml +++ b/bytecomp/lambda.ml @@ -92,6 +92,7 @@ type lambda = | Lfor of Ident.t * lambda * lambda * direction_flag * lambda | Lassign of Ident.t * lambda | Lsend of lambda * lambda * lambda list + | Levent of lambda * lambda_event and lambda_switch = { sw_numconsts: int; @@ -100,6 +101,15 @@ and lambda_switch = sw_blocks: (int * lambda) list; sw_checked: bool } +and lambda_event = + { lev_loc: int; + lev_kind: lambda_event_kind; + lev_env: Env.summary } + +and lambda_event_kind = + Lev_before + | Lev_after of Types.type_expr + let const_unit = Const_pointer 0 let lambda_unit = Lconst const_unit @@ -165,6 +175,8 @@ let free_variables l = fv := IdentSet.add id !fv; freevars e | Lsend (met, obj, args) -> List.iter freevars (met::obj::args) + | Levent (lam, evt) -> + freevars lam in freevars l; !fv (* Check if an action has a "when" guard *) |