File tree 4 files changed +38
-56
lines changed
4 files changed +38
-56
lines changed Original file line number Diff line number Diff line change @@ -124,12 +124,10 @@ let subst (export_set : Set_ident.t) stats =
124
124
| Some _ -> self#statement st :: self#block rest
125
125
end
126
126
127
- | {statement_desc =
127
+ | [ {statement_desc =
128
128
Return {return_value =
129
129
{expression_desc =
130
- Call ({expression_desc = Var (Id id)},args,_info)}} }
131
- as st
132
- :: rest
130
+ Call ({expression_desc = Var (Id id)},args,_info)}} } as st ]
133
131
->
134
132
begin match Hash_ident. find_opt stats id with
135
133
@@ -144,21 +142,17 @@ let subst (export_set : Set_ident.t) stats =
144
142
} as v)
145
143
when Ext_list. same_length params args
146
144
->
147
- (* Ext_log.dwarn __LOC__ "%s is dead \n %s " id.name *)
148
- (* (Js_dump.string_of_block [st]); *)
149
145
Js_op_util. update_used_stats v.ident_info Dead_pure ;
150
- let block =
151
- Ext_list. fold_right2
152
- params args ( self#block block) (* see #278 before changes*)
153
- (fun param arg acc ->
154
- S. define_variable ~kind: Variable param arg :: acc)
155
- in
146
+ Ext_list. fold_right2
147
+ params args ( self#block block) (* see #278 before changes*)
148
+ (fun param arg acc ->
149
+ S. define_variable ~kind: Variable param arg :: acc)
156
150
(* Mark a function as dead means it will never be scanned,
157
151
here we inline the function
158
152
*)
159
- Ext_list. append block (self#block rest)
153
+
160
154
| (None | Some _ ) ->
161
- self#statement st :: self#block rest
155
+ [ self#statement st ]
162
156
end
163
157
| x :: xs
164
158
->
Original file line number Diff line number Diff line change @@ -393183,12 +393183,12 @@ let subst (export_set : Set_ident.t) stats =
393183
393183
| Some _ -> self#statement st :: self#block rest
393184
393184
end
393185
393185
393186
- | {statement_desc =
393186
+ | [ {statement_desc =
393187
393187
Return {return_value =
393188
393188
{expression_desc =
393189
- Call({expression_desc = Var (Id id)},args,_info)}} }
393190
- as st
393191
- :: rest
393189
+ Call({expression_desc = Var (Id id)},args,_info)}} } as st ]
393190
+ (* as st
393191
+ :: rest *)
393192
393192
->
393193
393193
begin match Hash_ident.find_opt stats id with
393194
393194
@@ -393203,21 +393203,17 @@ let subst (export_set : Set_ident.t) stats =
393203
393203
} as v)
393204
393204
when Ext_list.same_length params args
393205
393205
->
393206
- (* Ext_log.dwarn __LOC__ "%s is dead \n %s " id.name *)
393207
- (* (Js_dump.string_of_block [st]); *)
393208
393206
Js_op_util.update_used_stats v.ident_info Dead_pure;
393209
- let block =
393210
- Ext_list.fold_right2
393211
- params args ( self#block block) (* see #278 before changes*)
393212
- (fun param arg acc ->
393213
- S.define_variable ~kind:Variable param arg :: acc)
393214
- in
393207
+ Ext_list.fold_right2
393208
+ params args ( self#block block) (* see #278 before changes*)
393209
+ (fun param arg acc ->
393210
+ S.define_variable ~kind:Variable param arg :: acc)
393215
393211
(* Mark a function as dead means it will never be scanned,
393216
393212
here we inline the function
393217
393213
*)
393218
- Ext_list.append block (self#block rest)
393214
+
393219
393215
| (None | Some _) ->
393220
- self#statement st :: self#block rest
393216
+ [ self#statement st ]
393221
393217
end
393222
393218
| x :: xs
393223
393219
->
Original file line number Diff line number Diff line change @@ -393183,12 +393183,12 @@ let subst (export_set : Set_ident.t) stats =
393183
393183
| Some _ -> self#statement st :: self#block rest
393184
393184
end
393185
393185
393186
- | {statement_desc =
393186
+ | [ {statement_desc =
393187
393187
Return {return_value =
393188
393188
{expression_desc =
393189
- Call({expression_desc = Var (Id id)},args,_info)}} }
393190
- as st
393191
- :: rest
393189
+ Call({expression_desc = Var (Id id)},args,_info)}} } as st ]
393190
+ (* as st
393191
+ :: rest *)
393192
393192
->
393193
393193
begin match Hash_ident.find_opt stats id with
393194
393194
@@ -393203,21 +393203,17 @@ let subst (export_set : Set_ident.t) stats =
393203
393203
} as v)
393204
393204
when Ext_list.same_length params args
393205
393205
->
393206
- (* Ext_log.dwarn __LOC__ "%s is dead \n %s " id.name *)
393207
- (* (Js_dump.string_of_block [st]); *)
393208
393206
Js_op_util.update_used_stats v.ident_info Dead_pure;
393209
- let block =
393210
- Ext_list.fold_right2
393211
- params args ( self#block block) (* see #278 before changes*)
393212
- (fun param arg acc ->
393213
- S.define_variable ~kind:Variable param arg :: acc)
393214
- in
393207
+ Ext_list.fold_right2
393208
+ params args ( self#block block) (* see #278 before changes*)
393209
+ (fun param arg acc ->
393210
+ S.define_variable ~kind:Variable param arg :: acc)
393215
393211
(* Mark a function as dead means it will never be scanned,
393216
393212
here we inline the function
393217
393213
*)
393218
- Ext_list.append block (self#block rest)
393214
+
393219
393215
| (None | Some _) ->
393220
- self#statement st :: self#block rest
393216
+ [ self#statement st ]
393221
393217
end
393222
393218
| x :: xs
393223
393219
->
Original file line number Diff line number Diff line change @@ -387138,12 +387138,12 @@ let subst (export_set : Set_ident.t) stats =
387138
387138
| Some _ -> self#statement st :: self#block rest
387139
387139
end
387140
387140
387141
- | {statement_desc =
387141
+ | [ {statement_desc =
387142
387142
Return {return_value =
387143
387143
{expression_desc =
387144
- Call({expression_desc = Var (Id id)},args,_info)}} }
387145
- as st
387146
- :: rest
387144
+ Call({expression_desc = Var (Id id)},args,_info)}} } as st ]
387145
+ (* as st
387146
+ :: rest *)
387147
387147
->
387148
387148
begin match Hash_ident.find_opt stats id with
387149
387149
@@ -387158,21 +387158,17 @@ let subst (export_set : Set_ident.t) stats =
387158
387158
} as v)
387159
387159
when Ext_list.same_length params args
387160
387160
->
387161
- (* Ext_log.dwarn __LOC__ "%s is dead \n %s " id.name *)
387162
- (* (Js_dump.string_of_block [st]); *)
387163
387161
Js_op_util.update_used_stats v.ident_info Dead_pure;
387164
- let block =
387165
- Ext_list.fold_right2
387166
- params args ( self#block block) (* see #278 before changes*)
387167
- (fun param arg acc ->
387168
- S.define_variable ~kind:Variable param arg :: acc)
387169
- in
387162
+ Ext_list.fold_right2
387163
+ params args ( self#block block) (* see #278 before changes*)
387164
+ (fun param arg acc ->
387165
+ S.define_variable ~kind:Variable param arg :: acc)
387170
387166
(* Mark a function as dead means it will never be scanned,
387171
387167
here we inline the function
387172
387168
*)
387173
- Ext_list.append block (self#block rest)
387169
+
387174
387170
| (None | Some _) ->
387175
- self#statement st :: self#block rest
387171
+ [ self#statement st ]
387176
387172
end
387177
387173
| x :: xs
387178
387174
->
You can’t perform that action at this time.
0 commit comments