Skip to content

Commit d1b7326

Browse files
committed
remove commented code
1 parent 384d7f7 commit d1b7326

File tree

5 files changed

+4
-204
lines changed

5 files changed

+4
-204
lines changed

jscomp/core/js_fold_basic.ml

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -24,29 +24,6 @@
2424

2525

2626

27-
(* class count_deps (add : Ident.t -> unit ) =
28-
object(self)
29-
inherit Js_fold.fold as super
30-
method! expression lam =
31-
match lam.expression_desc with
32-
| Fun (_, _, block, _) -> self#block block
33-
(** Call
34-
actually depends on parameter,
35-
since closure
36-
{[
37-
n = n - 1
38-
acc = () => n
39-
]}
40-
should be
41-
42-
{[
43-
acc = (function (n) {() => n} (n))
44-
n = n - 1
45-
]}
46-
*)
47-
| _ -> super#expression lam
48-
method! ident x = add x ; self
49-
end *)
5027

5128
let add_lam_module_ident = Lam_module_ident.Hash_set.add
5229
let create = Lam_module_ident.Hash_set.create

jscomp/core/js_pass_flatten_and_mark_dead.ml

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -32,34 +32,7 @@
3232
module E = Js_exp_make
3333
module S = Js_stmt_make
3434

35-
(* class count var = object (self : 'self)
36-
val mutable appears = 0
37-
inherit Js_fold.fold as super
38-
method! ident x =
39-
(if Ident.same x var then
40-
appears <- appears + 1);
41-
self
42-
method get_appears = appears
43-
end *)
44-
45-
(* rewrite return for current block, but don't go into
46-
inner function, mostly for inlinning
47-
*)
48-
(* class rewrite_return ?return_value ()=
49-
let mk_return =
50-
match return_value with
51-
| None -> fun e -> S.exp e
52-
| Some ident -> fun e ->
53-
S.define_variable ~kind:Variable ident e in
54-
object (self : 'self)
55-
inherit Js_map.map as super
56-
method! statement x =
57-
match x.statement_desc with
58-
| Return {return_value = e} ->
59-
mk_return e
60-
| _ -> super#statement x
61-
method! expression x = x (* don't go inside *)
62-
end *)
35+
6336

6437
type meta_info =
6538
| Info of J.ident_info

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -99245,29 +99245,6 @@ end = struct
9924599245

9924699246

9924799247

99248-
(* class count_deps (add : Ident.t -> unit ) =
99249-
object(self)
99250-
inherit Js_fold.fold as super
99251-
method! expression lam =
99252-
match lam.expression_desc with
99253-
| Fun (_, _, block, _) -> self#block block
99254-
(** Call
99255-
actually depends on parameter,
99256-
since closure
99257-
{[
99258-
n = n - 1
99259-
acc = () => n
99260-
]}
99261-
should be
99262-
99263-
{[
99264-
acc = (function (n) {() => n} (n))
99265-
n = n - 1
99266-
]}
99267-
*)
99268-
| _ -> super#expression lam
99269-
method! ident x = add x ; self
99270-
end *)
9927199248

9927299249
let add_lam_module_ident = Lam_module_ident.Hash_set.add
9927399250
let create = Lam_module_ident.Hash_set.create
@@ -101960,34 +101937,7 @@ end = struct
101960101937
module E = Js_exp_make
101961101938
module S = Js_stmt_make
101962101939

101963-
(* class count var = object (self : 'self)
101964-
val mutable appears = 0
101965-
inherit Js_fold.fold as super
101966-
method! ident x =
101967-
(if Ident.same x var then
101968-
appears <- appears + 1);
101969-
self
101970-
method get_appears = appears
101971-
end *)
101972-
101973-
(* rewrite return for current block, but don't go into
101974-
inner function, mostly for inlinning
101975-
*)
101976-
(* class rewrite_return ?return_value ()=
101977-
let mk_return =
101978-
match return_value with
101979-
| None -> fun e -> S.exp e
101980-
| Some ident -> fun e ->
101981-
S.define_variable ~kind:Variable ident e in
101982-
object (self : 'self)
101983-
inherit Js_map.map as super
101984-
method! statement x =
101985-
match x.statement_desc with
101986-
| Return {return_value = e} ->
101987-
mk_return e
101988-
| _ -> super#statement x
101989-
method! expression x = x (* don't go inside *)
101990-
end *)
101940+
101991101941

101992101942
type meta_info =
101993101943
| Info of J.ident_info

lib/4.06.1/unstable/js_refmt_compiler.ml

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -99245,29 +99245,6 @@ end = struct
9924599245

9924699246

9924799247

99248-
(* class count_deps (add : Ident.t -> unit ) =
99249-
object(self)
99250-
inherit Js_fold.fold as super
99251-
method! expression lam =
99252-
match lam.expression_desc with
99253-
| Fun (_, _, block, _) -> self#block block
99254-
(** Call
99255-
actually depends on parameter,
99256-
since closure
99257-
{[
99258-
n = n - 1
99259-
acc = () => n
99260-
]}
99261-
should be
99262-
99263-
{[
99264-
acc = (function (n) {() => n} (n))
99265-
n = n - 1
99266-
]}
99267-
*)
99268-
| _ -> super#expression lam
99269-
method! ident x = add x ; self
99270-
end *)
9927199248

9927299249
let add_lam_module_ident = Lam_module_ident.Hash_set.add
9927399250
let create = Lam_module_ident.Hash_set.create
@@ -101960,34 +101937,7 @@ end = struct
101960101937
module E = Js_exp_make
101961101938
module S = Js_stmt_make
101962101939

101963-
(* class count var = object (self : 'self)
101964-
val mutable appears = 0
101965-
inherit Js_fold.fold as super
101966-
method! ident x =
101967-
(if Ident.same x var then
101968-
appears <- appears + 1);
101969-
self
101970-
method get_appears = appears
101971-
end *)
101972-
101973-
(* rewrite return for current block, but don't go into
101974-
inner function, mostly for inlinning
101975-
*)
101976-
(* class rewrite_return ?return_value ()=
101977-
let mk_return =
101978-
match return_value with
101979-
| None -> fun e -> S.exp e
101980-
| Some ident -> fun e ->
101981-
S.define_variable ~kind:Variable ident e in
101982-
object (self : 'self)
101983-
inherit Js_map.map as super
101984-
method! statement x =
101985-
match x.statement_desc with
101986-
| Return {return_value = e} ->
101987-
mk_return e
101988-
| _ -> super#statement x
101989-
method! expression x = x (* don't go inside *)
101990-
end *)
101940+
101991101941

101992101942
type meta_info =
101993101943
| Info of J.ident_info

lib/4.06.1/whole_compiler.ml

Lines changed: 1 addition & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -381727,29 +381727,6 @@ end = struct
381727381727

381728381728

381729381729

381730-
(* class count_deps (add : Ident.t -> unit ) =
381731-
object(self)
381732-
inherit Js_fold.fold as super
381733-
method! expression lam =
381734-
match lam.expression_desc with
381735-
| Fun (_, _, block, _) -> self#block block
381736-
(** Call
381737-
actually depends on parameter,
381738-
since closure
381739-
{[
381740-
n = n - 1
381741-
acc = () => n
381742-
]}
381743-
should be
381744-
381745-
{[
381746-
acc = (function (n) {() => n} (n))
381747-
n = n - 1
381748-
]}
381749-
*)
381750-
| _ -> super#expression lam
381751-
method! ident x = add x ; self
381752-
end *)
381753381730

381754381731
let add_lam_module_ident = Lam_module_ident.Hash_set.add
381755381732
let create = Lam_module_ident.Hash_set.create
@@ -384442,34 +384419,7 @@ end = struct
384442384419
module E = Js_exp_make
384443384420
module S = Js_stmt_make
384444384421

384445-
(* class count var = object (self : 'self)
384446-
val mutable appears = 0
384447-
inherit Js_fold.fold as super
384448-
method! ident x =
384449-
(if Ident.same x var then
384450-
appears <- appears + 1);
384451-
self
384452-
method get_appears = appears
384453-
end *)
384454-
384455-
(* rewrite return for current block, but don't go into
384456-
inner function, mostly for inlinning
384457-
*)
384458-
(* class rewrite_return ?return_value ()=
384459-
let mk_return =
384460-
match return_value with
384461-
| None -> fun e -> S.exp e
384462-
| Some ident -> fun e ->
384463-
S.define_variable ~kind:Variable ident e in
384464-
object (self : 'self)
384465-
inherit Js_map.map as super
384466-
method! statement x =
384467-
match x.statement_desc with
384468-
| Return {return_value = e} ->
384469-
mk_return e
384470-
| _ -> super#statement x
384471-
method! expression x = x (* don't go inside *)
384472-
end *)
384422+
384473384423

384474384424
type meta_info =
384475384425
| Info of J.ident_info

0 commit comments

Comments
 (0)