Skip to content

Commit 13f88d7

Browse files
committed
Remove class_signature from types.
1 parent 1743d22 commit 13f88d7

File tree

8 files changed

+0
-61
lines changed

8 files changed

+0
-61
lines changed

jscomp/ml/btype.ml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,6 @@ let unmark_extension_constructor ext =
500500
iter_type_expr_cstr_args unmark_type ext.ext_args;
501501
Misc.may unmark_type ext.ext_ret_type
502502

503-
let unmark_class_signature sign =
504-
unmark_type sign.csig_self;
505-
Vars.iter (fun _l (_m, _v, t) -> unmark_type t) sign.csig_vars
506503

507504

508505
(*******************************************)

jscomp/ml/btype.mli

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,6 @@ val mark_type_params: type_expr -> unit
142142
val unmark_type: type_expr -> unit
143143
val unmark_type_decl: type_declaration -> unit
144144
val unmark_extension_constructor: extension_constructor -> unit
145-
val unmark_class_signature: class_signature -> unit
146-
(* Remove marks from a type *)
147145

148146
(**** Memorization of abbreviation expansion ****)
149147

jscomp/ml/ctype.ml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -531,34 +531,6 @@ type closed_class_failure =
531531
CC_Method of type_expr * bool * string * type_expr
532532
| CC_Value of type_expr * bool * string * type_expr
533533

534-
exception CCFailure of closed_class_failure
535-
536-
let closed_class params sign =
537-
let ty = object_fields (repr sign.csig_self) in
538-
let (fields, rest) = flatten_fields ty in
539-
List.iter mark_type params;
540-
mark_type rest;
541-
List.iter
542-
(fun (lab, _, ty) -> if lab = dummy_method then mark_type ty)
543-
fields;
544-
try
545-
mark_type_node (repr sign.csig_self);
546-
List.iter
547-
(fun (lab, kind, ty) ->
548-
if field_kind_repr kind = Fpresent then
549-
try closed_type ty with Non_closed (ty0, real) ->
550-
raise (CCFailure (CC_Method (ty0, real, lab, ty))))
551-
fields;
552-
mark_type_params (repr sign.csig_self);
553-
List.iter unmark_type params;
554-
unmark_class_signature sign;
555-
None
556-
with CCFailure reason ->
557-
mark_type_params (repr sign.csig_self);
558-
List.iter unmark_type params;
559-
unmark_class_signature sign;
560-
Some reason
561-
562534

563535
(**********************)
564536
(* Type duplication *)

jscomp/ml/ctype.mli

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,9 +247,6 @@ val closed_extension_constructor: extension_constructor -> type_expr option
247247
type closed_class_failure =
248248
CC_Method of type_expr * bool * string * type_expr
249249
| CC_Value of type_expr * bool * string * type_expr
250-
val closed_class:
251-
type_expr list -> class_signature -> closed_class_failure option
252-
(* Check whether all type variables are bound *)
253250

254251
val unalias: type_expr -> type_expr
255252
val arity: type_expr -> int

jscomp/ml/subst.ml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -309,16 +309,6 @@ let type_declaration s decl =
309309
cleanup_types ();
310310
decl
311311

312-
let class_signature s sign =
313-
{ csig_self = typexp s sign.csig_self;
314-
csig_vars =
315-
Vars.map (function (m, v, t) -> (m, v, typexp s t)) sign.csig_vars;
316-
csig_concr = sign.csig_concr;
317-
csig_inher =
318-
List.map (fun (p, tl) -> (type_path s p, List.map (typexp s) tl))
319-
sign.csig_inher;
320-
}
321-
322312

323313
let value_description s descr =
324314
{ val_type = type_expr s descr.val_type;

jscomp/ml/subst.mli

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ val signature: t -> signature -> signature
5757
val modtype_declaration: t -> modtype_declaration -> modtype_declaration
5858
val module_declaration: t -> module_declaration -> module_declaration
5959
val typexp : t -> Types.type_expr -> Types.type_expr
60-
val class_signature: t -> class_signature -> class_signature
6160

6261
(* Composition of substitutions:
6362
apply (compose s1 s2) x = apply s2 (apply s1 x) *)

jscomp/ml/types.ml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,13 +211,6 @@ module Concr = Set.Make(OrderedString)
211211

212212
type class_type
213213

214-
and class_signature =
215-
{ csig_self: type_expr;
216-
csig_vars:
217-
(Asttypes.mutable_flag * Asttypes.virtual_flag * type_expr) Vars.t;
218-
csig_concr: Concr.t;
219-
csig_inher: (Path.t * type_expr list) list }
220-
221214
(* Type expressions for the module language *)
222215

223216
type module_type =

jscomp/ml/types.mli

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -362,13 +362,6 @@ and type_transparence =
362362
module Concr : Set.S with type elt = string
363363

364364
type class_type
365-
and class_signature =
366-
{ csig_self: type_expr;
367-
csig_vars:
368-
(Asttypes.mutable_flag * Asttypes.virtual_flag * type_expr) Vars.t;
369-
csig_concr: Concr.t;
370-
csig_inher: (Path.t * type_expr list) list }
371-
372365

373366
(* Type expressions for the module language *)
374367

0 commit comments

Comments
 (0)