Skip to content

Commit 5737646

Browse files
committed
Remove uses of class declaration, and made class_type abstract before trying to remove it.
1 parent 319fd1f commit 5737646

24 files changed

+9
-700
lines changed

jscomp/ml/btype.ml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -287,9 +287,7 @@ type type_iterators =
287287
it_extension_constructor: type_iterators -> extension_constructor -> unit;
288288
it_module_declaration: type_iterators -> module_declaration -> unit;
289289
it_modtype_declaration: type_iterators -> modtype_declaration -> unit;
290-
it_class_declaration: type_iterators -> class_declaration -> unit;
291290
it_module_type: type_iterators -> module_type -> unit;
292-
it_class_type: type_iterators -> class_type -> unit;
293291
it_type_kind: type_iterators -> type_kind -> unit;
294292
it_do_type_expr: type_iterators -> type_expr -> unit;
295293
it_type_expr: type_iterators -> type_expr -> unit;
@@ -345,32 +343,13 @@ let type_iterators =
345343
it.it_module_type it md.md_type
346344
and it_modtype_declaration it mtd =
347345
may (it.it_module_type it) mtd.mtd_type
348-
and it_class_declaration it cd =
349-
List.iter (it.it_type_expr it) cd.cty_params;
350-
it.it_class_type it cd.cty_type;
351-
may (it.it_type_expr it) cd.cty_new;
352-
it.it_path cd.cty_path
353346
and it_module_type it = function
354347
Mty_ident p
355348
| Mty_alias(_, p) -> it.it_path p
356349
| Mty_signature sg -> it.it_signature it sg
357350
| Mty_functor (_, mto, mt) ->
358351
may (it.it_module_type it) mto;
359352
it.it_module_type it mt
360-
and it_class_type it = function
361-
Cty_constr (p, tyl, cty) ->
362-
it.it_path p;
363-
List.iter (it.it_type_expr it) tyl;
364-
it.it_class_type it cty
365-
| Cty_signature cs ->
366-
it.it_type_expr it cs.csig_self;
367-
Vars.iter (fun _ (_,_,ty) -> it.it_type_expr it ty) cs.csig_vars;
368-
List.iter
369-
(fun (p, tl) -> it.it_path p; List.iter (it.it_type_expr it) tl)
370-
cs.csig_inher
371-
| Cty_arrow (_, ty, cty) ->
372-
it.it_type_expr it ty;
373-
it.it_class_type it cty
374353
and it_type_kind it kind =
375354
iter_type_expr_kind (it.it_type_expr it) kind
376355
and it_do_type_expr it ty =
@@ -386,8 +365,8 @@ let type_iterators =
386365
and it_path _p = ()
387366
in
388367
{ it_path; it_type_expr = it_do_type_expr; it_do_type_expr;
389-
it_type_kind; it_class_type; it_module_type;
390-
it_signature; it_class_declaration;
368+
it_type_kind; it_module_type;
369+
it_signature;
391370
it_modtype_declaration; it_module_declaration; it_extension_constructor;
392371
it_type_declaration; it_value_description; it_signature_item; }
393372

@@ -525,9 +504,6 @@ let unmark_class_signature sign =
525504
unmark_type sign.csig_self;
526505
Vars.iter (fun _l (_m, _v, t) -> unmark_type t) sign.csig_vars
527506

528-
let unmark_class_type cty =
529-
unmark_iterators.it_class_type unmark_iterators cty
530-
531507

532508
(*******************************************)
533509
(* Memorization of abbreviation expansion *)

jscomp/ml/btype.mli

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,7 @@ type type_iterators =
103103
it_extension_constructor: type_iterators -> extension_constructor -> unit;
104104
it_module_declaration: type_iterators -> module_declaration -> unit;
105105
it_modtype_declaration: type_iterators -> modtype_declaration -> unit;
106-
it_class_declaration: type_iterators -> class_declaration -> unit;
107106
it_module_type: type_iterators -> module_type -> unit;
108-
it_class_type: type_iterators -> class_type -> unit;
109107
it_type_kind: type_iterators -> type_kind -> unit;
110108
it_do_type_expr: type_iterators -> type_expr -> unit;
111109
it_type_expr: type_iterators -> type_expr -> unit;
@@ -144,7 +142,6 @@ val mark_type_params: type_expr -> unit
144142
val unmark_type: type_expr -> unit
145143
val unmark_type_decl: type_declaration -> unit
146144
val unmark_extension_constructor: extension_constructor -> unit
147-
val unmark_class_type: class_type -> unit
148145
val unmark_class_signature: class_signature -> unit
149146
(* Remove marks from a type *)
150147

0 commit comments

Comments
 (0)