Skip to content

Commit e204d7c

Browse files
committed
More dce
1 parent 0037c5f commit e204d7c

File tree

5 files changed

+2
-16
lines changed

5 files changed

+2
-16
lines changed

jscomp/gentype/Annotation.ml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -275,12 +275,6 @@ and structureCheckAnnotation ~checkAnnotation (structure : Typedtree.structure)
275275
structure.str_items
276276
|> List.exists (structureItemCheckAnnotation ~checkAnnotation)
277277

278-
let sanitizeVariableName name =
279-
name
280-
|> String.map (function
281-
| '-' -> '_'
282-
| c -> c)
283-
284278
let importFromString importString : import =
285279
let importPath = ImportPath.fromStringUnsafe importString in
286280
{importPath}

jscomp/gentype/GenTypeCommon.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ and variant = {
9292
unboxed: bool;
9393
}
9494

95-
and payload = {case: case; numArgs: int; [@live] t: type_}
95+
and payload = {case: case; t: type_}
9696

9797
type label = Nolabel | Label of string | OptLabel of string
9898

jscomp/gentype/TranslateCoreType.ml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,6 @@ and translateCoreType_ ~config ~typeVarsGen
204204
|> List.map (fun (label, _attributes, translation) ->
205205
{
206206
case = {label; labelJS = StringLabel label};
207-
numArgs = 1;
208207
t = translation.type_;
209208
})
210209
in

jscomp/gentype/TranslateTypeDeclarations.ml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,11 +281,9 @@ let traslateDeclarationKind ~config ~loc ~outputFileRelative ~resolver
281281
| [type_] -> type_
282282
| _ -> Tuple argTypes
283283
in
284-
let numArgs = argTypes |> List.length in
285284
{
286285
case =
287286
{((name, attributes) |> createCase) with label = recordValue};
288-
numArgs;
289287
t = type_;
290288
})
291289
in

jscomp/gentype/TranslateTypeExprFromTypes.ml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,11 +132,7 @@ let translateConstr ~config ~paramsTranslation ~(path : Path.t) ~typeEnv =
132132
| ( (["Pervasives"; "result"] | ["Belt"; "Result"; "t"]),
133133
[paramTranslation1; paramTranslation2] ) ->
134134
let case n name type_ =
135-
{
136-
case = {label = string_of_int n; labelJS = StringLabel name};
137-
numArgs = 1;
138-
t = type_;
139-
}
135+
{case = {label = string_of_int n; labelJS = StringLabel name}; t = type_}
140136
in
141137
let variant =
142138
createVariant ~inherits:[] ~noPayloads:[]
@@ -410,7 +406,6 @@ and translateTypeExprFromTypes_ ~config ~typeVarsGen ~typeEnv
410406
|> List.map (fun (label, translation) ->
411407
{
412408
case = {label; labelJS = StringLabel label};
413-
numArgs = 1;
414409
t = translation.type_;
415410
})
416411
in

0 commit comments

Comments
 (0)