@@ -65616,10 +65616,22 @@ type set_field_dbg_info = Lambda.set_field_dbg_info
65616
65616
65617
65617
type ident = Ident.t
65618
65618
65619
+ type let_kind = Lambda.let_kind
65620
+ = Strict
65621
+ | Alias
65622
+ | StrictOpt
65623
+ | Variable
65624
+
65625
+ type meth_kind = Lambda.meth_kind
65626
+ = Self
65627
+ | Public of string option
65628
+ | Cached
65629
+
65619
65630
type function_kind
65620
65631
= Curried
65621
65632
(* | Tupled *)
65622
65633
65634
+
65623
65635
type function_arities =
65624
65636
| Determin of bool * (int * Ident.t list option) list * bool
65625
65637
(** when the first argument is true, it is for sure
@@ -65810,7 +65822,7 @@ and t = private
65810
65822
| Lconst of constant
65811
65823
| Lapply of apply_info
65812
65824
| Lfunction of function_info
65813
- | Llet of Lambda. let_kind * ident * t * t
65825
+ | Llet of let_kind * ident * t * t
65814
65826
| Lletrec of (ident * t) list * t
65815
65827
| Lprim of prim_info
65816
65828
| Lswitch of t * switch
@@ -65862,7 +65874,7 @@ val function_ :
65862
65874
arity:int ->
65863
65875
function_kind:function_kind -> params:ident list -> body:t -> t
65864
65876
65865
- val let_ : Lambda. let_kind -> ident -> t -> t -> t
65877
+ val let_ : let_kind -> ident -> t -> t -> t
65866
65878
val letrec : (ident * t) list -> t -> t
65867
65879
val if_ : triop
65868
65880
val switch : t -> switch -> t
@@ -65877,7 +65889,7 @@ val sequand : binop
65877
65889
val not_ : Location.t -> unop
65878
65890
val seq : binop
65879
65891
val while_ : binop
65880
- val event : t -> Lambda.lambda_event -> t
65892
+ (* val event : t -> Lambda.lambda_event -> t *)
65881
65893
val try_ : t -> ident -> t -> t
65882
65894
val ifused : ident -> t -> t
65883
65895
val assign : ident -> t -> t
@@ -65965,7 +65977,7 @@ type set_field_dbg_info = Lambda.set_field_dbg_info
65965
65977
65966
65978
type ident = Ident.t
65967
65979
65968
- type function_kind (* = Lambda.function_kind *)
65980
+ type function_kind
65969
65981
= Curried
65970
65982
(* | Tupled *)
65971
65983
@@ -65974,6 +65986,16 @@ type function_arities =
65974
65986
| Determin of bool * (int * Ident.t list option) list * bool
65975
65987
| NA
65976
65988
65989
+ type let_kind = Lambda.let_kind
65990
+ = Strict
65991
+ | Alias
65992
+ | StrictOpt
65993
+ | Variable
65994
+
65995
+ type meth_kind = Lambda.meth_kind
65996
+ = Self
65997
+ | Public of string option
65998
+ | Cached
65977
65999
65978
66000
type constant =
65979
66001
| Const_int of int
@@ -66160,7 +66182,7 @@ module Types = struct
66160
66182
| Lconst of constant
66161
66183
| Lapply of apply_info
66162
66184
| Lfunction of function_info
66163
- | Llet of Lambda. let_kind * ident * t * t
66185
+ | Llet of let_kind * ident * t * t
66164
66186
| Lletrec of (ident * t) list * t
66165
66187
| Lprim of prim_info
66166
66188
| Lswitch of t * switch
@@ -66173,12 +66195,8 @@ module Types = struct
66173
66195
| Lwhile of t * t
66174
66196
| Lfor of ident * t * t * Asttypes.direction_flag * t
66175
66197
| Lassign of ident * t
66176
- | Lsend of Lambda. meth_kind * t * t * t list * Location.t
66198
+ | Lsend of meth_kind * t * t * t list * Location.t
66177
66199
| Lifused of ident * t
66178
- (* | Levent of t * Lambda.lambda_event
66179
- [Levent] in the branch hurt pattern match,
66180
- we should use record for trivial debugger info
66181
- *)
66182
66200
end
66183
66201
66184
66202
module X = struct
@@ -66222,7 +66240,7 @@ module X = struct
66222
66240
| Lconst of constant
66223
66241
| Lapply of apply_info
66224
66242
| Lfunction of function_info
66225
- | Llet of Lambda. let_kind * ident * t * t
66243
+ | Llet of let_kind * ident * t * t
66226
66244
| Lletrec of (ident * t) list * t
66227
66245
| Lprim of prim_info
66228
66246
| Lswitch of t * switch
@@ -66235,7 +66253,7 @@ module X = struct
66235
66253
| Lwhile of t * t
66236
66254
| Lfor of ident * t * t * Asttypes.direction_flag * t
66237
66255
| Lassign of ident * t
66238
- | Lsend of Lambda. meth_kind * t * t * t list * Location.t
66256
+ | Lsend of meth_kind * t * t * t list * Location.t
66239
66257
| Lifused of ident * t
66240
66258
end
66241
66259
include Types
@@ -67040,7 +67058,7 @@ let try_ body id handler : t =
67040
67058
let for_ v e1 e2 dir e3 : t =
67041
67059
Lfor(v,e1,e2,dir,e3)
67042
67060
67043
- let event l (_event : Lambda.lambda_event) = l
67061
+
67044
67062
67045
67063
let ifused v l : t =
67046
67064
Lifused (v,l)
@@ -67054,7 +67072,7 @@ let staticcatch a b c : t = Lstaticcatch(a,b,c)
67054
67072
67055
67073
let staticraise a b : t = Lstaticraise(a,b)
67056
67074
67057
- let comparison (cmp : Lambda. comparison) a b : bool =
67075
+ let comparison (cmp : comparison) a b : bool =
67058
67076
match cmp with
67059
67077
| Ceq -> a = b
67060
67078
| Cneq -> a <> b
@@ -72202,7 +72220,7 @@ let kind = function
72202
72220
| Variable -> "v"
72203
72221
| Recursive -> "r"
72204
72222
72205
- let to_print_kind (k : Lambda .let_kind) : print_kind =
72223
+ let to_print_kind (k : Lam .let_kind) : print_kind =
72206
72224
match k with
72207
72225
| Alias -> Alias
72208
72226
| Strict -> Strict
@@ -72901,11 +72919,11 @@ val field_flatten_get :
72901
72919
72902
72920
72903
72921
val alias_ident_or_global : Lam_stats.meta ->
72904
- Ident.t -> Ident.t -> Lam_stats.kind -> Lambda .let_kind -> unit
72922
+ Ident.t -> Ident.t -> Lam_stats.kind -> Lam .let_kind -> unit
72905
72923
72906
72924
72907
72925
val refine_let :
72908
- kind:Lambda .let_kind ->
72926
+ kind:Lam .let_kind ->
72909
72927
Ident.t -> Lam.t -> Lam.t -> Lam.t
72910
72928
72911
72929
@@ -73054,7 +73072,7 @@ let refine_let
73054
73072
~kind param
73055
73073
(arg : Lam.t) (l : Lam.t) : Lam.t =
73056
73074
73057
- match (kind : Lambda .let_kind ), arg, l with
73075
+ match (kind : Lam .let_kind ), arg, l with
73058
73076
| _, _, Lvar w when Ident.same w param (* let k = xx in k *)
73059
73077
-> arg (* TODO: optimize here -- it's safe to do substitution here *)
73060
73078
| _, _, Lprim {primitive ; args = [Lvar w]; loc ; _} when Ident.same w param
@@ -73116,7 +73134,7 @@ let refine_let
73116
73134
Lam.let_ Strict param arg l *)
73117
73135
73118
73136
let alias_ident_or_global (meta : Lam_stats.meta) (k:Ident.t) (v:Ident.t)
73119
- (v_kind : Lam_stats.kind) (let_kind : Lambda .let_kind) =
73137
+ (v_kind : Lam_stats.kind) (let_kind : Lam .let_kind) =
73120
73138
(** treat rec as Strict, k is assigned to v
73121
73139
{[ let k = v ]}
73122
73140
*)
@@ -73309,7 +73327,7 @@ val throw : ?comment:string -> J.expression -> t
73309
73327
73310
73328
val if_ :
73311
73329
?comment:string ->
73312
- ?declaration: Lambda .let_kind * Ident.t ->
73330
+ ?declaration: Lam .let_kind * Ident.t ->
73313
73331
(* when it's not None, we also need make a variable declaration in the
73314
73332
begininnig, however, we can optmize such case
73315
73333
*)
@@ -73321,20 +73339,20 @@ val if_ :
73321
73339
val block : ?comment:string -> J.block -> t
73322
73340
73323
73341
val int_switch :
73324
- ?comment:string -> ?declaration:Lambda .let_kind * Ident.t ->
73342
+ ?comment:string -> ?declaration:Lam .let_kind * Ident.t ->
73325
73343
?default:J.block -> J.expression -> int J.case_clause list -> t
73326
73344
73327
- val string_switch : ?comment:string -> ?declaration:Lambda .let_kind * Ident.t ->
73345
+ val string_switch : ?comment:string -> ?declaration:Lam .let_kind * Ident.t ->
73328
73346
?default:J.block -> J.expression -> string J.case_clause list -> t
73329
73347
73330
73348
val declare_variable : ?comment:string ->
73331
73349
?ident_info:J.ident_info
73332
- -> kind:Lambda .let_kind -> Ident.t -> t
73350
+ -> kind:Lam .let_kind -> Ident.t -> t
73333
73351
73334
73352
val define :
73335
73353
?comment:string ->
73336
73354
?ident_info:J.ident_info ->
73337
- kind:Lambda .let_kind -> Ident.t -> J.expression -> t
73355
+ kind:Lam .let_kind -> Ident.t -> J.expression -> t
73338
73356
73339
73357
val alias_variable :
73340
73358
?comment:string -> ?exp:J.expression -> Ident.t -> t
@@ -85923,7 +85941,7 @@ type value = {
85923
85941
order_id : int
85924
85942
}
85925
85943
85926
- type let_kind = Lambda .let_kind
85944
+ type let_kind = Lam .let_kind
85927
85945
85928
85946
type st =
85929
85947
| EffectCall
@@ -86031,7 +86049,7 @@ type return_type =
86031
86049
(* have a mutable field to notifiy it's actually triggered *)
86032
86050
(* anonoymous function does not have identifier *)
86033
86051
86034
- type let_kind = Lambda .let_kind
86052
+ type let_kind = Lam .let_kind
86035
86053
86036
86054
type st =
86037
86055
| EffectCall
@@ -88302,7 +88320,7 @@ module Lam_group : sig
88302
88320
88303
88321
88304
88322
type t =
88305
- | Single of Lambda .let_kind * Ident.t * Lam.t
88323
+ | Single of Lam .let_kind * Ident.t * Lam.t
88306
88324
| Recursive of (Ident.t * Lam.t) list
88307
88325
| Nop of Lam.t
88308
88326
@@ -88346,14 +88364,14 @@ end = struct
88346
88364
88347
88365
(** This is not a recursive type definition *)
88348
88366
type t =
88349
- | Single of Lambda .let_kind * Ident.t * Lam.t
88367
+ | Single of Lam .let_kind * Ident.t * Lam.t
88350
88368
| Recursive of (Ident.t * Lam.t) list
88351
88369
| Nop of Lam.t
88352
88370
88353
88371
88354
88372
let pp = Format.fprintf
88355
88373
88356
- let str_of_kind (kind : Lambda .let_kind) =
88374
+ let str_of_kind (kind : Lam .let_kind) =
88357
88375
match kind with
88358
88376
| Alias -> "a"
88359
88377
| Strict -> ""
@@ -94441,7 +94459,7 @@ module Lam_compile : sig
94441
94459
(** Compile single lambda IR to JS IR *)
94442
94460
94443
94461
val compile_let :
94444
- Lambda .let_kind ->
94462
+ Lam .let_kind ->
94445
94463
Lam_compile_defs.cxt ->
94446
94464
J.ident ->
94447
94465
Lam.t ->
@@ -94853,7 +94871,7 @@ and compile_general_cases :
94853
94871
(J.expression -> J.expression -> J.expression) ->
94854
94872
Lam_compile_defs.cxt ->
94855
94873
(?default:J.block ->
94856
- ?declaration:Lambda .let_kind * Ident.t ->
94874
+ ?declaration:Lam .let_kind * Ident.t ->
94857
94875
_ -> 'a J.case_clause list -> J.statement) ->
94858
94876
_ ->
94859
94877
('a * Lam.t) list -> default_case -> J.block
@@ -96733,7 +96751,7 @@ let annotate (meta : Lam_stats.meta)
96733
96751
*)
96734
96752
let collect_helper (meta : Lam_stats.meta) (lam : Lam.t) =
96735
96753
let rec collect_bind rec_flag
96736
- (kind : Lambda .let_kind)
96754
+ (kind : Lam .let_kind)
96737
96755
(ident : Ident.t)
96738
96756
(lam : Lam.t) =
96739
96757
match lam with
0 commit comments