Skip to content

Commit 760c74c

Browse files
committed
continue clean up after removal Ocaml objects: not linking Translobj/Translclass
1 parent cb52d6b commit 760c74c

File tree

4 files changed

+43
-1262
lines changed

4 files changed

+43
-1262
lines changed

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72685,6 +72685,7 @@ let try_ids = Hashtbl.create 8
7268572685

7268672686
let rec transl_exp e =
7268772687
List.iter (Translattribute.check_attribute e) e.exp_attributes;
72688+
7268872689
let eval_once =
7268972690
(* Whether classes for immediate objects must be cached *)
7269072691
match e.exp_desc with
@@ -73008,6 +73009,7 @@ and transl_exp0 e =
7300873009
| Texp_for(param, _, low, high, dir, body) ->
7300973010
Lfor(param, transl_exp low, transl_exp high, dir,
7301073011
event_before body (transl_exp body))
73012+
7301173013
| Texp_send(_, _, Some exp) -> transl_exp exp
7301273014
| Texp_send(expr, met, None) ->
7301373015
let obj = transl_exp expr in
@@ -73020,6 +73022,7 @@ and transl_exp0 e =
7302073022
Lsend (kind, tag, obj, cache, e.exp_loc)
7302173023
in
7302273024
event_after e lam
73025+
7302373026
| Texp_new (cl, {Location.loc=loc}, _) ->
7302473027
Lapply{ap_should_be_tailcall=false;
7302573028
ap_loc=loc;
@@ -73033,6 +73036,7 @@ and transl_exp0 e =
7303373036
| Texp_setinstvar(path_self, path, _, expr) ->
7303473037
transl_setinstvar e.exp_loc (transl_normal_path path_self) path expr
7303573038
| Texp_override(path_self, modifs) ->
73039+
7303673040
let cpy = Ident.create "copy" in
7303773041
Llet(Strict, Pgenval, cpy,
7303873042
Lapply{ap_should_be_tailcall=false;
@@ -73047,6 +73051,7 @@ and transl_exp0 e =
7304773051
(Lvar cpy) path expr, rem))
7304873052
modifs
7304973053
(Lvar cpy))
73054+
7305073055
| Texp_letmodule(id, loc, modl, body) ->
7305173056
let defining_expr =
7305273057

@@ -80216,7 +80221,7 @@ open Typedtree
8021680221
open Lambda
8021780222
open Translobj
8021880223
open Translcore
80219-
open Translclass
80224+
8022080225

8022180226
type error =
8022280227
Circular_dependency of Ident.t
@@ -80561,7 +80566,7 @@ let transl_class_bindings cl_list =
8056180566
(ids,
8056280567
List.map
8056380568
(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))
8056580570
cl_list)
8056680571

8056780572
(* Compile one or more functors, merging curried functors to produce
@@ -80823,13 +80828,15 @@ and transl_structure loc fields cc rootpath final_env = function
8082380828
body
8082480829
in
8082580830
lam, size
80831+
8082680832
| Tstr_class cl_list ->
8082780833
let (ids, class_bindings) = transl_class_bindings cl_list in
8082880834
let body, size =
8082980835
transl_structure loc (List.rev_append ids fields)
8083080836
cc rootpath final_env rem
8083180837
in
8083280838
Lletrec(class_bindings, body), size
80839+
8083380840
| Tstr_include incl ->
8083480841
let ids = bound_value_identifiers incl.incl_type in
8083580842
let modl = incl.incl_mod in
@@ -81163,6 +81170,7 @@ let transl_store_structure glob map prims str =
8116381170
bindings
8116481171
(Lsequence(store_idents Location.none ids,
8116581172
transl_store rootpath (add_idents true ids subst) rem))
81173+
8116681174
| Tstr_class cl_list ->
8116781175
let (ids, class_bindings) = transl_class_bindings cl_list in
8116881176
let lam =
@@ -81426,12 +81434,14 @@ let transl_toplevel_item item =
8142681434
(fun id modl _loc -> transl_module Tcoerce_none (Some(Pident id)) modl)
8142781435
bindings
8142881436
(make_sequence toploop_setvalue_id idents)
81437+
8142981438
| Tstr_class cl_list ->
8143081439
(* we need to use unique names for the classes because there might
8143181440
be a value named identically *)
8143281441
let (ids, class_bindings) = transl_class_bindings cl_list in
8143381442
List.iter set_toplevel_unique_name ids;
8143481443
Lletrec(class_bindings, make_sequence toploop_setvalue_id ids)
81444+
8143581445
| Tstr_include incl ->
8143681446
let ids = bound_value_identifiers incl.incl_type in
8143781447
let modl = incl.incl_mod in

0 commit comments

Comments
 (0)