@@ -72685,6 +72685,7 @@ let try_ids = Hashtbl.create 8
72685
72685
72686
72686
let rec transl_exp e =
72687
72687
List.iter (Translattribute.check_attribute e) e.exp_attributes;
72688
+
72688
72689
let eval_once =
72689
72690
(* Whether classes for immediate objects must be cached *)
72690
72691
match e.exp_desc with
@@ -73008,6 +73009,7 @@ and transl_exp0 e =
73008
73009
| Texp_for(param, _, low, high, dir, body) ->
73009
73010
Lfor(param, transl_exp low, transl_exp high, dir,
73010
73011
event_before body (transl_exp body))
73012
+
73011
73013
| Texp_send(_, _, Some exp) -> transl_exp exp
73012
73014
| Texp_send(expr, met, None) ->
73013
73015
let obj = transl_exp expr in
@@ -73020,6 +73022,7 @@ and transl_exp0 e =
73020
73022
Lsend (kind, tag, obj, cache, e.exp_loc)
73021
73023
in
73022
73024
event_after e lam
73025
+
73023
73026
| Texp_new (cl, {Location.loc=loc}, _) ->
73024
73027
Lapply{ap_should_be_tailcall=false;
73025
73028
ap_loc=loc;
@@ -73033,6 +73036,7 @@ and transl_exp0 e =
73033
73036
| Texp_setinstvar(path_self, path, _, expr) ->
73034
73037
transl_setinstvar e.exp_loc (transl_normal_path path_self) path expr
73035
73038
| Texp_override(path_self, modifs) ->
73039
+
73036
73040
let cpy = Ident.create "copy" in
73037
73041
Llet(Strict, Pgenval, cpy,
73038
73042
Lapply{ap_should_be_tailcall=false;
@@ -73047,6 +73051,7 @@ and transl_exp0 e =
73047
73051
(Lvar cpy) path expr, rem))
73048
73052
modifs
73049
73053
(Lvar cpy))
73054
+
73050
73055
| Texp_letmodule(id, loc, modl, body) ->
73051
73056
let defining_expr =
73052
73057
@@ -80216,7 +80221,7 @@ open Typedtree
80216
80221
open Lambda
80217
80222
open Translobj
80218
80223
open Translcore
80219
- open Translclass
80224
+
80220
80225
80221
80226
type error =
80222
80227
Circular_dependency of Ident.t
@@ -80561,7 +80566,7 @@ let transl_class_bindings cl_list =
80561
80566
(ids,
80562
80567
List.map
80563
80568
(fun ({ci_id_class=id; ci_expr=cl; ci_virt=vf}, meths) ->
80564
- (id, transl_class ids id meths cl vf))
80569
+ (id, Translclass. transl_class ids id meths cl vf))
80565
80570
cl_list)
80566
80571
80567
80572
(* Compile one or more functors, merging curried functors to produce
@@ -80823,13 +80828,15 @@ and transl_structure loc fields cc rootpath final_env = function
80823
80828
body
80824
80829
in
80825
80830
lam, size
80831
+
80826
80832
| Tstr_class cl_list ->
80827
80833
let (ids, class_bindings) = transl_class_bindings cl_list in
80828
80834
let body, size =
80829
80835
transl_structure loc (List.rev_append ids fields)
80830
80836
cc rootpath final_env rem
80831
80837
in
80832
80838
Lletrec(class_bindings, body), size
80839
+
80833
80840
| Tstr_include incl ->
80834
80841
let ids = bound_value_identifiers incl.incl_type in
80835
80842
let modl = incl.incl_mod in
@@ -81163,6 +81170,7 @@ let transl_store_structure glob map prims str =
81163
81170
bindings
81164
81171
(Lsequence(store_idents Location.none ids,
81165
81172
transl_store rootpath (add_idents true ids subst) rem))
81173
+
81166
81174
| Tstr_class cl_list ->
81167
81175
let (ids, class_bindings) = transl_class_bindings cl_list in
81168
81176
let lam =
@@ -81426,12 +81434,14 @@ let transl_toplevel_item item =
81426
81434
(fun id modl _loc -> transl_module Tcoerce_none (Some(Pident id)) modl)
81427
81435
bindings
81428
81436
(make_sequence toploop_setvalue_id idents)
81437
+
81429
81438
| Tstr_class cl_list ->
81430
81439
(* we need to use unique names for the classes because there might
81431
81440
be a value named identically *)
81432
81441
let (ids, class_bindings) = transl_class_bindings cl_list in
81433
81442
List.iter set_toplevel_unique_name ids;
81434
81443
Lletrec(class_bindings, make_sequence toploop_setvalue_id ids)
81444
+
81435
81445
| Tstr_include incl ->
81436
81446
let ids = bound_value_identifiers incl.incl_type in
81437
81447
let modl = incl.incl_mod in
0 commit comments