Skip to content

Commit 6b3bdc0

Browse files
committed
tweak
1 parent 968a54e commit 6b3bdc0

File tree

5 files changed

+22
-21
lines changed

5 files changed

+22
-21
lines changed

jscomp/core/js_pass_scope.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,20 +119,20 @@ let scope_pass =
119119
(** check if in loop or not *)
120120
val in_loop = false
121121

122-
method get_in_loop = in_loop
122+
(* method get_in_loop = in_loop *)
123123

124124
method get_defined_idents = defined_idents
125125

126126
method get_used_idents = used_idents
127127

128128
method get_loop_mutable_values = loop_mutable_values
129129

130-
method get_mutable_values = mutable_values
130+
(* method get_mutable_values = mutable_values *)
131131

132132
method get_closured_idents = closured_idents
133133

134134
method with_in_loop b =
135-
if b = self#get_in_loop then self
135+
if b = in_loop then self
136136
else {< in_loop = b >}
137137
(* Since it's loop mutable variable, for sure
138138
it is mutable variable
@@ -207,7 +207,7 @@ let scope_pass =
207207
match x with
208208
| { ident ; value; property } ->
209209
let obj =
210-
(match self#get_in_loop, property with
210+
(match in_loop, property with
211211
| true, Variable
212212
->
213213
self#add_loop_mutable_variable ident
@@ -296,7 +296,7 @@ let scope_pass =
296296

297297
| While (_label,pred,body, _env) ->
298298
(((self#expression pred)#with_in_loop true) # block body )
299-
#with_in_loop (self#get_in_loop)
299+
#with_in_loop (in_loop)
300300
| _ ->
301301
super#statement x
302302

lib/4.06.1/unstable/js_compiler.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102393,20 +102393,20 @@ let scope_pass =
102393102393
(** check if in loop or not *)
102394102394
val in_loop = false
102395102395

102396-
method get_in_loop = in_loop
102396+
(* method get_in_loop = in_loop *)
102397102397

102398102398
method get_defined_idents = defined_idents
102399102399

102400102400
method get_used_idents = used_idents
102401102401

102402102402
method get_loop_mutable_values = loop_mutable_values
102403102403

102404-
method get_mutable_values = mutable_values
102404+
(* method get_mutable_values = mutable_values *)
102405102405

102406102406
method get_closured_idents = closured_idents
102407102407

102408102408
method with_in_loop b =
102409-
if b = self#get_in_loop then self
102409+
if b = in_loop then self
102410102410
else {< in_loop = b >}
102411102411
(* Since it's loop mutable variable, for sure
102412102412
it is mutable variable
@@ -102481,7 +102481,7 @@ let scope_pass =
102481102481
match x with
102482102482
| { ident ; value; property } ->
102483102483
let obj =
102484-
(match self#get_in_loop, property with
102484+
(match in_loop, property with
102485102485
| true, Variable
102486102486
->
102487102487
self#add_loop_mutable_variable ident
@@ -102570,7 +102570,7 @@ let scope_pass =
102570102570

102571102571
| While (_label,pred,body, _env) ->
102572102572
(((self#expression pred)#with_in_loop true) # block body )
102573-
#with_in_loop (self#get_in_loop)
102573+
#with_in_loop (in_loop)
102574102574
| _ ->
102575102575
super#statement x
102576102576

lib/4.06.1/unstable/js_refmt_compiler.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102393,20 +102393,20 @@ let scope_pass =
102393102393
(** check if in loop or not *)
102394102394
val in_loop = false
102395102395

102396-
method get_in_loop = in_loop
102396+
(* method get_in_loop = in_loop *)
102397102397

102398102398
method get_defined_idents = defined_idents
102399102399

102400102400
method get_used_idents = used_idents
102401102401

102402102402
method get_loop_mutable_values = loop_mutable_values
102403102403

102404-
method get_mutable_values = mutable_values
102404+
(* method get_mutable_values = mutable_values *)
102405102405

102406102406
method get_closured_idents = closured_idents
102407102407

102408102408
method with_in_loop b =
102409-
if b = self#get_in_loop then self
102409+
if b = in_loop then self
102410102410
else {< in_loop = b >}
102411102411
(* Since it's loop mutable variable, for sure
102412102412
it is mutable variable
@@ -102481,7 +102481,7 @@ let scope_pass =
102481102481
match x with
102482102482
| { ident ; value; property } ->
102483102483
let obj =
102484-
(match self#get_in_loop, property with
102484+
(match in_loop, property with
102485102485
| true, Variable
102486102486
->
102487102487
self#add_loop_mutable_variable ident
@@ -102570,7 +102570,7 @@ let scope_pass =
102570102570

102571102571
| While (_label,pred,body, _env) ->
102572102572
(((self#expression pred)#with_in_loop true) # block body )
102573-
#with_in_loop (self#get_in_loop)
102573+
#with_in_loop (in_loop)
102574102574
| _ ->
102575102575
super#statement x
102576102576

lib/4.06.1/whole_compiler.ml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -384887,20 +384887,20 @@ let scope_pass =
384887384887
(** check if in loop or not *)
384888384888
val in_loop = false
384889384889

384890-
method get_in_loop = in_loop
384890+
(* method get_in_loop = in_loop *)
384891384891

384892384892
method get_defined_idents = defined_idents
384893384893

384894384894
method get_used_idents = used_idents
384895384895

384896384896
method get_loop_mutable_values = loop_mutable_values
384897384897

384898-
method get_mutable_values = mutable_values
384898+
(* method get_mutable_values = mutable_values *)
384899384899

384900384900
method get_closured_idents = closured_idents
384901384901

384902384902
method with_in_loop b =
384903-
if b = self#get_in_loop then self
384903+
if b = in_loop then self
384904384904
else {< in_loop = b >}
384905384905
(* Since it's loop mutable variable, for sure
384906384906
it is mutable variable
@@ -384975,7 +384975,7 @@ let scope_pass =
384975384975
match x with
384976384976
| { ident ; value; property } ->
384977384977
let obj =
384978-
(match self#get_in_loop, property with
384978+
(match in_loop, property with
384979384979
| true, Variable
384980384980
->
384981384981
self#add_loop_mutable_variable ident
@@ -385064,7 +385064,7 @@ let scope_pass =
385064385064

385065385065
| While (_label,pred,body, _env) ->
385066385066
(((self#expression pred)#with_in_loop true) # block body )
385067-
#with_in_loop (self#get_in_loop)
385067+
#with_in_loop (in_loop)
385068385068
| _ ->
385069385069
super#statement x
385070385070

ocaml-tree/record_fold.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@ function mkStructuralTy(def, allNames) {
133133
return {
134134
eta: `(fun _self st ${snippet})`,
135135
beta(x) {
136-
return `let st = (fun ${snippet}) ${x} in `; // TODO: could be inlined futher
136+
// This code path seems to be not hit
137+
return `let st = (fun ${snippet}) ${x} in `;
137138
},
138139
};
139140
default:

0 commit comments

Comments
 (0)