Skip to content

Commit df1384a

Browse files
committed
Fantomas
1 parent 6a04e7b commit df1384a

File tree

1 file changed

+44
-40
lines changed

1 file changed

+44
-40
lines changed

src/Compiler/CodeGen/IlxGen.fs

Lines changed: 44 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -8568,59 +8568,34 @@ and GenBindingAfterDebugPoint cenv cgbuf eenv bind isStateVar startMarkOpt =
85688568
GenExpr cenv cgbuf eenv cctorBody discard
85698569

85708570
| Method(valReprInfo, _, mspec, mspecW, _, ctps, mtps, curriedArgInfos, paramInfos, witnessInfos, argTys, retInfo) when not isStateVar ->
8571-
if vspec.InlineInfo = ValInline.InlinedDefinition && not (cenv.emittedSpecializedInlineVals.Add(vspec.Stamp)) then
8572-
CommitStartScope cgbuf startMarkOpt else
8571+
if
8572+
vspec.InlineInfo = ValInline.InlinedDefinition
8573+
&& not (cenv.emittedSpecializedInlineVals.Add(vspec.Stamp))
8574+
then
8575+
CommitStartScope cgbuf startMarkOpt
8576+
else
85738577

8574-
let methLambdaTypars, methLambdaCtorThisValOpt, methLambdaBaseValOpt, methLambdaCurriedVars, methLambdaBody, methLambdaBodyTy =
8575-
IteratedAdjustLambdaToMatchValReprInfo g cenv.amap valReprInfo rhsExpr
8578+
let methLambdaTypars, methLambdaCtorThisValOpt, methLambdaBaseValOpt, methLambdaCurriedVars, methLambdaBody, methLambdaBodyTy =
8579+
IteratedAdjustLambdaToMatchValReprInfo g cenv.amap valReprInfo rhsExpr
85768580

8577-
let methLambdaVars = List.concat methLambdaCurriedVars
8581+
let methLambdaVars = List.concat methLambdaCurriedVars
85788582

8579-
CommitStartScope cgbuf startMarkOpt
8583+
CommitStartScope cgbuf startMarkOpt
85808584

8581-
let hasWitnessEntry = cenv.g.generateWitnesses && not witnessInfos.IsEmpty
8582-
8583-
GenMethodForBinding
8584-
cenv
8585-
cgbuf.mgbuf
8586-
eenv
8587-
(vspec,
8588-
mspec,
8589-
hasWitnessEntry,
8590-
false,
8591-
access,
8592-
ctps,
8593-
mtps,
8594-
[],
8595-
curriedArgInfos,
8596-
paramInfos,
8597-
argTys,
8598-
retInfo,
8599-
valReprInfo,
8600-
methLambdaCtorThisValOpt,
8601-
methLambdaBaseValOpt,
8602-
methLambdaTypars,
8603-
methLambdaVars,
8604-
methLambdaBody,
8605-
methLambdaBodyTy)
8606-
8607-
// If generating witnesses, then generate the second entry point with additional arguments.
8608-
// Take a copy of the expression to ensure generated names are unique.
8609-
if hasWitnessEntry then
8610-
let copyOfLambdaBody = copyExpr cenv.g CloneAll methLambdaBody
8585+
let hasWitnessEntry = cenv.g.generateWitnesses && not witnessInfos.IsEmpty
86118586

86128587
GenMethodForBinding
86138588
cenv
86148589
cgbuf.mgbuf
86158590
eenv
86168591
(vspec,
8617-
mspecW,
8592+
mspec,
86188593
hasWitnessEntry,
8619-
true,
8594+
false,
86208595
access,
86218596
ctps,
86228597
mtps,
8623-
witnessInfos,
8598+
[],
86248599
curriedArgInfos,
86258600
paramInfos,
86268601
argTys,
@@ -8630,9 +8605,38 @@ and GenBindingAfterDebugPoint cenv cgbuf eenv bind isStateVar startMarkOpt =
86308605
methLambdaBaseValOpt,
86318606
methLambdaTypars,
86328607
methLambdaVars,
8633-
copyOfLambdaBody,
8608+
methLambdaBody,
86348609
methLambdaBodyTy)
86358610

8611+
// If generating witnesses, then generate the second entry point with additional arguments.
8612+
// Take a copy of the expression to ensure generated names are unique.
8613+
if hasWitnessEntry then
8614+
let copyOfLambdaBody = copyExpr cenv.g CloneAll methLambdaBody
8615+
8616+
GenMethodForBinding
8617+
cenv
8618+
cgbuf.mgbuf
8619+
eenv
8620+
(vspec,
8621+
mspecW,
8622+
hasWitnessEntry,
8623+
true,
8624+
access,
8625+
ctps,
8626+
mtps,
8627+
witnessInfos,
8628+
curriedArgInfos,
8629+
paramInfos,
8630+
argTys,
8631+
retInfo,
8632+
valReprInfo,
8633+
methLambdaCtorThisValOpt,
8634+
methLambdaBaseValOpt,
8635+
methLambdaTypars,
8636+
methLambdaVars,
8637+
copyOfLambdaBody,
8638+
methLambdaBodyTy)
8639+
86368640
| StaticProperty(ilGetterMethSpec, optShadowLocal) when not isStateVar ->
86378641

86388642
let ilAttribs = GenAttrs cenv eenv vspec.Attribs

0 commit comments

Comments
 (0)