Skip to content

Commit 18044dd

Browse files
committed
More dce.
1 parent f4ca17e commit 18044dd

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

compiler/ml/datarepr.ml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -101,11 +101,10 @@ let constructor_has_optional_shape
101101

102102
let constructor_descrs ty_path decl cstrs =
103103
let ty_res = newgenconstr ty_path decl.type_params in
104-
let num_consts = ref 0 and num_nonconsts = ref 0 and num_normal = ref 0 in
104+
let num_consts = ref 0 and num_nonconsts = ref 0 in
105105
List.iter
106-
(fun {cd_args; cd_res; _} ->
107-
if cd_args = Cstr_tuple [] then incr num_consts else incr num_nonconsts;
108-
if cd_res = None then incr num_normal)
106+
(fun {cd_args; _} ->
107+
if cd_args = Cstr_tuple [] then incr num_consts else incr num_nonconsts)
109108
cstrs;
110109
let rec describe_constructors idx_const idx_nonconst = function
111110
| [] -> []
@@ -154,7 +153,6 @@ let constructor_descrs ty_path decl cstrs =
154153
cstr_tag = tag;
155154
cstr_consts = !num_consts;
156155
cstr_nonconsts = !num_nonconsts;
157-
cstr_normal = !num_normal;
158156
cstr_private = decl.type_private;
159157
cstr_generalized = cd_res <> None;
160158
cstr_loc = cd_loc;
@@ -208,7 +206,6 @@ let extension_descr path_ext ext =
208206
cstr_consts = -1;
209207
cstr_nonconsts = -1;
210208
cstr_private = ext.ext_private;
211-
cstr_normal = -1;
212209
cstr_generalized = ext.ext_ret_type <> None;
213210
cstr_loc = ext.ext_loc;
214211
cstr_attributes = ext.ext_attributes;

compiler/ml/types.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,6 @@ type constructor_description = {
262262
cstr_tag: constructor_tag; (* Tag for heap blocks *)
263263
cstr_consts: int; (* Number of constant constructors *)
264264
cstr_nonconsts: int; (* Number of non-const constructors *)
265-
cstr_normal: int; (* Number of non generalized constrs *)
266265
cstr_generalized: bool; (* Constrained return type? *)
267266
cstr_private: private_flag; (* Read-only constructor? *)
268267
cstr_loc: Location.t;

compiler/ml/types.mli

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,6 @@ type constructor_description = {
394394
cstr_tag: constructor_tag; (* Tag for heap blocks *)
395395
cstr_consts: int; (* Number of constant constructors *)
396396
cstr_nonconsts: int; (* Number of non-const constructors *)
397-
cstr_normal: int; (* Number of non generalized constrs *)
398397
cstr_generalized: bool; (* Constrained return type? *)
399398
cstr_private: private_flag; (* Read-only constructor? *)
400399
cstr_loc: Location.t;

0 commit comments

Comments
 (0)