Skip to content

Commit bf84bdd

Browse files
committed
remove unused code
- support mly, no blacklist any more since they are already removed
1 parent 9a1d2c2 commit bf84bdd

File tree

10 files changed

+111
-2432
lines changed

10 files changed

+111
-2432
lines changed

jscomp/core/js_implementation.ml

+1-4
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,7 @@ let after_parsing_sig ppf outputprefix ast =
8080
Lam_compile_env.reset () ;
8181
let initial_env = Res_compmisc.initial_env () in
8282
Env.set_unit_name modulename;
83-
84-
let tsg = Typemod.type_interface
85-
!Location.input_name
86-
initial_env ast in
83+
let tsg = Typemod.transl_signature initial_env ast in
8784
if !Clflags.dump_typedtree then fprintf ppf "%a@." Printtyped.interface tsg;
8885
let sg = tsg.sig_type in
8986
if !Clflags.print_types then

jscomp/core/lam_convert.ml

+1-24
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ let convert_record_repr ( x : Types.record_representation)
204204

205205
let lam_prim ~primitive:( p : Lambda.primitive) ~args loc : Lam.t =
206206
match p with
207-
| Pint_as_pointer
208207
| Pidentity -> Ext_list.singleton_exn args
209208
| Pccall _ -> assert false
210209
| Prevapply -> assert false
@@ -469,22 +468,6 @@ let lam_prim ~primitive:( p : Lambda.primitive) ~args loc : Lam.t =
469468
| Pint32 -> prim ~primitive:(Pasrint) ~args loc
470469
| Pint64 -> prim ~primitive:(Pasrint64) ~args loc
471470
end
472-
| Pbigarraydim _
473-
| Pbigstring_load_16 _
474-
| Pbigstring_load_32 _
475-
| Pbigstring_load_64 _
476-
| Pbigstring_set_16 _
477-
| Pbigstring_set_32 _
478-
| Pbigstring_set_64 _
479-
| Pstring_load_16 _
480-
| Pstring_load_32 _
481-
| Pstring_load_64 _
482-
| Pstring_set_16 _
483-
| Pstring_set_32 _
484-
| Pbigarrayref _
485-
| Pbigarrayset _
486-
| Pstring_set_64 _ ->
487-
Location.raise_errorf ~loc "unsupported primitive"
488471
| Pctconst x ->
489472
begin match x with
490473
| Word_size
@@ -525,9 +508,6 @@ let lam_prim ~primitive:( p : Lambda.primitive) ~args loc : Lam.t =
525508
| Popaque -> Ext_list.singleton_exn args
526509
| Psetfield_computed _ ->
527510
prim ~primitive:Psetfield_computed ~args loc
528-
| Pbbswap _
529-
| Pbswap16
530-
| Pbittest
531511
| Pduparray _ -> assert false
532512
(* Does not exist since we compile array in js backend unlike native backend *)
533513

@@ -833,10 +813,7 @@ let convert (exports : Set_ident.t) (lam : Lambda.lambda) : Lam.t * Lam_module_i
833813
(Ext_list.map meth_args convert_aux) {ap_loc = loc; ap_inlined = Default_inline; ap_status = App_na}
834814

835815
| Lsend _ -> assert false
836-
| Levent _ ->
837-
(* disabled by upstream*)
838-
assert false
839-
| Lifused (_, _) -> assert false
816+
840817

841818
and convert_let (kind : Lam_compat.let_kind) id (e : Lambda.lambda) body : Lam.t =
842819
match kind, e with

jscomp/frontend/bs_ast_mapper.ml

+1-1
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ module M = struct
337337
| Pstr_recmodule l -> rec_module ~loc (List.map (sub.module_binding sub) l)
338338
| Pstr_modtype x -> modtype ~loc (sub.module_type_declaration sub x)
339339
| Pstr_open x -> open_ ~loc (sub.open_description sub x)
340-
| Pstr_class l -> class_ ~loc (List.map (sub.class_declaration sub) l)
340+
| Pstr_class () -> {pstr_loc = loc; pstr_desc = Pstr_class ()}
341341
| Pstr_class_type l ->
342342
class_type ~loc (List.map (sub.class_type_declaration sub) l)
343343
| Pstr_include x -> include_ ~loc (sub.include_declaration sub x)

jscomp/test/debug_tmp.ml

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
(* "-bs-diagnose"; *)
99
"-dparsetree";
1010
(* "-dsource"; *)
11+
(* "-bs-no-builtin-ppx"; *)
1112
|]
1213
}]
1314

lib/4.06.1/unstable/all_ounit_tests.ml

-5
Original file line numberDiff line numberDiff line change
@@ -12110,11 +12110,6 @@ let parse_options errflag s =
1211012110
let defaults_w = "+a-4-6-7-9-27-29-32..42-44-45-48-50-60-102-109";;
1211112111
let defaults_warn_error = "-a+31";;
1211212112

12113-
let () =
12114-
if not !Config.bs_only then (
12115-
parse_options false defaults_w;
12116-
parse_options true defaults_warn_error;
12117-
)
1211812113

1211912114
let message = function
1212012115
| Comment_start -> "this is the start of a comment."

lib/4.06.1/unstable/bspack.ml

-5
Original file line numberDiff line numberDiff line change
@@ -3658,11 +3658,6 @@ let parse_options errflag s =
36583658
let defaults_w = "+a-4-6-7-9-27-29-32..42-44-45-48-50-60-102-109";;
36593659
let defaults_warn_error = "-a+31";;
36603660

3661-
let () =
3662-
if not !Config.bs_only then (
3663-
parse_options false defaults_w;
3664-
parse_options true defaults_warn_error;
3665-
)
36663661

36673662
let message = function
36683663
| Comment_start -> "this is the start of a comment."

0 commit comments

Comments
 (0)