From 54006b23391c2188cfc994151c1b8dd695778fbe Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 19 Aug 2021 00:45:36 +0100 Subject: [PATCH 01/13] update --- azure-pipelines.yml | 15 +- eng/Version.Details.xml | 4 +- global.json | 6 +- src/fsharp/AugmentWithHashCompare.fs | 56 +- src/fsharp/CheckComputationExpressions.fs | 16 +- src/fsharp/CheckExpressions.fs | 26 +- src/fsharp/FindUnsolved.fs | 2 +- src/fsharp/IlxGen.fs | 274 ++-- src/fsharp/InnerLambdasToTopLevelFuncs.fs | 4 +- src/fsharp/LowerCallsAndSeqs.fs | 43 +- src/fsharp/LowerStateMachines.fs | 22 +- src/fsharp/MethodCalls.fs | 2 +- src/fsharp/Optimizer.fs | 33 +- src/fsharp/PatternMatchCompilation.fs | 397 +++-- src/fsharp/PostInferenceChecks.fs | 2 +- src/fsharp/QuotationTranslator.fs | 4 +- src/fsharp/SyntaxTree.fs | 9 +- src/fsharp/SyntaxTree.fsi | 12 +- src/fsharp/SyntaxTreeOps.fs | 5 +- src/fsharp/TypedTree.fs | 4 +- src/fsharp/TypedTreeOps.fs | 204 ++- src/fsharp/TypedTreeOps.fsi | 14 +- src/fsharp/TypedTreePickle.fs | 12 +- src/fsharp/absil/ilwrite.fs | 1 - src/fsharp/pars.fsy | 10 +- src/fsharp/service/FSharpParseFileResults.fs | 8 +- src/fsharp/symbols/Exprs.fs | 4 +- ...erService.SurfaceArea.netstandard.expected | 74 +- .../CodeGen/EmittedIL/BooleanLogic.fs | 57 +- .../EmittedIL/ComputedListExpressions.fs | 303 ++-- .../CodeGen/EmittedIL/TaskGeneratedCode.fs | 230 +-- .../AsyncExpressionSteppingTest3.il.bsl | 4 +- .../AsyncExpressionSteppingTest4.il.bsl | 4 +- .../AsyncExpressionSteppingTest5.il.bsl | 4 +- .../AsyncExpressionSteppingTest6.il.bsl | 4 +- .../EmittedIL/AttributeTargets/Default.il.bsl | 36 +- .../EmittedIL/AttributeTargets/Field.il.bsl | 40 +- .../AttributeTargets/Property.il.bsl | 40 +- .../CCtorDUWithMember01.il.bsl | 235 +-- .../ComputationExpr02.il.bsl | 38 +- .../ComputationExpr03.il.bsl | 68 +- .../ComputationExpr04.il.bsl | 58 +- .../ComputationExpr05.il.bsl | 40 +- .../GeneratedIterators/GenIter01.il.bsl | 5 +- .../GeneratedIterators/GenIter02.il.bsl | 5 +- .../GeneratedIterators/GenIter03.il.bsl | 5 +- .../GeneratedIterators/GenIter04.il.bsl | 5 +- .../InequalityComparison05.il.bsl | 22 +- .../ListExpressionSteppingTest2.il.bsl | 176 +- .../ListExpressionSteppingTest4.il.bsl | 70 +- .../ListExpressionSteppingTest5.il.bsl | 94 +- .../ListExpressionSteppingTest6.il.bsl | 6 +- .../CodeGen/EmittedIL/Misc/AnonRecd.il.bsl | 326 ++-- .../EmittedIL/Misc/EntryPoint01.il.bsl | 34 +- .../EmittedIL/Misc/EqualsOnUnions01.il.bsl | 502 +++--- .../Misc/GeneralizationOnUnions01.il.bsl | 159 +- .../EmittedIL/Misc/IfThenElse01.il.bsl | 22 +- .../EmittedIL/Misc/LetIfThenElse01.il.bsl | 122 +- .../CodeGen/EmittedIL/Misc/Lock01.il.bsl | 5 +- .../EmittedIL/Misc/MethodImplNoInline.il.bsl | 4 +- .../Misc/MethodImplNoInline02.il.bsl | 4 +- .../EmittedIL/Misc/Seq_for_all01.il.bsl | 30 +- .../CodeGen/EmittedIL/Misc/Structs01.il.bsl | 6 +- .../CodeGen/EmittedIL/Misc/Structs02.il.bsl | 6 +- .../Misc/StructsAsArrayElements01.il.bsl | 6 +- .../Misc/TryWith_NoFilterBlocks01.il.bsl | 46 +- .../Linq101Aggregates01.il.bsl | 316 ++-- .../Linq101ElementOperators01.il.bsl | 84 +- .../Linq101Joins01.il.bsl | 56 +- .../Linq101Ordering01.il.bsl | 84 +- .../Linq101Partitioning01.il.bsl | 84 +- .../Linq101Quantifiers01.il.bsl | 44 +- .../Linq101Select01.il.bsl | 504 +++--- .../Linq101SetOperators01.il.bsl | 84 +- .../Linq101Where01.il.bsl | 78 +- .../SeqExpressionSteppingTest5.il.bsl | 24 +- .../SeqExpressionSteppingTest6.il.bsl | 24 +- .../SeqExpressionSteppingTest7.il.bsl | 69 +- .../ToplevelModule.il.bsl | 962 +++++------ .../ToplevelNamespace.il.bsl | 1440 +++++++++-------- .../StaticInit/StaticInit_Class01.il.bsl | 36 +- .../StaticInit/StaticInit_Struct01.il.bsl | 36 +- .../SteppingMatch/SteppingMatch01.il.bsl | 8 +- .../SteppingMatch/SteppingMatch02.il.bsl | 8 +- .../SteppingMatch/SteppingMatch03.il.bsl | 10 +- .../SteppingMatch/SteppingMatch04.il.bsl | 10 +- .../SteppingMatch/SteppingMatch05.il.bsl | 10 +- .../SteppingMatch/SteppingMatch06.il.bsl | 261 +-- .../SteppingMatch/SteppingMatch07.il.bsl | 261 +-- .../SteppingMatch/SteppingMatch08.il.bsl | 30 +- .../SteppingMatch/SteppingMatch09.il.bsl | 94 +- .../TestFunctions/TestFunction16.il.bsl | 415 ++--- .../TestFunctions/TestFunction17.il.bsl | 370 +++-- .../TestFunctions/TestFunction21.il.bsl | 415 ++--- .../TestFunctions/TestFunction24.il.bsl | 372 +++-- .../TestFunctions/TestFunction3b.il.bsl | 61 +- .../TestFunctions/TestFunction3c.il.bsl | 87 +- .../TestFunctions/TestFunction9b4.il.bsl | 34 +- .../TestFunctions/Testfunction22f.il.bsl | 5 +- .../TestFunctions/Testfunction22g.il.bsl | 24 +- .../TestFunctions/Testfunction22h.il.bsl | 24 +- .../TestFunctions/Testfunction3.il.bsl | 40 +- .../TestFunctions/Testfunction4.il.bsl | 38 +- .../TestFunctions/Testfunction8.il.bsl | 30 +- .../TestFunctions/Testfunction9.il.bsl | 34 +- .../TestFunctions/Testfunction9b.il.bsl | 286 ++-- .../TestFunctions/Testfunction9b1.il.bsl | 286 ++-- .../TestFunctions/Testfunction9b2.il.bsl | 286 ++-- .../TestFunctions/Testfunction9b3.il.bsl | 286 ++-- .../EmittedIL/Tuples/OptionalArg01.il.bsl | 126 +- .../EmittedIL/Tuples/TupleElimination.il.bsl | 4 +- .../GenericComparison/Compare01.il.bsl | 5 +- .../GenericComparison/Compare02.il.bsl | 6 +- .../GenericComparison/Compare03.il.bsl | 7 +- .../GenericComparison/Compare04.il.bsl | 8 +- .../GenericComparison/Compare05.il.bsl | 400 ++--- .../GenericComparison/Compare06.il.bsl | 347 ++-- .../GenericComparison/Compare07.il.bsl | 466 +++--- .../GenericComparison/Compare10.il.bsl | 927 ++++++----- .../GenericComparison/Equals03.il.bsl | 52 +- .../GenericComparison/Equals04.il.bsl | 400 ++--- .../GenericComparison/Equals05.il.bsl | 347 ++-- .../GenericComparison/Equals06.il.bsl | 466 +++--- .../GenericComparison/Equals09.il.bsl | 927 ++++++----- .../GenericComparison/Hash05.il.bsl | 400 ++--- .../GenericComparison/Hash06.il.bsl | 400 ++--- .../GenericComparison/Hash08.il.bsl | 347 ++-- .../GenericComparison/Hash09.il.bsl | 466 +++--- .../GenericComparison/Hash12.il.bsl | 927 ++++++----- tests/service/EditorTests.fs | 61 + tests/service/data/TestTP/ProvidedTypes.fs | 7 +- .../TheBigFileOfDebugStepping.fsx | 114 ++ .../ProvidedTypes.fs | 3 - 133 files changed, 10194 insertions(+), 8813 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 93492c0446c..2accfcebf6b 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -386,10 +386,9 @@ stages: packageType: sdk useGlobalJson: true includePreviewVersions: true - workingDirectory: $(Build.SourcesDirectory)/service + workingDirectory: $(Build.SourcesDirectory) installationPath: $(Agent.ToolsDirectory)/dotnet - - script: dotnet build ..\FSharp.sln /bl:\"artifacts/log/$(_BuildConfig)/RegularBuild.binlog\" - workingDirectory: $(Build.SourcesDirectory)/service + - script: dotnet build .\FSharp.sln /bl:\"artifacts/log/$(_BuildConfig)/RegularBuild.binlog\" env: DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 displayName: Regular rebuild of FSharp.sln @@ -419,10 +418,9 @@ stages: packageType: sdk useGlobalJson: true includePreviewVersions: true - workingDirectory: $(Build.SourcesDirectory)/service + workingDirectory: $(Build.SourcesDirectory) installationPath: $(Agent.ToolsDirectory)/dotnet - - script: dotnet build ../FSharp.sln /bl:\"artifacts/log/$(_BuildConfig)/RegularBuild.binlog\" - workingDirectory: $(Build.SourcesDirectory)/service + - script: dotnet build ./FSharp.sln /bl:\"artifacts/log/$(_BuildConfig)/RegularBuild.binlog\" env: DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 displayName: Regular rebuild of FSharp.sln @@ -452,10 +450,9 @@ stages: packageType: sdk useGlobalJson: true includePreviewVersions: true - workingDirectory: $(Build.SourcesDirectory)/service + workingDirectory: $(Build.SourcesDirectory) installationPath: $(Agent.ToolsDirectory)/dotnet - - script: dotnet build ../FSharp.sln /bl:\"artifacts/log/$(_BuildConfig)/RegularBuild.binlog\" - workingDirectory: $(Build.SourcesDirectory)/service + - script: dotnet build ./FSharp.sln /bl:\"artifacts/log/$(_BuildConfig)/RegularBuild.binlog\" env: DOTNET_ROLL_FORWARD_TO_PRERELEASE: 1 displayName: Regular rebuild of FSharp.sln diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index 3fd0165cdab..e5e7485354f 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -8,9 +8,9 @@ - + https://github.com/dotnet/arcade - 9b7027ba718462aa6410cef61a8be5a4283e7528 + df04f7bfcf0bdd315d5468e158a8cf6696760190 diff --git a/global.json b/global.json index f509a7ef793..333d923afaa 100644 --- a/global.json +++ b/global.json @@ -1,11 +1,11 @@ { "sdk": { - "version": "6.0.100-rc.1.21379.2", + "version": "6.0.100-preview.7.21379.14", "allowPrerelease": true, "rollForward": "minor" }, "tools": { - "dotnet": "6.0.100-rc.1.21379.2", + "dotnet": "6.0.100-preview.7.21379.14", "vs": { "version": "16.8", "components": [ @@ -14,7 +14,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21413.4", + "Microsoft.DotNet.Arcade.Sdk": "6.0.0-beta.21417.1", "Microsoft.DotNet.Helix.Sdk": "2.0.0-beta.19069.2" } } diff --git a/src/fsharp/AugmentWithHashCompare.fs b/src/fsharp/AugmentWithHashCompare.fs index a431caf4d61..aa69ea08050 100644 --- a/src/fsharp/AugmentWithHashCompare.fs +++ b/src/fsharp/AugmentWithHashCompare.fs @@ -157,10 +157,10 @@ let mkCompareTestConjuncts g m exprs = (a, b) ||> List.foldBack (fun e acc -> let nv, ne = mkCompGenLocal m "n" g.int_ty mkCompGenLet m nv e - (mkCond DebugPointAtBinding.NoneAtSticky DebugPointForTarget.No m g.int_ty + (mkCond DebugPointAtBinding.NoneAtSticky DebugPointAtTarget.No m g.int_ty (mkClt g m ne (mkZero g m)) ne - (mkCond DebugPointAtBinding.NoneAtSticky DebugPointForTarget.No m g.int_ty + (mkCond DebugPointAtBinding.NoneAtSticky DebugPointAtTarget.No m g.int_ty (mkCgt g m ne (mkZero g m)) ne acc))) @@ -171,7 +171,7 @@ let mkEqualsTestConjuncts g m exprs = | [h] -> h | l -> let a, b = List.frontAndBack l - List.foldBack (fun e acc -> mkCond DebugPointAtBinding.NoneAtSticky DebugPointForTarget.No m g.bool_ty e acc (mkFalse g m)) a b + List.foldBack (fun e acc -> mkCond DebugPointAtBinding.NoneAtSticky DebugPointAtTarget.No m g.bool_ty e acc (mkFalse g m)) a b let mkMinimalTy (g: TcGlobals) (tcref: TyconRef) = if tcref.Deref.IsExceptionDecl then [], g.exn_ty @@ -303,9 +303,9 @@ let mkExnEquality (g: TcGlobals) exnref (exnc: Tycon) = let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m ) let cases = [ mkCase(DecisionTreeTest.IsInst(g.exn_ty, mkAppTy exnref []), - mbuilder.AddResultTarget(expr, DebugPointForTarget.No)) ] - let dflt = Some(mbuilder.AddResultTarget(mkFalse g m, DebugPointForTarget.No)) - let dtree = TDSwitch(thate, cases, dflt, m) + mbuilder.AddResultTarget(expr, DebugPointAtTarget.No)) ] + let dflt = Some(mbuilder.AddResultTarget(mkFalse g m, DebugPointAtTarget.No)) + let dtree = TDSwitch(DebugPointAtSwitch.No, thate, cases, dflt, m) mbuilder.Close(dtree, m, g.bool_ty) let expr = mkBindThatNullEquals g m thise thate expr @@ -326,9 +326,9 @@ let mkExnEqualityWithComparer g exnref (exnc: Tycon) (_thisv, thise) thatobje (t let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m ) let cases = [ mkCase(DecisionTreeTest.IsInst(g.exn_ty, mkAppTy exnref []), - mbuilder.AddResultTarget(expr, DebugPointForTarget.No)) ] - let dflt = mbuilder.AddResultTarget(mkFalse g m, DebugPointForTarget.No) - let dtree = TDSwitch(thate, cases, Some dflt, m) + mbuilder.AddResultTarget(expr, DebugPointAtTarget.No)) ] + let dflt = mbuilder.AddResultTarget(mkFalse g m, DebugPointAtTarget.No) + let dtree = TDSwitch(DebugPointAtSwitch.No, thate, cases, Some dflt, m) mbuilder.Close(dtree, m, g.bool_ty) let expr = mkBindThatAddr g m g.exn_ty thataddrv thatv thate expr let expr = mkIsInstConditional g m g.exn_ty thatobje thatv expr (mkFalse g m) @@ -366,19 +366,19 @@ let mkUnionCompare g tcref (tycon: Tycon) = mkCompGenLet m thisucv (mkUnionCaseProof (thise, cref, tinst, m)) (mkCompGenLet m thatucv (mkUnionCaseProof (thataddre, cref, tinst, m)) (mkCompareTestConjuncts g m (List.mapi (mkTest thisucve thatucve) rfields))) - Some (mkCase(DecisionTreeTest.UnionCase(cref, tinst), mbuilder.AddResultTarget(test, DebugPointForTarget.No))) + Some (mkCase(DecisionTreeTest.UnionCase(cref, tinst), mbuilder.AddResultTarget(test, DebugPointAtTarget.No))) let nullary, nonNullary = List.partition Option.isNone (List.map mkCase ucases) if isNil nonNullary then mkZero g m else let cases = nonNullary |> List.map (function Some c -> c | None -> failwith "mkUnionCompare") - let dflt = if isNil nullary then None else Some (mbuilder.AddResultTarget(mkZero g m, DebugPointForTarget.No)) - let dtree = TDSwitch(thise, cases, dflt, m) + let dflt = if isNil nullary then None else Some (mbuilder.AddResultTarget(mkZero g m, DebugPointAtTarget.No)) + let dtree = TDSwitch(DebugPointAtSwitch.No, thise, cases, dflt, m) mbuilder.Close(dtree, m, g.int_ty) let expr = if ucases.Length = 1 then expr else let tagsEqTested = - mkCond DebugPointAtBinding.NoneAtSticky DebugPointForTarget.No m g.int_ty + mkCond DebugPointAtBinding.NoneAtSticky DebugPointAtTarget.No m g.int_ty (mkILAsmCeq g m thistage thattage) expr (mkAsmExpr ([ AI_sub ], [], [thistage; thattage], [g.int_ty], m))in @@ -427,19 +427,19 @@ let mkUnionCompareWithComparer g tcref (tycon: Tycon) (_thisv, thise) (_thatobjv (mkCompGenLet m thatucv (mkUnionCaseProof (thataddre, cref, tinst, m)) (mkCompareTestConjuncts g m (List.mapi (mkTest thisucve thatucve) rfields))) - Some (mkCase(DecisionTreeTest.UnionCase(cref, tinst), mbuilder.AddResultTarget(test, DebugPointForTarget.No))) + Some (mkCase(DecisionTreeTest.UnionCase(cref, tinst), mbuilder.AddResultTarget(test, DebugPointAtTarget.No))) let nullary, nonNullary = List.partition Option.isNone (List.map mkCase ucases) if isNil nonNullary then mkZero g m else let cases = nonNullary |> List.map (function Some c -> c | None -> failwith "mkUnionCompare") - let dflt = if isNil nullary then None else Some (mbuilder.AddResultTarget(mkZero g m, DebugPointForTarget.No)) - let dtree = TDSwitch(thise, cases, dflt, m) + let dflt = if isNil nullary then None else Some (mbuilder.AddResultTarget(mkZero g m, DebugPointAtTarget.No)) + let dtree = TDSwitch(DebugPointAtSwitch.No, thise, cases, dflt, m) mbuilder.Close(dtree, m, g.int_ty) let expr = if ucases.Length = 1 then expr else let tagsEqTested = - mkCond DebugPointAtBinding.NoneAtSticky DebugPointForTarget.No m g.int_ty + mkCond DebugPointAtBinding.NoneAtSticky DebugPointAtTarget.No m g.int_ty (mkILAsmCeq g m thistage thattage) expr (mkAsmExpr ([ AI_sub ], [], [thistage; thattage], [g.int_ty], m)) @@ -487,19 +487,19 @@ let mkUnionEquality g tcref (tycon: Tycon) = (mkCompGenLet m thatucv (mkUnionCaseProof (thataddre, cref, tinst, m)) (mkEqualsTestConjuncts g m (List.mapi (mkTest thisucve thatucve) rfields))) - Some (mkCase(DecisionTreeTest.UnionCase(cref, tinst), mbuilder.AddResultTarget(test, DebugPointForTarget.No))) + Some (mkCase(DecisionTreeTest.UnionCase(cref, tinst), mbuilder.AddResultTarget(test, DebugPointAtTarget.No))) let nullary, nonNullary = List.partition Option.isNone (List.map mkCase ucases) if isNil nonNullary then mkTrue g m else let cases = List.map (function Some c -> c | None -> failwith "mkUnionEquality") nonNullary - let dflt = (if isNil nullary then None else Some (mbuilder.AddResultTarget(mkTrue g m, DebugPointForTarget.No))) - let dtree = TDSwitch(thise, cases, dflt, m) + let dflt = (if isNil nullary then None else Some (mbuilder.AddResultTarget(mkTrue g m, DebugPointAtTarget.No))) + let dtree = TDSwitch(DebugPointAtSwitch.No, thise, cases, dflt, m) mbuilder.Close(dtree, m, g.bool_ty) let expr = if ucases.Length = 1 then expr else let tagsEqTested = - mkCond DebugPointAtBinding.NoneAtSticky DebugPointForTarget.No m g.bool_ty + mkCond DebugPointAtBinding.NoneAtSticky DebugPointAtTarget.No m g.bool_ty (mkILAsmCeq g m thistage thattage) expr (mkFalse g m) @@ -549,19 +549,19 @@ let mkUnionEqualityWithComparer g tcref (tycon: Tycon) (_thisv, thise) thatobje (mkCompGenLet m thatucv (mkUnionCaseProof (thataddre, cref, tinst, m)) (mkEqualsTestConjuncts g m (List.mapi (mkTest thisucve thatucve) rfields))) - Some (mkCase(DecisionTreeTest.UnionCase(cref, tinst), mbuilder.AddResultTarget (test, DebugPointForTarget.No))) + Some (mkCase(DecisionTreeTest.UnionCase(cref, tinst), mbuilder.AddResultTarget (test, DebugPointAtTarget.No))) let nullary, nonNullary = List.partition Option.isNone (List.map mkCase ucases) if isNil nonNullary then mkTrue g m else let cases = List.map (function Some c -> c | None -> failwith "mkUnionEquality") nonNullary - let dflt = if isNil nullary then None else Some (mbuilder.AddResultTarget(mkTrue g m, DebugPointForTarget.No)) - let dtree = TDSwitch(thise, cases, dflt, m) + let dflt = if isNil nullary then None else Some (mbuilder.AddResultTarget(mkTrue g m, DebugPointAtTarget.No)) + let dtree = TDSwitch(DebugPointAtSwitch.No, thise, cases, dflt, m) mbuilder.Close(dtree, m, g.bool_ty) let expr = if ucases.Length = 1 then expr else let tagsEqTested = - mkCond DebugPointAtBinding.NoneAtSticky DebugPointForTarget.No m g.bool_ty + mkCond DebugPointAtBinding.NoneAtSticky DebugPointAtTarget.No m g.bool_ty (mkILAsmCeq g m thistage thattage) expr (mkFalse g m) @@ -648,7 +648,7 @@ let mkUnionHashWithComparer g tcref (tycon: Tycon) compe = (mkCompGenSequential m (mkValSet m (mkLocalValRef accv) (mkInt g m i)) (mkCombineHashGenerators g m (List.mapi (mkHash ucve) ucase1.RecdFields) (mkLocalValRef accv) acce)) - Some(mkCase(DecisionTreeTest.UnionCase(c1ref, tinst), mbuilder.AddResultTarget(test, DebugPointForTarget.No))) + Some(mkCase(DecisionTreeTest.UnionCase(c1ref, tinst), mbuilder.AddResultTarget(test, DebugPointAtTarget.No))) let nullary, nonNullary = ucases |> List.mapi mkCase @@ -657,8 +657,8 @@ let mkUnionHashWithComparer g tcref (tycon: Tycon) compe = let dflt = if isNil nullary then None else let tag = mkUnionCaseTagGetViaExprAddr (thise, tcref, tinst, m) - Some(mbuilder.AddResultTarget(tag, DebugPointForTarget.No)) - let dtree = TDSwitch(thise, cases, dflt, m) + Some(mbuilder.AddResultTarget(tag, DebugPointAtTarget.No)) + let dtree = TDSwitch(DebugPointAtSwitch.No, thise, cases, dflt, m) let stmt = mbuilder.Close(dtree, m, g.int_ty) let expr = mkCompGenLet m accv (mkZero g m) stmt let expr = if tycon.IsStructOrEnumTycon then expr else mkBindNullHash g m thise expr diff --git a/src/fsharp/CheckComputationExpressions.fs b/src/fsharp/CheckComputationExpressions.fs index e93ac847098..22a37e6417c 100644 --- a/src/fsharp/CheckComputationExpressions.fs +++ b/src/fsharp/CheckComputationExpressions.fs @@ -945,7 +945,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter Some (trans CompExprTranslationPass.Initial q varSpace innerComp (fun holeFill -> - translatedCtxt (mkSynCall "For" mFor [wrappedSourceExpr; SynExpr.MatchLambda (false, sourceExpr.Range, [SynMatchClause(pat, None, None, holeFill, mPat, DebugPointForTarget.Yes)], spBind, mFor) ])) ) + translatedCtxt (mkSynCall "For" mFor [wrappedSourceExpr; SynExpr.MatchLambda (false, sourceExpr.Range, [SynMatchClause(pat, None, None, holeFill, mPat, DebugPointAtTarget.Yes)], spBind, mFor) ])) ) | SynExpr.For (spBind, id, start, dir, finish, innerComp, m) -> let mFor = match spBind with DebugPointAtFor.Yes m -> m.NoteDebugPoint(RangeDebugPointKind.For) | _ -> m @@ -1119,7 +1119,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let bindRange = match spBind with DebugPointAtBinding.Yes m -> m | _ -> rhsExpr.Range if isQuery then error(Error(FSComp.SR.tcUseMayNotBeUsedInQueries(), bindRange)) let innerCompRange = innerComp.Range - let consumeExpr = SynExpr.MatchLambda(false, innerCompRange, [SynMatchClause(pat, None, None, transNoQueryOps innerComp, innerCompRange, DebugPointForTarget.Yes)], spBind, innerCompRange) + let consumeExpr = SynExpr.MatchLambda(false, innerCompRange, [SynMatchClause(pat, None, None, transNoQueryOps innerComp, innerCompRange, DebugPointAtTarget.Yes)], spBind, innerCompRange) if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env bindRange ad "Using" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("Using"), bindRange)) Some (translatedCtxt (mkSynCall "Using" bindRange [rhsExpr; consumeExpr ])) @@ -1155,9 +1155,9 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env bindRange ad "Bind" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("Bind"), bindRange)) - let consumeExpr = SynExpr.MatchLambda(false, bindRange, [SynMatchClause(pat, None, None, transNoQueryOps innerComp, innerComp.Range, DebugPointForTarget.Yes)], spBind, bindRange) + let consumeExpr = SynExpr.MatchLambda(false, bindRange, [SynMatchClause(pat, None, None, transNoQueryOps innerComp, innerComp.Range, DebugPointAtTarget.Yes)], spBind, bindRange) let consumeExpr = mkSynCall "Using" bindRange [SynExpr.Ident(id); consumeExpr ] - let consumeExpr = SynExpr.MatchLambda(false, bindRange, [SynMatchClause(pat, None, None, consumeExpr, id.idRange, DebugPointForTarget.Yes)], spBind, bindRange) + let consumeExpr = SynExpr.MatchLambda(false, bindRange, [SynMatchClause(pat, None, None, consumeExpr, id.idRange, DebugPointAtTarget.Yes)], spBind, bindRange) let rhsExpr = mkSourceExprConditional isFromSource rhsExpr // TODO: consider allowing translation to BindReturn Some(translatedCtxt (mkSynCall "Bind" bindRange [rhsExpr; consumeExpr])) @@ -1510,7 +1510,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter // Build the `BindReturn` call let dataCompPriorToOp = - let consumeExpr = SynExpr.MatchLambda(false, consumePat.Range, [SynMatchClause(consumePat, None, None, innerExpr, innerRange, DebugPointForTarget.Yes)], spBind, innerRange) + let consumeExpr = SynExpr.MatchLambda(false, consumePat.Range, [SynMatchClause(consumePat, None, None, innerExpr, innerRange, DebugPointAtTarget.Yes)], spBind, innerRange) translatedCtxt (mkSynCall bindName bindRange (bindArgs @ [consumeExpr])) match customOpInfo with @@ -1526,7 +1526,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter // Build the `Bind` call trans CompExprTranslationPass.Initial q varSpace innerComp (fun holeFill -> - let consumeExpr = SynExpr.MatchLambda(false, consumePat.Range, [SynMatchClause(consumePat, None, None, holeFill, innerRange, DebugPointForTarget.Yes)], spBind, innerRange) + let consumeExpr = SynExpr.MatchLambda(false, consumePat.Range, [SynMatchClause(consumePat, None, None, holeFill, innerRange, DebugPointAtTarget.Yes)], spBind, innerRange) translatedCtxt (mkSynCall bindName bindRange (bindArgs @ [consumeExpr]))) and convertSimpleReturnToExpr varSpace innerComp = @@ -1692,7 +1692,7 @@ let mkSeqFinally (cenv: cenv) env m genTy e1 e2 = mkCallSeqFinally cenv.g m genResultTy e1 e2 let mkSeqExprMatchClauses (pat', vspecs) innerExpr = - [TClause(pat', None, TTarget(vspecs, innerExpr, DebugPointForTarget.Yes, None), pat'.Range) ] + [TClause(pat', None, TTarget(vspecs, innerExpr, DebugPointAtTarget.Yes, None), pat'.Range) ] let compileSeqExprMatchClauses (cenv: cenv) env inputExprMark (pat: Pattern, vspecs) innerExpr inputExprOpt bindPatTy genInnerTy = let patMark = pat.Range @@ -1828,7 +1828,7 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m = let thenExpr, tpenv = tcSequenceExprBody env genOuterTy tpenv thenComp let elseComp = (match elseCompOpt with Some c -> c | None -> SynExpr.ImplicitZero mIfToThen) let elseExpr, tpenv = tcSequenceExprBody env genOuterTy tpenv elseComp - Some(mkCond spIfToThen DebugPointForTarget.Yes mIfToEndOfElseBranch genOuterTy guardExpr' thenExpr elseExpr, tpenv) + Some(mkCond spIfToThen DebugPointAtTarget.Yes mIfToEndOfElseBranch genOuterTy guardExpr' thenExpr elseExpr, tpenv) // 'let x = expr in expr' | SynExpr.LetOrUse (_, false (* not a 'use' binding *), _, _, _) -> diff --git a/src/fsharp/CheckExpressions.fs b/src/fsharp/CheckExpressions.fs index 0604513be52..eb0ebc16028 100644 --- a/src/fsharp/CheckExpressions.fs +++ b/src/fsharp/CheckExpressions.fs @@ -3449,7 +3449,7 @@ let EliminateInitializationGraphs and CheckBinding st (TBind(_, e, _)) = CheckExpr st e and CheckDecisionTree st = function - | TDSwitch(e1, csl, dflt, _) -> CheckExpr st e1; List.iter (fun (TCase(_, d)) -> CheckDecisionTree st d) csl; Option.iter (CheckDecisionTree st) dflt + | TDSwitch(_, e1, csl, dflt, _) -> CheckExpr st e1; List.iter (fun (TCase(_, d)) -> CheckDecisionTree st d) csl; Option.iter (CheckDecisionTree st) dflt | TDSuccess (es, _) -> es |> List.iter (CheckExpr st) | TDBind(bind, e) -> CheckBinding st bind; CheckDecisionTree st e @@ -5838,7 +5838,7 @@ and TcExprUndelayed cenv (overallTy: OverallTy) env tpenv (synExpr: SynExpr) = synWithClauses |> List.map (fun clause -> let (SynMatchClause(pat, optWhenExpr, arrow, _, m, _)) = clause let oneExpr = SynExpr.Const (SynConst.Int32 1, m) - SynMatchClause(pat, optWhenExpr, arrow, oneExpr, m, DebugPointForTarget.No)) + SynMatchClause(pat, optWhenExpr, arrow, oneExpr, m, DebugPointAtTarget.No)) let checkedFilterClauses, tpenv = TcMatchClauses cenv cenv.g.exn_ty (MustEqual cenv.g.int_ty) env tpenv filterClauses let checkedHandlerClauses, tpenv = TcMatchClauses cenv cenv.g.exn_ty overallTy env tpenv synWithClauses let v1, filterExpr = CompilePatternForMatchClauses cenv env mWithToLast mWithToLast true FailFilter None cenv.g.exn_ty cenv.g.int_ty checkedFilterClauses @@ -7396,7 +7396,7 @@ and TcForEachExpr cenv overallTy env tpenv (pat, enumSynExpr, bodySynExpr, mWhol let valsDefinedByMatching = ListSet.remove valEq elemVar vspecs CompilePatternForMatch cenv env enumSynExpr.Range pat.Range false IgnoreWithWarning (elemVar, [], None) - [TClause(pat, None, TTarget(valsDefinedByMatching, bodyExpr, DebugPointForTarget.Yes, None), mForLoopStart)] + [TClause(pat, None, TTarget(valsDefinedByMatching, bodyExpr, DebugPointAtTarget.Yes, None), mForLoopStart)] enumElemTy overallTy.Commit @@ -9352,15 +9352,15 @@ and TcLinearExprs bodyChecker cenv env overallTy tpenv isCompExpr expr cont = match synElseExprOpt with | None -> let elseExpr = mkUnit cenv.g mIfToThen - let spElse = DebugPointForTarget.No // the fake 'unit' value gets exactly the same range as spIfToThen - let overallExpr = primMkCond spIfToThen DebugPointForTarget.Yes spElse m overallTy.Commit boolExpr thenExpr elseExpr + let spElse = DebugPointAtTarget.No // the fake 'unit' value gets exactly the same range as spIfToThen + let overallExpr = primMkCond spIfToThen DebugPointAtTarget.Yes spElse m overallTy.Commit boolExpr thenExpr elseExpr cont (overallExpr, tpenv) | Some synElseExpr -> let env = { env with eContextInfo = ContextInfo.ElseBranchResult synElseExpr.Range } // tailcall TcLinearExprs bodyChecker cenv env overallTy tpenv isCompExpr synElseExpr (fun (elseExpr, tpenv) -> - let resExpr = primMkCond spIfToThen DebugPointForTarget.Yes DebugPointForTarget.Yes m overallTy.Commit boolExpr thenExpr elseExpr + let resExpr = primMkCond spIfToThen DebugPointAtTarget.Yes DebugPointAtTarget.Yes m overallTy.Commit boolExpr thenExpr elseExpr cont (resExpr, tpenv)) | _ -> @@ -9376,14 +9376,14 @@ and TcMatchPattern cenv inputTy env tpenv (pat: SynPat, optWhenExpr: SynExpr opt let m = pat.Range let patf', (tpenv, names, _) = TcPat WarnOnUpperCase cenv env None (ValInline.Optional, permitInferTypars, noArgOrRetAttribs, false, None, false) (tpenv, Map.empty, Set.empty) inputTy pat let envinner, values, vspecMap = MakeAndPublishSimpleValsForMergedScope cenv env m names - let optWhenExpr', tpenv = + let optWhenExprR, tpenv = match optWhenExpr with | Some whenExpr -> let guardEnv = { envinner with eContextInfo = ContextInfo.PatternMatchGuard whenExpr.Range } - let whenExpr', tpenv = TcExpr cenv (MustEqual cenv.g.bool_ty) guardEnv tpenv whenExpr - Some whenExpr', tpenv + let whenExprR, tpenv = TcExpr cenv (MustEqual cenv.g.bool_ty) guardEnv tpenv whenExpr + Some whenExprR, tpenv | None -> None, tpenv - patf' (TcPatPhase2Input (values, true)), optWhenExpr', NameMap.range vspecMap, envinner, tpenv + patf' (TcPatPhase2Input (values, true)), optWhenExprR, NameMap.range vspecMap, envinner, tpenv and TcMatchClauses cenv inputTy (resultTy: OverallTy) env tpenv clauses = let mutable first = true @@ -9392,10 +9392,10 @@ and TcMatchClauses cenv inputTy (resultTy: OverallTy) env tpenv clauses = and TcMatchClause cenv inputTy (resultTy: OverallTy) env isFirst tpenv synMatchClause = let (SynMatchClause(pat, optWhenExpr, _, e, patm, spTgt)) = synMatchClause - let pat', optWhenExpr', vspecs, envinner, tpenv = TcMatchPattern cenv inputTy env tpenv (pat, optWhenExpr) + let pat', optWhenExprR, vspecs, envinner, tpenv = TcMatchPattern cenv inputTy env tpenv (pat, optWhenExpr) let resultEnv = if isFirst then envinner else { envinner with eContextInfo = ContextInfo.FollowingPatternMatchClause e.Range } let e', tpenv = TcExprThatCanBeCtorBody cenv resultTy resultEnv tpenv e - TClause(pat', optWhenExpr', TTarget(vspecs, e', spTgt, None), patm), tpenv + TClause(pat', optWhenExprR, TTarget(vspecs, e', spTgt, None), patm), tpenv and TcStaticOptimizationConstraint cenv env tpenv c = match c with @@ -10079,7 +10079,7 @@ and TcLetBinding cenv isUse env containerInfo declKind tpenv (synBinds, synBinds // Add the compilation of the pattern to the bodyExpr we get from mkCleanup let mkPatBind (bodyExpr, bodyExprTy) = let valsDefinedByMatching = ListSet.remove valEq patternInputTmp allValsDefinedByPattern - let clauses = [TClause(checkedPat2, None, TTarget(valsDefinedByMatching, bodyExpr, DebugPointForTarget.No, None), m)] + let clauses = [TClause(checkedPat2, None, TTarget(valsDefinedByMatching, bodyExpr, DebugPointAtTarget.No, None), m)] let matchx = CompilePatternForMatch cenv env m m true ThrowIncompleteMatchException (patternInputTmp, generalizedTypars, Some rhsExpr) clauses tauTy bodyExprTy let matchx = if (DeclKind.ConvertToLinearBindings declKind) then LinearizeTopMatch cenv.g altActualParent matchx else matchx matchx, bodyExprTy diff --git a/src/fsharp/FindUnsolved.fs b/src/fsharp/FindUnsolved.fs index a4d284e879a..35b9724b348 100644 --- a/src/fsharp/FindUnsolved.fs +++ b/src/fsharp/FindUnsolved.fs @@ -177,7 +177,7 @@ and accDTree cenv env x = match x with | TDSuccess (es, _n) -> accExprs cenv env es | TDBind(bind, rest) -> accBind cenv env bind; accDTree cenv env rest - | TDSwitch (e, cases, dflt, m) -> accSwitch cenv env (e, cases, dflt, m) + | TDSwitch (_, e, cases, dflt, m) -> accSwitch cenv env (e, cases, dflt, m) and accSwitch cenv env (e, cases, dflt, _m) = accExpr cenv env e diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index e1cd687dee8..974e3457b70 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -1852,13 +1852,13 @@ type CodeGenBuffer(m: range, | true, l -> lab2pc (n + 1) l | _ -> codeLabelToPC.[lbl] - let mutable lastSeqPoint = None + let mutable lastDebugPoint = None - // Add a nop to make way for the first sequence point. + // Add a nop to make way for the first debug point. do if mgbuf.cenv.opts.generateDebugSymbols then let doc = g.memoize_file m.FileIndex let i = FeeFeeInstr mgbuf.cenv doc - codebuf.Add i // for the FeeFee or a better sequence point + codebuf.Add i // for the FeeFee or a better debug point member _.DoPushes (pushes: Pushes) = for ty in pushes do @@ -1898,10 +1898,10 @@ type CodeGenBuffer(m: range, is |> List.iter codebuf.Add member _.GetLastDebugPoint() = - lastSeqPoint + lastDebugPoint member private _.EnsureNopBetweenDebugPoints() = - // Always add a nop between sequence points to help .NET get the stepping right + // Always add a nop between debug points to help .NET get the stepping right // Don't do this after a FeeFee marker for hidden code if (codebuf.Count > 0 && (match codebuf.[codebuf.Count-1] with @@ -1910,23 +1910,27 @@ type CodeGenBuffer(m: range, codebuf.Add(AI_nop) - member cgbuf.EmitSeqPoint src = + member cgbuf.EmitDebugPoint src = if mgbuf.cenv.opts.generateDebugSymbols then let attr = GenILSourceMarker g src let i = I_seqpoint attr hasDebugPoints <- true - // Replace the FeeFee seqpoint at the entry with a better sequence point - if codebuf.Count = 1 then - assert (match codebuf.[0] with I_seqpoint _ -> true | _ -> false) - codebuf.[0] <- i + // Replace a FeeFee seqpoint with a better debug point + let n = codebuf.Count + let isSingleFeeFee = + match codebuf.[n-1] with + | I_seqpoint sm -> (sm.Line = FeeFee mgbuf.cenv) + | _ -> false + if isSingleFeeFee then + codebuf.[n-1] <- i else cgbuf.EnsureNopBetweenDebugPoints() codebuf.Add i - // Save the last sequence point away so we can make a decision graph look consistent (i.e. reassert the sequence point at each target) - lastSeqPoint <- Some src + // Save the last debug point away so we can make a decision graph look consistent (i.e. reassert the debug point at each target) + lastDebugPoint <- Some src anyDocument <- Some attr.Document // Emit FeeFee breakpoints for hidden code, see https://blogs.msdn.microsoft.com/jmstall/2005/06/19/line-hidden-and-0xfeefee-sequence-points/ @@ -1937,9 +1941,13 @@ type CodeGenBuffer(m: range, hasDebugPoints <- true // don't emit just after another FeeFee - match codebuf.[codebuf.Count-1] with - | I_seqpoint sm when sm.Line = FeeFee mgbuf.cenv -> () - | _ -> + let n = codebuf.Count + let isSingleFeeFee = + match codebuf.[n-1] with + | I_seqpoint sm -> (sm.Line = FeeFee mgbuf.cenv) + | _ -> false + + if not isSingleFeeFee then cgbuf.EnsureNopBetweenDebugPoints() codebuf.Add i @@ -2017,11 +2025,11 @@ type CodeGenBuffer(m: range, let instrs = codebuf.ToArray() - // Fixup the first instruction to be a FeeFee sequence point if needed + // Fixup the first instruction to be a FeeFee debug point if needed let instrs = instrs |> Array.mapi (fun idx i2 -> if idx = 0 && (match i2 with AI_nop -> true | _ -> false) && anyDocument.IsSome then - // This special dummy sequence point says skip the start of the method + // This special dummy debug point says skip the start of the method hasDebugPoints <- true FeeFeeInstr mgbuf.cenv anyDocument.Value else @@ -2038,7 +2046,7 @@ type CodeGenBuffer(m: range, module CG = let EmitInstr (cgbuf: CodeGenBuffer) pops pushes i = cgbuf.EmitInstr(pops, pushes, i) let EmitInstrs (cgbuf: CodeGenBuffer) pops pushes is = cgbuf.EmitInstrs(pops, pushes, is) - let EmitSeqPoint (cgbuf: CodeGenBuffer) src = cgbuf.EmitSeqPoint src + let EmitDebugPoint (cgbuf: CodeGenBuffer) src = cgbuf.EmitDebugPoint src let GenerateDelayMark (cgbuf: CodeGenBuffer) nm = cgbuf.GenerateDelayMark nm let SetMark (cgbuf: CodeGenBuffer) m1 m2 = cgbuf.SetMark(m1, m2) let SetMarkToHere (cgbuf: CodeGenBuffer) m1 = cgbuf.SetMarkToHere m1 @@ -2137,8 +2145,8 @@ let CodeGenMethod cenv mgbuf (entryPointInfo, methodName, eenv, alreadyUsedArgs, let code = buildILCode methodName lab2pc instrs exns localDebugSpecs - // Attach a source range to the method. Only do this is it has some sequence points, because .NET 2.0/3.5 - // ILDASM has issues if you emit symbols with a source range but without any sequence points + // Attach a source range to the method. Only do this is it has some debug points, because .NET 2.0/3.5 + // ILDASM has issues if you emit symbols with a source range but without any debug points let sourceRange = if hasDebugPoints then GenPossibleILSourceMarker cenv m else None // The old union erasure phase increased maxstack by 2 since the code pushes some items, we do the same here @@ -2171,18 +2179,18 @@ let compileStateMachineExpressions = true // try (System.Environment.GetEnvironm //------------------------------------------------------------------------- type EmitDebugPointState = - /// Indicates that we need a sequence point at first opportunity. Used on entrance to a method + /// Indicates that we need a debug point at first opportunity. Used on entrance to a method /// and whenever we drop into an expression within the stepping control structure. | SPAlways - /// Indicates we are not forced to emit a sequence point + /// Indicates we are not forced to emit a debug point | SPSuppress /// Determines if any code at all will be emitted for a binding let BindingEmitsNoCode g (b: Binding) = IsFSharpValCompiledAsMethod g b.Var -/// Determines what sequence point should be emitted when generating the r.h.s of a binding. -/// For example, if the r.h.s is a lambda then no sequence point is emitted. +/// Determines what debug point should be emitted when generating the r.h.s of a binding. +/// For example, if the r.h.s is a lambda then no debug point is emitted. /// /// Returns (isSticky, sequencePointForBind, sequencePointGenerationFlagForRhsOfBind) let ComputeDebugPointForBinding g (TBind(_, e, spBind) as bind) = @@ -2194,13 +2202,13 @@ let ComputeDebugPointForBinding g (TBind(_, e, spBind) as bind) = | DebugPointAtBinding.NoneAtSticky, _ -> true, None, SPSuppress | DebugPointAtBinding.NoneAtDo, _ -> false, None, SPAlways | DebugPointAtBinding.NoneAtLet, _ -> false, None, SPSuppress - // Don't emit sequence points for lambdas. + // Don't emit debug points for lambdas. // SEQUENCE POINT REVIEW: don't emit for lazy either, nor any builder expressions, nor interface-implementing object expressions | _, (Expr.Lambda _ | Expr.TyLambda _) -> false, None, SPSuppress | DebugPointAtBinding.Yes m, _ -> false, Some m, SPSuppress -/// Determines if a sequence will be emitted when we generate the code for a binding. +/// Determines if a debug point will be emitted when we generate the code for a binding. /// /// False for Lambdas, BindingEmitsNoCode, DebugPointAtBinding.NoneAtSticky, DebugPointAtBinding.NoneAtInvisible, and DebugPointAtBinding.NoneAtLet. /// True for DebugPointAtBinding.Yes, DebugPointAtBinding.NoneAtDo. @@ -2220,8 +2228,8 @@ let BindingEmitsHiddenCode (TBind(_, e, spBind)) = | _, (Expr.Lambda _ | Expr.TyLambda _) -> true | _ -> false -/// Determines if generating the code for a compound expression will emit a sequence point as the first instruction -/// through the processing of the constituent parts. Used to prevent the generation of sequence points for +/// Determines if generating the code for a compound expression will emit a debug point as the first instruction +/// through the processing of the constituent parts. Used to prevent the generation of debug points for /// compound expressions. let rec FirstEmittedCodeWillBeDebugPoint g sp expr = match sp with @@ -2247,6 +2255,7 @@ let rec FirstEmittedCodeWillBeDebugPoint g sp expr = | DebugPointAtSequential.SuppressStmt -> FirstEmittedCodeWillBeDebugPoint g sp expr1 | DebugPointAtSequential.SuppressBoth -> false | Expr.Match (DebugPointAtBinding.Yes _, _, _, _, _, _) -> true + | Expr.Match (_, _, TDSwitch(DebugPointAtSwitch.Yes _, _, _, _, _), _, _, _) -> true | Expr.Op ((TOp.TryWith (DebugPointAtTry.Yes _, _) | TOp.TryFinally (DebugPointAtTry.Yes _, _) | TOp.For (DebugPointAtFor.Yes _, _) @@ -2256,7 +2265,7 @@ let rec FirstEmittedCodeWillBeDebugPoint g sp expr = | SPSuppress -> false -/// Suppress sequence points for some compound expressions - though not all - even if "SPAlways" is set. +/// Suppress debug points for some compound expressions - though not all - even if "SPAlways" is set. /// /// Note this is only used when FirstEmittedCodeWillBeDebugPoint is false. let EmitDebugPointForWholeExpr g sp expr = @@ -2265,44 +2274,48 @@ let EmitDebugPointForWholeExpr g sp expr = | SPAlways -> match stripExpr expr with - // In some cases, we emit sequence points for the 'whole' of a 'let' expression. + // In some cases, we emit debug points for the 'whole' of a 'let' expression. // Specifically, when - // + SPAlways (i.e. a sequence point is required as soon as meaningful) + // + SPAlways (i.e. a debug point is required as soon as meaningful) // + binding is DebugPointAtBinding.NoneAtSticky, or DebugPointAtBinding.NoneAtLet. // + not FirstEmittedCodeWillBeDebugPoint // For example if we start with // let someCode () = f x // and by inlining 'f' the expression becomes // let someCode () = (let sticky = x in y) - // then we place the sequence point for the whole TAST expression 'let sticky = x in y', i.e. textual range 'f x' in the source code, but + // then we place the debug point for the whole TAST expression 'let sticky = x in y', i.e. textual range 'f x' in the source code, but // _before_ the evaluation of 'x'. This will only happen for sticky 'let' introduced by inlining and other code generation // steps. We do _not_ do this for 'invisible' let which can be skipped. | Expr.Let (bind, _, _, _) when BindingIsInvisible bind -> false | Expr.LetRec (binds, _, _, _) when binds |> List.forall BindingIsInvisible -> false - // If the binding is a lambda then we don't emit a sequence point. + // If the binding is a lambda then we don't emit a debug point. | Expr.Let (bind, _, _, _) when BindingEmitsHiddenCode bind -> false | Expr.LetRec (binds, _, _, _) when binds |> List.forall BindingEmitsHiddenCode -> false - // If the binding is represented by a top-level generated constant value then we don't emit a sequence point. + // If the binding is represented by a top-level generated constant value then we don't emit a debug point. | Expr.Let (bind, _, _, _) when BindingEmitsNoCode g bind -> false | Expr.LetRec (binds, _, _, _) when binds |> List.forall (BindingEmitsNoCode g) -> false - // Suppress sequence points for the whole 'a;b' and do it at 'a' instead. + // Suppress debug points for the whole 'a;b' and do it at 'a' instead. | Expr.Sequential _ -> false - // Suppress sequence points at labels and gotos, it makes no sense to emit sequence points at these. We emit FeeFee instead + // Suppress debug points at labels and gotos, it makes no sense to emit debug points at these. We emit FeeFee instead | Expr.Op (TOp.Label _, _, _, _) -> false | Expr.Op (TOp.Goto _, _, _, _) -> false - // We always suppress at the whole 'match'/'try'/... expression because we do it at the individual parts. + // We suppress at 'match' with DebugPointAtBinding.NoneAtInvisible because + // it is the result of a typical 'match' compilation. For example, + // match expr with + // becomes + // let tmp = expr // generates a debug point, BEFORE tmp is evaluated + // match tmp with // a match marked with DebugPointAtBinding.NoneAtInvisible + // // decision tree accessing 'tmp' + // + // So since the 'let tmp = expr' has a debug point, then no debug point is needed for the 'match'. // - // These cases need documenting. For example, a typical 'match' gets compiled to - // let tmp = expr // generates a sequence point, BEFORE tmp is evaluated - // match tmp with // a match marked with NoDebugPointAtInvisibleLetBinding - // So since the 'let tmp = expr' has a sequence point, then no sequence point is needed for the 'match'. But the processing - // of the 'let' requests SPAlways for the body. - | Expr.Match _ -> false + // Code 'a && b' and 'a || b' gets compiled to match with DebugPointAtBinding.NoneAtSticky + | Expr.Match (DebugPointAtBinding.NoneAtInvisible, _, _, _, _, _) -> false | Expr.Op (TOp.TryWith _, _, _, _) -> false | Expr.Op (TOp.TryFinally _, _, _, _) -> false | Expr.Op (TOp.For _, _, _, _) -> false @@ -2342,7 +2355,7 @@ let rec RangeOfDebugPointForWholeExpr g expr = | Expr.Sequential (expr1, _, NormalSeq, _, _) -> RangeOfDebugPointForWholeExpr g expr1 | _ -> expr.Range -/// Used to avoid emitting multiple sequence points in decision tree generation +/// Used to avoid emitting multiple debug points in decision tree generation let DoesGenExprStartWithDebugPoint g sp expr = FirstEmittedCodeWillBeDebugPoint g sp expr || EmitDebugPointForWholeExpr g sp expr @@ -2351,7 +2364,7 @@ let ProcessDebugPointForExpr (cenv: cenv) (cgbuf: CodeGenBuffer) sp expr = let g = cenv.g if not (FirstEmittedCodeWillBeDebugPoint g sp expr) then if EmitDebugPointForWholeExpr g sp expr then - CG.EmitSeqPoint cgbuf (RangeOfDebugPointForWholeExpr g expr) + CG.EmitDebugPoint cgbuf (RangeOfDebugPointForWholeExpr g expr) elif EmitHiddenCodeMarkerForWholeExpr g sp expr then cgbuf.EmitStartOfHiddenCode() @@ -2659,12 +2672,14 @@ and GenSequel cenv cloc cgbuf sequel = | EndLocalScope _ -> failwith "EndLocalScope unexpected" | Br x -> // Emit a NOP in debug code in case the branch instruction gets eliminated - // because it is a "branch to next instruction". This prevents two unrelated sequence points + // because it is a "branch to next instruction". This prevents two unrelated debug points // (the one before the branch and the one after) being coalesced together if cgbuf.mgbuf.cenv.opts.generateDebugSymbols then cgbuf.EmitStartOfHiddenCode() CG.EmitInstr cgbuf (pop 0) Push0 AI_nop + CG.EmitInstr cgbuf (pop 0) Push0 (I_br x.CodeLabel) + | LeaveHandler (isFinally, whereToSaveResultOpt, afterHandler, hasResult) -> if hasResult then if isFinally then @@ -2676,6 +2691,7 @@ and GenSequel cenv cloc cgbuf sequel = | Some (whereToSaveResult, _) -> EmitSetLocal cgbuf whereToSaveResult CG.EmitInstr cgbuf (pop 0) Push0 (if isFinally then I_endfinally else I_leave(afterHandler.CodeLabel)) + | EndFilter -> CG.EmitInstr cgbuf (pop 1) Push0 I_endfilter ) @@ -2816,7 +2832,7 @@ and GenLinearExpr cenv cgbuf eenv sp expr sequel preSteps (contf: FakeUnit -> Fa // Process the debug point and see if there's a replacement technique to process this expression if preSteps && GenExprPreSteps cenv cgbuf eenv sp expr sequel then contf Fake else - // Compiler generated sequential executions result in suppressions of sequence points on both + // Compiler generated sequential executions result in suppressions of debug points on both // left and right of the sequence let spStmt, spExpr = (match spSeq with @@ -2846,15 +2862,15 @@ and GenLinearExpr cenv cgbuf eenv sp expr sequel preSteps (contf: FakeUnit -> Fa if preSteps && GenExprPreSteps cenv cgbuf eenv sp expr sequel then contf Fake else // This case implemented here to get a guaranteed tailcall - // Make sure we generate the sequence point outside the scope of the variable + // Make sure we generate the debug point outside the scope of the variable let startScope, endScope as scopeMarks = StartDelayedLocalScope "let" cgbuf let eenv = AllocStorageForBind cenv cgbuf scopeMarks eenv bind let spBind = GenDebugPointForBind cenv cgbuf bind GenBindingAfterDebugPoint cenv cgbuf eenv spBind bind false (Some startScope) - // Work out if we need a sequence point for the body. For any "user" binding then the body gets SPAlways. + // Work out if we need a debug point for the body. For any "user" binding then the body gets SPAlways. // For invisible compiler-generated bindings we just use "sp", unless its body is another invisible binding - // For sticky bindings arising from inlining we suppress any immediate sequence point in the body + // For sticky bindings arising from inlining we suppress any immediate debug point in the body let spBody = match bind.DebugPoint with | DebugPointAtBinding.Yes _ @@ -2871,26 +2887,12 @@ and GenLinearExpr cenv cgbuf eenv sp expr sequel preSteps (contf: FakeUnit -> Fa if preSteps && GenExprPreSteps cenv cgbuf eenv sp expr sequel then contf Fake else match spBind with - | DebugPointAtBinding.Yes m -> CG.EmitSeqPoint cgbuf m + | DebugPointAtBinding.Yes m -> CG.EmitDebugPoint cgbuf m | DebugPointAtBinding.NoneAtDo | DebugPointAtBinding.NoneAtLet | DebugPointAtBinding.NoneAtInvisible | DebugPointAtBinding.NoneAtSticky -> () - // The target of branch needs a sequence point. - // If we don't give it one it will get entirely the wrong sequence point depending on earlier codegen - // Note we're not interested in having pattern matching and decision trees reveal their inner working. - // Hence at each branch target we 'reassert' the overall sequence point that was active as we came into the match. - // - // NOTE: sadly this causes multiple sequence points to appear for the "initial" location of an if/then/else or match. - let activeSP = cgbuf.GetLastDebugPoint() - let repeatSP() = - match activeSP with - | None -> () - | Some src -> - if activeSP <> cgbuf.GetLastDebugPoint() then - CG.EmitSeqPoint cgbuf src - // First try the common cases where we don't need a join point. match tree with | TDSuccess _ -> @@ -2905,7 +2907,7 @@ and GenLinearExpr cenv cgbuf eenv sp expr sequel preSteps (contf: FakeUnit -> Fa // match-testing (dtrees) should not contribute to the stack. // Each branch-RHS (targets) may contribute to the stack, leaving it in the "stackAfterJoin" state, for the join point. // Since code is branching and joining, the cgbuf stack is maintained manually. - GenDecisionTreeAndTargets cenv cgbuf stackAtTargets eenv tree targets repeatSP sequelOnBranches (contf << (fun Fake -> + GenDecisionTreeAndTargets cenv cgbuf stackAtTargets eenv tree targets sequelOnBranches (contf << (fun Fake -> CG.SetMarkToHere cgbuf afterJoin //assert(cgbuf.GetCurrentStack() = stackAfterJoin) // REVIEW: Since gen_dtree* now sets stack, stack should be stackAfterJoin at this point... @@ -3816,7 +3818,7 @@ and GenTry cenv cgbuf eenv scopeMarks (e1, m, resultTy, spTry) = let g = cenv.g let sp = match spTry with - | DebugPointAtTry.Yes m -> CG.EmitSeqPoint cgbuf m; SPAlways + | DebugPointAtTry.Yes m -> CG.EmitDebugPoint cgbuf m; SPAlways | DebugPointAtTry.Body -> SPAlways | DebugPointAtTry.No -> SPSuppress @@ -3843,10 +3845,10 @@ and GenTry cenv cgbuf eenv scopeMarks (e1, m, resultTy, spTry) = let exitSequel = LeaveHandler (false, whereToSaveOpt, afterHandler, true) let eenvinner = {eenvinner with withinSEH = true; exitSequel = exitSequel} - // Generate the body of the try. In the normal case (DebugPointAtTry.Yes) we generate a sequence point + // Generate the body of the try. In the normal case (DebugPointAtTry.Yes) we generate a debug point // both on the 'try' keyword and on the start of the expression in the 'try'. For inlined code and // compiler generated 'try' blocks (i.e. DebugPointAtTry.No, used for the try/finally implicit - // in a 'use' or 'foreach'), we suppress the sequence point + // in a 'use' or 'foreach'), we suppress the debug point GenExpr cenv cgbuf eenvinner sp e1 exitSequel CG.SetMarkToHere cgbuf endTryMark let tryMarks = (startTryMark.CodeLabel, endTryMark.CodeLabel) @@ -3868,17 +3870,17 @@ and GenTryWith cenv cgbuf eenv (e1, vf: Val, ef, vh: Val, eh, m, resty, spTry, s let afterFilter = CG.GenerateDelayMark cgbuf "afterFilter" let sequelOnBranches, afterJoin, stackAfterJoin, sequelAfterJoin = GenJoinPoint cenv cgbuf "filter" eenv g.int_ty m EndFilter let eenvinner = { eenvinner with exitSequel = sequelOnBranches } - // We emit the sequence point for the 'with' keyword span on the start of the filter + // We emit the debug point for the 'with' keyword span on the start of the filter // block. However the targets of the filter block pattern matching should not get any - // sequence points (they will be 'true'/'false' values indicating if the exception has been + // debug points (they will be 'true'/'false' values indicating if the exception has been // caught or not). // - // The targets of the handler block DO get sequence points. Thus the expected behaviour + // The targets of the handler block DO get debug points. Thus the expected behaviour // for a try/with with a complex pattern is that we hit the "with" before the filter is run // and then jump to the handler for the successful catch (or continue with exception handling // if the filter fails) match spWith with - | DebugPointAtWith.Yes m -> CG.EmitSeqPoint cgbuf m + | DebugPointAtWith.Yes m -> CG.EmitDebugPoint cgbuf m | DebugPointAtWith.No -> () @@ -3888,7 +3890,7 @@ and GenTryWith cenv cgbuf eenv (e1, vf: Val, ef, vh: Val, eh, m, resty, spTry, s GenStoreVal cenv cgbuf eenvinner vf.Range vf - // Why SPSuppress? Because we do not emit a sequence point at the start of the List.filter - we've already put one on + // Why SPSuppress? Because we do not emit a debug point at the start of the List.filter - we've already put one on // the 'with' keyword above GenExpr cenv cgbuf eenvinner SPSuppress ef sequelOnBranches CG.SetMarkToHere cgbuf afterJoin @@ -3915,7 +3917,7 @@ and GenTryWith cenv cgbuf eenv (e1, vf: Val, ef, vh: Val, eh, m, resty, spTry, s let startOfHandler = CG.GenerateMark cgbuf "startOfHandler" match spWith with - | DebugPointAtWith.Yes m -> CG.EmitSeqPoint cgbuf m + | DebugPointAtWith.Yes m -> CG.EmitDebugPoint cgbuf m | DebugPointAtWith.No -> () CG.SetStack cgbuf [g.ilg.typ_Object] @@ -3941,8 +3943,8 @@ and GenTryWith cenv cgbuf eenv (e1, vf: Val, ef, vh: Val, eh, m, resty, spTry, s cgbuf.EmitStartOfHiddenCode() - (* Restore the stack and load the result *) - EmitRestoreStack cgbuf stack (* RESTORE *) + // Restore the stack and load the result + EmitRestoreStack cgbuf stack match whereToSaveOpt with | Some (whereToSave, ilResultTy) -> @@ -3966,7 +3968,7 @@ and GenTryFinally cenv cgbuf eenv (bodyExpr, handlerExpr, m, resty, spTry, spFin let sp = match spFinally with - | DebugPointAtFinally.Yes m -> CG.EmitSeqPoint cgbuf m; SPAlways + | DebugPointAtFinally.Yes m -> CG.EmitDebugPoint cgbuf m; SPAlways | DebugPointAtFinally.Body -> SPAlways | DebugPointAtFinally.No -> SPSuppress @@ -4029,7 +4031,7 @@ and GenForLoop cenv cgbuf eenv (spFor, v, e1, dir, e2, loopBody, m) sequel = let _, eenvinner = AllocLocalVal cenv cgbuf v eenvinner None (start, finish) match spFor with - | DebugPointAtFor.Yes spStart -> CG.EmitSeqPoint cgbuf spStart + | DebugPointAtFor.Yes spStart -> CG.EmitDebugPoint cgbuf spStart | DebugPointAtFor.No -> () GenExpr cenv cgbuf eenv SPSuppress e1 Continue @@ -4062,8 +4064,8 @@ and GenForLoop cenv cgbuf eenv (spFor, v, e1, dir, e2, loopBody, m) sequel = // FSharpForLoopDown: if v <> e2 - 1 then goto .inner // CSharpStyle: if v < e2 then goto .inner match spFor with - | DebugPointAtFor.Yes spStart -> CG.EmitSeqPoint cgbuf spStart - | DebugPointAtFor.No -> () //CG.EmitSeqPoint cgbuf e2.Range + | DebugPointAtFor.Yes spStart -> CG.EmitDebugPoint cgbuf spStart + | DebugPointAtFor.No -> () //CG.EmitDebugPoint cgbuf e2.Range GenGetLocalVal cenv cgbuf eenvinner e2.Range v None @@ -4096,16 +4098,16 @@ and GenWhileLoop cenv cgbuf eenv (spWhile, condExpr, bodyExpr, m) sequel = let spCondition = match spWhile with - | DebugPointAtWhile.Yes spStart -> CG.EmitSeqPoint cgbuf spStart; SPSuppress + | DebugPointAtWhile.Yes spStart -> CG.EmitDebugPoint cgbuf spStart; SPSuppress | DebugPointAtWhile.No -> SPSuppress - // SEQUENCE POINTS: Emit a sequence point to cover all of 'while e do' + // SEQUENCE POINTS: Emit a debug point to cover all of 'while e do' GenExpr cenv cgbuf eenv spCondition condExpr (CmpThenBrOrContinue (pop 1, [ I_brcmp(BI_brfalse, finish.CodeLabel) ])) GenExpr cenv cgbuf eenv SPAlways bodyExpr (DiscardThen (Br startTest)) CG.SetMarkToHere cgbuf finish - // SEQUENCE POINTS: Emit a sequence point to cover 'done' if present + // SEQUENCE POINTS: Emit a debug point to cover 'done' if present GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel //-------------------------------------------------------------------------- @@ -4991,19 +4993,19 @@ and GenSequenceExpr |> AddNonUserCompilerGeneratedAttribs g let closeMethod = - // Note: We suppress the first sequence point in the body of this method since it is the initial state machine jump + // Note: We suppress the first debug point in the body of this method since it is the initial state machine jump let spReq = SPSuppress let ilCode = CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq, [], "Close", eenvinner, 1, closeExpr, discardAndReturnVoid) mkILNonGenericVirtualMethod("Close", ILMemberAccess.Public, [], mkILReturn ILType.Void, MethodBody.IL (lazy ilCode)) let checkCloseMethod = - // Note: We suppress the first sequence point in the body of this method since it is the initial state machine jump + // Note: We suppress the first debug point in the body of this method since it is the initial state machine jump let spReq = SPSuppress let ilCode = CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq, [], "get_CheckClose", eenvinner, 1, checkCloseExpr, Return) mkILNonGenericVirtualMethod("get_CheckClose", ILMemberAccess.Public, [], mkILReturn g.ilg.typ_Bool, MethodBody.IL (lazy ilCode)) let generateNextMethod = - // Note: We suppress the first sequence point in the body of this method since it is the initial state machine jump + // Note: We suppress the first debug point in the body of this method since it is the initial state machine jump let spReq = SPSuppress // the 'next enumerator' byref arg is at arg position 1 let eenvinner = eenvinner |> AddStorageForLocalVals g [ (nextEnumeratorValRef.Deref, Arg 1) ] @@ -5548,10 +5550,10 @@ and GenJoinPoint cenv cgbuf pos eenv ty m sequel = Br afterJoin, afterJoin, stackAfterJoin, sequel // Accumulate the decision graph as we go -and GenDecisionTreeAndTargets cenv cgbuf stackAtTargets eenv tree targets repeatSP sequel contf = +and GenDecisionTreeAndTargets cenv cgbuf stackAtTargets eenv tree targets sequel contf = let targetCounts = accTargetsOfDecisionTree tree [] |> List.countBy id |> Dictionary.ofList let targetNext = ref 0 // used to make sure we generate the targets in-order, postponing if necessary - GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv tree targets (targetNext, targetCounts) repeatSP (IntMap.empty()) sequel (fun targetInfos -> + GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv tree targets (targetNext, targetCounts) (IntMap.empty()) sequel (fun targetInfos -> let sortedTargetInfos = targetInfos |> Seq.sortBy (fun (KeyValue(targetIdx, _)) -> targetIdx) @@ -5574,7 +5576,7 @@ and GenPostponedDecisionTreeTargets cenv cgbuf targetInfos stackAtTargets sequel /// /// When inplabOpt is "Some inplab", we are assuming an existing branch to "inplab" and can optionally /// set inplab to point to another location if no codegen is required. -and GenDecisionTreeAndTargetsInner cenv cgbuf inplabOpt stackAtTargets eenv tree targets targetCounts repeatSP targetInfos sequel (contf: Zmap<_,_> -> FakeUnit) = +and GenDecisionTreeAndTargetsInner cenv cgbuf inplabOpt stackAtTargets eenv tree targets targetCounts targetInfos sequel (contf: Zmap<_,_> -> FakeUnit) = CG.SetStack cgbuf stackAtTargets // Set the expected initial stack. match tree with | TDBind(bind, rest) -> @@ -5587,18 +5589,24 @@ and GenDecisionTreeAndTargetsInner cenv cgbuf inplabOpt stackAtTargets eenv tree // we effectively lose an EndLocalScope for all dtrees that go to the same target // So we just pretend that the variable goes out of scope here. CG.SetMarkToHere cgbuf endScope - GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv rest targets targetCounts repeatSP targetInfos sequel contf + GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv rest targets targetCounts targetInfos sequel contf | TDSuccess(es, targetIdx) -> - let targetInfos, genTargetInfoOpt = GenDecisionTreeSuccess cenv cgbuf inplabOpt stackAtTargets eenv es targetIdx targets targetCounts repeatSP targetInfos sequel + let targetInfos, genTargetInfoOpt = GenDecisionTreeSuccess cenv cgbuf inplabOpt stackAtTargets eenv es targetIdx targets targetCounts targetInfos sequel match genTargetInfoOpt with | Some (eenvAtTarget, spExprAtTarget, exprAtTarget, sequelAtTarget) -> GenLinearExpr cenv cgbuf eenvAtTarget spExprAtTarget exprAtTarget sequelAtTarget true (fun Fake -> contf targetInfos) | _ -> contf targetInfos - | TDSwitch(e, cases, dflt, m) -> - GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases dflt m targets targetCounts repeatSP targetInfos sequel contf + | TDSwitch(sp, e, cases, dflt, m) -> + + // Emit the debug point + match sp with + | DebugPointAtSwitch.Yes dpm -> CG.EmitDebugPoint cgbuf dpm + | DebugPointAtSwitch.No -> () + + GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases dflt m targets targetCounts targetInfos sequel contf and GetTarget (targets:_[]) n = if n >= targets.Length then failwith "GetTarget: target not found in decision tree" @@ -5607,12 +5615,12 @@ and GetTarget (targets:_[]) n = /// Generate a success node of a decision tree, binding the variables and going to the target /// If inplabOpt is present, this label must get set to the first logical place to execute. /// For example, if no variables get bound this can just be set to jump straight to the target. -and GenDecisionTreeSuccess cenv cgbuf inplabOpt stackAtTargets eenv es targetIdx targets (targetNext: int ref, targetCounts: Dictionary) repeatSP targetInfos sequel = +and GenDecisionTreeSuccess cenv cgbuf inplabOpt stackAtTargets eenv es targetIdx targets (targetNext: int ref, targetCounts: Dictionary) targetInfos sequel = let (TTarget(vs, successExpr, spTarget, flags)) = GetTarget targets targetIdx match IntMap.tryFind targetIdx targetInfos with | Some (targetInfo, isTargetPostponed) -> - let (targetMarkBeforeBinds, targetMarkAfterBinds: Mark, eenvAtTarget, _, _, _, _, _, _, _, _) = targetInfo + let (targetMarkBeforeBinds, targetMarkAfterBinds: Mark, eenvAtTarget, _, _, _, _, _, _, _) = targetInfo // We have encountered this target before. See if we should generate it now let targetCount = targetCounts.[targetIdx] @@ -5626,7 +5634,7 @@ and GenDecisionTreeSuccess cenv cgbuf inplabOpt stackAtTargets eenv es targetIdx cgbuf.SetMarkOrEmitBranchIfNecessary (inplabOpt, targetMarkBeforeBinds) else cgbuf.SetMarkToHereIfNecessary inplabOpt - repeatSP() + cgbuf.EmitStartOfHiddenCode() (vs, es) ||> List.iter2 (fun v e -> @@ -5668,7 +5676,7 @@ and GenDecisionTreeSuccess cenv cgbuf inplabOpt stackAtTargets eenv es targetIdx |||> List.zip3 |> List.choose (fun (v, e, flag) -> if flag then None else Some (mkInvisibleBind v e)) let eenvAtTarget = AllocStorageForBinds cenv cgbuf scopeMarks eenv binds - let targetInfo = (targetMarkBeforeBinds, targetMarkAfterBinds, eenvAtTarget, successExpr, spTarget, repeatSP, vs, es, flags, startScope, endScope) + let targetInfo = (targetMarkBeforeBinds, targetMarkAfterBinds, eenvAtTarget, successExpr, spTarget, vs, es, flags, startScope, endScope) let targetCount = targetCounts.[targetIdx] @@ -5694,22 +5702,11 @@ and GenDecisionTreeSuccess cenv cgbuf inplabOpt stackAtTargets eenv es targetIdx targetInfos, genTargetInfoOpt and GenDecisionTreeTarget cenv cgbuf stackAtTargets targetInfo sequel = - let targetMarkBeforeBinds, targetMarkAfterBinds, eenvAtTarget, successExpr, spTarget, repeatSP, vs, es, flags, startScope, endScope = targetInfo + let targetMarkBeforeBinds, targetMarkAfterBinds, eenvAtTarget, successExpr, spTarget, vs, es, flags, startScope, endScope = targetInfo CG.SetMarkToHere cgbuf targetMarkBeforeBinds - let spExpr = (match spTarget with DebugPointForTarget.Yes -> SPAlways | DebugPointForTarget.No _ -> SPSuppress) + let spExpr = (match spTarget with DebugPointAtTarget.Yes -> SPAlways | DebugPointAtTarget.No _ -> SPSuppress) - // Repeat the sequence point to make sure each target branch has some sequence point (instead of inheriting - // a random sequence point from the previously generated IL code from the previous block. See comment on - // repeatSP() above. - // - // Only repeat the sequence point if we really have to, i.e. if the target expression doesn't start with a - // sequence point anyway - if isNil vs && DoesGenExprStartWithDebugPoint cenv.g spExpr successExpr then - () - else - match spTarget with - | DebugPointForTarget.Yes -> repeatSP() - | DebugPointForTarget.No -> cgbuf.EmitStartOfHiddenCode() + cgbuf.EmitStartOfHiddenCode() CG.SetMarkToHere cgbuf startScope let binds = mkInvisibleBinds vs es @@ -5718,22 +5715,17 @@ and GenDecisionTreeTarget cenv cgbuf stackAtTargets targetInfo sequel = CG.SetStack cgbuf stackAtTargets (eenvAtTarget, spExpr, successExpr, (EndLocalScope(sequel, endScope))) -and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defaultTargetOpt switchm targets targetCounts repeatSP targetInfos sequel contf = +and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defaultTargetOpt switchm targets targetCounts targetInfos sequel contf = let g = cenv.g let m = e.Range cgbuf.SetMarkToHereIfNecessary inplabOpt - repeatSP() + cgbuf.EmitStartOfHiddenCode() match cases with // optimize a test against a boolean value, i.e. the all-important if-then-else | TCase(DecisionTreeTest.Const(Const.Bool b), successTree) :: _ -> let failureTree = (match defaultTargetOpt with None -> cases.Tail.Head.CaseTree | Some d -> d) - GenDecisionTreeTest cenv eenv.cloc cgbuf stackAtTargets e None false eenv (if b then successTree else failureTree) (if b then failureTree else successTree) targets targetCounts repeatSP targetInfos sequel contf - - // // Remove a single test for a union case . Union case tests are always exa - //| [ TCase(DecisionTreeTest.UnionCase _, successTree) ] when (defaultTargetOpt.IsNone) -> - // GenDecisionTreeAndTargetsInner cenv cgbuf inplabOpt stackAtTargets eenv successTree targets repeatSP targetInfos sequel - // //GenDecisionTree cenv eenv.cloc cgbuf stackAtTargets e (Some (pop 1, Push [g.ilg.typ_Bool], Choice1Of2 (avoidHelpers, cuspec, idx))) eenv successTree failureTree targets repeatSP targetInfos sequel + GenDecisionTreeTest cenv eenv.cloc cgbuf stackAtTargets e None false eenv (if b then successTree else failureTree) (if b then failureTree else successTree) targets targetCounts targetInfos sequel contf // Optimize a single test for a union case to an "isdata" test - much // more efficient code, and this case occurs in the generated equality testers where perf is important @@ -5746,7 +5738,7 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau let idx = c.Index let avoidHelpers = entityRefInThisAssembly g.compilingFslib c.TyconRef let tester = (Some (pop 1, Push [g.ilg.typ_Bool], Choice1Of2 (avoidHelpers, cuspec, idx))) - GenDecisionTreeTest cenv eenv.cloc cgbuf stackAtTargets e tester false eenv successTree failureTree targets targetCounts repeatSP targetInfos sequel contf + GenDecisionTreeTest cenv eenv.cloc cgbuf stackAtTargets e tester false eenv successTree failureTree targets targetCounts targetInfos sequel contf // Use GenDecisionTreeTest to generate a single test for null (when no box required) where the success // is going to the immediate first node in the tree @@ -5757,7 +5749,7 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau match defaultTargetOpt with | None -> rest.Head.CaseTree | Some tg -> tg - GenDecisionTreeTest cenv eenv.cloc cgbuf stackAtTargets e None true eenv successTree failureTree targets targetCounts repeatSP targetInfos sequel contf + GenDecisionTreeTest cenv eenv.cloc cgbuf stackAtTargets e None true eenv successTree failureTree targets targetCounts targetInfos sequel contf | _ -> let caseLabels = List.map (fun _ -> CG.GenerateDelayMark cgbuf "switch_case") cases @@ -5788,7 +5780,7 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau BI_brtrue | _ -> failwith "internal error: GenDecisionTreeSwitch" CG.EmitInstr cgbuf (pop 1) Push0 (I_brcmp (bi, (List.head caseLabels).CodeLabel)) - GenDecisionTreeCases cenv cgbuf stackAtTargets eenv defaultTargetOpt targets targetCounts repeatSP targetInfos sequel caseLabels cases contf + GenDecisionTreeCases cenv cgbuf stackAtTargets eenv defaultTargetOpt targets targetCounts targetInfos sequel caseLabels cases contf | DecisionTreeTest.ActivePatternCase _ -> error(InternalError("internal error in codegen: DecisionTreeTest.ActivePatternCase", switchm)) | DecisionTreeTest.UnionCase (hdc, tyargs) -> @@ -5804,7 +5796,7 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau let avoidHelpers = entityRefInThisAssembly g.compilingFslib hdc.TyconRef EraseUnions.emitDataSwitch g.ilg (UnionCodeGen cgbuf) (avoidHelpers, cuspec, dests) CG.EmitInstrs cgbuf (pop 1) Push0 [ ] // push/pop to match the line above - GenDecisionTreeCases cenv cgbuf stackAtTargets eenv defaultTargetOpt targets targetCounts repeatSP targetInfos sequel caseLabels cases contf + GenDecisionTreeCases cenv cgbuf stackAtTargets eenv defaultTargetOpt targets targetCounts targetInfos sequel caseLabels cases contf | DecisionTreeTest.Const c -> GenExpr cenv cgbuf eenv SPSuppress e Continue @@ -5847,22 +5839,22 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau CG.EmitInstr cgbuf (pop 1) Push0 (I_switch destinationLabels) else error(InternalError("non-dense integer matches not implemented in codegen - these should have been removed by the pattern match compiler", switchm)) - GenDecisionTreeCases cenv cgbuf stackAtTargets eenv defaultTargetOpt targets targetCounts repeatSP targetInfos sequel caseLabels cases contf + GenDecisionTreeCases cenv cgbuf stackAtTargets eenv defaultTargetOpt targets targetCounts targetInfos sequel caseLabels cases contf | _ -> error(InternalError("these matches should never be needed", switchm)) | DecisionTreeTest.Error m -> error(InternalError("Trying to compile error recovery branch", m)) -and GenDecisionTreeCases cenv cgbuf stackAtTargets eenv defaultTargetOpt targets targetCounts repeatSP targetInfos sequel caseLabels cases (contf: Zmap<_,_> -> FakeUnit) = +and GenDecisionTreeCases cenv cgbuf stackAtTargets eenv defaultTargetOpt targets targetCounts targetInfos sequel caseLabels cases (contf: Zmap<_,_> -> FakeUnit) = match defaultTargetOpt with | Some defaultTarget -> - GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv defaultTarget targets targetCounts repeatSP targetInfos sequel (fun targetInfos -> - GenDecisionTreeCases cenv cgbuf stackAtTargets eenv None targets targetCounts repeatSP targetInfos sequel caseLabels cases contf + GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv defaultTarget targets targetCounts targetInfos sequel (fun targetInfos -> + GenDecisionTreeCases cenv cgbuf stackAtTargets eenv None targets targetCounts targetInfos sequel caseLabels cases contf ) | None -> match caseLabels, cases with | caseLabel :: caseLabelsTail, TCase(_, caseTree) :: casesTail -> - GenDecisionTreeAndTargetsInner cenv cgbuf (Some caseLabel) stackAtTargets eenv caseTree targets targetCounts repeatSP targetInfos sequel (fun targetInfos -> - GenDecisionTreeCases cenv cgbuf stackAtTargets eenv None targets targetCounts repeatSP targetInfos sequel caseLabelsTail casesTail contf + GenDecisionTreeAndTargetsInner cenv cgbuf (Some caseLabel) stackAtTargets eenv caseTree targets targetCounts targetInfos sequel (fun targetInfos -> + GenDecisionTreeCases cenv cgbuf stackAtTargets eenv None targets targetCounts targetInfos sequel caseLabelsTail casesTail contf ) | _ -> contf targetInfos @@ -5870,7 +5862,7 @@ and GenDecisionTreeCases cenv cgbuf stackAtTargets eenv defaultTargetOpt targets // Used for the peephole optimization below and (|BoolExpr|_|) = function Expr.Const (Const.Bool b1, _, _) -> Some b1 | _ -> None -and GenDecisionTreeTest cenv cloc cgbuf stackAtTargets e tester isNullTest eenv successTree failureTree targets targetCounts repeatSP targetInfos sequel contf = +and GenDecisionTreeTest cenv cloc cgbuf stackAtTargets e tester isNullTest eenv successTree failureTree targets targetCounts targetInfos sequel contf = let g = cenv.g match successTree, failureTree with @@ -5919,8 +5911,8 @@ and GenDecisionTreeTest cenv cloc cgbuf stackAtTargets e tester isNullTest eenv let success = CG.GenerateDelayMark cgbuf "testSuccess" let testForSuccess = if isNullTest then BI_brfalse else BI_brtrue GenExpr cenv cgbuf eenv SPSuppress e (CmpThenBrOrContinue(pop 1, [ I_brcmp (testForSuccess, success.CodeLabel) ])) - GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv failureTree targets targetCounts repeatSP targetInfos sequel (fun targetInfos -> - GenDecisionTreeAndTargetsInner cenv cgbuf (Some success) stackAtTargets eenv successTree targets targetCounts repeatSP targetInfos sequel contf + GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv failureTree targets targetCounts targetInfos sequel (fun targetInfos -> + GenDecisionTreeAndTargetsInner cenv cgbuf (Some success) stackAtTargets eenv successTree targets targetCounts targetInfos sequel contf ) | _ -> @@ -5931,8 +5923,8 @@ and GenDecisionTreeTest cenv cloc cgbuf stackAtTargets e tester isNullTest eenv let failure = CG.GenerateDelayMark cgbuf "testFailure" let testForFailure = if isNullTest then BI_brtrue else BI_brfalse GenExpr cenv cgbuf eenv SPSuppress e (CmpThenBrOrContinue(pop 1, [ I_brcmp (testForFailure, failure.CodeLabel) ])) - GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv successTree targets targetCounts repeatSP targetInfos sequel (fun targetInfos -> - GenDecisionTreeAndTargetsInner cenv cgbuf (Some failure) stackAtTargets eenv failureTree targets targetCounts repeatSP targetInfos sequel contf + GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv successTree targets targetCounts targetInfos sequel (fun targetInfos -> + GenDecisionTreeAndTargetsInner cenv cgbuf (Some failure) stackAtTargets eenv failureTree targets targetCounts targetInfos sequel contf ) // Turn 'isdata' tests that branch into EI_brisdata tests @@ -5940,8 +5932,8 @@ and GenDecisionTreeTest cenv cloc cgbuf stackAtTargets e tester isNullTest eenv let failure = CG.GenerateDelayMark cgbuf "testFailure" GenExpr cenv cgbuf eenv SPSuppress e (CmpThenBrOrContinue(pop 1, EraseUnions.mkBrIsData g.ilg false (avoidHelpers, cuspec, idx, failure.CodeLabel))) - GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv successTree targets targetCounts repeatSP targetInfos sequel (fun targetInfos -> - GenDecisionTreeAndTargetsInner cenv cgbuf (Some failure) stackAtTargets eenv failureTree targets targetCounts repeatSP targetInfos sequel contf + GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv successTree targets targetCounts targetInfos sequel (fun targetInfos -> + GenDecisionTreeAndTargetsInner cenv cgbuf (Some failure) stackAtTargets eenv failureTree targets targetCounts targetInfos sequel contf ) | Some (pops, pushes, i) -> @@ -5952,8 +5944,8 @@ and GenDecisionTreeTest cenv cloc cgbuf stackAtTargets e tester isNullTest eenv | Choice2Of2 i -> CG.EmitInstr cgbuf pops pushes i CG.EmitInstr cgbuf (pop 1) Push0 (I_brcmp (BI_brfalse, failure.CodeLabel)) - GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv successTree targets targetCounts repeatSP targetInfos sequel (fun targetInfos -> - GenDecisionTreeAndTargetsInner cenv cgbuf (Some failure) stackAtTargets eenv failureTree targets targetCounts repeatSP targetInfos sequel contf + GenDecisionTreeAndTargetsInner cenv cgbuf None stackAtTargets eenv successTree targets targetCounts targetInfos sequel (fun targetInfos -> + GenDecisionTreeAndTargetsInner cenv cgbuf (Some failure) stackAtTargets eenv failureTree targets targetCounts targetInfos sequel contf ) /// Generate fixups for letrec bindings @@ -6033,7 +6025,7 @@ and GenLetRec cenv cgbuf eenv (binds, body, m) sequel = and GenDebugPointForBind cenv cgbuf bind = let _, pt, sp = ComputeDebugPointForBinding cenv.g bind - pt |> Option.iter (CG.EmitSeqPoint cgbuf) + pt |> Option.iter (CG.EmitDebugPoint cgbuf) sp and GenBinding cenv cgbuf eenv (bind: Binding) (isStateVar: bool) = @@ -7505,7 +7497,7 @@ and GenImplFile cenv (mgbuf: AssemblyBuilder) mainInfoOpt eenv (implFile: TypedI let doesSomething = CheckCodeDoesSomething topCode.Code // Make a FEEFEE instruction to mark hidden code regions - // We expect the first instruction to be a sequence point when generating debug symbols + // We expect the first instruction to be a debug point when generating debug symbols let feefee, seqpt = if topInstrs.Length > 1 then match topInstrs.[0] with diff --git a/src/fsharp/InnerLambdasToTopLevelFuncs.fs b/src/fsharp/InnerLambdasToTopLevelFuncs.fs index 6b08832a7e0..36f6e8bd080 100644 --- a/src/fsharp/InnerLambdasToTopLevelFuncs.fs +++ b/src/fsharp/InnerLambdasToTopLevelFuncs.fs @@ -1283,7 +1283,7 @@ module Pass4_RewriteAssembly = let bind, z = TransBindingRhs penv z bind let rest, z = TransDecisionTree penv z rest TDBind(bind, rest), z - | TDSwitch (e, cases, dflt, m) -> + | TDSwitch (sp, e, cases, dflt, m) -> let e, z = TransExpr penv z e let TransDecisionTreeCase penv z (TCase (discrim, dtree)) = let dtree, z = TransDecisionTree penv z dtree @@ -1291,7 +1291,7 @@ module Pass4_RewriteAssembly = let cases, z = List.mapFold (TransDecisionTreeCase penv) z cases let dflt, z = Option.mapFold (TransDecisionTree penv) z dflt - TDSwitch (e, cases, dflt, m), z + TDSwitch (sp, e, cases, dflt, m), z and TransDecisionTreeTarget penv z (TTarget(vs, e, spTarget, flags)) = let z = EnterInner z diff --git a/src/fsharp/LowerCallsAndSeqs.fs b/src/fsharp/LowerCallsAndSeqs.fs index 8d3fb8c288d..82cdbd2c23b 100644 --- a/src/fsharp/LowerCallsAndSeqs.fs +++ b/src/fsharp/LowerCallsAndSeqs.fs @@ -683,22 +683,24 @@ let ConvertSequenceExprToObject g amap overallExpr = // A utility to add a jump table to the three generated methods let addJumpTable isDisposal expr = let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m ) - let mkGotoLabelTarget lab = mbuilder.AddResultTarget(Expr.Op (TOp.Goto lab, [], [], m), DebugPointForTarget.No) + let mkGotoLabelTarget lab = mbuilder.AddResultTarget(Expr.Op (TOp.Goto lab, [], [], m), DebugPointAtTarget.No) let dtree = - TDSwitch(pcExpr, - [ - // Add an empty disposal action for the initial state (pc = 0) - if isDisposal then - yield mkCase(DecisionTreeTest.Const(Const.Int32 pcInit), mkGotoLabelTarget noDisposeContinuationLabel) - - // Yield one target for each PC, where the action of the target is to goto the appropriate label - for pc in pcs do - yield mkCase(DecisionTreeTest.Const(Const.Int32 pc), mkGotoLabelTarget pc2lab.[pc]) - - // Yield one target for the 'done' program counter, where the action of the target is to continuation label - yield mkCase(DecisionTreeTest.Const(Const.Int32 pcDone), mkGotoLabelTarget noDisposeContinuationLabel) ], - Some(mkGotoLabelTarget pc2lab.[pcInit]), - m) + TDSwitch( + DebugPointAtSwitch.No, + pcExpr, + [ + // Add an empty disposal action for the initial state (pc = 0) + if isDisposal then + yield mkCase(DecisionTreeTest.Const(Const.Int32 pcInit), mkGotoLabelTarget noDisposeContinuationLabel) + + // Yield one target for each PC, where the action of the target is to goto the appropriate label + for pc in pcs do + yield mkCase(DecisionTreeTest.Const(Const.Int32 pc), mkGotoLabelTarget pc2lab.[pc]) + + // Yield one target for the 'done' program counter, where the action of the target is to continuation label + yield mkCase(DecisionTreeTest.Const(Const.Int32 pcDone), mkGotoLabelTarget noDisposeContinuationLabel) ], + Some(mkGotoLabelTarget pc2lab.[pcInit]), + m) let table = mbuilder.Close(dtree, m, g.int_ty) mkCompGenSequential m table (mkLabelled m initLabel expr) @@ -750,12 +752,13 @@ let ConvertSequenceExprToObject g amap overallExpr = // DONE_DISPOSE: let whileLoop = let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m) - let addResultTarget e = mbuilder.AddResultTarget(e, DebugPointForTarget.No) + let addResultTarget e = mbuilder.AddResultTarget(e, DebugPointAtTarget.No) let dtree = - TDSwitch(pcExpr, - [ mkCase((DecisionTreeTest.Const(Const.Int32 pcDone)), addResultTarget (Expr.Op (TOp.Goto doneDisposeLabel, [], [], m)) ) ], - Some (addResultTarget (mkUnit g m)), - m) + TDSwitch(DebugPointAtSwitch.No, + pcExpr, + [ mkCase((DecisionTreeTest.Const(Const.Int32 pcDone)), addResultTarget (Expr.Op (TOp.Goto doneDisposeLabel, [], [], m)) ) ], + Some (addResultTarget (mkUnit g m)), + m) let pcIsEndStateComparison = mbuilder.Close(dtree, m, g.unit_ty) mkLabelled m startLabel (mkCompGenSequential m diff --git a/src/fsharp/LowerStateMachines.fs b/src/fsharp/LowerStateMachines.fs index 42a067819ca..4a022b2cb60 100644 --- a/src/fsharp/LowerStateMachines.fs +++ b/src/fsharp/LowerStateMachines.fs @@ -91,7 +91,7 @@ let RepresentBindingAsStateVar g (bind: Binding) (resBody: StateMachineConversio // Within all resumable code, a return value of 'true' indicates success/completion path, when we can clear // state machine locals. (if typeEquiv g (tyOfExpr g generateBody) g.bool_ty then - mkCond DebugPointAtBinding.NoneAtInvisible DebugPointForTarget.No m g.bool_ty generateBody + mkCond DebugPointAtBinding.NoneAtInvisible DebugPointAtTarget.No m g.bool_ty generateBody (mkCompGenSequential m (mkValSet m vref (mkDefault (m, vref.Type))) (mkTrue g m)) @@ -413,15 +413,17 @@ type LowerStateMachine(g: TcGlobals) = else let initLabel = generateCodeLabel() let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m ) - let mkGotoLabelTarget lab = mbuilder.AddResultTarget(Expr.Op (TOp.Goto lab, [], [], m), DebugPointForTarget.No) + let mkGotoLabelTarget lab = mbuilder.AddResultTarget(Expr.Op (TOp.Goto lab, [], [], m), DebugPointAtTarget.No) let dtree = - TDSwitch(pcExpr, - [ // Yield one target for each PC, where the action of the target is to goto the appropriate label - for pc in pcs do - yield mkCase(DecisionTreeTest.Const(Const.Int32 pc), mkGotoLabelTarget pc2lab.[pc]) ], - // The default is to go to pcInit - Some(mkGotoLabelTarget initLabel), - m) + TDSwitch( + DebugPointAtSwitch.No, + pcExpr, + [ // Yield one target for each PC, where the action of the target is to goto the appropriate label + for pc in pcs do + yield mkCase(DecisionTreeTest.Const(Const.Int32 pc), mkGotoLabelTarget pc2lab.[pc]) ], + // The default is to go to pcInit + Some(mkGotoLabelTarget initLabel), + m) let table = mbuilder.Close(dtree, m, g.int_ty) mkCompGenSequential m table (mkLabelled m initLabel expr) @@ -537,7 +539,7 @@ type LowerStateMachine(g: TcGlobals) = let m = someBranchExpr.Range let recreate reenterLabOpt e1 e2 = let lab = (match reenterLabOpt with Some l -> l | _ -> generateCodeLabel()) - mkCond DebugPointAtBinding.NoneAtSticky DebugPointForTarget.No m (tyOfExpr g noneBranchExpr) (mkFalse g m) (mkLabelled m lab e1) e2 + mkCond DebugPointAtBinding.NoneAtSticky DebugPointAtTarget.No m (tyOfExpr g noneBranchExpr) (mkFalse g m) (mkLabelled m lab e1) e2 { phase1 = recreate None resNone.phase1 resSome.phase1 phase2 = (fun ctxt -> let generate2 = resSome.phase2 ctxt diff --git a/src/fsharp/MethodCalls.fs b/src/fsharp/MethodCalls.fs index 691e4eb18c5..0f037a31c34 100644 --- a/src/fsharp/MethodCalls.fs +++ b/src/fsharp/MethodCalls.fs @@ -1791,7 +1791,7 @@ module ProvidedMethodCalls = let testExpr = exprToExpr test let ifTrueExpr = exprToExpr thenBranch let ifFalseExpr = exprToExpr elseBranch - let te = mkCond DebugPointAtBinding.NoneAtSticky DebugPointForTarget.No m (tyOfExpr g ifTrueExpr) testExpr ifTrueExpr ifFalseExpr + let te = mkCond DebugPointAtBinding.NoneAtSticky DebugPointAtTarget.No m (tyOfExpr g ifTrueExpr) testExpr ifTrueExpr ifFalseExpr None, (te, tyOfExpr g te) | ProvidedVarExpr providedVar -> let _, vTe = varToExpr (exprType.PApply((fun _ -> providedVar), m)) diff --git a/src/fsharp/Optimizer.fs b/src/fsharp/Optimizer.fs index 46b0557a873..878495e08d5 100644 --- a/src/fsharp/Optimizer.fs +++ b/src/fsharp/Optimizer.fs @@ -1486,13 +1486,13 @@ let TryEliminateBinding cenv _env (TBind(vspec1, e1, spBind)) e2 _m = Some (Expr.Sequential(invoke, rest, NormalSeq, sp, m)) // Immediate consumption of value by a pattern match 'let x = e in match x with ...' - | Expr.Match (spMatch, _exprm, TDSwitch(Expr.Val (VRefLocal vspec2, _, _), cases, dflt, _), targets, m, ty2) + | Expr.Match (spMatch, _exprm, TDSwitch(sp, Expr.Val (VRefLocal vspec2, _, _), cases, dflt, _), targets, m, ty2) when (valEq vspec1 vspec2 && let fvs = accFreeInTargets CollectLocals targets (accFreeInSwitchCases CollectLocals cases dflt emptyFreeVars) not (Zset.contains vspec1 fvs.FreeLocals)) -> let spMatch = spBind.Combine spMatch - Some (Expr.Match (spMatch, e1.Range, TDSwitch(e1, cases, dflt, m), targets, m, ty2)) + Some (Expr.Match (spMatch, e1.Range, TDSwitch(sp, e1, cases, dflt, m), targets, m, ty2)) // Immediate use of value as part of an application. 'let f = e in f ...' and 'let x = e in f ... x ...' // Note functions are evaluated before args @@ -1541,8 +1541,8 @@ let rec (|KnownValApp|_|) expr = /// check single case with bool const. let (|TDBoolSwitch|_|) dtree = match dtree with - | TDSwitch( expr, [TCase (DecisionTreeTest.Const(Const.Bool testBool), caseTree )], Some defaultTree, range) -> - Some (expr, testBool, caseTree, defaultTree, range) + | TDSwitch(sp, expr, [TCase (DecisionTreeTest.Const(Const.Bool testBool), caseTree )], Some defaultTree, range) -> + Some (sp, expr, testBool, caseTree, defaultTree, range) | _ -> None @@ -1556,7 +1556,7 @@ let (|ConstantBoolTarget|_|) target = /// apart from one branch which defers to another expression let rec CountBoolLogicTree (targets: DecisionTreeTarget[], costOuterCaseTree, costOuterDefaultTree, testBool as data) tree = match tree with - | TDSwitch (_expr, [case], Some defaultTree, _range) -> + | TDSwitch (_sp, _expr, [case], Some defaultTree, _range) -> let tc1,ec1 = CountBoolLogicTree data case.CaseTree let tc2, ec2 = CountBoolLogicTree data defaultTree tc1 + tc2, ec1 + ec2 @@ -1572,14 +1572,14 @@ let rec CountBoolLogicTree (targets: DecisionTreeTarget[], costOuterCaseTree, co /// depending on whether the target result was true/false let rec RewriteBoolLogicTree (targets: DecisionTreeTarget[], outerCaseTree, outerDefaultTree, testBool as data) tree = match tree with - | TDSwitch (expr, cases, defaultTree, range) -> + | TDSwitch (sp, expr, cases, defaultTree, range) -> let cases2 = cases |> List.map (RewriteBoolLogicCase data) let defaultTree2 = defaultTree |> Option.map (RewriteBoolLogicTree data) - TDSwitch (expr, cases2, defaultTree2, range) + TDSwitch (sp, expr, cases2, defaultTree2, range) | TDSuccess([], idx) -> match targets.[idx] with | ConstantBoolTarget result -> if result = testBool then outerCaseTree else outerDefaultTree - | TTarget([], exp, _, _) -> mkBoolSwitch exp.Range exp (if testBool then outerCaseTree else outerDefaultTree) (if testBool then outerDefaultTree else outerCaseTree) + | TTarget([], exp, _, _) -> mkBoolSwitch DebugPointAtSwitch.No exp.Range exp (if testBool then outerCaseTree else outerDefaultTree) (if testBool then outerDefaultTree else outerCaseTree) | _ -> failwith "CountBoolLogicTree should exclude this case" | _ -> failwith "CountBoolLogicTree should exclude this case" @@ -1594,7 +1594,7 @@ let rec CombineBoolLogic expr = // try to find nested boolean switch match expr with | Expr.Match (outerSP, outerMatchRange, - TDBoolSwitch(Expr.Match (_innerSP, _innerMatchRange, innerTree, innerTargets, _innerDefaultRange, _innerMatchTy), + TDBoolSwitch(_switchSP, Expr.Match (_innerSP, _innerMatchRange, innerTree, innerTargets, _innerDefaultRange, _innerMatchTy), outerTestBool, outerCaseTree, outerDefaultTree, _outerSwitchRange ), outerTargets, outerDefaultRange, outerMatchTy) -> @@ -3254,9 +3254,6 @@ and getPipes g expr acc = | _ -> [expr], acc -and mkDebugPoint g m e = - mkThenDoSequential DebugPointAtSequential.SuppressStmt m e (mkUnit g m) - /// In debug code, process a pipe-right manually to lay down the debug point for the application of the function after /// the evaluation of the argument, all the way down the chain. and OptimizeDebugPipeRights cenv env expr = @@ -3585,7 +3582,7 @@ and OptimizeDecisionTree cenv env m x = else rest, rinfo - | TDSwitch (e, cases, dflt, m) -> + | TDSwitch (sp, e, cases, dflt, m) -> // We always duplicate boolean-typed guards prior to optimizing. This is work which really should be done in patcompile.fs // where we must duplicate "when" expressions to ensure uniqueness of bound variables. // @@ -3593,7 +3590,7 @@ and OptimizeDecisionTree cenv env m x = // Hence we do it here. There is no doubt a better way to do this. let e = if typeEquiv cenv.g (tyOfExpr cenv.g e) cenv.g.bool_ty then copyExpr cenv.g CloneAll e else e - OptimizeSwitch cenv env (e, cases, dflt, m) + OptimizeSwitch cenv env (sp, e, cases, dflt, m) and TryOptimizeDecisionTreeTest cenv test vinfo = match test, vinfo with @@ -3607,7 +3604,7 @@ and TryOptimizeDecisionTreeTest cenv test vinfo = | _ -> None /// Optimize/analyze a switch construct from pattern matching -and OptimizeSwitch cenv env (e, cases, dflt, m) = +and OptimizeSwitch cenv env (sp, e, cases, dflt, m) = let eR, einfo = OptimizeExpr cenv env e let cases, dflt = @@ -3624,9 +3621,9 @@ and OptimizeSwitch cenv env (e, cases, dflt, m) = // OK, see what weRre left with and continue match cases, dflt with | [], Some case -> OptimizeDecisionTree cenv env m case - | _ -> OptimizeSwitchFallback cenv env (eR, einfo, cases, dflt, m) + | _ -> OptimizeSwitchFallback cenv env (sp, eR, einfo, cases, dflt, m) -and OptimizeSwitchFallback cenv env (eR, einfo, cases, dflt, m) = +and OptimizeSwitchFallback cenv env (sp, eR, einfo, cases, dflt, m) = let casesR, cinfos = cases |> List.map (fun (TCase(discrim, e)) -> let eR, einfo = OptimizeDecisionTree cenv env m e in TCase(discrim, eR), einfo) @@ -3638,7 +3635,7 @@ and OptimizeSwitchFallback cenv env (eR, einfo, cases, dflt, m) = let size = (dinfos.Length + cinfos.Length) * 2 let info = CombineValueInfosUnknown (einfo :: cinfos @ dinfos) let info = { info with TotalSize = info.TotalSize + size; FunctionSize = info.FunctionSize + size; } - TDSwitch (eR, casesR, dfltR, m), info + TDSwitch (sp, eR, casesR, dfltR, m), info and OptimizeBinding cenv isRec env (TBind(vref, expr, spBind)) = try diff --git a/src/fsharp/PatternMatchCompilation.fs b/src/fsharp/PatternMatchCompilation.fs index 084e6d7211f..94c593f3cb7 100644 --- a/src/fsharp/PatternMatchCompilation.fs +++ b/src/fsharp/PatternMatchCompilation.fs @@ -380,15 +380,17 @@ let ShowCounterExample g denv m refuted = // Basic problem specification //--------------------------------------------------------------------------- -type RuleNumber = int +type ClauseNumber = int +/// Represents an unresolved portion of pattern matching type Active = Active of Path * SubExprOfInput * Pattern type Actives = Active list -type Frontier = Frontier of RuleNumber * Actives * ValMap +/// Represents an unresolved portion of pattern matching within a clause +type Frontier = Frontier of ClauseNumber * Actives * ValMap -type InvestigationPoint = Investigation of RuleNumber * DecisionTreeTest * Path +type InvestigationPoint = Investigation of ClauseNumber * DecisionTreeTest * Path // Note: actives must be a SortedDictionary // REVIEW: improve these data structures, though surprisingly these functions don't tend to show up @@ -398,6 +400,7 @@ let rec isMemOfActives p1 actives = | [] -> false | Active(p2, _, _) :: rest -> pathEq p1 p2 || isMemOfActives p1 rest +// Find the information about the active investigation let rec lookupActive x l = match l with | [] -> raise (KeyNotFoundException()) @@ -583,11 +586,11 @@ let rec BuildSwitch inpExprOpt g expr edges dflt m = // In this case the 'expr' already holds the result of the 'isinst' test. | TCase(DecisionTreeTest.IsInst _, success) :: edges, dflt when Option.isSome inpExprOpt -> - TDSwitch(expr, [TCase(DecisionTreeTest.IsNull, BuildSwitch None g expr edges dflt m)], Some success, m) + TDSwitch(DebugPointAtSwitch.No, expr, [TCase(DecisionTreeTest.IsNull, BuildSwitch None g expr edges dflt m)], Some success, m) // isnull and isinst tests | TCase((DecisionTreeTest.IsNull | DecisionTreeTest.IsInst _), _) as edge :: edges, dflt -> - TDSwitch(expr, [edge], Some (BuildSwitch inpExprOpt g expr edges dflt m), m) + TDSwitch(DebugPointAtSwitch.No, expr, [edge], Some (BuildSwitch inpExprOpt g expr edges dflt m), m) #if OPTIMIZE_LIST_MATCHING // 'cons/nil' tests where we have stored the result of the cons test in an 'isinst' in a variable @@ -597,7 +600,7 @@ let rec BuildSwitch inpExprOpt g expr edges dflt m = | [TCase(ListEmptyDiscrim g _, emptyCase); TCase(ListConsDiscrim g tinst, consCase)], None | [TCase(ListConsDiscrim g tinst, consCase); TCase(ListEmptyDiscrim g _, emptyCase)], None when Option.isSome inpExprOpt -> - TDSwitch(expr, [TCase(DecisionTreeTest.IsNull, emptyCase)], Some consCase, m) + TDSwitch(DebugPointAtSwitch.No, expr, [TCase(DecisionTreeTest.IsNull, emptyCase)], Some consCase, m) #endif // All these should also always have default cases @@ -621,7 +624,7 @@ let rec BuildSwitch inpExprOpt g expr edges dflt m = | DecisionTreeTest.Const (Const.Double _ | Const.Single _ | Const.Int64 _ | Const.UInt64 _ | Const.IntPtr _ | Const.UIntPtr _ as c) -> mkILAsmCeq g m testexpr (Expr.Const (c, m, tyOfExpr g testexpr)) | _ -> error(InternalError("strange switch", m)) - mkBoolSwitch m testexpr tree sofar) + mkBoolSwitch DebugPointAtSwitch.No m testexpr tree sofar) edges dflt @@ -663,7 +666,7 @@ let rec BuildSwitch inpExprOpt g expr edges dflt m = | _ -> failwith "internal error: compactify" let edgeGroups = compactify None edges' - (edgeGroups, dflt) ||> List.foldBack (fun edgeGroup sofar -> TDSwitch(expr, edgeGroup, Some sofar, m)) + (edgeGroups, dflt) ||> List.foldBack (fun edgeGroup sofar -> TDSwitch(DebugPointAtSwitch.No, expr, edgeGroup, Some sofar, m)) // For a total pattern match, run the active pattern, bind the result and // recursively build a switch in the choice type @@ -671,10 +674,10 @@ let rec BuildSwitch inpExprOpt g expr edges dflt m = error(InternalError("DecisionTreeTest.ActivePatternCase should have been eliminated", m)) // For a complete match, optimize one test to be the default - | TCase(_, tree) :: rest, None -> TDSwitch (expr, rest, Some tree, m) + | TCase(_, tree) :: rest, None -> TDSwitch (DebugPointAtSwitch.No, expr, rest, Some tree, m) // Otherwise let codegen make the choices - | _ -> TDSwitch (expr, edges, dflt, m) + | _ -> TDSwitch (DebugPointAtSwitch.No, expr, edges, dflt, m) #if DEBUG let rec layoutPat pat = @@ -695,58 +698,98 @@ let layoutFrontier (Frontier (i, actives, _)) = Layout.(--) (Layout.wordL (TaggedText.tagText "Frontier ")) (Layout.tupleL [intL i; Layout.listL layoutActive actives]) #endif -let mkFrontiers investigations i = - List.map (fun (actives, valMap) -> Frontier(i, actives, valMap)) investigations - -let getRuleIndex (Frontier (i, _active, _valMap)) = i - -/// Is a pattern a partial pattern? -let rec isPatternPartial p = - match p with - | TPat_query ((_, _, _, _, _, apinfo), p, _m) -> not apinfo.IsTotal || isPatternPartial p - | TPat_const _ -> false - | TPat_wild _ -> false - | TPat_as (p, _, _) -> isPatternPartial p - | TPat_disjs (ps, _) | TPat_conjs(ps, _) - | TPat_tuple (_, ps, _, _) | TPat_exnconstr(_, ps, _) - | TPat_array (ps, _, _) | TPat_unioncase (_, _, ps, _) - | TPat_recd (_, _, ps, _) -> List.exists isPatternPartial ps - | TPat_range _ -> false - | TPat_null _ -> false - | TPat_isinst _ -> false - | TPat_error _ -> false - -let rec erasePartialPatterns inpp = - match inpp with +let mkFrontiers investigations clauseNumber = + investigations |> List.map (fun (actives, valMap) -> Frontier(clauseNumber, actives, valMap)) + +// Search for pattern decision points that are decided "one at a time" - i.e. where there is no +// multi-way switching. For example partial active patterns or 'isinst' or 'null' test +// or exception tests +let rec investigationPoints inpPat = + seq { + match inpPat with + | TPat_query ((_, _, _, _, _, apinfo), subPat, _) -> + yield not apinfo.IsTotal + yield! investigationPoints subPat + | TPat_isinst (_, _, subPatOpt, _) -> + yield true + match subPatOpt with + | None -> () + | Some subPat -> + yield! investigationPoints subPat + | TPat_as (subPat, _, _) -> + yield! investigationPoints subPat + | TPat_disjs (subPats, _) + | TPat_conjs(subPats, _) + | TPat_tuple (_, subPats, _, _) + | TPat_recd (_, _, subPats, _) -> + for subPat in subPats do + yield! investigationPoints subPat + | TPat_exnconstr(_, subPats, _) -> + for subPat in subPats do + yield! investigationPoints subPat + yield true + | TPat_array (subPats, _, _) + | TPat_unioncase (_, _, subPats, _) -> + yield false + for subPat in subPats do + yield! investigationPoints subPat + | TPat_range _ + | TPat_const _ -> + yield false + | TPat_null _ -> + yield true + | TPat_wild _ + | TPat_error _ -> () + } + +let rec erasePartialPatterns inpPat = + match inpPat with | TPat_query ((expr, resTys, isStructRetTy, apatVrefOpt, idx, apinfo), p, m) -> if apinfo.IsTotal then TPat_query ((expr, resTys, isStructRetTy, apatVrefOpt, idx, apinfo), erasePartialPatterns p, m) else TPat_disjs ([], m) (* always fail *) | TPat_as (p, x, m) -> TPat_as (erasePartialPatterns p, x, m) - | TPat_disjs (ps, m) -> TPat_disjs(erasePartials ps, m) - | TPat_conjs(ps, m) -> TPat_conjs(erasePartials ps, m) - | TPat_tuple (tupInfo, ps, x, m) -> TPat_tuple(tupInfo, erasePartials ps, x, m) - | TPat_exnconstr(x, ps, m) -> TPat_exnconstr(x, erasePartials ps, m) - | TPat_array (ps, x, m) -> TPat_array (erasePartials ps, x, m) + | TPat_disjs (subPats, m) -> TPat_disjs(erasePartials subPats, m) + | TPat_conjs(subPats, m) -> TPat_conjs(erasePartials subPats, m) + | TPat_tuple (tupInfo, subPats, x, m) -> TPat_tuple(tupInfo, erasePartials subPats, x, m) + | TPat_exnconstr(x, subPats, m) -> TPat_exnconstr(x, erasePartials subPats, m) + | TPat_array (subPats, x, m) -> TPat_array (erasePartials subPats, x, m) | TPat_unioncase (x, y, ps, m) -> TPat_unioncase (x, y, erasePartials ps, m) | TPat_recd (x, y, ps, m) -> TPat_recd (x, y, List.map erasePartialPatterns ps, m) + | TPat_isinst (x, y, subPatOpt, m) -> TPat_isinst (x, y, Option.map erasePartialPatterns subPatOpt, m) | TPat_const _ | TPat_wild _ | TPat_range _ | TPat_null _ - | TPat_isinst _ - | TPat_error _ -> inpp + | TPat_error _ -> inpPat and erasePartials inps = List.map erasePartialPatterns inps +let rec isPatternDisjunctive inpPat = + match inpPat with + | TPat_query (_, subPat, _) -> isPatternDisjunctive subPat + | TPat_as (subPat, _, _) -> isPatternDisjunctive subPat + | TPat_disjs (subPats, _) -> subPats.Length > 1 || List.exists isPatternDisjunctive subPats + | TPat_conjs(subPats, _) + | TPat_tuple (_, subPats, _, _) + | TPat_exnconstr(_, subPats, _) + | TPat_array (subPats, _, _) + | TPat_unioncase (_, _, subPats, _) + | TPat_recd (_, _, subPats, _) -> List.exists isPatternDisjunctive subPats + | TPat_isinst (_, _, subPatOpt, _) -> Option.exists isPatternDisjunctive subPatOpt + | TPat_const _ -> false + | TPat_wild _ -> false + | TPat_range _ -> false + | TPat_null _ -> false + | TPat_error _ -> false //--------------------------------------------------------------------------- // The algorithm //--------------------------------------------------------------------------- type EdgeDiscrim = EdgeDiscrim of int * DecisionTreeTest * range -let getDiscrim (EdgeDiscrim(_, discrim, _)) = discrim +let getDiscrim (EdgeDiscrim(_, discrim, _)) = discrim let CompilePatternBasic (g: TcGlobals) denv amap tcVal infoReader exprm matchm @@ -853,7 +896,7 @@ let CompilePatternBasic // Note we don't emit sequence points at either the succeeding or failing targets of filters since if // the exception is filtered successfully then we will run the handler and hit the sequence point there. // That sequence point will have the pattern variables bound, which is exactly what we want. - let tg = TTarget([], throwExpr, DebugPointForTarget.No, None) + let tg = TTarget([], throwExpr, DebugPointAtTarget.No, None) let _ = matchBuilder.AddTarget tg let clause = TClause(TPat_wild matchm, None, tg, matchm) incompleteMatchClauseOnce <- Some clause @@ -933,39 +976,28 @@ let CompilePatternBasic match valMap.TryFind v with | None -> mkUnit g v.Range | Some res -> res) - let rhs' = TDSuccess(es2, i) + let successTree = TDSuccess(es2, i) match GetWhenGuardOfClause i refuted with | Some whenExpr -> - let m = whenExpr.Range + let whenExprWithBindings = mkLetsFromBindings m (mkInvisibleBinds vs2 es2) whenExpr + let failureTree = (InvestigateFrontiers (RefutedWhenClause :: refuted) rest) + mkBoolSwitch (DebugPointAtSwitch.Yes m) m whenExprWithBindings successTree failureTree - // SEQUENCE POINTS: REVIEW: Build a sequence point at 'when' - let whenExpr = mkLetsFromBindings m (mkInvisibleBinds vs2 es2) whenExpr - - // We must duplicate both the bindings and the guard expression to ensure uniqueness of bound variables. - // This is because guards and bindings can end up being compiled multiple times when "or" patterns are used. - // - // let whenExpr = copyExpr g CloneAll whenExpr - // - // However, we are not allowed to copy expressions until type checking is complete, because this - // would lose recursive fixup points within the expressions (see FSharp 1.0 bug 4821). - - mkBoolSwitch m whenExpr rhs' (InvestigateFrontiers (RefutedWhenClause :: refuted) rest) - - | None -> rhs' + | None -> successTree /// Select the set of discriminators which we can handle in one test, or as a series of iterated tests, /// e.g. in the case of TPat_isinst. Ensure we only take at most one class of `TPat_query` at a time. - /// Record the rule numbers so we know which rule the TPat_query cam from, so that when we project through + /// Record the clause numbers so we know which rule the TPat_query cam from, so that when we project through /// the frontier we only project the right rule. and ChooseSimultaneousEdges frontiers path = - frontiers |> chooseSimultaneousEdgeSet None (fun prevOpt (Frontier (i', active', _)) -> - if isMemOfActives path active' then - let _, p = lookupActive path active' - match getDiscrimOfPattern p with + frontiers |> chooseSimultaneousEdgeSet None (fun prevOpt (Frontier (i, active, _)) -> + if isMemOfActives path active then + let _, patAtActive = lookupActive path active + match getDiscrimOfPattern patAtActive with | Some discrim -> if (match prevOpt with None -> true | Some (EdgeDiscrim(_, discrimPrev, _)) -> discrimsHaveSameSimultaneousClass g discrim discrimPrev) then - Some (EdgeDiscrim(i', discrim, p.Range)) + Some (EdgeDiscrim(i, discrim, patAtActive.Range)) else None @@ -1135,10 +1167,10 @@ let CompilePatternBasic let simulSetOfDiscrims = simulSetOfCases |> List.map (fun c -> c.Discriminator) - let isRefuted (Frontier (_i', active', _)) = - isMemOfActives path active' && - let p = lookupActive path active' |> snd - match getDiscrimOfPattern p with + let isRefuted (Frontier (_i', active, _)) = + isMemOfActives path active && + let _, patAtActive = lookupActive path active + match getDiscrimOfPattern patAtActive with | Some discrim -> List.exists (isDiscrimSubsumedBy g amap exprm discrim) simulSetOfDiscrims | None -> false @@ -1162,31 +1194,33 @@ let CompilePatternBasic Some(InvestigateFrontiers refuted fallthroughPathFrontiers) // Build a new frontier that represents the result of a successful investigation - // at rule point (i', discrim, path) - and GenerateNewFrontiersAfterSuccessfulInvestigation inpExprOpt resPostBindOpt (Investigation(i', discrim, path)) (Frontier (i, active, valMap) as frontier) = + and GenerateNewFrontiersAfterSuccessfulInvestigation inpExprOpt resPostBindOpt investigation frontier = + let (Investigation(iInvestigated, discrim, path)) = investigation + let (Frontier (i, actives, valMap)) = frontier - if (isMemOfActives path active) then - let SubExpr(accessf, ve), pat = lookupActive path active + if isMemOfActives path actives then + let (subExprForActive, patAtActive) = lookupActive path actives + let (SubExpr(accessf, ve)) = subExprForActive - let mkSubFrontiers path accessf' active' argpats pathBuilder = + let mkSubFrontiers path subAccess subActive argpats pathBuilder = let mkSubActive j p = - let newSubExpr = SubExpr(accessf' j, ve) + let newSubExpr = SubExpr(subAccess j, ve) let newPath = pathBuilder path j Active(newPath, newSubExpr, p) let newActives = List.mapi mkSubActive argpats - let investigations = BindProjectionPatterns newActives (active', valMap) + let investigations = BindProjectionPatterns newActives (subActive, valMap) mkFrontiers investigations i - let active' = removeActive path active - match pat with + let newActives = removeActive path actives + match patAtActive with | TPat_wild _ | TPat_as _ | TPat_tuple _ | TPat_disjs _ | TPat_conjs _ | TPat_recd _ -> failwith "Unexpected projection pattern" | TPat_query ((_, resTys, isStructRetTy, apatVrefOpt, idx, apinfo), p, m) -> if apinfo.IsTotal then // Total active patterns always return choice values let hasParam = (match apatVrefOpt with None -> true | Some (vref, _) -> doesActivePatternHaveFreeTypars g vref) - if (hasParam && i = i') || (discrimsEq g discrim (Option.get (getDiscrimOfPattern pat))) then + if (hasParam && i = iInvestigated) || (discrimsEq g discrim (Option.get (getDiscrimOfPattern patAtActive))) then let aparity = apinfo.Names.Length - let accessf' j tpinst _e' = + let subAccess j tpinst _e' = assert inpExprOpt.IsSome if aparity <= 1 then Option.get inpExprOpt @@ -1195,7 +1229,7 @@ let CompilePatternBasic // TODO: In the future we will want active patterns to be able to return struct-unions // In that eventuality, we need to check we are taking the address correctly mkUnionCaseFieldGetUnprovenViaExprAddr (Option.get inpExprOpt, ucref, instTypes tpinst resTys, j, exprm) - mkSubFrontiers path accessf' active' [p] (fun path j -> PathQuery(path, int64 j)) + mkSubFrontiers path subAccess newActives [p] (fun path j -> PathQuery(path, int64 j)) elif hasParam then @@ -1205,15 +1239,15 @@ let CompilePatternBasic [] else // Partial active patterns always return options or value-options - if i = i' then - let accessf' _j tpinst _ = + if i = iInvestigated then + let subAccess _j tpinst _ = let expr = Option.get inpExprOpt if isStructRetTy then // In this case, the inpExprOpt is already an address-of expression mkUnionCaseFieldGetProvenViaExprAddr (expr, mkValueSomeCase g, instTypes tpinst resTys, 0, exprm) else mkUnionCaseFieldGetUnprovenViaExprAddr (expr, mkSomeCase g, instTypes tpinst resTys, 0, exprm) - mkSubFrontiers path accessf' active' [p] (fun path j -> PathQuery(path, int64 j)) + mkSubFrontiers path subAccess newActives [p] (fun path j -> PathQuery(path, int64 j)) else // Successful active patterns don't refute other patterns [frontier] @@ -1221,7 +1255,7 @@ let CompilePatternBasic | TPat_unioncase (ucref1, tyargs, argpats, _) -> match discrim with | DecisionTreeTest.UnionCase (ucref2, tinst) when g.unionCaseRefEq ucref1 ucref2 -> - let accessf' j tpinst exprIn = + let subAccess j tpinst exprIn = match resPostBindOpt with | Some e -> mkUnionCaseFieldGetProvenViaExprAddr (e, ucref1, tinst, j, exprm) | None -> @@ -1231,7 +1265,7 @@ let CompilePatternBasic | None -> accessf tpinst exprIn mkUnionCaseFieldGetUnprovenViaExprAddr (exprIn, ucref1, instTypes tpinst tyargs, j, exprm) - mkSubFrontiers path accessf' active' argpats (fun path j -> PathUnionConstr(path, ucref1, tyargs, j)) + mkSubFrontiers path subAccess newActives argpats (fun path j -> PathUnionConstr(path, ucref1, tyargs, j)) | DecisionTreeTest.UnionCase _ -> // Successful union case tests DO refute all other union case tests (no overlapping union cases) [] @@ -1242,8 +1276,8 @@ let CompilePatternBasic | TPat_array (argpats, ty, _) -> match discrim with | DecisionTreeTest.ArrayLength (n, _) when List.length argpats = n -> - let accessf' j tpinst exprIn = mkCallArrayGet g exprm ty (accessf tpinst exprIn) (mkInt g exprm j) - mkSubFrontiers path accessf' active' argpats (fun path j -> PathArray(path, ty, List.length argpats, j)) + let subAccess j tpinst exprIn = mkCallArrayGet g exprm ty (accessf tpinst exprIn) (mkInt g exprm j) + mkSubFrontiers path subAccess newActives argpats (fun path j -> PathArray(path, ty, List.length argpats, j)) // Successful length tests refute all other lengths | DecisionTreeTest.ArrayLength _ -> [] @@ -1253,8 +1287,8 @@ let CompilePatternBasic | TPat_exnconstr (ecref, argpats, _) -> match discrim with | DecisionTreeTest.IsInst (_srcTy, tgtTy) when typeEquiv g (mkAppTy ecref []) tgtTy -> - let accessf' j tpinst exprIn = mkExnCaseFieldGet(accessf tpinst exprIn, ecref, j, exprm) - mkSubFrontiers path accessf' active' argpats (fun path j -> PathExnConstr(path, ecref, j)) + let subAccess j tpinst exprIn = mkExnCaseFieldGet(accessf tpinst exprIn, ecref, j, exprm) + mkSubFrontiers path subAccess newActives argpats (fun path j -> PathExnConstr(path, ecref, j)) | _ -> // Successful type tests against one sealed type refute all other sealed types // REVIEW: Successful type tests against one sealed type should refute all other sealed types @@ -1265,17 +1299,18 @@ let CompilePatternBasic | DecisionTreeTest.IsInst (_srcTy, tgtTy2) when typeEquiv g tgtTy1 tgtTy2 -> match pbindOpt with | Some pbind -> - let accessf' tpinst exprIn = + let subAccess tpinst exprIn = // Fetch the result from the place where we saved it, if possible match inpExprOpt with | Some e -> e | _ -> // Otherwise call the helper mkCallUnboxFast g exprm (instType tpinst tgtTy1) (accessf tpinst exprIn) - BindProjectionPattern (Active(path, SubExpr(accessf', ve), pbind)) (active', valMap) - |> mkFrontiers <| i + let subActive = Active(path, SubExpr(subAccess, ve), pbind) + let subActives = BindProjectionPattern subActive (newActives, valMap) + mkFrontiers subActives i | None -> - [Frontier (i, active', valMap)] + [Frontier (i, newActives, valMap)] | _ -> // Successful type tests against other types don't refute anything @@ -1285,7 +1320,7 @@ let CompilePatternBasic | TPat_null _ -> match discrim with | DecisionTreeTest.IsNull -> - [Frontier (i, active', valMap)] + [Frontier (i, newActives, valMap)] | _ -> // Successful null tests don't refute any other patterns [frontier] @@ -1293,7 +1328,7 @@ let CompilePatternBasic | TPat_const (c1, _) -> match discrim with | DecisionTreeTest.Const c2 when (c1=c2) -> - [Frontier (i, active', valMap)] + [Frontier (i, newActives, valMap)] | DecisionTreeTest.Const _ -> // All constants refute all other constants (no overlapping between constants!) [] @@ -1303,7 +1338,7 @@ let CompilePatternBasic | TPat_error range -> match discrim with | DecisionTreeTest.Error testRange when range = testRange -> - [Frontier (i, active', valMap)] + [Frontier (i, newActives, valMap)] | _ -> [frontier] @@ -1312,64 +1347,74 @@ let CompilePatternBasic else [frontier] - and BindProjectionPattern (Active(path, subExpr, p) as inp) (accActive, accValMap as s) = - let (SubExpr(accessf, ve)) = subExpr - let mkSubActive pathBuilder accessf' j p' = - Active(pathBuilder path j, SubExpr(accessf' j, ve), p') + and BindProjectionPattern inpActive ((accActive, accValMap) as activeState) = - match p with + let (Active(inpPath, inpExpr, pat)) = inpActive + let (SubExpr(inpAccess, inpExprAndVal)) = inpExpr + let mkSubActive pathBuilder subAccess j p' = + Active(pathBuilder inpPath j, SubExpr(subAccess j, inpExprAndVal), p') + + match pat with | TPat_wild _ -> - BindProjectionPatterns [] s - | TPat_as(p', pbind, m) -> - let v, subExpr' = BindSubExprOfInput g amap origInputValTypars pbind m subExpr - BindProjectionPattern (Active(path, subExpr, p')) (accActive, accValMap.Add v subExpr' ) - | TPat_tuple(tupInfo, ps, tyargs, _m) -> - let accessf' j tpinst subExpr' = mkTupleFieldGet g (tupInfo, accessf tpinst subExpr', instTypes tpinst tyargs, j, exprm) + [activeState] + + | TPat_as(leftPat, asValBind, m) -> + let asVal, subExpr = BindSubExprOfInput g amap origInputValTypars asValBind m inpExpr + BindProjectionPattern (Active(inpPath, inpExpr, leftPat)) (accActive, accValMap.Add asVal subExpr ) + + | TPat_tuple(tupInfo, tupFieldPats, tyargs, _m) -> + let subAccess j tpinst subExpr = mkTupleFieldGet g (tupInfo, inpAccess tpinst subExpr, instTypes tpinst tyargs, j, exprm) let pathBuilder path j = PathTuple(path, tyargs, j) - let newActives = List.mapi (mkSubActive pathBuilder accessf') ps - BindProjectionPatterns newActives s - | TPat_recd(tcref, tinst, ps, _m) -> + let newActives = List.mapi (mkSubActive pathBuilder subAccess) tupFieldPats + BindProjectionPatterns newActives activeState + + | TPat_recd(tcref, tinst, recdFieldPats, _m) -> let newActives = - (ps, tcref.TrueInstanceFieldsAsRefList) ||> List.mapi2 (fun j p fref -> - let accessf' fref _j tpinst exprIn = mkRecdFieldGet g (accessf tpinst exprIn, fref, instTypes tpinst tinst, exprm) + (recdFieldPats, tcref.TrueInstanceFieldsAsRefList) ||> List.mapi2 (fun j recdFieldPat fref -> + let subAccess fref _j tpinst exprIn = mkRecdFieldGet g (inpAccess tpinst exprIn, fref, instTypes tpinst tinst, exprm) let pathBuilder path j = PathRecd(path, tcref, tinst, j) - mkSubActive pathBuilder (accessf' fref) j p) - BindProjectionPatterns newActives s - | TPat_disjs(ps, _m) -> - List.collect (fun p -> BindProjectionPattern (Active(path, subExpr, p)) s) ps - | TPat_conjs(ps, _m) -> - let newActives = List.mapi (mkSubActive (fun path j -> PathConj(path, j)) (fun _j -> accessf)) ps - BindProjectionPatterns newActives s + mkSubActive pathBuilder (subAccess fref) j recdFieldPat) + BindProjectionPatterns newActives activeState + + | TPat_disjs(subPats, _m) -> + subPats |> List.collect (fun subPat -> BindProjectionPattern (Active(inpPath, inpExpr, subPat)) activeState) + + | TPat_conjs(subPats, _m) -> + let newActives = List.mapi (mkSubActive (fun path j -> PathConj(path, j)) (fun _j -> inpAccess)) subPats + BindProjectionPatterns newActives activeState | TPat_range (c1, c2, m) -> let mutable res = [] for i = int c1 to int c2 do - res <- BindProjectionPattern (Active(path, subExpr, TPat_const(Const.Char(char i), m))) s @ res + res <- BindProjectionPattern (Active(inpPath, inpExpr, TPat_const(Const.Char(char i), m))) activeState @ res res + // Assign an identifier to each TPat_query based on our knowledge of the 'identity' of the active pattern, if any | TPat_query ((_, _, _, apatVrefOpt, _, _), _, _) -> let uniqId = match apatVrefOpt with | Some (vref, _) when not (doesActivePatternHaveFreeTypars g vref) -> vref.Stamp | _ -> genUniquePathId() - let inp = Active(PathQuery(path, uniqId), subExpr, p) + let inp = Active(PathQuery(inpPath, uniqId), inpExpr, pat) [(inp :: accActive, accValMap)] | _ -> - [(inp :: accActive, accValMap)] + [(inpActive :: accActive, accValMap)] - and BindProjectionPatterns ps s = - List.foldBack (fun p sofar -> List.collect (BindProjectionPattern p) sofar) ps [s] + and BindProjectionPatterns actives s = + List.foldBack (fun p sofar -> List.collect (BindProjectionPattern p) sofar) actives [s] // The setup routine of the match compiler. let frontiers = ((typedClauses |> List.mapi (fun i c -> let initialSubExpr = SubExpr((fun _ x -> x), (exprForVal origInputVal.Range origInputVal, origInputVal)) - let investigations = BindProjectionPattern (Active(PathEmpty inputTy, initialSubExpr, c.Pattern)) ([], ValMap<_>.Empty) + let initialActive = Active(PathEmpty inputTy, initialSubExpr, c.Pattern) + let investigations = BindProjectionPattern initialActive ([], ValMap<_>.Empty) mkFrontiers investigations i) |> List.concat) @ mkFrontiers [([], ValMap<_>.Empty)] nClauses) + let dtree = InvestigateFrontiers [] @@ -1387,33 +1432,113 @@ let CompilePatternBasic dtree, targets -let isPartialOrWhenClause (c: TypedMatchClause) = isPatternPartial c.Pattern || c.GuardExpr.IsSome +<<<<<<< HEAD +// Three pattern constructs can cause significant code expansion in various combinations +// - Partial active patterns +// - Disjunctive patterns +// - Pattern clauses with 'when' +// - isinst patterns +// +// Partial active patterns that are not the "last" thing in a clause, +// combined with subsequent clauses, can cause significant code expansion +// because they are decided on one by one. Each failure path expands out the subsequent +// clause logic (with the active pattern contributing no reduction of those subsequent +// clauses). Each success path expands out any subsequent logic in the clause plus +// subsequent clause logic. +// +// | ActivePat1, ActivePat2 -> ... +// | more-logic +// +// goes to +// switch (ActivePat1) +// switch (ActivePat2) +// --> tgt1 +// --> more-logic +// --> more-logic +// +// When a partial active pattern is used in the last meaningful position the clause is +// not problematic, e.g. +// +// | ActivePat1, ActivePat2 -> ... +// | more-logic +// +// So when generating code we take clauses up until the first one containing +// a partial pattern. This can lead to sub-standard code generation +// but has long been the technique we use to avoid blow-up of pattern matching. +// +// Disjunctive patterns combined with 'when' clauses can also cause signficant code +// expansion. In particular this leads to multiple copies of 'when' expressions (even for one clause) +// and each failure path of those 'when' will then continue on the expand any remaining +// pattern logic in subsequent clauses. So when generating code we take clauses up +// until the first one containing a disjunctive pattern with a 'when' clause. +// +// Disjunction will still cause significant expansion, e.g. +// (A | B), (C | D) -> +// is immediately expanded out to four frontiers each with two investigation points. +// A, C -> ... +// A, D -> ... +// B, C -> ... +// B, D -> ... +// +// Of course, some decision-logic expansion here is expected. Further, for unions, integers, characters, enums etc. +// the column-based matching on A/B and C/D eliminates these relatively efficiently, e.g. to +// one-switch-on-A/B +// on each path, one switch on C/D +// So disjunction alone isn't considered problematic, but in combination with 'when' patterns + +let isProblematicClause (clause: TypedMatchClause) = + let ips = + seq { + yield! investigationPoints clause.Pattern + if clause.GuardExpr.IsSome then + yield true + } |> Seq.toArray + let ips = if isPatternDisjunctive clause.Pattern then Array.append ips ips else ips + // Look for multiple decision points. + // We don't mind about the last logical decision point + ips.Length > 0 && Array.exists id ips.[0..ips.Length-2] +let rec CompilePattern g denv amap tcVal infoReader exprm matchm warnOnUnused actionOnFailure (origInputVal, origInputValTypars, origInputExprOpt) (clausesL: TypedMatchClause list) inputTy resultTy = + match clausesL with + | _ when List.exists isProblematicClause clausesL -> +======= +let isPartialOrWhenClause (c: TypedMatchClause) = isPatternPartial c.Pattern || c.GuardExpr.IsSome let rec CompilePattern g denv amap tcVal infoReader exprm matchm warnOnUnused actionOnFailure (origInputVal, origInputValTypars, origInputExprOpt) (clausesL: TypedMatchClause list) inputTy resultTy = match clausesL with | _ when List.exists isPartialOrWhenClause clausesL -> - // Partial clauses cause major code explosion if treated naively - // Hence treat any pattern matches with any partial clauses clause-by-clause +>>>>>>> ac2ce9141e3085029fe1bd14808babfb547ae543 // First make sure we generate at least some of the obvious incomplete match warnings. let warnOnUnused = false // we can't turn this on since we're pretending all partials fail in order to control the complexity of this. let warnOnIncomplete = true - let clausesPretendAllPartialFail = List.collect (fun (TClause(p, whenOpt, tg, m)) -> [TClause(erasePartialPatterns p, whenOpt, tg, m)]) clausesL + let clausesPretendAllPartialFail = clausesL |> List.collect (fun (TClause(p, whenOpt, tg, m)) -> [TClause(erasePartialPatterns p, whenOpt, tg, m)]) let _ = CompilePatternBasic g denv amap tcVal infoReader exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (origInputVal, origInputValTypars, origInputExprOpt) clausesPretendAllPartialFail inputTy resultTy let warnOnIncomplete = false + // Partial and when clauses cause major code explosion if treated naively + // Hence treat any pattern matches with any partial clauses clause-by-clause +<<<<<<< HEAD + let rec atMostOneProblematicClauseAtATime clauses = + match List.takeUntil isProblematicClause clauses with + | l, [] -> + CompilePatternBasic g denv amap tcVal infoReader exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (origInputVal, origInputValTypars, origInputExprOpt) l inputTy resultTy + | l, h :: t -> + // Add the problematic clause. + doGroupWithAtMostOneProblematic (l @ [h]) t +======= let rec atMostOnePartialAtATime clauses = match List.takeUntil isPartialOrWhenClause clauses with | l, [] -> CompilePatternBasic g denv amap tcVal infoReader exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (origInputVal, origInputValTypars, origInputExprOpt) l inputTy resultTy | l, h :: t -> - // Add the partial clause. + // Add the partial or when clause. doGroupWithAtMostOnePartial (l @ [h]) t +>>>>>>> ac2ce9141e3085029fe1bd14808babfb547ae543 - and doGroupWithAtMostOnePartial group rest = + and doGroupWithAtMostOneProblematic group rest = // Compile the remaining clauses. - let decisionTree, targets = atMostOnePartialAtATime rest + let decisionTree, targets = atMostOneProblematicClauseAtATime rest // Make the expression that represents the remaining cases of the pattern match. let expr = mkAndSimplifyMatch DebugPointAtBinding.NoneAtInvisible exprm matchm resultTy decisionTree targets @@ -1421,8 +1546,8 @@ let rec CompilePattern g denv amap tcVal infoReader exprm matchm warnOnUnused a // If the remainder of the match boiled away to nothing interesting. // We measure this simply by seeing if the range of the resulting expression is identical to matchm. let spTarget = - if equals expr.Range matchm then DebugPointForTarget.No - else DebugPointForTarget.Yes + if equals expr.Range matchm then DebugPointAtTarget.No + else DebugPointAtTarget.Yes // Make the clause that represents the remaining cases of the pattern match let clauseForRestOfMatch = TClause(TPat_wild matchm, None, TTarget(List.empty, expr, spTarget, None), matchm) @@ -1430,7 +1555,9 @@ let rec CompilePattern g denv amap tcVal infoReader exprm matchm warnOnUnused a CompilePatternBasic g denv amap tcVal infoReader exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (origInputVal, origInputValTypars, origInputExprOpt) (group @ [clauseForRestOfMatch]) inputTy resultTy - atMostOnePartialAtATime clausesL + atMostOneProblematicClauseAtATime clausesL | _ -> CompilePatternBasic g denv amap tcVal infoReader exprm matchm warnOnUnused true actionOnFailure (origInputVal, origInputValTypars, origInputExprOpt) clausesL inputTy resultTy +type IA = + abstract X: int -> int \ No newline at end of file diff --git a/src/fsharp/PostInferenceChecks.fs b/src/fsharp/PostInferenceChecks.fs index e230643baa4..6e0e9f36076 100644 --- a/src/fsharp/PostInferenceChecks.fs +++ b/src/fsharp/PostInferenceChecks.fs @@ -1777,7 +1777,7 @@ and CheckDecisionTree cenv env x = | TDBind(bind, rest) -> CheckBinding cenv env false PermitByRefExpr.Yes bind |> ignore CheckDecisionTree cenv env rest - | TDSwitch (e, cases, dflt, m) -> + | TDSwitch (_, e, cases, dflt, m) -> CheckDecisionTreeSwitch cenv env (e, cases, dflt, m) and CheckDecisionTreeSwitch cenv env (e, cases, dflt, m) = diff --git a/src/fsharp/QuotationTranslator.fs b/src/fsharp/QuotationTranslator.fs index 04177155d07..abcf0a16a0d 100644 --- a/src/fsharp/QuotationTranslator.fs +++ b/src/fsharp/QuotationTranslator.fs @@ -200,7 +200,7 @@ let (|ObjectInitializationCheck|_|) g expr = ( _, _, TDSwitch - ( + (_, Expr.Op (TOp.ILAsm ([AI_clt], _), _, [Expr.Op (TOp.ValFieldGet (RecdFieldRef(_, name)), _, [Expr.Val (selfRef, NormalValUse, _)], _); Expr.Const (Const.Int32 1, _, _)], _), _, _, _ ), [| TTarget([], Expr.App (Expr.Val (failInitRef, _, _), _, _, _, _), _, _); _ |], _, resultTy @@ -1043,7 +1043,7 @@ and ConvConst cenv env m c ty = and ConvDecisionTree cenv env tgs typR x = match x with - | TDSwitch(e1, csl, dfltOpt, m) -> + | TDSwitch(_, e1, csl, dfltOpt, m) -> let acc = match dfltOpt with | Some d -> ConvDecisionTree cenv env tgs typR d diff --git a/src/fsharp/SyntaxTree.fs b/src/fsharp/SyntaxTree.fs index d5c1afdd54d..35fb935e6c0 100644 --- a/src/fsharp/SyntaxTree.fs +++ b/src/fsharp/SyntaxTree.fs @@ -169,10 +169,15 @@ type SynAccess = | Private -> "Private" [] -type DebugPointForTarget = +type DebugPointAtTarget = | Yes | No +[] +type DebugPointAtSwitch = + | Yes of range + | No + [] type DebugPointAtSequential = | SuppressNeither @@ -1150,7 +1155,7 @@ type SynMatchClause = arrow: Range option * resultExpr: SynExpr * range: range * - debugPoint: DebugPointForTarget + debugPoint: DebugPointAtTarget member this.RangeOfGuardAndRhs = match this with diff --git a/src/fsharp/SyntaxTree.fsi b/src/fsharp/SyntaxTree.fsi index bddc0c8cc5d..cb51521b079 100644 --- a/src/fsharp/SyntaxTree.fsi +++ b/src/fsharp/SyntaxTree.fsi @@ -214,10 +214,18 @@ type SynAccess = /// of a decision tree, that is whether the construct corresponds to a debug /// point in the original source. [] -type DebugPointForTarget = +type DebugPointAtTarget = | Yes | No +/// Represents whether a debug point should be present at the switch +/// logic of a decision tree. These are introduced for 'when' expressions +/// and the encoding of 'a && b', 'a || b' +[] +type DebugPointAtSwitch = + | Yes of range + | No + /// Represents whether a debug point should be suppressed for either the /// first or second part of a sequential execution, that is whether the /// construct corresponds to a debug point in the original source. @@ -1283,7 +1291,7 @@ type SynMatchClause = arrow: Range option * resultExpr: SynExpr * range: range * - debugPoint: DebugPointForTarget + debugPoint: DebugPointAtTarget /// Gets the syntax range of part of this construct member RangeOfGuardAndRhs: range diff --git a/src/fsharp/SyntaxTreeOps.fs b/src/fsharp/SyntaxTreeOps.fs index 87bf172d0de..3b04005ad5f 100644 --- a/src/fsharp/SyntaxTreeOps.fs +++ b/src/fsharp/SyntaxTreeOps.fs @@ -179,8 +179,9 @@ let rec SimplePatOfPat (synArgNameGenerator: SynArgNameGenerator) p = | SynPat.Wild _ -> None | _ -> Some (fun e -> - let clause = SynMatchClause(p, None, None, e, m, DebugPointForTarget.No) - SynExpr.Match (DebugPointAtBinding.NoneAtInvisible, item, [clause], clause.Range)) + let clause = SynMatchClause(p, None, None, e, m, DebugPointAtTarget.No) + let artificialMatchRange = (unionRanges m e.Range).MakeSynthetic() + SynExpr.Match (DebugPointAtBinding.NoneAtInvisible, item, [clause], artificialMatchRange)) SynSimplePat.Id (id, altNameRefCell, isCompGen, false, false, id.idRange), fn diff --git a/src/fsharp/TypedTree.fs b/src/fsharp/TypedTree.fs index 800d4b361e5..cfc59f2f0bf 100644 --- a/src/fsharp/TypedTree.fs +++ b/src/fsharp/TypedTree.fs @@ -4226,7 +4226,7 @@ type DecisionTree = /// cases -- The list of tests and their subsequent decision trees /// default -- The default decision tree, if any /// range -- (precise documentation needed) - | TDSwitch of input: Expr * cases: DecisionTreeCase list * defaultOpt: DecisionTree option * range: range + | TDSwitch of debugPoint: DebugPointAtSwitch * input: Expr * cases: DecisionTreeCase list * defaultOpt: DecisionTree option * range: range /// TDSuccess(results, targets) /// @@ -4322,7 +4322,7 @@ type DecisionTreeTarget = | TTarget of boundVals: Val list * targetExpr: Expr * - debugPoint: DebugPointForTarget * + debugPoint: DebugPointAtTarget * isStateVarFlags: bool list option [] diff --git a/src/fsharp/TypedTreeOps.fs b/src/fsharp/TypedTreeOps.fs index f9243284aee..31caa80de93 100644 --- a/src/fsharp/TypedTreeOps.fs +++ b/src/fsharp/TypedTreeOps.fs @@ -1208,15 +1208,16 @@ type MatchBuilder(spBind, inpRange: range) = member x.Close(dtree, m, ty) = primMkMatch (spBind, inpRange, dtree, targets.ToArray(), m, ty) -let mkBoolSwitch m g t e = TDSwitch(g, [TCase(DecisionTreeTest.Const(Const.Bool true), t)], Some e, m) +let mkBoolSwitch debugPoint m g t e = + TDSwitch(debugPoint, g, [TCase(DecisionTreeTest.Const(Const.Bool true), t)], Some e, m) let primMkCond spBind spTarget1 spTarget2 m ty e1 e2 e3 = let mbuilder = MatchBuilder(spBind, m) - let dtree = mkBoolSwitch m e1 (mbuilder.AddResultTarget(e2, spTarget1)) (mbuilder.AddResultTarget(e3, spTarget2)) + let dtree = mkBoolSwitch DebugPointAtSwitch.No m e1 (mbuilder.AddResultTarget(e2, spTarget1)) (mbuilder.AddResultTarget(e3, spTarget2)) mbuilder.Close(dtree, m, ty) -let mkCond spBind spTarget m ty e1 e2 e3 = primMkCond spBind spTarget spTarget m ty e1 e2 e3 - +let mkCond spBind spTarget m ty e1 e2 e3 = + primMkCond spBind spTarget spTarget m ty e1 e2 e3 //--------------------------------------------------------------------------- // Primitive constructors @@ -1340,22 +1341,38 @@ let isBeingGeneralized tp typeScheme = // Build conditional expressions... //------------------------------------------------------------------------- -let mkLazyAnd (g: TcGlobals) m e1 e2 = mkCond DebugPointAtBinding.NoneAtSticky DebugPointForTarget.No m g.bool_ty e1 e2 (Expr.Const (Const.Bool false, m, g.bool_ty)) -let mkLazyOr (g: TcGlobals) m e1 e2 = mkCond DebugPointAtBinding.NoneAtSticky DebugPointForTarget.No m g.bool_ty e1 (Expr.Const (Const.Bool true, m, g.bool_ty)) e2 +let mkBool (g: TcGlobals) m b = Expr.Const (Const.Bool b, m, g.bool_ty) + +let mkTrue g m = mkBool g m true + +let mkFalse g m = mkBool g m false + +let mkLazyOr (g: TcGlobals) m e1 e2 = + mkCond DebugPointAtBinding.NoneAtSticky DebugPointAtTarget.No m g.bool_ty e1 (mkTrue g m) e2 + +let mkLazyAnd (g: TcGlobals) m e1 e2 = + mkCond DebugPointAtBinding.NoneAtSticky DebugPointAtTarget.No m g.bool_ty e1 e2 (mkFalse g m) let mkCoerceExpr(e, to_ty, m, from_ty) = Expr.Op (TOp.Coerce, [to_ty;from_ty], [e], m) let mkAsmExpr (code, tinst, args, rettys, m) = Expr.Op (TOp.ILAsm (code, rettys), tinst, args, m) + let mkUnionCaseExpr(uc, tinst, args, m) = Expr.Op (TOp.UnionCase uc, tinst, args, m) + let mkExnExpr(uc, args, m) = Expr.Op (TOp.ExnConstr uc, [], args, m) + let mkTupleFieldGetViaExprAddr(tupInfo, e, tinst, i, m) = Expr.Op (TOp.TupleFieldGet (tupInfo, i), tinst, [e], m) + let mkAnonRecdFieldGetViaExprAddr(anonInfo, e, tinst, i, m) = Expr.Op (TOp.AnonRecdGet (anonInfo, i), tinst, [e], m) let mkRecdFieldGetViaExprAddr (e, fref, tinst, m) = Expr.Op (TOp.ValFieldGet fref, tinst, [e], m) + let mkRecdFieldGetAddrViaExprAddr(readonly, e, fref, tinst, m) = Expr.Op (TOp.ValFieldGetAddr (fref, readonly), tinst, [e], m) let mkStaticRecdFieldGetAddr(readonly, fref, tinst, m) = Expr.Op (TOp.ValFieldGetAddr (fref, readonly), tinst, [], m) + let mkStaticRecdFieldGet (fref, tinst, m) = Expr.Op (TOp.ValFieldGet fref, tinst, [], m) + let mkStaticRecdFieldSet(fref, tinst, e, m) = Expr.Op (TOp.ValFieldSet fref, tinst, [e], m) let mkArrayElemAddress g (readonly, ilInstrReadOnlyAnnotation, isNativePtr, shape, elemTy, exprs, m) = @@ -4095,7 +4112,7 @@ module DebugPrint = (bind @@ decisionTreeL g body) | TDSuccess (args, n) -> wordL(tagText "Success") ^^ leftL(tagText "T") ^^ intL n ^^ tupleL (args |> List.map (exprL g)) - | TDSwitch (test, dcases, dflt, _) -> + | TDSwitch (_, test, dcases, dflt, _) -> (wordL(tagText "Switch") --- exprL g test) @@-- (aboveListL (List.map (dcaseL g) dcases) @@ match dflt with @@ -4596,7 +4613,7 @@ and accFreeInTest (opts: FreeVarOptions) discrim acc = and accFreeInDecisionTree opts x (acc: FreeVars) = match x with - | TDSwitch(e1, csl, dflt, _) -> accFreeInExpr opts e1 (accFreeInSwitchCases opts csl dflt acc) + | TDSwitch(_, e1, csl, dflt, _) -> accFreeInExpr opts e1 (accFreeInSwitchCases opts csl dflt acc) | TDSuccess (es, _) -> accFreeInFlatExprs opts es acc | TDBind (bind, body) -> unionFreeVars (bindLhs opts bind (accBindRhs opts bind (freeInDecisionTree opts body))) acc @@ -5417,10 +5434,11 @@ and remapFlatExprs g compgen tmenv es = List.mapq (remapExpr g compgen tmenv) es and remapDecisionTree g compgen tmenv x = match x with - | TDSwitch(e1, csl, dflt, m) -> - TDSwitch(remapExpr g compgen tmenv e1, - List.map (fun (TCase(test, y)) -> - let test' = + | TDSwitch(sp, e1, cases, dflt, m) -> + let e1R = remapExpr g compgen tmenv e1 + let casesR = + cases |> List.map (fun (TCase(test, subTree)) -> + let testR = match test with | DecisionTreeTest.UnionCase (uc, tinst) -> DecisionTreeTest.UnionCase(remapUnionCaseRef tmenv.tyconRefRemap uc, remapTypes tmenv tinst) | DecisionTreeTest.ArrayLength (n, ty) -> DecisionTreeTest.ArrayLength(n, remapType tmenv ty) @@ -5429,11 +5447,14 @@ and remapDecisionTree g compgen tmenv x = | DecisionTreeTest.IsNull -> DecisionTreeTest.IsNull | DecisionTreeTest.ActivePatternCase _ -> failwith "DecisionTreeTest.ActivePatternCase should only be used during pattern match compilation" | DecisionTreeTest.Error(m) -> DecisionTreeTest.Error(m) - TCase(test', remapDecisionTree g compgen tmenv y)) csl, - Option.map (remapDecisionTree g compgen tmenv) dflt, - m) + let subTreeR = remapDecisionTree g compgen tmenv subTree + TCase(testR, subTreeR)) + let dfltR = Option.map (remapDecisionTree g compgen tmenv) dflt + TDSwitch(sp, e1R, casesR, dfltR, m) + | TDSuccess (es, n) -> TDSuccess (remapFlatExprs g compgen tmenv es, n) + | TDBind (bind, rest) -> let bind', tmenvinner = copyAndRemapAndBindBinding g compgen tmenv bind TDBind (bind', remapDecisionTree g compgen tmenvinner rest) @@ -5747,7 +5768,7 @@ let rec remarkExpr m x = Expr.Let (remarkBind m bind, remarkExpr m e, m, fvs) | Expr.Match (_, _, pt, targets, _, ty) -> - let targetsR = targets |> Array.map (fun (TTarget(vs, e, _, flags)) -> TTarget(vs, remarkExpr m e, DebugPointForTarget.No, flags)) + let targetsR = targets |> Array.map (fun (TTarget(vs, e, _, flags)) -> TTarget(vs, remarkExpr m e, DebugPointAtTarget.No, flags)) primMkMatch (DebugPointAtBinding.NoneAtInvisible, m, remarkDecisionTree m pt, targetsR, m, ty) | Expr.Val (x, valUseFlags, _) -> @@ -5852,9 +5873,11 @@ and remarkFlatExprs m es = es |> List.map (remarkExpr m) and remarkDecisionTree m x = match x with - | TDSwitch(e1, csl, dflt, _) -> - let cslR = csl |> List.map (fun (TCase(test, y)) -> TCase(test, remarkDecisionTree m y)) - TDSwitch(remarkExpr m e1, cslR, Option.map (remarkDecisionTree m) dflt, m) + | TDSwitch(sp, e1, cases, dflt, _) -> + let e1R = remarkExpr m e1 + let casesR = cases |> List.map (fun (TCase(test, y)) -> TCase(test, remarkDecisionTree m y)) + let dfltR = Option.map (remarkDecisionTree m) dflt + TDSwitch(sp, e1R, casesR, Option.map (remarkDecisionTree m) dfltR, m) | TDSuccess (es, n) -> TDSuccess (remarkFlatExprs m es, n) | TDBind (bind, rest) -> @@ -6091,7 +6114,7 @@ let mkTyAppExpr m (f, fty) tyargs = match tyargs with [] -> f | _ -> primMkApp ( let rec accTargetsOfDecisionTree tree acc = match tree with - | TDSwitch (_, cases, dflt, _) -> + | TDSwitch (_, _, cases, dflt, _) -> List.foldBack (fun (c: DecisionTreeCase) -> accTargetsOfDecisionTree c.CaseTree) cases (Option.foldBack accTargetsOfDecisionTree dflt acc) | TDSuccess (_, i) -> i :: acc @@ -6099,7 +6122,10 @@ let rec accTargetsOfDecisionTree tree acc = let rec mapTargetsOfDecisionTree f tree = match tree with - | TDSwitch (e, cases, dflt, m) -> TDSwitch (e, List.map (mapTargetsOfDecisionTreeCase f) cases, Option.map (mapTargetsOfDecisionTree f) dflt, m) + | TDSwitch (sp, e, cases, dflt, m) -> + let casesR = cases |> List.map (mapTargetsOfDecisionTreeCase f) + let dfltR = Option.map (mapTargetsOfDecisionTree f) dflt + TDSwitch (sp, e, casesR, dfltR, m) | TDSuccess (es, i) -> TDSuccess(es, f i) | TDBind (bind, rest) -> TDBind(bind, mapTargetsOfDecisionTree f rest) @@ -6132,7 +6158,7 @@ let rec targetOfSuccessDecisionTree tree = /// Check a decision tree only has bindings that immediately cover a 'Success' let rec decisionTreeHasNonTrivialBindings tree = match tree with - | TDSwitch (_, cases, dflt, _) -> + | TDSwitch (_, _, cases, dflt, _) -> cases |> List.exists (fun c -> decisionTreeHasNonTrivialBindings c.CaseTree) || dflt |> Option.exists decisionTreeHasNonTrivialBindings | TDSuccess _ -> false @@ -6152,9 +6178,10 @@ let foldLinearBindingTargetsOfMatch tree (targets: _[]) = // Build a map showing how each target might be reached let rec accumulateTipsOfDecisionTree accBinds tree = match tree with - | TDSwitch (_, cases, dflt, _) -> + | TDSwitch (_, _, cases, dflt, _) -> assert (isNil accBinds) // No switches under bindings - for edge in cases do accumulateTipsOfDecisionTree accBinds edge.CaseTree + for edge in cases do + accumulateTipsOfDecisionTree accBinds edge.CaseTree match dflt with | None -> () | Some tree -> accumulateTipsOfDecisionTree accBinds tree @@ -6184,7 +6211,10 @@ let foldLinearBindingTargetsOfMatch tree (targets: _[]) = | Some i when isLinearTgtIdx i -> TDSuccess([], i) | _ -> match tree with - | TDSwitch (e, cases, dflt, m) -> TDSwitch (e, List.map rebuildDecisionTreeEdge cases, Option.map rebuildDecisionTree dflt, m) + | TDSwitch (sp, e, cases, dflt, m) -> + let casesR = List.map rebuildDecisionTreeEdge cases + let dfltR = Option.map rebuildDecisionTree dflt + TDSwitch (sp, e, casesR, dfltR, m) | TDSuccess _ -> tree | TDBind _ -> tree @@ -6240,8 +6270,7 @@ type Mutates = AddressOfOp | DefinitelyMutates | PossiblyMutates | NeverMutates exception DefensiveCopyWarning of string * range let isRecdOrStructTyconRefAssumedImmutable (g: TcGlobals) (tcref: TyconRef) = - tcref.CanDeref && - not (isRecdOrUnionOrStructTyconRefDefinitelyMutable tcref) || + (tcref.CanDeref && not (isRecdOrUnionOrStructTyconRefDefinitelyMutable tcref)) || tyconRefEq g tcref g.decimal_tcr || tyconRefEq g tcref g.date_tcr @@ -6725,7 +6754,7 @@ type ExprFolders<'State> (folders: ExprFolder<'State>) = let z = valBindF true z bind dtreeF z rest | TDSuccess (args, _) -> exprsF z args - | TDSwitch (test, dcases, dflt, _) -> + | TDSwitch (_, test, dcases, dflt, _) -> let z = exprF z test let z = List.fold dcaseF z dcases let z = Option.fold dtreeF z dflt @@ -6799,16 +6828,10 @@ let ExprStats x = let mkString (g: TcGlobals) m n = Expr.Const (Const.String n, m, g.string_ty) -let mkBool (g: TcGlobals) m b = Expr.Const (Const.Bool b, m, g.bool_ty) - let mkByte (g: TcGlobals) m b = Expr.Const (Const.Byte b, m, g.byte_ty) let mkUInt16 (g: TcGlobals) m b = Expr.Const (Const.UInt16 b, m, g.uint16_ty) -let mkTrue g m = mkBool g m true - -let mkFalse g m = mkBool g m false - let mkUnit (g: TcGlobals) m = Expr.Const (Const.Unit, m, g.unit_ty) let mkInt32 (g: TcGlobals) m n = Expr.Const (Const.Int32 n, m, g.int32_ty) @@ -8464,43 +8487,54 @@ let canUseUnboxFast g m ty = // Nullness tests and pokes //-------------------------------------------------------------------------- -(* match inp with :? ty as v -> e2[v] | _ -> e3 *) +// Generates the logical equivalent of +// match inp with :? ty as v -> e2[v] | _ -> e3 +// +// No sequence point is generated for this expression form as this function is only +// used for compiler-generated code. let mkIsInstConditional g m tgty vinpe v e2 e3 = - // No sequence point for this compiler generated expression form if canUseTypeTestFast g tgty then let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m) - let tg2 = mbuilder.AddResultTarget(e2, DebugPointForTarget.No) - let tg3 = mbuilder.AddResultTarget(e3, DebugPointForTarget.No) - let dtree = TDSwitch(exprForVal m v, [TCase(DecisionTreeTest.IsNull, tg3)], Some tg2, m) + let tg2 = mbuilder.AddResultTarget(e2, DebugPointAtTarget.No) + let tg3 = mbuilder.AddResultTarget(e3, DebugPointAtTarget.No) + let dtree = TDSwitch(DebugPointAtSwitch.No, exprForVal m v, [TCase(DecisionTreeTest.IsNull, tg3)], Some tg2, m) let expr = mbuilder.Close(dtree, m, tyOfExpr g e2) mkCompGenLet m v (mkIsInst tgty vinpe m) expr else let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m) - let tg2 = TDSuccess([mkCallUnbox g m tgty vinpe], mbuilder.AddTarget(TTarget([v], e2, DebugPointForTarget.No, None))) - let tg3 = mbuilder.AddResultTarget(e3, DebugPointForTarget.No) - let dtree = TDSwitch(vinpe, [TCase(DecisionTreeTest.IsInst(tyOfExpr g vinpe, tgty), tg2)], Some tg3, m) + let tg2 = TDSuccess([mkCallUnbox g m tgty vinpe], mbuilder.AddTarget(TTarget([v], e2, DebugPointAtTarget.No, None))) + let tg3 = mbuilder.AddResultTarget(e3, DebugPointAtTarget.No) + let dtree = TDSwitch(DebugPointAtSwitch.No, vinpe, [TCase(DecisionTreeTest.IsInst(tyOfExpr g vinpe, tgty), tg2)], Some tg3, m) let expr = mbuilder.Close(dtree, m, tyOfExpr g e2) expr -// Null tests are generated by -// 1. The compilation of array patterns in the pattern match compiler -// 2. The compilation of string patterns in the pattern match compiler +// Called for when creating compiled form of 'let fixed ...'. +// +// No sequence point is generated for this expression form as this function is only +// used for compiler-generated code. let mkNullTest g m e1 e2 e3 = - let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m) - let tg2 = mbuilder.AddResultTarget(e2, DebugPointForTarget.No) - let tg3 = mbuilder.AddResultTarget(e3, DebugPointForTarget.No) - let dtree = TDSwitch(e1, [TCase(DecisionTreeTest.IsNull, tg3)], Some tg2, m) - let expr = mbuilder.Close(dtree, m, tyOfExpr g e2) - expr - -let mkNonNullTest (g: TcGlobals) m e = mkAsmExpr ([ AI_ldnull ; AI_cgt_un ], [], [e], [g.bool_ty], m) - -let mkNonNullCond g m ty e1 e2 e3 = mkCond DebugPointAtBinding.NoneAtSticky DebugPointForTarget.No m ty (mkNonNullTest g m e1) e2 e3 - -let mkIfThen (g: TcGlobals) m e1 e2 = mkCond DebugPointAtBinding.NoneAtSticky DebugPointForTarget.No m g.unit_ty e1 e2 (mkUnit g m) + let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m) + let tg2 = mbuilder.AddResultTarget(e2, DebugPointAtTarget.No) + let tg3 = mbuilder.AddResultTarget(e3, DebugPointAtTarget.No) + let dtree = TDSwitch(DebugPointAtSwitch.No, e1, [TCase(DecisionTreeTest.IsNull, tg3)], Some tg2, m) + let expr = mbuilder.Close(dtree, m, tyOfExpr g e2) + expr + +let mkNonNullTest (g: TcGlobals) m e = + mkAsmExpr ([ AI_ldnull ; AI_cgt_un ], [], [e], [g.bool_ty], m) + +// No sequence point is generated for this expression form as this function is only +// used for compiler-generated code. +let mkNonNullCond g m ty e1 e2 e3 = + mkCond DebugPointAtBinding.NoneAtSticky DebugPointAtTarget.No m ty (mkNonNullTest g m e1) e2 e3 + +// No sequence point is generated for this expression form as this function is only +// used for compiler-generated code. +let mkIfThen (g: TcGlobals) m e1 e2 = + mkCond DebugPointAtBinding.NoneAtSticky DebugPointAtTarget.No m g.unit_ty e1 e2 (mkUnit g m) let ModuleNameIsMangled g attrs = match TryFindFSharpInt32Attribute g g.attrib_CompilationRepresentationAttribute attrs with @@ -8816,23 +8850,24 @@ and rewriteFlatExprs env exprs = List.mapq (RewriteExpr env) exprs and RewriteDecisionTree env x = match x with | TDSuccess (es, n) -> - let es' = rewriteFlatExprs env es - if LanguagePrimitives.PhysicalEquality es es' then x - else TDSuccess(es', n) + let esR = rewriteFlatExprs env es + if LanguagePrimitives.PhysicalEquality es esR then x + else TDSuccess(esR, n) - | TDSwitch (e, cases, dflt, m) -> - let e' = RewriteExpr env e - let cases' = List.map (fun (TCase(discrim, e)) -> TCase(discrim, RewriteDecisionTree env e)) cases - let dflt' = Option.map (RewriteDecisionTree env) dflt - TDSwitch (e', cases', dflt', m) + | TDSwitch (sp, e, cases, dflt, m) -> + let eR = RewriteExpr env e + let casesR = List.map (fun (TCase(discrim, e)) -> TCase(discrim, RewriteDecisionTree env e)) cases + let dfltR = Option.map (RewriteDecisionTree env) dflt + TDSwitch (sp, eR, casesR, dfltR, m) | TDBind (bind, body) -> - let bind' = rewriteBind env bind - let body = RewriteDecisionTree env body - TDBind (bind', body) + let bindR = rewriteBind env bind + let bodyR = RewriteDecisionTree env body + TDBind (bindR, bodyR) and rewriteTarget env (TTarget(vs, e, spTarget, flags)) = - TTarget(vs, RewriteExpr env e, spTarget, flags) + let eR = RewriteExpr env e + TTarget(vs, eR, spTarget, flags) and rewriteTargets env targets = List.map (rewriteTarget env) (Array.toList targets) @@ -9054,15 +9089,23 @@ let IsSimpleSyntacticConstantExpr g inputExpr = and checkDecisionTree vrefs x = match x with | TDSuccess (es, _n) -> es |> List.forall (checkExpr vrefs) - | TDSwitch (e, cases, dflt, _m) -> checkExpr vrefs e && cases |> List.forall (checkDecisionTreeCase vrefs) && dflt |> Option.forall (checkDecisionTree vrefs) - | TDBind (bind, body) -> checkExpr vrefs bind.Expr && checkDecisionTree (vrefs.Add bind.Var.Stamp) body + | TDSwitch (_, e, cases, dflt, _m) -> + checkExpr vrefs e && + cases |> List.forall (checkDecisionTreeCase vrefs) && + dflt |> Option.forall (checkDecisionTree vrefs) + | TDBind (bind, body) -> + checkExpr vrefs bind.Expr && + checkDecisionTree (vrefs.Add bind.Var.Stamp) body and checkDecisionTreeCase vrefs (TCase(discrim, dtree)) = - (match discrim with DecisionTreeTest.Const _c -> true | _ -> false) && checkDecisionTree vrefs dtree + (match discrim with + | DecisionTreeTest.Const _c -> true + | _ -> false) && + checkDecisionTree vrefs dtree and checkDecisionTreeTarget vrefs (TTarget(vs, e, _, _)) = - let vrefs = ((vrefs, vs) ||> List.fold (fun s v -> s.Add v.Stamp)) - checkExpr vrefs e + let vrefs = ((vrefs, vs) ||> List.fold (fun s v -> s.Add v.Stamp)) + checkExpr vrefs e checkExpr Set.empty inputExpr @@ -9434,9 +9477,9 @@ let (|UseResumableStateMachinesExpr|_|) g expr = | _ -> None /// Match -let (|IsThenElseExpr|_|) expr = +let (|IfThenElseExpr|_|) expr = match expr with - | Expr.Match (_spBind, _exprm, TDSwitch(cond, [ TCase( DecisionTreeTest.Const (Const.Bool true), TDSuccess ([], 0) )], Some (TDSuccess ([], 1)), _), + | Expr.Match (_spBind, _exprm, TDSwitch(_spSwitch, cond, [ TCase( DecisionTreeTest.Const (Const.Bool true), TDSuccess ([], 0) )], Some (TDSuccess ([], 1)), _), [| TTarget([], thenExpr, _, _); TTarget([], elseExpr, _, _) |], _m, _ty) -> Some (cond, thenExpr, elseExpr) | _ -> None @@ -9444,7 +9487,7 @@ let (|IsThenElseExpr|_|) expr = /// if __useResumableCode then ... else ... let (|IfUseResumableStateMachinesExpr|_|) g expr = match expr with - | IsThenElseExpr(UseResumableStateMachinesExpr g (), thenExpr, elseExpr) -> Some (thenExpr, elseExpr) + | IfThenElseExpr(UseResumableStateMachinesExpr g (), thenExpr, elseExpr) -> Some (thenExpr, elseExpr) | _ -> None /// Combine a list of ModuleOrNamespaceType's making up the description of a CCU. checking there are now @@ -9543,11 +9586,11 @@ let (|TryWithExpr|_|) expr = let (|MatchTwoCasesExpr|_|) expr = match expr with - | Expr.Match (spBind, exprm, TDSwitch(cond, [ TCase( DecisionTreeTest.UnionCase (ucref, a), TDSuccess ([], tg1) )], Some (TDSuccess ([], tg2)), b), tgs, m, ty) -> + | Expr.Match (spBind, exprm, TDSwitch(spSwitch, cond, [ TCase( DecisionTreeTest.UnionCase (ucref, a), TDSuccess ([], tg1) )], Some (TDSuccess ([], tg2)), b), tgs, m, ty) -> // How to rebuild this construct let rebuild (cond, ucref, tg1, tg2, tgs) = - Expr.Match (spBind, exprm, TDSwitch(cond, [ TCase( DecisionTreeTest.UnionCase (ucref, a), TDSuccess ([], tg1) )], Some (TDSuccess ([], tg2)), b), tgs, m, ty) + Expr.Match (spBind, exprm, TDSwitch(spSwitch, cond, [ TCase( DecisionTreeTest.UnionCase (ucref, a), TDSuccess ([], tg1) )], Some (TDSuccess ([], tg2)), b), tgs, m, ty) Some (cond, ucref, tg1, tg2, tgs, rebuild) @@ -9657,3 +9700,6 @@ let (|ResumableCodeInvoke|_|) g expr = Some (iref, f, args, m, (fun (f2, args2) -> Expr.App ((iref, a, b, (f2 :: args2), m)))) | _ -> None +let mkDebugPoint g m expr = + mkThenDoSequential DebugPointAtSequential.SuppressStmt m expr (mkUnit g m) + diff --git a/src/fsharp/TypedTreeOps.fsi b/src/fsharp/TypedTreeOps.fsi index 683aaf5ca5b..8963d7d9222 100755 --- a/src/fsharp/TypedTreeOps.fsi +++ b/src/fsharp/TypedTreeOps.fsi @@ -77,7 +77,7 @@ type MatchBuilder = member AddTarget: DecisionTreeTarget -> int /// Add a new destination target that is an expression result - member AddResultTarget: Expr * DebugPointForTarget -> DecisionTree + member AddResultTarget: Expr * DebugPointAtTarget -> DecisionTree /// Finish the targets member CloseTargets: unit -> DecisionTreeTarget list @@ -86,13 +86,13 @@ type MatchBuilder = member Close: DecisionTree * range * TType -> Expr /// Add an if-then-else boolean conditional node into a decision tree -val mkBoolSwitch: range -> Expr -> DecisionTree -> DecisionTree -> DecisionTree +val mkBoolSwitch: DebugPointAtSwitch -> range -> Expr -> DecisionTree -> DecisionTree -> DecisionTree /// Build a conditional expression -val primMkCond: DebugPointAtBinding -> DebugPointForTarget -> DebugPointForTarget -> range -> TType -> Expr -> Expr -> Expr -> Expr +val primMkCond: DebugPointAtBinding -> DebugPointAtTarget -> DebugPointAtTarget -> range -> TType -> Expr -> Expr -> Expr -> Expr /// Build a conditional expression -val mkCond: DebugPointAtBinding -> DebugPointForTarget -> range -> TType -> Expr -> Expr -> Expr -> Expr +val mkCond: DebugPointAtBinding -> DebugPointAtTarget -> range -> TType -> Expr -> Expr -> Expr -> Expr /// Build a conditional expression that checks for non-nullness val mkNonNullCond: TcGlobals -> range -> TType -> Expr -> Expr -> Expr -> Expr @@ -2405,9 +2405,9 @@ val ValIsExplicitImpl: TcGlobals -> Val -> bool val ValRefIsExplicitImpl: TcGlobals -> ValRef -> bool -val (|LinearMatchExpr|_|): Expr -> (DebugPointAtBinding * range * DecisionTree * DecisionTreeTarget * Expr * DebugPointForTarget * range * TType) option +val (|LinearMatchExpr|_|): Expr -> (DebugPointAtBinding * range * DecisionTree * DecisionTreeTarget * Expr * DebugPointAtTarget * range * TType) option -val rebuildLinearMatchExpr: DebugPointAtBinding * range * DecisionTree * DecisionTreeTarget * Expr * DebugPointForTarget * range * TType -> Expr +val rebuildLinearMatchExpr: DebugPointAtBinding * range * DecisionTree * DecisionTreeTarget * Expr * DebugPointAtTarget * range * TType -> Expr val (|LinearOpExpr|_|): Expr -> (TOp * TypeInst * Expr list * Expr * range) option @@ -2524,3 +2524,5 @@ val (|OpPipeRight3|_|): expr: Expr -> (TType * Expr * Expr * Expr * Expr * range) option +/// This uses 'expr thendo ()' with a note that there should be a debug point on the 'expr' +val mkDebugPoint: g: TcGlobals -> m: range -> expr: Expr -> Expr diff --git a/src/fsharp/TypedTreePickle.fs b/src/fsharp/TypedTreePickle.fs index a2a51c00471..959757bbaca 100644 --- a/src/fsharp/TypedTreePickle.fs +++ b/src/fsharp/TypedTreePickle.fs @@ -2376,7 +2376,7 @@ and u_const st = and p_dtree x st = match x with - | TDSwitch (a, b, c, d) -> p_byte 0 st; p_tup4 p_expr (p_list p_dtree_case) (p_option p_dtree) p_dummy_range (a, b, c, d) st + | TDSwitch (_sp, a, b, c, d) -> p_byte 0 st; p_tup4 p_expr (p_list p_dtree_case) (p_option p_dtree) p_dummy_range (a, b, c, d) st | TDSuccess (a, b) -> p_byte 1 st; p_tup2 p_Exprs p_int (a, b) st | TDBind (a, b) -> p_byte 2 st; p_tup2 p_bind p_dtree (a, b) st @@ -2406,9 +2406,11 @@ and p_recdInfo x st = and u_dtree st = let tag = u_byte st match tag with - | 0 -> u_tup4 u_expr (u_list u_dtree_case) (u_option u_dtree) u_dummy_range st |> TDSwitch - | 1 -> u_tup2 u_Exprs u_int st |> TDSuccess - | 2 -> u_tup2 u_bind u_dtree st |> TDBind + | 0 -> + let a,b,c,d = u_tup4 u_expr (u_list u_dtree_case) (u_option u_dtree) u_dummy_range st + TDSwitch(DebugPointAtSwitch.No, a, b, c, d) + | 1 -> u_tup2 u_Exprs u_int st |> TDSuccess + | 2 -> u_tup2 u_bind u_dtree st |> TDBind | _ -> ufailwith st "u_dtree" and u_dtree_case st = let a, b = u_tup2 u_dtree_discrim u_dtree st in (TCase(a, b)) @@ -2423,7 +2425,7 @@ and u_dtree_discrim st = | 4 -> u_tup2 u_int u_ty st |> DecisionTreeTest.ArrayLength | _ -> ufailwith st "u_dtree_discrim" -and u_target st = let a, b = u_tup2 u_Vals u_expr st in (TTarget(a, b, DebugPointForTarget.No, None)) +and u_target st = let a, b = u_tup2 u_Vals u_expr st in (TTarget(a, b, DebugPointAtTarget.No, None)) and u_bind st = let a = u_Val st in let b = u_expr st in TBind(a, b, DebugPointAtBinding.NoneAtSticky) diff --git a/src/fsharp/absil/ilwrite.fs b/src/fsharp/absil/ilwrite.fs index f979e24da6d..14536d6400a 100644 --- a/src/fsharp/absil/ilwrite.fs +++ b/src/fsharp/absil/ilwrite.fs @@ -869,7 +869,6 @@ and EmitType cenv env bb ty = bb.EmitByte (if req then et_CMOD_REQD else et_CMOD_OPT) emitTypeInfoAsTypeDefOrRefEncoded cenv bb (tref.Scope, tref.Enclosing, tref.Name) EmitType cenv env bb ty - | _ -> failwith "EmitType" and EmitLocalInfo cenv env (bb: ByteBuffer) (l: ILLocal) = if l.IsPinned then diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy index e38eea2a325..7e83493df52 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -3942,14 +3942,14 @@ patternClauses: let mArrow, resultExpr = $2 let mLast = resultExpr.Range let m = unionRanges resultExpr.Range patm - [SynMatchClause(pat, guard, (Some mArrow), resultExpr, m, DebugPointForTarget.Yes)], mLast } + [SynMatchClause(pat, guard, (Some mArrow), resultExpr, m, DebugPointAtTarget.Yes)], mLast } | patternAndGuard patternResult BAR patternClauses { let pat, guard, patm = $1 let mArrow, resultExpr = $2 let clauses, mLast = $4 let m = unionRanges resultExpr.Range patm - (SynMatchClause(pat, guard, (Some mArrow), resultExpr, m, DebugPointForTarget.Yes) :: clauses), mLast } + (SynMatchClause(pat, guard, (Some mArrow), resultExpr, m, DebugPointAtTarget.Yes) :: clauses), mLast } | patternAndGuard patternResult BAR error { let pat, guard, patm = $1 @@ -3957,7 +3957,7 @@ patternClauses: let mLast = rhs parseState 3 let m = unionRanges resultExpr.Range patm // silent recovery - [SynMatchClause(pat, guard, (Some mArrow), resultExpr, m, DebugPointForTarget.Yes)], mLast } + [SynMatchClause(pat, guard, (Some mArrow), resultExpr, m, DebugPointAtTarget.Yes)], mLast } | patternAndGuard patternResult error { let pat, guard, patm = $1 @@ -3965,7 +3965,7 @@ patternClauses: let mLast = resultExpr.Range let m = unionRanges resultExpr.Range patm // silent recovery - [SynMatchClause(pat, guard, (Some mArrow), resultExpr, m, DebugPointForTarget.Yes)], mLast } + [SynMatchClause(pat, guard, (Some mArrow), resultExpr, m, DebugPointAtTarget.Yes)], mLast } | patternAndGuard error { let pat, guard, patm = $1 @@ -3975,7 +3975,7 @@ patternClauses: | Some e -> unionRanges patm e.Range | _ -> patm // silent recovery - [SynMatchClause(pat, guard, None, SynExpr.Const (SynConst.Unit, mLast.EndRange), m, DebugPointForTarget.Yes)], mLast } + [SynMatchClause(pat, guard, None, SynExpr.Const (SynConst.Unit, mLast.EndRange), m, DebugPointAtTarget.Yes)], mLast } patternGuard: | WHEN declExpr diff --git a/src/fsharp/service/FSharpParseFileResults.fs b/src/fsharp/service/FSharpParseFileResults.fs index 2c15a4e8d47..270797e9407 100644 --- a/src/fsharp/service/FSharpParseFileResults.fs +++ b/src/fsharp/service/FSharpParseFileResults.fs @@ -433,7 +433,7 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, // Process let-binding let findBreakPoints () = - let checkRange m = [ if isMatchRange m then yield m ] + let checkRange m = [ if isMatchRange m && not m.IsSynthetic then yield m ] let walkBindSeqPt sp = [ match sp with DebugPointAtBinding.Yes m -> yield! checkRange m | _ -> () ] let walkForSeqPt sp = [ match sp with DebugPointAtFor.Yes m -> yield! checkRange m | _ -> () ] let walkWhileSeqPt sp = [ match sp with DebugPointAtWhile.Yes m -> yield! checkRange m | _ -> () ] @@ -618,7 +618,7 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, | SynExpr.MatchLambda (_isExnMatch, _argm, cl, spBind, _wholem) -> yield! walkBindSeqPt spBind for SynMatchClause(_, whenExpr, _, e, _, _) in cl do - yield! walkExprOpt false whenExpr + yield! walkExprOpt true whenExpr yield! walkExpr true e | SynExpr.Lambda (body = bodyExpr) -> @@ -628,7 +628,7 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, yield! walkBindSeqPt spBind yield! walkExpr false inpExpr for SynMatchClause(_, whenExpr, _, tgtExpr, _, _) in cl do - yield! walkExprOpt false whenExpr + yield! walkExprOpt true whenExpr yield! walkExpr true tgtExpr | SynExpr.LetOrUse (_, _, binds, bodyExpr, _) -> @@ -684,7 +684,7 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, yield! walkBindSeqPt spBind yield! walkExpr false e for SynMatchClause(_, whenExpr, _, e, _, _) in cl do - yield! walkExprOpt false whenExpr + yield! walkExprOpt true whenExpr yield! walkExpr true e ] // Process a class declaration or F# type declaration diff --git a/src/fsharp/symbols/Exprs.fs b/src/fsharp/symbols/Exprs.fs index 95c774bb468..82598539f5d 100644 --- a/src/fsharp/symbols/Exprs.fs +++ b/src/fsharp/symbols/Exprs.fs @@ -216,7 +216,7 @@ module FSharpExprConvert = // Match "if [AI_clt](init@41, 6) then IntrinsicFunctions.FailStaticInit () else ()" let (|StaticInitializationCheck|_|) e = match e with - | Expr.Match (_, _, TDSwitch(Expr.Op (TOp.ILAsm ([ AI_clt ], _), _, [Expr.Op (TOp.ValFieldGet rfref, _, _, _) ;_], _), _, _, _), _, _, _) when IsStaticInitializationField rfref -> Some () + | Expr.Match (_, _, TDSwitch(_, Expr.Op (TOp.ILAsm ([ AI_clt ], _), _, [Expr.Op (TOp.ValFieldGet rfref, _, _, _) ;_], _), _, _, _), _, _, _) when IsStaticInitializationField rfref -> Some () | _ -> None // Match "init@41 <- 6" @@ -1242,7 +1242,7 @@ module FSharpExprConvert = and ConvDecisionTreePrim cenv env dtreeRetTy x = match x with - | TDSwitch(e1, csl, dfltOpt, m) -> + | TDSwitch(_, e1, csl, dfltOpt, m) -> let acc = match dfltOpt with | Some d -> ConvDecisionTreePrim cenv env dtreeRetTy d diff --git a/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected b/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected index b4f20c0a872..f0a2ce45afe 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected @@ -5222,6 +5222,28 @@ FSharp.Compiler.Syntax.DebugPointAtSequential: Int32 GetHashCode(System.Collecti FSharp.Compiler.Syntax.DebugPointAtSequential: Int32 Tag FSharp.Compiler.Syntax.DebugPointAtSequential: Int32 get_Tag() FSharp.Compiler.Syntax.DebugPointAtSequential: System.String ToString() +FSharp.Compiler.Syntax.DebugPointAtSwitch +FSharp.Compiler.Syntax.DebugPointAtSwitch+Tags: Int32 No +FSharp.Compiler.Syntax.DebugPointAtSwitch+Tags: Int32 Yes +FSharp.Compiler.Syntax.DebugPointAtSwitch+Yes: FSharp.Compiler.Text.Range Item +FSharp.Compiler.Syntax.DebugPointAtSwitch+Yes: FSharp.Compiler.Text.Range get_Item() +FSharp.Compiler.Syntax.DebugPointAtSwitch: Boolean Equals(FSharp.Compiler.Syntax.DebugPointAtSwitch) +FSharp.Compiler.Syntax.DebugPointAtSwitch: Boolean Equals(System.Object) +FSharp.Compiler.Syntax.DebugPointAtSwitch: Boolean Equals(System.Object, System.Collections.IEqualityComparer) +FSharp.Compiler.Syntax.DebugPointAtSwitch: Boolean IsNo +FSharp.Compiler.Syntax.DebugPointAtSwitch: Boolean IsYes +FSharp.Compiler.Syntax.DebugPointAtSwitch: Boolean get_IsNo() +FSharp.Compiler.Syntax.DebugPointAtSwitch: Boolean get_IsYes() +FSharp.Compiler.Syntax.DebugPointAtSwitch: FSharp.Compiler.Syntax.DebugPointAtSwitch NewYes(FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.DebugPointAtSwitch: FSharp.Compiler.Syntax.DebugPointAtSwitch No +FSharp.Compiler.Syntax.DebugPointAtSwitch: FSharp.Compiler.Syntax.DebugPointAtSwitch get_No() +FSharp.Compiler.Syntax.DebugPointAtSwitch: FSharp.Compiler.Syntax.DebugPointAtSwitch+Tags +FSharp.Compiler.Syntax.DebugPointAtSwitch: FSharp.Compiler.Syntax.DebugPointAtSwitch+Yes +FSharp.Compiler.Syntax.DebugPointAtSwitch: Int32 GetHashCode() +FSharp.Compiler.Syntax.DebugPointAtSwitch: Int32 GetHashCode(System.Collections.IEqualityComparer) +FSharp.Compiler.Syntax.DebugPointAtSwitch: Int32 Tag +FSharp.Compiler.Syntax.DebugPointAtSwitch: Int32 get_Tag() +FSharp.Compiler.Syntax.DebugPointAtSwitch: System.String ToString() FSharp.Compiler.Syntax.DebugPointAtTry FSharp.Compiler.Syntax.DebugPointAtTry+Tags: Int32 Body FSharp.Compiler.Syntax.DebugPointAtTry+Tags: Int32 No @@ -5293,29 +5315,29 @@ FSharp.Compiler.Syntax.DebugPointAtWith: Int32 GetHashCode(System.Collections.IE FSharp.Compiler.Syntax.DebugPointAtWith: Int32 Tag FSharp.Compiler.Syntax.DebugPointAtWith: Int32 get_Tag() FSharp.Compiler.Syntax.DebugPointAtWith: System.String ToString() -FSharp.Compiler.Syntax.DebugPointForTarget -FSharp.Compiler.Syntax.DebugPointForTarget+Tags: Int32 No -FSharp.Compiler.Syntax.DebugPointForTarget+Tags: Int32 Yes -FSharp.Compiler.Syntax.DebugPointForTarget: Boolean Equals(FSharp.Compiler.Syntax.DebugPointForTarget) -FSharp.Compiler.Syntax.DebugPointForTarget: Boolean Equals(System.Object) -FSharp.Compiler.Syntax.DebugPointForTarget: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -FSharp.Compiler.Syntax.DebugPointForTarget: Boolean IsNo -FSharp.Compiler.Syntax.DebugPointForTarget: Boolean IsYes -FSharp.Compiler.Syntax.DebugPointForTarget: Boolean get_IsNo() -FSharp.Compiler.Syntax.DebugPointForTarget: Boolean get_IsYes() -FSharp.Compiler.Syntax.DebugPointForTarget: FSharp.Compiler.Syntax.DebugPointForTarget No -FSharp.Compiler.Syntax.DebugPointForTarget: FSharp.Compiler.Syntax.DebugPointForTarget Yes -FSharp.Compiler.Syntax.DebugPointForTarget: FSharp.Compiler.Syntax.DebugPointForTarget get_No() -FSharp.Compiler.Syntax.DebugPointForTarget: FSharp.Compiler.Syntax.DebugPointForTarget get_Yes() -FSharp.Compiler.Syntax.DebugPointForTarget: FSharp.Compiler.Syntax.DebugPointForTarget+Tags -FSharp.Compiler.Syntax.DebugPointForTarget: Int32 CompareTo(FSharp.Compiler.Syntax.DebugPointForTarget) -FSharp.Compiler.Syntax.DebugPointForTarget: Int32 CompareTo(System.Object) -FSharp.Compiler.Syntax.DebugPointForTarget: Int32 CompareTo(System.Object, System.Collections.IComparer) -FSharp.Compiler.Syntax.DebugPointForTarget: Int32 GetHashCode() -FSharp.Compiler.Syntax.DebugPointForTarget: Int32 GetHashCode(System.Collections.IEqualityComparer) -FSharp.Compiler.Syntax.DebugPointForTarget: Int32 Tag -FSharp.Compiler.Syntax.DebugPointForTarget: Int32 get_Tag() -FSharp.Compiler.Syntax.DebugPointForTarget: System.String ToString() +FSharp.Compiler.Syntax.DebugPointAtTarget +FSharp.Compiler.Syntax.DebugPointAtTarget+Tags: Int32 No +FSharp.Compiler.Syntax.DebugPointAtTarget+Tags: Int32 Yes +FSharp.Compiler.Syntax.DebugPointAtTarget: Boolean Equals(FSharp.Compiler.Syntax.DebugPointAtTarget) +FSharp.Compiler.Syntax.DebugPointAtTarget: Boolean Equals(System.Object) +FSharp.Compiler.Syntax.DebugPointAtTarget: Boolean Equals(System.Object, System.Collections.IEqualityComparer) +FSharp.Compiler.Syntax.DebugPointAtTarget: Boolean IsNo +FSharp.Compiler.Syntax.DebugPointAtTarget: Boolean IsYes +FSharp.Compiler.Syntax.DebugPointAtTarget: Boolean get_IsNo() +FSharp.Compiler.Syntax.DebugPointAtTarget: Boolean get_IsYes() +FSharp.Compiler.Syntax.DebugPointAtTarget: FSharp.Compiler.Syntax.DebugPointAtTarget No +FSharp.Compiler.Syntax.DebugPointAtTarget: FSharp.Compiler.Syntax.DebugPointAtTarget Yes +FSharp.Compiler.Syntax.DebugPointAtTarget: FSharp.Compiler.Syntax.DebugPointAtTarget get_No() +FSharp.Compiler.Syntax.DebugPointAtTarget: FSharp.Compiler.Syntax.DebugPointAtTarget get_Yes() +FSharp.Compiler.Syntax.DebugPointAtTarget: FSharp.Compiler.Syntax.DebugPointAtTarget+Tags +FSharp.Compiler.Syntax.DebugPointAtTarget: Int32 CompareTo(FSharp.Compiler.Syntax.DebugPointAtTarget) +FSharp.Compiler.Syntax.DebugPointAtTarget: Int32 CompareTo(System.Object) +FSharp.Compiler.Syntax.DebugPointAtTarget: Int32 CompareTo(System.Object, System.Collections.IComparer) +FSharp.Compiler.Syntax.DebugPointAtTarget: Int32 GetHashCode() +FSharp.Compiler.Syntax.DebugPointAtTarget: Int32 GetHashCode(System.Collections.IEqualityComparer) +FSharp.Compiler.Syntax.DebugPointAtTarget: Int32 Tag +FSharp.Compiler.Syntax.DebugPointAtTarget: Int32 get_Tag() +FSharp.Compiler.Syntax.DebugPointAtTarget: System.String ToString() FSharp.Compiler.Syntax.ExprAtomicFlag FSharp.Compiler.Syntax.ExprAtomicFlag: FSharp.Compiler.Syntax.ExprAtomicFlag Atomic FSharp.Compiler.Syntax.ExprAtomicFlag: FSharp.Compiler.Syntax.ExprAtomicFlag NonAtomic @@ -7011,11 +7033,11 @@ FSharp.Compiler.Syntax.SynInterpolatedStringPart: Int32 Tag FSharp.Compiler.Syntax.SynInterpolatedStringPart: Int32 get_Tag() FSharp.Compiler.Syntax.SynInterpolatedStringPart: System.String ToString() FSharp.Compiler.Syntax.SynMatchClause -FSharp.Compiler.Syntax.SynMatchClause: FSharp.Compiler.Syntax.DebugPointForTarget debugPoint -FSharp.Compiler.Syntax.SynMatchClause: FSharp.Compiler.Syntax.DebugPointForTarget get_debugPoint() +FSharp.Compiler.Syntax.SynMatchClause: FSharp.Compiler.Syntax.DebugPointAtTarget debugPoint +FSharp.Compiler.Syntax.SynMatchClause: FSharp.Compiler.Syntax.DebugPointAtTarget get_debugPoint() FSharp.Compiler.Syntax.SynMatchClause: FSharp.Compiler.Syntax.SynExpr get_resultExpr() FSharp.Compiler.Syntax.SynMatchClause: FSharp.Compiler.Syntax.SynExpr resultExpr -FSharp.Compiler.Syntax.SynMatchClause: FSharp.Compiler.Syntax.SynMatchClause NewSynMatchClause(FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynExpr], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.Syntax.DebugPointForTarget) +FSharp.Compiler.Syntax.SynMatchClause: FSharp.Compiler.Syntax.SynMatchClause NewSynMatchClause(FSharp.Compiler.Syntax.SynPat, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynExpr], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.Syntax.DebugPointAtTarget) FSharp.Compiler.Syntax.SynMatchClause: FSharp.Compiler.Syntax.SynPat get_pat() FSharp.Compiler.Syntax.SynMatchClause: FSharp.Compiler.Syntax.SynPat pat FSharp.Compiler.Syntax.SynMatchClause: FSharp.Compiler.Text.Range Range diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs index b5ec522512c..3f842a0c049 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs @@ -21,35 +21,36 @@ let compute (x: int) = (fun verifier -> verifier.VerifyIL [ """ .method public static int32 compute(int32 x) cil managed -{ - - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldc.i4.1 - IL_0002: beq.s IL_0008 - - IL_0004: ldarg.0 - IL_0005: ldc.i4.2 - IL_0006: bne.un.s IL_000a - - IL_0008: ldc.i4.2 - IL_0009: ret - - IL_000a: ldarg.0 - IL_000b: ldc.i4.3 - IL_000c: beq.s IL_0012 - - IL_000e: ldarg.0 - IL_000f: ldc.i4.4 - IL_0010: bne.un.s IL_0014 - - IL_0012: ldc.i4.3 - IL_0013: ret - - IL_0014: ldc.i4.4 - IL_0015: ret -} + { + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: ldc.i4.1 + IL_0003: beq.s IL_0009 + + IL_0005: ldarg.0 + IL_0006: ldc.i4.2 + IL_0007: bne.un.s IL_000b + + IL_0009: ldc.i4.2 + IL_000a: ret + + IL_000b: nop + IL_000c: ldarg.0 + IL_000d: ldc.i4.3 + IL_000e: beq.s IL_0014 + + IL_0010: ldarg.0 + IL_0011: ldc.i4.4 + IL_0012: bne.un.s IL_0016 + + IL_0014: ldc.i4.3 + IL_0015: ret + + IL_0016: ldc.i4.4 + IL_0017: ret +} """ ]) diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs index 4ba85d0067b..ca68e2e9d7a 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs @@ -53,25 +53,26 @@ let ListExpressionSteppingTest2 () = .maxstack 4 .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0) - IL_0000: ldstr "hello" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: pop - IL_0010: ldloca.s V_0 - IL_0012: ldc.i4.1 - IL_0013: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0018: nop - IL_0019: ldstr "goodbye" - IL_001e: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0023: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0028: pop - IL_0029: ldloca.s V_0 - IL_002b: ldc.i4.2 - IL_002c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0031: nop - IL_0032: ldloca.s V_0 - IL_0034: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0039: ret + IL_0000: nop + IL_0001: ldstr "hello" + IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0010: pop + IL_0011: ldloca.s V_0 + IL_0013: ldc.i4.1 + IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0019: nop + IL_001a: ldstr "goodbye" + IL_001f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0024: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0029: pop + IL_002a: ldloca.s V_0 + IL_002c: ldc.i4.2 + IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0032: nop + IL_0033: ldloca.s V_0 + IL_0035: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003a: ret } """ ]) @@ -156,56 +157,58 @@ let ListExpressionSteppingTest4 () = class [runtime]System.Collections.Generic.IEnumerable`1 V_2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_3, int32 V_4) - IL_0000: ldc.i4.0 - IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_0006: stloc.1 + IL_0000: nop + IL_0001: ldc.i4.0 + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0007: stloc.1 .try { - IL_0007: nop - IL_0008: ldc.i4.0 - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_000e: stloc.3 - IL_000f: ldloc.3 - IL_0010: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0015: nop - IL_0016: ldloca.s V_0 - IL_0018: ldloc.1 - IL_0019: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0023: nop - IL_0024: ldloc.1 - IL_0025: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_002a: ldloc.3 - IL_002b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0030: add - IL_0031: stloc.s V_4 - IL_0033: ldloca.s V_0 - IL_0035: ldloc.s V_4 - IL_0037: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_003c: nop - IL_003d: ldnull - IL_003e: stloc.2 - IL_003f: leave.s IL_005a + IL_0008: nop + IL_0009: ldc.i4.0 + IL_000a: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_000f: stloc.3 + IL_0010: ldloc.3 + IL_0011: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0016: nop + IL_0017: ldloca.s V_0 + IL_0019: ldloc.1 + IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_001f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0024: nop + IL_0025: ldloc.1 + IL_0026: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_002b: ldloc.3 + IL_002c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0031: add + IL_0032: stloc.s V_4 + IL_0034: ldloca.s V_0 + IL_0036: ldloc.s V_4 + IL_0038: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_003d: nop + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_005b } finally { - IL_0041: nop - IL_0042: ldloc.1 - IL_0043: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0048: nop - IL_0049: ldstr "done" - IL_004e: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0053: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0058: pop - IL_0059: endfinally + IL_0042: nop + IL_0043: ldloc.1 + IL_0044: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0049: nop + IL_004a: ldstr "done" + IL_004f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0054: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0059: pop + IL_005a: endfinally } - IL_005a: ldloc.2 - IL_005b: pop - IL_005c: ldloca.s V_0 - IL_005e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0063: ret + IL_005b: ldloc.2 + IL_005c: pop + IL_005d: ldloca.s V_0 + IL_005f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0064: ret } + """ ]) @@ -309,95 +312,93 @@ let ListExpressionSteppingTest6 () = (fun verifier -> verifier.VerifyIL [ """ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - ListExpressionSteppingTest6() cil managed - { - - .maxstack 5 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, - class [runtime]System.Collections.Generic.IEnumerator`1 V_1, - class [runtime]System.Collections.Generic.IEnumerable`1 V_2, - int32 V_3, - class [runtime]System.IDisposable V_4) - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.1 - IL_0002: ldc.i4.4 - IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, - int32, - int32) - IL_0008: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_000d: stloc.1 - .try - { - IL_000e: ldloc.1 - IL_000f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() - IL_0014: brfalse.s IL_0074 - - IL_0016: ldloc.1 - IL_0017: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_001c: stloc.3 - IL_001d: ldloc.3 - IL_001e: ldc.i4.1 - IL_001f: sub - IL_0020: switch ( - IL_002f, - IL_004b) - IL_002d: br.s IL_0068 - - IL_002f: ldstr "hello" - IL_0034: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0039: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_003e: pop - IL_003f: ldloca.s V_0 - IL_0041: ldloc.3 - IL_0042: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0047: nop - IL_0048: nop - IL_0049: br.s IL_000e - - IL_004b: nop - IL_004c: ldstr "hello" - IL_0051: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0056: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_005b: pop - IL_005c: ldloca.s V_0 - IL_005e: ldloc.3 - IL_005f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0064: nop - IL_0065: nop - IL_0066: br.s IL_000e - - IL_0068: ldloca.s V_0 - IL_006a: ldloc.3 - IL_006b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0070: nop - IL_0071: nop - IL_0072: br.s IL_000e - - IL_0074: ldnull - IL_0075: stloc.2 - IL_0076: leave.s IL_008d - - } - finally - { - IL_0078: ldloc.1 - IL_0079: isinst [runtime]System.IDisposable - IL_007e: stloc.s V_4 - IL_0080: ldloc.s V_4 - IL_0082: brfalse.s IL_008c - - IL_0084: ldloc.s V_4 - IL_0086: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_008b: endfinally - IL_008c: endfinally - } - IL_008d: ldloc.2 - IL_008e: pop - IL_008f: ldloca.s V_0 - IL_0091: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0096: ret - } - -} + ListExpressionSteppingTest6() cil managed +{ + + .maxstack 5 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + class [runtime]System.Collections.Generic.IEnumerator`1 V_1, + class [runtime]System.Collections.Generic.IEnumerable`1 V_2, + int32 V_3, + class [runtime]System.IDisposable V_4) + IL_0000: ldc.i4.1 + IL_0001: ldc.i4.1 + IL_0002: ldc.i4.4 + IL_0003: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + int32, + int32) + IL_0008: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_000d: stloc.1 + .try + { + IL_000e: ldloc.1 + IL_000f: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0014: brfalse.s IL_0074 + + IL_0016: ldloc.1 + IL_0017: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_001c: stloc.3 + IL_001d: nop + IL_001e: ldloc.3 + IL_001f: ldc.i4.1 + IL_0020: sub + IL_0021: switch ( + IL_0030, + IL_004c) + IL_002e: br.s IL_0068 + + IL_0030: ldstr "hello" + IL_0035: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_003a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_003f: pop + IL_0040: ldloca.s V_0 + IL_0042: ldloc.3 + IL_0043: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0048: nop + IL_0049: nop + IL_004a: br.s IL_000e + + IL_004c: ldstr "hello" + IL_0051: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0056: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_005b: pop + IL_005c: ldloca.s V_0 + IL_005e: ldloc.3 + IL_005f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0064: nop + IL_0065: nop + IL_0066: br.s IL_000e + + IL_0068: ldloca.s V_0 + IL_006a: ldloc.3 + IL_006b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0070: nop + IL_0071: nop + IL_0072: br.s IL_000e + + IL_0074: ldnull + IL_0075: stloc.2 + IL_0076: leave.s IL_008d + + } + finally + { + IL_0078: ldloc.1 + IL_0079: isinst [runtime]System.IDisposable + IL_007e: stloc.s V_4 + IL_0080: ldloc.s V_4 + IL_0082: brfalse.s IL_008c + + IL_0084: ldloc.s V_4 + IL_0086: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_008b: endfinally + IL_008c: endfinally + } + IL_008d: ldloc.2 + IL_008e: pop + IL_008f: ldloca.s V_0 + IL_0091: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0096: ret +} """ ]) diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs index 3bbfcdf9eb9..d75e1849213 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs @@ -889,69 +889,70 @@ let testTask() = task { while x > 4 do System.Console.WriteLine("loop") } { IL_0007: ldc.i4.1 IL_0008: stloc.3 - IL_0009: ldloc.3 - IL_000a: brfalse.s IL_0017 - - IL_000c: call int32 Test::get_x() - IL_0011: ldc.i4.4 - IL_0012: cgt - IL_0014: nop - IL_0015: br.s IL_0019 - - IL_0017: ldc.i4.0 - IL_0018: nop - IL_0019: brfalse.s IL_0030 - - IL_001b: ldstr "loop" - IL_0020: call void [runtime]System.Console::WriteLine(string) - IL_0025: ldc.i4.1 - IL_0026: stloc.s V_4 - IL_0028: ldloc.s V_4 - IL_002a: stloc.3 - IL_002b: ldc.i4.0 - IL_002c: stloc.0 - IL_002d: nop - IL_002e: br.s IL_0009 - - IL_0030: ldloc.3 - IL_0031: stloc.2 - IL_0032: ldloc.2 - IL_0033: brfalse.s IL_0052 - - IL_0035: ldarg.0 - IL_0036: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@5::Data - IL_003b: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0040: ldarg.0 - IL_0041: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@5::Data - IL_0046: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result - IL_004b: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) - IL_0050: leave.s IL_0060 - - IL_0052: leave.s IL_0060 + IL_0009: nop + IL_000a: ldloc.3 + IL_000b: brfalse.s IL_0018 + + IL_000d: call int32 Test::get_x() + IL_0012: ldc.i4.4 + IL_0013: cgt + IL_0015: nop + IL_0016: br.s IL_001a + + IL_0018: ldc.i4.0 + IL_0019: nop + IL_001a: brfalse.s IL_0031 + + IL_001c: ldstr "loop" + IL_0021: call void [runtime]System.Console::WriteLine(string) + IL_0026: ldc.i4.1 + IL_0027: stloc.s V_4 + IL_0029: ldloc.s V_4 + IL_002b: stloc.3 + IL_002c: ldc.i4.0 + IL_002d: stloc.0 + IL_002e: nop + IL_002f: br.s IL_0009 + + IL_0031: ldloc.3 + IL_0032: stloc.2 + IL_0033: ldloc.2 + IL_0034: brfalse.s IL_0053 + + IL_0036: ldarg.0 + IL_0037: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@5::Data + IL_003c: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0041: ldarg.0 + IL_0042: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@5::Data + IL_0047: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result + IL_004c: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_0051: leave.s IL_0061 + + IL_0053: leave.s IL_0061 } catch [runtime]System.Object { - IL_0054: castclass [runtime]System.Exception - IL_0059: stloc.s V_5 - IL_005b: ldloc.s V_5 - IL_005d: stloc.1 - IL_005e: leave.s IL_0060 + IL_0055: castclass [runtime]System.Exception + IL_005a: stloc.s V_5 + IL_005c: ldloc.s V_5 + IL_005e: stloc.1 + IL_005f: leave.s IL_0061 } - IL_0060: ldloc.1 - IL_0061: stloc.s V_5 - IL_0063: ldloc.s V_5 - IL_0065: brtrue.s IL_0068 - - IL_0067: ret - - IL_0068: ldarg.0 - IL_0069: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@5::Data - IL_006e: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0073: ldloc.s V_5 - IL_0075: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) - IL_007a: ret + IL_0061: ldloc.1 + IL_0062: stloc.s V_5 + IL_0064: ldloc.s V_5 + IL_0066: brtrue.s IL_0069 + + IL_0068: ret + + IL_0069: ldarg.0 + IL_006a: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@5::Data + IL_006f: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0074: ldloc.s V_5 + IL_0076: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) + IL_007b: ret } """ ]) @@ -988,69 +989,70 @@ let testTask() = task { while x > 4 do System.Console.WriteLine("loop") } { IL_0007: ldc.i4.1 IL_0008: stloc.3 - IL_0009: ldloc.3 - IL_000a: brfalse.s IL_0017 - - IL_000c: call int32 Test::get_x() - IL_0011: ldc.i4.4 - IL_0012: cgt - IL_0014: nop - IL_0015: br.s IL_0019 - - IL_0017: ldc.i4.0 - IL_0018: nop - IL_0019: brfalse.s IL_0030 - - IL_001b: ldstr "loop" - IL_0020: call void [runtime]System.Console::WriteLine(string) - IL_0025: ldc.i4.1 - IL_0026: stloc.s V_4 - IL_0028: ldloc.s V_4 - IL_002a: stloc.3 - IL_002b: ldc.i4.0 - IL_002c: stloc.0 - IL_002d: nop - IL_002e: br.s IL_0009 - - IL_0030: ldloc.3 - IL_0031: stloc.2 - IL_0032: ldloc.2 - IL_0033: brfalse.s IL_0052 - - IL_0035: ldarg.0 - IL_0036: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@5::Data - IL_003b: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0040: ldarg.0 - IL_0041: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@5::Data - IL_0046: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result - IL_004b: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) - IL_0050: leave.s IL_0060 - - IL_0052: leave.s IL_0060 + IL_0009: nop + IL_000a: ldloc.3 + IL_000b: brfalse.s IL_0018 + + IL_000d: call int32 Test::get_x() + IL_0012: ldc.i4.4 + IL_0013: cgt + IL_0015: nop + IL_0016: br.s IL_001a + + IL_0018: ldc.i4.0 + IL_0019: nop + IL_001a: brfalse.s IL_0031 + + IL_001c: ldstr "loop" + IL_0021: call void [runtime]System.Console::WriteLine(string) + IL_0026: ldc.i4.1 + IL_0027: stloc.s V_4 + IL_0029: ldloc.s V_4 + IL_002b: stloc.3 + IL_002c: ldc.i4.0 + IL_002d: stloc.0 + IL_002e: nop + IL_002f: br.s IL_0009 + + IL_0031: ldloc.3 + IL_0032: stloc.2 + IL_0033: ldloc.2 + IL_0034: brfalse.s IL_0053 + + IL_0036: ldarg.0 + IL_0037: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@5::Data + IL_003c: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0041: ldarg.0 + IL_0042: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@5::Data + IL_0047: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result + IL_004c: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_0051: leave.s IL_0061 + + IL_0053: leave.s IL_0061 } catch [runtime]System.Object { - IL_0054: castclass [runtime]System.Exception - IL_0059: stloc.s V_5 - IL_005b: ldloc.s V_5 - IL_005d: stloc.1 - IL_005e: leave.s IL_0060 + IL_0055: castclass [runtime]System.Exception + IL_005a: stloc.s V_5 + IL_005c: ldloc.s V_5 + IL_005e: stloc.1 + IL_005f: leave.s IL_0061 } - IL_0060: ldloc.1 - IL_0061: stloc.s V_6 - IL_0063: ldloc.s V_6 - IL_0065: brtrue.s IL_0068 - - IL_0067: ret - - IL_0068: ldarg.0 - IL_0069: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@5::Data - IL_006e: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0073: ldloc.s V_6 - IL_0075: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) - IL_007a: ret + IL_0061: ldloc.1 + IL_0062: stloc.s V_6 + IL_0064: ldloc.s V_6 + IL_0066: brtrue.s IL_0069 + + IL_0068: ret + + IL_0069: ldarg.0 + IL_006a: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@5::Data + IL_006f: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0074: ldloc.s V_6 + IL_0076: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) + IL_007b: ret } """ ]) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.il.bsl index 80c04ba5c49..71cebc43a5d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000270 Length: 0x000000B1 } .module AsyncExpressionSteppingTest3.dll -// MVID: {611B0EC4-6394-F35E-A745-0383C40E1B61} +// MVID: {611C52A3-6394-F35E-A745-0383A3521C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x058A0000 +// Image base: 0x06660000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl index c1df939a319..a411614d6f9 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000270 Length: 0x000000B1 } .module AsyncExpressionSteppingTest4.dll -// MVID: {611B0EC4-6394-6D4B-A745-0383C40E1B61} +// MVID: {611C52A3-6394-6D4B-A745-0383A3521C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06BA0000 +// Image base: 0x06B50000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl index 1fa86b5eb5c..8ecc211736a 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000002B0 Length: 0x000000BE } .module AsyncExpressionSteppingTest5.dll -// MVID: {611B0EC4-6394-30E8-A745-0383C40E1B61} +// MVID: {611C52A3-6394-30E8-A745-0383A3521C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07280000 +// Image base: 0x06B50000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.il.bsl index 64210fb2688..8fc65940265 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000002A0 Length: 0x000000BE } .module AsyncExpressionSteppingTest6.dll -// MVID: {611B0EC4-6394-4FAD-A745-0383C40E1B61} +// MVID: {611C52A3-6394-4FAD-A745-0383A3521C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05150000 +// Image base: 0x06B60000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Default.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Default.il.bsl index bbe5b40ba64..9584bf6b19d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Default.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Default.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 } .assembly Default { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.Default { - // Offset: 0x00000000 Length: 0x000003FA + // Offset: 0x00000000 Length: 0x000003F0 } .mresource public FSharpOptimizationData.Default { - // Offset: 0x00000400 Length: 0x000000BA + // Offset: 0x000003F8 Length: 0x000000BA } .module Default.dll -// MVID: {59B19208-AAA9-67BB-A745-03830892B159} +// MVID: {611C4D7D-AAA9-67BB-A745-03837D4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00E30000 +// Image base: 0x070A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,7 +62,7 @@ // Code size 9 (0x9) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 9,9 : 4,23 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AttributeTargets\\Default.fs' + .line 9,9 : 4,23 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AttributeTargets\\Default.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Attribute::.ctor() IL_0006: ldarg.0 @@ -103,20 +103,22 @@ .method private specialname rtspecialname static void .cctor() cil managed { - // Code size 25 (0x19) + // Code size 26 (0x1a) .maxstack 4 .locals init ([0] int32 T) + .line 11,12 : 1,29 '' + IL_0000: nop .line 12,12 : 10,25 '' - IL_0000: ldstr "hello" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: pop + IL_0001: ldstr "hello" + IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0010: pop .line 12,12 : 27,28 '' - IL_0010: ldc.i4.1 - IL_0011: dup - IL_0012: stsfld int32 ''.$M::T@12 - IL_0017: stloc.0 - IL_0018: ret + IL_0011: ldc.i4.1 + IL_0012: dup + IL_0013: stsfld int32 ''.$M::T@12 + IL_0018: stloc.0 + IL_0019: ret } // end of method $M::.cctor } // end of class ''.$M diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Field.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Field.il.bsl index 6d4d86af42b..4eb09976030 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Field.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Field.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 } .assembly Field { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.Field { - // Offset: 0x00000000 Length: 0x000003F4 + // Offset: 0x00000000 Length: 0x000003EA } .mresource public FSharpOptimizationData.Field { - // Offset: 0x000003F8 Length: 0x000000B8 + // Offset: 0x000003F0 Length: 0x000000B8 } .module Field.dll -// MVID: {59B19208-96F8-CD6E-A745-03830892B159} +// MVID: {611C4D7D-96F8-CD6E-A745-03837D4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00F60000 +// Image base: 0x06AD0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,7 +62,7 @@ // Code size 9 (0x9) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 9,9 : 4,23 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AttributeTargets\\Field.fs' + .line 9,9 : 4,23 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AttributeTargets\\Field.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Attribute::.ctor() IL_0006: ldarg.0 @@ -78,7 +78,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld int32 ''.$M::'T@12-2' + IL_0000: ldsfld int32 ''.$M::T@12 IL_0005: ret } // end of method M::get_T @@ -92,7 +92,7 @@ .class private abstract auto ansi sealed ''.$M extends [mscorlib]System.Object { - .field static assembly initonly int32 'T@12-2' + .field static assembly initonly int32 T@12 .custom instance void M/ExportAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly int32 init@ @@ -102,20 +102,22 @@ .method private specialname rtspecialname static void .cctor() cil managed { - // Code size 25 (0x19) + // Code size 26 (0x1a) .maxstack 4 .locals init ([0] int32 T) + .line 11,12 : 1,29 '' + IL_0000: nop .line 12,12 : 10,25 '' - IL_0000: ldstr "hello" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: pop + IL_0001: ldstr "hello" + IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0010: pop .line 12,12 : 27,28 '' - IL_0010: ldc.i4.1 - IL_0011: dup - IL_0012: stsfld int32 ''.$M::'T@12-2' - IL_0017: stloc.0 - IL_0018: ret + IL_0011: ldc.i4.1 + IL_0012: dup + IL_0013: stsfld int32 ''.$M::T@12 + IL_0018: stloc.0 + IL_0019: ret } // end of method $M::.cctor } // end of class ''.$M diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Property.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Property.il.bsl index eb0160f0a01..1e5bb37b225 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Property.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Property.il.bsl @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.8.3928.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 4:4:1:0 + .ver 5:0:0:0 } .assembly Property { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.Property { - // Offset: 0x00000000 Length: 0x000003FD + // Offset: 0x00000000 Length: 0x000003F3 } .mresource public FSharpOptimizationData.Property { - // Offset: 0x00000408 Length: 0x000000BB + // Offset: 0x000003F8 Length: 0x000000BB } .module Property.dll -// MVID: {59B19208-9B5C-7949-A745-03830892B159} +// MVID: {611C4D7D-9B5C-7949-A745-03837D4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x02E80000 +// Image base: 0x06F60000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,7 +62,7 @@ // Code size 9 (0x9) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 9,9 : 4,23 'C:\\GitHub\\dsyme\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\AttributeTargets\\Property.fs' + .line 9,9 : 4,23 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AttributeTargets\\Property.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Attribute::.ctor() IL_0006: ldarg.0 @@ -78,7 +78,7 @@ { // Code size 6 (0x6) .maxstack 8 - IL_0000: ldsfld int32 ''.$M::'T@12-4' + IL_0000: ldsfld int32 ''.$M::T@12 IL_0005: ret } // end of method M::get_T @@ -93,7 +93,7 @@ .class private abstract auto ansi sealed ''.$M extends [mscorlib]System.Object { - .field static assembly initonly int32 'T@12-4' + .field static assembly initonly int32 T@12 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .field static assembly int32 init@ .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) @@ -102,20 +102,22 @@ .method private specialname rtspecialname static void .cctor() cil managed { - // Code size 25 (0x19) + // Code size 26 (0x1a) .maxstack 4 .locals init ([0] int32 T) + .line 11,12 : 1,29 '' + IL_0000: nop .line 12,12 : 10,25 '' - IL_0000: ldstr "hello" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: pop + IL_0001: ldstr "hello" + IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0010: pop .line 12,12 : 27,28 '' - IL_0010: ldc.i4.1 - IL_0011: dup - IL_0012: stsfld int32 ''.$M::'T@12-4' - IL_0017: stloc.0 - IL_0018: ret + IL_0011: ldc.i4.1 + IL_0012: dup + IL_0013: stsfld int32 ''.$M::T@12 + IL_0018: stloc.0 + IL_0019: ret } // end of method $M::.cctor } // end of class ''.$M diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl index cd87bf2f64a..dacfacbd39b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000780 Length: 0x00000227 } .module CCtorDUWithMember01.exe -// MVID: {60BD4554-26F1-14EE-A745-03835445BD60} +// MVID: {611C4D7E-26F1-14EE-A745-03837E4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04E50000 +// Image base: 0x067A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -243,60 +243,63 @@ instance int32 CompareTo(class CCtorDUWithMember01a/C obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 48 (0x30) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) - .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CCtorDUWithMember\\CCtorDUWithMember01a.fs' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + .line 3,3 : 6,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CCtorDUWithMember\\CCtorDUWithMember01a.fs' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0024 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0025 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un.s IL_0020 + IL_000d: ldarg.0 + IL_000e: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_0013: stloc.0 + IL_0014: ldarg.1 + IL_0015: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_001a: stloc.1 + .line 100001,100001 : 0,0 '' + IL_001b: ldloc.0 + IL_001c: ldloc.1 + IL_001d: bne.un.s IL_0021 .line 100001,100001 : 0,0 '' - IL_001e: ldc.i4.0 - IL_001f: ret + IL_001f: ldc.i4.0 + IL_0020: ret .line 100001,100001 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldloc.1 - IL_0022: sub - IL_0023: ret + IL_0021: ldloc.0 + IL_0022: ldloc.1 + IL_0023: sub + IL_0024: ret .line 100001,100001 : 0,0 '' - IL_0024: ldc.i4.1 - IL_0025: ret + IL_0025: ldc.i4.1 + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_0026: ldarg.1 - IL_0027: ldnull - IL_0028: cgt.un - IL_002a: brfalse.s IL_002e + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: brfalse.s IL_002f .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_002d: ldc.i4.m1 + IL_002e: ret .line 100001,100001 : 0,0 '' - IL_002e: ldc.i4.0 - IL_002f: ret + IL_002f: ldc.i4.0 + IL_0030: ret } // end of method C::CompareTo .method public hidebysig virtual final @@ -327,6 +330,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any CCtorDUWithMember01a/C IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -346,6 +350,7 @@ IL_001f: ldloc.0 IL_0020: ldfld int32 CCtorDUWithMember01a/C::_tag IL_0025: stloc.2 + .line 100001,100001 : 0,0 '' IL_0026: ldloc.1 IL_0027: ldloc.2 IL_0028: bne.un.s IL_002c @@ -384,25 +389,27 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 17 (0x11) + // Code size 18 (0x12) .maxstack 3 .locals init ([0] int32 V_0) + .line 3,3 : 6,7 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_000f + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0010 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_000e: ret + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + IL_0009: ldarg.0 + IL_000a: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_000f: ret .line 100001,100001 : 0,0 '' - IL_000f: ldc.i4.0 - IL_0010: ret + IL_0010: ldc.i4.0 + IL_0011: ret } // end of method C::GetHashCode .method public hidebysig virtual final @@ -423,50 +430,54 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 47 (0x2f) + // Code size 48 (0x30) .maxstack 4 .locals init ([0] class CCtorDUWithMember01a/C V_0, [1] class CCtorDUWithMember01a/C V_1, [2] int32 V_2, [3] int32 V_3) + .line 3,3 : 6,7 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 - - .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst CCtorDUWithMember01a/C - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0025 - - .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: ceq - IL_0024: ret + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0028 .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.0 - IL_0026: ret + IL_0007: ldarg.1 + IL_0008: isinst CCtorDUWithMember01a/C + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0026 .line 100001,100001 : 0,0 '' - IL_0027: ldarg.1 - IL_0028: ldnull - IL_0029: cgt.un - IL_002b: ldc.i4.0 - IL_002c: ceq - IL_002e: ret + IL_0011: ldloc.0 + IL_0012: stloc.1 + IL_0013: ldarg.0 + IL_0014: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_0019: stloc.2 + IL_001a: ldloc.1 + IL_001b: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_0020: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0021: ldloc.2 + IL_0022: ldloc.3 + IL_0023: ceq + IL_0025: ret + + .line 100001,100001 : 0,0 '' + IL_0026: ldc.i4.0 + IL_0027: ret + + .line 100001,100001 : 0,0 '' + IL_0028: ldarg.1 + IL_0029: ldnull + IL_002a: cgt.un + IL_002c: ldc.i4.0 + IL_002d: ceq + IL_002f: ret } // end of method C::Equals .method public hidebysig specialname @@ -483,45 +494,48 @@ instance bool Equals(class CCtorDUWithMember01a/C obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 42 (0x2a) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) + .line 3,3 : 6,7 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0021 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0022 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_001f + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0020 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: ceq - IL_001e: ret + IL_000d: ldarg.0 + IL_000e: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_0013: stloc.0 + IL_0014: ldarg.1 + IL_0015: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_001a: stloc.1 + .line 100001,100001 : 0,0 '' + IL_001b: ldloc.0 + IL_001c: ldloc.1 + IL_001d: ceq + IL_001f: ret .line 100001,100001 : 0,0 '' - IL_001f: ldc.i4.0 - IL_0020: ret + IL_0020: ldc.i4.0 + IL_0021: ret .line 100001,100001 : 0,0 '' - IL_0021: ldarg.1 - IL_0022: ldnull - IL_0023: cgt.un - IL_0025: ldc.i4.0 - IL_0026: ceq - IL_0028: ret + IL_0022: ldarg.1 + IL_0023: ldnull + IL_0024: cgt.un + IL_0026: ldc.i4.0 + IL_0027: ceq + IL_0029: ret } // end of method C::Equals .method public hidebysig virtual final @@ -535,6 +549,7 @@ IL_0000: ldarg.1 IL_0001: isinst CCtorDUWithMember01a/C IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr02.il.bsl index 564ad185172..c9914148327 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr02.il.bsl @@ -40,13 +40,13 @@ // Offset: 0x00000218 Length: 0x0000007D } .module ComputationExpr02.exe -// MVID: {611B0EC4-3624-E566-A745-0383C40E1B61} +// MVID: {611C4D7F-3624-E566-A745-03837F4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x09590000 +// Image base: 0x071B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -80,28 +80,30 @@ .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 44 (0x2c) + // Code size 45 (0x2d) .maxstack 7 .locals init ([0] int32 x) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 8,8 : 18,33 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ComputationExpressions\\ComputationExpr02.fs' - IL_0000: ldstr "hello" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: pop + .line 8,8 : 9,50 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ComputationExpressions\\ComputationExpr02.fs' + IL_0000: nop + .line 8,8 : 18,33 '' + IL_0001: ldstr "hello" + IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0010: pop .line 8,8 : 35,49 '' - IL_0010: ldstr "hello" - IL_0015: callvirt instance int32 [mscorlib]System.String::get_Length() - IL_001a: stloc.0 + IL_0011: ldstr "hello" + IL_0016: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_001b: stloc.0 .line 9,9 : 9,21 '' - IL_001b: ldarg.0 - IL_001c: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr02/res2@8::builder@ - IL_0021: ldloc.0 + IL_001c: ldarg.0 + IL_001d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr02/res2@8::builder@ IL_0022: ldloc.0 - IL_0023: add - IL_0024: tail. - IL_0026: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) - IL_002b: ret + IL_0023: ldloc.0 + IL_0024: add + IL_0025: tail. + IL_0027: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) + IL_002c: ret } // end of method res2@8::Invoke } // end of class res2@8 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr03.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr03.il.bsl index 63685507800..2451cc77523 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr03.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr03.il.bsl @@ -40,13 +40,13 @@ // Offset: 0x00000240 Length: 0x0000008C } .module ComputationExpr03.exe -// MVID: {611B0EC4-3649-E566-A745-0383C40E1B61} +// MVID: {611C4D7F-3649-E566-A745-03837F4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B90000 +// Image base: 0x06EE0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -80,28 +80,30 @@ .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 44 (0x2c) + // Code size 45 (0x2d) .maxstack 7 .locals init ([0] int32 x) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 8,8 : 18,33 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ComputationExpressions\\ComputationExpr03.fs' - IL_0000: ldstr "hello" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: pop + .line 8,8 : 9,50 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ComputationExpressions\\ComputationExpr03.fs' + IL_0000: nop + .line 8,8 : 18,33 '' + IL_0001: ldstr "hello" + IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0010: pop .line 8,8 : 35,49 '' - IL_0010: ldstr "hello" - IL_0015: callvirt instance int32 [mscorlib]System.String::get_Length() - IL_001a: stloc.0 + IL_0011: ldstr "hello" + IL_0016: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_001b: stloc.0 .line 9,9 : 9,21 '' - IL_001b: ldarg.0 - IL_001c: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/res2@8::builder@ - IL_0021: ldloc.0 + IL_001c: ldarg.0 + IL_001d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/res2@8::builder@ IL_0022: ldloc.0 - IL_0023: add - IL_0024: tail. - IL_0026: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) - IL_002b: ret + IL_0023: ldloc.0 + IL_0024: add + IL_0025: tail. + IL_0027: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) + IL_002c: ret } // end of method res2@8::Invoke } // end of class res2@8 @@ -131,25 +133,27 @@ .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 42 (0x2a) + // Code size 43 (0x2b) .maxstack 6 .locals init ([0] int32 x) + .line 17,17 : 17,58 '' + IL_0000: nop .line 17,17 : 26,41 '' - IL_0000: ldstr "hello" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: pop + IL_0001: ldstr "hello" + IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0010: pop .line 17,17 : 43,57 '' - IL_0010: ldstr "hello" - IL_0015: callvirt instance int32 [mscorlib]System.String::get_Length() - IL_001a: stloc.0 + IL_0011: ldstr "hello" + IL_0016: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_001b: stloc.0 .line 18,18 : 17,25 '' - IL_001b: ldarg.0 - IL_001c: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/'res3@17-2'::builder@ - IL_0021: ldc.i4.1 - IL_0022: tail. - IL_0024: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) - IL_0029: ret + IL_001c: ldarg.0 + IL_001d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/'res3@17-2'::builder@ + IL_0022: ldc.i4.1 + IL_0023: tail. + IL_0025: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) + IL_002a: ret } // end of method 'res3@17-2'::Invoke } // end of class 'res3@17-2' diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr04.il.bsl index e5b49e16e8b..fec0b17fa41 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr04.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr04.il.bsl @@ -40,13 +40,13 @@ // Offset: 0x00000218 Length: 0x0000007D } .module ComputationExpr04.exe -// MVID: {611B0EC4-366A-E566-A745-0383C40E1B61} +// MVID: {611C4D7F-366A-E566-A745-03837F4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x052F0000 +// Image base: 0x06D30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -80,42 +80,44 @@ .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 67 (0x43) + // Code size 68 (0x44) .maxstack 6 .locals init ([0] int32 x, [1] string V_1) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 7,7 : 22,37 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ComputationExpressions\\ComputationExpr04.fs' - IL_0000: ldstr "hello" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: pop + .line 7,7 : 13,54 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ComputationExpressions\\ComputationExpr04.fs' + IL_0000: nop + .line 7,7 : 22,37 '' + IL_0001: ldstr "hello" + IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0010: pop .line 7,7 : 39,53 '' - IL_0010: ldstr "hello" - IL_0015: callvirt instance int32 [mscorlib]System.String::get_Length() - IL_001a: stloc.0 + IL_0011: ldstr "hello" + IL_0016: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_001b: stloc.0 .line 8,8 : 13,28 '' - IL_001b: ldstr "fail" - IL_0020: stloc.1 - IL_0021: ldc.i4.0 - IL_0022: brfalse.s IL_002c + IL_001c: ldstr "fail" + IL_0021: stloc.1 + IL_0022: ldc.i4.0 + IL_0023: brfalse.s IL_002d - IL_0024: ldnull - IL_0025: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_002a: br.s IL_0033 + IL_0025: ldnull + IL_0026: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_002b: br.s IL_0034 - IL_002c: ldloc.1 - IL_002d: call class [mscorlib]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) - IL_0032: throw + IL_002d: ldloc.1 + IL_002e: call class [mscorlib]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) + IL_0033: throw - IL_0033: pop + IL_0034: pop .line 9,9 : 13,21 '' - IL_0034: ldarg.0 - IL_0035: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr04/'res4@7-1'::builder@ - IL_003a: ldloc.0 - IL_003b: tail. - IL_003d: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) - IL_0042: ret + IL_0035: ldarg.0 + IL_0036: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr04/'res4@7-1'::builder@ + IL_003b: ldloc.0 + IL_003c: tail. + IL_003e: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) + IL_0043: ret } // end of method 'res4@7-1'::Invoke } // end of class 'res4@7-1' diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr05.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr05.il.bsl index 7f874ae0a8c..1d8c67b452c 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr05.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr05.il.bsl @@ -40,13 +40,13 @@ // Offset: 0x00000218 Length: 0x0000007D } .module ComputationExpr05.exe -// MVID: {611B0EC4-3687-E566-A745-0383C40E1B61} +// MVID: {611C4D7F-3687-E566-A745-03837F4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00C50000 +// Image base: 0x05380000 // =============== CLASS MEMBERS DECLARATION =================== @@ -164,29 +164,31 @@ .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 57 (0x39) + // Code size 58 (0x3a) .maxstack 7 .locals init ([0] int32 x) + .line 8,8 : 9,50 '' + IL_0000: nop .line 8,8 : 18,33 '' - IL_0000: ldstr "hello" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: pop + IL_0001: ldstr "hello" + IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0010: pop .line 8,8 : 35,49 '' - IL_0010: ldstr "hello" - IL_0015: callvirt instance int32 [mscorlib]System.String::get_Length() - IL_001a: stloc.0 + IL_0011: ldstr "hello" + IL_0016: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_001b: stloc.0 .line 9,9 : 17,72 '' - IL_001b: ldarg.0 - IL_001c: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr05/res5@8::builder@ - IL_0021: newobj instance void ComputationExpr05/'res5@9-1'::.ctor() - IL_0026: ldarg.0 - IL_0027: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr05/res5@8::builder@ - IL_002c: newobj instance void ComputationExpr05/'res5@10-2'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) - IL_0031: tail. - IL_0033: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Using(class [mscorlib]System.IDisposable, + IL_001c: ldarg.0 + IL_001d: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr05/res5@8::builder@ + IL_0022: newobj instance void ComputationExpr05/'res5@9-1'::.ctor() + IL_0027: ldarg.0 + IL_0028: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr05/res5@8::builder@ + IL_002d: newobj instance void ComputationExpr05/'res5@10-2'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) + IL_0032: tail. + IL_0034: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Using(class [mscorlib]System.IDisposable, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0038: ret + IL_0039: ret } // end of method res5@8::Invoke } // end of class res5@8 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter01.il.bsl index f8f111fcb2b..a3ec1e93096 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000001F8 Length: 0x0000007A } .module GenIter01.exe -// MVID: {60BCDCE8-F836-DC98-A745-0383E8DCBC60} +// MVID: {611C4D7C-F836-DC98-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x055E0000 +// Image base: 0x06D20000 // =============== CLASS MEMBERS DECLARATION =================== @@ -103,6 +103,7 @@ IL_002f: ldloc.1 IL_0030: isinst [mscorlib]System.IDisposable IL_0035: stloc.s V_4 + .line 100001,100001 : 0,0 '' IL_0037: ldloc.s V_4 IL_0039: brfalse.s IL_0043 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter02.il.bsl index 985b1b8950d..2874e0e1be7 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter02.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000001F8 Length: 0x0000007B } .module GenIter02.exe -// MVID: {60BCDCE8-F857-DC98-A745-0383E8DCBC60} +// MVID: {611C4D7C-F857-DC98-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07230000 +// Image base: 0x070F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -108,6 +108,7 @@ IL_003f: ldloc.1 IL_0040: isinst [mscorlib]System.IDisposable IL_0045: stloc.s V_4 + .line 100001,100001 : 0,0 '' IL_0047: ldloc.s V_4 IL_0049: brfalse.s IL_0053 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter03.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter03.il.bsl index 526a8fbac7b..6e06141da8b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter03.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter03.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000001F8 Length: 0x0000007B } .module GenIter03.exe -// MVID: {60BCDCE8-F77C-DC98-A745-0383E8DCBC60} +// MVID: {611C4D7C-F77C-DC98-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04BE0000 +// Image base: 0x06DC0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -103,6 +103,7 @@ IL_0030: ldloc.1 IL_0031: isinst [mscorlib]System.IDisposable IL_0036: stloc.s V_4 + .line 100001,100001 : 0,0 '' IL_0038: ldloc.s V_4 IL_003a: brfalse.s IL_0044 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter04.il.bsl index 09d3a9bfd3b..ba6e8bc9d3d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter04.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter04.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000001E8 Length: 0x0000007B } .module GenIter04.exe -// MVID: {60BCDCE8-F79D-DC98-A745-0383E8DCBC60} +// MVID: {611C4D7C-F79D-DC98-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06940000 +// Image base: 0x06650000 // =============== CLASS MEMBERS DECLARATION =================== @@ -130,6 +130,7 @@ IL_0033: ldloc.2 IL_0034: isinst [mscorlib]System.IDisposable IL_0039: stloc.s V_5 + .line 100001,100001 : 0,0 '' IL_003b: ldloc.s V_5 IL_003d: brfalse.s IL_0047 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/InequalityComparison/InequalityComparison05.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/InequalityComparison/InequalityComparison05.il.bsl index d0f9c71afb5..d8b995dda8c 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/InequalityComparison/InequalityComparison05.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/InequalityComparison/InequalityComparison05.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000238 Length: 0x00000085 } .module InequalityComparison05.exe -// MVID: {60B68B7E-263A-E751-A745-03837E8BB660} +// MVID: {611C4D7C-263A-E751-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07350000 +// Image base: 0x06C10000 // =============== CLASS MEMBERS DECLARATION =================== @@ -58,21 +58,23 @@ { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationArgumentCountsAttribute::.ctor(int32[]) = ( 01 00 04 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00 00 00 ) - // Code size 8 (0x8) + // Code size 9 (0x9) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 3,3 : 40,55 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\InequalityComparison\\InequalityComparison05.fs' - IL_0000: ldarg.0 - IL_0001: ldarg.1 - IL_0002: ble.s IL_0006 + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldarg.1 + IL_0003: ble.s IL_0007 .line 3,3 : 56,57 '' - IL_0004: ldarg.2 - IL_0005: ret + IL_0005: ldarg.2 + IL_0006: ret .line 3,3 : 63,64 '' - IL_0006: ldarg.3 - IL_0007: ret + IL_0007: ldarg.3 + IL_0008: ret } // end of method InequalityComparison05::f5 } // end of class InequalityComparison05 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.il.bsl index 891955152bd..5676d0a6476 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000002D0 Length: 0x000000BC } .module ListExpressionSteppingTest2.exe -// MVID: {611B0EC4-D3DE-B780-A745-0383C40E1B61} +// MVID: {611C4D7C-D3DE-B780-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06CE0000 +// Image base: 0x06F60000 // =============== CLASS MEMBERS DECLARATION =================== @@ -279,39 +279,41 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f1() cil managed { - // Code size 58 (0x3a) + // Code size 59 (0x3b) .maxstack 4 .locals init ([0] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0) + .line 6,9 : 9,19 '' + IL_0000: nop .line 6,6 : 11,26 '' - IL_0000: ldstr "hello" - IL_0005: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_000f: pop + IL_0001: ldstr "hello" + IL_0006: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0010: pop .line 7,7 : 11,18 '' - IL_0010: ldloca.s V_0 - IL_0012: ldc.i4.1 - IL_0013: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0018: nop + IL_0011: ldloca.s V_0 + IL_0013: ldc.i4.1 + IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0019: nop .line 8,8 : 11,28 '' - IL_0019: ldstr "goodbye" - IL_001e: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0023: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0028: pop + IL_001a: ldstr "goodbye" + IL_001f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0024: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0029: pop .line 9,9 : 11,18 '' - IL_0029: ldloca.s V_0 - IL_002b: ldc.i4.2 - IL_002c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0031: nop + IL_002a: ldloca.s V_0 + IL_002c: ldc.i4.2 + IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0032: nop .line 6,9 : 9,19 '' - IL_0032: ldloca.s V_0 - IL_0034: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0039: ret + IL_0033: ldloca.s V_0 + IL_0035: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003a: ret } // end of method ListExpressionSteppingTest2::f1 .method public static class [mscorlib]System.Tuple`2>,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> f2(!!a x) cil managed { - // Code size 193 (0xc1) + // Code size 194 (0xc2) .maxstack 6 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> xs1, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'Pipe #1 input #1 at line 16', @@ -324,106 +326,108 @@ [8] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 'Pipe #2 input #3 at line 22', [9] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> 'Pipe #2 stage #1 at line 23', [10] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> 'Pipe #2 stage #2 at line 24') + .line 15,19 : 9,45 '' + IL_0000: nop .line 16,16 : 13,20 '' - IL_0000: ldarg.0 IL_0001: ldarg.0 IL_0002: ldarg.0 - IL_0003: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0008: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0003: ldarg.0 + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0009: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_000d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_000e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0012: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0013: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0017: stloc.1 + IL_0018: stloc.1 .line 16,16 : 22,28 '' - IL_0018: ldc.i4.0 - IL_0019: ldc.i4.1 - IL_001a: ldc.i4.2 - IL_001b: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + IL_0019: ldc.i4.0 + IL_001a: ldc.i4.1 + IL_001b: ldc.i4.2 + IL_001c: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, int32, int32) - IL_0020: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0025: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_002a: stloc.2 + IL_0021: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_002b: stloc.2 .line 17,17 : 16,24 '' - IL_002b: ldloc.1 - IL_002c: ldloc.2 - IL_002d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Zip(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, + IL_002c: ldloc.1 + IL_002d: ldloc.2 + IL_002e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Zip(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0032: stloc.3 + IL_0033: stloc.3 .line 18,18 : 15,45 '' - IL_0033: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18'::@_instance - IL_0038: ldloc.3 - IL_0039: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + IL_0034: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #1 stage #2 at line 18@18'::@_instance + IL_0039: ldloc.3 + IL_003a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_003e: stloc.s 'Pipe #1 stage #2 at line 18' + IL_003f: stloc.s 'Pipe #1 stage #2 at line 18' .line 19,19 : 15,45 '' - IL_0040: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19::@_instance - IL_0045: ldloc.s 'Pipe #1 stage #2 at line 18' - IL_0047: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + IL_0041: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs1@19::@_instance + IL_0046: ldloc.s 'Pipe #1 stage #2 at line 18' + IL_0048: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_004c: stloc.0 + IL_004d: stloc.0 .line 21,25 : 9,50 '' - IL_004d: nop + IL_004e: nop .line 22,22 : 13,20 '' - IL_004e: ldarg.0 IL_004f: ldarg.0 IL_0050: ldarg.0 - IL_0051: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0056: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0051: ldarg.0 + IL_0052: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0057: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_005b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_005c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0060: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0061: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0065: stloc.s 'Pipe #2 input #1 at line 22' + IL_0066: stloc.s 'Pipe #2 input #1 at line 22' .line 22,22 : 22,28 '' - IL_0067: ldc.i4.0 - IL_0068: ldc.i4.1 - IL_0069: ldc.i4.2 - IL_006a: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + IL_0068: ldc.i4.0 + IL_0069: ldc.i4.1 + IL_006a: ldc.i4.2 + IL_006b: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, int32, int32) - IL_006f: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0074: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0079: stloc.s 'Pipe #2 input #2 at line 22' + IL_0070: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0075: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_007a: stloc.s 'Pipe #2 input #2 at line 22' .line 22,22 : 30,36 '' - IL_007b: ldc.i4.0 - IL_007c: ldc.i4.1 - IL_007d: ldc.i4.2 - IL_007e: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + IL_007c: ldc.i4.0 + IL_007d: ldc.i4.1 + IL_007e: ldc.i4.2 + IL_007f: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, int32, int32) - IL_0083: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0088: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_008d: stloc.s 'Pipe #2 input #3 at line 22' + IL_0084: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0089: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_008e: stloc.s 'Pipe #2 input #3 at line 22' .line 23,23 : 17,26 '' - IL_008f: ldloc.s 'Pipe #2 input #1 at line 22' - IL_0091: ldloc.s 'Pipe #2 input #2 at line 22' - IL_0093: ldloc.s 'Pipe #2 input #3 at line 22' - IL_0095: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Zip3(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, + IL_0090: ldloc.s 'Pipe #2 input #1 at line 22' + IL_0092: ldloc.s 'Pipe #2 input #2 at line 22' + IL_0094: ldloc.s 'Pipe #2 input #3 at line 22' + IL_0096: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Zip3(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_009a: stloc.s 'Pipe #2 stage #1 at line 23' + IL_009b: stloc.s 'Pipe #2 stage #1 at line 23' .line 24,24 : 15,50 '' - IL_009c: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24'::@_instance - IL_00a1: ldloc.s 'Pipe #2 stage #1 at line 23' - IL_00a3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + IL_009d: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24' class ListExpressionSteppingTest2/ListExpressionSteppingTest2/'Pipe #2 stage #2 at line 24@24'::@_instance + IL_00a2: ldloc.s 'Pipe #2 stage #1 at line 23' + IL_00a4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00a8: stloc.s 'Pipe #2 stage #2 at line 24' + IL_00a9: stloc.s 'Pipe #2 stage #2 at line 24' .line 25,25 : 15,50 '' - IL_00aa: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25::@_instance - IL_00af: ldloc.s 'Pipe #2 stage #2 at line 24' - IL_00b1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + IL_00ab: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25::@_instance + IL_00b0: ldloc.s 'Pipe #2 stage #2 at line 24' + IL_00b2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_00b6: stloc.s xs2 + IL_00b7: stloc.s xs2 .line 27,27 : 9,17 '' - IL_00b8: ldloc.0 - IL_00b9: ldloc.s xs2 - IL_00bb: newobj instance void class [mscorlib]System.Tuple`2>,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::.ctor(!0, + IL_00b9: ldloc.0 + IL_00ba: ldloc.s xs2 + IL_00bc: newobj instance void class [mscorlib]System.Tuple`2>,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::.ctor(!0, !1) - IL_00c0: ret + IL_00c1: ret } // end of method ListExpressionSteppingTest2::f2 } // end of class ListExpressionSteppingTest2 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl index a3ae5487968..26509649fd5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000270 Length: 0x000000AF } .module ListExpressionSteppingTest4.exe -// MVID: {60B78A57-3154-FA67-A745-0383578AB760} +// MVID: {611C4D7C-3154-FA67-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06700000 +// Image base: 0x06AA0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -58,51 +58,53 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f3() cil managed { - // Code size 73 (0x49) + // Code size 74 (0x4a) .maxstack 4 .locals init ([0] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, [2] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, [3] int32 z) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 11,24 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ListExpressionStepping\\ListExpressionSteppingTest4.fs' - IL_0000: ldc.i4.0 - IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_0006: stloc.1 + .line 6,12 : 9,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ListExpressionStepping\\ListExpressionSteppingTest4.fs' + IL_0000: nop + .line 6,6 : 11,24 '' + IL_0001: ldc.i4.0 + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0007: stloc.1 .line 7,7 : 11,17 '' - IL_0007: ldloc.1 - IL_0008: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_000d: nop + IL_0008: ldloc.1 + IL_0009: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_000e: nop .line 8,8 : 11,24 '' - IL_000e: ldc.i4.0 - IL_000f: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_0014: stloc.2 + IL_000f: ldc.i4.0 + IL_0010: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0015: stloc.2 .line 9,9 : 11,17 '' - IL_0015: ldloc.2 - IL_0016: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_001b: nop + IL_0016: ldloc.2 + IL_0017: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_001c: nop .line 10,10 : 11,19 '' - IL_001c: ldloca.s V_0 - IL_001e: ldloc.1 - IL_001f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0029: nop + IL_001d: ldloca.s V_0 + IL_001f: ldloc.1 + IL_0020: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0025: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_002a: nop .line 11,11 : 11,26 '' - IL_002a: ldloc.1 - IL_002b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0030: ldloc.2 - IL_0031: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0036: add - IL_0037: stloc.3 + IL_002b: ldloc.1 + IL_002c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0031: ldloc.2 + IL_0032: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0037: add + IL_0038: stloc.3 .line 12,12 : 11,18 '' - IL_0038: ldloca.s V_0 - IL_003a: ldloc.3 - IL_003b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0040: nop + IL_0039: ldloca.s V_0 + IL_003b: ldloc.3 + IL_003c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0041: nop .line 6,12 : 9,20 '' - IL_0041: ldloca.s V_0 - IL_0043: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0048: ret + IL_0042: ldloca.s V_0 + IL_0044: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0049: ret } // end of method ListExpressionSteppingTest4::f3 } // end of class ListExpressionSteppingTest4 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl index 92dd8b4cd4d..fce50680f94 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000270 Length: 0x000000AF } .module ListExpressionSteppingTest5.exe -// MVID: {60B78A57-CBE3-BFEA-A745-0383578AB760} +// MVID: {611C4D7C-CBE3-BFEA-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06C00000 +// Image base: 0x06B30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -58,7 +58,7 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f4() cil managed { - // Code size 100 (0x64) + // Code size 101 (0x65) .maxstack 4 .locals init ([0] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 x, @@ -66,67 +66,69 @@ [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, [4] int32 z) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 11,24 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ListExpressionStepping\\ListExpressionSteppingTest5.fs' - IL_0000: ldc.i4.0 - IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_0006: stloc.1 + .line 6,15 : 9,30 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ListExpressionStepping\\ListExpressionSteppingTest5.fs' + IL_0000: nop + .line 6,6 : 11,24 '' + IL_0001: ldc.i4.0 + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_0007: stloc.1 .line 7,7 : 11,14 '' .try { - IL_0007: nop + IL_0008: nop .line 8,8 : 15,28 '' - IL_0008: ldc.i4.0 - IL_0009: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) - IL_000e: stloc.3 + IL_0009: ldc.i4.0 + IL_000a: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) + IL_000f: stloc.3 .line 9,9 : 15,21 '' - IL_000f: ldloc.3 - IL_0010: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0015: nop + IL_0010: ldloc.3 + IL_0011: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0016: nop .line 10,10 : 15,23 '' - IL_0016: ldloca.s V_0 - IL_0018: ldloc.1 - IL_0019: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_001e: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0023: nop + IL_0017: ldloca.s V_0 + IL_0019: ldloc.1 + IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_001f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0024: nop .line 11,11 : 15,30 '' - IL_0024: ldloc.1 - IL_0025: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_002a: ldloc.3 - IL_002b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0030: add - IL_0031: stloc.s z + IL_0025: ldloc.1 + IL_0026: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_002b: ldloc.3 + IL_002c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0031: add + IL_0032: stloc.s z .line 12,12 : 15,22 '' - IL_0033: ldloca.s V_0 - IL_0035: ldloc.s z - IL_0037: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_003c: nop - IL_003d: ldnull - IL_003e: stloc.2 - IL_003f: leave.s IL_005a + IL_0034: ldloca.s V_0 + IL_0036: ldloc.s z + IL_0038: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_003d: nop + IL_003e: ldnull + IL_003f: stloc.2 + IL_0040: leave.s IL_005b .line 13,13 : 11,18 '' } // end .try finally { - IL_0041: nop + IL_0042: nop .line 14,14 : 14,20 '' - IL_0042: ldloc.1 - IL_0043: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0048: nop + IL_0043: ldloc.1 + IL_0044: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0049: nop .line 15,15 : 14,28 '' - IL_0049: ldstr "done" - IL_004e: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0053: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0058: pop - IL_0059: endfinally + IL_004a: ldstr "done" + IL_004f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0054: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0059: pop + IL_005a: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_005a: ldloc.2 - IL_005b: pop + IL_005b: ldloc.2 + IL_005c: pop .line 6,15 : 9,30 '' - IL_005c: ldloca.s V_0 - IL_005e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0063: ret + IL_005d: ldloca.s V_0 + IL_005f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0064: ret } // end of method ListExpressionSteppingTest5::f4 } // end of class ListExpressionSteppingTest5 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl index 3122e29aad1..78f4860f029 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000298 Length: 0x000000BC } .module ListExpressionSteppingTest6.exe -// MVID: {60BD4553-98A2-AB14-A745-03835345BD60} +// MVID: {611C4D7C-98A2-AB14-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04EC0000 +// Image base: 0x06930000 // =============== CLASS MEMBERS DECLARATION =================== @@ -118,6 +118,7 @@ IL_003a: ldloc.1 IL_003b: isinst [mscorlib]System.IDisposable IL_0040: stloc.s V_4 + .line 100001,100001 : 0,0 '' IL_0042: ldloc.s V_4 IL_0044: brfalse.s IL_004e @@ -169,6 +170,7 @@ IL_0091: ldloc.s V_5 IL_0093: isinst [mscorlib]System.IDisposable IL_0098: stloc.s V_8 + .line 100001,100001 : 0,0 '' IL_009a: ldloc.s V_8 IL_009c: brfalse.s IL_00a6 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AnonRecd.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AnonRecd.il.bsl index 23db70c3a45..bfe21b6f486 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AnonRecd.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AnonRecd.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000001C8 Length: 0x0000006B } .module AnonRecd.exe -// MVID: {60B68B7F-C42F-5208-A745-03837F8BB660} +// MVID: {611C4D7C-C42F-5208-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05160000 +// Image base: 0x07240000 // =============== CLASS MEMBERS DECLARATION =================== @@ -161,77 +161,80 @@ instance int32 CompareTo(class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 84 (0x54) + // Code size 85 (0x55) .maxstack 5 .locals init ([0] int32 V_0) - .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\unknown' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004a + .line 1,1 : 1,1 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\unknown' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_004b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0048 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0049 .line 100001,100001 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: ldarg.0 - IL_0012: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0017: ldarg.1 - IL_0018: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_001d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, + IL_000d: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0012: ldarg.0 + IL_0013: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_0018: ldarg.1 + IL_0019: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_001e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0022: stloc.0 - IL_0023: ldloc.0 - IL_0024: ldc.i4.0 - IL_0025: bge.s IL_0029 + IL_0023: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0024: ldloc.0 + IL_0025: ldc.i4.0 + IL_0026: bge.s IL_002a .line 100001,100001 : 0,0 '' - IL_0027: ldloc.0 - IL_0028: ret + IL_0028: ldloc.0 + IL_0029: ret .line 100001,100001 : 0,0 '' - IL_0029: ldloc.0 - IL_002a: ldc.i4.0 - IL_002b: ble.s IL_002f + IL_002a: ldloc.0 + IL_002b: ldc.i4.0 + IL_002c: ble.s IL_0030 .line 100001,100001 : 0,0 '' - IL_002d: ldloc.0 - IL_002e: ret + IL_002e: ldloc.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_002f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0034: ldarg.0 - IL_0035: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_003a: ldarg.1 - IL_003b: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0040: tail. - IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, + IL_0030: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0035: ldarg.0 + IL_0036: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_003b: ldarg.1 + IL_003c: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0041: tail. + IL_0043: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0047: ret + IL_0048: ret .line 100001,100001 : 0,0 '' - IL_0048: ldc.i4.1 - IL_0049: ret + IL_0049: ldc.i4.1 + IL_004a: ret .line 100001,100001 : 0,0 '' - IL_004a: ldarg.1 - IL_004b: ldnull - IL_004c: cgt.un - IL_004e: brfalse.s IL_0052 + IL_004b: ldarg.1 + IL_004c: ldnull + IL_004d: cgt.un + IL_004f: brfalse.s IL_0053 .line 100001,100001 : 0,0 '' - IL_0050: ldc.i4.m1 - IL_0051: ret + IL_0051: ldc.i4.m1 + IL_0052: ret .line 100001,100001 : 0,0 '' - IL_0052: ldc.i4.0 - IL_0053: ret + IL_0053: ldc.i4.0 + IL_0054: ret } // end of method '<>f__AnonymousType1912756633`2'::CompareTo .method public hidebysig virtual final @@ -265,6 +268,7 @@ IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: stloc.1 + .line 100001,100001 : 0,0 '' IL_0009: ldarg.0 IL_000a: ldnull IL_000b: cgt.un @@ -287,6 +291,7 @@ !!0, !!0) IL_002c: stloc.2 + .line 100001,100001 : 0,0 '' IL_002d: ldloc.2 IL_002e: ldc.i4.0 IL_002f: bge.s IL_0033 @@ -340,56 +345,58 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 66 (0x42) + // Code size 67 (0x43) .maxstack 7 .locals init ([0] int32 V_0) + .line 1,1 : 1,1 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0040 - - .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: ldarg.0 - IL_000f: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0014: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0041 + + .line 100001,100001 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + IL_0009: ldc.i4 0x9e3779b9 + IL_000e: ldarg.1 + IL_000f: ldarg.0 + IL_0010: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0015: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, !!0) - IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add + IL_001a: ldloc.0 + IL_001b: ldc.i4.6 + IL_001c: shl + IL_001d: ldloc.0 + IL_001e: ldc.i4.2 + IL_001f: shr IL_0020: add IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldarg.1 - IL_0029: ldarg.0 - IL_002a: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_002f: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, + IL_0022: add + IL_0023: stloc.0 + IL_0024: ldc.i4 0x9e3779b9 + IL_0029: ldarg.1 + IL_002a: ldarg.0 + IL_002b: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_0030: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, !!0) - IL_0034: ldloc.0 - IL_0035: ldc.i4.6 - IL_0036: shl - IL_0037: ldloc.0 - IL_0038: ldc.i4.2 - IL_0039: shr - IL_003a: add + IL_0035: ldloc.0 + IL_0036: ldc.i4.6 + IL_0037: shl + IL_0038: ldloc.0 + IL_0039: ldc.i4.2 + IL_003a: shr IL_003b: add IL_003c: add - IL_003d: stloc.0 - IL_003e: ldloc.0 - IL_003f: ret + IL_003d: add + IL_003e: stloc.0 + IL_003f: ldloc.0 + IL_0040: ret .line 100001,100001 : 0,0 '' - IL_0040: ldc.i4.0 - IL_0041: ret + IL_0041: ldc.i4.0 + IL_0042: ret } // end of method '<>f__AnonymousType1912756633`2'::GetHashCode .method public hidebysig virtual final @@ -411,117 +418,123 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 71 (0x47) + // Code size 72 (0x48) .maxstack 5 .locals init ([0] class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> V_0, [1] class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> V_1) + .line 1,1 : 1,1 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003f + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0040 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003d + IL_0007: ldarg.1 + IL_0008: isinst class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_003e .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.2 - IL_0013: ldarg.0 - IL_0014: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0019: ldloc.1 - IL_001a: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_001f: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, + IL_0011: ldloc.0 + IL_0012: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0013: ldarg.2 + IL_0014: ldarg.0 + IL_0015: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_001a: ldloc.1 + IL_001b: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_0020: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_0024: brfalse.s IL_003b + IL_0025: brfalse.s IL_003c .line 100001,100001 : 0,0 '' - IL_0026: ldarg.2 - IL_0027: ldarg.0 - IL_0028: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_002d: ldloc.1 - IL_002e: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0033: tail. - IL_0035: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, + IL_0027: ldarg.2 + IL_0028: ldarg.0 + IL_0029: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_002e: ldloc.1 + IL_002f: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0034: tail. + IL_0036: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_003a: ret + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_003c: ldc.i4.0 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.0 - IL_003e: ret + IL_003e: ldc.i4.0 + IL_003f: ret .line 100001,100001 : 0,0 '' - IL_003f: ldarg.1 - IL_0040: ldnull - IL_0041: cgt.un - IL_0043: ldc.i4.0 - IL_0044: ceq - IL_0046: ret + IL_0040: ldarg.1 + IL_0041: ldnull + IL_0042: cgt.un + IL_0044: ldc.i4.0 + IL_0045: ceq + IL_0047: ret } // end of method '<>f__AnonymousType1912756633`2'::Equals .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) - .maxstack 8 + // Code size 64 (0x40) + .maxstack 4 + .line 1,1 : 1,1 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0038 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0035 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0012: ldarg.1 - IL_0013: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0018: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + IL_000d: ldarg.0 + IL_000e: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_0013: ldarg.1 + IL_0014: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_0019: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, !!0) - IL_001d: brfalse.s IL_0033 + IL_001e: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' - IL_001f: ldarg.0 - IL_0020: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0025: ldarg.1 - IL_0026: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_002b: tail. - IL_002d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + IL_0020: ldarg.0 + IL_0021: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0026: ldarg.1 + IL_0027: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_002c: tail. + IL_002e: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, !!0) - IL_0032: ret + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0036: ldc.i4.0 + IL_0037: ret .line 100001,100001 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0038: ldarg.1 + IL_0039: ldnull + IL_003a: cgt.un + IL_003c: ldc.i4.0 + IL_003d: ceq + IL_003f: ret } // end of method '<>f__AnonymousType1912756633`2'::Equals .method public hidebysig virtual final @@ -535,6 +548,7 @@ IL_0000: ldarg.1 IL_0001: isinst class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0014 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EntryPoint01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EntryPoint01.il.bsl index 4afe8d6966b..d17322d83b4 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EntryPoint01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EntryPoint01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000258 Length: 0x00000090 } .module EntryPoint01.exe -// MVID: {60B68B7F-9846-72C1-A745-03837F8BB660} +// MVID: {611C4D7C-9846-72C1-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x071C0000 +// Image base: 0x06DA0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -66,33 +66,37 @@ { .entrypoint .custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 35 (0x23) + // Code size 37 (0x25) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 8,8 : 9,39 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\EntryPoint01.fs' + .line 8,8 : 4,49 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\EntryPoint01.fs' .line 100001,100001 : 0,0 '' IL_0000: ldc.i4.0 IL_0001: stsfld int32 ''.$EntryPoint01::init@ IL_0006: ldsfld int32 ''.$EntryPoint01::init@ IL_000b: pop - IL_000c: call int32 EntryPoint01::get_static_initializer() - IL_0011: ldc.i4.s 10 - IL_0013: bne.un.s IL_0019 + IL_000c: nop + .line 8,8 : 9,39 '' + IL_000d: nop + .line 100001,100001 : 0,0 '' + IL_000e: call int32 EntryPoint01::get_static_initializer() + IL_0013: ldc.i4.s 10 + IL_0015: bne.un.s IL_001b .line 8,8 : 40,41 '' - IL_0015: ldc.i4.0 + IL_0017: ldc.i4.0 .line 100001,100001 : 0,0 '' - IL_0016: nop - IL_0017: br.s IL_001b + IL_0018: nop + IL_0019: br.s IL_001d .line 8,8 : 47,48 '' - IL_0019: ldc.i4.1 + IL_001b: ldc.i4.1 .line 100001,100001 : 0,0 '' - IL_001a: nop + IL_001c: nop .line 100001,100001 : 0,0 '' - IL_001b: tail. - IL_001d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0022: ret + IL_001d: tail. + IL_001f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_0024: ret } // end of method EntryPoint01::main .property int32 static_initializer() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EqualsOnUnions01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EqualsOnUnions01.il.bsl index f1c372c2645..ba4e9d4b2d6 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EqualsOnUnions01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EqualsOnUnions01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000640 Length: 0x000001C7 } .module EqualsOnUnions01.exe -// MVID: {60B68B7F-BBFB-14A0-A745-03837F8BB660} +// MVID: {611C52A3-BBFB-14A0-A745-0383A3521C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07200000 +// Image base: 0x04FE0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -339,7 +339,7 @@ instance int32 CompareTo(class EqualsOnUnions01/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 131 (0x83) + // Code size 132 (0x84) .maxstack 4 .locals init ([0] int32 V_0, [1] class EqualsOnUnions01/U V_1, @@ -351,106 +351,110 @@ [7] int32 V_7, [8] int32 V_8) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\EqualsOnUnions01.fs' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_0079 - + .line 6,6 : 6,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\EqualsOnUnions01.fs' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse.s IL_0077 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse IL_007a .line 100001,100001 : 0,0 '' - IL_000f: ldarg.0 - IL_0010: stloc.1 - IL_0011: ldloc.1 - IL_0012: isinst EqualsOnUnions01/U/B - IL_0017: brfalse.s IL_001c + IL_000a: ldarg.1 + IL_000b: ldnull + IL_000c: cgt.un + IL_000e: brfalse.s IL_0078 - IL_0019: ldc.i4.1 - IL_001a: br.s IL_001d + .line 100001,100001 : 0,0 '' + IL_0010: ldarg.0 + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: isinst EqualsOnUnions01/U/B + IL_0018: brfalse.s IL_001d - IL_001c: ldc.i4.0 - IL_001d: stloc.0 - IL_001e: ldarg.1 - IL_001f: stloc.3 - IL_0020: ldloc.3 - IL_0021: isinst EqualsOnUnions01/U/B - IL_0026: brfalse.s IL_002b + IL_001a: ldc.i4.1 + IL_001b: br.s IL_001e - IL_0028: ldc.i4.1 - IL_0029: br.s IL_002c + IL_001d: ldc.i4.0 + IL_001e: stloc.0 + IL_001f: ldarg.1 + IL_0020: stloc.3 + IL_0021: ldloc.3 + IL_0022: isinst EqualsOnUnions01/U/B + IL_0027: brfalse.s IL_002c - IL_002b: ldc.i4.0 - IL_002c: stloc.2 - IL_002d: ldloc.0 - IL_002e: ldloc.2 - IL_002f: bne.un.s IL_0073 + IL_0029: ldc.i4.1 + IL_002a: br.s IL_002d + IL_002c: ldc.i4.0 + IL_002d: stloc.2 .line 100001,100001 : 0,0 '' - IL_0031: ldarg.0 - IL_0032: isinst EqualsOnUnions01/U/B - IL_0037: brfalse.s IL_0071 + IL_002e: ldloc.0 + IL_002f: ldloc.2 + IL_0030: bne.un.s IL_0074 .line 100001,100001 : 0,0 '' - IL_0039: ldarg.0 - IL_003a: castclass EqualsOnUnions01/U/B - IL_003f: stloc.s V_4 - IL_0041: ldarg.1 - IL_0042: castclass EqualsOnUnions01/U/B - IL_0047: stloc.s V_5 - IL_0049: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004e: stloc.s V_6 - IL_0050: ldloc.s V_4 - IL_0052: ldfld int32 EqualsOnUnions01/U/B::item - IL_0057: stloc.s V_7 - IL_0059: ldloc.s V_5 - IL_005b: ldfld int32 EqualsOnUnions01/U/B::item - IL_0060: stloc.s V_8 - IL_0062: ldloc.s V_7 - IL_0064: ldloc.s V_8 - IL_0066: bge.s IL_006a + IL_0032: ldarg.0 + IL_0033: isinst EqualsOnUnions01/U/B + IL_0038: brfalse.s IL_0072 + + .line 100001,100001 : 0,0 '' + IL_003a: ldarg.0 + IL_003b: castclass EqualsOnUnions01/U/B + IL_0040: stloc.s V_4 + IL_0042: ldarg.1 + IL_0043: castclass EqualsOnUnions01/U/B + IL_0048: stloc.s V_5 + IL_004a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_004f: stloc.s V_6 + IL_0051: ldloc.s V_4 + IL_0053: ldfld int32 EqualsOnUnions01/U/B::item + IL_0058: stloc.s V_7 + IL_005a: ldloc.s V_5 + IL_005c: ldfld int32 EqualsOnUnions01/U/B::item + IL_0061: stloc.s V_8 + .line 100001,100001 : 0,0 '' + IL_0063: ldloc.s V_7 + IL_0065: ldloc.s V_8 + IL_0067: bge.s IL_006b .line 100001,100001 : 0,0 '' - IL_0068: ldc.i4.m1 - IL_0069: ret + IL_0069: ldc.i4.m1 + IL_006a: ret .line 100001,100001 : 0,0 '' - IL_006a: ldloc.s V_7 - IL_006c: ldloc.s V_8 - IL_006e: cgt - IL_0070: ret + IL_006b: ldloc.s V_7 + IL_006d: ldloc.s V_8 + IL_006f: cgt + IL_0071: ret .line 100001,100001 : 0,0 '' - IL_0071: ldc.i4.0 - IL_0072: ret + IL_0072: ldc.i4.0 + IL_0073: ret .line 100001,100001 : 0,0 '' - IL_0073: ldloc.0 - IL_0074: ldloc.2 - IL_0075: sub - IL_0076: ret + IL_0074: ldloc.0 + IL_0075: ldloc.2 + IL_0076: sub + IL_0077: ret .line 100001,100001 : 0,0 '' - IL_0077: ldc.i4.1 - IL_0078: ret + IL_0078: ldc.i4.1 + IL_0079: ret .line 100001,100001 : 0,0 '' - IL_0079: ldarg.1 - IL_007a: ldnull - IL_007b: cgt.un - IL_007d: brfalse.s IL_0081 + IL_007a: ldarg.1 + IL_007b: ldnull + IL_007c: cgt.un + IL_007e: brfalse.s IL_0082 .line 100001,100001 : 0,0 '' - IL_007f: ldc.i4.m1 - IL_0080: ret + IL_0080: ldc.i4.m1 + IL_0081: ret .line 100001,100001 : 0,0 '' - IL_0081: ldc.i4.0 - IL_0082: ret + IL_0082: ldc.i4.0 + IL_0083: ret } // end of method U::CompareTo .method public hidebysig virtual final @@ -488,6 +492,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any EqualsOnUnions01/U IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -523,6 +528,7 @@ IL_0039: ldc.i4.0 IL_003a: stloc.3 + .line 100001,100001 : 0,0 '' IL_003b: ldloc.1 IL_003c: ldloc.3 IL_003d: bne.un.s IL_007d @@ -547,6 +553,7 @@ IL_0063: ldloc.s V_6 IL_0065: ldfld int32 EqualsOnUnions01/U/B::item IL_006a: stloc.s V_9 + .line 100001,100001 : 0,0 '' IL_006c: ldloc.s V_8 IL_006e: ldloc.s V_9 IL_0070: bge.s IL_0074 @@ -595,65 +602,68 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 68 (0x44) .maxstack 7 .locals init ([0] int32 V_0, [1] class EqualsOnUnions01/U/B V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2, [3] class EqualsOnUnions01/U V_3) + .line 6,6 : 6,7 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0041 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0042 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: isinst EqualsOnUnions01/U/B - IL_000e: brfalse.s IL_0032 + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: isinst EqualsOnUnions01/U/B + IL_000f: brfalse.s IL_0033 .line 100001,100001 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: castclass EqualsOnUnions01/U/B - IL_0016: stloc.1 - IL_0017: ldc.i4.1 - IL_0018: stloc.0 - IL_0019: ldc.i4 0x9e3779b9 - IL_001e: ldarg.1 - IL_001f: stloc.2 - IL_0020: ldloc.1 - IL_0021: ldfld int32 EqualsOnUnions01/U/B::item - IL_0026: ldloc.0 - IL_0027: ldc.i4.6 - IL_0028: shl - IL_0029: ldloc.0 - IL_002a: ldc.i4.2 - IL_002b: shr - IL_002c: add + IL_0011: ldarg.0 + IL_0012: castclass EqualsOnUnions01/U/B + IL_0017: stloc.1 + IL_0018: ldc.i4.1 + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.1 + IL_0020: stloc.2 + IL_0021: ldloc.1 + IL_0022: ldfld int32 EqualsOnUnions01/U/B::item + IL_0027: ldloc.0 + IL_0028: ldc.i4.6 + IL_0029: shl + IL_002a: ldloc.0 + IL_002b: ldc.i4.2 + IL_002c: shr IL_002d: add IL_002e: add - IL_002f: stloc.0 - IL_0030: ldloc.0 - IL_0031: ret + IL_002f: add + IL_0030: stloc.0 + IL_0031: ldloc.0 + IL_0032: ret .line 100001,100001 : 0,0 '' - IL_0032: ldarg.0 - IL_0033: stloc.3 - IL_0034: ldloc.3 - IL_0035: isinst EqualsOnUnions01/U/B - IL_003a: brfalse.s IL_003f + IL_0033: ldarg.0 + IL_0034: stloc.3 + IL_0035: ldloc.3 + IL_0036: isinst EqualsOnUnions01/U/B + IL_003b: brfalse.s IL_0040 - IL_003c: ldc.i4.1 - IL_003d: br.s IL_0040 + IL_003d: ldc.i4.1 + IL_003e: br.s IL_0041 - IL_003f: ldc.i4.0 - IL_0040: ret + IL_0040: ldc.i4.0 + IL_0041: ret .line 100001,100001 : 0,0 '' - IL_0041: ldc.i4.0 - IL_0042: ret + IL_0042: ldc.i4.0 + IL_0043: ret } // end of method U::GetHashCode .method public hidebysig virtual final @@ -674,7 +684,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 114 (0x72) + // Code size 115 (0x73) .maxstack 4 .locals init ([0] class EqualsOnUnions01/U V_0, [1] class EqualsOnUnions01/U V_1, @@ -685,95 +695,99 @@ [6] class EqualsOnUnions01/U/B V_6, [7] class EqualsOnUnions01/U/B V_7, [8] class [mscorlib]System.Collections.IEqualityComparer V_8) + .line 6,6 : 6,7 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006a + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_0007: ldarg.1 + IL_0008: isinst EqualsOnUnions01/U + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0069 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst EqualsOnUnions01/U - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0068 + IL_0011: ldloc.0 + IL_0012: stloc.1 + IL_0013: ldarg.0 + IL_0014: stloc.3 + IL_0015: ldloc.3 + IL_0016: isinst EqualsOnUnions01/U/B + IL_001b: brfalse.s IL_0020 + + IL_001d: ldc.i4.1 + IL_001e: br.s IL_0021 + + IL_0020: ldc.i4.0 + IL_0021: stloc.2 + IL_0022: ldloc.1 + IL_0023: stloc.s V_5 + IL_0025: ldloc.s V_5 + IL_0027: isinst EqualsOnUnions01/U/B + IL_002c: brfalse.s IL_0031 + + IL_002e: ldc.i4.1 + IL_002f: br.s IL_0032 + IL_0031: ldc.i4.0 + IL_0032: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: stloc.3 - IL_0014: ldloc.3 - IL_0015: isinst EqualsOnUnions01/U/B - IL_001a: brfalse.s IL_001f + IL_0034: ldloc.2 + IL_0035: ldloc.s V_4 + IL_0037: bne.un.s IL_0067 - IL_001c: ldc.i4.1 - IL_001d: br.s IL_0020 + .line 100001,100001 : 0,0 '' + IL_0039: ldarg.0 + IL_003a: isinst EqualsOnUnions01/U/B + IL_003f: brfalse.s IL_0065 - IL_001f: ldc.i4.0 - IL_0020: stloc.2 - IL_0021: ldloc.1 - IL_0022: stloc.s V_5 - IL_0024: ldloc.s V_5 - IL_0026: isinst EqualsOnUnions01/U/B - IL_002b: brfalse.s IL_0030 - - IL_002d: ldc.i4.1 - IL_002e: br.s IL_0031 - - IL_0030: ldc.i4.0 - IL_0031: stloc.s V_4 - IL_0033: ldloc.2 - IL_0034: ldloc.s V_4 - IL_0036: bne.un.s IL_0066 - - .line 100001,100001 : 0,0 '' - IL_0038: ldarg.0 - IL_0039: isinst EqualsOnUnions01/U/B - IL_003e: brfalse.s IL_0064 - - .line 100001,100001 : 0,0 '' - IL_0040: ldarg.0 - IL_0041: castclass EqualsOnUnions01/U/B - IL_0046: stloc.s V_6 - IL_0048: ldloc.1 - IL_0049: castclass EqualsOnUnions01/U/B - IL_004e: stloc.s V_7 - IL_0050: ldarg.2 - IL_0051: stloc.s V_8 - IL_0053: ldloc.s V_6 - IL_0055: ldfld int32 EqualsOnUnions01/U/B::item - IL_005a: ldloc.s V_7 - IL_005c: ldfld int32 EqualsOnUnions01/U/B::item - IL_0061: ceq - IL_0063: ret + .line 100001,100001 : 0,0 '' + IL_0041: ldarg.0 + IL_0042: castclass EqualsOnUnions01/U/B + IL_0047: stloc.s V_6 + IL_0049: ldloc.1 + IL_004a: castclass EqualsOnUnions01/U/B + IL_004f: stloc.s V_7 + IL_0051: ldarg.2 + IL_0052: stloc.s V_8 + IL_0054: ldloc.s V_6 + IL_0056: ldfld int32 EqualsOnUnions01/U/B::item + IL_005b: ldloc.s V_7 + IL_005d: ldfld int32 EqualsOnUnions01/U/B::item + IL_0062: ceq + IL_0064: ret .line 100001,100001 : 0,0 '' - IL_0064: ldc.i4.1 - IL_0065: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 100001,100001 : 0,0 '' - IL_0066: ldc.i4.0 - IL_0067: ret + IL_0067: ldc.i4.0 + IL_0068: ret .line 100001,100001 : 0,0 '' - IL_0068: ldc.i4.0 - IL_0069: ret + IL_0069: ldc.i4.0 + IL_006a: ret .line 100001,100001 : 0,0 '' - IL_006a: ldarg.1 - IL_006b: ldnull - IL_006c: cgt.un - IL_006e: ldc.i4.0 - IL_006f: ceq - IL_0071: ret + IL_006b: ldarg.1 + IL_006c: ldnull + IL_006d: cgt.un + IL_006f: ldc.i4.0 + IL_0070: ceq + IL_0072: ret } // end of method U::Equals .method public hidebysig virtual final instance bool Equals(class EqualsOnUnions01/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 101 (0x65) + // Code size 102 (0x66) .maxstack 4 .locals init ([0] int32 V_0, [1] class EqualsOnUnions01/U V_1, @@ -781,83 +795,86 @@ [3] class EqualsOnUnions01/U V_3, [4] class EqualsOnUnions01/U/B V_4, [5] class EqualsOnUnions01/U/B V_5) + .line 6,6 : 6,7 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_005d + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_005e .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_005b + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_005c .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: isinst EqualsOnUnions01/U/B - IL_0014: brfalse.s IL_0019 + IL_000d: ldarg.0 + IL_000e: stloc.1 + IL_000f: ldloc.1 + IL_0010: isinst EqualsOnUnions01/U/B + IL_0015: brfalse.s IL_001a - IL_0016: ldc.i4.1 - IL_0017: br.s IL_001a + IL_0017: ldc.i4.1 + IL_0018: br.s IL_001b - IL_0019: ldc.i4.0 - IL_001a: stloc.0 - IL_001b: ldarg.1 - IL_001c: stloc.3 - IL_001d: ldloc.3 - IL_001e: isinst EqualsOnUnions01/U/B - IL_0023: brfalse.s IL_0028 + IL_001a: ldc.i4.0 + IL_001b: stloc.0 + IL_001c: ldarg.1 + IL_001d: stloc.3 + IL_001e: ldloc.3 + IL_001f: isinst EqualsOnUnions01/U/B + IL_0024: brfalse.s IL_0029 - IL_0025: ldc.i4.1 - IL_0026: br.s IL_0029 + IL_0026: ldc.i4.1 + IL_0027: br.s IL_002a - IL_0028: ldc.i4.0 - IL_0029: stloc.2 - IL_002a: ldloc.0 - IL_002b: ldloc.2 - IL_002c: bne.un.s IL_0059 + IL_0029: ldc.i4.0 + IL_002a: stloc.2 + .line 100001,100001 : 0,0 '' + IL_002b: ldloc.0 + IL_002c: ldloc.2 + IL_002d: bne.un.s IL_005a .line 100001,100001 : 0,0 '' - IL_002e: ldarg.0 - IL_002f: isinst EqualsOnUnions01/U/B - IL_0034: brfalse.s IL_0057 + IL_002f: ldarg.0 + IL_0030: isinst EqualsOnUnions01/U/B + IL_0035: brfalse.s IL_0058 .line 100001,100001 : 0,0 '' - IL_0036: ldarg.0 - IL_0037: castclass EqualsOnUnions01/U/B - IL_003c: stloc.s V_4 - IL_003e: ldarg.1 - IL_003f: castclass EqualsOnUnions01/U/B - IL_0044: stloc.s V_5 - IL_0046: ldloc.s V_4 - IL_0048: ldfld int32 EqualsOnUnions01/U/B::item - IL_004d: ldloc.s V_5 - IL_004f: ldfld int32 EqualsOnUnions01/U/B::item - IL_0054: ceq - IL_0056: ret + IL_0037: ldarg.0 + IL_0038: castclass EqualsOnUnions01/U/B + IL_003d: stloc.s V_4 + IL_003f: ldarg.1 + IL_0040: castclass EqualsOnUnions01/U/B + IL_0045: stloc.s V_5 + IL_0047: ldloc.s V_4 + IL_0049: ldfld int32 EqualsOnUnions01/U/B::item + IL_004e: ldloc.s V_5 + IL_0050: ldfld int32 EqualsOnUnions01/U/B::item + IL_0055: ceq + IL_0057: ret .line 100001,100001 : 0,0 '' - IL_0057: ldc.i4.1 - IL_0058: ret + IL_0058: ldc.i4.1 + IL_0059: ret .line 100001,100001 : 0,0 '' - IL_0059: ldc.i4.0 - IL_005a: ret + IL_005a: ldc.i4.0 + IL_005b: ret .line 100001,100001 : 0,0 '' - IL_005b: ldc.i4.0 - IL_005c: ret + IL_005c: ldc.i4.0 + IL_005d: ret .line 100001,100001 : 0,0 '' - IL_005d: ldarg.1 - IL_005e: ldnull - IL_005f: cgt.un - IL_0061: ldc.i4.0 - IL_0062: ceq - IL_0064: ret + IL_005e: ldarg.1 + IL_005f: ldnull + IL_0060: cgt.un + IL_0062: ldc.i4.0 + IL_0063: ceq + IL_0065: ret } // end of method U::Equals .method public hidebysig virtual final @@ -871,6 +888,7 @@ IL_0000: ldarg.1 IL_0001: isinst EqualsOnUnions01/U IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl index 70bbfca2a6f..5ef897b2169 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000690 Length: 0x000001F4 } .module GeneralizationOnUnions01.exe -// MVID: {60B68B7F-4CA2-8CD1-A745-03837F8BB660} +// MVID: {611C4D7C-4CA2-8CD1-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06C00000 +// Image base: 0x06A80000 // =============== CLASS MEMBERS DECLARATION =================== @@ -145,42 +145,44 @@ instance int32 CompareTo(class GeneralizationOnUnions01/Weirdo obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 26 (0x1a) + // Code size 27 (0x1b) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\GeneralizationOnUnions01.fs' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0010 + .line 4,4 : 6,12 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\GeneralizationOnUnions01.fs' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0011 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_000e + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_000f .line 100001,100001 : 0,0 '' - IL_000c: ldc.i4.0 - IL_000d: ret + IL_000d: ldc.i4.0 + IL_000e: ret .line 100001,100001 : 0,0 '' - IL_000e: ldc.i4.1 - IL_000f: ret + IL_000f: ldc.i4.1 + IL_0010: ret .line 100001,100001 : 0,0 '' - IL_0010: ldarg.1 - IL_0011: ldnull - IL_0012: cgt.un - IL_0014: brfalse.s IL_0018 + IL_0011: ldarg.1 + IL_0012: ldnull + IL_0013: cgt.un + IL_0015: brfalse.s IL_0019 .line 100001,100001 : 0,0 '' - IL_0016: ldc.i4.m1 - IL_0017: ret + IL_0017: ldc.i4.m1 + IL_0018: ret .line 100001,100001 : 0,0 '' - IL_0018: ldc.i4.0 - IL_0019: ret + IL_0019: ldc.i4.0 + IL_001a: ret } // end of method Weirdo::CompareTo .method public hidebysig virtual final @@ -209,6 +211,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any GeneralizationOnUnions01/Weirdo IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -249,26 +252,28 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 14 (0xe) + // Code size 15 (0xf) .maxstack 3 .locals init ([0] int32 V_0) + .line 4,4 : 6,12 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_000c + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_000d .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: ret + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + IL_0009: ldarg.0 + IL_000a: pop + IL_000b: ldc.i4.0 + IL_000c: ret .line 100001,100001 : 0,0 '' - IL_000c: ldc.i4.0 - IL_000d: ret + IL_000d: ldc.i4.0 + IL_000e: ret } // end of method Weirdo::GetHashCode .method public hidebysig virtual final @@ -289,67 +294,72 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 30 (0x1e) + // Code size 31 (0x1f) .maxstack 4 .locals init ([0] class GeneralizationOnUnions01/Weirdo V_0, [1] class GeneralizationOnUnions01/Weirdo V_1) + .line 4,4 : 6,12 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0016 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0017 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst GeneralizationOnUnions01/Weirdo - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0014 + IL_0007: ldarg.1 + IL_0008: isinst GeneralizationOnUnions01/Weirdo + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0015 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldc.i4.1 - IL_0013: ret + IL_0011: ldloc.0 + IL_0012: stloc.1 + IL_0013: ldc.i4.1 + IL_0014: ret .line 100001,100001 : 0,0 '' - IL_0014: ldc.i4.0 - IL_0015: ret + IL_0015: ldc.i4.0 + IL_0016: ret .line 100001,100001 : 0,0 '' - IL_0016: ldarg.1 - IL_0017: ldnull - IL_0018: cgt.un - IL_001a: ldc.i4.0 - IL_001b: ceq - IL_001d: ret + IL_0017: ldarg.1 + IL_0018: ldnull + IL_0019: cgt.un + IL_001b: ldc.i4.0 + IL_001c: ceq + IL_001e: ret } // end of method Weirdo::Equals .method public hidebysig virtual final instance bool Equals(class GeneralizationOnUnions01/Weirdo obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 19 (0x13) + // Code size 20 (0x14) .maxstack 8 + .line 4,4 : 6,12 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_000b + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_000c .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: ret + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: ret .line 100001,100001 : 0,0 '' - IL_000b: ldarg.1 - IL_000c: ldnull - IL_000d: cgt.un - IL_000f: ldc.i4.0 - IL_0010: ceq - IL_0012: ret + IL_000c: ldarg.1 + IL_000d: ldnull + IL_000e: cgt.un + IL_0010: ldc.i4.0 + IL_0011: ceq + IL_0013: ret } // end of method Weirdo::Equals .method public hidebysig virtual final @@ -363,6 +373,7 @@ IL_0000: ldarg.1 IL_0001: isinst GeneralizationOnUnions01/Weirdo IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/IfThenElse01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/IfThenElse01.il.bsl index 3d0ba7cb01f..da3619e275e 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/IfThenElse01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/IfThenElse01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000208 Length: 0x00000092 } .module IfThenElse01.dll -// MVID: {60B68B7F-2D6C-0B5D-A745-03837F8BB660} +// MVID: {611C4D7C-2D6C-0B5D-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06DD0000 +// Image base: 0x06B70000 // =============== CLASS MEMBERS DECLARATION =================== @@ -128,7 +128,7 @@ !a z, !a w) cil managed { - // Code size 16 (0x10) + // Code size 17 (0x11) .maxstack 7 .locals init ([0] class IfThenElse01/M/f5@5 V_0) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' @@ -136,17 +136,19 @@ IL_0000: ldarg.0 IL_0001: ldfld class IfThenElse01/M/f5@5 class IfThenElse01/M/f5@5T::self0@ IL_0006: stloc.0 - IL_0007: ldarg.1 - IL_0008: ldarg.2 - IL_0009: ble.s IL_000d + IL_0007: nop + .line 100001,100001 : 0,0 '' + IL_0008: ldarg.1 + IL_0009: ldarg.2 + IL_000a: ble.s IL_000e .line 5,5 : 64,65 '' - IL_000b: ldarg.3 - IL_000c: ret + IL_000c: ldarg.3 + IL_000d: ret .line 5,5 : 71,72 '' - IL_000d: ldarg.s w - IL_000f: ret + IL_000e: ldarg.s w + IL_0010: ret } // end of method f5@5T::Invoke } // end of class f5@5T diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/LetIfThenElse01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/LetIfThenElse01.il.bsl index 0f66580c07d..d52b78f54d7 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/LetIfThenElse01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/LetIfThenElse01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000001E0 Length: 0x00000076 } .module LetIfThenElse01.exe -// MVID: {611B0EC4-BE5A-D8FD-A745-0383C40E1B61} +// MVID: {611C4D7C-BE5A-D8FD-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x069B0000 +// Image base: 0x06920000 // =============== CLASS MEMBERS DECLARATION =================== @@ -54,7 +54,7 @@ .method public static class [mscorlib]System.Tuple`4 F(!!a y) cil managed { - // Code size 124 (0x7c) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] int32 x1, [1] valuetype [mscorlib]System.DateTime V_1, @@ -66,95 +66,103 @@ [7] valuetype [mscorlib]System.DateTime V_7) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 6,6 : 12,51 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\LetIfThenElse01.fs' - IL_0000: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now() - IL_0005: stloc.1 - IL_0006: ldloca.s V_1 - IL_0008: call instance int32 [mscorlib]System.DateTime::get_Year() - IL_000d: ldc.i4 0x7d0 - IL_0012: ble.s IL_0018 + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now() + IL_0006: stloc.1 + IL_0007: ldloca.s V_1 + IL_0009: call instance int32 [mscorlib]System.DateTime::get_Year() + IL_000e: ldc.i4 0x7d0 + IL_0013: ble.s IL_0019 .line 6,6 : 52,53 '' - IL_0014: ldc.i4.1 + IL_0015: ldc.i4.1 .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br.s IL_001a + IL_0016: nop + IL_0017: br.s IL_001b .line 6,6 : 59,60 '' - IL_0018: ldc.i4.2 + IL_0019: ldc.i4.2 .line 100001,100001 : 0,0 '' - IL_0019: nop + IL_001a: nop .line 100001,100001 : 0,0 '' - IL_001a: stloc.0 + IL_001b: stloc.0 .line 7,7 : 12,51 '' - IL_001b: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now() - IL_0020: stloc.3 - IL_0021: ldloca.s V_3 - IL_0023: call instance int32 [mscorlib]System.DateTime::get_Year() - IL_0028: ldc.i4 0x7d0 - IL_002d: ble.s IL_0033 + IL_001c: nop + .line 100001,100001 : 0,0 '' + IL_001d: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now() + IL_0022: stloc.3 + IL_0023: ldloca.s V_3 + IL_0025: call instance int32 [mscorlib]System.DateTime::get_Year() + IL_002a: ldc.i4 0x7d0 + IL_002f: ble.s IL_0035 .line 7,7 : 52,53 '' - IL_002f: ldc.i4.1 + IL_0031: ldc.i4.1 .line 100001,100001 : 0,0 '' - IL_0030: nop - IL_0031: br.s IL_0035 + IL_0032: nop + IL_0033: br.s IL_0037 .line 7,7 : 59,60 '' - IL_0033: ldc.i4.2 + IL_0035: ldc.i4.2 .line 100001,100001 : 0,0 '' - IL_0034: nop + IL_0036: nop .line 100001,100001 : 0,0 '' - IL_0035: stloc.2 + IL_0037: stloc.2 .line 8,8 : 12,51 '' - IL_0036: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now() - IL_003b: stloc.s V_5 - IL_003d: ldloca.s V_5 - IL_003f: call instance int32 [mscorlib]System.DateTime::get_Year() - IL_0044: ldc.i4 0x7d0 - IL_0049: bge.s IL_004f + IL_0038: nop + .line 100001,100001 : 0,0 '' + IL_0039: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now() + IL_003e: stloc.s V_5 + IL_0040: ldloca.s V_5 + IL_0042: call instance int32 [mscorlib]System.DateTime::get_Year() + IL_0047: ldc.i4 0x7d0 + IL_004c: bge.s IL_0052 .line 8,8 : 52,53 '' - IL_004b: ldc.i4.1 + IL_004e: ldc.i4.1 .line 100001,100001 : 0,0 '' - IL_004c: nop - IL_004d: br.s IL_0051 + IL_004f: nop + IL_0050: br.s IL_0054 .line 8,8 : 59,60 '' - IL_004f: ldc.i4.2 + IL_0052: ldc.i4.2 .line 100001,100001 : 0,0 '' - IL_0050: nop + IL_0053: nop .line 100001,100001 : 0,0 '' - IL_0051: stloc.s x2 + IL_0054: stloc.s x2 .line 9,9 : 12,51 '' - IL_0053: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now() - IL_0058: stloc.s V_7 - IL_005a: ldloca.s V_7 - IL_005c: call instance int32 [mscorlib]System.DateTime::get_Year() - IL_0061: ldc.i4 0x7d0 - IL_0066: bge.s IL_006c + IL_0056: nop + .line 100001,100001 : 0,0 '' + IL_0057: call valuetype [mscorlib]System.DateTime [mscorlib]System.DateTime::get_Now() + IL_005c: stloc.s V_7 + IL_005e: ldloca.s V_7 + IL_0060: call instance int32 [mscorlib]System.DateTime::get_Year() + IL_0065: ldc.i4 0x7d0 + IL_006a: bge.s IL_0070 .line 9,9 : 52,53 '' - IL_0068: ldc.i4.1 + IL_006c: ldc.i4.1 .line 100001,100001 : 0,0 '' - IL_0069: nop - IL_006a: br.s IL_006e + IL_006d: nop + IL_006e: br.s IL_0072 .line 9,9 : 59,60 '' - IL_006c: ldc.i4.2 + IL_0070: ldc.i4.2 .line 100001,100001 : 0,0 '' - IL_006d: nop + IL_0071: nop .line 100001,100001 : 0,0 '' - IL_006e: stloc.s y2 + IL_0072: stloc.s y2 .line 10,10 : 3,14 '' - IL_0070: ldloc.0 - IL_0071: ldloc.2 - IL_0072: ldloc.s x2 - IL_0074: ldloc.s y2 - IL_0076: newobj instance void class [mscorlib]System.Tuple`4::.ctor(!0, + IL_0074: ldloc.0 + IL_0075: ldloc.2 + IL_0076: ldloc.s x2 + IL_0078: ldloc.s y2 + IL_007a: newobj instance void class [mscorlib]System.Tuple`4::.ctor(!0, !1, !2, !3) - IL_007b: ret + IL_007f: ret } // end of method LetIfThenElse01::F } // end of class LetIfThenElse01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Lock01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Lock01.il.bsl index 76b81b98e9c..3884536a990 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Lock01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Lock01.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x00000188 Length: 0x00000064 } .module Lock01.exe -// MVID: {60BCDCE8-2BCA-B308-A745-0383E8DCBC60} +// MVID: {611C4D7C-2BCA-B308-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B90000 +// Image base: 0x071E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -153,6 +153,7 @@ IL_0029: pop IL_002a: leave.s IL_0037 + .line 100001,100001 : 0,0 '' } // end .try finally { diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/MethodImplNoInline.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/MethodImplNoInline.il.bsl index ebeebd6525a..af2fb2f1a54 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/MethodImplNoInline.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/MethodImplNoInline.il.bsl @@ -37,13 +37,13 @@ // Offset: 0x00000300 Length: 0x000000F5 } .module MethodImplNoInline.exe -// MVID: {60B68B7F-4480-09E2-A745-03837F8BB660} +// MVID: {611C52A3-4480-09E2-A745-0383A3521C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06DC0000 +// Image base: 0x06F00000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/MethodImplNoInline02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/MethodImplNoInline02.il.bsl index 607b8bf6f14..4016869a49c 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/MethodImplNoInline02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/MethodImplNoInline02.il.bsl @@ -37,13 +37,13 @@ // Offset: 0x00000308 Length: 0x000000F9 } .module MethodImplNoInline02.exe -// MVID: {60B68B7F-084F-1A8E-A745-03837F8BB660} +// MVID: {611C52A3-084F-1A8E-A745-0383A3521C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05140000 +// Image base: 0x06B60000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Seq_for_all01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Seq_for_all01.il.bsl index cbcdbfefab9..e0302a0c9f5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Seq_for_all01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Seq_for_all01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000001B0 Length: 0x00000072 } .module Seq_for_all01.exe -// MVID: {60B68B7F-D30D-BA80-A745-03837F8BB660} +// MVID: {611C4D7C-D30D-BA80-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05500000 +// Image base: 0x07110000 // =============== CLASS MEMBERS DECLARATION =================== @@ -70,29 +70,31 @@ .method public strict virtual instance bool Invoke(int32 s) cil managed { - // Code size 14 (0xe) + // Code size 15 (0xf) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 5,5 : 31,47 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\Seq_for_all01.fs' - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.0 - IL_0002: ceq + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0004: nop + IL_0001: ldc.i4.1 + IL_0002: ldc.i4.0 + IL_0003: ceq .line 100001,100001 : 0,0 '' - IL_0005: brfalse.s IL_000b + IL_0005: nop + .line 100001,100001 : 0,0 '' + IL_0006: brfalse.s IL_000c .line 5,5 : 48,50 '' - IL_0007: nop - .line 100001,100001 : 0,0 '' IL_0008: nop - IL_0009: br.s IL_000c + .line 100001,100001 : 0,0 '' + IL_0009: nop + IL_000a: br.s IL_000d .line 100001,100001 : 0,0 '' - IL_000b: nop + IL_000c: nop .line 6,6 : 31,35 '' - IL_000c: ldc.i4.1 - IL_000d: ret + IL_000d: ldc.i4.1 + IL_000e: ret } // end of method q@4::Invoke .method private specialname rtspecialname static diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl index 1d930ea81ac..b03d9a51166 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000748 Length: 0x00000231 } .module Structs01.exe -// MVID: {60B68B7F-701F-5E27-A745-03837F8BB660} +// MVID: {611C52A3-701F-5E27-A745-0383A3521C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07280000 +// Image base: 0x06680000 // =============== CLASS MEMBERS DECLARATION =================== @@ -83,6 +83,7 @@ IL_0010: ldloc.0 IL_0011: ldfld int32 Experiment.Test/Test::Field IL_0016: stloc.3 + .line 100001,100001 : 0,0 '' IL_0017: ldloc.2 IL_0018: ldloc.3 IL_0019: bge.s IL_001d @@ -138,6 +139,7 @@ IL_0013: ldloc.1 IL_0014: ldfld int32 Experiment.Test/Test::Field IL_0019: stloc.s V_4 + .line 100001,100001 : 0,0 '' IL_001b: ldloc.3 IL_001c: ldloc.s V_4 IL_001e: bge.s IL_0022 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl index d22541e0303..15115f5ba6f 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000780 Length: 0x00000237 } .module Structs02.exe -// MVID: {60B68B7F-7040-5E27-A745-03837F8BB660} +// MVID: {611C52A3-7040-5E27-A745-0383A3521C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05320000 +// Image base: 0x051F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -94,6 +94,7 @@ IL_0010: ldloc.0 IL_0011: ldfld int32 Experiment.Test/Repro::hash@ IL_0016: stloc.3 + .line 100001,100001 : 0,0 '' IL_0017: ldloc.2 IL_0018: ldloc.3 IL_0019: bge.s IL_001d @@ -149,6 +150,7 @@ IL_0013: ldloc.1 IL_0014: ldfld int32 Experiment.Test/Repro::hash@ IL_0019: stloc.s V_4 + .line 100001,100001 : 0,0 '' IL_001b: ldloc.3 IL_001c: ldloc.s V_4 IL_001e: bge.s IL_0022 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl index 7beca501cef..0e812538db2 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000758 Length: 0x0000022C } .module StructsAsArrayElements01.dll -// MVID: {60B68B7F-29F3-6E68-A745-03837F8BB660} +// MVID: {611C52A3-29F3-6E68-A745-0383A3521C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A80000 +// Image base: 0x06670000 // =============== CLASS MEMBERS DECLARATION =================== @@ -84,6 +84,7 @@ IL_0010: ldloc.0 IL_0011: ldfld int32 StructsAsArrayElements01/T::i IL_0016: stloc.3 + .line 100001,100001 : 0,0 '' IL_0017: ldloc.2 IL_0018: ldloc.3 IL_0019: bge.s IL_001d @@ -139,6 +140,7 @@ IL_0013: ldloc.1 IL_0014: ldfld int32 StructsAsArrayElements01/T::i IL_0019: stloc.s V_4 + .line 100001,100001 : 0,0 '' IL_001b: ldloc.3 IL_001c: ldloc.s V_4 IL_001e: bge.s IL_0022 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/TryWith_NoFilterBlocks01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/TryWith_NoFilterBlocks01.il.bsl index db782e0d6c0..7e3a902de5b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/TryWith_NoFilterBlocks01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/TryWith_NoFilterBlocks01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000160 Length: 0x0000005F } .module TryWith_NoFilterBlocks01.exe -// MVID: {60BCDCE8-3DEF-9A40-A745-0383E8DCBC60} +// MVID: {611C4D7C-3DEF-9A40-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05100000 +// Image base: 0x066A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -63,42 +63,48 @@ .method public static void main@() cil managed { .entrypoint - // Code size 28 (0x1c) + // Code size 30 (0x1e) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e, [2] class [mscorlib]System.Exception V_2) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 4,4 : 3,5 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\TryWith_NoFilterBlocks01.fs' + .line 3,3 : 1,4 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\TryWith_NoFilterBlocks01.fs' .try { - IL_0000: leave.s IL_001b + IL_0000: nop + .line 4,4 : 3,5 '' + IL_0001: leave.s IL_001d .line 5,5 : 2,6 '' } // end .try catch [mscorlib]System.Object { - IL_0002: castclass [mscorlib]System.Exception - IL_0007: stloc.0 - IL_0008: ldloc.0 - IL_0009: stloc.1 - IL_000a: ldloc.1 - IL_000b: callvirt instance int32 [mscorlib]System.Object::GetHashCode() - IL_0010: ldc.i4.0 - IL_0011: ceq - IL_0013: brfalse.s IL_0019 - - IL_0015: ldloc.0 - IL_0016: stloc.2 + IL_0003: castclass [mscorlib]System.Exception + IL_0008: stloc.0 + .line 6,6 : 12,31 '' + IL_0009: nop + .line 100001,100001 : 0,0 '' + IL_000a: ldloc.0 + IL_000b: stloc.1 + IL_000c: ldloc.1 + IL_000d: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_0012: ldc.i4.0 + IL_0013: ceq + IL_0015: brfalse.s IL_001b + + .line 100001,100001 : 0,0 '' + IL_0017: ldloc.0 + IL_0018: stloc.2 .line 6,6 : 35,37 '' - IL_0017: leave.s IL_001b + IL_0019: leave.s IL_001d .line 7,7 : 10,12 '' - IL_0019: leave.s IL_001b + IL_001b: leave.s IL_001d .line 100001,100001 : 0,0 '' } // end handler - IL_001b: ret + IL_001d: ret } // end of method $TryWith_NoFilterBlocks01::main@ } // end of class ''.$TryWith_NoFilterBlocks01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl index 31035e2fa20..6dafc94cb80 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl @@ -50,13 +50,13 @@ // Offset: 0x000005F0 Length: 0x00000211 } .module Linq101Aggregates01.exe -// MVID: {611B0EC5-D281-4783-A745-0383C50E1B61} +// MVID: {611C52A3-D281-4783-A745-0383A3521C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07220000 +// Image base: 0x06ED0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -194,7 +194,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -213,6 +213,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -276,17 +277,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 12,12 : 9,33 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method 'Pipe #1 input at line 11@12'::Close .method public strict virtual instance bool @@ -490,7 +494,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -509,6 +513,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -572,17 +577,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 21,21 : 9,28 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method numSum@21::Close .method public strict virtual instance bool @@ -824,7 +832,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -843,6 +851,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -906,17 +915,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 30,30 : 9,26 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method totalChars@30::Close .method public strict virtual instance bool @@ -1285,7 +1297,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1304,6 +1316,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -1367,17 +1380,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 42,42 : 13,26 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method sum@42::Close .method public strict virtual instance bool @@ -1589,6 +1605,7 @@ IL_005b: ldloc.s V_7 IL_005d: isinst [mscorlib]System.IDisposable IL_0062: stloc.s V_10 + .line 100001,100001 : 0,0 '' IL_0064: ldloc.s V_10 IL_0066: brfalse.s IL_0070 @@ -1795,7 +1812,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1814,6 +1831,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -1877,17 +1895,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 49,49 : 22,41 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method minNum@49::Close .method public strict virtual instance bool @@ -2129,7 +2150,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -2148,6 +2169,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -2211,17 +2233,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 52,52 : 28,45 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method shortestWord@52::Close .method public strict virtual instance bool @@ -2590,7 +2615,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -2609,6 +2634,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -2672,17 +2698,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 59,59 : 27,40 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method min@59::Close .method public strict virtual instance bool @@ -3184,7 +3213,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -3203,6 +3232,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -3266,17 +3296,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 69,69 : 40,53 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method cheapestProducts@69::Close .method public strict virtual instance bool @@ -3652,7 +3685,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -3671,6 +3704,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -3734,17 +3768,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 74,74 : 22,41 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method maxNum@74::Close .method public strict virtual instance bool @@ -3986,7 +4023,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -4005,6 +4042,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -4068,17 +4106,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 77,77 : 29,46 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method longestLength@77::Close .method public strict virtual instance bool @@ -4447,7 +4488,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -4466,6 +4507,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -4529,17 +4571,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 84,84 : 42,55 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method mostExpensivePrice@84::Close .method public strict virtual instance bool @@ -5023,7 +5068,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -5042,6 +5087,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -5105,17 +5151,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 93,93 : 32,45 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method maxPrice@93::Close .method public strict virtual instance bool @@ -5368,7 +5417,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -5387,6 +5436,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -5450,17 +5500,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 94,94 : 45,58 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method mostExpensiveProducts@94::Close .method public strict virtual instance bool @@ -5841,7 +5894,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 135 (0x87) + // Code size 136 (0x88) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -5860,6 +5913,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -5923,17 +5977,20 @@ IL_0078: nop IL_0079: br IL_0000 - IL_007e: ldloc.0 - IL_007f: ldnull - IL_0080: cgt.un - IL_0082: brfalse.s IL_0086 + .line 100,100 : 26,46 '' + IL_007e: nop + .line 100001,100001 : 0,0 '' + IL_007f: ldloc.0 + IL_0080: ldnull + IL_0081: cgt.un + IL_0083: brfalse.s IL_0087 .line 100001,100001 : 0,0 '' - IL_0084: ldloc.0 - IL_0085: throw + IL_0085: ldloc.0 + IL_0086: throw .line 100001,100001 : 0,0 '' - IL_0086: ret + IL_0087: ret } // end of method averageNum@100::Close .method public strict virtual instance bool @@ -6405,7 +6462,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -6424,6 +6481,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -6487,17 +6545,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 115,115 : 36,49 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method averagePrice@115::Close .method public strict virtual instance bool @@ -6679,6 +6740,7 @@ IL_0021: ldloc.s V_4 IL_0023: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() IL_0028: stloc.s V_6 + .line 100001,100001 : 0,0 '' IL_002a: ldloc.s V_6 IL_002c: box class [mscorlib]System.Collections.Generic.IEnumerable`1 IL_0031: brtrue.s IL_003e @@ -6729,6 +6791,7 @@ IL_007d: nop IL_007e: br.s IL_0057 + .line 100001,100001 : 0,0 '' IL_0080: ldloc.s V_10 IL_0082: brtrue.s IL_008f @@ -6757,6 +6820,7 @@ IL_00aa: ldloc.s V_7 IL_00ac: isinst [mscorlib]System.IDisposable IL_00b1: stloc.s V_13 + .line 100001,100001 : 0,0 '' IL_00b3: ldloc.s V_13 IL_00b5: brfalse.s IL_00bf @@ -7383,6 +7447,7 @@ IL_00ff: ldloc.s V_27 IL_0101: isinst [mscorlib]System.IDisposable IL_0106: stloc.s V_30 + .line 100001,100001 : 0,0 '' IL_0108: ldloc.s V_30 IL_010a: brfalse.s IL_0114 @@ -7462,6 +7527,7 @@ IL_01a4: ldloc.s V_36 IL_01a6: isinst [mscorlib]System.IDisposable IL_01ab: stloc.s V_39 + .line 100001,100001 : 0,0 '' IL_01ad: ldloc.s V_39 IL_01af: brfalse.s IL_01b9 @@ -7770,6 +7836,7 @@ IL_0512: ldloc.s V_52 IL_0514: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() IL_0519: stloc.s V_54 + .line 100001,100001 : 0,0 '' IL_051b: ldloc.s V_54 IL_051d: box class [mscorlib]System.Collections.Generic.IEnumerable`1 IL_0522: brtrue.s IL_052f @@ -7810,6 +7877,7 @@ IL_0569: nop IL_056a: br.s IL_0547 + .line 100001,100001 : 0,0 '' IL_056c: ldloc.s V_58 IL_056e: brtrue.s IL_057b @@ -7837,6 +7905,7 @@ IL_058e: ldloc.s V_55 IL_0590: isinst [mscorlib]System.IDisposable IL_0595: stloc.s V_61 + .line 100001,100001 : 0,0 '' IL_0597: ldloc.s V_61 IL_0599: brfalse.s IL_05a3 @@ -7870,6 +7939,7 @@ IL_05dc: ldloc.s V_64 IL_05de: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() IL_05e3: stloc.s V_66 + .line 100001,100001 : 0,0 '' IL_05e5: ldloc.s V_66 IL_05e7: box class [mscorlib]System.Collections.Generic.IEnumerable`1> IL_05ec: brtrue.s IL_05f9 @@ -7910,6 +7980,7 @@ IL_0633: nop IL_0634: br.s IL_0611 + .line 100001,100001 : 0,0 '' IL_0636: ldloc.s V_70 IL_0638: brtrue.s IL_0645 @@ -7937,6 +8008,7 @@ IL_0658: ldloc.s V_67 IL_065a: isinst [mscorlib]System.IDisposable IL_065f: stloc.s V_73 + .line 100001,100001 : 0,0 '' IL_0661: ldloc.s V_73 IL_0663: brfalse.s IL_066d diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl index 327debf86ce..d64da39d4e5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x00000388 Length: 0x00000127 } .module Linq101ElementOperators01.exe -// MVID: {60BD414C-19D7-C20D-A745-03834C41BD60} +// MVID: {611C4D82-19D7-C20D-A745-0383824D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x008A0000 +// Image base: 0x06A90000 // =============== CLASS MEMBERS DECLARATION =================== @@ -189,7 +189,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -208,6 +208,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -271,17 +272,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 12,12 : 9,29 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method products12@12::Close .method public strict virtual instance bool @@ -526,7 +530,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -545,6 +549,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -608,17 +613,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 22,22 : 9,28 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method startsWithO@22::Close .method public strict virtual instance bool @@ -864,7 +872,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -883,6 +891,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -946,17 +955,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 31,31 : 9,28 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method firstNumOrDefault@31::Close .method public strict virtual instance bool @@ -1160,7 +1172,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1179,6 +1191,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -1242,17 +1255,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 52,52 : 9,29 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method fourthLowNum@52::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl index 38771a7283f..20da6d9ded5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x00000310 Length: 0x000000C3 } .module Linq101Joins01.exe -// MVID: {611B0EC5-151B-685E-A745-0383C50E1B61} +// MVID: {611C4D82-151B-685E-A745-0383824D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06D00000 +// Image base: 0x06C40000 // =============== CLASS MEMBERS DECLARATION =================== @@ -955,7 +955,7 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [Utils]Utils/Product,string>,object> Invoke(class [Utils]Utils/Product _arg2) cil managed { - // Code size 65 (0x41) + // Code size 66 (0x42) .maxstack 9 .locals init ([0] class [Utils]Utils/Product p, [1] string t) @@ -963,42 +963,44 @@ IL_0000: ldarg.1 IL_0001: stloc.0 .line 41,41 : 17,39 '' - IL_0002: ldloc.0 - IL_0003: box [Utils]Utils/Product - IL_0008: ldnull - IL_0009: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityIntrinsic(!!0, + IL_0002: nop + .line 100001,100001 : 0,0 '' + IL_0003: ldloc.0 + IL_0004: box [Utils]Utils/Product + IL_0009: ldnull + IL_000a: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityIntrinsic(!!0, !!0) - IL_000e: brfalse.s IL_0018 + IL_000f: brfalse.s IL_0019 .line 41,41 : 40,55 '' - IL_0010: ldstr "(No products)" + IL_0011: ldstr "(No products)" .line 100001,100001 : 0,0 '' - IL_0015: nop - IL_0016: br.s IL_001f + IL_0016: nop + IL_0017: br.s IL_0020 .line 41,41 : 61,74 '' - IL_0018: ldloc.0 - IL_0019: callvirt instance string [Utils]Utils/Product::get_ProductName() + IL_0019: ldloc.0 + IL_001a: callvirt instance string [Utils]Utils/Product::get_ProductName() .line 100001,100001 : 0,0 '' - IL_001e: nop + IL_001f: nop .line 100001,100001 : 0,0 '' - IL_001f: stloc.1 + IL_0020: stloc.1 .line 42,42 : 9,22 '' - IL_0020: ldarg.0 - IL_0021: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #4 input at line 37@40-4'::builder@ - IL_0026: ldarg.0 - IL_0027: ldfld string Linq101Joins01/'Pipe #4 input at line 37@40-4'::c - IL_002c: ldarg.0 - IL_002d: ldfld class [mscorlib]System.Collections.Generic.IEnumerable`1 Linq101Joins01/'Pipe #4 input at line 37@40-4'::ps - IL_0032: ldloc.0 - IL_0033: ldloc.1 - IL_0034: newobj instance void class [mscorlib]System.Tuple`4,class [Utils]Utils/Product,string>::.ctor(!0, + IL_0021: ldarg.0 + IL_0022: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #4 input at line 37@40-4'::builder@ + IL_0027: ldarg.0 + IL_0028: ldfld string Linq101Joins01/'Pipe #4 input at line 37@40-4'::c + IL_002d: ldarg.0 + IL_002e: ldfld class [mscorlib]System.Collections.Generic.IEnumerable`1 Linq101Joins01/'Pipe #4 input at line 37@40-4'::ps + IL_0033: ldloc.0 + IL_0034: ldloc.1 + IL_0035: newobj instance void class [mscorlib]System.Tuple`4,class [Utils]Utils/Product,string>::.ctor(!0, !1, !2, !3) - IL_0039: tail. - IL_003b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,class [Utils]Utils/Product,string>,object>(!!0) - IL_0040: ret + IL_003a: tail. + IL_003c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,class [Utils]Utils/Product,string>,object>(!!0) + IL_0041: ret } // end of method 'Pipe #4 input at line 37@40-4'::Invoke } // end of class 'Pipe #4 input at line 37@40-4' diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl index dc1c5f3afcf..e20407700d3 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl @@ -40,13 +40,13 @@ // Offset: 0x000003B8 Length: 0x00000134 } .module Linq101Ordering01.exe -// MVID: {611B0EC5-649A-6956-A745-0383C50E1B61} +// MVID: {611C4D82-649A-6956-A745-0383824D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06CC0000 +// Image base: 0x071E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -184,7 +184,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -203,6 +203,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -266,17 +267,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 11,11 : 9,26 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method 'Pipe #1 input at line 10@11'::Close .method public strict virtual instance bool @@ -518,7 +522,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -537,6 +541,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -600,17 +605,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 18,18 : 9,26 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method 'Pipe #2 input at line 17@18'::Close .method public strict virtual instance bool @@ -973,7 +981,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -992,6 +1000,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -1055,17 +1064,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 44,44 : 9,29 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method 'Pipe #4 input at line 43@44'::Close .method public strict virtual instance bool @@ -1309,7 +1321,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1328,6 +1340,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -1391,17 +1404,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 52,52 : 9,27 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method 'Pipe #5 input at line 51@52'::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl index 866d1692f63..365fa72d873 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x000003D8 Length: 0x00000138 } .module Linq101Partitioning01.exe -// MVID: {611B0EC5-B280-A6A2-A745-0383C50E1B61} +// MVID: {611C4D82-B280-A6A2-A745-0383824D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x070F0000 +// Image base: 0x06570000 // =============== CLASS MEMBERS DECLARATION =================== @@ -189,7 +189,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -208,6 +208,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -271,17 +272,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 12,12 : 9,28 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method 'Pipe #1 input at line 11@12'::Close .method public strict virtual instance bool @@ -694,7 +698,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -713,6 +717,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -776,17 +781,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 29,29 : 9,28 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method 'Pipe #3 input at line 28@29'::Close .method public strict virtual instance bool @@ -1199,7 +1207,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1218,6 +1226,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -1281,17 +1290,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 45,45 : 9,28 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method 'Pipe #5 input at line 44@45'::Close .method public strict virtual instance bool @@ -1535,7 +1547,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1554,6 +1566,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -1617,17 +1630,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 52,52 : 9,28 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method 'Pipe #6 input at line 51@52'::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl index aacf0b31555..d0dcf614bd4 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x00000398 Length: 0x000000FF } .module Linq101Quantifiers01.exe -// MVID: {611B0EC5-76DD-E373-A745-0383C50E1B61} +// MVID: {611C4D82-76DD-E373-A745-0383824D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B80000 +// Image base: 0x071A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -189,7 +189,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -208,6 +208,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -271,17 +272,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 12,12 : 9,26 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method iAfterE@12::Close .method public strict virtual instance bool @@ -790,7 +794,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -809,6 +813,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -872,17 +877,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 32,32 : 9,28 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method onlyOdd@32::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl index bc788f95c27..cfcb02aa149 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x00000648 Length: 0x00000204 } .module Linq101Select01.exe -// MVID: {611B0EC5-6057-8F80-A745-0383C50E1B61} +// MVID: {611C5DB0-6057-8F80-A745-0383B05D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06AD0000 +// Image base: 0x05540000 // =============== CLASS MEMBERS DECLARATION =================== @@ -234,7 +234,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -253,6 +253,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -316,17 +317,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 13,13 : 9,23 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method 'Pipe #1 input at line 11@13'::Close .method public strict virtual instance bool @@ -574,7 +578,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -593,6 +597,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -656,17 +661,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 22,22 : 9,31 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method productNames@22::Close .method public strict virtual instance bool @@ -915,7 +923,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -934,6 +942,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -997,17 +1006,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 30,30 : 9,29 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method 'Pipe #2 input at line 28@30'::Close .method public strict virtual instance bool @@ -1259,7 +1271,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1278,6 +1290,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -1341,17 +1354,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 39,39 : 8,41 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method 'Pipe #3 input at line 37@39'::Close .method public strict virtual instance bool @@ -1607,7 +1623,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1626,6 +1642,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -1689,17 +1706,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 46,46 : 9,42 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method 'Pipe #4 input at line 44@46'::Close .method public strict virtual instance bool @@ -1954,7 +1974,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1973,6 +1993,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -2036,17 +2057,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 53,53 : 9,56 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method 'Pipe #5 input at line 51@53'::Close .method public strict virtual instance bool @@ -3774,7 +3798,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 1169 (0x491) + // Code size 1170 (0x492) .maxstack 13 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numsPlusOne, @@ -4045,251 +4069,253 @@ IL_0201: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::lowNums@58 IL_0206: stloc.s lowNums .line 64,64 : 1,59 '' - IL_0208: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_lowNums() - IL_020d: stloc.s V_34 - IL_020f: ldstr "four" - IL_0214: ldstr "one" - IL_0219: ldstr "three" - IL_021e: ldstr "two" - IL_0223: ldstr "zero" - IL_0228: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_022d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0208: nop + .line 100001,100001 : 0,0 '' + IL_0209: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_lowNums() + IL_020e: stloc.s V_34 + IL_0210: ldstr "four" + IL_0215: ldstr "one" + IL_021a: ldstr "three" + IL_021f: ldstr "two" + IL_0224: ldstr "zero" + IL_0229: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_022e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0232: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0233: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0237: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0238: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_023c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_023d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0241: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0242: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0246: stloc.s V_35 - IL_0248: ldloc.s V_34 - IL_024a: ldloc.s V_35 - IL_024c: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() - IL_0251: callvirt instance bool class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Equals(object, + IL_0247: stloc.s V_35 + IL_0249: ldloc.s V_34 + IL_024b: ldloc.s V_35 + IL_024d: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_0252: callvirt instance bool class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_0256: ldc.i4.0 - IL_0257: ceq - IL_0259: brfalse.s IL_0275 + IL_0257: ldc.i4.0 + IL_0258: ceq + IL_025a: brfalse.s IL_0276 .line 64,64 : 60,84 '' - IL_025b: ldstr "lowNums failed" - IL_0260: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0265: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_026a: pop + IL_025c: ldstr "lowNums failed" + IL_0261: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0266: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_026b: pop .line 64,64 : 86,92 '' - IL_026b: ldc.i4.1 - IL_026c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0271: pop + IL_026c: ldc.i4.1 + IL_026d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_0272: pop .line 100001,100001 : 0,0 '' - IL_0272: nop - IL_0273: br.s IL_0276 + IL_0273: nop + IL_0274: br.s IL_0277 .line 100001,100001 : 0,0 '' - IL_0275: nop + IL_0276: nop .line 67,67 : 1,37 '' - IL_0276: ldc.i4.0 - IL_0277: ldc.i4.2 - IL_0278: ldc.i4.4 - IL_0279: ldc.i4.5 - IL_027a: ldc.i4.6 - IL_027b: ldc.i4.8 - IL_027c: ldc.i4.s 9 - IL_027e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0283: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0277: ldc.i4.0 + IL_0278: ldc.i4.2 + IL_0279: ldc.i4.4 + IL_027a: ldc.i4.5 + IL_027b: ldc.i4.6 + IL_027c: ldc.i4.8 + IL_027d: ldc.i4.s 9 + IL_027f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0284: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0288: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0289: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_028d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_028e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0292: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0293: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0297: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0298: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_029c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_029d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_02a1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_02a2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_02a6: dup - IL_02a7: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numbersA@67 - IL_02ac: stloc.s numbersA + IL_02a7: dup + IL_02a8: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numbersA@67 + IL_02ad: stloc.s numbersA .line 68,68 : 1,31 '' - IL_02ae: ldc.i4.1 - IL_02af: ldc.i4.3 - IL_02b0: ldc.i4.5 - IL_02b1: ldc.i4.7 - IL_02b2: ldc.i4.8 - IL_02b3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_02b8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_02af: ldc.i4.1 + IL_02b0: ldc.i4.3 + IL_02b1: ldc.i4.5 + IL_02b2: ldc.i4.7 + IL_02b3: ldc.i4.8 + IL_02b4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_02b9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_02bd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_02be: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_02c2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_02c3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_02c7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_02c8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_02cc: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_02cd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_02d1: dup - IL_02d2: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numbersB@68 - IL_02d7: stloc.s numbersB + IL_02d2: dup + IL_02d3: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numbersB@68 + IL_02d8: stloc.s numbersB .line 70,76 : 1,21 '' - IL_02d9: nop + IL_02da: nop .line 71,71 : 5,10 '' - IL_02da: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_02df: stloc.s V_37 - IL_02e1: ldloc.s V_37 - IL_02e3: ldloc.s V_37 - IL_02e5: ldloc.s V_37 - IL_02e7: ldloc.s V_37 - IL_02e9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbersA() - IL_02ee: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_02f3: ldloc.s V_37 - IL_02f5: newobj instance void Linq101Select01/'Pipe #7 input at line 71@72'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_02fa: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_02db: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_02e0: stloc.s V_37 + IL_02e2: ldloc.s V_37 + IL_02e4: ldloc.s V_37 + IL_02e6: ldloc.s V_37 + IL_02e8: ldloc.s V_37 + IL_02ea: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbersA() + IL_02ef: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_02f4: ldloc.s V_37 + IL_02f6: newobj instance void Linq101Select01/'Pipe #7 input at line 71@72'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_02fb: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_02ff: ldsfld class Linq101Select01/'Pipe #7 input at line 71@74-2' Linq101Select01/'Pipe #7 input at line 71@74-2'::@_instance - IL_0304: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0300: ldsfld class Linq101Select01/'Pipe #7 input at line 71@74-2' Linq101Select01/'Pipe #7 input at line 71@74-2'::@_instance + IL_0305: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0309: ldsfld class Linq101Select01/'Pipe #7 input at line 71@75-3' Linq101Select01/'Pipe #7 input at line 71@75-3'::@_instance - IL_030e: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_030a: ldsfld class Linq101Select01/'Pipe #7 input at line 71@75-3' Linq101Select01/'Pipe #7 input at line 71@75-3'::@_instance + IL_030f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0313: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_0318: stloc.s 'Pipe #7 input at line 71' + IL_0314: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_0319: stloc.s 'Pipe #7 input at line 71' .line 76,76 : 10,21 '' - IL_031a: ldloc.s 'Pipe #7 input at line 71' - IL_031c: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0321: dup - IL_0322: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Select01::pairs@70 - IL_0327: stloc.s pairs + IL_031b: ldloc.s 'Pipe #7 input at line 71' + IL_031d: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0322: dup + IL_0323: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Select01::pairs@70 + IL_0328: stloc.s pairs .line 79,79 : 1,34 '' - IL_0329: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() - IL_032e: dup - IL_032f: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::customers@79 - IL_0334: stloc.s customers + IL_032a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() + IL_032f: dup + IL_0330: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::customers@79 + IL_0335: stloc.s customers .line 80,86 : 1,21 '' - IL_0336: nop + IL_0337: nop .line 81,81 : 5,10 '' - IL_0337: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_033c: stloc.s V_39 - IL_033e: ldloc.s V_39 - IL_0340: ldloc.s V_39 - IL_0342: ldloc.s V_39 - IL_0344: ldloc.s V_39 - IL_0346: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() - IL_034b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0350: ldloc.s V_39 - IL_0352: newobj instance void Linq101Select01/'Pipe #8 input at line 81@82'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0357: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0338: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_033d: stloc.s V_39 + IL_033f: ldloc.s V_39 + IL_0341: ldloc.s V_39 + IL_0343: ldloc.s V_39 + IL_0345: ldloc.s V_39 + IL_0347: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() + IL_034c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0351: ldloc.s V_39 + IL_0353: newobj instance void Linq101Select01/'Pipe #8 input at line 81@82'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0358: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_035c: ldsfld class Linq101Select01/'Pipe #8 input at line 81@84-2' Linq101Select01/'Pipe #8 input at line 81@84-2'::@_instance - IL_0361: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_035d: ldsfld class Linq101Select01/'Pipe #8 input at line 81@84-2' Linq101Select01/'Pipe #8 input at line 81@84-2'::@_instance + IL_0362: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0366: ldsfld class Linq101Select01/'Pipe #8 input at line 81@85-3' Linq101Select01/'Pipe #8 input at line 81@85-3'::@_instance - IL_036b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0367: ldsfld class Linq101Select01/'Pipe #8 input at line 81@85-3' Linq101Select01/'Pipe #8 input at line 81@85-3'::@_instance + IL_036c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0370: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_0375: stloc.s 'Pipe #8 input at line 81' + IL_0371: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_0376: stloc.s 'Pipe #8 input at line 81' .line 86,86 : 10,21 '' - IL_0377: ldloc.s 'Pipe #8 input at line 81' - IL_0379: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_037e: dup - IL_037f: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::orders@80 - IL_0384: stloc.s orders + IL_0378: ldloc.s 'Pipe #8 input at line 81' + IL_037a: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_037f: dup + IL_0380: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::orders@80 + IL_0385: stloc.s orders .line 89,95 : 1,21 '' - IL_0386: nop + IL_0387: nop .line 90,90 : 5,10 '' - IL_0387: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_038c: stloc.s V_41 - IL_038e: ldloc.s V_41 - IL_0390: ldloc.s V_41 - IL_0392: ldloc.s V_41 - IL_0394: ldloc.s V_41 - IL_0396: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() - IL_039b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_03a0: ldloc.s V_41 - IL_03a2: newobj instance void Linq101Select01/'Pipe #9 input at line 90@91'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_03a7: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0388: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_038d: stloc.s V_41 + IL_038f: ldloc.s V_41 + IL_0391: ldloc.s V_41 + IL_0393: ldloc.s V_41 + IL_0395: ldloc.s V_41 + IL_0397: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() + IL_039c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_03a1: ldloc.s V_41 + IL_03a3: newobj instance void Linq101Select01/'Pipe #9 input at line 90@91'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_03a8: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_03ac: ldsfld class Linq101Select01/'Pipe #9 input at line 90@93-2' Linq101Select01/'Pipe #9 input at line 90@93-2'::@_instance - IL_03b1: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03ad: ldsfld class Linq101Select01/'Pipe #9 input at line 90@93-2' Linq101Select01/'Pipe #9 input at line 90@93-2'::@_instance + IL_03b2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_03b6: ldsfld class Linq101Select01/'Pipe #9 input at line 90@94-3' Linq101Select01/'Pipe #9 input at line 90@94-3'::@_instance - IL_03bb: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03b7: ldsfld class Linq101Select01/'Pipe #9 input at line 90@94-3' Linq101Select01/'Pipe #9 input at line 90@94-3'::@_instance + IL_03bc: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_03c0: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_03c5: stloc.s 'Pipe #9 input at line 90' + IL_03c1: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_03c6: stloc.s 'Pipe #9 input at line 90' .line 95,95 : 10,21 '' - IL_03c7: ldloc.s 'Pipe #9 input at line 90' - IL_03c9: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_03ce: dup - IL_03cf: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::orders2@89 - IL_03d4: stloc.s orders2 - IL_03d6: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_03db: stloc.s V_42 - IL_03dd: ldloc.s V_42 - IL_03df: ldloc.s V_42 - IL_03e1: ldloc.s V_42 - IL_03e3: ldloc.s V_42 - IL_03e5: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() - IL_03ea: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_03ef: ldloc.s V_42 - IL_03f1: newobj instance void Linq101Select01/orders3@100::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_03f6: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03c8: ldloc.s 'Pipe #9 input at line 90' + IL_03ca: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_03cf: dup + IL_03d0: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::orders2@89 + IL_03d5: stloc.s orders2 + IL_03d7: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_03dc: stloc.s V_42 + IL_03de: ldloc.s V_42 + IL_03e0: ldloc.s V_42 + IL_03e2: ldloc.s V_42 + IL_03e4: ldloc.s V_42 + IL_03e6: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() + IL_03eb: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_03f0: ldloc.s V_42 + IL_03f2: newobj instance void Linq101Select01/orders3@100::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_03f7: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_03fb: ldsfld class Linq101Select01/'orders3@102-2' Linq101Select01/'orders3@102-2'::@_instance - IL_0400: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03fc: ldsfld class Linq101Select01/'orders3@102-2' Linq101Select01/'orders3@102-2'::@_instance + IL_0401: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0405: ldsfld class Linq101Select01/'orders3@103-3' Linq101Select01/'orders3@103-3'::@_instance - IL_040a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0406: ldsfld class Linq101Select01/'orders3@103-3' Linq101Select01/'orders3@103-3'::@_instance + IL_040b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_040f: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_0414: dup - IL_0415: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1> ''.$Linq101Select01::orders3@98 - IL_041a: stloc.s orders3 + IL_0410: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_0415: dup + IL_0416: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1> ''.$Linq101Select01::orders3@98 + IL_041b: stloc.s orders3 .line 107,107 : 1,38 '' - IL_041c: ldc.i4 0x7cd - IL_0421: ldc.i4.1 + IL_041d: ldc.i4 0x7cd IL_0422: ldc.i4.1 - IL_0423: newobj instance void [mscorlib]System.DateTime::.ctor(int32, + IL_0423: ldc.i4.1 + IL_0424: newobj instance void [mscorlib]System.DateTime::.ctor(int32, int32, int32) - IL_0428: dup - IL_0429: stsfld valuetype [mscorlib]System.DateTime ''.$Linq101Select01::cutOffDate@107 - IL_042e: stloc.s cutOffDate - IL_0430: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0435: stloc.s V_43 - IL_0437: ldloc.s V_43 - IL_0439: ldloc.s V_43 - IL_043b: ldloc.s V_43 - IL_043d: ldloc.s V_43 - IL_043f: ldloc.s V_43 - IL_0441: ldloc.s V_43 - IL_0443: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() - IL_0448: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_044d: ldloc.s V_43 - IL_044f: newobj instance void Linq101Select01/orders4@111::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0454: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0429: dup + IL_042a: stsfld valuetype [mscorlib]System.DateTime ''.$Linq101Select01::cutOffDate@107 + IL_042f: stloc.s cutOffDate + IL_0431: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0436: stloc.s V_43 + IL_0438: ldloc.s V_43 + IL_043a: ldloc.s V_43 + IL_043c: ldloc.s V_43 + IL_043e: ldloc.s V_43 + IL_0440: ldloc.s V_43 + IL_0442: ldloc.s V_43 + IL_0444: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() + IL_0449: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Source(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_044e: ldloc.s V_43 + IL_0450: newobj instance void Linq101Select01/orders4@111::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0455: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0459: ldsfld class Linq101Select01/'orders4@112-1' Linq101Select01/'orders4@112-1'::@_instance - IL_045e: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_045a: ldsfld class Linq101Select01/'orders4@112-1' Linq101Select01/'orders4@112-1'::@_instance + IL_045f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0463: ldloc.s V_43 - IL_0465: newobj instance void Linq101Select01/'orders4@111-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_046a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0464: ldloc.s V_43 + IL_0466: newobj instance void Linq101Select01/'orders4@111-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_046b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_046f: ldsfld class Linq101Select01/'orders4@114-4' Linq101Select01/'orders4@114-4'::@_instance - IL_0474: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0470: ldsfld class Linq101Select01/'orders4@114-4' Linq101Select01/'orders4@114-4'::@_instance + IL_0475: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Where,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0479: ldsfld class Linq101Select01/'orders4@115-5' Linq101Select01/'orders4@115-5'::@_instance - IL_047e: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_047a: ldsfld class Linq101Select01/'orders4@115-5' Linq101Select01/'orders4@115-5'::@_instance + IL_047f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0483: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() - IL_0488: dup - IL_0489: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1> ''.$Linq101Select01::orders4@109 - IL_048e: stloc.s orders4 - IL_0490: ret + IL_0484: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,class [mscorlib]System.Collections.IEnumerable>::get_Source() + IL_0489: dup + IL_048a: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1> ''.$Linq101Select01::orders4@109 + IL_048f: stloc.s orders4 + IL_0491: ret } // end of method $Linq101Select01::main@ } // end of class ''.$Linq101Select01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl index 511e9ef2a88..a87b2b30b88 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x00000390 Length: 0x0000011E } .module Linq101SetOperators01.exe -// MVID: {611B0EC5-4EE5-349F-A745-0383C50E1B61} +// MVID: {611C4D82-4EE5-349F-A745-0383824D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07120000 +// Image base: 0x06410000 // =============== CLASS MEMBERS DECLARATION =================== @@ -189,7 +189,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -208,6 +208,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -271,17 +272,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 13,13 : 9,33 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method 'Pipe #1 input at line 12@13'::Close .method public strict virtual instance bool @@ -529,7 +533,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -548,6 +552,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -611,17 +616,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 23,23 : 9,26 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method 'Pipe #2 input at line 21@23'::Close .method public strict virtual instance bool @@ -871,7 +879,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -890,6 +898,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -953,17 +962,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 33,33 : 9,33 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method productFirstChars@33::Close .method public strict virtual instance bool @@ -1213,7 +1225,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1232,6 +1244,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -1295,17 +1308,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 39,39 : 9,33 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method customerFirstChars@39::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl index cb31189e31e..3f92cd859e8 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x000003D0 Length: 0x0000012E } .module Linq101Where01.exe -// MVID: {611B0EC5-FF23-CD21-A745-0383C50E1B61} +// MVID: {611C4D82-FF23-CD21-A745-0383824D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06790000 +// Image base: 0x06A30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -363,34 +363,36 @@ .method public strict virtual instance bool Invoke(class [Utils]Utils/Product p) cil managed { - // Code size 37 (0x25) + // Code size 38 (0x26) .maxstack 10 + .line 33,33 : 16,57 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.1 - IL_0001: callvirt instance int32 [Utils]Utils/Product::get_UnitsInStock() - IL_0006: ldc.i4.0 - IL_0007: ble.s IL_0023 + IL_0001: ldarg.1 + IL_0002: callvirt instance int32 [Utils]Utils/Product::get_UnitsInStock() + IL_0007: ldc.i4.0 + IL_0008: ble.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Product::get_UnitPrice() - IL_000f: ldc.i4 0x12c - IL_0014: ldc.i4.0 + IL_000a: ldarg.1 + IL_000b: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Product::get_UnitPrice() + IL_0010: ldc.i4 0x12c IL_0015: ldc.i4.0 IL_0016: ldc.i4.0 - IL_0017: ldc.i4.2 - IL_0018: newobj instance void [netstandard]System.Decimal::.ctor(int32, + IL_0017: ldc.i4.0 + IL_0018: ldc.i4.2 + IL_0019: newobj instance void [netstandard]System.Decimal::.ctor(int32, int32, int32, bool, uint8) - IL_001d: call bool [netstandard]System.Decimal::op_GreaterThan(valuetype [netstandard]System.Decimal, + IL_001e: call bool [netstandard]System.Decimal::op_GreaterThan(valuetype [netstandard]System.Decimal, valuetype [netstandard]System.Decimal) - IL_0022: ret + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0023: ldc.i4.0 - IL_0024: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method 'expensiveInStockProducts@33-1'::Invoke .method private specialname rtspecialname static @@ -736,7 +738,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 128 (0x80) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -755,6 +757,7 @@ .line 100001,100001 : 0,0 '' IL_0016: nop + .line 100001,100001 : 0,0 '' .try { IL_0017: ldarg.0 @@ -818,17 +821,20 @@ IL_0070: nop IL_0071: br IL_0000 - IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + .line 52,52 : 9,17 '' + IL_0076: nop + .line 100001,100001 : 0,0 '' + IL_0077: ldloc.0 + IL_0078: ldnull + IL_0079: cgt.un + IL_007b: brfalse.s IL_007f .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_007d: ldloc.0 + IL_007e: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007f: ret } // end of method 'Pipe #3 input at line 50@52'::Close .method public strict virtual instance bool @@ -924,22 +930,24 @@ Invoke(int32 i, string d) cil managed { - // Code size 18 (0x12) + // Code size 19 (0x13) .maxstack 8 .line 54,54 : 29,49 '' - IL_0000: ldarg.2 - IL_0001: callvirt instance int32 [mscorlib]System.String::get_Length() - IL_0006: ldarg.1 - IL_0007: bge.s IL_0010 + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.2 + IL_0002: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_0007: ldarg.1 + IL_0008: bge.s IL_0011 .line 54,54 : 50,57 '' - IL_0009: ldarg.2 - IL_000a: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::Some(!0) - IL_000f: ret + IL_000a: ldarg.2 + IL_000b: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::Some(!0) + IL_0010: ret .line 54,54 : 63,67 '' - IL_0010: ldnull - IL_0011: ret + IL_0011: ldnull + IL_0012: ret } // end of method 'Pipe #3 stage #1 at line 54@54'::Invoke .method private specialname rtspecialname static diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl index da3369027fa..665db6c83ac 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000AD } .module SeqExpressionSteppingTest5.exe -// MVID: {611B0EC5-2432-9401-A745-0383C50E1B61} +// MVID: {611C4D82-2432-9401-A745-0383824D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06560000 +// Image base: 0x04AD0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -212,7 +212,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 156 (0x9c) + // Code size 157 (0x9d) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -231,6 +231,7 @@ .line 100001,100001 : 0,0 '' IL_0019: nop + .line 100001,100001 : 0,0 '' .try { IL_001a: ldarg.0 @@ -309,17 +310,20 @@ IL_008d: nop IL_008e: br IL_0000 - IL_0093: ldloc.0 - IL_0094: ldnull - IL_0095: cgt.un - IL_0097: brfalse.s IL_009b + .line 5,5 : 19,20 '' + IL_0093: nop + .line 100001,100001 : 0,0 '' + IL_0094: ldloc.0 + IL_0095: ldnull + IL_0096: cgt.un + IL_0098: brfalse.s IL_009c .line 100001,100001 : 0,0 '' - IL_0099: ldloc.0 - IL_009a: throw + IL_009a: ldloc.0 + IL_009b: throw .line 100001,100001 : 0,0 '' - IL_009b: ret + IL_009c: ret } // end of method f4@5::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl index 24b89a08ba8..c50b09633d3 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000002A0 Length: 0x000000BA } .module SeqExpressionSteppingTest6.exe -// MVID: {611B0EC5-2432-94A2-A745-0383C50E1B61} +// MVID: {611C4D82-2432-94A2-A745-0383824D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07170000 +// Image base: 0x07260000 // =============== CLASS MEMBERS DECLARATION =================== @@ -254,7 +254,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 167 (0xa7) + // Code size 168 (0xa8) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -273,6 +273,7 @@ .line 100001,100001 : 0,0 '' IL_0019: nop + .line 100001,100001 : 0,0 '' .try { IL_001a: ldarg.0 @@ -359,17 +360,20 @@ IL_0098: nop IL_0099: br IL_0000 - IL_009e: ldloc.0 - IL_009f: ldnull - IL_00a0: cgt.un - IL_00a2: brfalse.s IL_00a6 + .line 6,8 : 15,25 '' + IL_009e: nop + .line 100001,100001 : 0,0 '' + IL_009f: ldloc.0 + IL_00a0: ldnull + IL_00a1: cgt.un + IL_00a3: brfalse.s IL_00a7 .line 100001,100001 : 0,0 '' - IL_00a4: ldloc.0 - IL_00a5: throw + IL_00a5: ldloc.0 + IL_00a6: throw .line 100001,100001 : 0,0 '' - IL_00a6: ret + IL_00a7: ret } // end of method f7@6::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl index 4427341eb37..7965bb568e8 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000270 Length: 0x00000098 } .module SeqExpressionSteppingTest7.exe -// MVID: {60BCC37C-2432-93C3-A745-03837CC3BC60} +// MVID: {611C5DB0-2432-93C3-A745-0383B05D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05980000 +// Image base: 0x06AC0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -63,48 +63,52 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f() cil managed { - // Code size 59 (0x3b) + // Code size 61 (0x3d) .maxstack 5 .locals init ([0] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, [1] string V_1) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 18,24 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SeqExpressionStepping\\SeqExpressionSteppingTest7.fs' - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest7::get_r() - IL_0005: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_000a: nop + .line 5,5 : 12,57 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SeqExpressionStepping\\SeqExpressionSteppingTest7.fs' + IL_0000: nop + .line 5,5 : 14,36 '' + IL_0001: nop + .line 5,5 : 18,24 '' + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest7::get_r() + IL_0007: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_000c: nop .line 5,5 : 26,30 '' - IL_000b: ldc.i4.1 - IL_000c: brfalse.s IL_0031 + IL_000d: ldc.i4.1 + IL_000e: brfalse.s IL_0033 .line 5,5 : 44,55 '' - IL_000e: ldstr "" - IL_0013: stloc.1 - IL_0014: ldloca.s V_0 - IL_0016: ldc.i4.0 - IL_0017: brfalse.s IL_0021 - - IL_0019: ldnull - IL_001a: unbox.any class [mscorlib]System.Collections.Generic.IEnumerable`1 - IL_001f: br.s IL_0028 - - IL_0021: ldloc.1 - IL_0022: call class [mscorlib]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) - IL_0027: throw - - IL_0028: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::AddMany(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_002d: nop + IL_0010: ldstr "" + IL_0015: stloc.1 + IL_0016: ldloca.s V_0 + IL_0018: ldc.i4.0 + IL_0019: brfalse.s IL_0023 + + IL_001b: ldnull + IL_001c: unbox.any class [mscorlib]System.Collections.Generic.IEnumerable`1 + IL_0021: br.s IL_002a + + IL_0023: ldloc.1 + IL_0024: call class [mscorlib]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) + IL_0029: throw + + IL_002a: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::AddMany(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_002f: nop .line 100001,100001 : 0,0 '' - IL_002e: nop - IL_002f: br.s IL_0033 + IL_0030: nop + IL_0031: br.s IL_0035 .line 5,5 : 14,36 '' - IL_0031: nop + IL_0033: nop .line 100001,100001 : 0,0 '' - IL_0032: nop + IL_0034: nop .line 5,5 : 12,57 '' - IL_0033: ldloca.s V_0 - IL_0035: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_003a: ret + IL_0035: ldloca.s V_0 + IL_0037: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003c: ret } // end of method SeqExpressionSteppingTest7::f .property class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 @@ -162,6 +166,7 @@ IL_002b: ldloc.3 IL_002c: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [mscorlib]System.Exception) IL_0031: stloc.s V_4 + .line 100001,100001 : 0,0 '' IL_0033: ldloc.s V_4 IL_0035: brfalse.s IL_004e diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl index e4ab112f177..0ddb079f90c 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00001148 Length: 0x000003FD } .module TopLevelModule.dll -// MVID: {60D4892F-37F5-C118-A745-03832F89D460} +// MVID: {611C4D86-37F5-C118-A745-0383864D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06F60000 +// Image base: 0x067D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -151,7 +151,7 @@ instance int32 CompareTo(class ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 65 (0x41) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1, @@ -159,65 +159,68 @@ [3] int32 V_3, [4] int32 V_4) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SerializableAttribute\\ToplevelModule.fs' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + .line 6,6 : 14,18 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SerializableAttribute\\ToplevelModule.fs' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop + .line 100001,100001 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 ABC/Expr::item + IL_001f: stloc.3 + IL_0020: ldloc.1 + IL_0021: ldfld int32 ABC/Expr::item + IL_0026: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 ABC/Expr::item - IL_0025: stloc.s V_4 - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: bge.s IL_002f .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_002d: ldc.i4.m1 + IL_002e: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_002f: ldloc.3 + IL_0030: ldloc.s V_4 + IL_0032: cgt + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_0035: ldc.i4.1 + IL_0036: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0037: ldarg.1 + IL_0038: ldnull + IL_0039: cgt.un + IL_003b: brfalse.s IL_003f .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_003d: ldc.i4.m1 + IL_003e: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_003f: ldc.i4.0 + IL_0040: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -251,6 +254,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any ABC/Expr IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -279,6 +283,7 @@ IL_0028: ldloc.2 IL_0029: ldfld int32 ABC/Expr::item IL_002e: stloc.s V_5 + .line 100001,100001 : 0,0 '' IL_0030: ldloc.s V_4 IL_0032: ldloc.s V_5 IL_0034: bge.s IL_0038 @@ -317,48 +322,51 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 42 (0x2a) .maxstack 7 .locals init ([0] int32 V_0, [1] class ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 6,6 : 14,18 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0028 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop + IL_0007: ldc.i4.0 + IL_0008: stloc.0 .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 ABC/Expr::item - IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add + IL_0009: ldarg.0 + IL_000a: pop + .line 100001,100001 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldarg.1 + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldfld int32 ABC/Expr::item + IL_001c: ldloc.0 + IL_001d: ldc.i4.6 + IL_001e: shl + IL_001f: ldloc.0 + IL_0020: ldc.i4.2 + IL_0021: shr IL_0022: add IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_0024: add + IL_0025: stloc.0 + IL_0026: ldloc.0 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0028: ldc.i4.0 + IL_0029: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -379,104 +387,110 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1, [2] class ABC/Expr V_2, [3] class ABC/Expr V_3, [4] class [mscorlib]System.Collections.IEqualityComparer V_4) + .line 6,6 : 14,18 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_002d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst ABC/Expr - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_0007: ldarg.1 + IL_0008: isinst ABC/Expr + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_002b .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: pop + IL_0011: ldloc.0 + IL_0012: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_0013: ldarg.0 + IL_0014: pop + .line 100001,100001 : 0,0 '' + IL_0015: ldarg.0 + IL_0016: stloc.2 + IL_0017: ldloc.1 + IL_0018: stloc.3 + IL_0019: ldarg.2 + IL_001a: stloc.s V_4 + IL_001c: ldloc.2 + IL_001d: ldfld int32 ABC/Expr::item + IL_0022: ldloc.3 + IL_0023: ldfld int32 ABC/Expr::item + IL_0028: ceq + IL_002a: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 44 (0x2c) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1) + .line 6,6 : 14,18 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0022 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld int32 ABC/Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: ldloc.0 + IL_0014: ldfld int32 ABC/Expr::item + IL_0019: ldloc.1 + IL_001a: ldfld int32 ABC/Expr::item + IL_001f: ceq + IL_0021: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_0022: ldc.i4.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_0024: ldarg.1 + IL_0025: ldnull + IL_0026: cgt.un + IL_0028: ldc.i4.0 + IL_0029: ceq + IL_002b: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -490,6 +504,7 @@ IL_0000: ldarg.1 IL_0001: isinst ABC/Expr IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 @@ -579,41 +594,43 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 41 (0x29) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) + .line 7,7 : 19,24 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass ABC/MyExn - IL_0015: call instance int32 ABC/MyExn::get_Data0() - IL_001a: ldloc.0 - IL_001b: ldc.i4.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + IL_0009: ldc.i4 0x9e3779b9 + IL_000e: ldarg.1 + IL_000f: stloc.1 + IL_0010: ldarg.0 + IL_0011: castclass ABC/MyExn + IL_0016: call instance int32 ABC/MyExn::get_Data0() + IL_001b: ldloc.0 + IL_001c: ldc.i4.6 + IL_001d: shl + IL_001e: ldloc.0 + IL_001f: ldc.i4.2 + IL_0020: shr IL_0021: add IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + IL_0023: add + IL_0024: stloc.0 + IL_0025: ldloc.0 + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0027: ldc.i4.0 + IL_0028: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -634,112 +651,118 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 68 (0x44) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 7,7 : 19,24 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003c .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_0007: ldarg.1 + IL_0008: isinst [mscorlib]System.Exception + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c + IL_0011: ldloc.0 + IL_0012: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0013: ldloc.0 + IL_0014: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0019: brtrue.s IL_001d - IL_001a: br.s IL_0037 + IL_001b: br.s IL_0038 .line 100001,100001 : 0,0 '' - IL_001c: ldarg.2 - IL_001d: stloc.2 - IL_001e: ldarg.0 - IL_001f: castclass ABC/MyExn - IL_0024: call instance int32 ABC/MyExn::get_Data0() - IL_0029: ldloc.1 - IL_002a: castclass ABC/MyExn - IL_002f: call instance int32 ABC/MyExn::get_Data0() - IL_0034: ceq - IL_0036: ret + IL_001d: ldarg.2 + IL_001e: stloc.2 + IL_001f: ldarg.0 + IL_0020: castclass ABC/MyExn + IL_0025: call instance int32 ABC/MyExn::get_Data0() + IL_002a: ldloc.1 + IL_002b: castclass ABC/MyExn + IL_0030: call instance int32 ABC/MyExn::get_Data0() + IL_0035: ceq + IL_0037: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_0038: ldc.i4.0 + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_003b: ldarg.1 - IL_003c: ldnull - IL_003d: cgt.un - IL_003f: ldc.i4.0 - IL_0040: ceq - IL_0042: ret + IL_003c: ldarg.1 + IL_003d: ldnull + IL_003e: cgt.un + IL_0040: ldc.i4.0 + IL_0041: ceq + IL_0043: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 60 (0x3c) .maxstack 8 + .line 7,7 : 19,24 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 + IL_000d: ldarg.1 + IL_000e: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0013: brtrue.s IL_0017 - IL_0014: br.s IL_002f + IL_0015: br.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass ABC/MyExn - IL_001c: call instance int32 ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass ABC/MyExn - IL_0027: call instance int32 ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0017: ldarg.0 + IL_0018: castclass ABC/MyExn + IL_001d: call instance int32 ABC/MyExn::get_Data0() + IL_0022: ldarg.1 + IL_0023: castclass ABC/MyExn + IL_0028: call instance int32 ABC/MyExn::get_Data0() + IL_002d: ceq + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -753,6 +776,7 @@ IL_0000: ldarg.1 IL_0001: isinst [mscorlib]System.Exception IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 @@ -919,72 +943,75 @@ instance int32 CompareTo(class ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 65 (0x41) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1, [2] class [mscorlib]System.Collections.IComparer V_2, [3] int32 V_3, [4] int32 V_4) + .line 16,16 : 18,22 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop + .line 100001,100001 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 ABC/ABC/Expr::item + IL_001f: stloc.3 + IL_0020: ldloc.1 + IL_0021: ldfld int32 ABC/ABC/Expr::item + IL_0026: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 ABC/ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 ABC/ABC/Expr::item - IL_0025: stloc.s V_4 - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: bge.s IL_002f .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_002d: ldc.i4.m1 + IL_002e: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_002f: ldloc.3 + IL_0030: ldloc.s V_4 + IL_0032: cgt + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_0035: ldc.i4.1 + IL_0036: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0037: ldarg.1 + IL_0038: ldnull + IL_0039: cgt.un + IL_003b: brfalse.s IL_003f .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_003d: ldc.i4.m1 + IL_003e: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_003f: ldc.i4.0 + IL_0040: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1018,6 +1045,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any ABC/ABC/Expr IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -1046,6 +1074,7 @@ IL_0028: ldloc.2 IL_0029: ldfld int32 ABC/ABC/Expr::item IL_002e: stloc.s V_5 + .line 100001,100001 : 0,0 '' IL_0030: ldloc.s V_4 IL_0032: ldloc.s V_5 IL_0034: bge.s IL_0038 @@ -1084,48 +1113,51 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 42 (0x2a) .maxstack 7 .locals init ([0] int32 V_0, [1] class ABC/ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 16,16 : 18,22 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0028 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop + IL_0007: ldc.i4.0 + IL_0008: stloc.0 .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 ABC/ABC/Expr::item - IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add + IL_0009: ldarg.0 + IL_000a: pop + .line 100001,100001 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldarg.1 + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldfld int32 ABC/ABC/Expr::item + IL_001c: ldloc.0 + IL_001d: ldc.i4.6 + IL_001e: shl + IL_001f: ldloc.0 + IL_0020: ldc.i4.2 + IL_0021: shr IL_0022: add IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_0024: add + IL_0025: stloc.0 + IL_0026: ldloc.0 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0028: ldc.i4.0 + IL_0029: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1146,104 +1178,110 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1, [2] class ABC/ABC/Expr V_2, [3] class ABC/ABC/Expr V_3, [4] class [mscorlib]System.Collections.IEqualityComparer V_4) + .line 16,16 : 18,22 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_002d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst ABC/ABC/Expr - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_0007: ldarg.1 + IL_0008: isinst ABC/ABC/Expr + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_002b .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: pop + IL_0011: ldloc.0 + IL_0012: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 ABC/ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 ABC/ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_0013: ldarg.0 + IL_0014: pop + .line 100001,100001 : 0,0 '' + IL_0015: ldarg.0 + IL_0016: stloc.2 + IL_0017: ldloc.1 + IL_0018: stloc.3 + IL_0019: ldarg.2 + IL_001a: stloc.s V_4 + IL_001c: ldloc.2 + IL_001d: ldfld int32 ABC/ABC/Expr::item + IL_0022: ldloc.3 + IL_0023: ldfld int32 ABC/ABC/Expr::item + IL_0028: ceq + IL_002a: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 44 (0x2c) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1) + .line 16,16 : 18,22 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0022 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld int32 ABC/ABC/Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 ABC/ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: ldloc.0 + IL_0014: ldfld int32 ABC/ABC/Expr::item + IL_0019: ldloc.1 + IL_001a: ldfld int32 ABC/ABC/Expr::item + IL_001f: ceq + IL_0021: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_0022: ldc.i4.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_0024: ldarg.1 + IL_0025: ldnull + IL_0026: cgt.un + IL_0028: ldc.i4.0 + IL_0029: ceq + IL_002b: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -1257,6 +1295,7 @@ IL_0000: ldarg.1 IL_0001: isinst ABC/ABC/Expr IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 @@ -1346,41 +1385,43 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 41 (0x29) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) + .line 17,17 : 23,28 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass ABC/ABC/MyExn - IL_0015: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_001a: ldloc.0 - IL_001b: ldc.i4.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + IL_0009: ldc.i4 0x9e3779b9 + IL_000e: ldarg.1 + IL_000f: stloc.1 + IL_0010: ldarg.0 + IL_0011: castclass ABC/ABC/MyExn + IL_0016: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_001b: ldloc.0 + IL_001c: ldc.i4.6 + IL_001d: shl + IL_001e: ldloc.0 + IL_001f: ldc.i4.2 + IL_0020: shr IL_0021: add IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + IL_0023: add + IL_0024: stloc.0 + IL_0025: ldloc.0 + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0027: ldc.i4.0 + IL_0028: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -1401,112 +1442,118 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 68 (0x44) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 17,17 : 23,28 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003c .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_0007: ldarg.1 + IL_0008: isinst [mscorlib]System.Exception + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c + IL_0011: ldloc.0 + IL_0012: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0013: ldloc.0 + IL_0014: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0019: brtrue.s IL_001d - IL_001a: br.s IL_0037 + IL_001b: br.s IL_0038 .line 100001,100001 : 0,0 '' - IL_001c: ldarg.2 - IL_001d: stloc.2 - IL_001e: ldarg.0 - IL_001f: castclass ABC/ABC/MyExn - IL_0024: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0029: ldloc.1 - IL_002a: castclass ABC/ABC/MyExn - IL_002f: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0034: ceq - IL_0036: ret + IL_001d: ldarg.2 + IL_001e: stloc.2 + IL_001f: ldarg.0 + IL_0020: castclass ABC/ABC/MyExn + IL_0025: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_002a: ldloc.1 + IL_002b: castclass ABC/ABC/MyExn + IL_0030: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0035: ceq + IL_0037: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_0038: ldc.i4.0 + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_003b: ldarg.1 - IL_003c: ldnull - IL_003d: cgt.un - IL_003f: ldc.i4.0 - IL_0040: ceq - IL_0042: ret + IL_003c: ldarg.1 + IL_003d: ldnull + IL_003e: cgt.un + IL_0040: ldc.i4.0 + IL_0041: ceq + IL_0043: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 60 (0x3c) .maxstack 8 + .line 17,17 : 23,28 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 + IL_000d: ldarg.1 + IL_000e: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0013: brtrue.s IL_0017 - IL_0014: br.s IL_002f + IL_0015: br.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass ABC/ABC/MyExn - IL_001c: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass ABC/ABC/MyExn - IL_0027: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0017: ldarg.0 + IL_0018: castclass ABC/ABC/MyExn + IL_001d: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0022: ldarg.1 + IL_0023: castclass ABC/ABC/MyExn + IL_0028: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_002d: ceq + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -1520,6 +1567,7 @@ IL_0000: ldarg.1 IL_0001: isinst [mscorlib]System.Exception IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl index 32f8ac85d82..f96e7946db8 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00001850 Length: 0x0000055C } .module ToplevelNamespace.dll -// MVID: {60D48932-218B-729A-A745-03833289D460} +// MVID: {611C4D8C-218B-729A-A745-03838C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04F20000 +// Image base: 0x072C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -146,7 +146,7 @@ instance int32 CompareTo(class XYZ.Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 65 (0x41) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1, @@ -154,65 +154,68 @@ [3] int32 V_3, [4] int32 V_4) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SerializableAttribute\\ToplevelNamespace.fs' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + .line 7,7 : 10,14 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SerializableAttribute\\ToplevelNamespace.fs' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop + .line 100001,100001 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 XYZ.Expr::item + IL_001f: stloc.3 + IL_0020: ldloc.1 + IL_0021: ldfld int32 XYZ.Expr::item + IL_0026: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 XYZ.Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 XYZ.Expr::item - IL_0025: stloc.s V_4 - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: bge.s IL_002f .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_002d: ldc.i4.m1 + IL_002e: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_002f: ldloc.3 + IL_0030: ldloc.s V_4 + IL_0032: cgt + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_0035: ldc.i4.1 + IL_0036: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0037: ldarg.1 + IL_0038: ldnull + IL_0039: cgt.un + IL_003b: brfalse.s IL_003f .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_003d: ldc.i4.m1 + IL_003e: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_003f: ldc.i4.0 + IL_0040: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -246,6 +249,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any XYZ.Expr IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -274,6 +278,7 @@ IL_0028: ldloc.2 IL_0029: ldfld int32 XYZ.Expr::item IL_002e: stloc.s V_5 + .line 100001,100001 : 0,0 '' IL_0030: ldloc.s V_4 IL_0032: ldloc.s V_5 IL_0034: bge.s IL_0038 @@ -312,48 +317,51 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 42 (0x2a) .maxstack 7 .locals init ([0] int32 V_0, [1] class XYZ.Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 7,7 : 10,14 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0028 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop + IL_0007: ldc.i4.0 + IL_0008: stloc.0 .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 XYZ.Expr::item - IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add + IL_0009: ldarg.0 + IL_000a: pop + .line 100001,100001 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldarg.1 + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldfld int32 XYZ.Expr::item + IL_001c: ldloc.0 + IL_001d: ldc.i4.6 + IL_001e: shl + IL_001f: ldloc.0 + IL_0020: ldc.i4.2 + IL_0021: shr IL_0022: add IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_0024: add + IL_0025: stloc.0 + IL_0026: ldloc.0 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0028: ldc.i4.0 + IL_0029: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -374,104 +382,110 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1, [2] class XYZ.Expr V_2, [3] class XYZ.Expr V_3, [4] class [mscorlib]System.Collections.IEqualityComparer V_4) + .line 7,7 : 10,14 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_002d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst XYZ.Expr - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_0007: ldarg.1 + IL_0008: isinst XYZ.Expr + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_002b .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: pop + IL_0011: ldloc.0 + IL_0012: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 XYZ.Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 XYZ.Expr::item - IL_0027: ceq - IL_0029: ret + IL_0013: ldarg.0 + IL_0014: pop + .line 100001,100001 : 0,0 '' + IL_0015: ldarg.0 + IL_0016: stloc.2 + IL_0017: ldloc.1 + IL_0018: stloc.3 + IL_0019: ldarg.2 + IL_001a: stloc.s V_4 + IL_001c: ldloc.2 + IL_001d: ldfld int32 XYZ.Expr::item + IL_0022: ldloc.3 + IL_0023: ldfld int32 XYZ.Expr::item + IL_0028: ceq + IL_002a: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class XYZ.Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 44 (0x2c) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1) + .line 7,7 : 10,14 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0022 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld int32 XYZ.Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 XYZ.Expr::item - IL_001e: ceq - IL_0020: ret + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: ldloc.0 + IL_0014: ldfld int32 XYZ.Expr::item + IL_0019: ldloc.1 + IL_001a: ldfld int32 XYZ.Expr::item + IL_001f: ceq + IL_0021: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_0022: ldc.i4.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_0024: ldarg.1 + IL_0025: ldnull + IL_0026: cgt.un + IL_0028: ldc.i4.0 + IL_0029: ceq + IL_002b: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -485,6 +499,7 @@ IL_0000: ldarg.1 IL_0001: isinst XYZ.Expr IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 @@ -574,41 +589,43 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 41 (0x29) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) + .line 8,8 : 15,20 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass XYZ.MyExn - IL_0015: call instance int32 XYZ.MyExn::get_Data0() - IL_001a: ldloc.0 - IL_001b: ldc.i4.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + IL_0009: ldc.i4 0x9e3779b9 + IL_000e: ldarg.1 + IL_000f: stloc.1 + IL_0010: ldarg.0 + IL_0011: castclass XYZ.MyExn + IL_0016: call instance int32 XYZ.MyExn::get_Data0() + IL_001b: ldloc.0 + IL_001c: ldc.i4.6 + IL_001d: shl + IL_001e: ldloc.0 + IL_001f: ldc.i4.2 + IL_0020: shr IL_0021: add IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + IL_0023: add + IL_0024: stloc.0 + IL_0025: ldloc.0 + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0027: ldc.i4.0 + IL_0028: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -629,112 +646,118 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 68 (0x44) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 8,8 : 15,20 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003c .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_0007: ldarg.1 + IL_0008: isinst [mscorlib]System.Exception + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c + IL_0011: ldloc.0 + IL_0012: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0013: ldloc.0 + IL_0014: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0019: brtrue.s IL_001d - IL_001a: br.s IL_0037 + IL_001b: br.s IL_0038 .line 100001,100001 : 0,0 '' - IL_001c: ldarg.2 - IL_001d: stloc.2 - IL_001e: ldarg.0 - IL_001f: castclass XYZ.MyExn - IL_0024: call instance int32 XYZ.MyExn::get_Data0() - IL_0029: ldloc.1 - IL_002a: castclass XYZ.MyExn - IL_002f: call instance int32 XYZ.MyExn::get_Data0() - IL_0034: ceq - IL_0036: ret + IL_001d: ldarg.2 + IL_001e: stloc.2 + IL_001f: ldarg.0 + IL_0020: castclass XYZ.MyExn + IL_0025: call instance int32 XYZ.MyExn::get_Data0() + IL_002a: ldloc.1 + IL_002b: castclass XYZ.MyExn + IL_0030: call instance int32 XYZ.MyExn::get_Data0() + IL_0035: ceq + IL_0037: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_0038: ldc.i4.0 + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_003b: ldarg.1 - IL_003c: ldnull - IL_003d: cgt.un - IL_003f: ldc.i4.0 - IL_0040: ceq - IL_0042: ret + IL_003c: ldarg.1 + IL_003d: ldnull + IL_003e: cgt.un + IL_0040: ldc.i4.0 + IL_0041: ceq + IL_0043: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 60 (0x3c) .maxstack 8 + .line 8,8 : 15,20 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 + IL_000d: ldarg.1 + IL_000e: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0013: brtrue.s IL_0017 - IL_0014: br.s IL_002f + IL_0015: br.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass XYZ.MyExn - IL_001c: call instance int32 XYZ.MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass XYZ.MyExn - IL_0027: call instance int32 XYZ.MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0017: ldarg.0 + IL_0018: castclass XYZ.MyExn + IL_001d: call instance int32 XYZ.MyExn::get_Data0() + IL_0022: ldarg.1 + IL_0023: castclass XYZ.MyExn + IL_0028: call instance int32 XYZ.MyExn::get_Data0() + IL_002d: ceq + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -748,6 +771,7 @@ IL_0000: ldarg.1 IL_0001: isinst [mscorlib]System.Exception IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 @@ -914,72 +938,75 @@ instance int32 CompareTo(class XYZ.ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 65 (0x41) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1, [2] class [mscorlib]System.Collections.IComparer V_2, [3] int32 V_3, [4] int32 V_4) + .line 13,13 : 14,18 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop + .line 100001,100001 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 XYZ.ABC/Expr::item + IL_001f: stloc.3 + IL_0020: ldloc.1 + IL_0021: ldfld int32 XYZ.ABC/Expr::item + IL_0026: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 XYZ.ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 XYZ.ABC/Expr::item - IL_0025: stloc.s V_4 - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: bge.s IL_002f .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_002d: ldc.i4.m1 + IL_002e: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_002f: ldloc.3 + IL_0030: ldloc.s V_4 + IL_0032: cgt + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_0035: ldc.i4.1 + IL_0036: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0037: ldarg.1 + IL_0038: ldnull + IL_0039: cgt.un + IL_003b: brfalse.s IL_003f .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_003d: ldc.i4.m1 + IL_003e: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_003f: ldc.i4.0 + IL_0040: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1013,6 +1040,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any XYZ.ABC/Expr IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -1041,6 +1069,7 @@ IL_0028: ldloc.2 IL_0029: ldfld int32 XYZ.ABC/Expr::item IL_002e: stloc.s V_5 + .line 100001,100001 : 0,0 '' IL_0030: ldloc.s V_4 IL_0032: ldloc.s V_5 IL_0034: bge.s IL_0038 @@ -1079,48 +1108,51 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 42 (0x2a) .maxstack 7 .locals init ([0] int32 V_0, [1] class XYZ.ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 13,13 : 14,18 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0028 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop + IL_0007: ldc.i4.0 + IL_0008: stloc.0 .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 XYZ.ABC/Expr::item - IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add + IL_0009: ldarg.0 + IL_000a: pop + .line 100001,100001 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldarg.1 + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldfld int32 XYZ.ABC/Expr::item + IL_001c: ldloc.0 + IL_001d: ldc.i4.6 + IL_001e: shl + IL_001f: ldloc.0 + IL_0020: ldc.i4.2 + IL_0021: shr IL_0022: add IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_0024: add + IL_0025: stloc.0 + IL_0026: ldloc.0 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0028: ldc.i4.0 + IL_0029: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1141,104 +1173,110 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1, [2] class XYZ.ABC/Expr V_2, [3] class XYZ.ABC/Expr V_3, [4] class [mscorlib]System.Collections.IEqualityComparer V_4) + .line 13,13 : 14,18 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_002d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst XYZ.ABC/Expr - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_0007: ldarg.1 + IL_0008: isinst XYZ.ABC/Expr + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_002b .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: pop + IL_0011: ldloc.0 + IL_0012: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 XYZ.ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 XYZ.ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_0013: ldarg.0 + IL_0014: pop + .line 100001,100001 : 0,0 '' + IL_0015: ldarg.0 + IL_0016: stloc.2 + IL_0017: ldloc.1 + IL_0018: stloc.3 + IL_0019: ldarg.2 + IL_001a: stloc.s V_4 + IL_001c: ldloc.2 + IL_001d: ldfld int32 XYZ.ABC/Expr::item + IL_0022: ldloc.3 + IL_0023: ldfld int32 XYZ.ABC/Expr::item + IL_0028: ceq + IL_002a: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class XYZ.ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 44 (0x2c) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1) + .line 13,13 : 14,18 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0022 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld int32 XYZ.ABC/Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 XYZ.ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: ldloc.0 + IL_0014: ldfld int32 XYZ.ABC/Expr::item + IL_0019: ldloc.1 + IL_001a: ldfld int32 XYZ.ABC/Expr::item + IL_001f: ceq + IL_0021: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_0022: ldc.i4.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_0024: ldarg.1 + IL_0025: ldnull + IL_0026: cgt.un + IL_0028: ldc.i4.0 + IL_0029: ceq + IL_002b: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -1252,6 +1290,7 @@ IL_0000: ldarg.1 IL_0001: isinst XYZ.ABC/Expr IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 @@ -1341,41 +1380,43 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 41 (0x29) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) + .line 14,14 : 19,24 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass XYZ.ABC/MyExn - IL_0015: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_001a: ldloc.0 - IL_001b: ldc.i4.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + IL_0009: ldc.i4 0x9e3779b9 + IL_000e: ldarg.1 + IL_000f: stloc.1 + IL_0010: ldarg.0 + IL_0011: castclass XYZ.ABC/MyExn + IL_0016: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_001b: ldloc.0 + IL_001c: ldc.i4.6 + IL_001d: shl + IL_001e: ldloc.0 + IL_001f: ldc.i4.2 + IL_0020: shr IL_0021: add IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + IL_0023: add + IL_0024: stloc.0 + IL_0025: ldloc.0 + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0027: ldc.i4.0 + IL_0028: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -1396,112 +1437,118 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 68 (0x44) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 14,14 : 19,24 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003c .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_0007: ldarg.1 + IL_0008: isinst [mscorlib]System.Exception + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c + IL_0011: ldloc.0 + IL_0012: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0013: ldloc.0 + IL_0014: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0019: brtrue.s IL_001d - IL_001a: br.s IL_0037 + IL_001b: br.s IL_0038 .line 100001,100001 : 0,0 '' - IL_001c: ldarg.2 - IL_001d: stloc.2 - IL_001e: ldarg.0 - IL_001f: castclass XYZ.ABC/MyExn - IL_0024: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0029: ldloc.1 - IL_002a: castclass XYZ.ABC/MyExn - IL_002f: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0034: ceq - IL_0036: ret + IL_001d: ldarg.2 + IL_001e: stloc.2 + IL_001f: ldarg.0 + IL_0020: castclass XYZ.ABC/MyExn + IL_0025: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_002a: ldloc.1 + IL_002b: castclass XYZ.ABC/MyExn + IL_0030: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0035: ceq + IL_0037: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_0038: ldc.i4.0 + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_003b: ldarg.1 - IL_003c: ldnull - IL_003d: cgt.un - IL_003f: ldc.i4.0 - IL_0040: ceq - IL_0042: ret + IL_003c: ldarg.1 + IL_003d: ldnull + IL_003e: cgt.un + IL_0040: ldc.i4.0 + IL_0041: ceq + IL_0043: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 60 (0x3c) .maxstack 8 + .line 14,14 : 19,24 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 + IL_000d: ldarg.1 + IL_000e: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0013: brtrue.s IL_0017 - IL_0014: br.s IL_002f + IL_0015: br.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass XYZ.ABC/MyExn - IL_001c: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass XYZ.ABC/MyExn - IL_0027: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0017: ldarg.0 + IL_0018: castclass XYZ.ABC/MyExn + IL_001d: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0022: ldarg.1 + IL_0023: castclass XYZ.ABC/MyExn + IL_0028: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_002d: ceq + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -1515,6 +1562,7 @@ IL_0000: ldarg.1 IL_0001: isinst [mscorlib]System.Exception IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 @@ -1681,72 +1729,75 @@ instance int32 CompareTo(class XYZ.ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 65 (0x41) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1, [2] class [mscorlib]System.Collections.IComparer V_2, [3] int32 V_3, [4] int32 V_4) + .line 23,23 : 18,22 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0025: stloc.s V_4 - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_001f: stloc.3 + IL_0020: ldloc.1 + IL_0021: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0026: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: bge.s IL_002f .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_002d: ldc.i4.m1 + IL_002e: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_002f: ldloc.3 + IL_0030: ldloc.s V_4 + IL_0032: cgt + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_0035: ldc.i4.1 + IL_0036: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0037: ldarg.1 + IL_0038: ldnull + IL_0039: cgt.un + IL_003b: brfalse.s IL_003f .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_003d: ldc.i4.m1 + IL_003e: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_003f: ldc.i4.0 + IL_0040: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1780,6 +1831,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any XYZ.ABC/ABC/Expr IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -1808,6 +1860,7 @@ IL_0028: ldloc.2 IL_0029: ldfld int32 XYZ.ABC/ABC/Expr::item IL_002e: stloc.s V_5 + .line 100001,100001 : 0,0 '' IL_0030: ldloc.s V_4 IL_0032: ldloc.s V_5 IL_0034: bge.s IL_0038 @@ -1846,48 +1899,51 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 42 (0x2a) .maxstack 7 .locals init ([0] int32 V_0, [1] class XYZ.ABC/ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 23,23 : 18,22 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0028 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop + IL_0007: ldc.i4.0 + IL_0008: stloc.0 .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add + IL_0009: ldarg.0 + IL_000a: pop + .line 100001,100001 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldarg.1 + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_001c: ldloc.0 + IL_001d: ldc.i4.6 + IL_001e: shl + IL_001f: ldloc.0 + IL_0020: ldc.i4.2 + IL_0021: shr IL_0022: add IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_0024: add + IL_0025: stloc.0 + IL_0026: ldloc.0 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0028: ldc.i4.0 + IL_0029: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1908,104 +1964,110 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1, [2] class XYZ.ABC/ABC/Expr V_2, [3] class XYZ.ABC/ABC/Expr V_3, [4] class [mscorlib]System.Collections.IEqualityComparer V_4) + .line 23,23 : 18,22 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_002d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst XYZ.ABC/ABC/Expr - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_0007: ldarg.1 + IL_0008: isinst XYZ.ABC/ABC/Expr + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_002b .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: pop + IL_0011: ldloc.0 + IL_0012: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_0013: ldarg.0 + IL_0014: pop + .line 100001,100001 : 0,0 '' + IL_0015: ldarg.0 + IL_0016: stloc.2 + IL_0017: ldloc.1 + IL_0018: stloc.3 + IL_0019: ldarg.2 + IL_001a: stloc.s V_4 + IL_001c: ldloc.2 + IL_001d: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0022: ldloc.3 + IL_0023: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0028: ceq + IL_002a: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class XYZ.ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 44 (0x2c) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1) + .line 23,23 : 18,22 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0022 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: ldloc.0 + IL_0014: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0019: ldloc.1 + IL_001a: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_001f: ceq + IL_0021: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_0022: ldc.i4.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_0024: ldarg.1 + IL_0025: ldnull + IL_0026: cgt.un + IL_0028: ldc.i4.0 + IL_0029: ceq + IL_002b: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -2019,6 +2081,7 @@ IL_0000: ldarg.1 IL_0001: isinst XYZ.ABC/ABC/Expr IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 @@ -2108,41 +2171,43 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 41 (0x29) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) + .line 24,24 : 23,28 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass XYZ.ABC/ABC/MyExn - IL_0015: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_001a: ldloc.0 - IL_001b: ldc.i4.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + IL_0009: ldc.i4 0x9e3779b9 + IL_000e: ldarg.1 + IL_000f: stloc.1 + IL_0010: ldarg.0 + IL_0011: castclass XYZ.ABC/ABC/MyExn + IL_0016: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_001b: ldloc.0 + IL_001c: ldc.i4.6 + IL_001d: shl + IL_001e: ldloc.0 + IL_001f: ldc.i4.2 + IL_0020: shr IL_0021: add IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + IL_0023: add + IL_0024: stloc.0 + IL_0025: ldloc.0 + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0027: ldc.i4.0 + IL_0028: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -2163,112 +2228,118 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 68 (0x44) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .line 24,24 : 23,28 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003c .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_0007: ldarg.1 + IL_0008: isinst [mscorlib]System.Exception + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c + IL_0011: ldloc.0 + IL_0012: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0013: ldloc.0 + IL_0014: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0019: brtrue.s IL_001d - IL_001a: br.s IL_0037 + IL_001b: br.s IL_0038 .line 100001,100001 : 0,0 '' - IL_001c: ldarg.2 - IL_001d: stloc.2 - IL_001e: ldarg.0 - IL_001f: castclass XYZ.ABC/ABC/MyExn - IL_0024: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0029: ldloc.1 - IL_002a: castclass XYZ.ABC/ABC/MyExn - IL_002f: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0034: ceq - IL_0036: ret + IL_001d: ldarg.2 + IL_001e: stloc.2 + IL_001f: ldarg.0 + IL_0020: castclass XYZ.ABC/ABC/MyExn + IL_0025: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_002a: ldloc.1 + IL_002b: castclass XYZ.ABC/ABC/MyExn + IL_0030: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0035: ceq + IL_0037: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_0038: ldc.i4.0 + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_003b: ldarg.1 - IL_003c: ldnull - IL_003d: cgt.un - IL_003f: ldc.i4.0 - IL_0040: ceq - IL_0042: ret + IL_003c: ldarg.1 + IL_003d: ldnull + IL_003e: cgt.un + IL_0040: ldc.i4.0 + IL_0041: ceq + IL_0043: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 60 (0x3c) .maxstack 8 + .line 24,24 : 23,28 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 + IL_000d: ldarg.1 + IL_000e: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0013: brtrue.s IL_0017 - IL_0014: br.s IL_002f + IL_0015: br.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass XYZ.ABC/ABC/MyExn - IL_001c: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass XYZ.ABC/ABC/MyExn - IL_0027: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0017: ldarg.0 + IL_0018: castclass XYZ.ABC/ABC/MyExn + IL_001d: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0022: ldarg.1 + IL_0023: castclass XYZ.ABC/ABC/MyExn + IL_0028: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_002d: ceq + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -2282,6 +2353,7 @@ IL_0000: ldarg.1 IL_0001: isinst [mscorlib]System.Exception IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Class01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Class01.il.bsl index aa250d3a1d8..d65cdab3db2 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Class01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Class01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000338 Length: 0x000000AD } .module StaticInit_Class01.dll -// MVID: {60B68B90-EC34-E66E-A745-0383908BB660} +// MVID: {611C4D99-EC34-E66E-A745-0383994D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06F70000 +// Image base: 0x06F20000 // =============== CLASS MEMBERS DECLARATION =================== @@ -75,28 +75,30 @@ .method assembly static int32 f() cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 37 (0x25) + // Code size 38 (0x26) .maxstack 8 .line 7,7 : 23,37 '' - IL_0000: volatile. - IL_0002: ldsfld int32 StaticInit_ClassS01/C::init@4 - IL_0007: ldc.i4.1 - IL_0008: bge.s IL_0013 - + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_000a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() - IL_000f: nop + IL_0001: volatile. + IL_0003: ldsfld int32 StaticInit_ClassS01/C::init@4 + IL_0008: ldc.i4.1 + IL_0009: bge.s IL_0014 + .line 100001,100001 : 0,0 '' + IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() IL_0010: nop - IL_0011: br.s IL_0014 + .line 100001,100001 : 0,0 '' + IL_0011: nop + IL_0012: br.s IL_0015 .line 100001,100001 : 0,0 '' - IL_0013: nop - IL_0014: ldsfld int32 StaticInit_ClassS01/C::x - IL_0019: ldstr "2" - IL_001e: callvirt instance int32 [mscorlib]System.String::get_Length() - IL_0023: add - IL_0024: ret + IL_0014: nop + IL_0015: ldsfld int32 StaticInit_ClassS01/C::x + IL_001a: ldstr "2" + IL_001f: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_0024: add + IL_0025: ret } // end of method C::f .method private specialname rtspecialname static diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl index a0fdade3853..589b435e0d9 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x000007A8 Length: 0x0000021F } .module StaticInit_Struct01.dll -// MVID: {60B68B90-05F6-D6CB-A745-0383908BB660} +// MVID: {611C52B1-05F6-D6CB-A745-0383B1521C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05BE0000 +// Image base: 0x06550000 // =============== CLASS MEMBERS DECLARATION =================== @@ -229,28 +229,30 @@ .method assembly static int32 f() cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 37 (0x25) + // Code size 38 (0x26) .maxstack 8 .line 7,7 : 23,37 '' - IL_0000: volatile. - IL_0002: ldsfld int32 StaticInit_Struct01/C::init@4 - IL_0007: ldc.i4.1 - IL_0008: bge.s IL_0013 - + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_000a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() - IL_000f: nop + IL_0001: volatile. + IL_0003: ldsfld int32 StaticInit_Struct01/C::init@4 + IL_0008: ldc.i4.1 + IL_0009: bge.s IL_0014 + .line 100001,100001 : 0,0 '' + IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() IL_0010: nop - IL_0011: br.s IL_0014 + .line 100001,100001 : 0,0 '' + IL_0011: nop + IL_0012: br.s IL_0015 .line 100001,100001 : 0,0 '' - IL_0013: nop - IL_0014: ldsfld int32 StaticInit_Struct01/C::x - IL_0019: ldstr "2" - IL_001e: callvirt instance int32 [mscorlib]System.String::get_Length() - IL_0023: add - IL_0024: ret + IL_0014: nop + IL_0015: ldsfld int32 StaticInit_Struct01/C::x + IL_001a: ldstr "2" + IL_001f: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_0024: add + IL_0025: ret } // end of method C::f .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch01.il.bsl index c3bb349428a..090ace0a0d5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000218 Length: 0x0000007A } .module SteppingMatch01.dll -// MVID: {60B68B90-ABFD-13F6-A745-0383908BB660} +// MVID: {611C4D99-ABFD-13F6-A745-0383994D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06940000 +// Image base: 0x05320000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,12 +62,14 @@ .line 5,5 : 9,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch01.fs' IL_0000: ldarg.0 IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' IL_0002: ldloc.0 IL_0003: isinst class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2/Choice1Of2 IL_0008: brfalse.s IL_000c IL_000a: br.s IL_001e + .line 100001,100001 : 0,0 '' IL_000c: ldloc.0 IL_000d: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2/Choice2Of2 IL_0012: stloc.1 @@ -76,7 +78,7 @@ IL_0018: call void [mscorlib]System.Console::WriteLine(string) IL_001d: ret - .line 5,5 : 9,21 '' + .line 100001,100001 : 0,0 '' IL_001e: ldloc.0 IL_001f: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2/Choice1Of2 IL_0024: stloc.2 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch02.il.bsl index 21138ae19ab..d29ae57f651 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch02.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000218 Length: 0x0000007A } .module SteppingMatch02.dll -// MVID: {60B68B90-CAC2-C63D-A745-0383908BB660} +// MVID: {611C4D99-CAC2-C63D-A745-0383994D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05330000 +// Image base: 0x06CD0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,12 +62,14 @@ .line 5,5 : 9,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch02.fs' IL_0000: ldarg.0 IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' IL_0002: ldloc.0 IL_0003: isinst class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2/Choice2Of2 IL_0008: brfalse.s IL_000c IL_000a: br.s IL_001e + .line 100001,100001 : 0,0 '' IL_000c: ldloc.0 IL_000d: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2/Choice1Of2 IL_0012: stloc.1 @@ -76,7 +78,7 @@ IL_0018: call void [mscorlib]System.Console::WriteLine(string) IL_001d: ret - .line 5,5 : 9,21 '' + .line 100001,100001 : 0,0 '' IL_001e: ldloc.0 IL_001f: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`2/Choice2Of2 IL_0024: stloc.2 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch03.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch03.il.bsl index 2413a566d87..224265a3987 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch03.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch03.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000230 Length: 0x0000007A } .module SteppingMatch03.dll -// MVID: {60B68B90-4E87-D110-A745-0383908BB660} +// MVID: {611C4D99-4E87-D110-A745-0383994D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07380000 +// Image base: 0x06F80000 // =============== CLASS MEMBERS DECLARATION =================== @@ -64,6 +64,7 @@ .line 5,5 : 9,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch03.fs' IL_0000: ldarg.0 IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' IL_0002: ldloc.0 IL_0003: stloc.1 IL_0004: ldloc.1 @@ -74,6 +75,7 @@ IL_000d: isinst class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice3Of3 IL_0012: brtrue.s IL_0038 + .line 100001,100001 : 0,0 '' IL_0014: ldloc.0 IL_0015: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice1Of3 IL_001a: stloc.2 @@ -82,7 +84,7 @@ IL_0020: call void [mscorlib]System.Console::WriteLine(string) IL_0025: ret - .line 5,5 : 9,21 '' + .line 100001,100001 : 0,0 '' IL_0026: ldloc.0 IL_0027: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice2Of3 IL_002c: stloc.3 @@ -91,7 +93,7 @@ IL_0032: call void [mscorlib]System.Console::WriteLine(string) IL_0037: ret - .line 5,5 : 9,21 '' + .line 100001,100001 : 0,0 '' IL_0038: ldloc.0 IL_0039: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice3Of3 IL_003e: stloc.s V_4 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch04.il.bsl index df2a0c23809..b1afa2fc791 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch04.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch04.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000230 Length: 0x0000007B } .module SteppingMatch04.dll -// MVID: {60B68B90-6D4C-8357-A745-0383908BB660} +// MVID: {611C4D99-6D4C-8357-A745-0383994D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x073C0000 +// Image base: 0x06E30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -64,6 +64,7 @@ .line 5,5 : 9,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch04.fs' IL_0000: ldarg.0 IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' IL_0002: ldloc.0 IL_0003: stloc.1 IL_0004: ldloc.1 @@ -74,6 +75,7 @@ IL_000d: isinst class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice1Of3 IL_0012: brtrue.s IL_0038 + .line 100001,100001 : 0,0 '' IL_0014: ldloc.0 IL_0015: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice2Of3 IL_001a: stloc.2 @@ -82,7 +84,7 @@ IL_0020: call void [mscorlib]System.Console::WriteLine(string) IL_0025: ret - .line 5,5 : 9,21 '' + .line 100001,100001 : 0,0 '' IL_0026: ldloc.0 IL_0027: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice3Of3 IL_002c: stloc.3 @@ -91,7 +93,7 @@ IL_0032: call void [mscorlib]System.Console::WriteLine(string) IL_0037: ret - .line 5,5 : 9,21 '' + .line 100001,100001 : 0,0 '' IL_0038: ldloc.0 IL_0039: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice1Of3 IL_003e: stloc.s V_4 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch05.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch05.il.bsl index 6f851d8245e..948bd3d9f92 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch05.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch05.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000230 Length: 0x0000007B } .module SteppingMatch05.dll -// MVID: {60B68B90-30E9-4ADA-A745-0383908BB660} +// MVID: {611C4D99-30E9-4ADA-A745-0383994D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x072E0000 +// Image base: 0x064D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -64,6 +64,7 @@ .line 5,5 : 9,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch05.fs' IL_0000: ldarg.0 IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' IL_0002: ldloc.0 IL_0003: stloc.1 IL_0004: ldloc.1 @@ -74,6 +75,7 @@ IL_000d: isinst class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice1Of3 IL_0012: brtrue.s IL_0038 + .line 100001,100001 : 0,0 '' IL_0014: ldloc.0 IL_0015: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice3Of3 IL_001a: stloc.2 @@ -82,7 +84,7 @@ IL_0020: call void [mscorlib]System.Console::WriteLine(string) IL_0025: ret - .line 5,5 : 9,21 '' + .line 100001,100001 : 0,0 '' IL_0026: ldloc.0 IL_0027: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice2Of3 IL_002c: stloc.3 @@ -91,7 +93,7 @@ IL_0032: call void [mscorlib]System.Console::WriteLine(string) IL_0037: ret - .line 5,5 : 9,21 '' + .line 100001,100001 : 0,0 '' IL_0038: ldloc.0 IL_0039: castclass class [FSharp.Core]Microsoft.FSharp.Core.FSharpChoice`3/Choice1Of3 IL_003e: stloc.s V_4 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl index da1fa20a676..9a549b41ea9 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000680 Length: 0x000001D9 } .module SteppingMatch06.dll -// MVID: {60B68B90-4FAE-FD21-A745-0383908BB660} +// MVID: {611C4D99-4FAE-FD21-A745-0383994D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05BB0000 +// Image base: 0x05850000 // =============== CLASS MEMBERS DECLARATION =================== @@ -205,61 +205,64 @@ instance int32 CompareTo(class SteppingMatch06/Discr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 48 (0x30) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch06.fs' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + .line 4,4 : 6,11 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch06.fs' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0024 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0025 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 SteppingMatch06/Discr::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 SteppingMatch06/Discr::_tag - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un.s IL_0020 + IL_000d: ldarg.0 + IL_000e: ldfld int32 SteppingMatch06/Discr::_tag + IL_0013: stloc.0 + IL_0014: ldarg.1 + IL_0015: ldfld int32 SteppingMatch06/Discr::_tag + IL_001a: stloc.1 + .line 100001,100001 : 0,0 '' + IL_001b: ldloc.0 + IL_001c: ldloc.1 + IL_001d: bne.un.s IL_0021 .line 100001,100001 : 0,0 '' - IL_001e: ldc.i4.0 - IL_001f: ret + IL_001f: ldc.i4.0 + IL_0020: ret .line 100001,100001 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldloc.1 - IL_0022: sub - IL_0023: ret + IL_0021: ldloc.0 + IL_0022: ldloc.1 + IL_0023: sub + IL_0024: ret .line 100001,100001 : 0,0 '' - IL_0024: ldc.i4.1 - IL_0025: ret + IL_0025: ldc.i4.1 + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_0026: ldarg.1 - IL_0027: ldnull - IL_0028: cgt.un - IL_002a: brfalse.s IL_002e + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: brfalse.s IL_002f .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_002d: ldc.i4.m1 + IL_002e: ret .line 100001,100001 : 0,0 '' - IL_002e: ldc.i4.0 - IL_002f: ret + IL_002f: ldc.i4.0 + IL_0030: ret } // end of method Discr::CompareTo .method public hidebysig virtual final @@ -290,6 +293,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any SteppingMatch06/Discr IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -309,6 +313,7 @@ IL_001f: ldloc.0 IL_0020: ldfld int32 SteppingMatch06/Discr::_tag IL_0025: stloc.2 + .line 100001,100001 : 0,0 '' IL_0026: ldloc.1 IL_0027: ldloc.2 IL_0028: bne.un.s IL_002c @@ -347,25 +352,27 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 17 (0x11) + // Code size 18 (0x12) .maxstack 3 .locals init ([0] int32 V_0) + .line 4,4 : 6,11 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_000f + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0010 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: ldfld int32 SteppingMatch06/Discr::_tag - IL_000e: ret + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + IL_0009: ldarg.0 + IL_000a: ldfld int32 SteppingMatch06/Discr::_tag + IL_000f: ret .line 100001,100001 : 0,0 '' - IL_000f: ldc.i4.0 - IL_0010: ret + IL_0010: ldc.i4.0 + IL_0011: ret } // end of method Discr::GetHashCode .method public hidebysig virtual final @@ -386,95 +393,102 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 47 (0x2f) + // Code size 48 (0x30) .maxstack 4 .locals init ([0] class SteppingMatch06/Discr V_0, [1] class SteppingMatch06/Discr V_1, [2] int32 V_2, [3] int32 V_3) + .line 4,4 : 6,11 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 - - .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst SteppingMatch06/Discr - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0025 - - .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 SteppingMatch06/Discr::_tag - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld int32 SteppingMatch06/Discr::_tag - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: ceq - IL_0024: ret + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0028 .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.0 - IL_0026: ret + IL_0007: ldarg.1 + IL_0008: isinst SteppingMatch06/Discr + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0026 .line 100001,100001 : 0,0 '' - IL_0027: ldarg.1 - IL_0028: ldnull - IL_0029: cgt.un - IL_002b: ldc.i4.0 - IL_002c: ceq - IL_002e: ret + IL_0011: ldloc.0 + IL_0012: stloc.1 + IL_0013: ldarg.0 + IL_0014: ldfld int32 SteppingMatch06/Discr::_tag + IL_0019: stloc.2 + IL_001a: ldloc.1 + IL_001b: ldfld int32 SteppingMatch06/Discr::_tag + IL_0020: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0021: ldloc.2 + IL_0022: ldloc.3 + IL_0023: ceq + IL_0025: ret + + .line 100001,100001 : 0,0 '' + IL_0026: ldc.i4.0 + IL_0027: ret + + .line 100001,100001 : 0,0 '' + IL_0028: ldarg.1 + IL_0029: ldnull + IL_002a: cgt.un + IL_002c: ldc.i4.0 + IL_002d: ceq + IL_002f: ret } // end of method Discr::Equals .method public hidebysig virtual final instance bool Equals(class SteppingMatch06/Discr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 42 (0x2a) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) + .line 4,4 : 6,11 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0021 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0022 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_001f + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0020 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 SteppingMatch06/Discr::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 SteppingMatch06/Discr::_tag - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: ceq - IL_001e: ret + IL_000d: ldarg.0 + IL_000e: ldfld int32 SteppingMatch06/Discr::_tag + IL_0013: stloc.0 + IL_0014: ldarg.1 + IL_0015: ldfld int32 SteppingMatch06/Discr::_tag + IL_001a: stloc.1 + .line 100001,100001 : 0,0 '' + IL_001b: ldloc.0 + IL_001c: ldloc.1 + IL_001d: ceq + IL_001f: ret .line 100001,100001 : 0,0 '' - IL_001f: ldc.i4.0 - IL_0020: ret + IL_0020: ldc.i4.0 + IL_0021: ret .line 100001,100001 : 0,0 '' - IL_0021: ldarg.1 - IL_0022: ldnull - IL_0023: cgt.un - IL_0025: ldc.i4.0 - IL_0026: ceq - IL_0028: ret + IL_0022: ldarg.1 + IL_0023: ldnull + IL_0024: cgt.un + IL_0026: ldc.i4.0 + IL_0027: ceq + IL_0029: ret } // end of method Discr::Equals .method public hidebysig virtual final @@ -488,6 +502,7 @@ IL_0000: ldarg.1 IL_0001: isinst SteppingMatch06/Discr IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 @@ -543,25 +558,27 @@ .method public static void funcD(class SteppingMatch06/Discr n) cil managed { - // Code size 33 (0x21) + // Code size 34 (0x22) .maxstack 8 .line 6,6 : 9,21 '' - IL_0000: ldarg.0 - IL_0001: call instance int32 SteppingMatch06/Discr::get_Tag() - IL_0006: ldc.i4.0 - IL_0007: bne.un.s IL_000b + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: call instance int32 SteppingMatch06/Discr::get_Tag() + IL_0007: ldc.i4.0 + IL_0008: bne.un.s IL_000c - IL_0009: br.s IL_0016 + IL_000a: br.s IL_0017 .line 8,8 : 13,35 '' - IL_000b: ldstr "B" - IL_0010: call void [mscorlib]System.Console::WriteLine(string) - IL_0015: ret + IL_000c: ldstr "B" + IL_0011: call void [mscorlib]System.Console::WriteLine(string) + IL_0016: ret .line 10,10 : 13,35 '' - IL_0016: ldstr "A" - IL_001b: call void [mscorlib]System.Console::WriteLine(string) - IL_0020: ret + IL_0017: ldstr "A" + IL_001c: call void [mscorlib]System.Console::WriteLine(string) + IL_0021: ret } // end of method SteppingMatch06::funcD } // end of class SteppingMatch06 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl index d91371610a6..76a3997425f 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000680 Length: 0x000001D9 } .module SteppingMatch07.dll -// MVID: {60B68B90-D373-07F3-A745-0383908BB660} +// MVID: {611C4D99-D373-07F3-A745-0383994D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07270000 +// Image base: 0x06780000 // =============== CLASS MEMBERS DECLARATION =================== @@ -205,61 +205,64 @@ instance int32 CompareTo(class SteppingMatch07/Discr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 48 (0x30) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch07.fs' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + .line 4,4 : 6,11 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch07.fs' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0024 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0025 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 SteppingMatch07/Discr::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 SteppingMatch07/Discr::_tag - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un.s IL_0020 + IL_000d: ldarg.0 + IL_000e: ldfld int32 SteppingMatch07/Discr::_tag + IL_0013: stloc.0 + IL_0014: ldarg.1 + IL_0015: ldfld int32 SteppingMatch07/Discr::_tag + IL_001a: stloc.1 + .line 100001,100001 : 0,0 '' + IL_001b: ldloc.0 + IL_001c: ldloc.1 + IL_001d: bne.un.s IL_0021 .line 100001,100001 : 0,0 '' - IL_001e: ldc.i4.0 - IL_001f: ret + IL_001f: ldc.i4.0 + IL_0020: ret .line 100001,100001 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldloc.1 - IL_0022: sub - IL_0023: ret + IL_0021: ldloc.0 + IL_0022: ldloc.1 + IL_0023: sub + IL_0024: ret .line 100001,100001 : 0,0 '' - IL_0024: ldc.i4.1 - IL_0025: ret + IL_0025: ldc.i4.1 + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_0026: ldarg.1 - IL_0027: ldnull - IL_0028: cgt.un - IL_002a: brfalse.s IL_002e + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: brfalse.s IL_002f .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_002d: ldc.i4.m1 + IL_002e: ret .line 100001,100001 : 0,0 '' - IL_002e: ldc.i4.0 - IL_002f: ret + IL_002f: ldc.i4.0 + IL_0030: ret } // end of method Discr::CompareTo .method public hidebysig virtual final @@ -290,6 +293,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any SteppingMatch07/Discr IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -309,6 +313,7 @@ IL_001f: ldloc.0 IL_0020: ldfld int32 SteppingMatch07/Discr::_tag IL_0025: stloc.2 + .line 100001,100001 : 0,0 '' IL_0026: ldloc.1 IL_0027: ldloc.2 IL_0028: bne.un.s IL_002c @@ -347,25 +352,27 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 17 (0x11) + // Code size 18 (0x12) .maxstack 3 .locals init ([0] int32 V_0) + .line 4,4 : 6,11 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_000f + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0010 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: ldfld int32 SteppingMatch07/Discr::_tag - IL_000e: ret + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + IL_0009: ldarg.0 + IL_000a: ldfld int32 SteppingMatch07/Discr::_tag + IL_000f: ret .line 100001,100001 : 0,0 '' - IL_000f: ldc.i4.0 - IL_0010: ret + IL_0010: ldc.i4.0 + IL_0011: ret } // end of method Discr::GetHashCode .method public hidebysig virtual final @@ -386,95 +393,102 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 47 (0x2f) + // Code size 48 (0x30) .maxstack 4 .locals init ([0] class SteppingMatch07/Discr V_0, [1] class SteppingMatch07/Discr V_1, [2] int32 V_2, [3] int32 V_3) + .line 4,4 : 6,11 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 - - .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst SteppingMatch07/Discr - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0025 - - .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 SteppingMatch07/Discr::_tag - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld int32 SteppingMatch07/Discr::_tag - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: ceq - IL_0024: ret + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0028 .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.0 - IL_0026: ret + IL_0007: ldarg.1 + IL_0008: isinst SteppingMatch07/Discr + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0026 .line 100001,100001 : 0,0 '' - IL_0027: ldarg.1 - IL_0028: ldnull - IL_0029: cgt.un - IL_002b: ldc.i4.0 - IL_002c: ceq - IL_002e: ret + IL_0011: ldloc.0 + IL_0012: stloc.1 + IL_0013: ldarg.0 + IL_0014: ldfld int32 SteppingMatch07/Discr::_tag + IL_0019: stloc.2 + IL_001a: ldloc.1 + IL_001b: ldfld int32 SteppingMatch07/Discr::_tag + IL_0020: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0021: ldloc.2 + IL_0022: ldloc.3 + IL_0023: ceq + IL_0025: ret + + .line 100001,100001 : 0,0 '' + IL_0026: ldc.i4.0 + IL_0027: ret + + .line 100001,100001 : 0,0 '' + IL_0028: ldarg.1 + IL_0029: ldnull + IL_002a: cgt.un + IL_002c: ldc.i4.0 + IL_002d: ceq + IL_002f: ret } // end of method Discr::Equals .method public hidebysig virtual final instance bool Equals(class SteppingMatch07/Discr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 42 (0x2a) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) + .line 4,4 : 6,11 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0021 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0022 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_001f + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0020 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 SteppingMatch07/Discr::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 SteppingMatch07/Discr::_tag - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: ceq - IL_001e: ret + IL_000d: ldarg.0 + IL_000e: ldfld int32 SteppingMatch07/Discr::_tag + IL_0013: stloc.0 + IL_0014: ldarg.1 + IL_0015: ldfld int32 SteppingMatch07/Discr::_tag + IL_001a: stloc.1 + .line 100001,100001 : 0,0 '' + IL_001b: ldloc.0 + IL_001c: ldloc.1 + IL_001d: ceq + IL_001f: ret .line 100001,100001 : 0,0 '' - IL_001f: ldc.i4.0 - IL_0020: ret + IL_0020: ldc.i4.0 + IL_0021: ret .line 100001,100001 : 0,0 '' - IL_0021: ldarg.1 - IL_0022: ldnull - IL_0023: cgt.un - IL_0025: ldc.i4.0 - IL_0026: ceq - IL_0028: ret + IL_0022: ldarg.1 + IL_0023: ldnull + IL_0024: cgt.un + IL_0026: ldc.i4.0 + IL_0027: ceq + IL_0029: ret } // end of method Discr::Equals .method public hidebysig virtual final @@ -488,6 +502,7 @@ IL_0000: ldarg.1 IL_0001: isinst SteppingMatch07/Discr IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 @@ -543,25 +558,27 @@ .method public static void funcE(class SteppingMatch07/Discr n) cil managed { - // Code size 33 (0x21) + // Code size 34 (0x22) .maxstack 8 .line 6,6 : 9,21 '' - IL_0000: ldarg.0 - IL_0001: call instance int32 SteppingMatch07/Discr::get_Tag() - IL_0006: ldc.i4.1 - IL_0007: bne.un.s IL_000b + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: call instance int32 SteppingMatch07/Discr::get_Tag() + IL_0007: ldc.i4.1 + IL_0008: bne.un.s IL_000c - IL_0009: br.s IL_0016 + IL_000a: br.s IL_0017 .line 8,8 : 13,35 '' - IL_000b: ldstr "A" - IL_0010: call void [mscorlib]System.Console::WriteLine(string) - IL_0015: ret + IL_000c: ldstr "A" + IL_0011: call void [mscorlib]System.Console::WriteLine(string) + IL_0016: ret .line 10,10 : 13,35 '' - IL_0016: ldstr "B" - IL_001b: call void [mscorlib]System.Console::WriteLine(string) - IL_0020: ret + IL_0017: ldstr "B" + IL_001c: call void [mscorlib]System.Console::WriteLine(string) + IL_0021: ret } // end of method SteppingMatch07::funcE } // end of class SteppingMatch07 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch08.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch08.il.bsl index 76a265460b5..53a1dcd156f 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch08.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch08.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000001E0 Length: 0x00000079 } .module SteppingMatch08.dll -// MVID: {60B68B90-F238-BA3A-A745-0383908BB660} +// MVID: {611C4D99-F238-BA3A-A745-0383994D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00E20000 +// Image base: 0x05A00000 // =============== CLASS MEMBERS DECLARATION =================== @@ -53,30 +53,32 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) .method public static void test(int32 x) cil managed { - // Code size 20 (0x14) + // Code size 21 (0x15) .maxstack 3 .locals init ([0] int32 b) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 5,5 : 9,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch08.fs' - IL_0000: ldarg.0 - IL_0001: switch ( - IL_000c) - IL_000a: br.s IL_0010 + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: switch ( + IL_000d) + IL_000b: br.s IL_0011 .line 6,6 : 16,17 '' - IL_000c: ldc.i4.2 + IL_000d: ldc.i4.2 .line 100001,100001 : 0,0 '' - IL_000d: nop - IL_000e: br.s IL_0012 + IL_000e: nop + IL_000f: br.s IL_0013 .line 7,7 : 18,19 '' - IL_0010: ldc.i4.0 + IL_0011: ldc.i4.0 .line 100001,100001 : 0,0 '' - IL_0011: nop + IL_0012: nop .line 100001,100001 : 0,0 '' - IL_0012: stloc.0 + IL_0013: stloc.0 .line 10,10 : 5,38 '' - IL_0013: ret + IL_0014: ret } // end of method SteppingMatch08::test } // end of class SteppingMatch08 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl index 3d11c8b1b67..0a66e664385 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000310 Length: 0x000000EB } .module SteppingMatch09.dll -// MVID: {60B68B90-4935-D6AC-A745-0383908BB660} +// MVID: {611C4D99-4935-D6AC-A745-0383994D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A70000 +// Image base: 0x07080000 // =============== CLASS MEMBERS DECLARATION =================== @@ -121,7 +121,7 @@ .method public strict virtual instance int32 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { - // Code size 19 (0x13) + // Code size 20 (0x14) .maxstack 6 .locals init ([0] class SteppingMatch09/GenericInner@15 V_0) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' @@ -129,17 +129,19 @@ IL_0000: ldarg.0 IL_0001: ldfld class SteppingMatch09/GenericInner@15 class SteppingMatch09/GenericInner@15T::self0@ IL_0006: stloc.0 - IL_0007: ldarg.1 - IL_0008: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_000d: brtrue.s IL_0011 + IL_0007: nop + .line 100001,100001 : 0,0 '' + IL_0008: ldarg.1 + IL_0009: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_000e: brtrue.s IL_0012 .line 17,17 : 14,15 '' - IL_000f: ldc.i4.1 - IL_0010: ret + IL_0010: ldc.i4.1 + IL_0011: ret .line 18,18 : 13,14 '' - IL_0011: ldc.i4.2 - IL_0012: ret + IL_0012: ldc.i4.2 + IL_0013: ret } // end of method GenericInner@15T::Invoke } // end of class GenericInner@15T @@ -163,20 +165,22 @@ .method public strict virtual instance int32 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { - // Code size 12 (0xc) + // Code size 13 (0xd) .maxstack 8 .line 25,25 : 6,21 '' - IL_0000: ldarg.1 - IL_0001: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0006: brtrue.s IL_000a + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.1 + IL_0002: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0007: brtrue.s IL_000b .line 26,26 : 14,15 '' - IL_0008: ldc.i4.1 - IL_0009: ret + IL_0009: ldc.i4.1 + IL_000a: ret .line 27,27 : 13,14 '' - IL_000a: ldc.i4.2 - IL_000b: ret + IL_000b: ldc.i4.2 + IL_000c: ret } // end of method NonGenericInner@25::Invoke .method private specialname rtspecialname static @@ -213,21 +217,23 @@ .method public strict virtual instance int32 Invoke(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed { - // Code size 17 (0x11) + // Code size 18 (0x12) .maxstack 8 .line 34,34 : 6,21 '' - IL_0000: ldarg.1 - IL_0001: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0006: brtrue.s IL_000a + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.1 + IL_0002: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0007: brtrue.s IL_000b .line 35,35 : 14,15 '' - IL_0008: ldc.i4.1 - IL_0009: ret + IL_0009: ldc.i4.1 + IL_000a: ret .line 36,36 : 13,14 '' - IL_000a: ldarg.0 - IL_000b: ldfld int32 SteppingMatch09/NonGenericInnerWithCapture@34::x - IL_0010: ret + IL_000b: ldarg.0 + IL_000c: ldfld int32 SteppingMatch09/NonGenericInnerWithCapture@34::x + IL_0011: ret } // end of method NonGenericInnerWithCapture@34::Invoke } // end of class NonGenericInnerWithCapture@34 @@ -235,30 +241,32 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 funcA(int32 n) cil managed { - // Code size 36 (0x24) + // Code size 37 (0x25) .maxstack 8 .line 5,5 : 9,21 '' - IL_0000: ldarg.0 - IL_0001: ldc.i4.1 - IL_0002: sub - IL_0003: switch ( - IL_0012, - IL_001a) - IL_0010: br.s IL_001c + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldc.i4.1 + IL_0003: sub + IL_0004: switch ( + IL_0013, + IL_001b) + IL_0011: br.s IL_001d .line 7,7 : 13,21 '' - IL_0012: ldc.i4.s 10 - IL_0014: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::Some(!0) - IL_0019: ret + IL_0013: ldc.i4.s 10 + IL_0015: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::Some(!0) + IL_001a: ret .line 9,9 : 13,17 '' - IL_001a: ldnull - IL_001b: ret + IL_001b: ldnull + IL_001c: ret .line 11,11 : 20,34 '' - IL_001c: ldc.i4.s 22 - IL_001e: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::Some(!0) - IL_0023: ret + IL_001d: ldc.i4.s 22 + IL_001f: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::Some(!0) + IL_0024: ret } // end of method SteppingMatch09::funcA .method public static int32 OuterWithGenericInner(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 list) cil managed diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction16.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction16.il.bsl index 25a67922af0..053da8e2bc1 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction16.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction16.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000688 Length: 0x000001CD } .module TestFunction16.exe -// MVID: {60B68B97-A624-45C5-A745-0383978BB660} +// MVID: {611C52B3-A624-45C5-A745-0383B3521C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00E30000 +// Image base: 0x07120000 // =============== CLASS MEMBERS DECLARATION =================== @@ -174,7 +174,7 @@ instance int32 CompareTo(class TestFunction16/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 120 (0x78) + // Code size 121 (0x79) .maxstack 4 .locals init ([0] class TestFunction16/U V_0, [1] class TestFunction16/U V_1, @@ -186,109 +186,114 @@ [7] int32 V_7, [8] int32 V_8) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction16.fs' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006e + .line 4,4 : 6,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction16.fs' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_006f .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006c + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_006d .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop + .line 100001,100001 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0018: stloc.3 + IL_0019: ldloc.0 + IL_001a: ldfld int32 TestFunction16/U::item1 + IL_001f: stloc.s V_4 + IL_0021: ldloc.1 + IL_0022: ldfld int32 TestFunction16/U::item1 + IL_0027: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 TestFunction16/U::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 TestFunction16/U::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.s V_5 + IL_002d: bge.s IL_0033 .line 100001,100001 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_002f: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0030: nop + IL_0031: br.s IL_003a .line 100001,100001 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_0033: ldloc.s V_4 + IL_0035: ldloc.s V_5 + IL_0037: cgt .line 100001,100001 : 0,0 '' - IL_0038: nop + IL_0039: nop + .line 100001,100001 : 0,0 '' + IL_003a: stloc.2 .line 100001,100001 : 0,0 '' - IL_0039: stloc.2 - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_003b: ldloc.2 + IL_003c: ldc.i4.0 + IL_003d: bge.s IL_0041 .line 100001,100001 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_003f: ldloc.2 + IL_0040: ret .line 100001,100001 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_0041: ldloc.2 + IL_0042: ldc.i4.0 + IL_0043: ble.s IL_0047 .line 100001,100001 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_0045: ldloc.2 + IL_0046: ret .line 100001,100001 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.s V_6 - IL_004d: ldloc.0 - IL_004e: ldfld int32 TestFunction16/U::item2 - IL_0053: stloc.s V_7 - IL_0055: ldloc.1 - IL_0056: ldfld int32 TestFunction16/U::item2 - IL_005b: stloc.s V_8 - IL_005d: ldloc.s V_7 - IL_005f: ldloc.s V_8 - IL_0061: bge.s IL_0065 + IL_0047: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_004c: stloc.s V_6 + IL_004e: ldloc.0 + IL_004f: ldfld int32 TestFunction16/U::item2 + IL_0054: stloc.s V_7 + IL_0056: ldloc.1 + IL_0057: ldfld int32 TestFunction16/U::item2 + IL_005c: stloc.s V_8 + .line 100001,100001 : 0,0 '' + IL_005e: ldloc.s V_7 + IL_0060: ldloc.s V_8 + IL_0062: bge.s IL_0066 .line 100001,100001 : 0,0 '' - IL_0063: ldc.i4.m1 - IL_0064: ret + IL_0064: ldc.i4.m1 + IL_0065: ret .line 100001,100001 : 0,0 '' - IL_0065: ldloc.s V_7 - IL_0067: ldloc.s V_8 - IL_0069: cgt - IL_006b: ret + IL_0066: ldloc.s V_7 + IL_0068: ldloc.s V_8 + IL_006a: cgt + IL_006c: ret .line 100001,100001 : 0,0 '' - IL_006c: ldc.i4.1 - IL_006d: ret + IL_006d: ldc.i4.1 + IL_006e: ret .line 100001,100001 : 0,0 '' - IL_006e: ldarg.1 - IL_006f: ldnull - IL_0070: cgt.un - IL_0072: brfalse.s IL_0076 + IL_006f: ldarg.1 + IL_0070: ldnull + IL_0071: cgt.un + IL_0073: brfalse.s IL_0077 .line 100001,100001 : 0,0 '' - IL_0074: ldc.i4.m1 - IL_0075: ret + IL_0075: ldc.i4.m1 + IL_0076: ret .line 100001,100001 : 0,0 '' - IL_0076: ldc.i4.0 - IL_0077: ret + IL_0077: ldc.i4.0 + IL_0078: ret } // end of method U::CompareTo .method public hidebysig virtual final @@ -326,6 +331,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any TestFunction16/U IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -354,6 +360,7 @@ IL_0029: ldloc.2 IL_002a: ldfld int32 TestFunction16/U::item1 IL_002f: stloc.s V_6 + .line 100001,100001 : 0,0 '' IL_0031: ldloc.s V_5 IL_0033: ldloc.s V_6 IL_0035: bge.s IL_003b @@ -372,6 +379,7 @@ IL_0041: nop .line 100001,100001 : 0,0 '' IL_0042: stloc.3 + .line 100001,100001 : 0,0 '' IL_0043: ldloc.3 IL_0044: ldc.i4.0 IL_0045: bge.s IL_0049 @@ -398,6 +406,7 @@ IL_005a: ldloc.2 IL_005b: ldfld int32 TestFunction16/U::item2 IL_0060: stloc.s V_9 + .line 100001,100001 : 0,0 '' IL_0062: ldloc.s V_8 IL_0064: ldloc.s V_9 IL_0066: bge.s IL_006a @@ -436,64 +445,67 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 65 (0x41) .maxstack 7 .locals init ([0] int32 V_0, [1] class TestFunction16/U V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2, [3] class [mscorlib]System.Collections.IEqualityComparer V_3) + .line 4,4 : 6,7 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003e + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003f .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop + IL_0007: ldc.i4.0 + IL_0008: stloc.0 .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 TestFunction16/U::item2 - IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add + IL_0009: ldarg.0 + IL_000a: pop + .line 100001,100001 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldarg.1 + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldfld int32 TestFunction16/U::item2 + IL_001c: ldloc.0 + IL_001d: ldc.i4.6 + IL_001e: shl + IL_001f: ldloc.0 + IL_0020: ldc.i4.2 + IL_0021: shr IL_0022: add IL_0023: add - IL_0024: stloc.0 - IL_0025: ldc.i4 0x9e3779b9 - IL_002a: ldarg.1 - IL_002b: stloc.3 - IL_002c: ldloc.1 - IL_002d: ldfld int32 TestFunction16/U::item1 - IL_0032: ldloc.0 - IL_0033: ldc.i4.6 - IL_0034: shl - IL_0035: ldloc.0 - IL_0036: ldc.i4.2 - IL_0037: shr - IL_0038: add + IL_0024: add + IL_0025: stloc.0 + IL_0026: ldc.i4 0x9e3779b9 + IL_002b: ldarg.1 + IL_002c: stloc.3 + IL_002d: ldloc.1 + IL_002e: ldfld int32 TestFunction16/U::item1 + IL_0033: ldloc.0 + IL_0034: ldc.i4.6 + IL_0035: shl + IL_0036: ldloc.0 + IL_0037: ldc.i4.2 + IL_0038: shr IL_0039: add IL_003a: add - IL_003b: stloc.0 - IL_003c: ldloc.0 - IL_003d: ret + IL_003b: add + IL_003c: stloc.0 + IL_003d: ldloc.0 + IL_003e: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_003f: ldc.i4.0 + IL_0040: ret } // end of method U::GetHashCode .method public hidebysig virtual final @@ -514,7 +526,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 73 (0x49) + // Code size 74 (0x4a) .maxstack 4 .locals init ([0] class TestFunction16/U V_0, [1] class TestFunction16/U V_1, @@ -522,122 +534,130 @@ [3] class TestFunction16/U V_3, [4] class [mscorlib]System.Collections.IEqualityComparer V_4, [5] class [mscorlib]System.Collections.IEqualityComparer V_5) + .line 4,4 : 6,7 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0041 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0042 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst TestFunction16/U - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003f + IL_0007: ldarg.1 + IL_0008: isinst TestFunction16/U + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0040 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: pop + IL_0011: ldloc.0 + IL_0012: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 TestFunction16/U::item1 - IL_0021: ldloc.3 - IL_0022: ldfld int32 TestFunction16/U::item1 - IL_0027: ceq - IL_0029: brfalse.s IL_003d + IL_0013: ldarg.0 + IL_0014: pop + .line 100001,100001 : 0,0 '' + IL_0015: ldarg.0 + IL_0016: stloc.2 + IL_0017: ldloc.1 + IL_0018: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0019: ldarg.2 + IL_001a: stloc.s V_4 + IL_001c: ldloc.2 + IL_001d: ldfld int32 TestFunction16/U::item1 + IL_0022: ldloc.3 + IL_0023: ldfld int32 TestFunction16/U::item1 + IL_0028: ceq + IL_002a: brfalse.s IL_003e .line 100001,100001 : 0,0 '' - IL_002b: ldarg.2 - IL_002c: stloc.s V_5 - IL_002e: ldloc.2 - IL_002f: ldfld int32 TestFunction16/U::item2 - IL_0034: ldloc.3 - IL_0035: ldfld int32 TestFunction16/U::item2 - IL_003a: ceq - IL_003c: ret + IL_002c: ldarg.2 + IL_002d: stloc.s V_5 + IL_002f: ldloc.2 + IL_0030: ldfld int32 TestFunction16/U::item2 + IL_0035: ldloc.3 + IL_0036: ldfld int32 TestFunction16/U::item2 + IL_003b: ceq + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.0 - IL_003e: ret + IL_003e: ldc.i4.0 + IL_003f: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_0040: ldc.i4.0 + IL_0041: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: ldnull - IL_0043: cgt.un - IL_0045: ldc.i4.0 - IL_0046: ceq - IL_0048: ret + IL_0042: ldarg.1 + IL_0043: ldnull + IL_0044: cgt.un + IL_0046: ldc.i4.0 + IL_0047: ceq + IL_0049: ret } // end of method U::Equals .method public hidebysig virtual final instance bool Equals(class TestFunction16/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class TestFunction16/U V_0, [1] class TestFunction16/U V_1) + .line 4,4 : 6,7 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld int32 TestFunction16/U::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 TestFunction16/U::item1 - IL_001e: bne.un.s IL_002f + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0013: ldloc.0 + IL_0014: ldfld int32 TestFunction16/U::item1 + IL_0019: ldloc.1 + IL_001a: ldfld int32 TestFunction16/U::item1 + IL_001f: bne.un.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldfld int32 TestFunction16/U::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 TestFunction16/U::item2 - IL_002c: ceq - IL_002e: ret + IL_0021: ldloc.0 + IL_0022: ldfld int32 TestFunction16/U::item2 + IL_0027: ldloc.1 + IL_0028: ldfld int32 TestFunction16/U::item2 + IL_002d: ceq + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method U::Equals .method public hidebysig virtual final @@ -651,6 +671,7 @@ IL_0000: ldarg.1 IL_0001: isinst TestFunction16/U IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction17.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction17.il.bsl index 02a8fa33560..5b097b711ff 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction17.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction17.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000678 Length: 0x000001CD } .module TestFunction17.exe -// MVID: {60B68B97-A624-45A8-A745-0383978BB660} +// MVID: {611C52B3-A624-45A8-A745-0383B3521C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06AA0000 +// Image base: 0x06B30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -119,7 +119,7 @@ instance int32 CompareTo(class TestFunction17/R obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 108 (0x6c) + // Code size 109 (0x6d) .maxstack 4 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IComparer V_1, @@ -129,102 +129,107 @@ [5] int32 V_5, [6] int32 V_6) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction17.fs' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0062 + .line 4,4 : 6,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction17.fs' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0063 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0060 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0061 .line 100001,100001 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 TestFunction17/R::x@ - IL_0018: stloc.2 - IL_0019: ldarg.1 - IL_001a: ldfld int32 TestFunction17/R::x@ - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: bge.s IL_0028 + IL_000d: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0012: stloc.1 + IL_0013: ldarg.0 + IL_0014: ldfld int32 TestFunction17/R::x@ + IL_0019: stloc.2 + IL_001a: ldarg.1 + IL_001b: ldfld int32 TestFunction17/R::x@ + IL_0020: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0021: ldloc.2 + IL_0022: ldloc.3 + IL_0023: bge.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0024: ldc.i4.m1 + IL_0025: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_0025: nop - IL_0026: br.s IL_002d + IL_0026: nop + IL_0027: br.s IL_002e .line 100001,100001 : 0,0 '' - IL_0028: ldloc.2 - IL_0029: ldloc.3 - IL_002a: cgt + IL_0029: ldloc.2 + IL_002a: ldloc.3 + IL_002b: cgt + .line 100001,100001 : 0,0 '' + IL_002d: nop .line 100001,100001 : 0,0 '' - IL_002c: nop + IL_002e: stloc.0 .line 100001,100001 : 0,0 '' - IL_002d: stloc.0 - IL_002e: ldloc.0 - IL_002f: ldc.i4.0 - IL_0030: bge.s IL_0034 + IL_002f: ldloc.0 + IL_0030: ldc.i4.0 + IL_0031: bge.s IL_0035 .line 100001,100001 : 0,0 '' - IL_0032: ldloc.0 - IL_0033: ret + IL_0033: ldloc.0 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_0034: ldloc.0 - IL_0035: ldc.i4.0 - IL_0036: ble.s IL_003a + IL_0035: ldloc.0 + IL_0036: ldc.i4.0 + IL_0037: ble.s IL_003b .line 100001,100001 : 0,0 '' - IL_0038: ldloc.0 - IL_0039: ret + IL_0039: ldloc.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_003f: stloc.s V_4 - IL_0041: ldarg.0 - IL_0042: ldfld int32 TestFunction17/R::y@ - IL_0047: stloc.s V_5 - IL_0049: ldarg.1 - IL_004a: ldfld int32 TestFunction17/R::y@ - IL_004f: stloc.s V_6 - IL_0051: ldloc.s V_5 - IL_0053: ldloc.s V_6 - IL_0055: bge.s IL_0059 + IL_003b: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0040: stloc.s V_4 + IL_0042: ldarg.0 + IL_0043: ldfld int32 TestFunction17/R::y@ + IL_0048: stloc.s V_5 + IL_004a: ldarg.1 + IL_004b: ldfld int32 TestFunction17/R::y@ + IL_0050: stloc.s V_6 + .line 100001,100001 : 0,0 '' + IL_0052: ldloc.s V_5 + IL_0054: ldloc.s V_6 + IL_0056: bge.s IL_005a .line 100001,100001 : 0,0 '' - IL_0057: ldc.i4.m1 - IL_0058: ret + IL_0058: ldc.i4.m1 + IL_0059: ret .line 100001,100001 : 0,0 '' - IL_0059: ldloc.s V_5 - IL_005b: ldloc.s V_6 - IL_005d: cgt - IL_005f: ret + IL_005a: ldloc.s V_5 + IL_005c: ldloc.s V_6 + IL_005e: cgt + IL_0060: ret .line 100001,100001 : 0,0 '' - IL_0060: ldc.i4.1 - IL_0061: ret + IL_0061: ldc.i4.1 + IL_0062: ret .line 100001,100001 : 0,0 '' - IL_0062: ldarg.1 - IL_0063: ldnull - IL_0064: cgt.un - IL_0066: brfalse.s IL_006a + IL_0063: ldarg.1 + IL_0064: ldnull + IL_0065: cgt.un + IL_0067: brfalse.s IL_006b .line 100001,100001 : 0,0 '' - IL_0068: ldc.i4.m1 - IL_0069: ret + IL_0069: ldc.i4.m1 + IL_006a: ret .line 100001,100001 : 0,0 '' - IL_006a: ldc.i4.0 - IL_006b: ret + IL_006b: ldc.i4.0 + IL_006c: ret } // end of method R::CompareTo .method public hidebysig virtual final @@ -263,6 +268,7 @@ IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: stloc.1 + .line 100001,100001 : 0,0 '' IL_0009: ldarg.0 IL_000a: ldnull IL_000b: cgt.un @@ -284,6 +290,7 @@ IL_0024: ldloc.1 IL_0025: ldfld int32 TestFunction17/R::x@ IL_002a: stloc.s V_5 + .line 100001,100001 : 0,0 '' IL_002c: ldloc.s V_4 IL_002e: ldloc.s V_5 IL_0030: bge.s IL_0036 @@ -302,6 +309,7 @@ IL_003c: nop .line 100001,100001 : 0,0 '' IL_003d: stloc.2 + .line 100001,100001 : 0,0 '' IL_003e: ldloc.2 IL_003f: ldc.i4.0 IL_0040: bge.s IL_0044 @@ -328,6 +336,7 @@ IL_0055: ldloc.1 IL_0056: ldfld int32 TestFunction17/R::y@ IL_005b: stloc.s V_8 + .line 100001,100001 : 0,0 '' IL_005d: ldloc.s V_7 IL_005f: ldloc.s V_8 IL_0061: bge.s IL_0065 @@ -366,56 +375,58 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 58 (0x3a) + // Code size 59 (0x3b) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) - .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0038 - - .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: ldfld int32 TestFunction17/R::y@ - IL_0015: ldloc.0 - IL_0016: ldc.i4.6 - IL_0017: shl - IL_0018: ldloc.0 - IL_0019: ldc.i4.2 - IL_001a: shr - IL_001b: add + .line 4,4 : 6,7 '' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0039 + + .line 100001,100001 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + IL_0009: ldc.i4 0x9e3779b9 + IL_000e: ldarg.1 + IL_000f: stloc.1 + IL_0010: ldarg.0 + IL_0011: ldfld int32 TestFunction17/R::y@ + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr IL_001c: add IL_001d: add - IL_001e: stloc.0 - IL_001f: ldc.i4 0x9e3779b9 - IL_0024: ldarg.1 - IL_0025: stloc.2 - IL_0026: ldarg.0 - IL_0027: ldfld int32 TestFunction17/R::x@ - IL_002c: ldloc.0 - IL_002d: ldc.i4.6 - IL_002e: shl - IL_002f: ldloc.0 - IL_0030: ldc.i4.2 - IL_0031: shr - IL_0032: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: stloc.2 + IL_0027: ldarg.0 + IL_0028: ldfld int32 TestFunction17/R::x@ + IL_002d: ldloc.0 + IL_002e: ldc.i4.6 + IL_002f: shl + IL_0030: ldloc.0 + IL_0031: ldc.i4.2 + IL_0032: shr IL_0033: add IL_0034: add - IL_0035: stloc.0 - IL_0036: ldloc.0 - IL_0037: ret + IL_0035: add + IL_0036: stloc.0 + IL_0037: ldloc.0 + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_0038: ldc.i4.0 - IL_0039: ret + IL_0039: ldc.i4.0 + IL_003a: ret } // end of method R::GetHashCode .method public hidebysig virtual final @@ -436,112 +447,118 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 65 (0x41) + // Code size 66 (0x42) .maxstack 4 .locals init ([0] class TestFunction17/R V_0, [1] class TestFunction17/R V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2, [3] class [mscorlib]System.Collections.IEqualityComparer V_3) + .line 4,4 : 6,7 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0039 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst TestFunction17/R - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0037 + IL_0007: ldarg.1 + IL_0008: isinst TestFunction17/R + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0038 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.2 - IL_0013: stloc.2 - IL_0014: ldarg.0 - IL_0015: ldfld int32 TestFunction17/R::x@ - IL_001a: ldloc.1 - IL_001b: ldfld int32 TestFunction17/R::x@ - IL_0020: ceq - IL_0022: brfalse.s IL_0035 + IL_0011: ldloc.0 + IL_0012: stloc.1 + .line 100001,100001 : 0,0 '' + IL_0013: ldarg.2 + IL_0014: stloc.2 + IL_0015: ldarg.0 + IL_0016: ldfld int32 TestFunction17/R::x@ + IL_001b: ldloc.1 + IL_001c: ldfld int32 TestFunction17/R::x@ + IL_0021: ceq + IL_0023: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' - IL_0024: ldarg.2 - IL_0025: stloc.3 - IL_0026: ldarg.0 - IL_0027: ldfld int32 TestFunction17/R::y@ - IL_002c: ldloc.1 - IL_002d: ldfld int32 TestFunction17/R::y@ - IL_0032: ceq - IL_0034: ret + IL_0025: ldarg.2 + IL_0026: stloc.3 + IL_0027: ldarg.0 + IL_0028: ldfld int32 TestFunction17/R::y@ + IL_002d: ldloc.1 + IL_002e: ldfld int32 TestFunction17/R::y@ + IL_0033: ceq + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0036: ldc.i4.0 + IL_0037: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_0038: ldc.i4.0 + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0039: ldarg.1 - IL_003a: ldnull - IL_003b: cgt.un - IL_003d: ldc.i4.0 - IL_003e: ceq - IL_0040: ret + IL_003a: ldarg.1 + IL_003b: ldnull + IL_003c: cgt.un + IL_003e: ldc.i4.0 + IL_003f: ceq + IL_0041: ret } // end of method R::Equals .method public hidebysig virtual final instance bool Equals(class TestFunction17/R obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 54 (0x36) .maxstack 8 + .line 4,4 : 6,7 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002d + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_002b + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 TestFunction17/R::x@ - IL_0012: ldarg.1 - IL_0013: ldfld int32 TestFunction17/R::x@ - IL_0018: bne.un.s IL_0029 + IL_000d: ldarg.0 + IL_000e: ldfld int32 TestFunction17/R::x@ + IL_0013: ldarg.1 + IL_0014: ldfld int32 TestFunction17/R::x@ + IL_0019: bne.un.s IL_002a .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: ldfld int32 TestFunction17/R::y@ - IL_0020: ldarg.1 - IL_0021: ldfld int32 TestFunction17/R::y@ - IL_0026: ceq - IL_0028: ret + IL_001b: ldarg.0 + IL_001c: ldfld int32 TestFunction17/R::y@ + IL_0021: ldarg.1 + IL_0022: ldfld int32 TestFunction17/R::y@ + IL_0027: ceq + IL_0029: ret .line 100001,100001 : 0,0 '' - IL_0029: ldc.i4.0 - IL_002a: ret + IL_002a: ldc.i4.0 + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_002d: ldarg.1 - IL_002e: ldnull - IL_002f: cgt.un - IL_0031: ldc.i4.0 - IL_0032: ceq - IL_0034: ret + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: cgt.un + IL_0032: ldc.i4.0 + IL_0033: ceq + IL_0035: ret } // end of method R::Equals .method public hidebysig virtual final @@ -555,6 +572,7 @@ IL_0000: ldarg.1 IL_0001: isinst TestFunction17/R IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction21.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction21.il.bsl index 752ef0b375b..3b768e614ef 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction21.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction21.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000680 Length: 0x000001CD } .module TestFunction21.exe -// MVID: {60B68B97-A643-45E6-A745-0383978BB660} +// MVID: {611C52B3-A643-45E6-A745-0383B3521C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05500000 +// Image base: 0x06DD0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -174,7 +174,7 @@ instance int32 CompareTo(class TestFunction21/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 120 (0x78) + // Code size 121 (0x79) .maxstack 4 .locals init ([0] class TestFunction21/U V_0, [1] class TestFunction21/U V_1, @@ -186,109 +186,114 @@ [7] int32 V_7, [8] int32 V_8) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction21.fs' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006e + .line 4,4 : 6,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction21.fs' + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_006f .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006c + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_006d .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 TestFunction21/U::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 TestFunction21/U::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0018: stloc.3 + IL_0019: ldloc.0 + IL_001a: ldfld int32 TestFunction21/U::item1 + IL_001f: stloc.s V_4 + IL_0021: ldloc.1 + IL_0022: ldfld int32 TestFunction21/U::item1 + IL_0027: stloc.s V_5 + .line 100001,100001 : 0,0 '' + IL_0029: ldloc.s V_4 + IL_002b: ldloc.s V_5 + IL_002d: bge.s IL_0033 .line 100001,100001 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_002f: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0030: nop + IL_0031: br.s IL_003a .line 100001,100001 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_0033: ldloc.s V_4 + IL_0035: ldloc.s V_5 + IL_0037: cgt .line 100001,100001 : 0,0 '' - IL_0038: nop + IL_0039: nop + .line 100001,100001 : 0,0 '' + IL_003a: stloc.2 .line 100001,100001 : 0,0 '' - IL_0039: stloc.2 - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_003b: ldloc.2 + IL_003c: ldc.i4.0 + IL_003d: bge.s IL_0041 .line 100001,100001 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_003f: ldloc.2 + IL_0040: ret .line 100001,100001 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_0041: ldloc.2 + IL_0042: ldc.i4.0 + IL_0043: ble.s IL_0047 .line 100001,100001 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_0045: ldloc.2 + IL_0046: ret .line 100001,100001 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.s V_6 - IL_004d: ldloc.0 - IL_004e: ldfld int32 TestFunction21/U::item2 - IL_0053: stloc.s V_7 - IL_0055: ldloc.1 - IL_0056: ldfld int32 TestFunction21/U::item2 - IL_005b: stloc.s V_8 - IL_005d: ldloc.s V_7 - IL_005f: ldloc.s V_8 - IL_0061: bge.s IL_0065 + IL_0047: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_004c: stloc.s V_6 + IL_004e: ldloc.0 + IL_004f: ldfld int32 TestFunction21/U::item2 + IL_0054: stloc.s V_7 + IL_0056: ldloc.1 + IL_0057: ldfld int32 TestFunction21/U::item2 + IL_005c: stloc.s V_8 + .line 100001,100001 : 0,0 '' + IL_005e: ldloc.s V_7 + IL_0060: ldloc.s V_8 + IL_0062: bge.s IL_0066 .line 100001,100001 : 0,0 '' - IL_0063: ldc.i4.m1 - IL_0064: ret + IL_0064: ldc.i4.m1 + IL_0065: ret .line 100001,100001 : 0,0 '' - IL_0065: ldloc.s V_7 - IL_0067: ldloc.s V_8 - IL_0069: cgt - IL_006b: ret + IL_0066: ldloc.s V_7 + IL_0068: ldloc.s V_8 + IL_006a: cgt + IL_006c: ret .line 100001,100001 : 0,0 '' - IL_006c: ldc.i4.1 - IL_006d: ret + IL_006d: ldc.i4.1 + IL_006e: ret .line 100001,100001 : 0,0 '' - IL_006e: ldarg.1 - IL_006f: ldnull - IL_0070: cgt.un - IL_0072: brfalse.s IL_0076 + IL_006f: ldarg.1 + IL_0070: ldnull + IL_0071: cgt.un + IL_0073: brfalse.s IL_0077 .line 100001,100001 : 0,0 '' - IL_0074: ldc.i4.m1 - IL_0075: ret + IL_0075: ldc.i4.m1 + IL_0076: ret .line 100001,100001 : 0,0 '' - IL_0076: ldc.i4.0 - IL_0077: ret + IL_0077: ldc.i4.0 + IL_0078: ret } // end of method U::CompareTo .method public hidebysig virtual final @@ -326,6 +331,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any TestFunction21/U IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -354,6 +360,7 @@ IL_0029: ldloc.2 IL_002a: ldfld int32 TestFunction21/U::item1 IL_002f: stloc.s V_6 + .line 100001,100001 : 0,0 '' IL_0031: ldloc.s V_5 IL_0033: ldloc.s V_6 IL_0035: bge.s IL_003b @@ -372,6 +379,7 @@ IL_0041: nop .line 100001,100001 : 0,0 '' IL_0042: stloc.3 + .line 100001,100001 : 0,0 '' IL_0043: ldloc.3 IL_0044: ldc.i4.0 IL_0045: bge.s IL_0049 @@ -398,6 +406,7 @@ IL_005a: ldloc.2 IL_005b: ldfld int32 TestFunction21/U::item2 IL_0060: stloc.s V_9 + .line 100001,100001 : 0,0 '' IL_0062: ldloc.s V_8 IL_0064: ldloc.s V_9 IL_0066: bge.s IL_006a @@ -436,64 +445,67 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 65 (0x41) .maxstack 7 .locals init ([0] int32 V_0, [1] class TestFunction21/U V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2, [3] class [mscorlib]System.Collections.IEqualityComparer V_3) + .line 4,4 : 6,7 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003e + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003f .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop + IL_0007: ldc.i4.0 + IL_0008: stloc.0 .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 TestFunction21/U::item2 - IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add + IL_0009: ldarg.0 + IL_000a: pop + .line 100001,100001 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldarg.1 + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldfld int32 TestFunction21/U::item2 + IL_001c: ldloc.0 + IL_001d: ldc.i4.6 + IL_001e: shl + IL_001f: ldloc.0 + IL_0020: ldc.i4.2 + IL_0021: shr IL_0022: add IL_0023: add - IL_0024: stloc.0 - IL_0025: ldc.i4 0x9e3779b9 - IL_002a: ldarg.1 - IL_002b: stloc.3 - IL_002c: ldloc.1 - IL_002d: ldfld int32 TestFunction21/U::item1 - IL_0032: ldloc.0 - IL_0033: ldc.i4.6 - IL_0034: shl - IL_0035: ldloc.0 - IL_0036: ldc.i4.2 - IL_0037: shr - IL_0038: add + IL_0024: add + IL_0025: stloc.0 + IL_0026: ldc.i4 0x9e3779b9 + IL_002b: ldarg.1 + IL_002c: stloc.3 + IL_002d: ldloc.1 + IL_002e: ldfld int32 TestFunction21/U::item1 + IL_0033: ldloc.0 + IL_0034: ldc.i4.6 + IL_0035: shl + IL_0036: ldloc.0 + IL_0037: ldc.i4.2 + IL_0038: shr IL_0039: add IL_003a: add - IL_003b: stloc.0 - IL_003c: ldloc.0 - IL_003d: ret + IL_003b: add + IL_003c: stloc.0 + IL_003d: ldloc.0 + IL_003e: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_003f: ldc.i4.0 + IL_0040: ret } // end of method U::GetHashCode .method public hidebysig virtual final @@ -514,7 +526,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 73 (0x49) + // Code size 74 (0x4a) .maxstack 4 .locals init ([0] class TestFunction21/U V_0, [1] class TestFunction21/U V_1, @@ -522,122 +534,130 @@ [3] class TestFunction21/U V_3, [4] class [mscorlib]System.Collections.IEqualityComparer V_4, [5] class [mscorlib]System.Collections.IEqualityComparer V_5) + .line 4,4 : 6,7 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0041 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0042 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst TestFunction21/U - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003f + IL_0007: ldarg.1 + IL_0008: isinst TestFunction21/U + IL_000d: stloc.0 + .line 100001,100001 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0040 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: pop + IL_0011: ldloc.0 + IL_0012: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 TestFunction21/U::item1 - IL_0021: ldloc.3 - IL_0022: ldfld int32 TestFunction21/U::item1 - IL_0027: ceq - IL_0029: brfalse.s IL_003d + IL_0013: ldarg.0 + IL_0014: pop + .line 100001,100001 : 0,0 '' + IL_0015: ldarg.0 + IL_0016: stloc.2 + IL_0017: ldloc.1 + IL_0018: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0019: ldarg.2 + IL_001a: stloc.s V_4 + IL_001c: ldloc.2 + IL_001d: ldfld int32 TestFunction21/U::item1 + IL_0022: ldloc.3 + IL_0023: ldfld int32 TestFunction21/U::item1 + IL_0028: ceq + IL_002a: brfalse.s IL_003e .line 100001,100001 : 0,0 '' - IL_002b: ldarg.2 - IL_002c: stloc.s V_5 - IL_002e: ldloc.2 - IL_002f: ldfld int32 TestFunction21/U::item2 - IL_0034: ldloc.3 - IL_0035: ldfld int32 TestFunction21/U::item2 - IL_003a: ceq - IL_003c: ret + IL_002c: ldarg.2 + IL_002d: stloc.s V_5 + IL_002f: ldloc.2 + IL_0030: ldfld int32 TestFunction21/U::item2 + IL_0035: ldloc.3 + IL_0036: ldfld int32 TestFunction21/U::item2 + IL_003b: ceq + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.0 - IL_003e: ret + IL_003e: ldc.i4.0 + IL_003f: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_0040: ldc.i4.0 + IL_0041: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: ldnull - IL_0043: cgt.un - IL_0045: ldc.i4.0 - IL_0046: ceq - IL_0048: ret + IL_0042: ldarg.1 + IL_0043: ldnull + IL_0044: cgt.un + IL_0046: ldc.i4.0 + IL_0047: ceq + IL_0049: ret } // end of method U::Equals .method public hidebysig virtual final instance bool Equals(class TestFunction21/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class TestFunction21/U V_0, [1] class TestFunction21/U V_1) + .line 4,4 : 6,7 '' + IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop + .line 100001,100001 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld int32 TestFunction21/U::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 TestFunction21/U::item1 - IL_001e: bne.un.s IL_002f + IL_0013: ldloc.0 + IL_0014: ldfld int32 TestFunction21/U::item1 + IL_0019: ldloc.1 + IL_001a: ldfld int32 TestFunction21/U::item1 + IL_001f: bne.un.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldfld int32 TestFunction21/U::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 TestFunction21/U::item2 - IL_002c: ceq - IL_002e: ret + IL_0021: ldloc.0 + IL_0022: ldfld int32 TestFunction21/U::item2 + IL_0027: ldloc.1 + IL_0028: ldfld int32 TestFunction21/U::item2 + IL_002d: ceq + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method U::Equals .method public hidebysig virtual final @@ -651,6 +671,7 @@ IL_0000: ldarg.1 IL_0001: isinst TestFunction21/U IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction24.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction24.il.bsl index 1063152863a..d946a530d89 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction24.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction24.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000748 Length: 0x00000228 } .module TestFunction24.exe -// MVID: {60B68B97-A643-4587-A745-0383978BB660} +// MVID: {611C52B3-A643-4587-A745-0383B3521C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06EA0000 +// Image base: 0x07110000 // =============== CLASS MEMBERS DECLARATION =================== @@ -141,7 +141,7 @@ instance int32 CompareTo(class TestFunction24/Point obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 108 (0x6c) + // Code size 109 (0x6d) .maxstack 4 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IComparer V_1, @@ -151,102 +151,107 @@ [5] int32 V_5, [6] int32 V_6) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction24.fs' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0062 + .line 4,4 : 6,11 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction24.fs' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0063 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0060 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0061 .line 16707566,16707566 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 TestFunction24/Point::x@ - IL_0018: stloc.2 - IL_0019: ldarg.1 - IL_001a: ldfld int32 TestFunction24/Point::x@ - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: bge.s IL_0028 + IL_000d: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0012: stloc.1 + IL_0013: ldarg.0 + IL_0014: ldfld int32 TestFunction24/Point::x@ + IL_0019: stloc.2 + IL_001a: ldarg.1 + IL_001b: ldfld int32 TestFunction24/Point::x@ + IL_0020: stloc.3 + .line 16707566,16707566 : 0,0 '' + IL_0021: ldloc.2 + IL_0022: ldloc.3 + IL_0023: bge.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0024: ldc.i4.m1 + IL_0025: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0025: nop - IL_0026: br.s IL_002d + IL_0026: nop + IL_0027: br.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.2 - IL_0029: ldloc.3 - IL_002a: cgt + IL_0029: ldloc.2 + IL_002a: ldloc.3 + IL_002b: cgt + .line 16707566,16707566 : 0,0 '' + IL_002d: nop .line 16707566,16707566 : 0,0 '' - IL_002c: nop + IL_002e: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_002d: stloc.0 - IL_002e: ldloc.0 - IL_002f: ldc.i4.0 - IL_0030: bge.s IL_0034 + IL_002f: ldloc.0 + IL_0030: ldc.i4.0 + IL_0031: bge.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.0 - IL_0033: ret + IL_0033: ldloc.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldloc.0 - IL_0035: ldc.i4.0 - IL_0036: ble.s IL_003a + IL_0035: ldloc.0 + IL_0036: ldc.i4.0 + IL_0037: ble.s IL_003b .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.0 - IL_0039: ret + IL_0039: ldloc.0 + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_003a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_003f: stloc.s V_4 - IL_0041: ldarg.0 - IL_0042: ldfld int32 TestFunction24/Point::y@ - IL_0047: stloc.s V_5 - IL_0049: ldarg.1 - IL_004a: ldfld int32 TestFunction24/Point::y@ - IL_004f: stloc.s V_6 - IL_0051: ldloc.s V_5 - IL_0053: ldloc.s V_6 - IL_0055: bge.s IL_0059 + IL_003b: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0040: stloc.s V_4 + IL_0042: ldarg.0 + IL_0043: ldfld int32 TestFunction24/Point::y@ + IL_0048: stloc.s V_5 + IL_004a: ldarg.1 + IL_004b: ldfld int32 TestFunction24/Point::y@ + IL_0050: stloc.s V_6 + .line 16707566,16707566 : 0,0 '' + IL_0052: ldloc.s V_5 + IL_0054: ldloc.s V_6 + IL_0056: bge.s IL_005a .line 16707566,16707566 : 0,0 '' - IL_0057: ldc.i4.m1 - IL_0058: ret + IL_0058: ldc.i4.m1 + IL_0059: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldloc.s V_5 - IL_005b: ldloc.s V_6 - IL_005d: cgt - IL_005f: ret + IL_005a: ldloc.s V_5 + IL_005c: ldloc.s V_6 + IL_005e: cgt + IL_0060: ret .line 16707566,16707566 : 0,0 '' - IL_0060: ldc.i4.1 - IL_0061: ret + IL_0061: ldc.i4.1 + IL_0062: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldarg.1 - IL_0063: ldnull - IL_0064: cgt.un - IL_0066: brfalse.s IL_006a + IL_0063: ldarg.1 + IL_0064: ldnull + IL_0065: cgt.un + IL_0067: brfalse.s IL_006b .line 16707566,16707566 : 0,0 '' - IL_0068: ldc.i4.m1 - IL_0069: ret + IL_0069: ldc.i4.m1 + IL_006a: ret .line 16707566,16707566 : 0,0 '' - IL_006a: ldc.i4.0 - IL_006b: ret + IL_006b: ldc.i4.0 + IL_006c: ret } // end of method Point::CompareTo .method public hidebysig virtual final @@ -285,6 +290,7 @@ IL_0006: stloc.0 IL_0007: ldloc.0 IL_0008: stloc.1 + .line 16707566,16707566 : 0,0 '' IL_0009: ldarg.0 IL_000a: ldnull IL_000b: cgt.un @@ -306,6 +312,7 @@ IL_0024: ldloc.1 IL_0025: ldfld int32 TestFunction24/Point::x@ IL_002a: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' IL_002c: ldloc.s V_4 IL_002e: ldloc.s V_5 IL_0030: bge.s IL_0036 @@ -324,6 +331,7 @@ IL_003c: nop .line 16707566,16707566 : 0,0 '' IL_003d: stloc.2 + .line 16707566,16707566 : 0,0 '' IL_003e: ldloc.2 IL_003f: ldc.i4.0 IL_0040: bge.s IL_0044 @@ -350,6 +358,7 @@ IL_0055: ldloc.1 IL_0056: ldfld int32 TestFunction24/Point::y@ IL_005b: stloc.s V_8 + .line 16707566,16707566 : 0,0 '' IL_005d: ldloc.s V_7 IL_005f: ldloc.s V_8 IL_0061: bge.s IL_0065 @@ -388,56 +397,58 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 58 (0x3a) + // Code size 59 (0x3b) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0038 - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: ldfld int32 TestFunction24/Point::y@ - IL_0015: ldloc.0 - IL_0016: ldc.i4.6 - IL_0017: shl - IL_0018: ldloc.0 - IL_0019: ldc.i4.2 - IL_001a: shr - IL_001b: add + .line 4,4 : 6,11 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0039 + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + IL_0009: ldc.i4 0x9e3779b9 + IL_000e: ldarg.1 + IL_000f: stloc.1 + IL_0010: ldarg.0 + IL_0011: ldfld int32 TestFunction24/Point::y@ + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl + IL_0019: ldloc.0 + IL_001a: ldc.i4.2 + IL_001b: shr IL_001c: add IL_001d: add - IL_001e: stloc.0 - IL_001f: ldc.i4 0x9e3779b9 - IL_0024: ldarg.1 - IL_0025: stloc.2 - IL_0026: ldarg.0 - IL_0027: ldfld int32 TestFunction24/Point::x@ - IL_002c: ldloc.0 - IL_002d: ldc.i4.6 - IL_002e: shl - IL_002f: ldloc.0 - IL_0030: ldc.i4.2 - IL_0031: shr - IL_0032: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: stloc.2 + IL_0027: ldarg.0 + IL_0028: ldfld int32 TestFunction24/Point::x@ + IL_002d: ldloc.0 + IL_002e: ldc.i4.6 + IL_002f: shl + IL_0030: ldloc.0 + IL_0031: ldc.i4.2 + IL_0032: shr IL_0033: add IL_0034: add - IL_0035: stloc.0 - IL_0036: ldloc.0 - IL_0037: ret + IL_0035: add + IL_0036: stloc.0 + IL_0037: ldloc.0 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_0038: ldc.i4.0 - IL_0039: ret + IL_0039: ldc.i4.0 + IL_003a: ret } // end of method Point::GetHashCode .method public hidebysig virtual final @@ -458,112 +469,118 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 65 (0x41) + // Code size 66 (0x42) .maxstack 4 .locals init ([0] class TestFunction24/Point V_0, [1] class TestFunction24/Point V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2, [3] class [mscorlib]System.Collections.IEqualityComparer V_3) + .line 4,4 : 6,11 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0039 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst TestFunction24/Point - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0037 + IL_0007: ldarg.1 + IL_0008: isinst TestFunction24/Point + IL_000d: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0038 .line 16707566,16707566 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.2 - IL_0013: stloc.2 - IL_0014: ldarg.0 - IL_0015: ldfld int32 TestFunction24/Point::x@ - IL_001a: ldloc.1 - IL_001b: ldfld int32 TestFunction24/Point::x@ - IL_0020: ceq - IL_0022: brfalse.s IL_0035 + IL_0011: ldloc.0 + IL_0012: stloc.1 + .line 16707566,16707566 : 0,0 '' + IL_0013: ldarg.2 + IL_0014: stloc.2 + IL_0015: ldarg.0 + IL_0016: ldfld int32 TestFunction24/Point::x@ + IL_001b: ldloc.1 + IL_001c: ldfld int32 TestFunction24/Point::x@ + IL_0021: ceq + IL_0023: brfalse.s IL_0036 .line 16707566,16707566 : 0,0 '' - IL_0024: ldarg.2 - IL_0025: stloc.3 - IL_0026: ldarg.0 - IL_0027: ldfld int32 TestFunction24/Point::y@ - IL_002c: ldloc.1 - IL_002d: ldfld int32 TestFunction24/Point::y@ - IL_0032: ceq - IL_0034: ret + IL_0025: ldarg.2 + IL_0026: stloc.3 + IL_0027: ldarg.0 + IL_0028: ldfld int32 TestFunction24/Point::y@ + IL_002d: ldloc.1 + IL_002e: ldfld int32 TestFunction24/Point::y@ + IL_0033: ceq + IL_0035: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0036: ldc.i4.0 + IL_0037: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_0038: ldc.i4.0 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldarg.1 - IL_003a: ldnull - IL_003b: cgt.un - IL_003d: ldc.i4.0 - IL_003e: ceq - IL_0040: ret + IL_003a: ldarg.1 + IL_003b: ldnull + IL_003c: cgt.un + IL_003e: ldc.i4.0 + IL_003f: ceq + IL_0041: ret } // end of method Point::Equals .method public hidebysig virtual final instance bool Equals(class TestFunction24/Point obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 54 (0x36) .maxstack 8 + .line 4,4 : 6,11 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002d + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_002b + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 TestFunction24/Point::x@ - IL_0012: ldarg.1 - IL_0013: ldfld int32 TestFunction24/Point::x@ - IL_0018: bne.un.s IL_0029 + IL_000d: ldarg.0 + IL_000e: ldfld int32 TestFunction24/Point::x@ + IL_0013: ldarg.1 + IL_0014: ldfld int32 TestFunction24/Point::x@ + IL_0019: bne.un.s IL_002a .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: ldfld int32 TestFunction24/Point::y@ - IL_0020: ldarg.1 - IL_0021: ldfld int32 TestFunction24/Point::y@ - IL_0026: ceq - IL_0028: ret + IL_001b: ldarg.0 + IL_001c: ldfld int32 TestFunction24/Point::y@ + IL_0021: ldarg.1 + IL_0022: ldfld int32 TestFunction24/Point::y@ + IL_0027: ceq + IL_0029: ret .line 16707566,16707566 : 0,0 '' - IL_0029: ldc.i4.0 - IL_002a: ret + IL_002a: ldc.i4.0 + IL_002b: ret .line 16707566,16707566 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldarg.1 - IL_002e: ldnull - IL_002f: cgt.un - IL_0031: ldc.i4.0 - IL_0032: ceq - IL_0034: ret + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: cgt.un + IL_0032: ldc.i4.0 + IL_0033: ceq + IL_0035: ret } // end of method Point::Equals .method public hidebysig virtual final @@ -577,6 +594,7 @@ IL_0000: ldarg.1 IL_0001: isinst TestFunction24/Point IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 @@ -728,6 +746,7 @@ .line 18,18 : 5,23 '' IL_0067: ldloc.0 IL_0068: stloc.2 + .line 16707566,16707566 : 0,0 '' IL_0069: ldloc.2 IL_006a: brfalse.s IL_0086 @@ -880,6 +899,7 @@ .line 30,30 : 5,26 '' IL_0006: ldloc.0 IL_0007: stloc.2 + .line 16707566,16707566 : 0,0 '' IL_0008: ldloc.2 IL_0009: brfalse.s IL_0016 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3b.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3b.il.bsl index 89eb0540914..605bb5ca37b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3b.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3b.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000200 Length: 0x0000008A } .module TestFunction3b.exe -// MVID: {60BD473A-A662-4FC9-A745-03833A47BD60} +// MVID: {611C4D9E-A662-4FC9-A745-03839E4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x059B0000 +// Image base: 0x053D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -75,53 +75,56 @@ .method public static void TestFunction3b() cil managed { - // Code size 65 (0x41) + // Code size 66 (0x42) .maxstack 3 .locals init ([0] int32 x, [1] string V_1, [2] class [mscorlib]System.Exception V_2, [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_3) - .line 11,11 : 8,31 '' + .line 10,10 : 5,8 '' .try { - IL_0000: call int32 TestFunction3b::TestFunction1() - IL_0005: stloc.0 + IL_0000: nop + .line 11,11 : 8,31 '' + IL_0001: call int32 TestFunction3b::TestFunction1() + IL_0006: stloc.0 .line 12,12 : 8,24 '' - IL_0006: ldstr "hello" - IL_000b: stloc.1 - IL_000c: ldloc.1 - IL_000d: call class [mscorlib]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) - IL_0012: throw + IL_0007: ldstr "hello" + IL_000c: stloc.1 + IL_000d: ldloc.1 + IL_000e: call class [mscorlib]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) + IL_0013: throw .line 13,13 : 5,9 '' } // end .try catch [mscorlib]System.Object { - IL_0013: castclass [mscorlib]System.Exception - IL_0018: stloc.2 - IL_0019: ldloc.2 - IL_001a: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [mscorlib]System.Exception) - IL_001f: stloc.3 - IL_0020: ldloc.3 - IL_0021: brfalse.s IL_0035 + IL_0014: castclass [mscorlib]System.Exception + IL_0019: stloc.2 + IL_001a: ldloc.2 + IL_001b: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [mscorlib]System.Exception) + IL_0020: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0021: ldloc.3 + IL_0022: brfalse.s IL_0036 .line 14,14 : 8,23 '' - IL_0023: ldstr "World" - IL_0028: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_002d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0032: pop - IL_0033: leave.s IL_0040 + IL_0024: ldstr "World" + IL_0029: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_002e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0033: pop + IL_0034: leave.s IL_0041 .line 100001,100001 : 0,0 '' - IL_0035: rethrow - IL_0037: ldnull - IL_0038: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_003d: pop - IL_003e: leave.s IL_0040 + IL_0036: rethrow + IL_0038: ldnull + IL_0039: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_003e: pop + IL_003f: leave.s IL_0041 .line 100001,100001 : 0,0 '' } // end handler - IL_0040: ret + IL_0041: ret } // end of method TestFunction3b::TestFunction3b } // end of class TestFunction3b diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3c.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3c.il.bsl index b30fe1df232..66623938655 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3c.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3c.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x00000200 Length: 0x0000008A } .module TestFunction3c.exe -// MVID: {60BD4158-A662-4FAC-A745-03835841BD60} +// MVID: {611C4D9E-A662-4FAC-A745-03839E4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06570000 +// Image base: 0x06740000 // =============== CLASS MEMBERS DECLARATION =================== @@ -80,7 +80,7 @@ .method public static void TestFunction3c() cil managed { - // Code size 95 (0x5f) + // Code size 97 (0x61) .maxstack 4 .locals init ([0] int32 x, [1] string V_1, @@ -88,59 +88,66 @@ [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_3, [4] string msg, [5] string V_5) - .line 11,11 : 8,31 '' + .line 10,10 : 5,8 '' .try { - IL_0000: call int32 TestFunction3c::TestFunction1() - IL_0005: stloc.0 + IL_0000: nop + .line 11,11 : 8,31 '' + IL_0001: call int32 TestFunction3c::TestFunction1() + IL_0006: stloc.0 .line 12,12 : 8,24 '' - IL_0006: ldstr "hello" - IL_000b: stloc.1 - IL_000c: ldloc.1 - IL_000d: call class [mscorlib]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) - IL_0012: throw + IL_0007: ldstr "hello" + IL_000c: stloc.1 + IL_000d: ldloc.1 + IL_000e: call class [mscorlib]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) + IL_0013: throw .line 13,13 : 5,9 '' } // end .try catch [mscorlib]System.Object { - IL_0013: castclass [mscorlib]System.Exception - IL_0018: stloc.2 - IL_0019: ldloc.2 - IL_001a: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [mscorlib]System.Exception) - IL_001f: stloc.3 - IL_0020: ldloc.3 - IL_0021: brfalse.s IL_0053 - - IL_0023: ldloc.3 - IL_0024: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() - IL_0029: stloc.s msg - IL_002b: ldloc.s msg - IL_002d: ldstr "hello" - IL_0032: call bool [netstandard]System.String::Equals(string, + IL_0014: castclass [mscorlib]System.Exception + IL_0019: stloc.2 + IL_001a: ldloc.2 + IL_001b: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::FailurePattern(class [mscorlib]System.Exception) + IL_0020: stloc.3 + .line 100001,100001 : 0,0 '' + IL_0021: ldloc.3 + IL_0022: brfalse.s IL_0055 + + .line 13,13 : 27,40 '' + IL_0024: nop + .line 100001,100001 : 0,0 '' + IL_0025: ldloc.3 + IL_0026: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() + IL_002b: stloc.s msg + IL_002d: ldloc.s msg + IL_002f: ldstr "hello" + IL_0034: call bool [netstandard]System.String::Equals(string, string) - IL_0037: brfalse.s IL_0053 + IL_0039: brfalse.s IL_0055 - IL_0039: ldloc.3 - IL_003a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() - IL_003f: stloc.s V_5 + .line 100001,100001 : 0,0 '' + IL_003b: ldloc.3 + IL_003c: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() + IL_0041: stloc.s V_5 .line 14,14 : 8,23 '' - IL_0041: ldstr "World" - IL_0046: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_004b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0050: pop - IL_0051: leave.s IL_005e + IL_0043: ldstr "World" + IL_0048: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_004d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0052: pop + IL_0053: leave.s IL_0060 .line 100001,100001 : 0,0 '' - IL_0053: rethrow - IL_0055: ldnull - IL_0056: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_005b: pop - IL_005c: leave.s IL_005e + IL_0055: rethrow + IL_0057: ldnull + IL_0058: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_005d: pop + IL_005e: leave.s IL_0060 .line 100001,100001 : 0,0 '' } // end handler - IL_005e: ret + IL_0060: ret } // end of method TestFunction3c::TestFunction3c } // end of class TestFunction3c diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction9b4.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction9b4.il.bsl index 3c3c35b89af..1aede1f2c26 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction9b4.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction9b4.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000248 Length: 0x00000085 } .module TestFunction9b4.exe -// MVID: {60B68B97-A091-56C1-A745-0383978BB660} +// MVID: {611C4D9E-A091-56C1-A745-03839E4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06CC0000 +// Image base: 0x07100000 // =============== CLASS MEMBERS DECLARATION =================== @@ -90,33 +90,35 @@ .method public static void main@() cil managed { .entrypoint - // Code size 42 (0x2a) + // Code size 43 (0x2b) .maxstack 3 .locals init ([0] int32 x) .line 10,10 : 1,10 '' IL_0000: call int32 TestFunction9b4::get_x() IL_0005: stloc.0 .line 12,12 : 1,17 '' - IL_0006: call int32 TestFunction9b4::get_x() - IL_000b: box [mscorlib]System.Int32 - IL_0010: brfalse.s IL_0014 + IL_0006: nop + .line 100001,100001 : 0,0 '' + IL_0007: call int32 TestFunction9b4::get_x() + IL_000c: box [mscorlib]System.Int32 + IL_0011: brfalse.s IL_0015 - IL_0012: br.s IL_0027 + IL_0013: br.s IL_0028 .line 13,13 : 13,30 '' - IL_0014: ldstr "Is null" - IL_0019: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_001e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0023: pop + IL_0015: ldstr "Is null" + IL_001a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0024: pop .line 100001,100001 : 0,0 '' - IL_0024: nop - IL_0025: br.s IL_0029 + IL_0025: nop + IL_0026: br.s IL_002a .line 14,14 : 10,12 '' - IL_0027: nop - .line 100001,100001 : 0,0 '' IL_0028: nop - IL_0029: ret + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: ret } // end of method $TestFunction9b4::main@ } // end of class ''.$TestFunction9b4 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22f.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22f.il.bsl index 1e52b731760..1d17863b463 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22f.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22f.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x00000160 Length: 0x00000056 } .module Testfunction22f.exe -// MVID: {60B68B97-C040-2523-A745-0383978BB660} +// MVID: {611C4D9E-C040-2523-A745-03839E4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06DC0000 +// Image base: 0x04D20000 // =============== CLASS MEMBERS DECLARATION =================== @@ -75,6 +75,7 @@ .line 3,3 : 1,15 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\Testfunction22f.fs' IL_0000: ldstr "A" IL_0005: stloc.0 + .line 100001,100001 : 0,0 '' IL_0006: ldloc.0 IL_0007: ldstr "A" IL_000c: call bool [netstandard]System.String::Equals(string, diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22g.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22g.il.bsl index 9553805a4c2..67305e6544f 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22g.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22g.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000160 Length: 0x00000056 } .module Testfunction22g.exe -// MVID: {60B68B97-CA89-74DB-A745-0383978BB660} +// MVID: {611C4D9E-CA89-74DB-A745-03839E4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06FA0000 +// Image base: 0x04D30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -63,24 +63,26 @@ .method public static void main@() cil managed { .entrypoint - // Code size 18 (0x12) + // Code size 19 (0x13) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 3,3 : 1,13 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\Testfunction22g.fs' - IL_0000: ldc.i4.1 - IL_0001: brfalse.s IL_000b + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldc.i4.1 + IL_0002: brfalse.s IL_000c .line 3,3 : 14,40 '' - IL_0003: call void [mscorlib]System.Console::WriteLine() + IL_0004: call void [mscorlib]System.Console::WriteLine() .line 100001,100001 : 0,0 '' - IL_0008: nop - IL_0009: br.s IL_0011 + IL_0009: nop + IL_000a: br.s IL_0012 .line 3,3 : 46,72 '' - IL_000b: call void [mscorlib]System.Console::WriteLine() + IL_000c: call void [mscorlib]System.Console::WriteLine() .line 100001,100001 : 0,0 '' - IL_0010: nop - IL_0011: ret + IL_0011: nop + IL_0012: ret } // end of method $Testfunction22g::main@ } // end of class ''.$Testfunction22g diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22h.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22h.il.bsl index 467c0972190..48655e7bedf 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22h.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22h.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000160 Length: 0x00000056 } .module Testfunction22h.exe -// MVID: {60BD4158-0266-39F6-A745-03835841BD60} +// MVID: {611C4D9E-0266-39F6-A745-03839E4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07240000 +// Image base: 0x066F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -63,29 +63,31 @@ .method public static void main@() cil managed { .entrypoint - // Code size 21 (0x15) + // Code size 22 (0x16) .maxstack 3 .locals init ([0] class [mscorlib]System.Exception V_0) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 4,4 : 4,30 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\Testfunction22h.fs' + .line 3,3 : 1,4 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\Testfunction22h.fs' .try { - IL_0000: call void [mscorlib]System.Console::WriteLine() - IL_0005: leave.s IL_0014 + IL_0000: nop + .line 4,4 : 4,30 '' + IL_0001: call void [mscorlib]System.Console::WriteLine() + IL_0006: leave.s IL_0015 .line 5,5 : 1,5 '' } // end .try catch [mscorlib]System.Object { - IL_0007: castclass [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0008: castclass [mscorlib]System.Exception + IL_000d: stloc.0 .line 6,6 : 11,37 '' - IL_000d: call void [mscorlib]System.Console::WriteLine() - IL_0012: leave.s IL_0014 + IL_000e: call void [mscorlib]System.Console::WriteLine() + IL_0013: leave.s IL_0015 .line 100001,100001 : 0,0 '' } // end handler - IL_0014: ret + IL_0015: ret } // end of method $Testfunction22h::main@ } // end of class ''.$Testfunction22h diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction3.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction3.il.bsl index fe0c97e48f3..35c8295e14c 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction3.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction3.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000200 Length: 0x00000088 } .module TestFunction3.exe -// MVID: {60BD4158-663A-8929-A745-03835841BD60} +// MVID: {611C4D9E-663A-8929-A745-03839E4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x050D0000 +// Image base: 0x07360000 // =============== CLASS MEMBERS DECLARATION =================== @@ -75,38 +75,40 @@ .method public static void TestFunction3() cil managed { - // Code size 49 (0x31) + // Code size 50 (0x32) .maxstack 3 .locals init ([0] int32 x, [1] class [mscorlib]System.Exception V_1) - .line 11,11 : 8,31 '' + .line 10,10 : 5,8 '' .try { - IL_0000: call int32 TestFunction3::TestFunction1() - IL_0005: stloc.0 + IL_0000: nop + .line 11,11 : 8,31 '' + IL_0001: call int32 TestFunction3::TestFunction1() + IL_0006: stloc.0 .line 12,12 : 8,23 '' - IL_0006: ldstr "Hello" - IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0010: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0015: pop - IL_0016: leave.s IL_0030 + IL_0007: ldstr "Hello" + IL_000c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0016: pop + IL_0017: leave.s IL_0031 .line 13,13 : 5,9 '' } // end .try catch [mscorlib]System.Object { - IL_0018: castclass [mscorlib]System.Exception - IL_001d: stloc.1 + IL_0019: castclass [mscorlib]System.Exception + IL_001e: stloc.1 .line 14,14 : 8,23 '' - IL_001e: ldstr "World" - IL_0023: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0028: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_002d: pop - IL_002e: leave.s IL_0030 + IL_001f: ldstr "World" + IL_0024: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0029: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002e: pop + IL_002f: leave.s IL_0031 .line 100001,100001 : 0,0 '' } // end handler - IL_0030: ret + IL_0031: ret } // end of method TestFunction3::TestFunction3 } // end of class TestFunction3 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction4.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction4.il.bsl index 799c175fb43..d2e49c8e9de 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction4.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction4.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000200 Length: 0x00000088 } .module TestFunction4.exe -// MVID: {60BD4158-665B-8929-A745-03835841BD60} +// MVID: {611C4D9E-665B-8929-A745-03839E4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04B90000 +// Image base: 0x067E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -75,35 +75,37 @@ .method public static void TestFunction4() cil managed { - // Code size 43 (0x2b) + // Code size 44 (0x2c) .maxstack 3 .locals init ([0] int32 x) - .line 11,11 : 8,31 '' + .line 10,10 : 5,8 '' .try { - IL_0000: call int32 TestFunction4::TestFunction1() - IL_0005: stloc.0 + IL_0000: nop + .line 11,11 : 8,31 '' + IL_0001: call int32 TestFunction4::TestFunction1() + IL_0006: stloc.0 .line 12,12 : 8,23 '' - IL_0006: ldstr "Hello" - IL_000b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0010: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0015: pop - IL_0016: leave.s IL_002a + IL_0007: ldstr "Hello" + IL_000c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0011: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0016: pop + IL_0017: leave.s IL_002b .line 13,13 : 5,12 '' } // end .try finally { - IL_0018: nop + IL_0019: nop .line 14,14 : 8,23 '' - IL_0019: ldstr "World" - IL_001e: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0023: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0028: pop - IL_0029: endfinally + IL_001a: ldstr "World" + IL_001f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0024: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0029: pop + IL_002a: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_002a: ret + IL_002b: ret } // end of method TestFunction4::TestFunction4 } // end of class TestFunction4 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction8.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction8.il.bsl index 75cd37c6650..4cb5c39cf67 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction8.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction8.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000001C8 Length: 0x00000070 } .module TestFunction8.exe -// MVID: {60B68B97-65CF-8929-A745-0383978BB660} +// MVID: {611C4D9E-65CF-8929-A745-03839E4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07330000 +// Image base: 0x06DC0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -53,25 +53,27 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) .method public static int32 TestFunction8(int32 x) cil managed { - // Code size 12 (0xc) + // Code size 13 (0xd) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 5,5 : 5,18 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction8.fs' - IL_0000: ldarg.0 - IL_0001: ldc.i4.3 - IL_0002: ble.s IL_0008 + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldc.i4.3 + IL_0003: ble.s IL_0009 .line 6,6 : 9,12 '' - IL_0004: ldarg.0 - IL_0005: ldc.i4.4 - IL_0006: add - IL_0007: ret + IL_0005: ldarg.0 + IL_0006: ldc.i4.4 + IL_0007: add + IL_0008: ret .line 7,7 : 10,13 '' - IL_0008: ldarg.0 - IL_0009: ldc.i4.4 - IL_000a: sub - IL_000b: ret + IL_0009: ldarg.0 + IL_000a: ldc.i4.4 + IL_000b: sub + IL_000c: ret } // end of method TestFunction8::TestFunction8 } // end of class TestFunction8 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9.il.bsl index aa1372d9a4d..85f0521e674 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000001D8 Length: 0x00000070 } .module TestFunction9.exe -// MVID: {60B68B97-64F4-8929-A745-0383978BB660} +// MVID: {611C4D9E-64F4-8929-A745-03839E4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B70000 +// Image base: 0x05890000 // =============== CLASS MEMBERS DECLARATION =================== @@ -53,29 +53,31 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) .method public static string TestFunction9(int32 x) cil managed { - // Code size 36 (0x24) + // Code size 37 (0x25) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 5,5 : 5,17 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction9.fs' - IL_0000: ldarg.0 - IL_0001: ldc.i4.3 - IL_0002: sub - IL_0003: switch ( - IL_0012, - IL_0018) - IL_0010: br.s IL_001e + IL_0000: nop + .line 100001,100001 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldc.i4.3 + IL_0003: sub + IL_0004: switch ( + IL_0013, + IL_0019) + IL_0011: br.s IL_001f .line 6,6 : 12,19 '' - IL_0012: ldstr "three" - IL_0017: ret + IL_0013: ldstr "three" + IL_0018: ret .line 7,7 : 12,18 '' - IL_0018: ldstr "four" - IL_001d: ret + IL_0019: ldstr "four" + IL_001e: ret .line 8,8 : 12,18 '' - IL_001e: ldstr "five" - IL_0023: ret + IL_001f: ldstr "five" + IL_0024: ret } // end of method TestFunction9::TestFunction9 } // end of class TestFunction9 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b.il.bsl index 49d2757735a..f9085d417db 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000001F8 Length: 0x00000072 } .module TestFunction9b.exe -// MVID: {60B68B97-A52C-4FC9-A745-0383978BB660} +// MVID: {611C4D9E-A52C-4FC9-A745-03839E4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00DB0000 +// Image base: 0x06EC0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -53,7 +53,7 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) .method public static string TestFunction9b(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 x) cil managed { - // Code size 409 (0x199) + // Code size 412 (0x19c) .maxstack 4 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -72,166 +72,190 @@ .line 5,5 : 5,17 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction9b.fs' IL_0000: ldarg.0 IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' IL_0002: ldloc.0 IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0008: brfalse IL_0193 + IL_0008: brfalse IL_0196 IL_000d: ldloc.0 IL_000e: stloc.1 + .line 100001,100001 : 0,0 '' IL_000f: ldloc.1 IL_0010: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0015: ldc.i4.1 IL_0016: sub IL_0017: switch ( - IL_00fd) + IL_00ff) + .line 100001,100001 : 0,0 '' IL_0020: ldloc.1 IL_0021: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0026: ldc.i4.3 IL_0027: sub IL_0028: switch ( - IL_0078) + IL_0079) + .line 100001,100001 : 0,0 '' IL_0031: ldloc.1 IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0037: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003c: brfalse IL_0193 + IL_003c: brfalse IL_0196 IL_0041: ldloc.1 IL_0042: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0047: stloc.2 + .line 100001,100001 : 0,0 '' IL_0048: ldloc.2 IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_004e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0053: brtrue IL_0193 - - IL_0058: ldloc.2 - IL_0059: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_005e: stloc.3 - IL_005f: ldloc.1 - IL_0060: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0065: stloc.s a - IL_0067: ldloc.s a - IL_0069: ldloc.3 - IL_006a: add - IL_006b: ldc.i4.4 - IL_006c: ceq - IL_006e: brfalse IL_0193 - - IL_0073: br IL_017d - - IL_0078: ldloc.1 - IL_0079: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_007e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0083: brfalse IL_0193 - - IL_0088: ldloc.1 - IL_0089: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_008e: stloc.s V_7 - IL_0090: ldloc.s V_7 - IL_0092: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0097: ldc.i4.4 - IL_0098: sub - IL_0099: switch ( - IL_00e7) - IL_00a2: ldloc.s V_7 - IL_00a4: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00a9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00ae: brtrue IL_0193 - - IL_00b3: ldloc.s V_7 - IL_00b5: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00ba: stloc.s V_8 - IL_00bc: ldloc.1 - IL_00bd: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00c2: stloc.s V_9 - IL_00c4: ldloc.s V_9 - IL_00c6: ldloc.s V_8 - IL_00c8: add - IL_00c9: ldc.i4.4 - IL_00ca: ceq - IL_00cc: brfalse IL_0193 - - IL_00d1: ldloc.s V_7 - IL_00d3: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00d8: ldloc.1 - IL_00d9: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00de: stloc.s V_6 - IL_00e0: stloc.s V_5 - IL_00e2: br IL_018d - - IL_00e7: ldloc.s V_7 - IL_00e9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00ee: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00f3: brtrue IL_0193 - - IL_00f8: br IL_0177 - - IL_00fd: ldloc.1 - IL_00fe: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0103: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0108: brfalse IL_0193 - - IL_010d: ldloc.1 - IL_010e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0113: stloc.s V_10 - IL_0115: ldloc.s V_10 - IL_0117: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_011c: ldc.i4.2 - IL_011d: sub - IL_011e: switch ( - IL_0163) - IL_0127: ldloc.s V_10 - IL_0129: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_012e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0133: brtrue.s IL_0193 - - IL_0135: ldloc.s V_10 - IL_0137: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_013c: stloc.s V_11 - IL_013e: ldloc.1 - IL_013f: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0144: stloc.s V_12 - IL_0146: ldloc.s V_12 - IL_0148: ldloc.s V_11 - IL_014a: add - IL_014b: ldc.i4.4 - IL_014c: ceq - IL_014e: brfalse.s IL_0193 - - IL_0150: ldloc.s V_10 - IL_0152: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0157: ldloc.1 - IL_0158: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_015d: stloc.s V_6 - IL_015f: stloc.s V_5 - IL_0161: br.s IL_018d - - IL_0163: ldloc.s V_10 - IL_0165: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_016a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_016f: brtrue.s IL_0193 + IL_0053: brtrue IL_0196 + + .line 8,8 : 18,25 '' + IL_0058: nop + .line 100001,100001 : 0,0 '' + IL_0059: ldloc.2 + IL_005a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_005f: stloc.3 + IL_0060: ldloc.1 + IL_0061: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0066: stloc.s a + IL_0068: ldloc.s a + IL_006a: ldloc.3 + IL_006b: add + IL_006c: ldc.i4.4 + IL_006d: ceq + IL_006f: brfalse IL_0196 + + IL_0074: br IL_0180 + + .line 100001,100001 : 0,0 '' + IL_0079: ldloc.1 + IL_007a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_007f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0084: brfalse IL_0196 + + IL_0089: ldloc.1 + IL_008a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_008f: stloc.s V_7 + .line 100001,100001 : 0,0 '' + IL_0091: ldloc.s V_7 + IL_0093: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0098: ldc.i4.4 + IL_0099: sub + IL_009a: switch ( + IL_00e9) + .line 100001,100001 : 0,0 '' + IL_00a3: ldloc.s V_7 + IL_00a5: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00aa: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00af: brtrue IL_0196 + + .line 8,8 : 18,25 '' + IL_00b4: nop + .line 100001,100001 : 0,0 '' + IL_00b5: ldloc.s V_7 + IL_00b7: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00bc: stloc.s V_8 + IL_00be: ldloc.1 + IL_00bf: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00c4: stloc.s V_9 + IL_00c6: ldloc.s V_9 + IL_00c8: ldloc.s V_8 + IL_00ca: add + IL_00cb: ldc.i4.4 + IL_00cc: ceq + IL_00ce: brfalse IL_0196 + + .line 100001,100001 : 0,0 '' + IL_00d3: ldloc.s V_7 + IL_00d5: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00da: ldloc.1 + IL_00db: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00e0: stloc.s V_6 + IL_00e2: stloc.s V_5 + IL_00e4: br IL_0190 + + .line 100001,100001 : 0,0 '' + IL_00e9: ldloc.s V_7 + IL_00eb: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00f0: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00f5: brtrue IL_0196 + + IL_00fa: br IL_017a + + .line 100001,100001 : 0,0 '' + IL_00ff: ldloc.1 + IL_0100: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0105: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_010a: brfalse IL_0196 + + IL_010f: ldloc.1 + IL_0110: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0115: stloc.s V_10 + .line 100001,100001 : 0,0 '' + IL_0117: ldloc.s V_10 + IL_0119: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_011e: ldc.i4.2 + IL_011f: sub + IL_0120: switch ( + IL_0166) + .line 100001,100001 : 0,0 '' + IL_0129: ldloc.s V_10 + IL_012b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0130: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0135: brtrue.s IL_0196 + + .line 8,8 : 18,25 '' + IL_0137: nop + .line 100001,100001 : 0,0 '' + IL_0138: ldloc.s V_10 + IL_013a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_013f: stloc.s V_11 + IL_0141: ldloc.1 + IL_0142: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0147: stloc.s V_12 + IL_0149: ldloc.s V_12 + IL_014b: ldloc.s V_11 + IL_014d: add + IL_014e: ldc.i4.4 + IL_014f: ceq + IL_0151: brfalse.s IL_0196 + + .line 100001,100001 : 0,0 '' + IL_0153: ldloc.s V_10 + IL_0155: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_015a: ldloc.1 + IL_015b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0160: stloc.s V_6 + IL_0162: stloc.s V_5 + IL_0164: br.s IL_0190 + + .line 100001,100001 : 0,0 '' + IL_0166: ldloc.s V_10 + IL_0168: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_016d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0172: brtrue.s IL_0196 .line 6,6 : 16,23 '' - IL_0171: ldstr "three" - IL_0176: ret + IL_0174: ldstr "three" + IL_0179: ret .line 7,7 : 16,23 '' - IL_0177: ldstr "seven" - IL_017c: ret - - .line 5,5 : 5,17 '' - IL_017d: ldloc.2 - IL_017e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0183: stloc.s V_5 - IL_0185: ldloc.1 - IL_0186: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_018b: stloc.s V_6 + IL_017a: ldstr "seven" + IL_017f: ret + + .line 100001,100001 : 0,0 '' + IL_0180: ldloc.2 + IL_0181: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0186: stloc.s V_5 + IL_0188: ldloc.1 + IL_0189: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_018e: stloc.s V_6 .line 8,8 : 29,35 '' - IL_018d: ldstr "four" - IL_0192: ret + IL_0190: ldstr "four" + IL_0195: ret .line 9,9 : 12,17 '' - IL_0193: ldstr "big" - IL_0198: ret + IL_0196: ldstr "big" + IL_019b: ret } // end of method TestFunction9b::TestFunction9b } // end of class TestFunction9b diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b1.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b1.il.bsl index 03e2dd29718..1c6f085474a 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b1.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b1.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000208 Length: 0x00000083 } .module TestFunction9b1.exe -// MVID: {60B68B97-A406-DAF4-A745-0383978BB660} +// MVID: {611C4D9E-A406-DAF4-A745-03839E4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x072C0000 +// Image base: 0x052D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -53,7 +53,7 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) .method public static string TestFunction9b(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 x) cil managed { - // Code size 409 (0x199) + // Code size 412 (0x19c) .maxstack 4 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -72,166 +72,190 @@ .line 5,5 : 5,17 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction9b1.fs' IL_0000: ldarg.0 IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' IL_0002: ldloc.0 IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0008: brfalse IL_0193 + IL_0008: brfalse IL_0196 IL_000d: ldloc.0 IL_000e: stloc.1 + .line 100001,100001 : 0,0 '' IL_000f: ldloc.1 IL_0010: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0015: ldc.i4.1 IL_0016: sub IL_0017: switch ( - IL_00fd) + IL_00ff) + .line 100001,100001 : 0,0 '' IL_0020: ldloc.1 IL_0021: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0026: ldc.i4.3 IL_0027: sub IL_0028: switch ( - IL_0078) + IL_0079) + .line 100001,100001 : 0,0 '' IL_0031: ldloc.1 IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0037: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003c: brfalse IL_0193 + IL_003c: brfalse IL_0196 IL_0041: ldloc.1 IL_0042: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0047: stloc.2 + .line 100001,100001 : 0,0 '' IL_0048: ldloc.2 IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_004e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0053: brtrue IL_0193 - - IL_0058: ldloc.2 - IL_0059: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_005e: stloc.3 - IL_005f: ldloc.1 - IL_0060: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0065: stloc.s a - IL_0067: ldloc.s a - IL_0069: ldloc.3 - IL_006a: add - IL_006b: ldc.i4.4 - IL_006c: ceq - IL_006e: brfalse IL_0193 - - IL_0073: br IL_017d - - IL_0078: ldloc.1 - IL_0079: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_007e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0083: brfalse IL_0193 - - IL_0088: ldloc.1 - IL_0089: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_008e: stloc.s V_7 - IL_0090: ldloc.s V_7 - IL_0092: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0097: ldc.i4.4 - IL_0098: sub - IL_0099: switch ( - IL_00e7) - IL_00a2: ldloc.s V_7 - IL_00a4: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00a9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00ae: brtrue IL_0193 - - IL_00b3: ldloc.s V_7 - IL_00b5: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00ba: stloc.s V_8 - IL_00bc: ldloc.1 - IL_00bd: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00c2: stloc.s V_9 - IL_00c4: ldloc.s V_9 - IL_00c6: ldloc.s V_8 - IL_00c8: add - IL_00c9: ldc.i4.4 - IL_00ca: ceq - IL_00cc: brfalse IL_0193 - - IL_00d1: ldloc.s V_7 - IL_00d3: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00d8: ldloc.1 - IL_00d9: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00de: stloc.s V_6 - IL_00e0: stloc.s V_5 - IL_00e2: br IL_018d - - IL_00e7: ldloc.s V_7 - IL_00e9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00ee: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00f3: brtrue IL_0193 - - IL_00f8: br IL_0177 - - IL_00fd: ldloc.1 - IL_00fe: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0103: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0108: brfalse IL_0193 - - IL_010d: ldloc.1 - IL_010e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0113: stloc.s V_10 - IL_0115: ldloc.s V_10 - IL_0117: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_011c: ldc.i4.2 - IL_011d: sub - IL_011e: switch ( - IL_0163) - IL_0127: ldloc.s V_10 - IL_0129: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_012e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0133: brtrue.s IL_0193 - - IL_0135: ldloc.s V_10 - IL_0137: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_013c: stloc.s V_11 - IL_013e: ldloc.1 - IL_013f: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0144: stloc.s V_12 - IL_0146: ldloc.s V_12 - IL_0148: ldloc.s V_11 - IL_014a: add - IL_014b: ldc.i4.4 - IL_014c: ceq - IL_014e: brfalse.s IL_0193 - - IL_0150: ldloc.s V_10 - IL_0152: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0157: ldloc.1 - IL_0158: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_015d: stloc.s V_6 - IL_015f: stloc.s V_5 - IL_0161: br.s IL_018d - - IL_0163: ldloc.s V_10 - IL_0165: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_016a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_016f: brtrue.s IL_0193 + IL_0053: brtrue IL_0196 + + .line 8,8 : 18,25 '' + IL_0058: nop + .line 100001,100001 : 0,0 '' + IL_0059: ldloc.2 + IL_005a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_005f: stloc.3 + IL_0060: ldloc.1 + IL_0061: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0066: stloc.s a + IL_0068: ldloc.s a + IL_006a: ldloc.3 + IL_006b: add + IL_006c: ldc.i4.4 + IL_006d: ceq + IL_006f: brfalse IL_0196 + + IL_0074: br IL_0180 + + .line 100001,100001 : 0,0 '' + IL_0079: ldloc.1 + IL_007a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_007f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0084: brfalse IL_0196 + + IL_0089: ldloc.1 + IL_008a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_008f: stloc.s V_7 + .line 100001,100001 : 0,0 '' + IL_0091: ldloc.s V_7 + IL_0093: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0098: ldc.i4.4 + IL_0099: sub + IL_009a: switch ( + IL_00e9) + .line 100001,100001 : 0,0 '' + IL_00a3: ldloc.s V_7 + IL_00a5: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00aa: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00af: brtrue IL_0196 + + .line 8,8 : 18,25 '' + IL_00b4: nop + .line 100001,100001 : 0,0 '' + IL_00b5: ldloc.s V_7 + IL_00b7: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00bc: stloc.s V_8 + IL_00be: ldloc.1 + IL_00bf: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00c4: stloc.s V_9 + IL_00c6: ldloc.s V_9 + IL_00c8: ldloc.s V_8 + IL_00ca: add + IL_00cb: ldc.i4.4 + IL_00cc: ceq + IL_00ce: brfalse IL_0196 + + .line 100001,100001 : 0,0 '' + IL_00d3: ldloc.s V_7 + IL_00d5: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00da: ldloc.1 + IL_00db: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00e0: stloc.s V_6 + IL_00e2: stloc.s V_5 + IL_00e4: br IL_0190 + + .line 100001,100001 : 0,0 '' + IL_00e9: ldloc.s V_7 + IL_00eb: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00f0: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00f5: brtrue IL_0196 + + IL_00fa: br IL_017a + + .line 100001,100001 : 0,0 '' + IL_00ff: ldloc.1 + IL_0100: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0105: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_010a: brfalse IL_0196 + + IL_010f: ldloc.1 + IL_0110: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0115: stloc.s V_10 + .line 100001,100001 : 0,0 '' + IL_0117: ldloc.s V_10 + IL_0119: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_011e: ldc.i4.2 + IL_011f: sub + IL_0120: switch ( + IL_0166) + .line 100001,100001 : 0,0 '' + IL_0129: ldloc.s V_10 + IL_012b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0130: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0135: brtrue.s IL_0196 + + .line 8,8 : 18,25 '' + IL_0137: nop + .line 100001,100001 : 0,0 '' + IL_0138: ldloc.s V_10 + IL_013a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_013f: stloc.s V_11 + IL_0141: ldloc.1 + IL_0142: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0147: stloc.s V_12 + IL_0149: ldloc.s V_12 + IL_014b: ldloc.s V_11 + IL_014d: add + IL_014e: ldc.i4.4 + IL_014f: ceq + IL_0151: brfalse.s IL_0196 + + .line 100001,100001 : 0,0 '' + IL_0153: ldloc.s V_10 + IL_0155: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_015a: ldloc.1 + IL_015b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0160: stloc.s V_6 + IL_0162: stloc.s V_5 + IL_0164: br.s IL_0190 + + .line 100001,100001 : 0,0 '' + IL_0166: ldloc.s V_10 + IL_0168: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_016d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0172: brtrue.s IL_0196 .line 6,6 : 16,23 '' - IL_0171: ldstr "three" - IL_0176: ret + IL_0174: ldstr "three" + IL_0179: ret .line 7,7 : 16,23 '' - IL_0177: ldstr "seven" - IL_017c: ret - - .line 5,5 : 5,17 '' - IL_017d: ldloc.2 - IL_017e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0183: stloc.s V_5 - IL_0185: ldloc.1 - IL_0186: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_018b: stloc.s V_6 + IL_017a: ldstr "seven" + IL_017f: ret + + .line 100001,100001 : 0,0 '' + IL_0180: ldloc.2 + IL_0181: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0186: stloc.s V_5 + IL_0188: ldloc.1 + IL_0189: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_018e: stloc.s V_6 .line 8,8 : 29,35 '' - IL_018d: ldstr "four" - IL_0192: ret + IL_0190: ldstr "four" + IL_0195: ret .line 9,9 : 12,17 '' - IL_0193: ldstr "big" - IL_0198: ret + IL_0196: ldstr "big" + IL_019b: ret } // end of method TestFunction9b1::TestFunction9b } // end of class TestFunction9b1 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b2.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b2.il.bsl index 1fa79b615e8..2552f87ab2d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b2.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b2.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000208 Length: 0x00000083 } .module TestFunction9b2.exe -// MVID: {60B68B97-9C0B-E35E-A745-0383978BB660} +// MVID: {611C4D9E-9C0B-E35E-A745-03839E4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07220000 +// Image base: 0x06C20000 // =============== CLASS MEMBERS DECLARATION =================== @@ -53,7 +53,7 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) .method public static string TestFunction9b(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 x) cil managed { - // Code size 409 (0x199) + // Code size 412 (0x19c) .maxstack 4 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -72,166 +72,190 @@ .line 5,5 : 5,17 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction9b2.fs' IL_0000: ldarg.0 IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' IL_0002: ldloc.0 IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0008: brfalse IL_0193 + IL_0008: brfalse IL_0196 IL_000d: ldloc.0 IL_000e: stloc.1 + .line 100001,100001 : 0,0 '' IL_000f: ldloc.1 IL_0010: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0015: ldc.i4.1 IL_0016: sub IL_0017: switch ( - IL_00fd) + IL_00ff) + .line 100001,100001 : 0,0 '' IL_0020: ldloc.1 IL_0021: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0026: ldc.i4.3 IL_0027: sub IL_0028: switch ( - IL_0078) + IL_0079) + .line 100001,100001 : 0,0 '' IL_0031: ldloc.1 IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0037: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003c: brfalse IL_0193 + IL_003c: brfalse IL_0196 IL_0041: ldloc.1 IL_0042: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0047: stloc.2 + .line 100001,100001 : 0,0 '' IL_0048: ldloc.2 IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_004e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0053: brtrue IL_0193 - - IL_0058: ldloc.2 - IL_0059: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_005e: stloc.3 - IL_005f: ldloc.1 - IL_0060: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0065: stloc.s a - IL_0067: ldloc.s a - IL_0069: ldloc.3 - IL_006a: add - IL_006b: ldc.i4.4 - IL_006c: ceq - IL_006e: brfalse IL_0193 - - IL_0073: br IL_017d - - IL_0078: ldloc.1 - IL_0079: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_007e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0083: brfalse IL_0193 - - IL_0088: ldloc.1 - IL_0089: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_008e: stloc.s V_7 - IL_0090: ldloc.s V_7 - IL_0092: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0097: ldc.i4.4 - IL_0098: sub - IL_0099: switch ( - IL_00e7) - IL_00a2: ldloc.s V_7 - IL_00a4: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00a9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00ae: brtrue IL_0193 - - IL_00b3: ldloc.s V_7 - IL_00b5: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00ba: stloc.s V_8 - IL_00bc: ldloc.1 - IL_00bd: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00c2: stloc.s V_9 - IL_00c4: ldloc.s V_9 - IL_00c6: ldloc.s V_8 - IL_00c8: add - IL_00c9: ldc.i4.4 - IL_00ca: ceq - IL_00cc: brfalse IL_0193 - - IL_00d1: ldloc.s V_7 - IL_00d3: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00d8: ldloc.1 - IL_00d9: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00de: stloc.s V_6 - IL_00e0: stloc.s V_5 - IL_00e2: br IL_018d - - IL_00e7: ldloc.s V_7 - IL_00e9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00ee: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00f3: brtrue IL_0193 - - IL_00f8: br IL_0177 - - IL_00fd: ldloc.1 - IL_00fe: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0103: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0108: brfalse IL_0193 - - IL_010d: ldloc.1 - IL_010e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0113: stloc.s V_10 - IL_0115: ldloc.s V_10 - IL_0117: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_011c: ldc.i4.2 - IL_011d: sub - IL_011e: switch ( - IL_0163) - IL_0127: ldloc.s V_10 - IL_0129: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_012e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0133: brtrue.s IL_0193 - - IL_0135: ldloc.s V_10 - IL_0137: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_013c: stloc.s V_11 - IL_013e: ldloc.1 - IL_013f: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0144: stloc.s V_12 - IL_0146: ldloc.s V_12 - IL_0148: ldloc.s V_11 - IL_014a: add - IL_014b: ldc.i4.4 - IL_014c: ceq - IL_014e: brfalse.s IL_0193 - - IL_0150: ldloc.s V_10 - IL_0152: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0157: ldloc.1 - IL_0158: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_015d: stloc.s V_6 - IL_015f: stloc.s V_5 - IL_0161: br.s IL_018d - - IL_0163: ldloc.s V_10 - IL_0165: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_016a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_016f: brtrue.s IL_0193 + IL_0053: brtrue IL_0196 + + .line 8,8 : 18,25 '' + IL_0058: nop + .line 100001,100001 : 0,0 '' + IL_0059: ldloc.2 + IL_005a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_005f: stloc.3 + IL_0060: ldloc.1 + IL_0061: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0066: stloc.s a + IL_0068: ldloc.s a + IL_006a: ldloc.3 + IL_006b: add + IL_006c: ldc.i4.4 + IL_006d: ceq + IL_006f: brfalse IL_0196 + + IL_0074: br IL_0180 + + .line 100001,100001 : 0,0 '' + IL_0079: ldloc.1 + IL_007a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_007f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0084: brfalse IL_0196 + + IL_0089: ldloc.1 + IL_008a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_008f: stloc.s V_7 + .line 100001,100001 : 0,0 '' + IL_0091: ldloc.s V_7 + IL_0093: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0098: ldc.i4.4 + IL_0099: sub + IL_009a: switch ( + IL_00e9) + .line 100001,100001 : 0,0 '' + IL_00a3: ldloc.s V_7 + IL_00a5: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00aa: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00af: brtrue IL_0196 + + .line 8,8 : 18,25 '' + IL_00b4: nop + .line 100001,100001 : 0,0 '' + IL_00b5: ldloc.s V_7 + IL_00b7: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00bc: stloc.s V_8 + IL_00be: ldloc.1 + IL_00bf: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00c4: stloc.s V_9 + IL_00c6: ldloc.s V_9 + IL_00c8: ldloc.s V_8 + IL_00ca: add + IL_00cb: ldc.i4.4 + IL_00cc: ceq + IL_00ce: brfalse IL_0196 + + .line 100001,100001 : 0,0 '' + IL_00d3: ldloc.s V_7 + IL_00d5: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00da: ldloc.1 + IL_00db: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00e0: stloc.s V_6 + IL_00e2: stloc.s V_5 + IL_00e4: br IL_0190 + + .line 100001,100001 : 0,0 '' + IL_00e9: ldloc.s V_7 + IL_00eb: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00f0: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00f5: brtrue IL_0196 + + IL_00fa: br IL_017a + + .line 100001,100001 : 0,0 '' + IL_00ff: ldloc.1 + IL_0100: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0105: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_010a: brfalse IL_0196 + + IL_010f: ldloc.1 + IL_0110: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0115: stloc.s V_10 + .line 100001,100001 : 0,0 '' + IL_0117: ldloc.s V_10 + IL_0119: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_011e: ldc.i4.2 + IL_011f: sub + IL_0120: switch ( + IL_0166) + .line 100001,100001 : 0,0 '' + IL_0129: ldloc.s V_10 + IL_012b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0130: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0135: brtrue.s IL_0196 + + .line 8,8 : 18,25 '' + IL_0137: nop + .line 100001,100001 : 0,0 '' + IL_0138: ldloc.s V_10 + IL_013a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_013f: stloc.s V_11 + IL_0141: ldloc.1 + IL_0142: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0147: stloc.s V_12 + IL_0149: ldloc.s V_12 + IL_014b: ldloc.s V_11 + IL_014d: add + IL_014e: ldc.i4.4 + IL_014f: ceq + IL_0151: brfalse.s IL_0196 + + .line 100001,100001 : 0,0 '' + IL_0153: ldloc.s V_10 + IL_0155: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_015a: ldloc.1 + IL_015b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0160: stloc.s V_6 + IL_0162: stloc.s V_5 + IL_0164: br.s IL_0190 + + .line 100001,100001 : 0,0 '' + IL_0166: ldloc.s V_10 + IL_0168: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_016d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0172: brtrue.s IL_0196 .line 6,6 : 16,23 '' - IL_0171: ldstr "three" - IL_0176: ret + IL_0174: ldstr "three" + IL_0179: ret .line 7,7 : 16,23 '' - IL_0177: ldstr "seven" - IL_017c: ret - - .line 5,5 : 5,17 '' - IL_017d: ldloc.2 - IL_017e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0183: stloc.s V_5 - IL_0185: ldloc.1 - IL_0186: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_018b: stloc.s V_6 + IL_017a: ldstr "seven" + IL_017f: ret + + .line 100001,100001 : 0,0 '' + IL_0180: ldloc.2 + IL_0181: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0186: stloc.s V_5 + IL_0188: ldloc.1 + IL_0189: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_018e: stloc.s V_6 .line 8,8 : 29,35 '' - IL_018d: ldstr "four" - IL_0192: ret + IL_0190: ldstr "four" + IL_0195: ret .line 9,9 : 12,17 '' - IL_0193: ldstr "big" - IL_0198: ret + IL_0196: ldstr "big" + IL_019b: ret } // end of method TestFunction9b2::TestFunction9b } // end of class TestFunction9b2 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b3.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b3.il.bsl index 855fe60eaf0..27c44babf31 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b3.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b3.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000208 Length: 0x00000083 } .module TestFunction9b3.exe -// MVID: {60B68B97-C1A4-612A-A745-0383978BB660} +// MVID: {611C4D9E-C1A4-612A-A745-03839E4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x068C0000 +// Image base: 0x06690000 // =============== CLASS MEMBERS DECLARATION =================== @@ -53,7 +53,7 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) .method public static string TestFunction9b(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 x) cil managed { - // Code size 409 (0x199) + // Code size 412 (0x19c) .maxstack 4 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -72,166 +72,190 @@ .line 5,5 : 5,17 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction9b3.fs' IL_0000: ldarg.0 IL_0001: stloc.0 + .line 100001,100001 : 0,0 '' IL_0002: ldloc.0 IL_0003: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0008: brfalse IL_0193 + IL_0008: brfalse IL_0196 IL_000d: ldloc.0 IL_000e: stloc.1 + .line 100001,100001 : 0,0 '' IL_000f: ldloc.1 IL_0010: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0015: ldc.i4.1 IL_0016: sub IL_0017: switch ( - IL_00fd) + IL_00ff) + .line 100001,100001 : 0,0 '' IL_0020: ldloc.1 IL_0021: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0026: ldc.i4.3 IL_0027: sub IL_0028: switch ( - IL_0078) + IL_0079) + .line 100001,100001 : 0,0 '' IL_0031: ldloc.1 IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0037: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003c: brfalse IL_0193 + IL_003c: brfalse IL_0196 IL_0041: ldloc.1 IL_0042: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0047: stloc.2 + .line 100001,100001 : 0,0 '' IL_0048: ldloc.2 IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_004e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0053: brtrue IL_0193 - - IL_0058: ldloc.2 - IL_0059: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_005e: stloc.3 - IL_005f: ldloc.1 - IL_0060: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0065: stloc.s a - IL_0067: ldloc.s a - IL_0069: ldloc.3 - IL_006a: add - IL_006b: ldc.i4.4 - IL_006c: ceq - IL_006e: brfalse IL_0193 - - IL_0073: br IL_017d - - IL_0078: ldloc.1 - IL_0079: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_007e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0083: brfalse IL_0193 - - IL_0088: ldloc.1 - IL_0089: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_008e: stloc.s V_7 - IL_0090: ldloc.s V_7 - IL_0092: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0097: ldc.i4.4 - IL_0098: sub - IL_0099: switch ( - IL_00e7) - IL_00a2: ldloc.s V_7 - IL_00a4: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00a9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00ae: brtrue IL_0193 - - IL_00b3: ldloc.s V_7 - IL_00b5: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00ba: stloc.s V_8 - IL_00bc: ldloc.1 - IL_00bd: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00c2: stloc.s V_9 - IL_00c4: ldloc.s V_9 - IL_00c6: ldloc.s V_8 - IL_00c8: add - IL_00c9: ldc.i4.4 - IL_00ca: ceq - IL_00cc: brfalse IL_0193 - - IL_00d1: ldloc.s V_7 - IL_00d3: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00d8: ldloc.1 - IL_00d9: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_00de: stloc.s V_6 - IL_00e0: stloc.s V_5 - IL_00e2: br IL_018d - - IL_00e7: ldloc.s V_7 - IL_00e9: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00ee: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_00f3: brtrue IL_0193 - - IL_00f8: br IL_0177 - - IL_00fd: ldloc.1 - IL_00fe: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0103: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0108: brfalse IL_0193 - - IL_010d: ldloc.1 - IL_010e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0113: stloc.s V_10 - IL_0115: ldloc.s V_10 - IL_0117: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_011c: ldc.i4.2 - IL_011d: sub - IL_011e: switch ( - IL_0163) - IL_0127: ldloc.s V_10 - IL_0129: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_012e: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0133: brtrue.s IL_0193 - - IL_0135: ldloc.s V_10 - IL_0137: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_013c: stloc.s V_11 - IL_013e: ldloc.1 - IL_013f: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0144: stloc.s V_12 - IL_0146: ldloc.s V_12 - IL_0148: ldloc.s V_11 - IL_014a: add - IL_014b: ldc.i4.4 - IL_014c: ceq - IL_014e: brfalse.s IL_0193 - - IL_0150: ldloc.s V_10 - IL_0152: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0157: ldloc.1 - IL_0158: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_015d: stloc.s V_6 - IL_015f: stloc.s V_5 - IL_0161: br.s IL_018d - - IL_0163: ldloc.s V_10 - IL_0165: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_016a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_016f: brtrue.s IL_0193 + IL_0053: brtrue IL_0196 + + .line 8,8 : 18,25 '' + IL_0058: nop + .line 100001,100001 : 0,0 '' + IL_0059: ldloc.2 + IL_005a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_005f: stloc.3 + IL_0060: ldloc.1 + IL_0061: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0066: stloc.s a + IL_0068: ldloc.s a + IL_006a: ldloc.3 + IL_006b: add + IL_006c: ldc.i4.4 + IL_006d: ceq + IL_006f: brfalse IL_0196 + + IL_0074: br IL_0180 + + .line 100001,100001 : 0,0 '' + IL_0079: ldloc.1 + IL_007a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_007f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0084: brfalse IL_0196 + + IL_0089: ldloc.1 + IL_008a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_008f: stloc.s V_7 + .line 100001,100001 : 0,0 '' + IL_0091: ldloc.s V_7 + IL_0093: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0098: ldc.i4.4 + IL_0099: sub + IL_009a: switch ( + IL_00e9) + .line 100001,100001 : 0,0 '' + IL_00a3: ldloc.s V_7 + IL_00a5: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00aa: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00af: brtrue IL_0196 + + .line 8,8 : 18,25 '' + IL_00b4: nop + .line 100001,100001 : 0,0 '' + IL_00b5: ldloc.s V_7 + IL_00b7: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00bc: stloc.s V_8 + IL_00be: ldloc.1 + IL_00bf: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00c4: stloc.s V_9 + IL_00c6: ldloc.s V_9 + IL_00c8: ldloc.s V_8 + IL_00ca: add + IL_00cb: ldc.i4.4 + IL_00cc: ceq + IL_00ce: brfalse IL_0196 + + .line 100001,100001 : 0,0 '' + IL_00d3: ldloc.s V_7 + IL_00d5: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00da: ldloc.1 + IL_00db: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_00e0: stloc.s V_6 + IL_00e2: stloc.s V_5 + IL_00e4: br IL_0190 + + .line 100001,100001 : 0,0 '' + IL_00e9: ldloc.s V_7 + IL_00eb: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00f0: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_00f5: brtrue IL_0196 + + IL_00fa: br IL_017a + + .line 100001,100001 : 0,0 '' + IL_00ff: ldloc.1 + IL_0100: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0105: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_010a: brfalse IL_0196 + + IL_010f: ldloc.1 + IL_0110: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0115: stloc.s V_10 + .line 100001,100001 : 0,0 '' + IL_0117: ldloc.s V_10 + IL_0119: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_011e: ldc.i4.2 + IL_011f: sub + IL_0120: switch ( + IL_0166) + .line 100001,100001 : 0,0 '' + IL_0129: ldloc.s V_10 + IL_012b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0130: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0135: brtrue.s IL_0196 + + .line 8,8 : 18,25 '' + IL_0137: nop + .line 100001,100001 : 0,0 '' + IL_0138: ldloc.s V_10 + IL_013a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_013f: stloc.s V_11 + IL_0141: ldloc.1 + IL_0142: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0147: stloc.s V_12 + IL_0149: ldloc.s V_12 + IL_014b: ldloc.s V_11 + IL_014d: add + IL_014e: ldc.i4.4 + IL_014f: ceq + IL_0151: brfalse.s IL_0196 + + .line 100001,100001 : 0,0 '' + IL_0153: ldloc.s V_10 + IL_0155: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_015a: ldloc.1 + IL_015b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0160: stloc.s V_6 + IL_0162: stloc.s V_5 + IL_0164: br.s IL_0190 + + .line 100001,100001 : 0,0 '' + IL_0166: ldloc.s V_10 + IL_0168: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_016d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0172: brtrue.s IL_0196 .line 6,6 : 16,23 '' - IL_0171: ldstr "three" - IL_0176: ret + IL_0174: ldstr "three" + IL_0179: ret .line 7,7 : 16,23 '' - IL_0177: ldstr "seven" - IL_017c: ret - - .line 5,5 : 5,17 '' - IL_017d: ldloc.2 - IL_017e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0183: stloc.s V_5 - IL_0185: ldloc.1 - IL_0186: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_018b: stloc.s V_6 + IL_017a: ldstr "seven" + IL_017f: ret + + .line 100001,100001 : 0,0 '' + IL_0180: ldloc.2 + IL_0181: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0186: stloc.s V_5 + IL_0188: ldloc.1 + IL_0189: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_018e: stloc.s V_6 .line 8,8 : 29,35 '' - IL_018d: ldstr "four" - IL_0192: ret + IL_0190: ldstr "four" + IL_0195: ret .line 9,9 : 12,17 '' - IL_0193: ldstr "big" - IL_0198: ret + IL_0196: ldstr "big" + IL_019b: ret } // end of method TestFunction9b3::TestFunction9b } // end of class TestFunction9b3 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/OptionalArg01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/OptionalArg01.il.bsl index 1a3ed26f343..96b5fb284f9 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/OptionalArg01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/OptionalArg01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000460 Length: 0x00000445 } .module OptionalArg01.exe -// MVID: {60EDBC4B-4F48-B5AF-A745-03834BBCED60} +// MVID: {611C4D9E-4F48-B5AF-A745-03839E4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07190000 +// Image base: 0x064B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -98,7 +98,7 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.OptionalArgumentAttribute::.ctor() = ( 01 00 00 00 ) .param [2] .custom instance void [FSharp.Core]Microsoft.FSharp.Core.OptionalArgumentAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 91 (0x5b) + // Code size 93 (0x5d) .maxstack 4 .locals init ([0] int32 count, [1] int32 V_1, @@ -106,96 +106,102 @@ [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_3, [4] class OptionalArg01/A v2) .line 10,10 : 9,44 '' - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0005 + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: brfalse.s IL_0006 - IL_0003: br.s IL_0009 + IL_0004: br.s IL_000a .line 8,8 : 43,48 '' - IL_0005: ldc.i4.0 + IL_0006: ldc.i4.0 .line 16707566,16707566 : 0,0 '' - IL_0006: nop - IL_0007: br.s IL_000b + IL_0007: nop + IL_0008: br.s IL_000c .line 8,8 : 61,70 '' - IL_0009: ldc.i4.1 + IL_000a: ldc.i4.1 .line 16707566,16707566 : 0,0 '' - IL_000a: nop + IL_000b: nop .line 16707566,16707566 : 0,0 '' - IL_000b: stloc.0 + IL_000c: stloc.0 .line 10,10 : 9,44 '' - IL_000c: ldarg.1 - IL_000d: brfalse.s IL_0011 + IL_000d: nop + .line 16707566,16707566 : 0,0 '' + IL_000e: ldarg.1 + IL_000f: brfalse.s IL_0013 - IL_000f: br.s IL_0015 + IL_0011: br.s IL_0017 .line 9,9 : 43,48 '' - IL_0011: ldloc.0 + IL_0013: ldloc.0 .line 16707566,16707566 : 0,0 '' - IL_0012: nop - IL_0013: br.s IL_0019 + IL_0014: nop + IL_0015: br.s IL_001b .line 9,9 : 61,70 '' - IL_0015: ldloc.0 - IL_0016: ldc.i4.1 - IL_0017: add + IL_0017: ldloc.0 + IL_0018: ldc.i4.1 + IL_0019: add .line 16707566,16707566 : 0,0 '' - IL_0018: nop + IL_001a: nop .line 16707566,16707566 : 0,0 '' - IL_0019: stloc.1 + IL_001b: stloc.1 .line 10,10 : 9,44 '' - IL_001a: ldloc.1 - IL_001b: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor(int32) - IL_0020: stloc.2 - IL_0021: ldarg.0 - IL_0022: brfalse.s IL_0026 + IL_001c: ldloc.1 + IL_001d: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor(int32) + IL_0022: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0023: ldarg.0 + IL_0024: brfalse.s IL_0028 - IL_0024: br.s IL_002a + IL_0026: br.s IL_002c .line 11,11 : 31,33 '' - IL_0026: nop + IL_0028: nop .line 16707566,16707566 : 0,0 '' - IL_0027: nop - IL_0028: br.s IL_003d + IL_0029: nop + IL_002a: br.s IL_003f - .line 10,10 : 9,44 '' - IL_002a: ldarg.0 - IL_002b: stloc.3 - IL_002c: ldloc.3 - IL_002d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() - IL_0032: stloc.s v2 + .line 16707566,16707566 : 0,0 '' + IL_002c: ldarg.0 + IL_002d: stloc.3 + IL_002e: ldloc.3 + IL_002f: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() + IL_0034: stloc.s v2 .line 11,11 : 47,62 '' - IL_0034: ldloc.2 - IL_0035: ldloc.s v2 - IL_0037: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0036: ldloc.2 + IL_0037: ldloc.s v2 + IL_0039: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + .line 16707566,16707566 : 0,0 '' + IL_003e: nop .line 16707566,16707566 : 0,0 '' - IL_003c: nop - IL_003d: ldarg.1 - IL_003e: brfalse.s IL_0042 + IL_003f: ldarg.1 + IL_0040: brfalse.s IL_0044 - IL_0040: br.s IL_0046 + IL_0042: br.s IL_0048 .line 12,12 : 31,33 '' - IL_0042: nop + IL_0044: nop .line 16707566,16707566 : 0,0 '' - IL_0043: nop - IL_0044: br.s IL_0059 + IL_0045: nop + IL_0046: br.s IL_005b - .line 11,11 : 47,62 '' - IL_0046: ldarg.1 - IL_0047: stloc.3 - IL_0048: ldloc.3 - IL_0049: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() - IL_004e: stloc.s v2 + .line 16707566,16707566 : 0,0 '' + IL_0048: ldarg.1 + IL_0049: stloc.3 + IL_004a: ldloc.3 + IL_004b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() + IL_0050: stloc.s v2 .line 12,12 : 47,62 '' - IL_0050: ldloc.2 - IL_0051: ldloc.s v2 - IL_0053: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0052: ldloc.2 + IL_0053: ldloc.s v2 + IL_0055: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) .line 16707566,16707566 : 0,0 '' - IL_0058: nop + IL_005a: nop .line 13,13 : 9,16 '' - IL_0059: ldloc.2 - IL_005a: ret + IL_005b: ldloc.2 + IL_005c: ret } // end of method C::F } // end of class C diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.il.bsl index 32383a15efa..56515db1026 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x00000230 Length: 0x0000007B } .module TupleElimination.exe -// MVID: {60EF4161-DFDD-92DF-A745-03836141EF60} +// MVID: {611C52B3-DFDD-92DF-A745-0383B3521C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x065E0000 +// Image base: 0x050E0000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare01.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare01.il.bsl index 74527f0d702..3b7ce524486 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000228 Length: 0x000000B2 } .module Compare01.dll -// MVID: {60BE1F16-04A0-F88E-A745-0383161FBE60} +// MVID: {611C550D-04A0-F88E-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05230000 +// Image base: 0x09070000 // =============== CLASS MEMBERS DECLARATION =================== @@ -76,6 +76,7 @@ IL_0007: ldc.i4.1 IL_0008: cgt IL_000a: stloc.2 + .line 16707566,16707566 : 0,0 '' IL_000b: ldloc.2 IL_000c: brfalse.s IL_0012 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare02.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare02.il.bsl index 035762e696b..f9763f7b1b8 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare02.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare02.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000230 Length: 0x000000B9 } .module Compare02.dll -// MVID: {60BE1F16-0481-F88E-A745-0383161FBE60} +// MVID: {611C550D-0481-F88E-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07180000 +// Image base: 0x05530000 // =============== CLASS MEMBERS DECLARATION =================== @@ -77,6 +77,7 @@ IL_0007: ldc.i4.1 IL_0008: cgt IL_000a: stloc.2 + .line 16707566,16707566 : 0,0 '' IL_000b: ldloc.2 IL_000c: brfalse.s IL_0012 @@ -91,6 +92,7 @@ IL_0013: ldc.i4.2 IL_0014: cgt IL_0016: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_0017: ldloc.3 IL_0018: brfalse.s IL_001e diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare03.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare03.il.bsl index f4542c78376..2c32497fb46 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare03.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare03.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x00000238 Length: 0x000000B9 } .module Compare03.dll -// MVID: {60BE1F16-0562-F88E-A745-0383161FBE60} +// MVID: {611C550D-0562-F88E-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x09540000 +// Image base: 0x05000000 // =============== CLASS MEMBERS DECLARATION =================== @@ -83,6 +83,7 @@ IL_0007: ldc.i4.1 IL_0008: cgt IL_000a: stloc.2 + .line 16707566,16707566 : 0,0 '' IL_000b: ldloc.2 IL_000c: brfalse.s IL_0012 @@ -97,6 +98,7 @@ IL_0013: ldc.i4.2 IL_0014: cgt IL_0016: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_0017: ldloc.3 IL_0018: brfalse.s IL_001e @@ -111,6 +113,7 @@ IL_001f: ldc.i4.4 IL_0020: cgt IL_0022: stloc.s V_4 + .line 16707566,16707566 : 0,0 '' IL_0024: ldloc.s V_4 IL_0026: brfalse.s IL_002d diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare04.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare04.il.bsl index 3c703ad0464..81438746bfa 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare04.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare04.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x00000238 Length: 0x000000B9 } .module Compare04.dll -// MVID: {60BE1F16-053B-F88E-A745-0383161FBE60} +// MVID: {611C550D-053B-F88E-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04FB0000 +// Image base: 0x071C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -84,6 +84,7 @@ IL_000a: ldc.i4.1 IL_000b: cgt IL_000d: stloc.2 + .line 16707566,16707566 : 0,0 '' IL_000e: ldloc.2 IL_000f: brfalse.s IL_0018 @@ -98,6 +99,7 @@ IL_0019: ldc.i4.2 IL_001a: cgt IL_001c: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_001d: ldloc.3 IL_001e: brfalse.s IL_0027 @@ -112,6 +114,7 @@ IL_0028: ldc.i4.4 IL_0029: cgt IL_002b: stloc.s V_4 + .line 16707566,16707566 : 0,0 '' IL_002d: ldloc.s V_4 IL_002f: brfalse.s IL_0039 @@ -127,6 +130,7 @@ IL_0043: call int32 [netstandard]System.String::CompareOrdinal(string, string) IL_0048: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' IL_004a: ldloc.s V_5 IL_004c: brfalse.s IL_0053 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare05.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare05.il.bsl index 5bf6d5ccbd1..7920cf478b6 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare05.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare05.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006E0 Length: 0x000003BA } .module Compare05.dll -// MVID: {60BE1F16-051C-F88E-A745-0383161FBE60} +// MVID: {611C550D-051C-F88E-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06AE0000 +// Image base: 0x070E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Compare05/CompareMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 120 (0x78) .maxstack 4 .locals init ([0] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_1, @@ -187,109 +187,114 @@ [4] int32 V_4, [5] int32 V_5) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare05.fsx' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + .line 4,4 : 10,13 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare05.fsx' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_006e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop + .line 16707566,16707566 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0018: stloc.3 + IL_0019: ldloc.0 + IL_001a: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: stloc.s V_4 + IL_0021: ldloc.1 + IL_0022: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0027: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.s V_5 + IL_002d: bge.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_002f: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0030: nop + IL_0031: br.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_0033: ldloc.s V_4 + IL_0035: ldloc.s V_5 + IL_0037: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0039: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_003a: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_003b: ldloc.2 + IL_003c: ldc.i4.0 + IL_003d: bge.s IL_0041 .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_003f: ldloc.2 + IL_0040: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_0041: ldloc.2 + IL_0042: ldc.i4.0 + IL_0043: ble.s IL_0047 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_0045: ldloc.2 + IL_0046: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0047: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_004c: stloc.3 + IL_004d: ldloc.0 + IL_004e: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0053: stloc.s V_4 + IL_0055: ldloc.1 + IL_0056: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_005b: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' + IL_005d: ldloc.s V_4 + IL_005f: ldloc.s V_5 + IL_0061: bge.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_0063: ldc.i4.m1 + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_0065: ldloc.s V_4 + IL_0067: ldloc.s V_5 + IL_0069: cgt + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_006c: ldc.i4.1 + IL_006d: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_006e: ldarg.1 + IL_006f: ldnull + IL_0070: cgt.un + IL_0072: brfalse.s IL_0076 .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_0074: ldc.i4.m1 + IL_0075: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_0076: ldc.i4.0 + IL_0077: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -323,6 +328,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any Compare05/CompareMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -349,6 +355,7 @@ IL_0026: ldloc.2 IL_0027: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 IL_002c: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' IL_002e: ldloc.s V_4 IL_0030: ldloc.s V_5 IL_0032: bge.s IL_0038 @@ -367,6 +374,7 @@ IL_003e: nop .line 16707566,16707566 : 0,0 '' IL_003f: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_0040: ldloc.3 IL_0041: ldc.i4.0 IL_0042: bge.s IL_0046 @@ -391,6 +399,7 @@ IL_0054: ldloc.2 IL_0055: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 IL_005a: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' IL_005c: ldloc.s V_4 IL_005e: ldloc.s V_5 IL_0060: bge.s IL_0064 @@ -429,58 +438,61 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 61 (0x3d) .maxstack 7 .locals init ([0] int32 V_0, [1] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_1) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop - .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add + .line 4,4 : 10,13 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003b + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: pop + .line 16707566,16707566 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldloc.1 + IL_0015: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_001a: ldloc.0 + IL_001b: ldc.i4.6 + IL_001c: shl + IL_001d: ldloc.0 + IL_001e: ldc.i4.2 + IL_001f: shr IL_0020: add IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_002e: ldloc.0 - IL_002f: ldc.i4.6 - IL_0030: shl - IL_0031: ldloc.0 - IL_0032: ldc.i4.2 - IL_0033: shr - IL_0034: add + IL_0022: add + IL_0023: stloc.0 + IL_0024: ldc.i4 0x9e3779b9 + IL_0029: ldloc.1 + IL_002a: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_002f: ldloc.0 + IL_0030: ldc.i4.6 + IL_0031: shl + IL_0032: ldloc.0 + IL_0033: ldc.i4.2 + IL_0034: shr IL_0035: add IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ret + IL_0037: add + IL_0038: stloc.0 + IL_0039: ldloc.0 + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_003b: ldc.i4.0 + IL_003c: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -501,120 +513,127 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 64 (0x40) .maxstack 4 .locals init ([0] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_1, [2] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_2) + .line 4,4 : 10,13 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0038 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Compare05/CompareMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_0007: ldarg.1 + IL_0008: isinst Compare05/CompareMicroPerfAndCodeGenerationTests/Key + IL_000d: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0036 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_0011: ldarg.0 + IL_0012: pop + .line 16707566,16707566 : 0,0 '' + IL_0013: ldarg.0 + IL_0014: stloc.1 + IL_0015: ldloc.0 + IL_0016: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0017: ldloc.1 + IL_0018: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_001d: ldloc.2 + IL_001e: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0023: bne.un.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0025: ldloc.1 + IL_0026: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_002b: ldloc.2 + IL_002c: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0031: ceq + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0036: ldc.i4.0 + IL_0037: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0038: ldarg.1 + IL_0039: ldnull + IL_003a: cgt.un + IL_003c: ldc.i4.0 + IL_003d: ceq + IL_003f: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Compare05/CompareMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_1) + .line 4,4 : 10,13 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop + .line 16707566,16707566 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0013: ldloc.0 + IL_0014: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.1 + IL_001a: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0021: ldloc.0 + IL_0022: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.1 + IL_0028: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -628,6 +647,7 @@ IL_0000: ldarg.1 IL_0001: isinst Compare05/CompareMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare06.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare06.il.bsl index f79e000a95f..0e4e347ea04 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare06.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare06.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006D8 Length: 0x000003BC } .module Compare06.dll -// MVID: {60BE1F16-04FD-F88E-A745-0383161FBE60} +// MVID: {611C550D-04FD-F88E-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A50000 +// Image base: 0x04F30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -123,109 +123,114 @@ instance int32 CompareTo(class Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 101 (0x65) + // Code size 102 (0x66) .maxstack 4 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IComparer V_1, [2] int32 V_2, [3] int32 V_3) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare06.fsx' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_005b + .line 4,4 : 10,14 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare06.fsx' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_005c .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0059 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_005a .line 16707566,16707566 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: stloc.2 - IL_0019: ldarg.1 - IL_001a: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: bge.s IL_0028 + IL_000d: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0012: stloc.1 + IL_0013: ldarg.0 + IL_0014: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: stloc.2 + IL_001a: ldarg.1 + IL_001b: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0020: stloc.3 + .line 16707566,16707566 : 0,0 '' + IL_0021: ldloc.2 + IL_0022: ldloc.3 + IL_0023: bge.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0024: ldc.i4.m1 + IL_0025: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0025: nop - IL_0026: br.s IL_002d + IL_0026: nop + IL_0027: br.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.2 - IL_0029: ldloc.3 - IL_002a: cgt + IL_0029: ldloc.2 + IL_002a: ldloc.3 + IL_002b: cgt .line 16707566,16707566 : 0,0 '' - IL_002c: nop + IL_002d: nop .line 16707566,16707566 : 0,0 '' - IL_002d: stloc.0 - IL_002e: ldloc.0 - IL_002f: ldc.i4.0 - IL_0030: bge.s IL_0034 + IL_002e: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_002f: ldloc.0 + IL_0030: ldc.i4.0 + IL_0031: bge.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.0 - IL_0033: ret + IL_0033: ldloc.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldloc.0 - IL_0035: ldc.i4.0 - IL_0036: ble.s IL_003a + IL_0035: ldloc.0 + IL_0036: ldc.i4.0 + IL_0037: ble.s IL_003b .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.0 - IL_0039: ret + IL_0039: ldloc.0 + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_003a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_003f: stloc.1 - IL_0040: ldarg.0 - IL_0041: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0046: stloc.2 - IL_0047: ldarg.1 - IL_0048: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_004d: stloc.3 - IL_004e: ldloc.2 - IL_004f: ldloc.3 - IL_0050: bge.s IL_0054 + IL_003b: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0040: stloc.1 + IL_0041: ldarg.0 + IL_0042: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0047: stloc.2 + IL_0048: ldarg.1 + IL_0049: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_004e: stloc.3 + .line 16707566,16707566 : 0,0 '' + IL_004f: ldloc.2 + IL_0050: ldloc.3 + IL_0051: bge.s IL_0055 .line 16707566,16707566 : 0,0 '' - IL_0052: ldc.i4.m1 - IL_0053: ret + IL_0053: ldc.i4.m1 + IL_0054: ret .line 16707566,16707566 : 0,0 '' - IL_0054: ldloc.2 - IL_0055: ldloc.3 - IL_0056: cgt - IL_0058: ret + IL_0055: ldloc.2 + IL_0056: ldloc.3 + IL_0057: cgt + IL_0059: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldc.i4.1 - IL_005a: ret + IL_005a: ldc.i4.1 + IL_005b: ret .line 16707566,16707566 : 0,0 '' - IL_005b: ldarg.1 - IL_005c: ldnull - IL_005d: cgt.un - IL_005f: brfalse.s IL_0063 + IL_005c: ldarg.1 + IL_005d: ldnull + IL_005e: cgt.un + IL_0060: brfalse.s IL_0064 .line 16707566,16707566 : 0,0 '' - IL_0061: ldc.i4.m1 - IL_0062: ret + IL_0062: ldc.i4.m1 + IL_0063: ret .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.0 - IL_0064: ret + IL_0064: ldc.i4.0 + IL_0065: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final @@ -257,6 +262,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -276,6 +282,7 @@ IL_001f: ldloc.0 IL_0020: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ IL_0025: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_0026: ldloc.2 IL_0027: ldloc.3 IL_0028: bge.s IL_002e @@ -294,6 +301,7 @@ IL_0032: nop .line 16707566,16707566 : 0,0 '' IL_0033: stloc.1 + .line 16707566,16707566 : 0,0 '' IL_0034: ldloc.1 IL_0035: ldc.i4.0 IL_0036: bge.s IL_003a @@ -318,6 +326,7 @@ IL_0047: ldloc.0 IL_0048: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ IL_004d: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_004e: ldloc.2 IL_004f: ldloc.3 IL_0050: bge.s IL_0054 @@ -356,50 +365,52 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 54 (0x36) + // Code size 55 (0x37) .maxstack 7 .locals init ([0] int32 V_0) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0034 - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.0 - IL_000e: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0013: ldloc.0 - IL_0014: ldc.i4.6 - IL_0015: shl - IL_0016: ldloc.0 - IL_0017: ldc.i4.2 - IL_0018: shr - IL_0019: add + .line 4,4 : 10,14 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0035 + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + IL_0009: ldc.i4 0x9e3779b9 + IL_000e: ldarg.0 + IL_000f: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0014: ldloc.0 + IL_0015: ldc.i4.6 + IL_0016: shl + IL_0017: ldloc.0 + IL_0018: ldc.i4.2 + IL_0019: shr IL_001a: add IL_001b: add - IL_001c: stloc.0 - IL_001d: ldc.i4 0x9e3779b9 - IL_0022: ldarg.0 - IL_0023: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0028: ldloc.0 - IL_0029: ldc.i4.6 - IL_002a: shl - IL_002b: ldloc.0 - IL_002c: ldc.i4.2 - IL_002d: shr - IL_002e: add + IL_001c: add + IL_001d: stloc.0 + IL_001e: ldc.i4 0x9e3779b9 + IL_0023: ldarg.0 + IL_0024: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl + IL_002c: ldloc.0 + IL_002d: ldc.i4.2 + IL_002e: shr IL_002f: add IL_0030: add - IL_0031: stloc.0 - IL_0032: ldloc.0 - IL_0033: ret + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method KeyR::GetHashCode .method public hidebysig virtual final @@ -420,102 +431,107 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 57 (0x39) + // Code size 58 (0x3a) .maxstack 4 .locals init ([0] class Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR V_0) + .line 4,4 : 10,14 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0031 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002f + IL_0007: ldarg.1 + IL_0008: isinst Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_000d: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0016: ldloc.0 - IL_0017: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001c: bne.un.s IL_002d + IL_0011: ldarg.0 + IL_0012: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0017: ldloc.0 + IL_0018: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_001d: bne.un.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_001e: ldarg.0 - IL_001f: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0024: ldloc.0 - IL_0025: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_002a: ceq - IL_002c: ret + IL_001f: ldarg.0 + IL_0020: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0025: ldloc.0 + IL_0026: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_002b: ceq + IL_002d: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldc.i4.0 - IL_002e: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldarg.1 - IL_0032: ldnull - IL_0033: cgt.un - IL_0035: ldc.i4.0 - IL_0036: ceq - IL_0038: ret + IL_0032: ldarg.1 + IL_0033: ldnull + IL_0034: cgt.un + IL_0036: ldc.i4.0 + IL_0037: ceq + IL_0039: ret } // end of method KeyR::Equals .method public hidebysig virtual final instance bool Equals(class Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 54 (0x36) .maxstack 8 + .line 4,4 : 10,14 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002d + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_002b + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0012: ldarg.1 - IL_0013: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: bne.un.s IL_0029 + IL_000d: ldarg.0 + IL_000e: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0013: ldarg.1 + IL_0014: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: bne.un.s IL_002a .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0020: ldarg.1 - IL_0021: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0026: ceq - IL_0028: ret + IL_001b: ldarg.0 + IL_001c: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0021: ldarg.1 + IL_0022: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0027: ceq + IL_0029: ret .line 16707566,16707566 : 0,0 '' - IL_0029: ldc.i4.0 - IL_002a: ret + IL_002a: ldc.i4.0 + IL_002b: ret .line 16707566,16707566 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldarg.1 - IL_002e: ldnull - IL_002f: cgt.un - IL_0031: ldc.i4.0 - IL_0032: ceq - IL_0034: ret + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: cgt.un + IL_0032: ldc.i4.0 + IL_0033: ceq + IL_0035: ret } // end of method KeyR::Equals .method public hidebysig virtual final @@ -529,6 +545,7 @@ IL_0000: ldarg.1 IL_0001: isinst Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare07.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare07.il.bsl index 9effce1baff..400de5cfc7b 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare07.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare07.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000890 Length: 0x0000068C } .module Compare07.dll -// MVID: {60BE1F16-05DE-F88E-A745-0383161FBE60} +// MVID: {611C550D-05DE-F88E-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05810000 +// Image base: 0x058A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 110 (0x6e) + // Code size 111 (0x6f) .maxstack 5 .locals init ([0] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -187,93 +187,96 @@ [4] !a V_4, [5] !a V_5) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare07.fsx' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0064 - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0062 - - .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop - .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + .line 4,4 : 10,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare07.fsx' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0065 + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0063 + + .line 16707566,16707566 : 0,0 '' + IL_000d: ldarg.0 + IL_000e: pop + .line 16707566,16707566 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0018: stloc.3 + IL_0019: ldloc.0 + IL_001a: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_001f: stloc.s V_4 + IL_0021: ldloc.1 + IL_0022: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0027: stloc.s V_5 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0032: stloc.2 - IL_0033: ldloc.2 - IL_0034: ldc.i4.0 - IL_0035: bge.s IL_0039 + IL_0033: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_0037: ldloc.2 - IL_0038: ret + IL_0038: ldloc.2 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: ble.s IL_003f + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_003f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0044: stloc.3 - IL_0045: ldloc.0 - IL_0046: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_004b: stloc.s V_4 - IL_004d: ldloc.1 - IL_004e: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0053: stloc.s V_5 - IL_0055: ldloc.3 - IL_0056: ldloc.s V_4 - IL_0058: ldloc.s V_5 - IL_005a: tail. - IL_005c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.3 + IL_0046: ldloc.0 + IL_0047: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.1 + IL_004f: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0054: stloc.s V_5 + IL_0056: ldloc.3 + IL_0057: ldloc.s V_4 + IL_0059: ldloc.s V_5 + IL_005b: tail. + IL_005d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0061: ret + IL_0062: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.1 - IL_0063: ret + IL_0063: ldc.i4.1 + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldarg.1 - IL_0065: ldnull - IL_0066: cgt.un - IL_0068: brfalse.s IL_006c + IL_0065: ldarg.1 + IL_0066: ldnull + IL_0067: cgt.un + IL_0069: brfalse.s IL_006d .line 16707566,16707566 : 0,0 '' - IL_006a: ldc.i4.m1 - IL_006b: ret + IL_006b: ldc.i4.m1 + IL_006c: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.0 - IL_006d: ret + IL_006d: ldc.i4.0 + IL_006e: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final @@ -308,6 +311,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -341,6 +345,7 @@ !!0, !!0) IL_0038: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_0039: ldloc.3 IL_003a: ldc.i4.0 IL_003b: bge.s IL_003f @@ -398,69 +403,72 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 76 (0x4c) + // Code size 77 (0x4d) .maxstack 7 .locals init ([0] int32 V_0, [1] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] !a V_2) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004a - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop - .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0019: stloc.2 - IL_001a: ldarg.1 - IL_001b: ldloc.2 - IL_001c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + .line 4,4 : 10,20 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_004b + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: pop + .line 16707566,16707566 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldloc.1 + IL_0015: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_001a: stloc.2 + IL_001b: ldarg.1 + IL_001c: ldloc.2 + IL_001d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0) - IL_0021: ldloc.0 - IL_0022: ldc.i4.6 - IL_0023: shl - IL_0024: ldloc.0 - IL_0025: ldc.i4.2 - IL_0026: shr - IL_0027: add + IL_0022: ldloc.0 + IL_0023: ldc.i4.6 + IL_0024: shl + IL_0025: ldloc.0 + IL_0026: ldc.i4.2 + IL_0027: shr IL_0028: add IL_0029: add - IL_002a: stloc.0 - IL_002b: ldc.i4 0x9e3779b9 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0036: stloc.2 - IL_0037: ldarg.1 - IL_0038: ldloc.2 - IL_0039: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_002a: add + IL_002b: stloc.0 + IL_002c: ldc.i4 0x9e3779b9 + IL_0031: ldloc.1 + IL_0032: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0037: stloc.2 + IL_0038: ldarg.1 + IL_0039: ldloc.2 + IL_003a: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0) - IL_003e: ldloc.0 - IL_003f: ldc.i4.6 - IL_0040: shl - IL_0041: ldloc.0 - IL_0042: ldc.i4.2 - IL_0043: shr - IL_0044: add + IL_003f: ldloc.0 + IL_0040: ldc.i4.6 + IL_0041: shl + IL_0042: ldloc.0 + IL_0043: ldc.i4.2 + IL_0044: shr IL_0045: add IL_0046: add - IL_0047: stloc.0 - IL_0048: ldloc.0 - IL_0049: ret + IL_0047: add + IL_0048: stloc.0 + IL_0049: ldloc.0 + IL_004a: ret .line 16707566,16707566 : 0,0 '' - IL_004a: ldc.i4.0 - IL_004b: ret + IL_004b: ldc.i4.0 + IL_004c: ret } // end of method GenericKey`1::GetHashCode .method public hidebysig virtual final @@ -481,152 +489,159 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 87 (0x57) + // Code size 88 (0x58) .maxstack 5 .locals init ([0] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_2, [3] !a V_3, [4] !a V_4) + .line 4,4 : 10,20 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004f - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_004d - - .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop - .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001c: stloc.3 - IL_001d: ldloc.2 - IL_001e: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0023: stloc.s V_4 - IL_0025: ldarg.2 - IL_0026: ldloc.3 - IL_0027: ldloc.s V_4 - IL_0029: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0050 + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldarg.1 + IL_0008: isinst class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_000d: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_004e + + .line 16707566,16707566 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: pop + .line 16707566,16707566 : 0,0 '' + IL_0013: ldarg.0 + IL_0014: stloc.1 + IL_0015: ldloc.0 + IL_0016: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0017: ldloc.1 + IL_0018: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_001d: stloc.3 + IL_001e: ldloc.2 + IL_001f: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0024: stloc.s V_4 + IL_0026: ldarg.2 + IL_0027: ldloc.3 + IL_0028: ldloc.s V_4 + IL_002a: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_002e: brfalse.s IL_004b - - .line 16707566,16707566 : 0,0 '' - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_003d: stloc.s V_4 - IL_003f: ldarg.2 - IL_0040: ldloc.3 - IL_0041: ldloc.s V_4 - IL_0043: tail. - IL_0045: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_002f: brfalse.s IL_004c + + .line 16707566,16707566 : 0,0 '' + IL_0031: ldloc.1 + IL_0032: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0037: stloc.3 + IL_0038: ldloc.2 + IL_0039: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_003e: stloc.s V_4 + IL_0040: ldarg.2 + IL_0041: ldloc.3 + IL_0042: ldloc.s V_4 + IL_0044: tail. + IL_0046: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_004a: ret + IL_004b: ret .line 16707566,16707566 : 0,0 '' - IL_004b: ldc.i4.0 - IL_004c: ret + IL_004c: ldc.i4.0 + IL_004d: ret .line 16707566,16707566 : 0,0 '' - IL_004d: ldc.i4.0 - IL_004e: ret + IL_004e: ldc.i4.0 + IL_004f: ret .line 16707566,16707566 : 0,0 '' - IL_004f: ldarg.1 - IL_0050: ldnull - IL_0051: cgt.un - IL_0053: ldc.i4.0 - IL_0054: ceq - IL_0056: ret + IL_0050: ldarg.1 + IL_0051: ldnull + IL_0052: cgt.un + IL_0054: ldc.i4.0 + IL_0055: ceq + IL_0057: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final instance bool Equals(class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 77 (0x4d) + // Code size 78 (0x4e) .maxstack 4 .locals init ([0] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] !a V_2, [3] !a V_3) + .line 4,4 : 10,20 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0045 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0043 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0044 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + .line 16707566,16707566 : 0,0 '' + IL_0013: ldloc.0 + IL_0014: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0019: stloc.2 + IL_001a: ldloc.1 + IL_001b: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0020: stloc.3 + IL_0021: ldloc.2 + IL_0022: ldloc.3 + IL_0023: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0027: brfalse.s IL_0041 - - .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.0 - IL_002a: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_002f: stloc.2 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldloc.3 - IL_0039: tail. - IL_003b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_0028: brfalse.s IL_0042 + + .line 16707566,16707566 : 0,0 '' + IL_002a: ldloc.0 + IL_002b: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0030: stloc.2 + IL_0031: ldloc.1 + IL_0032: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0037: stloc.3 + IL_0038: ldloc.2 + IL_0039: ldloc.3 + IL_003a: tail. + IL_003c: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0040: ret + IL_0041: ret .line 16707566,16707566 : 0,0 '' - IL_0041: ldc.i4.0 - IL_0042: ret + IL_0042: ldc.i4.0 + IL_0043: ret .line 16707566,16707566 : 0,0 '' - IL_0043: ldc.i4.0 - IL_0044: ret + IL_0044: ldc.i4.0 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldarg.1 - IL_0046: ldnull - IL_0047: cgt.un - IL_0049: ldc.i4.0 - IL_004a: ceq - IL_004c: ret + IL_0046: ldarg.1 + IL_0047: ldnull + IL_0048: cgt.un + IL_004a: ldc.i4.0 + IL_004b: ceq + IL_004d: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final @@ -640,6 +655,7 @@ IL_0000: ldarg.1 IL_0001: isinst class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0014 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare10.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare10.il.bsl index 5b5491417d9..8184984ccad 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare10.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare10.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000A98 Length: 0x0000058E } .module Compare10.dll -// MVID: {60BE1F16-04BF-1753-A745-0383161FBE60} +// MVID: {611C550D-04BF-1753-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06C00000 +// Image base: 0x07060000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Compare10/CompareMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 120 (0x78) .maxstack 4 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_1, @@ -187,109 +187,114 @@ [4] int32 V_4, [5] int32 V_5) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare10.fsx' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + .line 4,4 : 10,13 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare10.fsx' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_006e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0018: stloc.3 + IL_0019: ldloc.0 + IL_001a: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: stloc.s V_4 + IL_0021: ldloc.1 + IL_0022: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0027: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' + IL_0029: ldloc.s V_4 + IL_002b: ldloc.s V_5 + IL_002d: bge.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_002f: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0030: nop + IL_0031: br.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_0033: ldloc.s V_4 + IL_0035: ldloc.s V_5 + IL_0037: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0039: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_003a: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_003b: ldloc.2 + IL_003c: ldc.i4.0 + IL_003d: bge.s IL_0041 .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_003f: ldloc.2 + IL_0040: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_0041: ldloc.2 + IL_0042: ldc.i4.0 + IL_0043: ble.s IL_0047 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_0045: ldloc.2 + IL_0046: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0047: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_004c: stloc.3 + IL_004d: ldloc.0 + IL_004e: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0053: stloc.s V_4 + IL_0055: ldloc.1 + IL_0056: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_005b: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' + IL_005d: ldloc.s V_4 + IL_005f: ldloc.s V_5 + IL_0061: bge.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_0063: ldc.i4.m1 + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_0065: ldloc.s V_4 + IL_0067: ldloc.s V_5 + IL_0069: cgt + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_006c: ldc.i4.1 + IL_006d: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_006e: ldarg.1 + IL_006f: ldnull + IL_0070: cgt.un + IL_0072: brfalse.s IL_0076 .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_0074: ldc.i4.m1 + IL_0075: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_0076: ldc.i4.0 + IL_0077: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -323,6 +328,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -349,6 +355,7 @@ IL_0026: ldloc.2 IL_0027: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 IL_002c: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' IL_002e: ldloc.s V_4 IL_0030: ldloc.s V_5 IL_0032: bge.s IL_0038 @@ -367,6 +374,7 @@ IL_003e: nop .line 16707566,16707566 : 0,0 '' IL_003f: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_0040: ldloc.3 IL_0041: ldc.i4.0 IL_0042: bge.s IL_0046 @@ -391,6 +399,7 @@ IL_0054: ldloc.2 IL_0055: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 IL_005a: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' IL_005c: ldloc.s V_4 IL_005e: ldloc.s V_5 IL_0060: bge.s IL_0064 @@ -429,58 +438,61 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 61 (0x3d) .maxstack 7 .locals init ([0] int32 V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_1) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop - .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add + .line 4,4 : 10,13 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003b + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: pop + .line 16707566,16707566 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldloc.1 + IL_0015: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_001a: ldloc.0 + IL_001b: ldc.i4.6 + IL_001c: shl + IL_001d: ldloc.0 + IL_001e: ldc.i4.2 + IL_001f: shr IL_0020: add IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_002e: ldloc.0 - IL_002f: ldc.i4.6 - IL_0030: shl - IL_0031: ldloc.0 - IL_0032: ldc.i4.2 - IL_0033: shr - IL_0034: add + IL_0022: add + IL_0023: stloc.0 + IL_0024: ldc.i4 0x9e3779b9 + IL_0029: ldloc.1 + IL_002a: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_002f: ldloc.0 + IL_0030: ldc.i4.6 + IL_0031: shl + IL_0032: ldloc.0 + IL_0033: ldc.i4.2 + IL_0034: shr IL_0035: add IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ret + IL_0037: add + IL_0038: stloc.0 + IL_0039: ldloc.0 + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_003b: ldc.i4.0 + IL_003c: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -501,120 +513,127 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 64 (0x40) .maxstack 4 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_1, [2] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_2) + .line 4,4 : 10,13 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0038 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_0007: ldarg.1 + IL_0008: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/Key + IL_000d: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0036 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_0011: ldarg.0 + IL_0012: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0013: ldarg.0 + IL_0014: stloc.1 + IL_0015: ldloc.0 + IL_0016: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0017: ldloc.1 + IL_0018: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_001d: ldloc.2 + IL_001e: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0023: bne.un.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0025: ldloc.1 + IL_0026: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_002b: ldloc.2 + IL_002c: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0031: ceq + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0036: ldc.i4.0 + IL_0037: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0038: ldarg.1 + IL_0039: ldnull + IL_003a: cgt.un + IL_003c: ldc.i4.0 + IL_003d: ceq + IL_003f: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Compare10/CompareMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_1) + .line 4,4 : 10,13 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + .line 16707566,16707566 : 0,0 '' + IL_0013: ldloc.0 + IL_0014: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.1 + IL_001a: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0021: ldloc.0 + IL_0022: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.1 + IL_0028: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -628,6 +647,7 @@ IL_0000: ldarg.1 IL_0001: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 @@ -792,7 +812,7 @@ instance int32 CompareTo(class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 169 (0xa9) + // Code size 170 (0xaa) .maxstack 5 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -805,116 +825,120 @@ [8] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_8, [9] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_9, [10] int32 V_10) + .line 5,5 : 10,26 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_009f + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse IL_00a0 .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse IL_009d + IL_000a: ldarg.1 + IL_000b: ldnull + IL_000c: cgt.un + IL_000e: brfalse IL_009e .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_0013: ldarg.0 + IL_0014: pop .line 16707566,16707566 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.0 - IL_0016: ldarg.1 - IL_0017: stloc.1 - IL_0018: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_001d: stloc.3 - IL_001e: ldloc.0 - IL_001f: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.1 - IL_0027: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_002c: stloc.s V_5 - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: ldloc.3 - IL_0033: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_0015: ldarg.0 + IL_0016: stloc.0 + IL_0017: ldarg.1 + IL_0018: stloc.1 + IL_0019: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_001e: stloc.3 + IL_001f: ldloc.0 + IL_0020: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0025: stloc.s V_4 + IL_0027: ldloc.1 + IL_0028: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_002d: stloc.s V_5 + IL_002f: ldloc.s V_4 + IL_0031: ldloc.s V_5 + IL_0033: ldloc.3 + IL_0034: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0038: stloc.2 - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: bge.s IL_003f + IL_0039: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ldc.i4.0 - IL_0041: ble.s IL_0045 + IL_0040: ldloc.2 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_0043: ldloc.2 - IL_0044: ret + IL_0044: ldloc.2 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_0045: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004a: stloc.3 - IL_004b: ldloc.0 - IL_004c: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0051: stloc.s V_6 - IL_0053: ldloc.1 - IL_0054: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0059: stloc.s V_7 - IL_005b: ldloc.s V_6 - IL_005d: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0062: stloc.s V_4 - IL_0064: ldloc.s V_6 - IL_0066: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_006b: stloc.s V_5 - IL_006d: ldloc.s V_7 - IL_006f: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0074: stloc.s V_8 - IL_0076: ldloc.s V_7 - IL_0078: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_007d: stloc.s V_9 - IL_007f: ldloc.s V_4 - IL_0081: ldloc.s V_8 - IL_0083: ldloc.3 - IL_0084: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_004b: stloc.3 + IL_004c: ldloc.0 + IL_004d: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0052: stloc.s V_6 + IL_0054: ldloc.1 + IL_0055: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_005a: stloc.s V_7 + IL_005c: ldloc.s V_6 + IL_005e: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0063: stloc.s V_4 + IL_0065: ldloc.s V_6 + IL_0067: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_006c: stloc.s V_5 + IL_006e: ldloc.s V_7 + IL_0070: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0075: stloc.s V_8 + IL_0077: ldloc.s V_7 + IL_0079: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_007e: stloc.s V_9 + IL_0080: ldloc.s V_4 + IL_0082: ldloc.s V_8 + IL_0084: ldloc.3 + IL_0085: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0089: stloc.s V_10 - IL_008b: ldloc.s V_10 - IL_008d: brfalse.s IL_0092 + IL_008a: stloc.s V_10 + .line 16707566,16707566 : 0,0 '' + IL_008c: ldloc.s V_10 + IL_008e: brfalse.s IL_0093 .line 16707566,16707566 : 0,0 '' - IL_008f: ldloc.s V_10 - IL_0091: ret + IL_0090: ldloc.s V_10 + IL_0092: ret .line 16707566,16707566 : 0,0 '' - IL_0092: ldloc.s V_5 - IL_0094: ldloc.s V_9 - IL_0096: ldloc.3 - IL_0097: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_0093: ldloc.s V_5 + IL_0095: ldloc.s V_9 + IL_0097: ldloc.3 + IL_0098: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_009c: ret + IL_009d: ret .line 16707566,16707566 : 0,0 '' - IL_009d: ldc.i4.1 - IL_009e: ret + IL_009e: ldc.i4.1 + IL_009f: ret .line 16707566,16707566 : 0,0 '' - IL_009f: ldarg.1 - IL_00a0: ldnull - IL_00a1: cgt.un - IL_00a3: brfalse.s IL_00a7 + IL_00a0: ldarg.1 + IL_00a1: ldnull + IL_00a2: cgt.un + IL_00a4: brfalse.s IL_00a8 .line 16707566,16707566 : 0,0 '' - IL_00a5: ldc.i4.m1 - IL_00a6: ret + IL_00a6: ldc.i4.m1 + IL_00a7: ret .line 16707566,16707566 : 0,0 '' - IL_00a7: ldc.i4.0 - IL_00a8: ret + IL_00a8: ldc.i4.0 + IL_00a9: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final @@ -953,6 +977,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -985,6 +1010,7 @@ IL_0039: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) IL_003e: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_003f: ldloc.3 IL_0040: ldc.i4.0 IL_0041: bge.s IL_0045 @@ -1027,6 +1053,7 @@ IL_0084: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) IL_0089: stloc.s V_10 + .line 16707566,16707566 : 0,0 '' IL_008b: ldloc.s V_10 IL_008d: brfalse.s IL_0092 @@ -1066,7 +1093,7 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 107 (0x6b) + // Code size 108 (0x6c) .maxstack 7 .locals init ([0] int32 V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1074,76 +1101,79 @@ [3] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_3, [4] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_4, [5] int32 V_5) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0069 - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop - .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0019: stloc.2 - IL_001a: ldloc.2 - IL_001b: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0020: stloc.3 - IL_0021: ldloc.2 - IL_0022: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0027: stloc.s V_4 - IL_0029: ldloc.3 - IL_002a: ldarg.1 - IL_002b: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: ldc.i4.5 - IL_0035: shl - IL_0036: ldloc.s V_5 - IL_0038: add - IL_0039: ldloc.s V_4 - IL_003b: ldarg.1 - IL_003c: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0041: xor - IL_0042: ldloc.0 - IL_0043: ldc.i4.6 - IL_0044: shl - IL_0045: ldloc.0 - IL_0046: ldc.i4.2 - IL_0047: shr - IL_0048: add + .line 5,5 : 10,26 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_006a + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: pop + .line 16707566,16707566 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldloc.1 + IL_0015: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0021: stloc.3 + IL_0022: ldloc.2 + IL_0023: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0028: stloc.s V_4 + IL_002a: ldloc.3 + IL_002b: ldarg.1 + IL_002c: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_0031: stloc.s V_5 + IL_0033: ldloc.s V_5 + IL_0035: ldc.i4.5 + IL_0036: shl + IL_0037: ldloc.s V_5 + IL_0039: add + IL_003a: ldloc.s V_4 + IL_003c: ldarg.1 + IL_003d: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_0042: xor + IL_0043: ldloc.0 + IL_0044: ldc.i4.6 + IL_0045: shl + IL_0046: ldloc.0 + IL_0047: ldc.i4.2 + IL_0048: shr IL_0049: add IL_004a: add - IL_004b: stloc.0 - IL_004c: ldc.i4 0x9e3779b9 - IL_0051: ldloc.1 - IL_0052: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0057: ldarg.1 - IL_0058: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_005d: ldloc.0 - IL_005e: ldc.i4.6 - IL_005f: shl - IL_0060: ldloc.0 - IL_0061: ldc.i4.2 - IL_0062: shr - IL_0063: add + IL_004b: add + IL_004c: stloc.0 + IL_004d: ldc.i4 0x9e3779b9 + IL_0052: ldloc.1 + IL_0053: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0058: ldarg.1 + IL_0059: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_005e: ldloc.0 + IL_005f: ldc.i4.6 + IL_0060: shl + IL_0061: ldloc.0 + IL_0062: ldc.i4.2 + IL_0063: shr IL_0064: add IL_0065: add - IL_0066: stloc.0 - IL_0067: ldloc.0 - IL_0068: ret + IL_0066: add + IL_0067: stloc.0 + IL_0068: ldloc.0 + IL_0069: ret .line 16707566,16707566 : 0,0 '' - IL_0069: ldc.i4.0 - IL_006a: ret + IL_006a: ldc.i4.0 + IL_006b: ret } // end of method KeyWithInnerKeys::GetHashCode .method public hidebysig virtual final @@ -1164,7 +1194,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 138 (0x8a) + // Code size 139 (0x8b) .maxstack 5 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1175,155 +1205,163 @@ [6] class [mscorlib]System.Tuple`2 V_6, [7] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_7, [8] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_8) + .line 5,5 : 10,26 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_0082 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse IL_0083 .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_000f: stloc.0 - IL_0010: ldloc.0 - IL_0011: brfalse.s IL_0080 + IL_000a: ldarg.1 + IL_000b: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_0010: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0011: ldloc.0 + IL_0012: brfalse.s IL_0081 .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0014: ldarg.0 + IL_0015: pop .line 16707566,16707566 : 0,0 '' - IL_0015: ldarg.0 - IL_0016: stloc.1 - IL_0017: ldloc.0 - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0026: stloc.s V_4 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldarg.2 - IL_002c: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_0016: ldarg.0 + IL_0017: stloc.1 + IL_0018: ldloc.0 + IL_0019: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_001a: ldloc.1 + IL_001b: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0020: stloc.3 + IL_0021: ldloc.2 + IL_0022: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0027: stloc.s V_4 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: ldarg.2 + IL_002d: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_0031: brfalse.s IL_007e + IL_0032: brfalse.s IL_007f .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.1 - IL_0034: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0039: stloc.s V_5 - IL_003b: ldloc.2 - IL_003c: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0041: stloc.s V_6 - IL_0043: ldloc.s V_5 - IL_0045: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_004a: stloc.3 - IL_004b: ldloc.s V_5 - IL_004d: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0052: stloc.s V_4 - IL_0054: ldloc.s V_6 - IL_0056: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_005b: stloc.s V_7 - IL_005d: ldloc.s V_6 - IL_005f: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0064: stloc.s V_8 - IL_0066: ldloc.3 - IL_0067: ldloc.s V_7 - IL_0069: ldarg.2 - IL_006a: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_0034: ldloc.1 + IL_0035: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_003a: stloc.s V_5 + IL_003c: ldloc.2 + IL_003d: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0042: stloc.s V_6 + IL_0044: ldloc.s V_5 + IL_0046: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_004b: stloc.3 + IL_004c: ldloc.s V_5 + IL_004e: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0053: stloc.s V_4 + IL_0055: ldloc.s V_6 + IL_0057: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_005c: stloc.s V_7 + IL_005e: ldloc.s V_6 + IL_0060: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0065: stloc.s V_8 + .line 16707566,16707566 : 0,0 '' + IL_0067: ldloc.3 + IL_0068: ldloc.s V_7 + IL_006a: ldarg.2 + IL_006b: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_006f: brfalse.s IL_007c + IL_0070: brfalse.s IL_007d .line 16707566,16707566 : 0,0 '' - IL_0071: ldloc.s V_4 - IL_0073: ldloc.s V_8 - IL_0075: ldarg.2 - IL_0076: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_0072: ldloc.s V_4 + IL_0074: ldloc.s V_8 + IL_0076: ldarg.2 + IL_0077: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_007b: ret + IL_007c: ret .line 16707566,16707566 : 0,0 '' - IL_007c: ldc.i4.0 - IL_007d: ret + IL_007d: ldc.i4.0 + IL_007e: ret .line 16707566,16707566 : 0,0 '' - IL_007e: ldc.i4.0 - IL_007f: ret + IL_007f: ldc.i4.0 + IL_0080: ret .line 16707566,16707566 : 0,0 '' - IL_0080: ldc.i4.0 - IL_0081: ret + IL_0081: ldc.i4.0 + IL_0082: ret .line 16707566,16707566 : 0,0 '' - IL_0082: ldarg.1 - IL_0083: ldnull - IL_0084: cgt.un - IL_0086: ldc.i4.0 - IL_0087: ceq - IL_0089: ret + IL_0083: ldarg.1 + IL_0084: ldnull + IL_0085: cgt.un + IL_0087: ldc.i4.0 + IL_0088: ceq + IL_008a: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final instance bool Equals(class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 69 (0x45) + // Code size 70 (0x46) .maxstack 4 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1) + .line 5,5 : 10,26 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003d + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_003b + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_003c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0018: ldloc.1 - IL_0019: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001e: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(class Compare10/CompareMicroPerfAndCodeGenerationTests/Key) - IL_0023: brfalse.s IL_0039 - - .line 16707566,16707566 : 0,0 '' - IL_0025: ldloc.0 - IL_0026: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_002b: ldloc.1 - IL_002c: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0031: tail. - IL_0033: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + .line 16707566,16707566 : 0,0 '' + IL_0013: ldloc.0 + IL_0014: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0019: ldloc.1 + IL_001a: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_001f: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(class Compare10/CompareMicroPerfAndCodeGenerationTests/Key) + IL_0024: brfalse.s IL_003a + + .line 16707566,16707566 : 0,0 '' + IL_0026: ldloc.0 + IL_0027: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_002c: ldloc.1 + IL_002d: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0032: tail. + IL_0034: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, !!0) - IL_0038: ret + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 16707566,16707566 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_003c: ldc.i4.0 + IL_003d: ret .line 16707566,16707566 : 0,0 '' - IL_003d: ldarg.1 - IL_003e: ldnull - IL_003f: cgt.un - IL_0041: ldc.i4.0 - IL_0042: ceq - IL_0044: ret + IL_003e: ldarg.1 + IL_003f: ldnull + IL_0040: cgt.un + IL_0042: ldc.i4.0 + IL_0043: ceq + IL_0045: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final @@ -1337,6 +1375,7 @@ IL_0000: ldarg.1 IL_0001: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0014 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.il.bsl index 9942460e50b..cc4f7494b64 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x00000238 Length: 0x000000B6 } .module Equals03.dll -// MVID: {60BE1F16-0759-3313-A745-0383161FBE60} +// MVID: {611C550D-0759-3313-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05410000 +// Image base: 0x07160000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,7 +62,7 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.CompilationMappingAttribute::.ctor(valuetype [FSharp.Core]Microsoft.FSharp.Core.SourceConstructFlags) = ( 01 00 07 00 00 00 00 00 ) .method public static bool f4_tuple5() cil managed { - // Code size 63 (0x3f) + // Code size 64 (0x40) .maxstack 4 .locals init ([0] bool x, [1] int32 i) @@ -73,41 +73,43 @@ .line 8,8 : 8,32 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 - IL_0004: br.s IL_0035 + IL_0004: br.s IL_0036 .line 9,9 : 12,26 '' - IL_0006: ldstr "5" - IL_000b: ldstr "5" - IL_0010: call bool [netstandard]System.String::Equals(string, + IL_0006: nop + .line 16707566,16707566 : 0,0 '' + IL_0007: ldstr "5" + IL_000c: ldstr "5" + IL_0011: call bool [netstandard]System.String::Equals(string, string) - IL_0015: brfalse.s IL_002e + IL_0016: brfalse.s IL_002f .line 16707566,16707566 : 0,0 '' - IL_0017: ldc.r8 6. - IL_0020: ldc.r8 7. - IL_0029: ceq + IL_0018: ldc.r8 6. + IL_0021: ldc.r8 7. + IL_002a: ceq .line 16707566,16707566 : 0,0 '' - IL_002b: nop - IL_002c: br.s IL_0030 + IL_002c: nop + IL_002d: br.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.0 + IL_002f: ldc.i4.0 .line 16707566,16707566 : 0,0 '' - IL_002f: nop + IL_0030: nop .line 16707566,16707566 : 0,0 '' - IL_0030: stloc.0 - IL_0031: ldloc.1 - IL_0032: ldc.i4.1 - IL_0033: add - IL_0034: stloc.1 + IL_0031: stloc.0 + IL_0032: ldloc.1 + IL_0033: ldc.i4.1 + IL_0034: add + IL_0035: stloc.1 .line 8,8 : 8,32 '' - IL_0035: ldloc.1 - IL_0036: ldc.i4 0x989681 - IL_003b: blt.s IL_0006 + IL_0036: ldloc.1 + IL_0037: ldc.i4 0x989681 + IL_003c: blt.s IL_0006 .line 10,10 : 8,9 '' - IL_003d: ldloc.0 - IL_003e: ret + IL_003e: ldloc.0 + IL_003f: ret } // end of method EqualsMicroPerfAndCodeGenerationTests::f4_tuple5 } // end of class EqualsMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals04.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals04.il.bsl index f250eab6384..b2b49483a4b 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals04.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals04.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006E0 Length: 0x000003B7 } .module Equals04.dll -// MVID: {60BE1F16-0759-EA8A-A745-0383161FBE60} +// MVID: {611C550D-0759-EA8A-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07050000 +// Image base: 0x071F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 120 (0x78) .maxstack 4 .locals init ([0] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_1, @@ -187,109 +187,114 @@ [4] int32 V_4, [5] int32 V_5) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals04.fsx' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + .line 4,4 : 10,13 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals04.fsx' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_006e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop + .line 16707566,16707566 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0018: stloc.3 + IL_0019: ldloc.0 + IL_001a: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: stloc.s V_4 + IL_0021: ldloc.1 + IL_0022: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0027: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.s V_5 + IL_002d: bge.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_002f: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0030: nop + IL_0031: br.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_0033: ldloc.s V_4 + IL_0035: ldloc.s V_5 + IL_0037: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0039: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_003a: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_003b: ldloc.2 + IL_003c: ldc.i4.0 + IL_003d: bge.s IL_0041 .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_003f: ldloc.2 + IL_0040: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_0041: ldloc.2 + IL_0042: ldc.i4.0 + IL_0043: ble.s IL_0047 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_0045: ldloc.2 + IL_0046: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0047: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_004c: stloc.3 + IL_004d: ldloc.0 + IL_004e: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0053: stloc.s V_4 + IL_0055: ldloc.1 + IL_0056: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_005b: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' + IL_005d: ldloc.s V_4 + IL_005f: ldloc.s V_5 + IL_0061: bge.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_0063: ldc.i4.m1 + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_0065: ldloc.s V_4 + IL_0067: ldloc.s V_5 + IL_0069: cgt + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_006c: ldc.i4.1 + IL_006d: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_006e: ldarg.1 + IL_006f: ldnull + IL_0070: cgt.un + IL_0072: brfalse.s IL_0076 .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_0074: ldc.i4.m1 + IL_0075: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_0076: ldc.i4.0 + IL_0077: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -323,6 +328,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any Equals04/EqualsMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -349,6 +355,7 @@ IL_0026: ldloc.2 IL_0027: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 IL_002c: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' IL_002e: ldloc.s V_4 IL_0030: ldloc.s V_5 IL_0032: bge.s IL_0038 @@ -367,6 +374,7 @@ IL_003e: nop .line 16707566,16707566 : 0,0 '' IL_003f: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_0040: ldloc.3 IL_0041: ldc.i4.0 IL_0042: bge.s IL_0046 @@ -391,6 +399,7 @@ IL_0054: ldloc.2 IL_0055: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 IL_005a: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' IL_005c: ldloc.s V_4 IL_005e: ldloc.s V_5 IL_0060: bge.s IL_0064 @@ -429,58 +438,61 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 61 (0x3d) .maxstack 7 .locals init ([0] int32 V_0, [1] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_1) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop - .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add + .line 4,4 : 10,13 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003b + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: pop + .line 16707566,16707566 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldloc.1 + IL_0015: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_001a: ldloc.0 + IL_001b: ldc.i4.6 + IL_001c: shl + IL_001d: ldloc.0 + IL_001e: ldc.i4.2 + IL_001f: shr IL_0020: add IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_002e: ldloc.0 - IL_002f: ldc.i4.6 - IL_0030: shl - IL_0031: ldloc.0 - IL_0032: ldc.i4.2 - IL_0033: shr - IL_0034: add + IL_0022: add + IL_0023: stloc.0 + IL_0024: ldc.i4 0x9e3779b9 + IL_0029: ldloc.1 + IL_002a: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_002f: ldloc.0 + IL_0030: ldc.i4.6 + IL_0031: shl + IL_0032: ldloc.0 + IL_0033: ldc.i4.2 + IL_0034: shr IL_0035: add IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ret + IL_0037: add + IL_0038: stloc.0 + IL_0039: ldloc.0 + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_003b: ldc.i4.0 + IL_003c: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -501,120 +513,127 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 64 (0x40) .maxstack 4 .locals init ([0] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_1, [2] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_2) + .line 4,4 : 10,13 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0038 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Equals04/EqualsMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_0007: ldarg.1 + IL_0008: isinst Equals04/EqualsMicroPerfAndCodeGenerationTests/Key + IL_000d: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0036 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_0011: ldarg.0 + IL_0012: pop + .line 16707566,16707566 : 0,0 '' + IL_0013: ldarg.0 + IL_0014: stloc.1 + IL_0015: ldloc.0 + IL_0016: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0017: ldloc.1 + IL_0018: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_001d: ldloc.2 + IL_001e: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0023: bne.un.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0025: ldloc.1 + IL_0026: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_002b: ldloc.2 + IL_002c: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0031: ceq + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0036: ldc.i4.0 + IL_0037: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0038: ldarg.1 + IL_0039: ldnull + IL_003a: cgt.un + IL_003c: ldc.i4.0 + IL_003d: ceq + IL_003f: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_1) + .line 4,4 : 10,13 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop + .line 16707566,16707566 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0013: ldloc.0 + IL_0014: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.1 + IL_001a: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0021: ldloc.0 + IL_0022: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.1 + IL_0028: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -628,6 +647,7 @@ IL_0000: ldarg.1 IL_0001: isinst Equals04/EqualsMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals05.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals05.il.bsl index 0c1255075bf..6bdcdf1022c 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals05.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals05.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006D0 Length: 0x000003B9 } .module Equals05.dll -// MVID: {60BE1F16-0759-CBC5-A745-0383161FBE60} +// MVID: {611C550D-0759-CBC5-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x067E0000 +// Image base: 0x053D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -123,109 +123,114 @@ instance int32 CompareTo(class Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 101 (0x65) + // Code size 102 (0x66) .maxstack 4 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IComparer V_1, [2] int32 V_2, [3] int32 V_3) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals05.fsx' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_005b + .line 4,4 : 10,14 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals05.fsx' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_005c .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0059 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_005a .line 16707566,16707566 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: stloc.2 - IL_0019: ldarg.1 - IL_001a: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: bge.s IL_0028 + IL_000d: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0012: stloc.1 + IL_0013: ldarg.0 + IL_0014: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: stloc.2 + IL_001a: ldarg.1 + IL_001b: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0020: stloc.3 + .line 16707566,16707566 : 0,0 '' + IL_0021: ldloc.2 + IL_0022: ldloc.3 + IL_0023: bge.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0024: ldc.i4.m1 + IL_0025: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0025: nop - IL_0026: br.s IL_002d + IL_0026: nop + IL_0027: br.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.2 - IL_0029: ldloc.3 - IL_002a: cgt + IL_0029: ldloc.2 + IL_002a: ldloc.3 + IL_002b: cgt .line 16707566,16707566 : 0,0 '' - IL_002c: nop + IL_002d: nop .line 16707566,16707566 : 0,0 '' - IL_002d: stloc.0 - IL_002e: ldloc.0 - IL_002f: ldc.i4.0 - IL_0030: bge.s IL_0034 + IL_002e: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_002f: ldloc.0 + IL_0030: ldc.i4.0 + IL_0031: bge.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.0 - IL_0033: ret + IL_0033: ldloc.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldloc.0 - IL_0035: ldc.i4.0 - IL_0036: ble.s IL_003a + IL_0035: ldloc.0 + IL_0036: ldc.i4.0 + IL_0037: ble.s IL_003b .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.0 - IL_0039: ret + IL_0039: ldloc.0 + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_003a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_003f: stloc.1 - IL_0040: ldarg.0 - IL_0041: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0046: stloc.2 - IL_0047: ldarg.1 - IL_0048: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_004d: stloc.3 - IL_004e: ldloc.2 - IL_004f: ldloc.3 - IL_0050: bge.s IL_0054 + IL_003b: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0040: stloc.1 + IL_0041: ldarg.0 + IL_0042: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0047: stloc.2 + IL_0048: ldarg.1 + IL_0049: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_004e: stloc.3 + .line 16707566,16707566 : 0,0 '' + IL_004f: ldloc.2 + IL_0050: ldloc.3 + IL_0051: bge.s IL_0055 .line 16707566,16707566 : 0,0 '' - IL_0052: ldc.i4.m1 - IL_0053: ret + IL_0053: ldc.i4.m1 + IL_0054: ret .line 16707566,16707566 : 0,0 '' - IL_0054: ldloc.2 - IL_0055: ldloc.3 - IL_0056: cgt - IL_0058: ret + IL_0055: ldloc.2 + IL_0056: ldloc.3 + IL_0057: cgt + IL_0059: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldc.i4.1 - IL_005a: ret + IL_005a: ldc.i4.1 + IL_005b: ret .line 16707566,16707566 : 0,0 '' - IL_005b: ldarg.1 - IL_005c: ldnull - IL_005d: cgt.un - IL_005f: brfalse.s IL_0063 + IL_005c: ldarg.1 + IL_005d: ldnull + IL_005e: cgt.un + IL_0060: brfalse.s IL_0064 .line 16707566,16707566 : 0,0 '' - IL_0061: ldc.i4.m1 - IL_0062: ret + IL_0062: ldc.i4.m1 + IL_0063: ret .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.0 - IL_0064: ret + IL_0064: ldc.i4.0 + IL_0065: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final @@ -257,6 +262,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -276,6 +282,7 @@ IL_001f: ldloc.0 IL_0020: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ IL_0025: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_0026: ldloc.2 IL_0027: ldloc.3 IL_0028: bge.s IL_002e @@ -294,6 +301,7 @@ IL_0032: nop .line 16707566,16707566 : 0,0 '' IL_0033: stloc.1 + .line 16707566,16707566 : 0,0 '' IL_0034: ldloc.1 IL_0035: ldc.i4.0 IL_0036: bge.s IL_003a @@ -318,6 +326,7 @@ IL_0047: ldloc.0 IL_0048: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ IL_004d: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_004e: ldloc.2 IL_004f: ldloc.3 IL_0050: bge.s IL_0054 @@ -356,50 +365,52 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 54 (0x36) + // Code size 55 (0x37) .maxstack 7 .locals init ([0] int32 V_0) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0034 - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.0 - IL_000e: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0013: ldloc.0 - IL_0014: ldc.i4.6 - IL_0015: shl - IL_0016: ldloc.0 - IL_0017: ldc.i4.2 - IL_0018: shr - IL_0019: add + .line 4,4 : 10,14 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0035 + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + IL_0009: ldc.i4 0x9e3779b9 + IL_000e: ldarg.0 + IL_000f: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0014: ldloc.0 + IL_0015: ldc.i4.6 + IL_0016: shl + IL_0017: ldloc.0 + IL_0018: ldc.i4.2 + IL_0019: shr IL_001a: add IL_001b: add - IL_001c: stloc.0 - IL_001d: ldc.i4 0x9e3779b9 - IL_0022: ldarg.0 - IL_0023: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0028: ldloc.0 - IL_0029: ldc.i4.6 - IL_002a: shl - IL_002b: ldloc.0 - IL_002c: ldc.i4.2 - IL_002d: shr - IL_002e: add + IL_001c: add + IL_001d: stloc.0 + IL_001e: ldc.i4 0x9e3779b9 + IL_0023: ldarg.0 + IL_0024: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl + IL_002c: ldloc.0 + IL_002d: ldc.i4.2 + IL_002e: shr IL_002f: add IL_0030: add - IL_0031: stloc.0 - IL_0032: ldloc.0 - IL_0033: ret + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method KeyR::GetHashCode .method public hidebysig virtual final @@ -420,102 +431,107 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 57 (0x39) + // Code size 58 (0x3a) .maxstack 4 .locals init ([0] class Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR V_0) + .line 4,4 : 10,14 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0031 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002f + IL_0007: ldarg.1 + IL_0008: isinst Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_000d: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0016: ldloc.0 - IL_0017: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001c: bne.un.s IL_002d + IL_0011: ldarg.0 + IL_0012: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0017: ldloc.0 + IL_0018: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_001d: bne.un.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_001e: ldarg.0 - IL_001f: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0024: ldloc.0 - IL_0025: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_002a: ceq - IL_002c: ret + IL_001f: ldarg.0 + IL_0020: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0025: ldloc.0 + IL_0026: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_002b: ceq + IL_002d: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldc.i4.0 - IL_002e: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldarg.1 - IL_0032: ldnull - IL_0033: cgt.un - IL_0035: ldc.i4.0 - IL_0036: ceq - IL_0038: ret + IL_0032: ldarg.1 + IL_0033: ldnull + IL_0034: cgt.un + IL_0036: ldc.i4.0 + IL_0037: ceq + IL_0039: ret } // end of method KeyR::Equals .method public hidebysig virtual final instance bool Equals(class Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 54 (0x36) .maxstack 8 + .line 4,4 : 10,14 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002d + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_002b + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0012: ldarg.1 - IL_0013: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: bne.un.s IL_0029 + IL_000d: ldarg.0 + IL_000e: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0013: ldarg.1 + IL_0014: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: bne.un.s IL_002a .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0020: ldarg.1 - IL_0021: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0026: ceq - IL_0028: ret + IL_001b: ldarg.0 + IL_001c: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0021: ldarg.1 + IL_0022: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0027: ceq + IL_0029: ret .line 16707566,16707566 : 0,0 '' - IL_0029: ldc.i4.0 - IL_002a: ret + IL_002a: ldc.i4.0 + IL_002b: ret .line 16707566,16707566 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldarg.1 - IL_002e: ldnull - IL_002f: cgt.un - IL_0031: ldc.i4.0 - IL_0032: ceq - IL_0034: ret + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: cgt.un + IL_0032: ldc.i4.0 + IL_0033: ceq + IL_0035: ret } // end of method KeyR::Equals .method public hidebysig virtual final @@ -529,6 +545,7 @@ IL_0000: ldarg.1 IL_0001: isinst Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals06.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals06.il.bsl index 0a53da50d62..1aa09e5000a 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals06.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals06.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000890 Length: 0x00000688 } .module Equals06.dll -// MVID: {60BE1F16-0759-31EC-A745-0383161FBE60} +// MVID: {611C550D-0759-31EC-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06DA0000 +// Image base: 0x056C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 110 (0x6e) + // Code size 111 (0x6f) .maxstack 5 .locals init ([0] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -187,93 +187,96 @@ [4] !a V_4, [5] !a V_5) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals06.fsx' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0064 - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0062 - - .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop - .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + .line 4,4 : 10,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals06.fsx' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0065 + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0063 + + .line 16707566,16707566 : 0,0 '' + IL_000d: ldarg.0 + IL_000e: pop + .line 16707566,16707566 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0018: stloc.3 + IL_0019: ldloc.0 + IL_001a: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_001f: stloc.s V_4 + IL_0021: ldloc.1 + IL_0022: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0027: stloc.s V_5 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0032: stloc.2 - IL_0033: ldloc.2 - IL_0034: ldc.i4.0 - IL_0035: bge.s IL_0039 + IL_0033: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_0037: ldloc.2 - IL_0038: ret + IL_0038: ldloc.2 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: ble.s IL_003f + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_003f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0044: stloc.3 - IL_0045: ldloc.0 - IL_0046: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_004b: stloc.s V_4 - IL_004d: ldloc.1 - IL_004e: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0053: stloc.s V_5 - IL_0055: ldloc.3 - IL_0056: ldloc.s V_4 - IL_0058: ldloc.s V_5 - IL_005a: tail. - IL_005c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.3 + IL_0046: ldloc.0 + IL_0047: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.1 + IL_004f: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0054: stloc.s V_5 + IL_0056: ldloc.3 + IL_0057: ldloc.s V_4 + IL_0059: ldloc.s V_5 + IL_005b: tail. + IL_005d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0061: ret + IL_0062: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.1 - IL_0063: ret + IL_0063: ldc.i4.1 + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldarg.1 - IL_0065: ldnull - IL_0066: cgt.un - IL_0068: brfalse.s IL_006c + IL_0065: ldarg.1 + IL_0066: ldnull + IL_0067: cgt.un + IL_0069: brfalse.s IL_006d .line 16707566,16707566 : 0,0 '' - IL_006a: ldc.i4.m1 - IL_006b: ret + IL_006b: ldc.i4.m1 + IL_006c: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.0 - IL_006d: ret + IL_006d: ldc.i4.0 + IL_006e: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final @@ -308,6 +311,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -341,6 +345,7 @@ !!0, !!0) IL_0038: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_0039: ldloc.3 IL_003a: ldc.i4.0 IL_003b: bge.s IL_003f @@ -398,69 +403,72 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 76 (0x4c) + // Code size 77 (0x4d) .maxstack 7 .locals init ([0] int32 V_0, [1] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] !a V_2) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004a - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop - .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0019: stloc.2 - IL_001a: ldarg.1 - IL_001b: ldloc.2 - IL_001c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + .line 4,4 : 10,20 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_004b + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: pop + .line 16707566,16707566 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldloc.1 + IL_0015: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_001a: stloc.2 + IL_001b: ldarg.1 + IL_001c: ldloc.2 + IL_001d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0) - IL_0021: ldloc.0 - IL_0022: ldc.i4.6 - IL_0023: shl - IL_0024: ldloc.0 - IL_0025: ldc.i4.2 - IL_0026: shr - IL_0027: add + IL_0022: ldloc.0 + IL_0023: ldc.i4.6 + IL_0024: shl + IL_0025: ldloc.0 + IL_0026: ldc.i4.2 + IL_0027: shr IL_0028: add IL_0029: add - IL_002a: stloc.0 - IL_002b: ldc.i4 0x9e3779b9 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0036: stloc.2 - IL_0037: ldarg.1 - IL_0038: ldloc.2 - IL_0039: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_002a: add + IL_002b: stloc.0 + IL_002c: ldc.i4 0x9e3779b9 + IL_0031: ldloc.1 + IL_0032: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0037: stloc.2 + IL_0038: ldarg.1 + IL_0039: ldloc.2 + IL_003a: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0) - IL_003e: ldloc.0 - IL_003f: ldc.i4.6 - IL_0040: shl - IL_0041: ldloc.0 - IL_0042: ldc.i4.2 - IL_0043: shr - IL_0044: add + IL_003f: ldloc.0 + IL_0040: ldc.i4.6 + IL_0041: shl + IL_0042: ldloc.0 + IL_0043: ldc.i4.2 + IL_0044: shr IL_0045: add IL_0046: add - IL_0047: stloc.0 - IL_0048: ldloc.0 - IL_0049: ret + IL_0047: add + IL_0048: stloc.0 + IL_0049: ldloc.0 + IL_004a: ret .line 16707566,16707566 : 0,0 '' - IL_004a: ldc.i4.0 - IL_004b: ret + IL_004b: ldc.i4.0 + IL_004c: ret } // end of method GenericKey`1::GetHashCode .method public hidebysig virtual final @@ -481,152 +489,159 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 87 (0x57) + // Code size 88 (0x58) .maxstack 5 .locals init ([0] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_2, [3] !a V_3, [4] !a V_4) + .line 4,4 : 10,20 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004f - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_004d - - .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop - .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001c: stloc.3 - IL_001d: ldloc.2 - IL_001e: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0023: stloc.s V_4 - IL_0025: ldarg.2 - IL_0026: ldloc.3 - IL_0027: ldloc.s V_4 - IL_0029: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0050 + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldarg.1 + IL_0008: isinst class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_000d: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_004e + + .line 16707566,16707566 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: pop + .line 16707566,16707566 : 0,0 '' + IL_0013: ldarg.0 + IL_0014: stloc.1 + IL_0015: ldloc.0 + IL_0016: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0017: ldloc.1 + IL_0018: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_001d: stloc.3 + IL_001e: ldloc.2 + IL_001f: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0024: stloc.s V_4 + IL_0026: ldarg.2 + IL_0027: ldloc.3 + IL_0028: ldloc.s V_4 + IL_002a: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_002e: brfalse.s IL_004b - - .line 16707566,16707566 : 0,0 '' - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_003d: stloc.s V_4 - IL_003f: ldarg.2 - IL_0040: ldloc.3 - IL_0041: ldloc.s V_4 - IL_0043: tail. - IL_0045: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_002f: brfalse.s IL_004c + + .line 16707566,16707566 : 0,0 '' + IL_0031: ldloc.1 + IL_0032: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0037: stloc.3 + IL_0038: ldloc.2 + IL_0039: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_003e: stloc.s V_4 + IL_0040: ldarg.2 + IL_0041: ldloc.3 + IL_0042: ldloc.s V_4 + IL_0044: tail. + IL_0046: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_004a: ret + IL_004b: ret .line 16707566,16707566 : 0,0 '' - IL_004b: ldc.i4.0 - IL_004c: ret + IL_004c: ldc.i4.0 + IL_004d: ret .line 16707566,16707566 : 0,0 '' - IL_004d: ldc.i4.0 - IL_004e: ret + IL_004e: ldc.i4.0 + IL_004f: ret .line 16707566,16707566 : 0,0 '' - IL_004f: ldarg.1 - IL_0050: ldnull - IL_0051: cgt.un - IL_0053: ldc.i4.0 - IL_0054: ceq - IL_0056: ret + IL_0050: ldarg.1 + IL_0051: ldnull + IL_0052: cgt.un + IL_0054: ldc.i4.0 + IL_0055: ceq + IL_0057: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final instance bool Equals(class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 77 (0x4d) + // Code size 78 (0x4e) .maxstack 4 .locals init ([0] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] !a V_2, [3] !a V_3) + .line 4,4 : 10,20 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0045 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0043 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0044 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + .line 16707566,16707566 : 0,0 '' + IL_0013: ldloc.0 + IL_0014: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0019: stloc.2 + IL_001a: ldloc.1 + IL_001b: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0020: stloc.3 + IL_0021: ldloc.2 + IL_0022: ldloc.3 + IL_0023: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0027: brfalse.s IL_0041 - - .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.0 - IL_002a: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_002f: stloc.2 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldloc.3 - IL_0039: tail. - IL_003b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_0028: brfalse.s IL_0042 + + .line 16707566,16707566 : 0,0 '' + IL_002a: ldloc.0 + IL_002b: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0030: stloc.2 + IL_0031: ldloc.1 + IL_0032: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0037: stloc.3 + IL_0038: ldloc.2 + IL_0039: ldloc.3 + IL_003a: tail. + IL_003c: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0040: ret + IL_0041: ret .line 16707566,16707566 : 0,0 '' - IL_0041: ldc.i4.0 - IL_0042: ret + IL_0042: ldc.i4.0 + IL_0043: ret .line 16707566,16707566 : 0,0 '' - IL_0043: ldc.i4.0 - IL_0044: ret + IL_0044: ldc.i4.0 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldarg.1 - IL_0046: ldnull - IL_0047: cgt.un - IL_0049: ldc.i4.0 - IL_004a: ceq - IL_004c: ret + IL_0046: ldarg.1 + IL_0047: ldnull + IL_0048: cgt.un + IL_004a: ldc.i4.0 + IL_004b: ceq + IL_004d: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final @@ -640,6 +655,7 @@ IL_0000: ldarg.1 IL_0001: isinst class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0014 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals09.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals09.il.bsl index c22e81d41e2..bf09abc529f 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals09.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals09.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000A98 Length: 0x0000058B } .module Equals09.dll -// MVID: {60BE1F16-0759-46D9-A745-0383161FBE60} +// MVID: {611C550D-0759-46D9-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x066B0000 +// Image base: 0x06950000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 120 (0x78) .maxstack 4 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_1, @@ -187,109 +187,114 @@ [4] int32 V_4, [5] int32 V_5) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals09.fsx' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + .line 4,4 : 10,13 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals09.fsx' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_006e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0018: stloc.3 + IL_0019: ldloc.0 + IL_001a: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: stloc.s V_4 + IL_0021: ldloc.1 + IL_0022: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0027: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' + IL_0029: ldloc.s V_4 + IL_002b: ldloc.s V_5 + IL_002d: bge.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_002f: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0030: nop + IL_0031: br.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_0033: ldloc.s V_4 + IL_0035: ldloc.s V_5 + IL_0037: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0039: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_003a: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_003b: ldloc.2 + IL_003c: ldc.i4.0 + IL_003d: bge.s IL_0041 .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_003f: ldloc.2 + IL_0040: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_0041: ldloc.2 + IL_0042: ldc.i4.0 + IL_0043: ble.s IL_0047 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_0045: ldloc.2 + IL_0046: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0047: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_004c: stloc.3 + IL_004d: ldloc.0 + IL_004e: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0053: stloc.s V_4 + IL_0055: ldloc.1 + IL_0056: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_005b: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' + IL_005d: ldloc.s V_4 + IL_005f: ldloc.s V_5 + IL_0061: bge.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_0063: ldc.i4.m1 + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_0065: ldloc.s V_4 + IL_0067: ldloc.s V_5 + IL_0069: cgt + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_006c: ldc.i4.1 + IL_006d: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_006e: ldarg.1 + IL_006f: ldnull + IL_0070: cgt.un + IL_0072: brfalse.s IL_0076 .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_0074: ldc.i4.m1 + IL_0075: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_0076: ldc.i4.0 + IL_0077: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -323,6 +328,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -349,6 +355,7 @@ IL_0026: ldloc.2 IL_0027: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 IL_002c: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' IL_002e: ldloc.s V_4 IL_0030: ldloc.s V_5 IL_0032: bge.s IL_0038 @@ -367,6 +374,7 @@ IL_003e: nop .line 16707566,16707566 : 0,0 '' IL_003f: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_0040: ldloc.3 IL_0041: ldc.i4.0 IL_0042: bge.s IL_0046 @@ -391,6 +399,7 @@ IL_0054: ldloc.2 IL_0055: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 IL_005a: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' IL_005c: ldloc.s V_4 IL_005e: ldloc.s V_5 IL_0060: bge.s IL_0064 @@ -429,58 +438,61 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 61 (0x3d) .maxstack 7 .locals init ([0] int32 V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_1) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop - .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add + .line 4,4 : 10,13 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003b + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: pop + .line 16707566,16707566 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldloc.1 + IL_0015: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_001a: ldloc.0 + IL_001b: ldc.i4.6 + IL_001c: shl + IL_001d: ldloc.0 + IL_001e: ldc.i4.2 + IL_001f: shr IL_0020: add IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_002e: ldloc.0 - IL_002f: ldc.i4.6 - IL_0030: shl - IL_0031: ldloc.0 - IL_0032: ldc.i4.2 - IL_0033: shr - IL_0034: add + IL_0022: add + IL_0023: stloc.0 + IL_0024: ldc.i4 0x9e3779b9 + IL_0029: ldloc.1 + IL_002a: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_002f: ldloc.0 + IL_0030: ldc.i4.6 + IL_0031: shl + IL_0032: ldloc.0 + IL_0033: ldc.i4.2 + IL_0034: shr IL_0035: add IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ret + IL_0037: add + IL_0038: stloc.0 + IL_0039: ldloc.0 + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_003b: ldc.i4.0 + IL_003c: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -501,120 +513,127 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 64 (0x40) .maxstack 4 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_1, [2] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_2) + .line 4,4 : 10,13 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0038 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_0007: ldarg.1 + IL_0008: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/Key + IL_000d: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0036 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_0011: ldarg.0 + IL_0012: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0013: ldarg.0 + IL_0014: stloc.1 + IL_0015: ldloc.0 + IL_0016: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0017: ldloc.1 + IL_0018: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_001d: ldloc.2 + IL_001e: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0023: bne.un.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0025: ldloc.1 + IL_0026: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_002b: ldloc.2 + IL_002c: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0031: ceq + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0036: ldc.i4.0 + IL_0037: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0038: ldarg.1 + IL_0039: ldnull + IL_003a: cgt.un + IL_003c: ldc.i4.0 + IL_003d: ceq + IL_003f: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_1) + .line 4,4 : 10,13 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + .line 16707566,16707566 : 0,0 '' + IL_0013: ldloc.0 + IL_0014: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.1 + IL_001a: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0021: ldloc.0 + IL_0022: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.1 + IL_0028: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -628,6 +647,7 @@ IL_0000: ldarg.1 IL_0001: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 @@ -792,7 +812,7 @@ instance int32 CompareTo(class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 169 (0xa9) + // Code size 170 (0xaa) .maxstack 5 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -805,116 +825,120 @@ [8] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_8, [9] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_9, [10] int32 V_10) + .line 5,5 : 10,26 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_009f + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse IL_00a0 .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse IL_009d + IL_000a: ldarg.1 + IL_000b: ldnull + IL_000c: cgt.un + IL_000e: brfalse IL_009e .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_0013: ldarg.0 + IL_0014: pop .line 16707566,16707566 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.0 - IL_0016: ldarg.1 - IL_0017: stloc.1 - IL_0018: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_001d: stloc.3 - IL_001e: ldloc.0 - IL_001f: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.1 - IL_0027: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_002c: stloc.s V_5 - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: ldloc.3 - IL_0033: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_0015: ldarg.0 + IL_0016: stloc.0 + IL_0017: ldarg.1 + IL_0018: stloc.1 + IL_0019: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_001e: stloc.3 + IL_001f: ldloc.0 + IL_0020: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0025: stloc.s V_4 + IL_0027: ldloc.1 + IL_0028: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_002d: stloc.s V_5 + IL_002f: ldloc.s V_4 + IL_0031: ldloc.s V_5 + IL_0033: ldloc.3 + IL_0034: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0038: stloc.2 - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: bge.s IL_003f + IL_0039: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ldc.i4.0 - IL_0041: ble.s IL_0045 + IL_0040: ldloc.2 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_0043: ldloc.2 - IL_0044: ret + IL_0044: ldloc.2 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_0045: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004a: stloc.3 - IL_004b: ldloc.0 - IL_004c: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0051: stloc.s V_6 - IL_0053: ldloc.1 - IL_0054: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0059: stloc.s V_7 - IL_005b: ldloc.s V_6 - IL_005d: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0062: stloc.s V_4 - IL_0064: ldloc.s V_6 - IL_0066: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_006b: stloc.s V_5 - IL_006d: ldloc.s V_7 - IL_006f: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0074: stloc.s V_8 - IL_0076: ldloc.s V_7 - IL_0078: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_007d: stloc.s V_9 - IL_007f: ldloc.s V_4 - IL_0081: ldloc.s V_8 - IL_0083: ldloc.3 - IL_0084: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_004b: stloc.3 + IL_004c: ldloc.0 + IL_004d: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0052: stloc.s V_6 + IL_0054: ldloc.1 + IL_0055: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_005a: stloc.s V_7 + IL_005c: ldloc.s V_6 + IL_005e: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0063: stloc.s V_4 + IL_0065: ldloc.s V_6 + IL_0067: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_006c: stloc.s V_5 + IL_006e: ldloc.s V_7 + IL_0070: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0075: stloc.s V_8 + IL_0077: ldloc.s V_7 + IL_0079: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_007e: stloc.s V_9 + IL_0080: ldloc.s V_4 + IL_0082: ldloc.s V_8 + IL_0084: ldloc.3 + IL_0085: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0089: stloc.s V_10 - IL_008b: ldloc.s V_10 - IL_008d: brfalse.s IL_0092 + IL_008a: stloc.s V_10 + .line 16707566,16707566 : 0,0 '' + IL_008c: ldloc.s V_10 + IL_008e: brfalse.s IL_0093 .line 16707566,16707566 : 0,0 '' - IL_008f: ldloc.s V_10 - IL_0091: ret + IL_0090: ldloc.s V_10 + IL_0092: ret .line 16707566,16707566 : 0,0 '' - IL_0092: ldloc.s V_5 - IL_0094: ldloc.s V_9 - IL_0096: ldloc.3 - IL_0097: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_0093: ldloc.s V_5 + IL_0095: ldloc.s V_9 + IL_0097: ldloc.3 + IL_0098: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_009c: ret + IL_009d: ret .line 16707566,16707566 : 0,0 '' - IL_009d: ldc.i4.1 - IL_009e: ret + IL_009e: ldc.i4.1 + IL_009f: ret .line 16707566,16707566 : 0,0 '' - IL_009f: ldarg.1 - IL_00a0: ldnull - IL_00a1: cgt.un - IL_00a3: brfalse.s IL_00a7 + IL_00a0: ldarg.1 + IL_00a1: ldnull + IL_00a2: cgt.un + IL_00a4: brfalse.s IL_00a8 .line 16707566,16707566 : 0,0 '' - IL_00a5: ldc.i4.m1 - IL_00a6: ret + IL_00a6: ldc.i4.m1 + IL_00a7: ret .line 16707566,16707566 : 0,0 '' - IL_00a7: ldc.i4.0 - IL_00a8: ret + IL_00a8: ldc.i4.0 + IL_00a9: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final @@ -953,6 +977,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -985,6 +1010,7 @@ IL_0039: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) IL_003e: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_003f: ldloc.3 IL_0040: ldc.i4.0 IL_0041: bge.s IL_0045 @@ -1027,6 +1053,7 @@ IL_0084: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) IL_0089: stloc.s V_10 + .line 16707566,16707566 : 0,0 '' IL_008b: ldloc.s V_10 IL_008d: brfalse.s IL_0092 @@ -1066,7 +1093,7 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 107 (0x6b) + // Code size 108 (0x6c) .maxstack 7 .locals init ([0] int32 V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1074,76 +1101,79 @@ [3] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_3, [4] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_4, [5] int32 V_5) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0069 - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop - .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0019: stloc.2 - IL_001a: ldloc.2 - IL_001b: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0020: stloc.3 - IL_0021: ldloc.2 - IL_0022: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0027: stloc.s V_4 - IL_0029: ldloc.3 - IL_002a: ldarg.1 - IL_002b: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: ldc.i4.5 - IL_0035: shl - IL_0036: ldloc.s V_5 - IL_0038: add - IL_0039: ldloc.s V_4 - IL_003b: ldarg.1 - IL_003c: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0041: xor - IL_0042: ldloc.0 - IL_0043: ldc.i4.6 - IL_0044: shl - IL_0045: ldloc.0 - IL_0046: ldc.i4.2 - IL_0047: shr - IL_0048: add + .line 5,5 : 10,26 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_006a + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: pop + .line 16707566,16707566 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldloc.1 + IL_0015: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0021: stloc.3 + IL_0022: ldloc.2 + IL_0023: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0028: stloc.s V_4 + IL_002a: ldloc.3 + IL_002b: ldarg.1 + IL_002c: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_0031: stloc.s V_5 + IL_0033: ldloc.s V_5 + IL_0035: ldc.i4.5 + IL_0036: shl + IL_0037: ldloc.s V_5 + IL_0039: add + IL_003a: ldloc.s V_4 + IL_003c: ldarg.1 + IL_003d: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_0042: xor + IL_0043: ldloc.0 + IL_0044: ldc.i4.6 + IL_0045: shl + IL_0046: ldloc.0 + IL_0047: ldc.i4.2 + IL_0048: shr IL_0049: add IL_004a: add - IL_004b: stloc.0 - IL_004c: ldc.i4 0x9e3779b9 - IL_0051: ldloc.1 - IL_0052: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0057: ldarg.1 - IL_0058: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_005d: ldloc.0 - IL_005e: ldc.i4.6 - IL_005f: shl - IL_0060: ldloc.0 - IL_0061: ldc.i4.2 - IL_0062: shr - IL_0063: add + IL_004b: add + IL_004c: stloc.0 + IL_004d: ldc.i4 0x9e3779b9 + IL_0052: ldloc.1 + IL_0053: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0058: ldarg.1 + IL_0059: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_005e: ldloc.0 + IL_005f: ldc.i4.6 + IL_0060: shl + IL_0061: ldloc.0 + IL_0062: ldc.i4.2 + IL_0063: shr IL_0064: add IL_0065: add - IL_0066: stloc.0 - IL_0067: ldloc.0 - IL_0068: ret + IL_0066: add + IL_0067: stloc.0 + IL_0068: ldloc.0 + IL_0069: ret .line 16707566,16707566 : 0,0 '' - IL_0069: ldc.i4.0 - IL_006a: ret + IL_006a: ldc.i4.0 + IL_006b: ret } // end of method KeyWithInnerKeys::GetHashCode .method public hidebysig virtual final @@ -1164,7 +1194,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 138 (0x8a) + // Code size 139 (0x8b) .maxstack 5 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1175,155 +1205,163 @@ [6] class [mscorlib]System.Tuple`2 V_6, [7] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_7, [8] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_8) + .line 5,5 : 10,26 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_0082 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse IL_0083 .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_000f: stloc.0 - IL_0010: ldloc.0 - IL_0011: brfalse.s IL_0080 + IL_000a: ldarg.1 + IL_000b: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_0010: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0011: ldloc.0 + IL_0012: brfalse.s IL_0081 .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0014: ldarg.0 + IL_0015: pop .line 16707566,16707566 : 0,0 '' - IL_0015: ldarg.0 - IL_0016: stloc.1 - IL_0017: ldloc.0 - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0026: stloc.s V_4 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldarg.2 - IL_002c: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_0016: ldarg.0 + IL_0017: stloc.1 + IL_0018: ldloc.0 + IL_0019: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_001a: ldloc.1 + IL_001b: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0020: stloc.3 + IL_0021: ldloc.2 + IL_0022: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0027: stloc.s V_4 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: ldarg.2 + IL_002d: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_0031: brfalse.s IL_007e + IL_0032: brfalse.s IL_007f .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.1 - IL_0034: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0039: stloc.s V_5 - IL_003b: ldloc.2 - IL_003c: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0041: stloc.s V_6 - IL_0043: ldloc.s V_5 - IL_0045: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_004a: stloc.3 - IL_004b: ldloc.s V_5 - IL_004d: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0052: stloc.s V_4 - IL_0054: ldloc.s V_6 - IL_0056: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_005b: stloc.s V_7 - IL_005d: ldloc.s V_6 - IL_005f: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0064: stloc.s V_8 - IL_0066: ldloc.3 - IL_0067: ldloc.s V_7 - IL_0069: ldarg.2 - IL_006a: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_0034: ldloc.1 + IL_0035: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_003a: stloc.s V_5 + IL_003c: ldloc.2 + IL_003d: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0042: stloc.s V_6 + IL_0044: ldloc.s V_5 + IL_0046: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_004b: stloc.3 + IL_004c: ldloc.s V_5 + IL_004e: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0053: stloc.s V_4 + IL_0055: ldloc.s V_6 + IL_0057: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_005c: stloc.s V_7 + IL_005e: ldloc.s V_6 + IL_0060: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0065: stloc.s V_8 + .line 16707566,16707566 : 0,0 '' + IL_0067: ldloc.3 + IL_0068: ldloc.s V_7 + IL_006a: ldarg.2 + IL_006b: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_006f: brfalse.s IL_007c + IL_0070: brfalse.s IL_007d .line 16707566,16707566 : 0,0 '' - IL_0071: ldloc.s V_4 - IL_0073: ldloc.s V_8 - IL_0075: ldarg.2 - IL_0076: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_0072: ldloc.s V_4 + IL_0074: ldloc.s V_8 + IL_0076: ldarg.2 + IL_0077: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_007b: ret + IL_007c: ret .line 16707566,16707566 : 0,0 '' - IL_007c: ldc.i4.0 - IL_007d: ret + IL_007d: ldc.i4.0 + IL_007e: ret .line 16707566,16707566 : 0,0 '' - IL_007e: ldc.i4.0 - IL_007f: ret + IL_007f: ldc.i4.0 + IL_0080: ret .line 16707566,16707566 : 0,0 '' - IL_0080: ldc.i4.0 - IL_0081: ret + IL_0081: ldc.i4.0 + IL_0082: ret .line 16707566,16707566 : 0,0 '' - IL_0082: ldarg.1 - IL_0083: ldnull - IL_0084: cgt.un - IL_0086: ldc.i4.0 - IL_0087: ceq - IL_0089: ret + IL_0083: ldarg.1 + IL_0084: ldnull + IL_0085: cgt.un + IL_0087: ldc.i4.0 + IL_0088: ceq + IL_008a: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final instance bool Equals(class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 69 (0x45) + // Code size 70 (0x46) .maxstack 4 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1) + .line 5,5 : 10,26 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003d + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_003b + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_003c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0018: ldloc.1 - IL_0019: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001e: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key) - IL_0023: brfalse.s IL_0039 - - .line 16707566,16707566 : 0,0 '' - IL_0025: ldloc.0 - IL_0026: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_002b: ldloc.1 - IL_002c: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0031: tail. - IL_0033: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + .line 16707566,16707566 : 0,0 '' + IL_0013: ldloc.0 + IL_0014: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0019: ldloc.1 + IL_001a: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_001f: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key) + IL_0024: brfalse.s IL_003a + + .line 16707566,16707566 : 0,0 '' + IL_0026: ldloc.0 + IL_0027: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_002c: ldloc.1 + IL_002d: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0032: tail. + IL_0034: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, !!0) - IL_0038: ret + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 16707566,16707566 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_003c: ldc.i4.0 + IL_003d: ret .line 16707566,16707566 : 0,0 '' - IL_003d: ldarg.1 - IL_003e: ldnull - IL_003f: cgt.un - IL_0041: ldc.i4.0 - IL_0042: ceq - IL_0044: ret + IL_003e: ldarg.1 + IL_003f: ldnull + IL_0040: cgt.un + IL_0042: ldc.i4.0 + IL_0043: ceq + IL_0045: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final @@ -1337,6 +1375,7 @@ IL_0000: ldarg.1 IL_0001: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0014 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.il.bsl index c2c0f3a2624..aa19d121fe8 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006D8 Length: 0x000003B1 } .module Hash05.dll -// MVID: {60BE1F16-9642-7857-A745-0383161FBE60} +// MVID: {611C550D-9642-7857-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x067C0000 +// Image base: 0x06960000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Hash05/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 120 (0x78) .maxstack 4 .locals init ([0] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -187,109 +187,114 @@ [4] int32 V_4, [5] int32 V_5) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash05.fsx' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + .line 5,5 : 10,13 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash05.fsx' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_006e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop + .line 16707566,16707566 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0018: stloc.3 + IL_0019: ldloc.0 + IL_001a: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: stloc.s V_4 + IL_0021: ldloc.1 + IL_0022: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0027: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.s V_5 + IL_002d: bge.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_002f: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0030: nop + IL_0031: br.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_0033: ldloc.s V_4 + IL_0035: ldloc.s V_5 + IL_0037: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0039: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_003a: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_003b: ldloc.2 + IL_003c: ldc.i4.0 + IL_003d: bge.s IL_0041 .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_003f: ldloc.2 + IL_0040: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_0041: ldloc.2 + IL_0042: ldc.i4.0 + IL_0043: ble.s IL_0047 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_0045: ldloc.2 + IL_0046: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0047: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_004c: stloc.3 + IL_004d: ldloc.0 + IL_004e: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0053: stloc.s V_4 + IL_0055: ldloc.1 + IL_0056: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_005b: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' + IL_005d: ldloc.s V_4 + IL_005f: ldloc.s V_5 + IL_0061: bge.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_0063: ldc.i4.m1 + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_0065: ldloc.s V_4 + IL_0067: ldloc.s V_5 + IL_0069: cgt + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_006c: ldc.i4.1 + IL_006d: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_006e: ldarg.1 + IL_006f: ldnull + IL_0070: cgt.un + IL_0072: brfalse.s IL_0076 .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_0074: ldc.i4.m1 + IL_0075: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_0076: ldc.i4.0 + IL_0077: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -323,6 +328,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any Hash05/HashMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -349,6 +355,7 @@ IL_0026: ldloc.2 IL_0027: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 IL_002c: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' IL_002e: ldloc.s V_4 IL_0030: ldloc.s V_5 IL_0032: bge.s IL_0038 @@ -367,6 +374,7 @@ IL_003e: nop .line 16707566,16707566 : 0,0 '' IL_003f: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_0040: ldloc.3 IL_0041: ldc.i4.0 IL_0042: bge.s IL_0046 @@ -391,6 +399,7 @@ IL_0054: ldloc.2 IL_0055: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 IL_005a: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' IL_005c: ldloc.s V_4 IL_005e: ldloc.s V_5 IL_0060: bge.s IL_0064 @@ -429,58 +438,61 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 61 (0x3d) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_1) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop - .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add + .line 5,5 : 10,13 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003b + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: pop + .line 16707566,16707566 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldloc.1 + IL_0015: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_001a: ldloc.0 + IL_001b: ldc.i4.6 + IL_001c: shl + IL_001d: ldloc.0 + IL_001e: ldc.i4.2 + IL_001f: shr IL_0020: add IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_002e: ldloc.0 - IL_002f: ldc.i4.6 - IL_0030: shl - IL_0031: ldloc.0 - IL_0032: ldc.i4.2 - IL_0033: shr - IL_0034: add + IL_0022: add + IL_0023: stloc.0 + IL_0024: ldc.i4 0x9e3779b9 + IL_0029: ldloc.1 + IL_002a: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_002f: ldloc.0 + IL_0030: ldc.i4.6 + IL_0031: shl + IL_0032: ldloc.0 + IL_0033: ldc.i4.2 + IL_0034: shr IL_0035: add IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ret + IL_0037: add + IL_0038: stloc.0 + IL_0039: ldloc.0 + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_003b: ldc.i4.0 + IL_003c: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -501,120 +513,127 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 64 (0x40) .maxstack 4 .locals init ([0] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_1, [2] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_2) + .line 5,5 : 10,13 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0038 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Hash05/HashMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_0007: ldarg.1 + IL_0008: isinst Hash05/HashMicroPerfAndCodeGenerationTests/Key + IL_000d: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0036 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_0011: ldarg.0 + IL_0012: pop + .line 16707566,16707566 : 0,0 '' + IL_0013: ldarg.0 + IL_0014: stloc.1 + IL_0015: ldloc.0 + IL_0016: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0017: ldloc.1 + IL_0018: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001d: ldloc.2 + IL_001e: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0023: bne.un.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0025: ldloc.1 + IL_0026: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_002b: ldloc.2 + IL_002c: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0031: ceq + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0036: ldc.i4.0 + IL_0037: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0038: ldarg.1 + IL_0039: ldnull + IL_003a: cgt.un + IL_003c: ldc.i4.0 + IL_003d: ceq + IL_003f: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Hash05/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_1) + .line 5,5 : 10,13 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop + .line 16707566,16707566 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0013: ldloc.0 + IL_0014: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.1 + IL_001a: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0021: ldloc.0 + IL_0022: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.1 + IL_0028: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -628,6 +647,7 @@ IL_0000: ldarg.1 IL_0001: isinst Hash05/HashMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.il.bsl index e89af0b76f0..bad5e3f191b 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006D8 Length: 0x000003B2 } .module Hash06.dll -// MVID: {60BE1F16-9642-78F2-A745-0383161FBE60} +// MVID: {611C550D-9642-78F2-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05280000 +// Image base: 0x06F60000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Hash06/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 120 (0x78) .maxstack 4 .locals init ([0] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -187,109 +187,114 @@ [4] int32 V_4, [5] int32 V_5) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash06.fsx' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + .line 4,4 : 10,13 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash06.fsx' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_006e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop + .line 16707566,16707566 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0018: stloc.3 + IL_0019: ldloc.0 + IL_001a: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: stloc.s V_4 + IL_0021: ldloc.1 + IL_0022: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0027: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.s V_5 + IL_002d: bge.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_002f: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0030: nop + IL_0031: br.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_0033: ldloc.s V_4 + IL_0035: ldloc.s V_5 + IL_0037: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0039: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_003a: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_003b: ldloc.2 + IL_003c: ldc.i4.0 + IL_003d: bge.s IL_0041 .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_003f: ldloc.2 + IL_0040: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_0041: ldloc.2 + IL_0042: ldc.i4.0 + IL_0043: ble.s IL_0047 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_0045: ldloc.2 + IL_0046: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0047: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_004c: stloc.3 + IL_004d: ldloc.0 + IL_004e: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0053: stloc.s V_4 + IL_0055: ldloc.1 + IL_0056: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_005b: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' + IL_005d: ldloc.s V_4 + IL_005f: ldloc.s V_5 + IL_0061: bge.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_0063: ldc.i4.m1 + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_0065: ldloc.s V_4 + IL_0067: ldloc.s V_5 + IL_0069: cgt + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_006c: ldc.i4.1 + IL_006d: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_006e: ldarg.1 + IL_006f: ldnull + IL_0070: cgt.un + IL_0072: brfalse.s IL_0076 .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_0074: ldc.i4.m1 + IL_0075: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_0076: ldc.i4.0 + IL_0077: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -323,6 +328,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any Hash06/HashMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -349,6 +355,7 @@ IL_0026: ldloc.2 IL_0027: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 IL_002c: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' IL_002e: ldloc.s V_4 IL_0030: ldloc.s V_5 IL_0032: bge.s IL_0038 @@ -367,6 +374,7 @@ IL_003e: nop .line 16707566,16707566 : 0,0 '' IL_003f: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_0040: ldloc.3 IL_0041: ldc.i4.0 IL_0042: bge.s IL_0046 @@ -391,6 +399,7 @@ IL_0054: ldloc.2 IL_0055: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 IL_005a: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' IL_005c: ldloc.s V_4 IL_005e: ldloc.s V_5 IL_0060: bge.s IL_0064 @@ -429,58 +438,61 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 61 (0x3d) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_1) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop - .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add + .line 4,4 : 10,13 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003b + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: pop + .line 16707566,16707566 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldloc.1 + IL_0015: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_001a: ldloc.0 + IL_001b: ldc.i4.6 + IL_001c: shl + IL_001d: ldloc.0 + IL_001e: ldc.i4.2 + IL_001f: shr IL_0020: add IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_002e: ldloc.0 - IL_002f: ldc.i4.6 - IL_0030: shl - IL_0031: ldloc.0 - IL_0032: ldc.i4.2 - IL_0033: shr - IL_0034: add + IL_0022: add + IL_0023: stloc.0 + IL_0024: ldc.i4 0x9e3779b9 + IL_0029: ldloc.1 + IL_002a: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_002f: ldloc.0 + IL_0030: ldc.i4.6 + IL_0031: shl + IL_0032: ldloc.0 + IL_0033: ldc.i4.2 + IL_0034: shr IL_0035: add IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ret + IL_0037: add + IL_0038: stloc.0 + IL_0039: ldloc.0 + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_003b: ldc.i4.0 + IL_003c: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -501,120 +513,127 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 64 (0x40) .maxstack 4 .locals init ([0] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_1, [2] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_2) + .line 4,4 : 10,13 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0038 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Hash06/HashMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_0007: ldarg.1 + IL_0008: isinst Hash06/HashMicroPerfAndCodeGenerationTests/Key + IL_000d: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0036 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_0011: ldarg.0 + IL_0012: pop + .line 16707566,16707566 : 0,0 '' + IL_0013: ldarg.0 + IL_0014: stloc.1 + IL_0015: ldloc.0 + IL_0016: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0017: ldloc.1 + IL_0018: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001d: ldloc.2 + IL_001e: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0023: bne.un.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0025: ldloc.1 + IL_0026: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_002b: ldloc.2 + IL_002c: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0031: ceq + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0036: ldc.i4.0 + IL_0037: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0038: ldarg.1 + IL_0039: ldnull + IL_003a: cgt.un + IL_003c: ldc.i4.0 + IL_003d: ceq + IL_003f: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Hash06/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_1) + .line 4,4 : 10,13 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop + .line 16707566,16707566 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0013: ldloc.0 + IL_0014: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.1 + IL_001a: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0021: ldloc.0 + IL_0022: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.1 + IL_0028: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -628,6 +647,7 @@ IL_0000: ldarg.1 IL_0001: isinst Hash06/HashMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.il.bsl index b2d3f9d1c9d..b8dedc27dc9 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006C8 Length: 0x000003B3 } .module Hash08.dll -// MVID: {60BE1F16-9642-77BC-A745-0383161FBE60} +// MVID: {611C550D-9642-77BC-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A70000 +// Image base: 0x06580000 // =============== CLASS MEMBERS DECLARATION =================== @@ -123,109 +123,114 @@ instance int32 CompareTo(class Hash08/HashMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 101 (0x65) + // Code size 102 (0x66) .maxstack 4 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IComparer V_1, [2] int32 V_2, [3] int32 V_3) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash08.fsx' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_005b + .line 4,4 : 10,14 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash08.fsx' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_005c .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0059 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_005a .line 16707566,16707566 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: stloc.2 - IL_0019: ldarg.1 - IL_001a: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: bge.s IL_0028 + IL_000d: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0012: stloc.1 + IL_0013: ldarg.0 + IL_0014: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: stloc.2 + IL_001a: ldarg.1 + IL_001b: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0020: stloc.3 + .line 16707566,16707566 : 0,0 '' + IL_0021: ldloc.2 + IL_0022: ldloc.3 + IL_0023: bge.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0024: ldc.i4.m1 + IL_0025: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0025: nop - IL_0026: br.s IL_002d + IL_0026: nop + IL_0027: br.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.2 - IL_0029: ldloc.3 - IL_002a: cgt + IL_0029: ldloc.2 + IL_002a: ldloc.3 + IL_002b: cgt .line 16707566,16707566 : 0,0 '' - IL_002c: nop + IL_002d: nop .line 16707566,16707566 : 0,0 '' - IL_002d: stloc.0 - IL_002e: ldloc.0 - IL_002f: ldc.i4.0 - IL_0030: bge.s IL_0034 + IL_002e: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_002f: ldloc.0 + IL_0030: ldc.i4.0 + IL_0031: bge.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.0 - IL_0033: ret + IL_0033: ldloc.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldloc.0 - IL_0035: ldc.i4.0 - IL_0036: ble.s IL_003a + IL_0035: ldloc.0 + IL_0036: ldc.i4.0 + IL_0037: ble.s IL_003b .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.0 - IL_0039: ret + IL_0039: ldloc.0 + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_003a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_003f: stloc.1 - IL_0040: ldarg.0 - IL_0041: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0046: stloc.2 - IL_0047: ldarg.1 - IL_0048: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_004d: stloc.3 - IL_004e: ldloc.2 - IL_004f: ldloc.3 - IL_0050: bge.s IL_0054 + IL_003b: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0040: stloc.1 + IL_0041: ldarg.0 + IL_0042: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0047: stloc.2 + IL_0048: ldarg.1 + IL_0049: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_004e: stloc.3 + .line 16707566,16707566 : 0,0 '' + IL_004f: ldloc.2 + IL_0050: ldloc.3 + IL_0051: bge.s IL_0055 .line 16707566,16707566 : 0,0 '' - IL_0052: ldc.i4.m1 - IL_0053: ret + IL_0053: ldc.i4.m1 + IL_0054: ret .line 16707566,16707566 : 0,0 '' - IL_0054: ldloc.2 - IL_0055: ldloc.3 - IL_0056: cgt - IL_0058: ret + IL_0055: ldloc.2 + IL_0056: ldloc.3 + IL_0057: cgt + IL_0059: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldc.i4.1 - IL_005a: ret + IL_005a: ldc.i4.1 + IL_005b: ret .line 16707566,16707566 : 0,0 '' - IL_005b: ldarg.1 - IL_005c: ldnull - IL_005d: cgt.un - IL_005f: brfalse.s IL_0063 + IL_005c: ldarg.1 + IL_005d: ldnull + IL_005e: cgt.un + IL_0060: brfalse.s IL_0064 .line 16707566,16707566 : 0,0 '' - IL_0061: ldc.i4.m1 - IL_0062: ret + IL_0062: ldc.i4.m1 + IL_0063: ret .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.0 - IL_0064: ret + IL_0064: ldc.i4.0 + IL_0065: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final @@ -257,6 +262,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any Hash08/HashMicroPerfAndCodeGenerationTests/KeyR IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -276,6 +282,7 @@ IL_001f: ldloc.0 IL_0020: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ IL_0025: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_0026: ldloc.2 IL_0027: ldloc.3 IL_0028: bge.s IL_002e @@ -294,6 +301,7 @@ IL_0032: nop .line 16707566,16707566 : 0,0 '' IL_0033: stloc.1 + .line 16707566,16707566 : 0,0 '' IL_0034: ldloc.1 IL_0035: ldc.i4.0 IL_0036: bge.s IL_003a @@ -318,6 +326,7 @@ IL_0047: ldloc.0 IL_0048: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ IL_004d: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_004e: ldloc.2 IL_004f: ldloc.3 IL_0050: bge.s IL_0054 @@ -356,50 +365,52 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 54 (0x36) + // Code size 55 (0x37) .maxstack 7 .locals init ([0] int32 V_0) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0034 - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.0 - IL_000e: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0013: ldloc.0 - IL_0014: ldc.i4.6 - IL_0015: shl - IL_0016: ldloc.0 - IL_0017: ldc.i4.2 - IL_0018: shr - IL_0019: add + .line 4,4 : 10,14 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0035 + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + IL_0009: ldc.i4 0x9e3779b9 + IL_000e: ldarg.0 + IL_000f: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0014: ldloc.0 + IL_0015: ldc.i4.6 + IL_0016: shl + IL_0017: ldloc.0 + IL_0018: ldc.i4.2 + IL_0019: shr IL_001a: add IL_001b: add - IL_001c: stloc.0 - IL_001d: ldc.i4 0x9e3779b9 - IL_0022: ldarg.0 - IL_0023: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0028: ldloc.0 - IL_0029: ldc.i4.6 - IL_002a: shl - IL_002b: ldloc.0 - IL_002c: ldc.i4.2 - IL_002d: shr - IL_002e: add + IL_001c: add + IL_001d: stloc.0 + IL_001e: ldc.i4 0x9e3779b9 + IL_0023: ldarg.0 + IL_0024: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl + IL_002c: ldloc.0 + IL_002d: ldc.i4.2 + IL_002e: shr IL_002f: add IL_0030: add - IL_0031: stloc.0 - IL_0032: ldloc.0 - IL_0033: ret + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method KeyR::GetHashCode .method public hidebysig virtual final @@ -420,102 +431,107 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 57 (0x39) + // Code size 58 (0x3a) .maxstack 4 .locals init ([0] class Hash08/HashMicroPerfAndCodeGenerationTests/KeyR V_0) + .line 4,4 : 10,14 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0031 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Hash08/HashMicroPerfAndCodeGenerationTests/KeyR - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002f + IL_0007: ldarg.1 + IL_0008: isinst Hash08/HashMicroPerfAndCodeGenerationTests/KeyR + IL_000d: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0016: ldloc.0 - IL_0017: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001c: bne.un.s IL_002d + IL_0011: ldarg.0 + IL_0012: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0017: ldloc.0 + IL_0018: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_001d: bne.un.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_001e: ldarg.0 - IL_001f: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0024: ldloc.0 - IL_0025: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_002a: ceq - IL_002c: ret + IL_001f: ldarg.0 + IL_0020: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0025: ldloc.0 + IL_0026: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_002b: ceq + IL_002d: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldc.i4.0 - IL_002e: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldarg.1 - IL_0032: ldnull - IL_0033: cgt.un - IL_0035: ldc.i4.0 - IL_0036: ceq - IL_0038: ret + IL_0032: ldarg.1 + IL_0033: ldnull + IL_0034: cgt.un + IL_0036: ldc.i4.0 + IL_0037: ceq + IL_0039: ret } // end of method KeyR::Equals .method public hidebysig virtual final instance bool Equals(class Hash08/HashMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 54 (0x36) .maxstack 8 + .line 4,4 : 10,14 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002d + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_002b + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0012: ldarg.1 - IL_0013: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: bne.un.s IL_0029 + IL_000d: ldarg.0 + IL_000e: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0013: ldarg.1 + IL_0014: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: bne.un.s IL_002a .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0020: ldarg.1 - IL_0021: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0026: ceq - IL_0028: ret + IL_001b: ldarg.0 + IL_001c: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0021: ldarg.1 + IL_0022: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0027: ceq + IL_0029: ret .line 16707566,16707566 : 0,0 '' - IL_0029: ldc.i4.0 - IL_002a: ret + IL_002a: ldc.i4.0 + IL_002b: ret .line 16707566,16707566 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldarg.1 - IL_002e: ldnull - IL_002f: cgt.un - IL_0031: ldc.i4.0 - IL_0032: ceq - IL_0034: ret + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: cgt.un + IL_0032: ldc.i4.0 + IL_0033: ceq + IL_0035: ret } // end of method KeyR::Equals .method public hidebysig virtual final @@ -529,6 +545,7 @@ IL_0000: ldarg.1 IL_0001: isinst Hash08/HashMicroPerfAndCodeGenerationTests/KeyR IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.il.bsl index dec226fde70..1de6d054801 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000888 Length: 0x00000680 } .module Hash09.dll -// MVID: {60BE1F16-9642-77DB-A745-0383161FBE60} +// MVID: {611C550D-9642-77DB-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x071B0000 +// Image base: 0x07230000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 110 (0x6e) + // Code size 111 (0x6f) .maxstack 5 .locals init ([0] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -187,93 +187,96 @@ [4] !a V_4, [5] !a V_5) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash09.fsx' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0064 - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0062 - - .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop - .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + .line 4,4 : 10,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash09.fsx' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0065 + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0063 + + .line 16707566,16707566 : 0,0 '' + IL_000d: ldarg.0 + IL_000e: pop + .line 16707566,16707566 : 0,0 '' + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0018: stloc.3 + IL_0019: ldloc.0 + IL_001a: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_001f: stloc.s V_4 + IL_0021: ldloc.1 + IL_0022: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0027: stloc.s V_5 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0032: stloc.2 - IL_0033: ldloc.2 - IL_0034: ldc.i4.0 - IL_0035: bge.s IL_0039 + IL_0033: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_0037: ldloc.2 - IL_0038: ret + IL_0038: ldloc.2 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: ble.s IL_003f + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_003f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0044: stloc.3 - IL_0045: ldloc.0 - IL_0046: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_004b: stloc.s V_4 - IL_004d: ldloc.1 - IL_004e: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0053: stloc.s V_5 - IL_0055: ldloc.3 - IL_0056: ldloc.s V_4 - IL_0058: ldloc.s V_5 - IL_005a: tail. - IL_005c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.3 + IL_0046: ldloc.0 + IL_0047: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.1 + IL_004f: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0054: stloc.s V_5 + IL_0056: ldloc.3 + IL_0057: ldloc.s V_4 + IL_0059: ldloc.s V_5 + IL_005b: tail. + IL_005d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0061: ret + IL_0062: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.1 - IL_0063: ret + IL_0063: ldc.i4.1 + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldarg.1 - IL_0065: ldnull - IL_0066: cgt.un - IL_0068: brfalse.s IL_006c + IL_0065: ldarg.1 + IL_0066: ldnull + IL_0067: cgt.un + IL_0069: brfalse.s IL_006d .line 16707566,16707566 : 0,0 '' - IL_006a: ldc.i4.m1 - IL_006b: ret + IL_006b: ldc.i4.m1 + IL_006c: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.0 - IL_006d: ret + IL_006d: ldc.i4.0 + IL_006e: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final @@ -308,6 +311,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -341,6 +345,7 @@ !!0, !!0) IL_0038: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_0039: ldloc.3 IL_003a: ldc.i4.0 IL_003b: bge.s IL_003f @@ -398,69 +403,72 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 76 (0x4c) + // Code size 77 (0x4d) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] !a V_2) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004a - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop - .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0019: stloc.2 - IL_001a: ldarg.1 - IL_001b: ldloc.2 - IL_001c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + .line 4,4 : 10,20 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_004b + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: pop + .line 16707566,16707566 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldloc.1 + IL_0015: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_001a: stloc.2 + IL_001b: ldarg.1 + IL_001c: ldloc.2 + IL_001d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0) - IL_0021: ldloc.0 - IL_0022: ldc.i4.6 - IL_0023: shl - IL_0024: ldloc.0 - IL_0025: ldc.i4.2 - IL_0026: shr - IL_0027: add + IL_0022: ldloc.0 + IL_0023: ldc.i4.6 + IL_0024: shl + IL_0025: ldloc.0 + IL_0026: ldc.i4.2 + IL_0027: shr IL_0028: add IL_0029: add - IL_002a: stloc.0 - IL_002b: ldc.i4 0x9e3779b9 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0036: stloc.2 - IL_0037: ldarg.1 - IL_0038: ldloc.2 - IL_0039: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_002a: add + IL_002b: stloc.0 + IL_002c: ldc.i4 0x9e3779b9 + IL_0031: ldloc.1 + IL_0032: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0037: stloc.2 + IL_0038: ldarg.1 + IL_0039: ldloc.2 + IL_003a: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0) - IL_003e: ldloc.0 - IL_003f: ldc.i4.6 - IL_0040: shl - IL_0041: ldloc.0 - IL_0042: ldc.i4.2 - IL_0043: shr - IL_0044: add + IL_003f: ldloc.0 + IL_0040: ldc.i4.6 + IL_0041: shl + IL_0042: ldloc.0 + IL_0043: ldc.i4.2 + IL_0044: shr IL_0045: add IL_0046: add - IL_0047: stloc.0 - IL_0048: ldloc.0 - IL_0049: ret + IL_0047: add + IL_0048: stloc.0 + IL_0049: ldloc.0 + IL_004a: ret .line 16707566,16707566 : 0,0 '' - IL_004a: ldc.i4.0 - IL_004b: ret + IL_004b: ldc.i4.0 + IL_004c: ret } // end of method GenericKey`1::GetHashCode .method public hidebysig virtual final @@ -481,152 +489,159 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 87 (0x57) + // Code size 88 (0x58) .maxstack 5 .locals init ([0] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_2, [3] !a V_3, [4] !a V_4) + .line 4,4 : 10,20 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004f - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_004d - - .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop - .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001c: stloc.3 - IL_001d: ldloc.2 - IL_001e: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0023: stloc.s V_4 - IL_0025: ldarg.2 - IL_0026: ldloc.3 - IL_0027: ldloc.s V_4 - IL_0029: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0050 + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldarg.1 + IL_0008: isinst class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_000d: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_004e + + .line 16707566,16707566 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: pop + .line 16707566,16707566 : 0,0 '' + IL_0013: ldarg.0 + IL_0014: stloc.1 + IL_0015: ldloc.0 + IL_0016: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0017: ldloc.1 + IL_0018: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_001d: stloc.3 + IL_001e: ldloc.2 + IL_001f: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0024: stloc.s V_4 + IL_0026: ldarg.2 + IL_0027: ldloc.3 + IL_0028: ldloc.s V_4 + IL_002a: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_002e: brfalse.s IL_004b - - .line 16707566,16707566 : 0,0 '' - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_003d: stloc.s V_4 - IL_003f: ldarg.2 - IL_0040: ldloc.3 - IL_0041: ldloc.s V_4 - IL_0043: tail. - IL_0045: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_002f: brfalse.s IL_004c + + .line 16707566,16707566 : 0,0 '' + IL_0031: ldloc.1 + IL_0032: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0037: stloc.3 + IL_0038: ldloc.2 + IL_0039: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_003e: stloc.s V_4 + IL_0040: ldarg.2 + IL_0041: ldloc.3 + IL_0042: ldloc.s V_4 + IL_0044: tail. + IL_0046: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_004a: ret + IL_004b: ret .line 16707566,16707566 : 0,0 '' - IL_004b: ldc.i4.0 - IL_004c: ret + IL_004c: ldc.i4.0 + IL_004d: ret .line 16707566,16707566 : 0,0 '' - IL_004d: ldc.i4.0 - IL_004e: ret + IL_004e: ldc.i4.0 + IL_004f: ret .line 16707566,16707566 : 0,0 '' - IL_004f: ldarg.1 - IL_0050: ldnull - IL_0051: cgt.un - IL_0053: ldc.i4.0 - IL_0054: ceq - IL_0056: ret + IL_0050: ldarg.1 + IL_0051: ldnull + IL_0052: cgt.un + IL_0054: ldc.i4.0 + IL_0055: ceq + IL_0057: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final instance bool Equals(class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 77 (0x4d) + // Code size 78 (0x4e) .maxstack 4 .locals init ([0] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] !a V_2, [3] !a V_3) + .line 4,4 : 10,20 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0045 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0043 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0044 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + .line 16707566,16707566 : 0,0 '' + IL_0013: ldloc.0 + IL_0014: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0019: stloc.2 + IL_001a: ldloc.1 + IL_001b: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0020: stloc.3 + IL_0021: ldloc.2 + IL_0022: ldloc.3 + IL_0023: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0027: brfalse.s IL_0041 - - .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.0 - IL_002a: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_002f: stloc.2 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldloc.3 - IL_0039: tail. - IL_003b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_0028: brfalse.s IL_0042 + + .line 16707566,16707566 : 0,0 '' + IL_002a: ldloc.0 + IL_002b: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0030: stloc.2 + IL_0031: ldloc.1 + IL_0032: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0037: stloc.3 + IL_0038: ldloc.2 + IL_0039: ldloc.3 + IL_003a: tail. + IL_003c: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0040: ret + IL_0041: ret .line 16707566,16707566 : 0,0 '' - IL_0041: ldc.i4.0 - IL_0042: ret + IL_0042: ldc.i4.0 + IL_0043: ret .line 16707566,16707566 : 0,0 '' - IL_0043: ldc.i4.0 - IL_0044: ret + IL_0044: ldc.i4.0 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldarg.1 - IL_0046: ldnull - IL_0047: cgt.un - IL_0049: ldc.i4.0 - IL_004a: ceq - IL_004c: ret + IL_0046: ldarg.1 + IL_0047: ldnull + IL_0048: cgt.un + IL_004a: ldc.i4.0 + IL_004b: ceq + IL_004d: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final @@ -640,6 +655,7 @@ IL_0000: ldarg.1 IL_0001: isinst class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0014 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.il.bsl index 458e033bb07..dd4511bb604 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000A90 Length: 0x00000585 } .module Hash12.dll -// MVID: {60BE1F16-9661-796E-A745-0383161FBE60} +// MVID: {611C550D-9661-796E-A745-03830D551C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00BB0000 +// Image base: 0x05130000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Hash12/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 120 (0x78) .maxstack 4 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -187,109 +187,114 @@ [4] int32 V_4, [5] int32 V_5) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash12.fsx' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + .line 4,4 : 10,13 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash12.fsx' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_006e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + IL_0013: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0018: stloc.3 + IL_0019: ldloc.0 + IL_001a: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: stloc.s V_4 + IL_0021: ldloc.1 + IL_0022: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0027: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' + IL_0029: ldloc.s V_4 + IL_002b: ldloc.s V_5 + IL_002d: bge.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_002f: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0030: nop + IL_0031: br.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_0033: ldloc.s V_4 + IL_0035: ldloc.s V_5 + IL_0037: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0039: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_003a: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_003b: ldloc.2 + IL_003c: ldc.i4.0 + IL_003d: bge.s IL_0041 .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_003f: ldloc.2 + IL_0040: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_0041: ldloc.2 + IL_0042: ldc.i4.0 + IL_0043: ble.s IL_0047 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_0045: ldloc.2 + IL_0046: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0047: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_004c: stloc.3 + IL_004d: ldloc.0 + IL_004e: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0053: stloc.s V_4 + IL_0055: ldloc.1 + IL_0056: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_005b: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' + IL_005d: ldloc.s V_4 + IL_005f: ldloc.s V_5 + IL_0061: bge.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_0063: ldc.i4.m1 + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_0065: ldloc.s V_4 + IL_0067: ldloc.s V_5 + IL_0069: cgt + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_006c: ldc.i4.1 + IL_006d: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_006e: ldarg.1 + IL_006f: ldnull + IL_0070: cgt.un + IL_0072: brfalse.s IL_0076 .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_0074: ldc.i4.m1 + IL_0075: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_0076: ldc.i4.0 + IL_0077: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -323,6 +328,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -349,6 +355,7 @@ IL_0026: ldloc.2 IL_0027: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 IL_002c: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' IL_002e: ldloc.s V_4 IL_0030: ldloc.s V_5 IL_0032: bge.s IL_0038 @@ -367,6 +374,7 @@ IL_003e: nop .line 16707566,16707566 : 0,0 '' IL_003f: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_0040: ldloc.3 IL_0041: ldc.i4.0 IL_0042: bge.s IL_0046 @@ -391,6 +399,7 @@ IL_0054: ldloc.2 IL_0055: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 IL_005a: stloc.s V_5 + .line 16707566,16707566 : 0,0 '' IL_005c: ldloc.s V_4 IL_005e: ldloc.s V_5 IL_0060: bge.s IL_0064 @@ -429,58 +438,61 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 61 (0x3d) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_1) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop - .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add + .line 4,4 : 10,13 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003b + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: pop + .line 16707566,16707566 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldloc.1 + IL_0015: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_001a: ldloc.0 + IL_001b: ldc.i4.6 + IL_001c: shl + IL_001d: ldloc.0 + IL_001e: ldc.i4.2 + IL_001f: shr IL_0020: add IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_002e: ldloc.0 - IL_002f: ldc.i4.6 - IL_0030: shl - IL_0031: ldloc.0 - IL_0032: ldc.i4.2 - IL_0033: shr - IL_0034: add + IL_0022: add + IL_0023: stloc.0 + IL_0024: ldc.i4 0x9e3779b9 + IL_0029: ldloc.1 + IL_002a: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_002f: ldloc.0 + IL_0030: ldc.i4.6 + IL_0031: shl + IL_0032: ldloc.0 + IL_0033: ldc.i4.2 + IL_0034: shr IL_0035: add IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ret + IL_0037: add + IL_0038: stloc.0 + IL_0039: ldloc.0 + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_003b: ldc.i4.0 + IL_003c: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -501,120 +513,127 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 64 (0x40) .maxstack 4 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_1, [2] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_2) + .line 4,4 : 10,13 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0038 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Hash12/HashMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_0007: ldarg.1 + IL_0008: isinst Hash12/HashMicroPerfAndCodeGenerationTests/Key + IL_000d: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_000e: ldloc.0 + IL_000f: brfalse.s IL_0036 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_0011: ldarg.0 + IL_0012: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0013: ldarg.0 + IL_0014: stloc.1 + IL_0015: ldloc.0 + IL_0016: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0017: ldloc.1 + IL_0018: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001d: ldloc.2 + IL_001e: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0023: bne.un.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0025: ldloc.1 + IL_0026: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_002b: ldloc.2 + IL_002c: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0031: ceq + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0036: ldc.i4.0 + IL_0037: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0038: ldarg.1 + IL_0039: ldnull + IL_003a: cgt.un + IL_003c: ldc.i4.0 + IL_003d: ceq + IL_003f: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Hash12/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_1) + .line 4,4 : 10,13 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + .line 16707566,16707566 : 0,0 '' + IL_0013: ldloc.0 + IL_0014: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.1 + IL_001a: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0021: ldloc.0 + IL_0022: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.1 + IL_0028: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -628,6 +647,7 @@ IL_0000: ldarg.1 IL_0001: isinst Hash12/HashMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0012 @@ -792,7 +812,7 @@ instance int32 CompareTo(class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 169 (0xa9) + // Code size 170 (0xaa) .maxstack 5 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -805,116 +825,120 @@ [8] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_8, [9] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_9, [10] int32 V_10) + .line 5,5 : 10,26 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_009f + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse IL_00a0 .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse IL_009d + IL_000a: ldarg.1 + IL_000b: ldnull + IL_000c: cgt.un + IL_000e: brfalse IL_009e .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_0013: ldarg.0 + IL_0014: pop .line 16707566,16707566 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.0 - IL_0016: ldarg.1 - IL_0017: stloc.1 - IL_0018: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_001d: stloc.3 - IL_001e: ldloc.0 - IL_001f: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.1 - IL_0027: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_002c: stloc.s V_5 - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: ldloc.3 - IL_0033: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_0015: ldarg.0 + IL_0016: stloc.0 + IL_0017: ldarg.1 + IL_0018: stloc.1 + IL_0019: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_001e: stloc.3 + IL_001f: ldloc.0 + IL_0020: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0025: stloc.s V_4 + IL_0027: ldloc.1 + IL_0028: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_002d: stloc.s V_5 + IL_002f: ldloc.s V_4 + IL_0031: ldloc.s V_5 + IL_0033: ldloc.3 + IL_0034: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0038: stloc.2 - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: bge.s IL_003f + IL_0039: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ldc.i4.0 - IL_0041: ble.s IL_0045 + IL_0040: ldloc.2 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_0043: ldloc.2 - IL_0044: ret + IL_0044: ldloc.2 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_0045: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004a: stloc.3 - IL_004b: ldloc.0 - IL_004c: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0051: stloc.s V_6 - IL_0053: ldloc.1 - IL_0054: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0059: stloc.s V_7 - IL_005b: ldloc.s V_6 - IL_005d: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0062: stloc.s V_4 - IL_0064: ldloc.s V_6 - IL_0066: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_006b: stloc.s V_5 - IL_006d: ldloc.s V_7 - IL_006f: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0074: stloc.s V_8 - IL_0076: ldloc.s V_7 - IL_0078: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_007d: stloc.s V_9 - IL_007f: ldloc.s V_4 - IL_0081: ldloc.s V_8 - IL_0083: ldloc.3 - IL_0084: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_004b: stloc.3 + IL_004c: ldloc.0 + IL_004d: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0052: stloc.s V_6 + IL_0054: ldloc.1 + IL_0055: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_005a: stloc.s V_7 + IL_005c: ldloc.s V_6 + IL_005e: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0063: stloc.s V_4 + IL_0065: ldloc.s V_6 + IL_0067: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_006c: stloc.s V_5 + IL_006e: ldloc.s V_7 + IL_0070: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0075: stloc.s V_8 + IL_0077: ldloc.s V_7 + IL_0079: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_007e: stloc.s V_9 + IL_0080: ldloc.s V_4 + IL_0082: ldloc.s V_8 + IL_0084: ldloc.3 + IL_0085: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0089: stloc.s V_10 - IL_008b: ldloc.s V_10 - IL_008d: brfalse.s IL_0092 + IL_008a: stloc.s V_10 + .line 16707566,16707566 : 0,0 '' + IL_008c: ldloc.s V_10 + IL_008e: brfalse.s IL_0093 .line 16707566,16707566 : 0,0 '' - IL_008f: ldloc.s V_10 - IL_0091: ret + IL_0090: ldloc.s V_10 + IL_0092: ret .line 16707566,16707566 : 0,0 '' - IL_0092: ldloc.s V_5 - IL_0094: ldloc.s V_9 - IL_0096: ldloc.3 - IL_0097: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_0093: ldloc.s V_5 + IL_0095: ldloc.s V_9 + IL_0097: ldloc.3 + IL_0098: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_009c: ret + IL_009d: ret .line 16707566,16707566 : 0,0 '' - IL_009d: ldc.i4.1 - IL_009e: ret + IL_009e: ldc.i4.1 + IL_009f: ret .line 16707566,16707566 : 0,0 '' - IL_009f: ldarg.1 - IL_00a0: ldnull - IL_00a1: cgt.un - IL_00a3: brfalse.s IL_00a7 + IL_00a0: ldarg.1 + IL_00a1: ldnull + IL_00a2: cgt.un + IL_00a4: brfalse.s IL_00a8 .line 16707566,16707566 : 0,0 '' - IL_00a5: ldc.i4.m1 - IL_00a6: ret + IL_00a6: ldc.i4.m1 + IL_00a7: ret .line 16707566,16707566 : 0,0 '' - IL_00a7: ldc.i4.0 - IL_00a8: ret + IL_00a8: ldc.i4.0 + IL_00a9: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final @@ -953,6 +977,7 @@ IL_0000: ldarg.1 IL_0001: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 IL_0008: ldnull IL_0009: cgt.un @@ -985,6 +1010,7 @@ IL_0039: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) IL_003e: stloc.3 + .line 16707566,16707566 : 0,0 '' IL_003f: ldloc.3 IL_0040: ldc.i4.0 IL_0041: bge.s IL_0045 @@ -1027,6 +1053,7 @@ IL_0084: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) IL_0089: stloc.s V_10 + .line 16707566,16707566 : 0,0 '' IL_008b: ldloc.s V_10 IL_008d: brfalse.s IL_0092 @@ -1066,7 +1093,7 @@ instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 107 (0x6b) + // Code size 108 (0x6c) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1074,76 +1101,79 @@ [3] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_3, [4] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_4, [5] int32 V_5) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0069 - - .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop - .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0019: stloc.2 - IL_001a: ldloc.2 - IL_001b: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0020: stloc.3 - IL_0021: ldloc.2 - IL_0022: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0027: stloc.s V_4 - IL_0029: ldloc.3 - IL_002a: ldarg.1 - IL_002b: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: ldc.i4.5 - IL_0035: shl - IL_0036: ldloc.s V_5 - IL_0038: add - IL_0039: ldloc.s V_4 - IL_003b: ldarg.1 - IL_003c: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0041: xor - IL_0042: ldloc.0 - IL_0043: ldc.i4.6 - IL_0044: shl - IL_0045: ldloc.0 - IL_0046: ldc.i4.2 - IL_0047: shr - IL_0048: add + .line 5,5 : 10,26 '' + IL_0000: nop + .line 16707566,16707566 : 0,0 '' + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_006a + + .line 16707566,16707566 : 0,0 '' + IL_0007: ldc.i4.0 + IL_0008: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: pop + .line 16707566,16707566 : 0,0 '' + IL_000b: ldarg.0 + IL_000c: stloc.1 + IL_000d: ldc.i4.0 + IL_000e: stloc.0 + IL_000f: ldc.i4 0x9e3779b9 + IL_0014: ldloc.1 + IL_0015: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_001a: stloc.2 + IL_001b: ldloc.2 + IL_001c: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0021: stloc.3 + IL_0022: ldloc.2 + IL_0023: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0028: stloc.s V_4 + IL_002a: ldloc.3 + IL_002b: ldarg.1 + IL_002c: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_0031: stloc.s V_5 + IL_0033: ldloc.s V_5 + IL_0035: ldc.i4.5 + IL_0036: shl + IL_0037: ldloc.s V_5 + IL_0039: add + IL_003a: ldloc.s V_4 + IL_003c: ldarg.1 + IL_003d: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_0042: xor + IL_0043: ldloc.0 + IL_0044: ldc.i4.6 + IL_0045: shl + IL_0046: ldloc.0 + IL_0047: ldc.i4.2 + IL_0048: shr IL_0049: add IL_004a: add - IL_004b: stloc.0 - IL_004c: ldc.i4 0x9e3779b9 - IL_0051: ldloc.1 - IL_0052: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0057: ldarg.1 - IL_0058: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_005d: ldloc.0 - IL_005e: ldc.i4.6 - IL_005f: shl - IL_0060: ldloc.0 - IL_0061: ldc.i4.2 - IL_0062: shr - IL_0063: add + IL_004b: add + IL_004c: stloc.0 + IL_004d: ldc.i4 0x9e3779b9 + IL_0052: ldloc.1 + IL_0053: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0058: ldarg.1 + IL_0059: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_005e: ldloc.0 + IL_005f: ldc.i4.6 + IL_0060: shl + IL_0061: ldloc.0 + IL_0062: ldc.i4.2 + IL_0063: shr IL_0064: add IL_0065: add - IL_0066: stloc.0 - IL_0067: ldloc.0 - IL_0068: ret + IL_0066: add + IL_0067: stloc.0 + IL_0068: ldloc.0 + IL_0069: ret .line 16707566,16707566 : 0,0 '' - IL_0069: ldc.i4.0 - IL_006a: ret + IL_006a: ldc.i4.0 + IL_006b: ret } // end of method KeyWithInnerKeys::GetHashCode .method public hidebysig virtual final @@ -1164,7 +1194,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 138 (0x8a) + // Code size 139 (0x8b) .maxstack 5 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1175,155 +1205,163 @@ [6] class [mscorlib]System.Tuple`2 V_6, [7] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_7, [8] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_8) + .line 5,5 : 10,26 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_0082 + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse IL_0083 .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: isinst Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_000f: stloc.0 - IL_0010: ldloc.0 - IL_0011: brfalse.s IL_0080 + IL_000a: ldarg.1 + IL_000b: isinst Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_0010: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0011: ldloc.0 + IL_0012: brfalse.s IL_0081 .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0014: ldarg.0 + IL_0015: pop .line 16707566,16707566 : 0,0 '' - IL_0015: ldarg.0 - IL_0016: stloc.1 - IL_0017: ldloc.0 - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0026: stloc.s V_4 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldarg.2 - IL_002c: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_0016: ldarg.0 + IL_0017: stloc.1 + IL_0018: ldloc.0 + IL_0019: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_001a: ldloc.1 + IL_001b: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0020: stloc.3 + IL_0021: ldloc.2 + IL_0022: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0027: stloc.s V_4 + IL_0029: ldloc.3 + IL_002a: ldloc.s V_4 + IL_002c: ldarg.2 + IL_002d: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_0031: brfalse.s IL_007e + IL_0032: brfalse.s IL_007f .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.1 - IL_0034: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0039: stloc.s V_5 - IL_003b: ldloc.2 - IL_003c: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0041: stloc.s V_6 - IL_0043: ldloc.s V_5 - IL_0045: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_004a: stloc.3 - IL_004b: ldloc.s V_5 - IL_004d: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0052: stloc.s V_4 - IL_0054: ldloc.s V_6 - IL_0056: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_005b: stloc.s V_7 - IL_005d: ldloc.s V_6 - IL_005f: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0064: stloc.s V_8 - IL_0066: ldloc.3 - IL_0067: ldloc.s V_7 - IL_0069: ldarg.2 - IL_006a: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_0034: ldloc.1 + IL_0035: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_003a: stloc.s V_5 + IL_003c: ldloc.2 + IL_003d: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0042: stloc.s V_6 + IL_0044: ldloc.s V_5 + IL_0046: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_004b: stloc.3 + IL_004c: ldloc.s V_5 + IL_004e: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0053: stloc.s V_4 + IL_0055: ldloc.s V_6 + IL_0057: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_005c: stloc.s V_7 + IL_005e: ldloc.s V_6 + IL_0060: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0065: stloc.s V_8 + .line 16707566,16707566 : 0,0 '' + IL_0067: ldloc.3 + IL_0068: ldloc.s V_7 + IL_006a: ldarg.2 + IL_006b: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_006f: brfalse.s IL_007c + IL_0070: brfalse.s IL_007d .line 16707566,16707566 : 0,0 '' - IL_0071: ldloc.s V_4 - IL_0073: ldloc.s V_8 - IL_0075: ldarg.2 - IL_0076: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_0072: ldloc.s V_4 + IL_0074: ldloc.s V_8 + IL_0076: ldarg.2 + IL_0077: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_007b: ret + IL_007c: ret .line 16707566,16707566 : 0,0 '' - IL_007c: ldc.i4.0 - IL_007d: ret + IL_007d: ldc.i4.0 + IL_007e: ret .line 16707566,16707566 : 0,0 '' - IL_007e: ldc.i4.0 - IL_007f: ret + IL_007f: ldc.i4.0 + IL_0080: ret .line 16707566,16707566 : 0,0 '' - IL_0080: ldc.i4.0 - IL_0081: ret + IL_0081: ldc.i4.0 + IL_0082: ret .line 16707566,16707566 : 0,0 '' - IL_0082: ldarg.1 - IL_0083: ldnull - IL_0084: cgt.un - IL_0086: ldc.i4.0 - IL_0087: ceq - IL_0089: ret + IL_0083: ldarg.1 + IL_0084: ldnull + IL_0085: cgt.un + IL_0087: ldc.i4.0 + IL_0088: ceq + IL_008a: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final instance bool Equals(class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 69 (0x45) + // Code size 70 (0x46) .maxstack 4 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1) + .line 5,5 : 10,26 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003d + IL_0001: ldarg.0 + IL_0002: ldnull + IL_0003: cgt.un + IL_0005: brfalse.s IL_003e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_003b + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_003c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 - IL_0013: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0018: ldloc.1 - IL_0019: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001e: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(class Hash12/HashMicroPerfAndCodeGenerationTests/Key) - IL_0023: brfalse.s IL_0039 - - .line 16707566,16707566 : 0,0 '' - IL_0025: ldloc.0 - IL_0026: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_002b: ldloc.1 - IL_002c: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0031: tail. - IL_0033: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, + IL_000f: ldarg.0 + IL_0010: stloc.0 + IL_0011: ldarg.1 + IL_0012: stloc.1 + .line 16707566,16707566 : 0,0 '' + IL_0013: ldloc.0 + IL_0014: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0019: ldloc.1 + IL_001a: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_001f: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(class Hash12/HashMicroPerfAndCodeGenerationTests/Key) + IL_0024: brfalse.s IL_003a + + .line 16707566,16707566 : 0,0 '' + IL_0026: ldloc.0 + IL_0027: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_002c: ldloc.1 + IL_002d: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0032: tail. + IL_0034: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, !!0) - IL_0038: ret + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 16707566,16707566 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_003c: ldc.i4.0 + IL_003d: ret .line 16707566,16707566 : 0,0 '' - IL_003d: ldarg.1 - IL_003e: ldnull - IL_003f: cgt.un - IL_0041: ldc.i4.0 - IL_0042: ceq - IL_0044: ret + IL_003e: ldarg.1 + IL_003f: ldnull + IL_0040: cgt.un + IL_0042: ldc.i4.0 + IL_0043: ceq + IL_0045: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final @@ -1337,6 +1375,7 @@ IL_0000: ldarg.1 IL_0001: isinst Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys IL_0006: stloc.0 + .line 16707566,16707566 : 0,0 '' IL_0007: ldloc.0 IL_0008: brfalse.s IL_0014 diff --git a/tests/service/EditorTests.fs b/tests/service/EditorTests.fs index d0cb818acf4..6a303c7290b 100644 --- a/tests/service/EditorTests.fs +++ b/tests/service/EditorTests.fs @@ -1504,6 +1504,67 @@ let f () = ((6, 16), (6, 7, 6, 18, "List.unzip3")); ((6, 17), (6, 7, 6, 18, "List.unzip3"))] +[] +let ``ValidateBreakpointLocation tests for lambda with pattern arg`` () = + let input = + """ +let bodyWrapper () = + id (fun (A(b,c)) -> + let x = 1 + x)""" + let file = "/home/user/Test.fsx" + let parseResult, _typeCheckResults = parseAndCheckScript(file, input) + let results = getBreakpointLocations input parseResult + printfn "%A" results + // The majority of the breakpoints here get the entire expression, except the start-of-line ones + // on line 4 and 5, and the ones actually on the interior text of the lambda. + // + // This is correct + results |> shouldEqual + [((3, 0), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 1), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 2), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 3), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 4), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 5), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 6), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 7), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 8), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 9), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 10), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 11), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 12), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 13), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 14), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 15), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 16), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 17), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 18), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 19), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 20), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((3, 21), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((4, 0), (4, 8, 4, 17, "let x = 1")); + ((4, 1), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((4, 2), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((4, 3), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((4, 4), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((4, 5), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((4, 6), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((4, 7), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((4, 8), (4, 8, 4, 17, "let x = 1")); ((4, 9), (4, 8, 4, 17, "let x = 1")); + ((4, 10), (4, 8, 4, 17, "let x = 1")); ((4, 11), (4, 8, 4, 17, "let x = 1")); + ((4, 12), (4, 8, 4, 17, "let x = 1")); ((4, 13), (4, 8, 4, 17, "let x = 1")); + ((4, 14), (4, 8, 4, 17, "let x = 1")); ((4, 15), (4, 8, 4, 17, "let x = 1")); + ((4, 16), (4, 8, 4, 17, "let x = 1")); ((5, 0), (5, 8, 5, 9, "x")); + ((5, 1), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((5, 2), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((5, 3), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((5, 4), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((5, 5), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((5, 6), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((5, 7), (3, 3, 5, 10, "id (fun (A(b,c)) ->$ let x = 1$ x)")); + ((5, 8), (5, 8, 5, 9, "x")); ((5, 9), (5, 8, 5, 9, "x"))] + [] let ``Partially valid namespaces should be reported`` () = let input = diff --git a/tests/service/data/TestTP/ProvidedTypes.fs b/tests/service/data/TestTP/ProvidedTypes.fs index a4fc1908ef0..5ce17b4082e 100644 --- a/tests/service/data/TestTP/ProvidedTypes.fs +++ b/tests/service/data/TestTP/ProvidedTypes.fs @@ -551,8 +551,6 @@ module UncheckedQuotations = ShapeCombinationUnchecked (Shape (function [cond; body] -> Expr.WhileLoopUnchecked (cond, body) | _ -> invalidArg "expr" "invalid shape"), [cond; body]) | IfThenElse (g, t, e) -> ShapeCombinationUnchecked (Shape (function [g; t; e] -> Expr.IfThenElseUnchecked (g, t, e) | _ -> invalidArg "expr" "invalid shape"), [g; t; e]) - | TupleGet (expr, i) -> - ShapeCombinationUnchecked (Shape (function [expr] -> Expr.TupleGetUnchecked (expr, i) | _ -> invalidArg "expr" "invalid shape"), [expr]) | ExprShape.ShapeCombination (comb, args) -> ShapeCombinationUnchecked (Shape (fun args -> ExprShape.RebuildShapeCombination(comb, args)), args) | ExprShape.ShapeVar v -> ShapeVarUnchecked v @@ -6518,8 +6516,8 @@ module internal AssemblyReader = // mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" // // Note that - // • Since we're only reading valid IL, we assume that the signature is properly formed - // • For type parameters, if the type is non-local, it will be wrapped in brackets ([]) + // � Since we're only reading valid IL, we assume that the signature is properly formed + // � For type parameters, if the type is non-local, it will be wrapped in brackets ([]) member x.ParseType() = // Does the type name start with a leading '['? If so, ignore it @@ -10257,7 +10255,6 @@ namespace ProviderImplementation.ProvidedTypes bb.EmitByte (if req then et_CMOD_REQD else et_CMOD_OPT) emitTypeInfoAsTypeDefOrRefEncoded cenv bb (tref.Scope, tref.Namespace, tref.Name) EmitType cenv env bb ty - | _ -> failwith "EmitType" and EmitLocalInfo cenv env (bb:ByteBuffer) (l:ILLocal) = if l.IsPinned then diff --git a/tests/walkthroughs/DebugStepping/TheBigFileOfDebugStepping.fsx b/tests/walkthroughs/DebugStepping/TheBigFileOfDebugStepping.fsx index 52800ce3c93..9e1f794aa9f 100644 --- a/tests/walkthroughs/DebugStepping/TheBigFileOfDebugStepping.fsx +++ b/tests/walkthroughs/DebugStepping/TheBigFileOfDebugStepping.fsx @@ -890,3 +890,117 @@ TaskBreakpoints1() |> Task.RunSynchronously InlinedCode.test() Pipelined.testListPipeline() Pipelined.testArrayPipeline() + +module BooleanLogic = + + let testFunctionWithAnd x y = + x && y + + let testFunctionWithOr x y = + x || y + + let testFunctionWithMultipleAnd x y z = + x && y && z + + let testFunctionWithMultipleOr x y z = + x || y || z + + let testFunctionWithIfOfAnd x y = + if x && y then + 1 + else + 2 + + let testFunctionWithIfOfOr x y = + if x || y then + 1 + else + 2 + + testFunctionWithAnd true false + testFunctionWithMultipleAnd true true false + testFunctionWithMultipleOr false false true + testFunctionWithOr true false + testFunctionWithIfOfAnd true false + testFunctionWithIfOfOr false false + +// See https://github.com/dotnet/fsharp/issues/11977 +module FalseSteppingBug = + type U = + | A1 of int + | A2 of int + | A3 of int + | A4 of int + + let testFunc f u = + match u with + | A1 n -> f n + | A2 n when n > 4 -> f n // this was falsely hit + | A2 n -> f n + | A3 n -> f n + | A4 n -> f n + + testFunc id (A3 4) + + + +// https://github.com/dotnet/fsharp/pull/11981 +module MissingFirstTry = + let TestFunction3() = + try + let x = 1+1 + System.Console.WriteLine "Hello"; + with _ -> + System.Console.WriteLine "World" + + TestFunction3() + + +// https://github.com/dotnet/fsharp/issues/11979 +// +// Check debug points exist for 'when' +module DebuggingSteppingForMatchWithWhen1 = + + let TestMatchWithWhen x y = + match x with + | [_] when y > 4 -> 5 + | [_] when y < 4 -> -5 + | _ -> 2 + + + TestMatchWithWhen [1] 4 + TestMatchWithWhen [1] 5 + TestMatchWithWhen [1] 6 + + +// https://github.com/dotnet/fsharp/issues/11979 +// +// Check debug points exist for 'when' +module DebuggingSteppingForMatchWithWhenWithVariableBinding = + + let TestMatchWithWhen x = + match x with + | [x] when x > 4 -> 5 + | [x] when x < 4 -> -5 + | _ -> 2 + + + TestMatchWithWhen [4] + TestMatchWithWhen [5] + TestMatchWithWhen [6] + +// https://github.com/dotnet/fsharp/issues/11979 +// +// Check debug points exist for 'when' +module DebuggingSteppingForMatchWithWhenWithUnionClauses= + + let TestMatchWithWhen x = + match x with + | [_;x] + | [x] when x < 4 -> -5 + | _ -> 2 + + + TestMatchWithWhen [4;5] + TestMatchWithWhen [5;4] + TestMatchWithWhen [6] diff --git a/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/ProvidedTypes.fs b/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/ProvidedTypes.fs index 70203708ee9..50757840bef 100644 --- a/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/ProvidedTypes.fs +++ b/vsintegration/tests/MockTypeProviders/DummyProviderForLanguageServiceTesting/ProvidedTypes.fs @@ -469,8 +469,6 @@ namespace ProviderImplementation.ProvidedTypes ShapeCombinationUnchecked (Shape (function [cond; body] -> Expr.WhileLoopUnchecked (cond, body) | _ -> invalidArg "expr" "invalid shape"), [cond; body]) | IfThenElse (g, t, e) -> ShapeCombinationUnchecked (Shape (function [g; t; e] -> Expr.IfThenElseUnchecked (g, t, e) | _ -> invalidArg "expr" "invalid shape"), [g; t; e]) - | TupleGet (expr, i) -> - ShapeCombinationUnchecked (Shape (function [expr] -> Expr.TupleGetUnchecked (expr, i) | _ -> invalidArg "expr" "invalid shape"), [expr]) | ExprShape.ShapeCombination (comb,args) -> ShapeCombinationUnchecked (Shape (fun args -> ExprShape.RebuildShapeCombination(comb, args)), args) | ExprShape.ShapeVar v -> ShapeVarUnchecked v @@ -9799,7 +9797,6 @@ namespace ProviderImplementation.ProvidedTypes bb.EmitByte (if req then et_CMOD_REQD else et_CMOD_OPT) emitTypeInfoAsTypeDefOrRefEncoded cenv bb (tref.Scope, tref.Namespace, tref.Name) EmitType cenv env bb ty - | _ -> failwith "EmitType" and EmitLocalInfo cenv env (bb:ByteBuffer) (l:ILLocal) = if l.IsPinned then From c99d220b0a803d13e363c3af59da88f44aa8e26d Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 19 Aug 2021 01:33:58 +0100 Subject: [PATCH 02/13] fix test case --- tests/service/PatternMatchCompilationTests.fs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/service/PatternMatchCompilationTests.fs b/tests/service/PatternMatchCompilationTests.fs index e266303fa51..08c984d8125 100644 --- a/tests/service/PatternMatchCompilationTests.fs +++ b/tests/service/PatternMatchCompilationTests.fs @@ -439,9 +439,7 @@ match Unchecked.defaultof with | g -> () """ assertHasSymbolUsages ["a"; "b"; "c"; "d"; "e"; "f"; "g"] checkResults - dumpErrors checkResults |> shouldEqual [ - "(4,2--4,85): This rule will never be matched" - ] + dumpErrors checkResults |> shouldEqual [] [] #if !NETCOREAPP From 6cd9bce70a1ed2a130c35f02137a1352a0bc140f Mon Sep 17 00:00:00 2001 From: Don Syme Date: Wed, 2 Mar 2022 13:33:43 +0000 Subject: [PATCH 03/13] column-based type tests --- src/fsharp/IlxGen.fs | 11 ++++++++--- src/fsharp/PatternMatchCompilation.fs | 15 +++++++-------- src/fsharp/TypedTreeOps.fs | 3 +-- 3 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index 0e2cf020cfe..b80d936bb10 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -3815,6 +3815,7 @@ and eligibleForFilter (cenv: cenv) expr = | Expr.Op(TOp.Coerce _, _, _, _) -> true | Expr.Val _ -> true | _ -> false + and checkDecisionTree dtree = match dtree with | TDSwitch(ve, cases, dflt, _) -> @@ -3823,6 +3824,7 @@ and eligibleForFilter (cenv: cenv) expr = dflt |> Option.forall checkDecisionTree | TDSuccess (es, _) -> es |> List.forall check | TDBind(bind, rest) -> check bind.Expr && checkDecisionTree rest + and checkDecisionTreeCase dcase = let (TCase(test, tree)) = dcase checkDecisionTree tree && @@ -5756,8 +5758,8 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau match firstDiscrim with // Iterated tests, e.g. exception constructors, nulltests, typetests and active patterns. // These should always have one positive and one negative branch - | DecisionTreeTest.IsInst _ | DecisionTreeTest.ArrayLength _ + | DecisionTreeTest.IsInst _ | DecisionTreeTest.IsNull | DecisionTreeTest.Const(Const.Zero) -> if not (isSingleton cases) || Option.isNone defaultTargetOpt then failwith "internal error: GenDecisionTreeSwitch: DecisionTreeTest.IsInst/isnull/query" @@ -5781,7 +5783,9 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau CG.EmitInstr cgbuf (pop 1) Push0 (I_brcmp (bi, (List.head caseLabels).CodeLabel)) GenDecisionTreeCases cenv cgbuf stackAtTargets eenv defaultTargetOpt targets targetCounts targetInfos sequel caseLabels cases contf - | DecisionTreeTest.ActivePatternCase _ -> error(InternalError("internal error in codegen: DecisionTreeTest.ActivePatternCase", switchm)) + | DecisionTreeTest.ActivePatternCase _ -> + error(InternalError("internal error in codegen: DecisionTreeTest.ActivePatternCase", switchm)) + | DecisionTreeTest.UnionCase (hdc, tyargs) -> GenExpr cenv cgbuf eenv e Continue let cuspec = GenUnionSpec cenv.amap m eenv.tyenv hdc.TyconRef tyargs @@ -5841,7 +5845,8 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau GenDecisionTreeCases cenv cgbuf stackAtTargets eenv defaultTargetOpt targets targetCounts targetInfos sequel caseLabels cases contf | _ -> error(InternalError("these matches should never be needed", switchm)) - | DecisionTreeTest.Error m -> error(InternalError("Trying to compile error recovery branch", m)) + | DecisionTreeTest.Error m -> + error(InternalError("Trying to compile error recovery branch", m)) and GenDecisionTreeCases cenv cgbuf stackAtTargets eenv defaultTargetOpt targets targetCounts targetInfos sequel caseLabels cases (contf: Zmap<_,_> -> FakeUnit) = diff --git a/src/fsharp/PatternMatchCompilation.fs b/src/fsharp/PatternMatchCompilation.fs index 0f02393895e..aa8f4e66ba3 100644 --- a/src/fsharp/PatternMatchCompilation.fs +++ b/src/fsharp/PatternMatchCompilation.fs @@ -235,7 +235,7 @@ let RefuteDiscrimSet g m path discrims = match discrims with | [DecisionTreeTest.IsNull] -> snd(mkCompGenLocal m notNullText ty), false - | [DecisionTreeTest.IsInst _] -> + | DecisionTreeTest.IsInst _ :: _ -> snd(mkCompGenLocal m otherSubtypeText ty), false | DecisionTreeTest.Const c :: rest -> let consts = Set.ofList (c :: List.choose (function DecisionTreeTest.Const c -> Some c | _ -> None) rest) @@ -496,8 +496,8 @@ let discrimsHaveSameSimultaneousClass g d1 d2 = | DecisionTreeTest.Const _, DecisionTreeTest.Const _ | DecisionTreeTest.IsNull, DecisionTreeTest.IsNull | DecisionTreeTest.ArrayLength _, DecisionTreeTest.ArrayLength _ - | DecisionTreeTest.UnionCase _, DecisionTreeTest.UnionCase _ -> true - | DecisionTreeTest.IsInst _, DecisionTreeTest.IsInst _ -> false + | DecisionTreeTest.UnionCase _, DecisionTreeTest.UnionCase _ + | DecisionTreeTest.IsInst _, DecisionTreeTest.IsInst _ -> true | DecisionTreeTest.ActivePatternCase (_, _, _, apatVrefOpt1, _, _), DecisionTreeTest.ActivePatternCase (_, _, _, apatVrefOpt2, _, _) -> match apatVrefOpt1, apatVrefOpt2 with | Some (vref1, tinst1), Some (vref2, tinst2) -> valRefEq g vref1 vref2 && not (doesActivePatternHaveFreeTypars g vref1) && List.lengthsEqAndForall2 (typeEquiv g) tinst1 tinst2 @@ -577,7 +577,7 @@ let rec BuildSwitch inpExprOpt g expr edges dflt m = if verbose then dprintf "--> BuildSwitch@%a, #edges = %A, dflt.IsSome = %A\n" outputRange m (List.length edges) (Option.isSome dflt) match edges, dflt with | [], None -> failwith "internal error: no edges and no default" - | [], Some dflt -> dflt (* NOTE: first time around, edges<>[] *) + | [], Some dflt -> dflt // Optimize the case where the match always succeeds | [TCase(_, tree)], None -> tree @@ -1023,10 +1023,9 @@ let CompilePatternBasic // This is really an optimization that could be done more effectively in opt.fs // if we flowed a bit of information through - | EdgeDiscrim(_i', DecisionTreeTest.IsInst (_srcty, tgty), m) :: _rest - (* check we can use a simple 'isinst' instruction *) - when canUseTypeTestFast g tgty && isNil origInputValTypars -> + // check we can use a simple 'isinst' instruction + when isRefTy g tgty && canUseTypeTestFast g tgty && isNil origInputValTypars -> let v, vExpr = mkCompGenLocal m "typeTestResult" tgty if origInputVal.IsMemberOrModuleBinding then @@ -1314,7 +1313,7 @@ let CompilePatternBasic | _ -> // Successful type tests against other types don't refute anything - // REVIEW: Successful type tests against one sealed type should refute all other sealed types + // REVIEW: Successful type tests against, say, int should refute other unrelated types such as string [frontier] | TPat_null _ -> diff --git a/src/fsharp/TypedTreeOps.fs b/src/fsharp/TypedTreeOps.fs index 49dc04c11b5..a7e17a6da6f 100644 --- a/src/fsharp/TypedTreeOps.fs +++ b/src/fsharp/TypedTreeOps.fs @@ -8592,8 +8592,7 @@ let (|SpecialNotEquatableHeadType|_|) g ty = // Can we use the fast helper for the 'LanguagePrimitives.IntrinsicFunctions.TypeTestGeneric'? let canUseTypeTestFast g ty = not (isTyparTy g ty) && - not (TypeNullIsTrueValue g ty) && - not (TypeNullNever g ty) + not (TypeNullIsTrueValue g ty) // Can we use the fast helper for the 'LanguagePrimitives.IntrinsicFunctions.UnboxGeneric'? let canUseUnboxFast g m ty = From 2a79dd436ed5c9f53227af1156f794d8f60a21f6 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Wed, 2 Mar 2022 13:55:40 +0000 Subject: [PATCH 04/13] column-based type tests --- src/fsharp/Optimizer.fs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/fsharp/Optimizer.fs b/src/fsharp/Optimizer.fs index 0129e841089..92973641f73 100644 --- a/src/fsharp/Optimizer.fs +++ b/src/fsharp/Optimizer.fs @@ -3695,6 +3695,17 @@ and TryOptimizeDecisionTreeTest cenv test vinfo = /// Optimize/analyze a switch construct from pattern matching and OptimizeSwitch cenv env (e, cases, dflt, m) = + let g = cenv.g + + // Replace IsInst tests by calls to the helper for type tests, which may then get optimized + let e, cases = + match cases with + | [ TCase(DecisionTreeTest.IsInst (_srcTy, tgTy), success)] -> + let testExpr = mkCallTypeTest g m tgTy e + let testCases = [TCase(DecisionTreeTest.Const(Const.Bool true), success)] + testExpr, testCases + | _ -> e, cases + let eR, einfo = OptimizeExpr cenv env e let cases, dflt = @@ -3708,7 +3719,8 @@ and OptimizeSwitch cenv env (e, cases, dflt, m) = dflt else cases, dflt - // OK, see what weRre left with and continue + + // OK, see what we are left with and continue match cases, dflt with | [], Some case -> OptimizeDecisionTree cenv env m case | _ -> OptimizeSwitchFallback cenv env (eR, einfo, cases, dflt, m) From 4dc1adf01cb5f6341cbe8482eb9cc24f1ab5f1a7 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Wed, 2 Mar 2022 14:00:08 +0000 Subject: [PATCH 05/13] update test --- tests/service/PatternMatchCompilationTests.fs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/service/PatternMatchCompilationTests.fs b/tests/service/PatternMatchCompilationTests.fs index 984206bafe5..c72d5bf25c3 100644 --- a/tests/service/PatternMatchCompilationTests.fs +++ b/tests/service/PatternMatchCompilationTests.fs @@ -439,7 +439,9 @@ match Unchecked.defaultof with | g -> () """ assertHasSymbolUsages ["a"; "b"; "c"; "d"; "e"; "f"; "g"] checkResults - dumpErrors checkResults |> shouldEqual [] + dumpErrors checkResults |> shouldEqual [ + "(4,2--4,85): This rule will never be matched" + ] [] #if !NETCOREAPP From 1c956a75b20f5416fe8a097b44fd0461fa88ae29 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Wed, 2 Mar 2022 21:49:02 +0000 Subject: [PATCH 06/13] improved type matching analysis --- src/fsharp/PatternMatchCompilation.fs | 356 ++++++++++++++---- .../CompiledNameAttribute04.il.bsl | 56 ++- .../CodeGen/EmittedIL/Misc/Structs01.il.bsl | 68 ++-- .../CodeGen/EmittedIL/Misc/Structs02.il.bsl | 68 ++-- .../Misc/StructsAsArrayElements01.il.bsl | 68 ++-- .../ToplevelModule-preview.il.bsl | 232 ++++++------ .../ToplevelModule.il.bsl | 232 ++++++------ .../ToplevelNamespace-preview.il.bsl | 346 +++++++++-------- .../ToplevelNamespace.il.bsl | 346 +++++++++-------- .../StaticInit/StaticInit_Struct01.il.bsl | 68 ++-- .../TestFunctions/Testfunction22h.il.bsl | 141 +++---- 11 files changed, 1103 insertions(+), 878 deletions(-) diff --git a/src/fsharp/PatternMatchCompilation.fs b/src/fsharp/PatternMatchCompilation.fs index aa8f4e66ba3..d43cdb235dc 100644 --- a/src/fsharp/PatternMatchCompilation.fs +++ b/src/fsharp/PatternMatchCompilation.fs @@ -411,6 +411,180 @@ let rec removeActive x l = | [] -> [] | Active(h, _, _) as p :: t -> if pathEq x h then t else p :: removeActive x t +[] +type Implication = + /// Indicates that, for any inputs where the first test succeeds, the second test will succeed + | Succeeds + /// Indicates that, for any inputs where the first test succeeded, the second test will fail + | Fails + /// Indicates nothing in particular + | Nothing + +/// Work out what one successful type test implies about a null test +/// +/// Example: +/// match x with +/// | :? string -> ... +/// | null -> ... +/// For any inputs where ':? string' succeeds, 'null' will fail +/// +/// Example: +/// match x with +/// | :? option -> ... +/// | null -> ... +/// Nothing can be learned. If ':? option' succeeds, 'null' may still have to be run. +let computeWhatSuccessfulTypeTestImpliesAboutNullTest g tgtTy1 = + if TypeNullIsTrueValue g tgtTy1 then + Implication.Nothing + else + Implication.Fails + +/// Work out what a failing type test implies about a null test. +/// +/// Example: +/// match x with +/// | :? option -> ... +/// | null -> ... +/// If ':? option' fails then 'null' will fail +let computeWhatFailingTypeTestImpliesAboutNullTest g tgtTy1 = + if TypeNullIsTrueValue g tgtTy1 then + Implication.Fails + else + Implication.Nothing + +/// Work out what one successful null test implies about a type test. +/// +/// Example: +/// match x with +/// | null -> ... +/// | :? string -> ... +/// For any inputs where 'null' succeeds, ':? string' will fail +/// +/// Example: +/// match x with +/// | null -> ... +/// | :? option -> ... +/// For any inputs where 'null' succeeds, ':? option' will succeed +let computeWhatSuccessfulNullTestImpliesAboutTypeTest g tgtTy2 = + if TypeNullIsTrueValue g tgtTy2 then + Implication.Succeeds + else + Implication.Fails + +/// Work out what a failing null test implies about a type test. The answer is "nothing" but it's included for symmetry. +let computeWhatFailingNullTestImpliesAboutTypeTest _g _tgtTy2 = + Implication.Nothing + +/// Work out what one successful type test implies about another type test +let computeWhatSuccessfulTypeTestImpliesAboutTypeTest g amap m tgtTy1 tgtTy2 = + let tgtTy1 = stripTyEqnsWrtErasure EraseAll g tgtTy1 + let tgtTy2 = stripTyEqnsWrtErasure EraseAll g tgtTy2 + + // A successful type test on any type implies all supertypes always succeed + // + // Example: + // match x with + // | :? string -> ... + // | :? IComparable -> ... + // + // Example: + // match x with + // | :? string -> ... + // | :? string -> ... + // + if TypeDefinitelySubsumesTypeNoCoercion 0 g amap m tgtTy2 tgtTy1 then + Implication.Succeeds + + // A successful type test on a sealed type implies all non-related types fail + // + // Example: + // match x with + // | :? int -> ... + // | :? string -> ... + // + // For any inputs where ':? int' succeeds, ':? string' will fail + // + // This doesn't apply to related types: + // match x with + // | :? int -> ... + // | :? IComparable -> ... + // + // Here IComparable neither fails nor is redundant + // + // This doesn't apply to unsealed types: + // match x with + // | :? SomeClass -> ... + // | :? SomeInterface -> ... + // + // This doesn't apply to types with null as true value: + // match x with + // | :? option -> ... + // | :? option -> ... + // + // Here on 'null' input the first pattern succeeds, and the second pattern will also succeed + elif isSealedTy g tgtTy1 && + not (TypeNullIsTrueValue g tgtTy1) && + not (TypeDefinitelySubsumesTypeNoCoercion 0 g amap m tgtTy2 tgtTy1) then + Implication.Fails + + // A successful type test on an unsealed class type implies type tests on unrelated non-interface types always fail + // + // Example: + // match x with + // | :? SomeUnsealedClass -> ... + // | :? SomeUnrelatedClass -> ... + // + // For any inputs where ':? SomeUnsealedClass' succeeds, ':? SomeUnrelatedClass' will fail + // + // This doesn't apply to interfaces or null-as-true-value + elif not (isSealedTy g tgtTy1) && + isClassTy g tgtTy1 && + not (TypeNullIsTrueValue g tgtTy1) && + not (isInterfaceTy g tgtTy2) && + not (TypeFeasiblySubsumesType 0 g amap m tgtTy1 CanCoerce tgtTy2) && + not (TypeFeasiblySubsumesType 0 g amap m tgtTy2 CanCoerce tgtTy1) then + Implication.Fails + + // A successful type test on an interface type refutes sealed types that do not support that interface + // + // Example: + // match x with + // | :? IComparable -> ... + // | :? SomeOtherSealedClass -> ... + // + // For any inputs where ':? IComparable' succeeds, ':? SomeOtherSealedClass' will fail + // + // This doesn't apply to interfaces or null-as-true-value + elif isInterfaceTy g tgtTy1 && + not (TypeNullIsTrueValue g tgtTy1) && + isSealedTy g tgtTy2 && + not (TypeFeasiblySubsumesType 0 g amap m tgtTy1 CanCoerce tgtTy2) then + Implication.Fails + else + Implication.Nothing + +/// Work out what one successful type test implies about another type test +let computeWhatFailingTypeTestImpliesAboutTypeTest g amap m tgtTy1 tgtTy2 = + let tgtTy1 = stripTyEqnsWrtErasure EraseAll g tgtTy1 + let tgtTy2 = stripTyEqnsWrtErasure EraseAll g tgtTy2 + + // A failing type test on any type implies all subtypes fail + // + // Example: + // match x with + // | :? IComparable -> ... + // | :? string -> ... + // + // Example: + // match x with + // | :? string -> ... + // | :? string -> ... + if TypeDefinitelySubsumesTypeNoCoercion 0 g amap m tgtTy1 tgtTy2 then + Implication.Fails + else + Implication.Nothing + + //--------------------------------------------------------------------------- // Utilities //--------------------------------------------------------------------------- @@ -461,25 +635,32 @@ let discrimsEq (g: TcGlobals) d1 d2 = | _ -> false /// Redundancy of 'isinst' patterns -let isDiscrimSubsumedBy g amap m d1 d2 = - (discrimsEq g d1 d2) +let isDiscrimSubsumedBy g amap m discrim taken = + discrimsEq g discrim taken || - (match d1, d2 with - | DecisionTreeTest.IsInst (_, tgty1), DecisionTreeTest.IsInst (_, tgty2) -> - TypeDefinitelySubsumesTypeNoCoercion 0 g amap m tgty2 tgty1 - | _ -> false) + match taken, discrim with + | DecisionTreeTest.IsInst (_, tgtTy1), DecisionTreeTest.IsInst (_, tgtTy2) -> + computeWhatFailingTypeTestImpliesAboutTypeTest g amap m tgtTy1 tgtTy2 = Implication.Fails + | DecisionTreeTest.IsNull _, DecisionTreeTest.IsInst (_, tgtTy2) -> + computeWhatFailingNullTestImpliesAboutTypeTest g tgtTy2 = Implication.Fails + | DecisionTreeTest.IsInst (_, tgtTy1), DecisionTreeTest.IsNull _ -> + computeWhatFailingTypeTestImpliesAboutNullTest g tgtTy1 = Implication.Fails + | _ -> + false + +type EdgeDiscrim = EdgeDiscrim of int * DecisionTreeTest * range /// Choose a set of investigations that can be performed simultaneously -let rec chooseSimultaneousEdgeSet prevOpt f l = +let rec chooseSimultaneousEdgeSet prev f l = match l with | [] -> [], [] | h :: t -> - match f prevOpt h with - | Some x -> - let l, r = chooseSimultaneousEdgeSet (Some x) f t - x :: l, r + match f prev h with + | Some (EdgeDiscrim(_, discrim, _) as edge) -> + let l, r = chooseSimultaneousEdgeSet (discrim::prev) f t + edge :: l, r | None -> - let l, r = chooseSimultaneousEdgeSet prevOpt f t + let l, r = chooseSimultaneousEdgeSet prev f t l, h :: r /// Can we represent a integer discrimination as a 'switch' @@ -491,14 +672,30 @@ let canCompactConstantClass c = | _ -> false /// Can two discriminators in a 'column' be decided simultaneously? -let discrimsHaveSameSimultaneousClass g d1 d2 = - match d1, d2 with - | DecisionTreeTest.Const _, DecisionTreeTest.Const _ - | DecisionTreeTest.IsNull, DecisionTreeTest.IsNull - | DecisionTreeTest.ArrayLength _, DecisionTreeTest.ArrayLength _ - | DecisionTreeTest.UnionCase _, DecisionTreeTest.UnionCase _ - | DecisionTreeTest.IsInst _, DecisionTreeTest.IsInst _ -> true - | DecisionTreeTest.ActivePatternCase (_, _, _, apatVrefOpt1, _, _), DecisionTreeTest.ActivePatternCase (_, _, _, apatVrefOpt2, _, _) -> +let discrimWithinSimultaneousClass g amap m discrim prev = + match discrim, prev with + | _, [] -> true + | DecisionTreeTest.Const _, (DecisionTreeTest.Const _ :: _) + | DecisionTreeTest.ArrayLength _, (DecisionTreeTest.ArrayLength _ :: _) + | DecisionTreeTest.UnionCase _, (DecisionTreeTest.UnionCase _ :: _) -> true + + | DecisionTreeTest.IsNull, _ -> + // Check that each previous test in the set, if successful, gives some information about this test + prev |> List.forall (fun edge -> + match edge with + | DecisionTreeTest.IsNull _ -> true + | DecisionTreeTest.IsInst (_, tgtTy1) -> computeWhatSuccessfulTypeTestImpliesAboutNullTest g tgtTy1 <> Implication.Nothing + | _ -> false) + + | DecisionTreeTest.IsInst (_, tgtTy2), _ -> + // Check that each previous test in the set, if successful, gives some information about this test + prev |> List.forall (fun edge -> + match edge with + | DecisionTreeTest.IsNull _ -> true + | DecisionTreeTest.IsInst (_, tgtTy1) -> computeWhatSuccessfulTypeTestImpliesAboutTypeTest g amap m tgtTy1 tgtTy2 <> Implication.Nothing + | _ -> false) + + | DecisionTreeTest.ActivePatternCase (_, _, _, apatVrefOpt1, _, _), (DecisionTreeTest.ActivePatternCase (_, _, _, apatVrefOpt2, _, _) :: _) -> match apatVrefOpt1, apatVrefOpt2 with | Some (vref1, tinst1), Some (vref2, tinst2) -> valRefEq g vref1 vref2 && not (doesActivePatternHaveFreeTypars g vref1) && List.lengthsEqAndForall2 (typeEquiv g) tinst1 tinst2 | _ -> false (* for equality purposes these are considered different classes of discriminators! This is because adhoc computed patterns have no identity! *) @@ -590,7 +787,7 @@ let rec BuildSwitch inpExprOpt g expr edges dflt m = // isnull and isinst tests | TCase((DecisionTreeTest.IsNull | DecisionTreeTest.IsInst _), _) as edge :: edges, dflt -> - TDSwitch(expr, [edge], Some (BuildSwitch inpExprOpt g expr edges dflt m), m) + TDSwitch(expr, [edge], Some (BuildSwitch None g expr edges dflt m), m) #if OPTIMIZE_LIST_MATCHING // 'cons/nil' tests where we have stored the result of the cons test in an 'isinst' in a variable @@ -702,16 +899,15 @@ let mkFrontiers investigations clauseNumber = investigations |> List.map (fun (actives, valMap) -> Frontier(clauseNumber, actives, valMap)) // Search for pattern decision points that are decided "one at a time" - i.e. where there is no -// multi-way switching. For example partial active patterns or 'isinst' or 'null' test -// or exception tests +// multi-way switching. For example partial active patterns let rec investigationPoints inpPat = seq { match inpPat with | TPat_query ((_, _, _, _, _, apinfo), subPat, _) -> yield not apinfo.IsTotal yield! investigationPoints subPat - | TPat_isinst (_, _, subPatOpt, _) -> - yield true + | TPat_isinst (_, _tgtTy, subPatOpt, _) -> + yield false match subPatOpt with | None -> () | Some subPat -> @@ -727,17 +923,15 @@ let rec investigationPoints inpPat = | TPat_exnconstr(_, subPats, _) -> for subPat in subPats do yield! investigationPoints subPat - yield true | TPat_array (subPats, _, _) | TPat_unioncase (_, _, subPats, _) -> yield false for subPat in subPats do yield! investigationPoints subPat | TPat_range _ + | TPat_null _ | TPat_const _ -> yield false - | TPat_null _ -> - yield true | TPat_wild _ | TPat_error _ -> () } @@ -787,8 +981,6 @@ let rec isPatternDisjunctive inpPat = // The algorithm //--------------------------------------------------------------------------- -type EdgeDiscrim = EdgeDiscrim of int * DecisionTreeTest * range - let getDiscrim (EdgeDiscrim(_, discrim, _)) = discrim let CompilePatternBasic @@ -991,12 +1183,12 @@ let CompilePatternBasic /// Record the clause numbers so we know which rule the TPat_query cam from, so that when we project through /// the frontier we only project the right rule. and ChooseSimultaneousEdges frontiers path = - frontiers |> chooseSimultaneousEdgeSet None (fun prevOpt (Frontier (i, active, _)) -> + frontiers |> chooseSimultaneousEdgeSet [] (fun prev (Frontier (i, active, _)) -> if isMemOfActives path active then let _, patAtActive = lookupActive path active match getDiscrimOfPattern patAtActive with | Some discrim -> - if (match prevOpt with None -> true | Some (EdgeDiscrim(_, discrimPrev, _)) -> discrimsHaveSameSimultaneousClass g discrim discrimPrev) then + if discrimWithinSimultaneousClass g amap patAtActive.Range discrim prev then Some (EdgeDiscrim(i, discrim, patAtActive.Range)) else None @@ -1023,7 +1215,7 @@ let CompilePatternBasic // This is really an optimization that could be done more effectively in opt.fs // if we flowed a bit of information through - | EdgeDiscrim(_i', DecisionTreeTest.IsInst (_srcty, tgty), m) :: _rest + | [EdgeDiscrim(_i', DecisionTreeTest.IsInst (_srcty, tgty), m)] // check we can use a simple 'isinst' instruction when isRefTy g tgty && canUseTypeTestFast g tgty && isNil origInputValTypars -> @@ -1100,7 +1292,7 @@ let CompilePatternBasic ([], simulSetOfEdgeDiscrims) ||> List.collectFold (fun taken (EdgeDiscrim(i', discrim, m)) -> // Check to see if we've already collected the edge for this case, in which case skip it. - if List.exists (isDiscrimSubsumedBy g amap m discrim) taken then + if taken |> List.exists (isDiscrimSubsumedBy g amap m discrim) then // Skip this edge: it is refuted ([], taken) else @@ -1151,8 +1343,10 @@ let CompilePatternBasic // Project a successful edge through the frontiers. let investigation = Investigation(i', discrim, path) - let frontiers = frontiers |> List.collect (GenerateNewFrontiersAfterSuccessfulInvestigation inpExprOpt resPostBindOpt investigation) + let frontiers = frontiers |> List.collect (GenerateNewFrontiersAfterSuccessfulInvestigation taken inpExprOpt resPostBindOpt investigation) + let tree = InvestigateFrontiers refuted frontiers + // Bind the resVar for the union case, if we have one let tree = match ucaseBindOpt with @@ -1193,7 +1387,7 @@ let CompilePatternBasic Some(InvestigateFrontiers refuted fallthroughPathFrontiers) // Build a new frontier that represents the result of a successful investigation - and GenerateNewFrontiersAfterSuccessfulInvestigation inpExprOpt resPostBindOpt investigation frontier = + and GenerateNewFrontiersAfterSuccessfulInvestigation taken inpExprOpt resPostBindOpt investigation frontier = let (Investigation(iInvestigated, discrim, path)) = investigation let (Frontier (i, actives, valMap)) = frontier @@ -1266,7 +1460,7 @@ let CompilePatternBasic mkSubFrontiers path subAccess newActives argpats (fun path j -> PathUnionConstr(path, ucref1, tyargs, j)) | DecisionTreeTest.UnionCase _ -> - // Successful union case tests DO refute all other union case tests (no overlapping union cases) + // Successful union case tests refute all other union case tests (no overlapping union cases) [] | _ -> // Successful union case tests don't refute any other patterns @@ -1274,52 +1468,82 @@ let CompilePatternBasic | TPat_array (argpats, ty, _) -> match discrim with - | DecisionTreeTest.ArrayLength (n, _) when List.length argpats = n -> - let subAccess j tpinst exprIn = mkCallArrayGet g exprm ty (accessf tpinst exprIn) (mkInt g exprm j) - mkSubFrontiers path subAccess newActives argpats (fun path j -> PathArray(path, ty, List.length argpats, j)) - // Successful length tests refute all other lengths - | DecisionTreeTest.ArrayLength _ -> - [] + | DecisionTreeTest.ArrayLength (n, _) -> + if List.length argpats = n then + let subAccess j tpinst exprIn = mkCallArrayGet g exprm ty (accessf tpinst exprIn) (mkInt g exprm j) + mkSubFrontiers path subAccess newActives argpats (fun path j -> PathArray(path, ty, List.length argpats, j)) + else + // Successful length tests refute all other lengths + [] | _ -> [frontier] | TPat_exnconstr (ecref, argpats, _) -> + + let tgtTy1 = mkAppTy ecref [] + if taken |> List.exists (discrimsEq g (DecisionTreeTest.IsInst (g.exn_ty, tgtTy1))) then [] else + match discrim with - | DecisionTreeTest.IsInst (_srcTy, tgtTy) when typeEquiv g (mkAppTy ecref []) tgtTy -> - let subAccess j tpinst exprIn = mkExnCaseFieldGet(accessf tpinst exprIn, ecref, j, exprm) - mkSubFrontiers path subAccess newActives argpats (fun path j -> PathExnConstr(path, ecref, j)) + | DecisionTreeTest.IsInst (_srcTy, tgtTy2) -> + if typeEquiv g tgtTy1 tgtTy2 then + let subAccess j tpinst exprIn = mkExnCaseFieldGet(accessf tpinst exprIn, ecref, j, exprm) + mkSubFrontiers path subAccess newActives argpats (fun path j -> PathExnConstr(path, ecref, j)) + else + // Successful tests against F# exception definitions refute all other non-equivalent type tests + // F# exception definitions are sealed. + [] | _ -> - // Successful type tests against one sealed type refute all other sealed types - // REVIEW: Successful type tests against one sealed type should refute all other sealed types [frontier] - | TPat_isinst (_srcty, tgtTy1, pbindOpt, _) -> + | TPat_isinst (srcTy1, tgtTy1, pbindOpt, m) -> + + if taken |> List.exists (discrimsEq g (DecisionTreeTest.IsInst (srcTy1, tgtTy1))) then [] else + match discrim with - | DecisionTreeTest.IsInst (_srcTy, tgtTy2) when typeEquiv g tgtTy1 tgtTy2 -> - match pbindOpt with - | Some pbind -> - let subAccess tpinst exprIn = - // Fetch the result from the place where we saved it, if possible - match inpExprOpt with - | Some e -> e - | _ -> - // Otherwise call the helper - mkCallUnboxFast g exprm (instType tpinst tgtTy1) (accessf tpinst exprIn) - let subActive = Active(path, SubExpr(subAccess, ve), pbind) - let subActives = BindProjectionPattern subActive (newActives, valMap) - mkFrontiers subActives i - | None -> - [Frontier (i, newActives, valMap)] + | DecisionTreeTest.IsInst (_srcTy, tgtTy2) -> + match computeWhatSuccessfulTypeTestImpliesAboutTypeTest g amap m tgtTy1 tgtTy2 with + | Implication.Succeeds -> + match pbindOpt with + | Some pbind -> + let subAccess tpinst exprIn = + // Fetch the result from the place where we saved it, if possible + match inpExprOpt with + | Some e -> e + | _ -> + // Otherwise call the helper + mkCallUnboxFast g exprm (instType tpinst tgtTy1) (accessf tpinst exprIn) + let subActive = Active(path, SubExpr(subAccess, ve), pbind) + let subActives = BindProjectionPattern subActive (newActives, valMap) + mkFrontiers subActives i + | None -> + [Frontier (i, newActives, valMap)] + | Implication.Fails -> + [] + | Implication.Nothing -> + [frontier] + + | DecisionTreeTest.IsNull _ -> + match computeWhatSuccessfulTypeTestImpliesAboutNullTest g tgtTy1 with + | Implication.Succeeds -> [Frontier (i, newActives, valMap)] + | Implication.Fails -> [] + | Implication.Nothing -> [frontier] | _ -> - // Successful type tests against other types don't refute anything - // REVIEW: Successful type tests against, say, int should refute other unrelated types such as string + // Successful type tests against other types don't refute other things [frontier] | TPat_null _ -> + + if taken |> List.exists (discrimsEq g DecisionTreeTest.IsNull) then [] else + match discrim with | DecisionTreeTest.IsNull -> [Frontier (i, newActives, valMap)] + | DecisionTreeTest.IsInst (_, tgtTy) -> + match computeWhatSuccessfulNullTestImpliesAboutTypeTest g tgtTy with + | Implication.Succeeds -> [Frontier (i, newActives, valMap)] + | Implication.Fails -> [] + | Implication.Nothing -> [frontier] | _ -> // Successful null tests don't refute any other patterns [frontier] diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl index 34fe1c3a684..954e4e28fa0 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000CE0 Length: 0x000002CB } .module CompiledNameAttribute04.exe -// MVID: {61F2D6A5-34DF-584F-A745-0383A5D6F261} +// MVID: {621F7961-34DF-584F-A745-038361791F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07550000 +// Image base: 0x05A60000 // =============== CLASS MEMBERS DECLARATION =================== @@ -214,29 +214,27 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 24 (0x18) + // Code size 17 (0x11) .maxstack 3 .locals init ([0] valuetype CompiledNameAttribute04/S V_0, [1] valuetype CompiledNameAttribute04/S& V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0016 + IL_0001: isinst CompiledNameAttribute04/S + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_000f .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any CompiledNameAttribute04/S - IL_0010: stloc.0 - IL_0011: ldloca.s V_0 - IL_0013: stloc.1 - IL_0014: ldc.i4.1 - IL_0015: ret + IL_000a: ldloca.s V_0 + IL_000c: stloc.1 + IL_000d: ldc.i4.1 + IL_000e: ret .line 100001,100001 : 0,0 '' - IL_0016: ldc.i4.0 - IL_0017: ret + IL_000f: ldc.i4.0 + IL_0010: ret } // end of method S::Equals .method public hidebysig instance !!a @@ -266,28 +264,26 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 27 (0x1b) + // Code size 20 (0x14) .maxstack 4 .locals init ([0] valuetype CompiledNameAttribute04/S V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0019 + IL_0001: isinst CompiledNameAttribute04/S + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any CompiledNameAttribute04/S - IL_0010: stloc.0 - IL_0011: ldarg.0 - IL_0012: ldloc.0 - IL_0013: call instance bool CompiledNameAttribute04/S::Equals(valuetype CompiledNameAttribute04/S) - IL_0018: ret + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: call instance bool CompiledNameAttribute04/S::Equals(valuetype CompiledNameAttribute04/S) + IL_0011: ret .line 100001,100001 : 0,0 '' - IL_0019: ldc.i4.0 - IL_001a: ret + IL_0012: ldc.i4.0 + IL_0013: ret } // end of method S::Equals } // end of class S diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl index e110fbaec2c..415e1d96d75 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000748 Length: 0x00000231 } .module Structs01.exe -// MVID: {61EFEE1F-701F-5E27-A745-03831FEEEF61} +// MVID: {621F7962-701F-5E27-A745-038362791F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06E70000 +// Image base: 0x06730000 // =============== CLASS MEMBERS DECLARATION =================== @@ -200,36 +200,34 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 39 (0x27) + // Code size 32 (0x20) .maxstack 4 .locals init ([0] valuetype Experiment.Test/Test V_0, [1] valuetype Experiment.Test/Test& V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0025 + IL_0001: isinst Experiment.Test/Test + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_001e .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any Experiment.Test/Test - IL_0010: stloc.0 - IL_0011: ldloca.s V_0 - IL_0013: stloc.1 - IL_0014: ldarg.2 - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldfld int32 Experiment.Test/Test::Field - IL_001c: ldloc.1 - IL_001d: ldfld int32 Experiment.Test/Test::Field - IL_0022: ceq - IL_0024: ret + IL_000a: ldloca.s V_0 + IL_000c: stloc.1 + IL_000d: ldarg.2 + IL_000e: stloc.2 + IL_000f: ldarg.0 + IL_0010: ldfld int32 Experiment.Test/Test::Field + IL_0015: ldloc.1 + IL_0016: ldfld int32 Experiment.Test/Test::Field + IL_001b: ceq + IL_001d: ret .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.0 - IL_0026: ret + IL_001e: ldc.i4.0 + IL_001f: ret } // end of method Test::Equals .method public specialname rtspecialname @@ -265,28 +263,26 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 27 (0x1b) + // Code size 20 (0x14) .maxstack 4 .locals init ([0] valuetype Experiment.Test/Test V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0019 + IL_0001: isinst Experiment.Test/Test + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any Experiment.Test/Test - IL_0010: stloc.0 - IL_0011: ldarg.0 - IL_0012: ldloc.0 - IL_0013: call instance bool Experiment.Test/Test::Equals(valuetype Experiment.Test/Test) - IL_0018: ret + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: call instance bool Experiment.Test/Test::Equals(valuetype Experiment.Test/Test) + IL_0011: ret .line 100001,100001 : 0,0 '' - IL_0019: ldc.i4.0 - IL_001a: ret + IL_0012: ldc.i4.0 + IL_0013: ret } // end of method Test::Equals } // end of class Test diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl index 78cbccb0b56..85c29efad10 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000780 Length: 0x00000237 } .module Structs02.exe -// MVID: {61EFEE1F-7040-5E27-A745-03831FEEEF61} +// MVID: {621F7962-7040-5E27-A745-038362791F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07400000 +// Image base: 0x07210000 // =============== CLASS MEMBERS DECLARATION =================== @@ -211,36 +211,34 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 39 (0x27) + // Code size 32 (0x20) .maxstack 4 .locals init ([0] valuetype Experiment.Test/Repro V_0, [1] valuetype Experiment.Test/Repro& V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0025 + IL_0001: isinst Experiment.Test/Repro + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_001e .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any Experiment.Test/Repro - IL_0010: stloc.0 - IL_0011: ldloca.s V_0 - IL_0013: stloc.1 - IL_0014: ldarg.2 - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldfld int32 Experiment.Test/Repro::hash@ - IL_001c: ldloc.1 - IL_001d: ldfld int32 Experiment.Test/Repro::hash@ - IL_0022: ceq - IL_0024: ret + IL_000a: ldloca.s V_0 + IL_000c: stloc.1 + IL_000d: ldarg.2 + IL_000e: stloc.2 + IL_000f: ldarg.0 + IL_0010: ldfld int32 Experiment.Test/Repro::hash@ + IL_0015: ldloc.1 + IL_0016: ldfld int32 Experiment.Test/Repro::hash@ + IL_001b: ceq + IL_001d: ret .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.0 - IL_0026: ret + IL_001e: ldc.i4.0 + IL_001f: ret } // end of method Repro::Equals .method public specialname rtspecialname @@ -313,28 +311,26 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 27 (0x1b) + // Code size 20 (0x14) .maxstack 4 .locals init ([0] valuetype Experiment.Test/Repro V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0019 + IL_0001: isinst Experiment.Test/Repro + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any Experiment.Test/Repro - IL_0010: stloc.0 - IL_0011: ldarg.0 - IL_0012: ldloc.0 - IL_0013: call instance bool Experiment.Test/Repro::Equals(valuetype Experiment.Test/Repro) - IL_0018: ret + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: call instance bool Experiment.Test/Repro::Equals(valuetype Experiment.Test/Repro) + IL_0011: ret .line 100001,100001 : 0,0 '' - IL_0019: ldc.i4.0 - IL_001a: ret + IL_0012: ldc.i4.0 + IL_0013: ret } // end of method Repro::Equals .property instance int32 hash() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl index 305e6e79e47..40e13fc1c44 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000758 Length: 0x0000022C } .module StructsAsArrayElements01.dll -// MVID: {61EFEE1F-29F3-6E68-A745-03831FEEEF61} +// MVID: {621F7962-29F3-6E68-A745-038362791F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06EF0000 +// Image base: 0x05160000 // =============== CLASS MEMBERS DECLARATION =================== @@ -201,36 +201,34 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 39 (0x27) + // Code size 32 (0x20) .maxstack 4 .locals init ([0] valuetype StructsAsArrayElements01/T V_0, [1] valuetype StructsAsArrayElements01/T& V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0025 + IL_0001: isinst StructsAsArrayElements01/T + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_001e .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any StructsAsArrayElements01/T - IL_0010: stloc.0 - IL_0011: ldloca.s V_0 - IL_0013: stloc.1 - IL_0014: ldarg.2 - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldfld int32 StructsAsArrayElements01/T::i - IL_001c: ldloc.1 - IL_001d: ldfld int32 StructsAsArrayElements01/T::i - IL_0022: ceq - IL_0024: ret + IL_000a: ldloca.s V_0 + IL_000c: stloc.1 + IL_000d: ldarg.2 + IL_000e: stloc.2 + IL_000f: ldarg.0 + IL_0010: ldfld int32 StructsAsArrayElements01/T::i + IL_0015: ldloc.1 + IL_0016: ldfld int32 StructsAsArrayElements01/T::i + IL_001b: ceq + IL_001d: ret .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.0 - IL_0026: ret + IL_001e: ldc.i4.0 + IL_001f: ret } // end of method T::Equals .method public hidebysig instance void @@ -266,28 +264,26 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 27 (0x1b) + // Code size 20 (0x14) .maxstack 4 .locals init ([0] valuetype StructsAsArrayElements01/T V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0019 + IL_0001: isinst StructsAsArrayElements01/T + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any StructsAsArrayElements01/T - IL_0010: stloc.0 - IL_0011: ldarg.0 - IL_0012: ldloc.0 - IL_0013: call instance bool StructsAsArrayElements01/T::Equals(valuetype StructsAsArrayElements01/T) - IL_0018: ret + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: call instance bool StructsAsArrayElements01/T::Equals(valuetype StructsAsArrayElements01/T) + IL_0011: ret .line 100001,100001 : 0,0 '' - IL_0019: ldc.i4.0 - IL_001a: ret + IL_0012: ldc.i4.0 + IL_0013: ret } // end of method T::Equals } // end of class T diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule-preview.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule-preview.il.bsl index 73dc3548868..65eff8c5e03 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule-preview.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule-preview.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00001158 Length: 0x00000405 } .module 'TopLevelModule-preview.dll' -// MVID: {620FD84C-A1E9-C7BD-A745-03834CD80F62} +// MVID: {621F796D-A1E9-C7BD-A745-03836D791F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06ED0000 +// Image base: 0x06FA0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -652,16 +652,17 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 70 (0x46) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0004: brfalse.s IL_003e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 @@ -669,97 +670,102 @@ IL_000c: stloc.0 .line 100001,100001 : 0,0 '' IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000e: brfalse.s IL_003c .line 100001,100001 : 0,0 '' IL_0010: ldloc.0 IL_0011: stloc.1 .line 100001,100001 : 0,0 '' IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_0013: stloc.2 + IL_0014: ldloc.2 + IL_0015: isinst ABC/MyExn + IL_001a: ldnull + IL_001b: cgt.un + IL_001d: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_001c: ldarg.2 - IL_001d: stloc.2 - IL_001e: ldarg.0 - IL_001f: castclass ABC/MyExn - IL_0024: call instance int32 ABC/MyExn::get_Data0() - IL_0029: ldloc.1 - IL_002a: castclass ABC/MyExn - IL_002f: call instance int32 ABC/MyExn::get_Data0() - IL_0034: ceq - IL_0036: ret + IL_001f: ldarg.2 + IL_0020: stloc.3 + IL_0021: ldarg.0 + IL_0022: castclass ABC/MyExn + IL_0027: call instance int32 ABC/MyExn::get_Data0() + IL_002c: ldloc.1 + IL_002d: castclass ABC/MyExn + IL_0032: call instance int32 ABC/MyExn::get_Data0() + IL_0037: ceq + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003c: ldc.i4.0 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003b: ldarg.1 - IL_003c: ldnull - IL_003d: cgt.un - IL_003f: ldc.i4.0 - IL_0040: ceq - IL_0042: ret + IL_003e: ldarg.1 + IL_003f: ldnull + IL_0040: cgt.un + IL_0042: ldc.i4.0 + IL_0043: ceq + IL_0045: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 62 (0x3e) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0004: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 IL_0007: ldnull IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_000a: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst ABC/MyExn + IL_0014: ldnull + IL_0015: cgt.un + IL_0017: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass ABC/MyExn - IL_001c: call instance int32 ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass ABC/MyExn - IL_0027: call instance int32 ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0019: ldarg.0 + IL_001a: castclass ABC/MyExn + IL_001f: call instance int32 ABC/MyExn::get_Data0() + IL_0024: ldarg.1 + IL_0025: castclass ABC/MyExn + IL_002a: call instance int32 ABC/MyExn::get_Data0() + IL_002f: ceq + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -1438,16 +1444,17 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 70 (0x46) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0004: brfalse.s IL_003e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 @@ -1455,97 +1462,102 @@ IL_000c: stloc.0 .line 100001,100001 : 0,0 '' IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000e: brfalse.s IL_003c .line 100001,100001 : 0,0 '' IL_0010: ldloc.0 IL_0011: stloc.1 .line 100001,100001 : 0,0 '' IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_0013: stloc.2 + IL_0014: ldloc.2 + IL_0015: isinst ABC/ABC/MyExn + IL_001a: ldnull + IL_001b: cgt.un + IL_001d: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_001c: ldarg.2 - IL_001d: stloc.2 - IL_001e: ldarg.0 - IL_001f: castclass ABC/ABC/MyExn - IL_0024: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0029: ldloc.1 - IL_002a: castclass ABC/ABC/MyExn - IL_002f: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0034: ceq - IL_0036: ret + IL_001f: ldarg.2 + IL_0020: stloc.3 + IL_0021: ldarg.0 + IL_0022: castclass ABC/ABC/MyExn + IL_0027: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_002c: ldloc.1 + IL_002d: castclass ABC/ABC/MyExn + IL_0032: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0037: ceq + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003c: ldc.i4.0 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003b: ldarg.1 - IL_003c: ldnull - IL_003d: cgt.un - IL_003f: ldc.i4.0 - IL_0040: ceq - IL_0042: ret + IL_003e: ldarg.1 + IL_003f: ldnull + IL_0040: cgt.un + IL_0042: ldc.i4.0 + IL_0043: ceq + IL_0045: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 62 (0x3e) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0004: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 IL_0007: ldnull IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_000a: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst ABC/ABC/MyExn + IL_0014: ldnull + IL_0015: cgt.un + IL_0017: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass ABC/ABC/MyExn - IL_001c: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass ABC/ABC/MyExn - IL_0027: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0019: ldarg.0 + IL_001a: castclass ABC/ABC/MyExn + IL_001f: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0024: ldarg.1 + IL_0025: castclass ABC/ABC/MyExn + IL_002a: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_002f: ceq + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl index 46252f18879..37b1ecd0840 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00001148 Length: 0x000003FD } .module TopLevelModule.dll -// MVID: {620FB412-37F5-C118-A745-038312B40F62} +// MVID: {621F7967-37F5-C118-A745-038367791F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06DA0000 +// Image base: 0x06FB0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -638,16 +638,17 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 70 (0x46) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0004: brfalse.s IL_003e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 @@ -655,97 +656,102 @@ IL_000c: stloc.0 .line 100001,100001 : 0,0 '' IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000e: brfalse.s IL_003c .line 100001,100001 : 0,0 '' IL_0010: ldloc.0 IL_0011: stloc.1 .line 100001,100001 : 0,0 '' IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_0013: stloc.2 + IL_0014: ldloc.2 + IL_0015: isinst ABC/MyExn + IL_001a: ldnull + IL_001b: cgt.un + IL_001d: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_001c: ldarg.2 - IL_001d: stloc.2 - IL_001e: ldarg.0 - IL_001f: castclass ABC/MyExn - IL_0024: call instance int32 ABC/MyExn::get_Data0() - IL_0029: ldloc.1 - IL_002a: castclass ABC/MyExn - IL_002f: call instance int32 ABC/MyExn::get_Data0() - IL_0034: ceq - IL_0036: ret + IL_001f: ldarg.2 + IL_0020: stloc.3 + IL_0021: ldarg.0 + IL_0022: castclass ABC/MyExn + IL_0027: call instance int32 ABC/MyExn::get_Data0() + IL_002c: ldloc.1 + IL_002d: castclass ABC/MyExn + IL_0032: call instance int32 ABC/MyExn::get_Data0() + IL_0037: ceq + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003c: ldc.i4.0 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003b: ldarg.1 - IL_003c: ldnull - IL_003d: cgt.un - IL_003f: ldc.i4.0 - IL_0040: ceq - IL_0042: ret + IL_003e: ldarg.1 + IL_003f: ldnull + IL_0040: cgt.un + IL_0042: ldc.i4.0 + IL_0043: ceq + IL_0045: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 62 (0x3e) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0004: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 IL_0007: ldnull IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_000a: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst ABC/MyExn + IL_0014: ldnull + IL_0015: cgt.un + IL_0017: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass ABC/MyExn - IL_001c: call instance int32 ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass ABC/MyExn - IL_0027: call instance int32 ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0019: ldarg.0 + IL_001a: castclass ABC/MyExn + IL_001f: call instance int32 ABC/MyExn::get_Data0() + IL_0024: ldarg.1 + IL_0025: castclass ABC/MyExn + IL_002a: call instance int32 ABC/MyExn::get_Data0() + IL_002f: ceq + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -1410,16 +1416,17 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 70 (0x46) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0004: brfalse.s IL_003e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 @@ -1427,97 +1434,102 @@ IL_000c: stloc.0 .line 100001,100001 : 0,0 '' IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000e: brfalse.s IL_003c .line 100001,100001 : 0,0 '' IL_0010: ldloc.0 IL_0011: stloc.1 .line 100001,100001 : 0,0 '' IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_0013: stloc.2 + IL_0014: ldloc.2 + IL_0015: isinst ABC/ABC/MyExn + IL_001a: ldnull + IL_001b: cgt.un + IL_001d: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_001c: ldarg.2 - IL_001d: stloc.2 - IL_001e: ldarg.0 - IL_001f: castclass ABC/ABC/MyExn - IL_0024: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0029: ldloc.1 - IL_002a: castclass ABC/ABC/MyExn - IL_002f: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0034: ceq - IL_0036: ret + IL_001f: ldarg.2 + IL_0020: stloc.3 + IL_0021: ldarg.0 + IL_0022: castclass ABC/ABC/MyExn + IL_0027: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_002c: ldloc.1 + IL_002d: castclass ABC/ABC/MyExn + IL_0032: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0037: ceq + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003c: ldc.i4.0 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003b: ldarg.1 - IL_003c: ldnull - IL_003d: cgt.un - IL_003f: ldc.i4.0 - IL_0040: ceq - IL_0042: ret + IL_003e: ldarg.1 + IL_003f: ldnull + IL_0040: cgt.un + IL_0042: ldc.i4.0 + IL_0043: ceq + IL_0045: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 62 (0x3e) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0004: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 IL_0007: ldnull IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_000a: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst ABC/ABC/MyExn + IL_0014: ldnull + IL_0015: cgt.un + IL_0017: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass ABC/ABC/MyExn - IL_001c: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass ABC/ABC/MyExn - IL_0027: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0019: ldarg.0 + IL_001a: castclass ABC/ABC/MyExn + IL_001f: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0024: ldarg.1 + IL_0025: castclass ABC/ABC/MyExn + IL_002a: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_002f: ceq + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace-preview.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace-preview.il.bsl index 55493db0923..c9283f43a6d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace-preview.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace-preview.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00001860 Length: 0x00000564 } .module 'ToplevelNamespace-preview.dll' -// MVID: {620FD84E-96BA-B011-A745-03834ED80F62} +// MVID: {621F7970-96BA-B011-A745-038370791F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A60000 +// Image base: 0x06FB0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -647,16 +647,17 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 70 (0x46) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0004: brfalse.s IL_003e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 @@ -664,97 +665,102 @@ IL_000c: stloc.0 .line 100001,100001 : 0,0 '' IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000e: brfalse.s IL_003c .line 100001,100001 : 0,0 '' IL_0010: ldloc.0 IL_0011: stloc.1 .line 100001,100001 : 0,0 '' IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_0013: stloc.2 + IL_0014: ldloc.2 + IL_0015: isinst XYZ.MyExn + IL_001a: ldnull + IL_001b: cgt.un + IL_001d: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_001c: ldarg.2 - IL_001d: stloc.2 - IL_001e: ldarg.0 - IL_001f: castclass XYZ.MyExn - IL_0024: call instance int32 XYZ.MyExn::get_Data0() - IL_0029: ldloc.1 - IL_002a: castclass XYZ.MyExn - IL_002f: call instance int32 XYZ.MyExn::get_Data0() - IL_0034: ceq - IL_0036: ret + IL_001f: ldarg.2 + IL_0020: stloc.3 + IL_0021: ldarg.0 + IL_0022: castclass XYZ.MyExn + IL_0027: call instance int32 XYZ.MyExn::get_Data0() + IL_002c: ldloc.1 + IL_002d: castclass XYZ.MyExn + IL_0032: call instance int32 XYZ.MyExn::get_Data0() + IL_0037: ceq + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003c: ldc.i4.0 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003b: ldarg.1 - IL_003c: ldnull - IL_003d: cgt.un - IL_003f: ldc.i4.0 - IL_0040: ceq - IL_0042: ret + IL_003e: ldarg.1 + IL_003f: ldnull + IL_0040: cgt.un + IL_0042: ldc.i4.0 + IL_0043: ceq + IL_0045: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 62 (0x3e) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0004: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 IL_0007: ldnull IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_000a: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst XYZ.MyExn + IL_0014: ldnull + IL_0015: cgt.un + IL_0017: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass XYZ.MyExn - IL_001c: call instance int32 XYZ.MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass XYZ.MyExn - IL_0027: call instance int32 XYZ.MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0019: ldarg.0 + IL_001a: castclass XYZ.MyExn + IL_001f: call instance int32 XYZ.MyExn::get_Data0() + IL_0024: ldarg.1 + IL_0025: castclass XYZ.MyExn + IL_002a: call instance int32 XYZ.MyExn::get_Data0() + IL_002f: ceq + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -1433,16 +1439,17 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 70 (0x46) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0004: brfalse.s IL_003e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 @@ -1450,97 +1457,102 @@ IL_000c: stloc.0 .line 100001,100001 : 0,0 '' IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000e: brfalse.s IL_003c .line 100001,100001 : 0,0 '' IL_0010: ldloc.0 IL_0011: stloc.1 .line 100001,100001 : 0,0 '' IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_0013: stloc.2 + IL_0014: ldloc.2 + IL_0015: isinst XYZ.ABC/MyExn + IL_001a: ldnull + IL_001b: cgt.un + IL_001d: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_001c: ldarg.2 - IL_001d: stloc.2 - IL_001e: ldarg.0 - IL_001f: castclass XYZ.ABC/MyExn - IL_0024: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0029: ldloc.1 - IL_002a: castclass XYZ.ABC/MyExn - IL_002f: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0034: ceq - IL_0036: ret + IL_001f: ldarg.2 + IL_0020: stloc.3 + IL_0021: ldarg.0 + IL_0022: castclass XYZ.ABC/MyExn + IL_0027: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_002c: ldloc.1 + IL_002d: castclass XYZ.ABC/MyExn + IL_0032: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0037: ceq + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003c: ldc.i4.0 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003b: ldarg.1 - IL_003c: ldnull - IL_003d: cgt.un - IL_003f: ldc.i4.0 - IL_0040: ceq - IL_0042: ret + IL_003e: ldarg.1 + IL_003f: ldnull + IL_0040: cgt.un + IL_0042: ldc.i4.0 + IL_0043: ceq + IL_0045: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 62 (0x3e) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0004: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 IL_0007: ldnull IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_000a: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst XYZ.ABC/MyExn + IL_0014: ldnull + IL_0015: cgt.un + IL_0017: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass XYZ.ABC/MyExn - IL_001c: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass XYZ.ABC/MyExn - IL_0027: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0019: ldarg.0 + IL_001a: castclass XYZ.ABC/MyExn + IL_001f: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0024: ldarg.1 + IL_0025: castclass XYZ.ABC/MyExn + IL_002a: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_002f: ceq + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -2219,16 +2231,17 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 70 (0x46) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0004: brfalse.s IL_003e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 @@ -2236,97 +2249,102 @@ IL_000c: stloc.0 .line 100001,100001 : 0,0 '' IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000e: brfalse.s IL_003c .line 100001,100001 : 0,0 '' IL_0010: ldloc.0 IL_0011: stloc.1 .line 100001,100001 : 0,0 '' IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_0013: stloc.2 + IL_0014: ldloc.2 + IL_0015: isinst XYZ.ABC/ABC/MyExn + IL_001a: ldnull + IL_001b: cgt.un + IL_001d: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_001c: ldarg.2 - IL_001d: stloc.2 - IL_001e: ldarg.0 - IL_001f: castclass XYZ.ABC/ABC/MyExn - IL_0024: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0029: ldloc.1 - IL_002a: castclass XYZ.ABC/ABC/MyExn - IL_002f: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0034: ceq - IL_0036: ret + IL_001f: ldarg.2 + IL_0020: stloc.3 + IL_0021: ldarg.0 + IL_0022: castclass XYZ.ABC/ABC/MyExn + IL_0027: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_002c: ldloc.1 + IL_002d: castclass XYZ.ABC/ABC/MyExn + IL_0032: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0037: ceq + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003c: ldc.i4.0 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003b: ldarg.1 - IL_003c: ldnull - IL_003d: cgt.un - IL_003f: ldc.i4.0 - IL_0040: ceq - IL_0042: ret + IL_003e: ldarg.1 + IL_003f: ldnull + IL_0040: cgt.un + IL_0042: ldc.i4.0 + IL_0043: ceq + IL_0045: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 62 (0x3e) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0004: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 IL_0007: ldnull IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_000a: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst XYZ.ABC/ABC/MyExn + IL_0014: ldnull + IL_0015: cgt.un + IL_0017: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass XYZ.ABC/ABC/MyExn - IL_001c: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass XYZ.ABC/ABC/MyExn - IL_0027: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0019: ldarg.0 + IL_001a: castclass XYZ.ABC/ABC/MyExn + IL_001f: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0024: ldarg.1 + IL_0025: castclass XYZ.ABC/ABC/MyExn + IL_002a: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_002f: ceq + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl index 18fba70daff..0a43fab3392 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00001850 Length: 0x0000055C } .module ToplevelNamespace.dll -// MVID: {620FB591-218B-729A-A745-038391B50F62} +// MVID: {621F796A-218B-729A-A745-03836A791F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06FC0000 +// Image base: 0x07440000 // =============== CLASS MEMBERS DECLARATION =================== @@ -633,16 +633,17 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 70 (0x46) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0004: brfalse.s IL_003e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 @@ -650,97 +651,102 @@ IL_000c: stloc.0 .line 100001,100001 : 0,0 '' IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000e: brfalse.s IL_003c .line 100001,100001 : 0,0 '' IL_0010: ldloc.0 IL_0011: stloc.1 .line 100001,100001 : 0,0 '' IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_0013: stloc.2 + IL_0014: ldloc.2 + IL_0015: isinst XYZ.MyExn + IL_001a: ldnull + IL_001b: cgt.un + IL_001d: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_001c: ldarg.2 - IL_001d: stloc.2 - IL_001e: ldarg.0 - IL_001f: castclass XYZ.MyExn - IL_0024: call instance int32 XYZ.MyExn::get_Data0() - IL_0029: ldloc.1 - IL_002a: castclass XYZ.MyExn - IL_002f: call instance int32 XYZ.MyExn::get_Data0() - IL_0034: ceq - IL_0036: ret + IL_001f: ldarg.2 + IL_0020: stloc.3 + IL_0021: ldarg.0 + IL_0022: castclass XYZ.MyExn + IL_0027: call instance int32 XYZ.MyExn::get_Data0() + IL_002c: ldloc.1 + IL_002d: castclass XYZ.MyExn + IL_0032: call instance int32 XYZ.MyExn::get_Data0() + IL_0037: ceq + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003c: ldc.i4.0 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003b: ldarg.1 - IL_003c: ldnull - IL_003d: cgt.un - IL_003f: ldc.i4.0 - IL_0040: ceq - IL_0042: ret + IL_003e: ldarg.1 + IL_003f: ldnull + IL_0040: cgt.un + IL_0042: ldc.i4.0 + IL_0043: ceq + IL_0045: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 62 (0x3e) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0004: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 IL_0007: ldnull IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_000a: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst XYZ.MyExn + IL_0014: ldnull + IL_0015: cgt.un + IL_0017: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass XYZ.MyExn - IL_001c: call instance int32 XYZ.MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass XYZ.MyExn - IL_0027: call instance int32 XYZ.MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0019: ldarg.0 + IL_001a: castclass XYZ.MyExn + IL_001f: call instance int32 XYZ.MyExn::get_Data0() + IL_0024: ldarg.1 + IL_0025: castclass XYZ.MyExn + IL_002a: call instance int32 XYZ.MyExn::get_Data0() + IL_002f: ceq + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -1405,16 +1411,17 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 70 (0x46) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0004: brfalse.s IL_003e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 @@ -1422,97 +1429,102 @@ IL_000c: stloc.0 .line 100001,100001 : 0,0 '' IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000e: brfalse.s IL_003c .line 100001,100001 : 0,0 '' IL_0010: ldloc.0 IL_0011: stloc.1 .line 100001,100001 : 0,0 '' IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_0013: stloc.2 + IL_0014: ldloc.2 + IL_0015: isinst XYZ.ABC/MyExn + IL_001a: ldnull + IL_001b: cgt.un + IL_001d: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_001c: ldarg.2 - IL_001d: stloc.2 - IL_001e: ldarg.0 - IL_001f: castclass XYZ.ABC/MyExn - IL_0024: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0029: ldloc.1 - IL_002a: castclass XYZ.ABC/MyExn - IL_002f: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0034: ceq - IL_0036: ret + IL_001f: ldarg.2 + IL_0020: stloc.3 + IL_0021: ldarg.0 + IL_0022: castclass XYZ.ABC/MyExn + IL_0027: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_002c: ldloc.1 + IL_002d: castclass XYZ.ABC/MyExn + IL_0032: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0037: ceq + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003c: ldc.i4.0 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003b: ldarg.1 - IL_003c: ldnull - IL_003d: cgt.un - IL_003f: ldc.i4.0 - IL_0040: ceq - IL_0042: ret + IL_003e: ldarg.1 + IL_003f: ldnull + IL_0040: cgt.un + IL_0042: ldc.i4.0 + IL_0043: ceq + IL_0045: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 62 (0x3e) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0004: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 IL_0007: ldnull IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_000a: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst XYZ.ABC/MyExn + IL_0014: ldnull + IL_0015: cgt.un + IL_0017: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass XYZ.ABC/MyExn - IL_001c: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass XYZ.ABC/MyExn - IL_0027: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0019: ldarg.0 + IL_001a: castclass XYZ.ABC/MyExn + IL_001f: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0024: ldarg.1 + IL_0025: castclass XYZ.ABC/MyExn + IL_002a: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_002f: ceq + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -2177,16 +2189,17 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 70 (0x46) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + [2] object V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_003b + IL_0004: brfalse.s IL_003e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 @@ -2194,97 +2207,102 @@ IL_000c: stloc.0 .line 100001,100001 : 0,0 '' IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0039 + IL_000e: brfalse.s IL_003c .line 100001,100001 : 0,0 '' IL_0010: ldloc.0 IL_0011: stloc.1 .line 100001,100001 : 0,0 '' IL_0012: ldloc.0 - IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0018: brtrue.s IL_001c - - IL_001a: br.s IL_0037 + IL_0013: stloc.2 + IL_0014: ldloc.2 + IL_0015: isinst XYZ.ABC/ABC/MyExn + IL_001a: ldnull + IL_001b: cgt.un + IL_001d: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_001c: ldarg.2 - IL_001d: stloc.2 - IL_001e: ldarg.0 - IL_001f: castclass XYZ.ABC/ABC/MyExn - IL_0024: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0029: ldloc.1 - IL_002a: castclass XYZ.ABC/ABC/MyExn - IL_002f: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0034: ceq - IL_0036: ret + IL_001f: ldarg.2 + IL_0020: stloc.3 + IL_0021: ldarg.0 + IL_0022: castclass XYZ.ABC/ABC/MyExn + IL_0027: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_002c: ldloc.1 + IL_002d: castclass XYZ.ABC/ABC/MyExn + IL_0032: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0037: ceq + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_003c: ldc.i4.0 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003b: ldarg.1 - IL_003c: ldnull - IL_003d: cgt.un - IL_003f: ldc.i4.0 - IL_0040: ceq - IL_0042: ret + IL_003e: ldarg.1 + IL_003f: ldnull + IL_0040: cgt.un + IL_0042: ldc.i4.0 + IL_0043: ceq + IL_0045: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) - .maxstack 8 + // Code size 62 (0x3e) + .maxstack 4 + .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldnull IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0004: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 IL_0007: ldnull IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_000a: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' IL_000c: ldarg.1 - IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0012: brtrue.s IL_0016 - - IL_0014: br.s IL_002f + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst XYZ.ABC/ABC/MyExn + IL_0014: ldnull + IL_0015: cgt.un + IL_0017: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: castclass XYZ.ABC/ABC/MyExn - IL_001c: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0021: ldarg.1 - IL_0022: castclass XYZ.ABC/ABC/MyExn - IL_0027: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_002c: ceq - IL_002e: ret + IL_0019: ldarg.0 + IL_001a: castclass XYZ.ABC/ABC/MyExn + IL_001f: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0024: ldarg.1 + IL_0025: castclass XYZ.ABC/ABC/MyExn + IL_002a: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_002f: ceq + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl index 0d494197f3c..7a6a5911bcd 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x000007A8 Length: 0x0000021F } .module StaticInit_Struct01.dll -// MVID: {61FC3629-05F6-D6CB-A745-03832936FC61} +// MVID: {621F7972-05F6-D6CB-A745-038372791F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05360000 +// Image base: 0x06C40000 // =============== CLASS MEMBERS DECLARATION =================== @@ -174,7 +174,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 42 (0x2a) + // Code size 35 (0x23) .maxstack 4 .locals init ([0] valuetype StaticInit_Struct01/C V_0, [1] valuetype StaticInit_Struct01/C& V_1, @@ -182,30 +182,28 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\StaticInit\\StaticInit_Struct01.fs' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0028 + IL_0001: isinst StaticInit_Struct01/C + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0021 .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any StaticInit_Struct01/C - IL_0010: stloc.0 - IL_0011: ldloca.s V_0 - IL_0013: stloc.1 - IL_0014: ldarg.2 - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s - IL_001c: ldloc.1 - IL_001d: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s - IL_0022: call bool [netstandard]System.DateTime::Equals(valuetype [netstandard]System.DateTime, + IL_000a: ldloca.s V_0 + IL_000c: stloc.1 + IL_000d: ldarg.2 + IL_000e: stloc.2 + IL_000f: ldarg.0 + IL_0010: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s + IL_0015: ldloc.1 + IL_0016: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s + IL_001b: call bool [netstandard]System.DateTime::Equals(valuetype [netstandard]System.DateTime, valuetype [netstandard]System.DateTime) - IL_0027: ret + IL_0020: ret .line 100001,100001 : 0,0 '' - IL_0028: ldc.i4.0 - IL_0029: ret + IL_0021: ldc.i4.0 + IL_0022: ret } // end of method C::Equals .method public specialname rtspecialname @@ -270,28 +268,26 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 27 (0x1b) + // Code size 20 (0x14) .maxstack 4 .locals init ([0] valuetype StaticInit_Struct01/C V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0019 + IL_0001: isinst StaticInit_Struct01/C + IL_0006: stloc.0 + .line 100001,100001 : 0,0 '' + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: unbox.any StaticInit_Struct01/C - IL_0010: stloc.0 - IL_0011: ldarg.0 - IL_0012: ldloc.0 - IL_0013: call instance bool StaticInit_Struct01/C::Equals(valuetype StaticInit_Struct01/C) - IL_0018: ret + IL_000a: ldarg.0 + IL_000b: ldloc.0 + IL_000c: call instance bool StaticInit_Struct01/C::Equals(valuetype StaticInit_Struct01/C) + IL_0011: ret .line 100001,100001 : 0,0 '' - IL_0019: ldc.i4.0 - IL_001a: ret + IL_0012: ldc.i4.0 + IL_0013: ret } // end of method C::Equals .method private specialname rtspecialname static diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22h.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22h.il.bsl index 65774ed275a..7ee9a4744b0 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22h.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22h.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000278 Length: 0x000000BA } .module Testfunction22h.exe -// MVID: {620E3B70-0266-39F6-A745-0383703B0E62} +// MVID: {621F7973-0266-39F6-A745-038373791F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x073A0000 +// Image base: 0x063D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -306,126 +306,87 @@ .method public static void test5() cil managed { - // Code size 158 (0x9e) - .maxstack 4 + // Code size 105 (0x69) + .maxstack 3 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.ArgumentException V_1, [2] class [mscorlib]System.ArgumentException a, - [3] class [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException V_3, - [4] string msg, - [5] class [mscorlib]System.Exception V_5, - [6] class [mscorlib]System.ArgumentException V_6, - [7] class [mscorlib]System.ArgumentException V_7, - [8] class [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException V_8, - [9] string V_9) + [3] object V_3, + [4] class [mscorlib]System.ArgumentException V_4, + [5] string msg) .line 32,32 : 4,7 '' .try { IL_0000: nop .line 33,33 : 7,33 '' IL_0001: call void [mscorlib]System.Console::WriteLine() - IL_0006: leave IL_009d + IL_0006: leave.s IL_0068 .line 34,34 : 4,8 '' } // end .try - filter + catch [mscorlib]System.Object { - IL_000b: castclass [mscorlib]System.Exception - IL_0010: stloc.0 - IL_0011: ldloc.0 - IL_0012: isinst [mscorlib]System.ArgumentException - IL_0017: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0018: ldloc.1 - IL_0019: brfalse.s IL_001d - - IL_001b: br.s IL_0029 - - IL_001d: ldloc.0 - IL_001e: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0023: stloc.3 + IL_0008: castclass [mscorlib]System.Exception + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: isinst [mscorlib]System.ArgumentException + IL_0014: stloc.1 .line 100001,100001 : 0,0 '' - IL_0024: ldloc.3 - IL_0025: brfalse.s IL_0040 + IL_0015: ldloc.1 + IL_0016: brfalse.s IL_001a - IL_0027: br.s IL_002f + IL_0018: br.s IL_0038 .line 100001,100001 : 0,0 '' - IL_0029: ldloc.1 - IL_002a: stloc.2 - .line 36,36 : 9,80 '' - IL_002b: ldc.i4.1 - .line 100001,100001 : 0,0 '' - IL_002c: nop - IL_002d: br.s IL_0042 + IL_001a: ldloc.1 + IL_001b: stloc.3 + IL_001c: ldloc.3 + IL_001d: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0022: ldnull + IL_0023: cgt.un + IL_0025: brfalse.s IL_005d + IL_0027: ldloc.0 + IL_0028: isinst [mscorlib]System.ArgumentException + IL_002d: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_002f: ldloc.0 - IL_0030: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0035: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() - IL_003a: stloc.s msg - .line 37,37 : 9,76 '' - IL_003c: ldc.i4.1 - .line 100001,100001 : 0,0 '' - IL_003d: nop - IL_003e: br.s IL_0042 + IL_002f: ldloc.s V_4 + IL_0031: brfalse.s IL_0047 .line 100001,100001 : 0,0 '' - IL_0040: ldc.i4.0 - .line 100001,100001 : 0,0 '' - IL_0041: nop - IL_0042: endfilter - } // end filter - { // handler - IL_0044: castclass [mscorlib]System.Exception - IL_0049: stloc.s V_5 - IL_004b: ldloc.s V_5 - IL_004d: isinst [mscorlib]System.ArgumentException - IL_0052: stloc.s V_6 - .line 100001,100001 : 0,0 '' - IL_0054: ldloc.s V_6 - IL_0056: brfalse.s IL_005a - - IL_0058: br.s IL_0069 - - IL_005a: ldloc.s V_5 - IL_005c: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0061: stloc.s V_8 - .line 100001,100001 : 0,0 '' - IL_0063: ldloc.s V_8 - IL_0065: brfalse.s IL_0092 - - IL_0067: br.s IL_007b + IL_0033: ldloc.s V_4 + IL_0035: stloc.2 + IL_0036: br.s IL_003a .line 100001,100001 : 0,0 '' - IL_0069: ldloc.s V_6 - IL_006b: stloc.s V_7 + IL_0038: ldloc.1 + IL_0039: stloc.2 .line 36,36 : 45,80 '' - IL_006d: ldloc.s V_7 - IL_006f: callvirt instance string [mscorlib]System.Exception::get_Message() - IL_0074: call void [mscorlib]System.Console::WriteLine(string) - IL_0079: leave.s IL_009d + IL_003a: ldloc.2 + IL_003b: callvirt instance string [mscorlib]System.Exception::get_Message() + IL_0040: call void [mscorlib]System.Console::WriteLine(string) + IL_0045: leave.s IL_0068 .line 100001,100001 : 0,0 '' - IL_007b: ldloc.s V_5 - IL_007d: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0082: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() - IL_0087: stloc.s V_9 + IL_0047: ldloc.0 + IL_0048: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_004d: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_0052: stloc.s msg .line 37,37 : 47,76 '' - IL_0089: ldloc.s V_9 - IL_008b: call void [mscorlib]System.Console::WriteLine(string) - IL_0090: leave.s IL_009d + IL_0054: ldloc.s msg + IL_0056: call void [mscorlib]System.Console::WriteLine(string) + IL_005b: leave.s IL_0068 .line 100001,100001 : 0,0 '' - IL_0092: rethrow - IL_0094: ldnull - IL_0095: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_009a: pop - IL_009b: leave.s IL_009d + IL_005d: rethrow + IL_005f: ldnull + IL_0060: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0065: pop + IL_0066: leave.s IL_0068 .line 100001,100001 : 0,0 '' } // end handler - IL_009d: ret + IL_0068: ret } // end of method Testfunction22h::test5 } // end of class Testfunction22h From 14b7577da53acdf4961618eafe47533603837a6f Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 3 Mar 2022 00:49:52 +0000 Subject: [PATCH 07/13] improve diagnostics --- src/fsharp/CompilerImports.fs | 4 +- src/fsharp/IlxGen.fs | 2 +- src/fsharp/ilx/EraseUnions.fs | 4 +- src/fsharp/import.fs | 6 +- .../TestFunctions/Testfunction22h.il.bsl | 96 +++++++++---------- .../Inlining/StructUnion01.il.bsl | 73 +++++++------- 6 files changed, 88 insertions(+), 97 deletions(-) diff --git a/src/fsharp/CompilerImports.fs b/src/fsharp/CompilerImports.fs index 5b9a6d8c97b..a81439e22e1 100644 --- a/src/fsharp/CompilerImports.fs +++ b/src/fsharp/CompilerImports.fs @@ -1830,12 +1830,12 @@ and [] TcImports(tcConfigP: TcConfigProvider, initialResolutions: TcAsse let primaryScopeRef = match primaryAssem with | _, [ResolvedImportedAssembly ccu] -> ccu.FSharpViewOfMetadata.ILScopeRef - | _ -> failwith "unexpected" + | _ -> failwith "primaryScopeRef - unexpected" let primaryAssemblyResolvedPath = match primaryAssemblyResolution with | [primaryAssemblyResolution] -> primaryAssemblyResolution.resolvedPath - | _ -> failwith "unexpected" + | _ -> failwith "primaryAssemblyResolvedPath - unexpected" let resolvedAssemblies = tcResolutions.GetAssemblyResolutions() diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index b80d936bb10..109e104ee64 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -7422,7 +7422,7 @@ and GenModuleDef cenv (cgbuf: CodeGenBuffer) qname lazyInitInfo eenv x = let recBinds = bindsRemaining |> List.takeWhile (function ModuleOrNamespaceBinding.Binding _ -> true | _ -> false) - |> List.map (function ModuleOrNamespaceBinding.Binding recBind -> recBind | _ -> failwith "unexpected") + |> List.map (function ModuleOrNamespaceBinding.Binding recBind -> recBind | _ -> failwith "GenModuleDef - unexpected") let otherBinds = bindsRemaining |> List.skipWhile (function ModuleOrNamespaceBinding.Binding _ -> true | _ -> false) diff --git a/src/fsharp/ilx/EraseUnions.fs b/src/fsharp/ilx/EraseUnions.fs index 580461805cd..2ed77f2d9e5 100644 --- a/src/fsharp/ilx/EraseUnions.fs +++ b/src/fsharp/ilx/EraseUnions.fs @@ -406,7 +406,7 @@ let mkIsData ilg (avoidHelpers, cuspec, cidx) = match cidx with | TagNil -> mkGetTailOrNull avoidHelpers cuspec @ [ AI_ldnull; AI_ceq ] | TagCons -> mkGetTailOrNull avoidHelpers cuspec @ [ AI_ldnull; AI_cgt_un ] - | _ -> failwith "unexpected" + | _ -> failwith "mkIsData - unexpected" type ICodeGen<'Mark> = abstract CodeLabel: 'Mark -> ILCodeLabel @@ -454,7 +454,7 @@ let mkBrIsData ilg sense (avoidHelpers, cuspec,cidx,tg) = match cidx with | TagNil -> mkGetTailOrNull avoidHelpers cuspec @ [I_brcmp (neg,tg)] | TagCons -> mkGetTailOrNull avoidHelpers cuspec @ [ I_brcmp (pos,tg)] - | _ -> failwith "unexpected" + | _ -> failwith "mkBrIsData - unexpected" let emitLdDataTagPrim ilg ldOpt (cg: ICodeGen<'Mark>) (avoidHelpers,cuspec: IlxUnionSpec) = diff --git a/src/fsharp/import.fs b/src/fsharp/import.fs index 810d5093c2a..6766e56f299 100644 --- a/src/fsharp/import.fs +++ b/src/fsharp/import.fs @@ -399,15 +399,19 @@ let ImportProvidedMethodBaseAsILMethodRef (env: ImportMap) (m: range) (mbase: Ta | None -> match mbase.OfType() with | Some _ -> mbase.PApply((fun _ -> ProvidedType.Void), m) - | _ -> failwith "unexpected" + | _ -> failwith "ImportProvidedMethodBaseAsILMethodRef - unexpected" + let genericArity = if mbase.PUntaint((fun x -> x.IsGenericMethod), m) then mbase.PUntaint((fun x -> x.GetGenericArguments().Length), m) else 0 + let callingConv = (if mbase.PUntaint((fun x -> x.IsStatic), m) then ILCallingConv.Static else ILCallingConv.Instance) + let parameters = [ for p in mbase.PApplyArray((fun x -> x.GetParameters()), "GetParameters", m) do yield ImportProvidedTypeAsILType env m (p.PApply((fun p -> p.ParameterType), m)) ] + mkILMethRef (tref, callingConv, mbase.PUntaint((fun x -> x.Name), m), genericArity, parameters, ImportProvidedTypeAsILType env m rty ) #endif diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22h.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22h.il.bsl index 7ee9a4744b0..f6dc2201cd4 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22h.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22h.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000278 Length: 0x000000BA } .module Testfunction22h.exe -// MVID: {621F7973-0266-39F6-A745-038373791F62} +// MVID: {621FED72-0266-39F6-A745-038372ED1F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x063D0000 +// Image base: 0x05900000 // =============== CLASS MEMBERS DECLARATION =================== @@ -306,21 +306,20 @@ .method public static void test5() cil managed { - // Code size 105 (0x69) + // Code size 96 (0x60) .maxstack 3 .locals init ([0] class [mscorlib]System.Exception V_0, - [1] class [mscorlib]System.ArgumentException V_1, - [2] class [mscorlib]System.ArgumentException a, - [3] object V_3, - [4] class [mscorlib]System.ArgumentException V_4, - [5] string msg) + [1] object V_1, + [2] object V_2, + [3] class [mscorlib]System.ArgumentException a, + [4] string msg) .line 32,32 : 4,7 '' .try { IL_0000: nop .line 33,33 : 7,33 '' IL_0001: call void [mscorlib]System.Console::WriteLine() - IL_0006: leave.s IL_0068 + IL_0006: leave.s IL_005f .line 34,34 : 4,8 '' } // end .try @@ -328,65 +327,56 @@ { IL_0008: castclass [mscorlib]System.Exception IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: isinst [mscorlib]System.ArgumentException - IL_0014: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0015: ldloc.1 - IL_0016: brfalse.s IL_001a - - IL_0018: br.s IL_0038 - .line 100001,100001 : 0,0 '' - IL_001a: ldloc.1 - IL_001b: stloc.3 - IL_001c: ldloc.3 - IL_001d: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_0022: ldnull - IL_0023: cgt.un - IL_0025: brfalse.s IL_005d + IL_000e: ldloc.0 + IL_000f: stloc.1 + IL_0010: ldloc.1 + IL_0011: isinst [mscorlib]System.ArgumentException + IL_0016: ldnull + IL_0017: cgt.un + IL_0019: brtrue.s IL_002a - IL_0027: ldloc.0 - IL_0028: isinst [mscorlib]System.ArgumentException - IL_002d: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_002f: ldloc.s V_4 - IL_0031: brfalse.s IL_0047 + IL_001b: ldloc.0 + IL_001c: stloc.2 + IL_001d: ldloc.2 + IL_001e: isinst [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0023: ldnull + IL_0024: cgt.un + IL_0026: brfalse.s IL_0054 - .line 100001,100001 : 0,0 '' - IL_0033: ldloc.s V_4 - IL_0035: stloc.2 - IL_0036: br.s IL_003a + IL_0028: br.s IL_003e .line 100001,100001 : 0,0 '' - IL_0038: ldloc.1 - IL_0039: stloc.2 + IL_002a: ldloc.0 + IL_002b: unbox.any [mscorlib]System.ArgumentException + IL_0030: stloc.3 .line 36,36 : 45,80 '' - IL_003a: ldloc.2 - IL_003b: callvirt instance string [mscorlib]System.Exception::get_Message() - IL_0040: call void [mscorlib]System.Console::WriteLine(string) - IL_0045: leave.s IL_0068 + IL_0031: ldloc.3 + IL_0032: callvirt instance string [mscorlib]System.Exception::get_Message() + IL_0037: call void [mscorlib]System.Console::WriteLine(string) + IL_003c: leave.s IL_005f .line 100001,100001 : 0,0 '' - IL_0047: ldloc.0 - IL_0048: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException - IL_004d: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() - IL_0052: stloc.s msg + IL_003e: ldloc.0 + IL_003f: castclass [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException + IL_0044: call instance string [FSharp.Core]Microsoft.FSharp.Core.MatchFailureException::get_Data0() + IL_0049: stloc.s msg .line 37,37 : 47,76 '' - IL_0054: ldloc.s msg - IL_0056: call void [mscorlib]System.Console::WriteLine(string) - IL_005b: leave.s IL_0068 + IL_004b: ldloc.s msg + IL_004d: call void [mscorlib]System.Console::WriteLine(string) + IL_0052: leave.s IL_005f .line 100001,100001 : 0,0 '' - IL_005d: rethrow - IL_005f: ldnull - IL_0060: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_0065: pop - IL_0066: leave.s IL_0068 + IL_0054: rethrow + IL_0056: ldnull + IL_0057: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_005c: pop + IL_005d: leave.s IL_005f .line 100001,100001 : 0,0 '' } // end handler - IL_0068: ret + IL_005f: ret } // end of method Testfunction22h::test5 } // end of class Testfunction22h diff --git a/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl b/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl index 32e3a02a228..4190b17020a 100644 --- a/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 5:0:0:0 + .ver 6:0:0:0 } .assembly StructUnion01 { @@ -32,13 +32,13 @@ // Offset: 0x00000880 Length: 0x00000421 } .module StructUnion01.dll -// MVID: {60BE1F16-D3E9-6B24-A745-0383161FBE60} +// MVID: {621FF1EF-D3E9-6B24-A745-0383EFF11F62} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x065C0000 +// Image base: 0x05A00000 // =============== CLASS MEMBERS DECLARATION =================== @@ -374,38 +374,35 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 54 (0x36) + // Code size 47 (0x2f) .maxstack 4 .locals init (valuetype StructUnion01/U V_0) IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0034 + IL_0001: isinst StructUnion01/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_002d - IL_000a: ldarg.1 - IL_000b: unbox.any StructUnion01/U - IL_0010: stloc.0 - IL_0011: ldarg.0 - IL_0012: pop - IL_0013: ldarg.0 + IL_000a: ldarg.0 + IL_000b: pop + IL_000c: ldarg.0 + IL_000d: ldfld int32 StructUnion01/U::item1 + IL_0012: ldloca.s V_0 IL_0014: ldfld int32 StructUnion01/U::item1 - IL_0019: ldloca.s V_0 - IL_001b: ldfld int32 StructUnion01/U::item1 - IL_0020: bne.un.s IL_0032 + IL_0019: bne.un.s IL_002b - IL_0022: ldarg.0 + IL_001b: ldarg.0 + IL_001c: ldfld int32 StructUnion01/U::item2 + IL_0021: ldloca.s V_0 IL_0023: ldfld int32 StructUnion01/U::item2 - IL_0028: ldloca.s V_0 - IL_002a: ldfld int32 StructUnion01/U::item2 - IL_002f: ceq - IL_0031: ret + IL_0028: ceq + IL_002a: ret - IL_0032: ldc.i4.0 - IL_0033: ret + IL_002b: ldc.i4.0 + IL_002c: ret - IL_0034: ldc.i4.0 - IL_0035: ret + IL_002d: ldc.i4.0 + IL_002e: ret } // end of method U::Equals .method public hidebysig virtual final @@ -437,22 +434,22 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 25 (0x19) - .maxstack 8 + // Code size 20 (0x14) + .maxstack 4 + .locals init (valuetype StructUnion01/U V_0) IL_0000: ldarg.1 - IL_0001: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0006: brtrue.s IL_000a - - IL_0008: br.s IL_0017 + IL_0001: isinst StructUnion01/U + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse.s IL_0012 IL_000a: ldarg.0 - IL_000b: ldarg.1 - IL_000c: unbox.any StructUnion01/U - IL_0011: call instance bool StructUnion01/U::Equals(valuetype StructUnion01/U) - IL_0016: ret + IL_000b: ldloc.0 + IL_000c: call instance bool StructUnion01/U::Equals(valuetype StructUnion01/U) + IL_0011: ret - IL_0017: ldc.i4.0 - IL_0018: ret + IL_0012: ldc.i4.0 + IL_0013: ret } // end of method U::Equals .property instance int32 Tag() From 7f0cb49f1309517309dfa5f268954fa8d5c1e9c1 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 3 Mar 2022 13:10:48 +0000 Subject: [PATCH 08/13] fix codegen --- src/fsharp/TypedTreeOps.fs | 2 +- .../fsharp41/net45/providerDesigner.dll | Bin 71168 -> 71168 bytes .../fsharp41/net461/providerDesigner.dll | Bin 71168 -> 71168 bytes .../fsharp41/net472/providerDesigner.dll | Bin 71168 -> 71168 bytes .../fsharp41/net48/providerDesigner.dll | Bin 71168 -> 71168 bytes .../netstandard2.0/providerDesigner.dll | Bin 71168 -> 71168 bytes 6 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fsharp/TypedTreeOps.fs b/src/fsharp/TypedTreeOps.fs index a7e17a6da6f..816a4c38c32 100644 --- a/src/fsharp/TypedTreeOps.fs +++ b/src/fsharp/TypedTreeOps.fs @@ -8610,7 +8610,7 @@ let canUseUnboxFast g m ty = // used for compiler-generated code. let mkIsInstConditional g m tgty vinpe v e2 e3 = - if canUseTypeTestFast g tgty then + if canUseTypeTestFast g tgty && isRefTy g tgty then let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m) let tg2 = mbuilder.AddResultTarget(e2) diff --git a/tests/fsharp/typeProviders/fsharp41/net45/providerDesigner.dll b/tests/fsharp/typeProviders/fsharp41/net45/providerDesigner.dll index 43d16856e51a110f37f87fe00ec6d9d5a6371a80..6c1217f65c0e4d59ea09cf741bd699e4bdb17d7e 100644 GIT binary patch delta 4411 zcmZ{o4RjRM702(L+3%0+%)Hsn*X|M|5fTC-n*hoNCD6h8un5-qqXNTF?V3@Jq|SOGl=79l~RLO=+D2C(nVjN=|p-E;Py_j~{U zyYJrF*_oZKZZcFi8R}N@8GlV$zs85-*6(-_&x8>}m>vEdh6ei65!fq-zBw>L1syam z1W;!I;vxgNL6UJImF4hhn|mam?&PcN)GXiP)02jBo-}?NLmM~$E&!WJi9;TxL(eTt z^P~YpR?2;rP%q6e5J2RrIGUX<9wu;AW_5ViPAU%daNC$nKRyJsk+~>Nen=vuK)?`_vIS`(Bb=!WCEMBi^d{<7BRu2{#i86^Y5Z@ zss91v&&-F6Z1Eb|q?DybHuEB#`TvQSx=HuHE57ox&L6Ywmf5O3O5Cr+50!XAraiIa z!FuXcrfR~21A|hgxY>d{CGMv^J?~lQHo;Z@avJqfJ;R_KmJ0ROV(CK3Ar*sRg*<}~|nphcq?l4f5B-5Mp5%iJP3uaYIn zI>NpPE@_lteg+r84UL8qMwU#qrLm-gu9H==beb0967Xh*6wwm2mQhUB#C(NDXba1% z27UZMenk_BD4<`pnoA$BZg+E+lMrtKon+iRgY6WIRk zaD=SJT4>SIp!G6W3x_m1VmU|Yn6}Vmy-w*fjgqXlDD`O0d(9n`45QSRScj{?p%H6v z704Q~23J86CAxn*unt#2x++q#@vC8sMy$iNkfRana4qDiq;$9rrfGDVY_hL|N{z0O zGF%7CH8RPsQmtAgVCU01sAm*XPLp@3cuW)7hGFQ|7P2nFa9*Q2xr|buMoHGw_Aq!y ztNp$v&!k$qLIn26S&lHQ)aaJn;@AW&8p-a5ov*?)dQqnP6PW8h?A!tGC`jNB?wiit za7d%C+@oXmK=5v6C2-ySRLtL@LL7X1O#CmTD|8R{w0DYl8k#inx(e|O zyrWTl$omY%lN!G6oi3h%ZjJupEuz$?5KognLCG+lZFmoNuenC-0pwnjV) z6LhUn{2a=3?U48dyrK|+9&hMl@k?k?(UR{=kS@R>P2A`kPANEnZAhTicdyh7*&3bo z)k_y4PooO^H{iUkZ6!Cs!F~uSg&roiz^f1|w4ZzrL0yw%z&u@>C(~bB zb9J#0Ijq#hI+??2h15gJ<4d~pWsb+jD5n8GiPDVN6Q!9jZqg5>6`~oF6k?^-$z}`% z6;!vd;0)b5l~}Msx0VnqR_fX^V#8Wp+e+-%plgST1DkcNpE&WDu1RtXcI(7=*|XN#Jngc!Af15N@T3nwG!gSdR<#aJlLRXTS+XoWru#) z{xFHdW4hQ+;;~O(D9H(En9Q84w0UwOCM(2F%a=JXX6V{Z*@rp0R)~I_rfZ#&ABz-H zTN;21CM)+p^-D4Umqb|yV0Dx=313o3btd5}y0b-2!p10PGPXoHlkt%5?39x6Xp}Pr zdnnQV)ubtSNw?OBDR@1~dOHgD{BWFJ=5EI%h18E}FlOl5cxeb`>l)`y#g)2Nh{Lc> z*NA%{h59*j+7veHyVlUH}bKSTXJJo}X#5MkoDSD0wwv zcgg@JYsBuN0Zdm&Z8v}!3WZn~ol*dU3aZ6q;EX7129_$soCWR-oE_!N#Of$#Ca%<- z#GQ%tQO;4=q&rJoqp(eNdT7$U?lEX#k6Fq`QQ`_>Qe?x#t5)Y9ZK=@hnq|r50@BX# z#=KN=+P)l1Ey-N15_fRdpYsinZqR1G2>lRUE5u`LZMJDbO=`QZt;K^kQPZhrT3)_xm&&@r?|`A ztK1vi+uUuDO%Hv_P2O%h0^4n^5V5zyUiw~$U9iQ`3a>k6;hPQ#7vgN(=bS^|W^8kH z(fKZD<=wDD7>p-`>3H1ih7*y${pzt)7yZYfJmX;Ht8Yx^Yv?!c* delta 4388 zcmZ{o3v?4z8ppqH(k7E+l6fXg+av^`(n5tw3-TyXrD&^AC|YfIs~db^)vjPESQJmX z&_#*`sly_oJ;DlWRZt)(D7c3TbbX*yg_Xsk6p9M+sPgJ6kG*&1I(E;l>B)EQ@B9Dn zckg#+PNqri+JxG*2}>5(j`mM&d@6(k8(+BtKhqIon4|v*W4*nZ2=rAz-W(*tBr@1i z1z=_Y_;_!wkCK>6WKHjI`TE;31=~zFF}v)UsRKBFf4iHTHXOj^Fk<>WWaz(){r&yp zOSH3mtdq>_4IpzfIZ~BOlI?DXExj+mfXiBX9dY;PW;%!@@WY=WUf$!JmQ1plqSJEy znYwKLmr9AvX4=<+m? z%;DgZMBOT^lCz;XRE#QY4HYG1!-3F##SSjdF%nC|V^urc6Rsrj;qY4|&JN!mOZ*KX zkxp*Z?C>qwkQr&_1(Nx{g$(~H%fCbZ+iyC5t+rXqphdT7G`1M=3nR8$g|-SEMy6gL zncXLCf{!{U8?lA-^t8XmXNPm)xg=WS_`K|w6JiSnliLVdVYal?Sq7wrL9KEpUk+J} zraNX~IgB@G9)Cby?ka~0gIb(NMs7Q`4{P<-y`u$0l&j!gF>u!WIV&2(2mJEK(fM{Wjmn#4z(gWWUWJ4Pvv z`8Wg4G8(8-f+1#0Bh>?Bo?sIHrF|CGfHov%hVtX7WG1}z}5-K-|N3qcH1Vjy@XK}y#30TRr^=hNL4%Q9W3Bnd?+6(k^u9WVA$!5<0;s;ymKkLA%cE@UPl^MC)si3U6s+ z1RZJ_UDnIWv=;)5?g|tV%3`!3(8=$E z0!C*8CAbg9GZK^Ek@mqPMzJNyr=Uo1_Dfcz!wWptiU zJDgz7QK`M;gV1ddz1OqluOKj*Zu>@VZg7I!0m~T$#S%OWs~Ihg1?LldpW#cvGWjsH zF?ut27okH2*+|hx2z4>-W=Fkz1o$y@2~+EYfI&BMH#-{TqmXH7ugl-ScuV_4J_Zd2 zsqkGec2GVJYfa>fLJ{R8Y+~Ybp&UZ#d2|UCT0)bQQ;@~zXlR9U8ip~tXi%O(azF@| z*iS>LL3C>+cp9Px(XDlmc@@7pWA-knwX7$VE?8n&)72lK+tP~FAA!Ff$cvVlqMm_( zL3D{)^(>@Y+8Xs76j)lDdLBwG4YdnUV`%{`)(s0Rv0D2#G+Sb^`V(xiv?=P(@V=$h zsuy9urL9pfLARx~sh5Gj;g^k~b_LQ6q8klpfWs`US|k5im0Ds6au~J5Wg3T-2AM}{ z!#c~kg0tb$9?k^Z*+Wajy*)HLCXA(cd(~t5yBD#M0KNNw_{g_RG<iKr#x zA!}klOTjKntJYFc8u!b*6vqR~N+j=4)b?-#~0Ls1@i_EgKIpqEEbR>|*p$m}+nn-ApUAhnooTjOddx8zn~cDVmJ| zgUoibF=9}RcG00^W4eLnmC3=p9@ZQzFo-(u@a5obJ)A?ZvWIgBR$I?r;T(#~ zE$5x$P+V_1{iNu-zF~N_hnR~({Iwg-IXx>~8PF+C|&JqOGAzFeIV zU*Rrji}YjTGw@Aaosdyt7uVuU`}V|5B;F}*Gh#8<>|f_<;r{90Ew*rn{Ov|OAv)ox zKZ=Oo+pmZpaP(99822Q3!2W>GCykVTz>P^aka*Nzs5eeXitUnyLrwBWQVX{*`E#iq zcSxPicKld6<=lx6rP$<7Y)sjn*oohfSP08g-;oMo9eE}e!iTA+$oT8jO;Q=0B(V@M z_%j*%f}MOBgoA}7GcXvC%V1P+78b%pGL~(0KN`?@g07|aE0XbXeRxqQ?UbAWcZcR< z22_WlBrXc2DHlnnj?bI;6k>%g z7WeTul|$SaD7PKqo&sllOffmxB>noyk77mq?a59K&&GG$R?H2ma_w;SaX;%;g)PD* z;U6Bw`!BC7R*Md4x^zq`koU<06u-JmJ)xFqSG0}#*gFp57kcl~3>>E4QkpSfH2E&Q zP(6hJe^K+vSmckBaf(JWXB^EWldHW>;^>ePf3fs)9JSRIbRTnfxlan`g!A6Z-s{B) zVzW3=`n^;k9g;*jPkv7xuFO_8D4!`KwBy=&ZGf-B_q6Xt-)p`P<8S=#AUCerwFjDA zE%2th1>Pp_Dm(%&3N5fkn2K)*3RYnSZuLA!-VSUPkC6NkXtDX=4XGctOSj@ahY#B0 zpWbT^_rGQ!1*TFQkuoIuie?aay7?#o<+) z58 diff --git a/tests/fsharp/typeProviders/fsharp41/net461/providerDesigner.dll b/tests/fsharp/typeProviders/fsharp41/net461/providerDesigner.dll index 262e9c2e4db7873b2a4982e5691f74f728540601..be66328ed4749f5f4719cc9f2b927b40475fe63f 100644 GIT binary patch delta 4411 zcmZ{o4RjRM702(L+3%0+%)Hsn*Y1)?A_M{=n*hr4Q3#SqiXcQ2lWH0RA|g;o5Gb5Y zB~>7Zp&La6iXVWXL<=qjDYQ+FA*HAVE1)OAA|yyuzJwrX0Q=sXam?}5J!kKEzxV&Y z`|h2co!Qx{22)josdl+I=&vbjY63WN&9(>ebQCdyInm!?BsG|cz+SoZEr1!y>0sA9 z0Bsf^A(kriR?K6ltVT~cyo1F|w^-?|q0&rM(?E5Gk`fg!A zUq67@a<$7Axj-|d0?0z8K(o`u10p_8&rw#t_1oxy=lr|g`c zK(}2?yP6Tqb>WfN&VE-d#cd7|HY%%3BK%2V z7X=?M|IB>E%of+E7G9PX+02V{=Km*R>UzWfuKdc+I)BWzQ)R1m^SF=44|zPU(w^Ay zU_G_*sb$eVq2B4^y=*}~kNap(&->c<9 zTI3E}2@KO|u5|&Hz*J7lY_0N(juM#5smXpu-bl4ong+v_w=E^mH;ZMlBve}39p$iu zQ;Y3Gr4(mEwMKASF*|2MZA8aw3USVb4LaR!?dSXrH0l&b`Z?!8hfc}lvM?XcX=F>W z4|2|jOFAW4pTYTXL#Kg+ku6(mX*g-6>r{dx)f$`V#i{db1Bs8+79x(vl@0~1KYm^ z4wIEw4UKvlv|kpg;h;{3ZD%PR)fal~*C~CbQ;Pi-rB2;>ueFtuX^7Sm>u?3QbYcyz z097Z};0j2gME7q2*5L}s)I>@SaU~4XiFLRNa&=-Iu7Z4xc!#TDl1`_{dgp4W(CHc} z#nrGxCyV+j)v7cCc0R3!Iz|zGn!HQJqq@j8j6#RLkaZD-b2`-RNv8r3p65!kJca7AIcPPf!X*LrBwN%cPLeibIsi!$Axz%1_}_cnNkBY{77Z@PEF zL7l$x4vpIl;k%iYz;*9aaes$$og`m1(_mj`+z0T9PDQ@Ko_|B` za4pNzzADdQDAywG&rN1#d<&-?t+hp;5ftn8$DP5KD@BN#Q=o8uSYQApDWrG&Sn zqmZf7!wF+4<><6Cp~H3zN_6T=n|{_*lDXwb>;DZtb4 zj!tzE|1%U%==i#SihLS6boz_GkWv>XktThDl4%s%@E+k_>oU0={G2qc12PS*Mm__h z4Xs}O97+xCp!@~A!ihkqKk~8sB{XVin;1w^&ci`nTo)KfDLk5ONT4ZjuW|u$bUG8L zQ!YZjPB%DBJ#f(4d~FpCo_tpG1V1t(T^8(p{LM`y%x3F-{%S>+OJHmtXiufg>T zpf8qY0=W!+PAp9^xdNGnwwQE5*w8kSt59NShsZZD%h0;XHCSb6iW<2N8w_!_`Yr4? z#0lg(c;C>9NjID@w8i8GoHMjdc8`^A@{@R*l zhy^HMg(23e0#68{c8Iuem!WkNHy$-KMUBG_Lz}I7&=kq} zu{H@^oV3~`^mEcmlQGM1ZdPT?@8Kj^VQ3SGiq(czOuSfUXp4ytHyhd}5|7O}ksr1{ zL=y0*A$F5Q>@pTAY7&~pF()f+wwjD-oY-mkvf#%oL))$fFxSuuFo=^3txXAHAt$Y+ zUO0CgzyE1pl3uv5hqV`0^{}SkOPn-k3cg}E8`Tu7@8L|t#vaZzJZL!Elr%ij!R-nw2!F|W*OQjr7z|fn&8dA<%U*(1F+W6 zh<5;PU=#uEU<|}vTx1u|Z0|tq;M4-_t`@>Bo!A{Ogr@PVm=<_1$TU@_6Tyv?{5r8a zWeC%BVt3IHW^&Tn4Ph3i2CuH*_(wkdN{MOs)sWhmm5yv z&BnSO&LP-fIEy_)uvv5ZXwp62VQ6EIS^T3Y_JlDdwsy=_yZeuh4CwGox8(^TWqWj8 zeg-+^T!JOGG@+WuZNfFRCVDJC17p$e^D_!eo(8P6G@5tOSnS!)<7A=Ux82bs9QPga zGzp*iT6z4^V}~=oQbhd9a?|rKfnBA)5T2zs*spPYe75v8z8xQ?@r-Y5bm=eSpZte( z7c5LXATU9dOf6G=Cv4qTJeXzsvH8uQ?#+i4?LC`;z&J6S`auJO1FTgyw&#y#rV(+n)avHFzGI{L6 zF`n(#a^7{SSZV2$GoUQ+3}!$@pp?ev0=<+QwBJ#RNoWl$Q(QFei#|3nkbYh{2PAlz z#z62IjeUYQXuLCs>bVj#LoPur9o7BHdS;cn@^J5Zbd6YUnlOwQ4ha7=E zMnp&5mtmdfEn(x>ocn4J%c9+rdb>sCGvNx9i0wiRh_U{Y>G74L1MYtc%VJyZw+nb7 z_UEaSg*)atnjERl7o4(dx2xNAz%9jn9Ov=O^O&WXQoA%pJ}jpz5~(GhlPT)AYD4sn z2S3GQQFmbm4v7ve%;+DckJT&51q673jG<$X?MpgNQrXNE>sC4wRvTy>8F0mF3O~XT zdmTy6v(5|7uUuDLU2!+!MtLT9wtDiU0;x=DmF)7}@_sp_%vZK6?<-kqhk8j(_m+8A zc-MKic$;JEANo`nx7BeNwmO<1=4^sJ^gR#TVWX=FUUyB$H(d(O!x^~OJ(Iqz*z9Si z^Xb~? z1(fXQozDeh@2{C-Hv6nD#U9I9+f1K)VOZ3@@lom5WA82*|9C}iWm!r2{6$Yri%OeE z#`bQ^wMdWsM2Sh8MVFNSlUeE?5qo6E=MU`3wc<*P+oAu_!M=c*Yfri{S)~7ctVtz% Zq&U2Qd*USgP83Fm_sA+<#5IGg{{#1Gotppv delta 4388 zcmZ{o3v?4z8ppqH(k3&>B=by~wn+#=rG*NW7UWT&3TUfPC|YfIs~db^)vjPESQJmX z&_#*`sbLY(9$|&GDku;X6x>4vx;{{B)EQ@B9Dn zckg#+PNqrCx`di_2}>8++WV(AJQc)&4X@mRpT!WPm=pUGMtgfQ5$G$Qyg5jO$z-s# z62Qy?@bTVUA2l(T$a<{9>FsaJ6m7Fy#O$ew)DOL11{_7wZz?@o8=&q$Pa&pczL%lJ(*-PCBbt2 znYwJgmr96Duq}B&OYkWPB}t`PqLP?YnpC3M6}xYc%{PEk?3zPyET%?{*96Tu)TfDx zgIHaPOA!b6R(M6UB`IQwQEUx0Dk7;MDx%^_D#`v@aVmns$Hs;R3U0+c(@&OuEIv1s zFXF!V?*8ZOV-GoP(5TiY*x*%_j<4g3&<1a-F3tvjkm-0kU*NLAT8(j4wS&`rjKq@ASj`UigepjUIP?~Yb3(UA6MsWU zq>~$TJA6wvWJa2Kfn@$~A;Z7g^6yms_M6UMt8LLUXwmIDjm<{1M^k*SM~ z%a&Zmq8Yz z8IIXl1``aL&mUA)ILn~ipl0Ey(nz#gQ-hJ}CVLr#b7&R2f0q5I^IoVjsD=Mjjo^bY z*CaTsI$RIJ!YIQFs@F9GmNB~8k?DE_wleZ)nXXD`W0b1>$jyXKllZVO*fkTrW0c}p zfHUDNqk$SF7-F_GQaecIi6-%1+Gk@m=tH80$ma?Xf&nHL8kEi^MuY@gHRM?2w9SD$ zMvDa1_Bc#tv|9)eDl>^kslf3BL=2*5alh*cSjDsrT7#<=)(ru=ehci?7GW)HWo1zK zk*kFrjP~;1657KiNT32iq?cp=5Fdpui=krs zX(%y>Zmk$kL&PAuwGJ|`{8wkx-UT(5^`zPbOD$`<_5*ZVT9Ni6@Ye%*(K1uDGvGIf zE>WYMg>*|>tDS>Hmf%ODxiUf~}S|Rr?v2AWIom}gmwG#)2g)~T9+ z5lgGloH)bM)@m+XYH6*Sh^s6ObvN#?G{5e_R!ghWCG3h?Vlm3tZHdcu8ToN^-{#g7 z3>!qdcvV+$m_cS28b&OwNYinKrA^hmSYv55nh%#++FC6MH;jw^ax|@)A9q+H>dDw{ zP4w$2*kx%|dMe7}f0?(E3t-qFx|xl75OXZ87(FsZbv>MYakJ&@Q2XNc9?mq}M~L)q7EQx8%UY+T zVP_BP)p*e$>RicPjpB{8d-L%7Vb~z5jaSn#%hGsn23A>GF#ZozgVEfXi0b$JS5C(2ls~Vj16;t2N>) z+y#Ac?AU}1d^4s^%qX@?>u{ERN8)A@@07M1v50H(t#>wa|McyVnz?pgn-Nb)0vz>4 z5b=Ba73l+xeo7zXo+J<0AMp94k@63?Dd`3hkNOH?4HJ{1yXE0fo&1s9%q>d(TyDdi za;MOSAIqnNUHDLnP3gpjlpTqk_#KG_up;#xxd7IaXJP?-n0ktgzfRpOm%>RB3jhN@ zld(6@$(KSXP(U&R1Ae6xMg?YL0Zbxe#YXp|1C1x>TCskG3O*hiUKmU}rDVX}!3CHB zRlx{}i-T$EMbhbbHGw-AtW!l2n`4g?=Na_`XrXQrgP}_#_6u>^3Ai@oAaP_!ByoI5 ziM?BRD|W<`Nx`%_wcc1U*Eo$_T1Q=GWX5syOT##he1VAFIw`|Z?Jc9@`20yvA(qFa zqCRdxZRgHFne7Po6bSJ#MdW0YV%JZ36wBjpPZ2mg8{c_b5jUvPxzpLl^{h)1w~Cj< zf4Ei8zdVXmB{}37@-aDI*{=*xecE#EgjT9w(Kp4$-f;-Oi1jYXz+tglN-_qFCf}tO zX{Qk2FWNXVmiXgjoTAgr8AlVzI^Q_d=7i z8Qyd?!`tLtiAUf?u^HBi)9?*Z#Y!y4ZSDuj+kq|85t2Uw%{DK*A@{>J`BvQT@IqVs z(>w3akjU=}cjxS`TK)2P+k7&P-}GdK(`|QfYNnc*=CCRE1!H5L4#&T0n4T!4I6SIA z{(|u-&+baZA+hAfd!)$N5oHhEH~WEyE2lm@bNV0S^^FVc(zO3h#_AhK$0KWYyQEwG zM;H~a-0;oqTZ$dH*zW#m068`G3Osw-jj1;B14lz|ZA;jLr!ba>@)nPbKiRmf+%1ZZ Jr?DZ+@gFoSn+N~^ diff --git a/tests/fsharp/typeProviders/fsharp41/net472/providerDesigner.dll b/tests/fsharp/typeProviders/fsharp41/net472/providerDesigner.dll index f8e612bec9ad04ccde5a9763d8b057b579d1340f..3fc00ffeff3a462a79ba0abc628ee7221da754d2 100644 GIT binary patch delta 4411 zcmZ{o3v?9K8OOhGX5WwO%-q?{gWV-aA_NvhHUX67Q3#Sq8i^21OsXjcL`0yFAW%4) zN~*lX(2XJj#YaFWXu+i*g|^8NQi@uz0(ufGLKcY%0U-#=!`^#m9CJK%&)M(X-~IpZ zcfW6Tc4lX5wwY?Snd+8^{r{T2YIy*MuiEk;o{k|#F*o)*jP?kI5ZEh^z6CHtB^~UX z4WP{eq{Mp&Jr(mPDyy+m4(~uQhGB<`d%-gvQ=F9xXWiNNiKEUlS`9Jh)Fj2?ht)_1=&Q*viZ4@%tb83 zN^Cyjkj=@Z#4g)q$G{%4MRthEvZI72YG6LuK{GgHhip$S37?d0vQ@Uk?hN*KI%Vga z6uRvK+SSxxo(qq}cl5bpDQk6zuwGeV65&q@8xOV>p$K~vry#;35*zQcjdhB!kuc8y zTLB$Uu`yM1UUXH^nF5tLA5s^YML6qb&Z+A57!FL1_LfALo?L_$8fn4sl)unqfd&37 zI@V^i=y0#5GpGH}QgyFutsI8Ufg&WZH&AE_LrdU4iUl0*HX2KU!-xeQ4NjqPMsPcg z^MenVe`Y>vW{a1r7G9PX+02V{=Km*R>RQA9uKdc+I)BWzLuIRW@wk`A4|zPU(w^Ay zU_G_+sl~Bg;hvdey=*}Nk9%oP&--S3EpR2ckVa!1pBa9`6s;Rb&oF3)`BJ^T6#QY0 zn&pJ89ERvL%Q_d!VIrr+wifwCM>)*m)MP&+ucz7yO@pDz+m>?Zoz1dXQmQR&j!Ia_ zsoD0SQi0Q;RwFpAn4Qz0E~?{Ig*a!yI-PE}_Hq6O8g)t{eVnr)p;I?D&)^)mp;Ldt$d;qEG?cW^b*e_TR?A$R2mYKW7i|%H1;q?qEaWsmUsz!` ziSr<0kVBjgc{(k#E8=gVM5hCGKcz~IZ0O0iE`q6?*s+-GTm+kSZ9941SqnRJfbHK5 zhsiRmg+@IM+Aj&Ua8ReiwzHIu>I*&gYm`3IDcydHQoHWF*V;nKG)QZSb+{Bu@QAG?9`+Tn0mQVjZr4Je^pFE1*Cl-r-6ZuhS{A*0~a@bh=6^ za3w6%$)dhWwHl3polh&Fo>7#aCht=5s4lV%W024nvMyq9PNzDxf>NhW>Go6382ATk z{l2D7rdo&-fnDk_R}7ZubW3e?t%XLNRPV#?S7AK8DAWB3O!ppgZ-I9>68MAnrh5k* z)afhl;G|s;xtm!DT=PDa^mnM#N%Cz@YKAJE(tZC-dJk%K8t7|J`T#!Bsnj>n^KZx- zs%3fFSK~Phl^R81jc>c>2-N7}d7oeU5Ee$5m7O%NNgsiK7^5cp{^YrM6f!hIDdjEc zD1>x+IAt`YT%C5LBy7i^T&K>IVmt;FI(breO2?p5r)XVjyYvaXqvOfcx1<(0sMBp} zS129P$i6O3kz1i%r*9~o02t0o!(rW0`-9bflPkWWKGr@#11D0OlYY0@VsnMSY;?-A~`E|%NC&q>n~5Hhso@);Ou zXq)BFp~BD(%3r`MoCvi0qaVv(LZgPZ!a$mG9uDf_nm~U_k&$de0!@K?l@7?&=}e$r zxc~(^-QYBllbqrT7F#aBbWW_aV!QxVoLJedblt)qol(n0s5h)u|!*7LXfo&d@fHo8V$Ugm|Hc$Sv@5VufBO-$TUE6cw<*&}OLg*Vc4H zEJgvV46#lXu!fU%NJV_faK0>vxVekdgr9WL%-G&VvtY{TA4)4mE2eW|rPZlcj7B(W zTi9@-VI4i$rfBYu zwMppWq}3*&pOaRajM;{>L6xzfi<4lLp^YOd)*4zF@nXH9Eg(K@FtiOM8TaQ#f7t#I zNx`Frc%7tTr?F5`)6g`AIaz5l)NYu;iJg`&3x3Qtw5@6Y^9-#RgE-#MT9qJ{aMD`p zj5lWdSi56Q7i&7c#7T3e<12=tZ<*uXVBBj?z6p9H*Cs+cBM!_A&LsY(pEN^u}C66TDft#L$YdAJ!Qf z@%F=YjG~|&jQ+Tji|pc=WLOjC6_5nNBnuM@jd zhA~4Yb{7p}h?CZC7_&J=Sr@HJ7$Y3DVzO~!7i%__b7IaSZ#GWt;>^LCF3ucWVmOI6 z2kW~y2jMouS>_pp`!%PJCf)5Ff;RS;#XpKNPXyEBt4Ce2yZ`9Of`n&^Enf<Vrbq zvdAgtLM*ps2(>(J5w5DsW5)`zFdqB9AgkEq*@o4YM)OV@%RKvdED|>RwmO=G~O|cfrwvOZhHPDu&eYJ!n5=S`!%jj&XK;xx053@p7D*2E&65hlmC$J zf_bS2q$Xim>Ic#Zd{;`?Pv8eqhkZXjk#G))~x1>@yPh&oy{|X&@{Rvws1pTAwOn<*3m%=drT+E02{7MW9dycM_Gk{eU;;|D) zdA3?BdDlI}YD>GE1(O2LU=~ybDrkHz&|SGf`yHW}gqFZ!#YN-Z*kgr(%=5}QAi+yC z27*^<>=nF0Z5kk4c2(QR?|juD~80as~Pr z5gTz|mUXtboQ>l%?^}*IDRzB)Pq(OiCR~Pcu}xSGV!Uq=J-%|R-~CVFr1-}B?E-eh z|2(lsxMP;1$UFa7#%aCwV-xJ!WZ|)FzFR56hW~MC!=rWP_hau{23)k?iu_@;*7N%u%)~?3cS|!FpE{yzZKUZ@LtmjZ<-tdm4RPalfaH z&bL96=!Gp(FFYF&)Rl&rWx^O;%JwnO0Gr z98hv%cRm-4zrSjx+3d5r6ni{(^?v%~3qxY|^^Z!w9({ND*vG5#swb6K&YAz@CrVsu5M5HiPiCoqSp1RgpFglW&x*?|ZioIy2m1nsR-bfZHB=by~wn+#=rG*NW7UWT&O3_xKP_)|aRyX*-s$IcSuqd8% zp^Fp?Qo|ymJ;DlWRZt)(D7c3TbbX*yg_Xsk6p9M+sPgJ6kG*&1I(E;l>B)EQ@B9Dn zckg#+PNqri+JxG*2}>5(zUrUa_*4)FHokHPeilQFVovN&813!JM4+z%^5!5BCXvCG zDgZMJz{h)YebmHUBI~gZr?;^|!mYX~O}W4kM=DLx#S~*x%Pb zzC=IEM?1;P-T(?WlOt8hB*pG>*wXs~47jYP*AaJrZl;4sB0u~Y;^p1Kv}BUalmyH5 zXX>)~UMeLv!M6ATEy1TGlqQvFiArKpSyHKHSM0t)Hs1hFv1<;+v4|QqUK2FuP@g6$ z4q|mFE=3&NTj3SamZXTKMzPh@sEDM3sECRysWkg*#i4=yW%c z%;CV3MBOT`QnH~rSd1EM4HhM2!-3#_)ecVgF%nBdV>LV66RITf;m}(o&JNukP5ccZ zkxp*Z?eHzxkQr&_1(Nx{g$(~H%fCbU+iyC5t+rXuphdUoG`1M=3nR8$g|>1kh$*AC}Gb4j$u@p;)VCqx$vCbto^!fbh|PzI!iL9I$BUk+J} zraNX~IgB@G9)Cbt?ktB2gIa{6N)yrQObte=8|~!~&Y@N8{+afp&U>NSpjQ4To>>3!)4!s9x7}Sjy;XN2co$*uu!8WxA@Mol&axBR2y&P2$7CVAl-zj!}wZ zKF)x%j0S3yV2Ih$NbLZbCz`~6X`h8Ppbv=}BA+Wn2nLu~WKcSr7!eX|HIQSG(>5FO z7%dc3+v6~a(JmoCsN5tTr9#IO5HX0J#r>`)U?tPmYmKftSUUvh`mL}>TZnbAg_S|! zN3IUGGup#{OK3NnC<)z!_A?3#mkAwW&YK+v2wh|v?XVsahW^@MJ&25GgZ1DiMAmNw z+F?EPHAO;B+d{}>}cBCej6C(9R~(E@IHhXo(&nbb?V>IO2+dex2FjU-kQl*4H2n-qOd2 zF{ov9S$|J_9=0&jy%F~+C?FrhWPJ@Py}RA7zCx~$}&GP5KkD}Bf>`a=4dqFk{W&b95FZdbV^M!$p>H)qpMPWCbZ2Y;e`~x@+ItLbe>Q< zoM6sTslAkg&}|UC*Rz$cz(1O9`$leVV1m*C%NYfv5TK_jRTVk>H6Kt`xDcaBQzNOV_ z7h%7ptvQE(i zj96N&=EUiiwnlT|5=(2-L|kcUsJn5yrTKLawpm)WE@4;H5=&6VZcALI%gE=`eVbcT zFl-R*;#FP2VFsC9Xc)1yVok^CmNrH6Vy&gsYCc?IX=}73T%RBP!~P@`(@q=E`VW!=w>$PLCmqV5)5IkrFEzw%s0qvsTY=yGoF9umFb1| z_OSNC${yA*)){0v!`NUsTlFw5?cwZ;YkN5R;wH=4q4vdXJ)CK{mk{aSESiSxmbG3< z!_FSotMQ^i)VYGY8pRuF_vYdE!>~bA8>gmYmZkCD46L@a61)cISX#388eBjr%C7G~ zTxp2(!*ir}AhsFQ3iPR#jfWV~CtfyoG5RP(HMogxrWM*lO@w$x^hueGG9&sF%|^dL zX1m!KHYiHF=uopU-9Yook|x9cVm3*NXKkQtIu@p%)ULac~M z#eLj@dWbs%<+dZ-Qy|306qA!pid{eXQLKo+Jz3!JY<$OU#oVAO=MHBd*Rw87+#+5Q z|KV0W|MDnOwd9be%g5vbWuG!Y^=Zqr6Iz*mMc)`3d&fciBG$V!1BbfdKEPYyecJn?_ciZ_@i%^VkQ>+R+yl+d z7I@Ru0&kOd6&`^X#THm2PQ^Dw6|1lUx4IuBZwIzYM@aq%wAj4xhTIR^4 zPw%`xLn6N`+?}(ldezJ0Z1c!Ce$$hcPPg5`shMhKn!~2t7mSU0IvoG1aay8~;_#>f z`3uG;Kf5y#hs2Vb?vWy6N0dKw->e57uA1`jjA?(2H#E(+OH=TRi4;+oXwasAY{s?ku@XsBJq2mYG0zQ%{+*Y9``&qNTzm>KyUhLimP1oq0JZw`!5MhAP! z0n}N5xM(srP%=)UvK%>WbC2W$PQKDk&GIcikTjI@4B@viv~dgW0D8lRiUT*O4o z#Nr_~(HL7utfE!4jZ79zqK%IgZ3RlAdgc>tG=ojFiPqSH;3?4}nnhFOPXBPbU9>NX zquVZ{UCr@lIq+z7_mHcmq7EAmTcouH9{wb;@n}mP@~~gBb38mEu<=35R67sb2=k1v zRQt{kv#f z>VLraGxK31TU;ZXl(N*wW?rN-|348^H|hR&#aDjT`D3=-GF!D*i3gPUp%PEXv?q2v zSWg|w)XK=9;K0?@!_({_>P?bWa+1K9qp zaD=SEYG~5Zp!G6W4Tm*4VmU|Yn6}Vmy-w*fjgqXlD0OSjd(G{X45QSRScj{@p%H6v zHOLyV23JE8CAxnrunt#4Kou$3_%$#_Bi7+s$kK>)xE69$QaW4*(=|FxHrdxfg+|v% z39f_X8kyu*saB;Du=8mh)G-Pxr^&liJf?|k!w7U~3t1NtIImHyTtcZ=qa^ETdj!0r z)qY=-XHhMn5P`k&I7b9lX>?0&a%_Sojb!)3&R1bNy(rWD3Cwf1Id{N23KIB(`=)a@ z9MvXjJGK>H0Th zja9Qe?WuAdfijiCu+g*2brh;J@q))IdP>6d= zI0gZY9*&z#DO01}ab1?{98gh9MP6CWqO2cu9@#3f8P>7X1O#Ckd6uO6d+B;P|4UHOkUHNzh z-qENo?0tsfNey53&JfQ)mqvf_7EtO{h^I-Ppk$c9HoS+s*Su2f1g}D>)&&7ws}aw_ zL|tnTKZg=sJ1l+yuP8*I+Z+B^{1Tc}wB-5{qziCZ6F2&XQwmLF8xm;t-7ED#rbcId zb<#!1(ddRkGZhl!9R7UMMVO}$D=i-{LWM%C><+qa`H#-9=@QiG)^pM&sMoExk*~q= z3!pESW*WH+UWHhiB60-+y0(n;LP*!PlB-axYi;Bkn5S!ff$u=9lWn=MWhc->e@1L1J3K(R&o;@?1zw2XdAf&UWHhpedK!x>6#=1=IGjdnf}_E zr;GW>VTCT%${bcHq#jZpU(%f~b38Wma~klIewq=x`)MYOoBTs*`Dn%@g;;5|vKhl6 z1=TGqI8(PyBNi;vtwqF&6}q;J*sxmHwh}wm>slLe;2vG;BThV~Ymyv;UAi`3cA+7h z`D1MYIuufC6VR)WTAGOIy0cyuF{huCV1=$tBQjR&S`l$$ovtk-9<0~3tt1v(GQ&S? z-$vr_m@f8_cAJR4_Fsp88#{z}a zmImO$Da!p%{gMp8CH<@eu&SRm313o3btd5}y0b}6!iIj%6m06}Ou@stvqMV3qy3zz z*iDJ{uO>~!OS*NXn2Oi?S#L+-o*$0W%iQglq>%bC4Z?I?n;;FwOkLyLX}C()@^Ki} z>Kbtm!_ADspdO6jxJMD$#WTY_9J>^11$I{pVy{N*ju%A3R8~wYyys_{tkFsT7D`@? z*qt(nDH^f6Xb=MmsqF?aU7;}RqC*N|NI|ujbe!4GnvTT^F=w7T9q06OW?)r6X9lj) zoy47ib^V;9uu*pwxkh1&>h#d0``lyD!XC4fkD|yG!ldYiNms4TKiblu%Qf4Q%>|{M zk&QWNgjhkXKgs<`K*bt3pJ(D9Vei{4Z zKZLtrN&F$9nOhV8fp8Mv6}qe^@dKg9+Ja9c+!VTSeL|D53%hB|hL;le2-)x^y(eZv zTVgjIpGtg7D1-|%W&?V!(y`myWhn%|cQTzB?v=zs80TG#*>Im%ieT=*$(3RXu&M$| z?8Qm0o#ry7>tw#t)Gek#sqYy~g9={>jnDZ8NH=J|6C?xI?prB2Xgm;kEZ3KMK{^k_ zf0;&~{~C>h{5NR4(~smljP;vnoZ`1fcI3{$j>t{wUn#9sb_^-UB*gMab;?X8#~vLr zIrK!w5H%A z9Jk+=U_WQ?v47>b;^>XJ5i`Lx&9&W?E#wQOLc3rU?-mb=L1~e+Q+i)Ym%HRka;m%3 zz1qFez0KVc-Sp6>+?4IMBe31p3{iVC?4$2;?1U|jW_aB(8{c$DSdMdWzjH2qo3X{! zN#{GEnRmkuVGy1WX5ewN8%{+3_N&LzT=XA@()2?Wuf8#bUrEQ&;Is2=PJhxWSNA=exgK$dfp-A{A8B;$3-96_4xz)vdp-~SxOdY`a`rDk`wBY~_yAjjxAw%C~?COf(G*NR5^=Xn~ zCswE8RHVVZ6+w~sBtMN*terP*IA4n_G<)O=?2|53j0pe4S8?JiM(sIUfEX)A2T;(8 z9C(tbTcuS>HZ%u|QG>0)qJ(TX5ZtfYz~MSZVrgisW`lb|l_WkKdW*!_q1&U0zab>j z$&I=Vz9kznBh9=(GXJ-b;a_F>cPM}RP3N!GHtQL*=r*0k79)OP#CEIDR;k0t)W=3< z_eq=JrOwGlY#}{8?W^(H;9O`fiPktiFZ<<$=z_uIHiA}|EiVzoct8C`A9bUp%G7`e4fXBD(FO4WYkWWS2027N0N@o)zVgg?SITkti*^tL* zp{VkY!z4z#!~mgklLYh>+Mj@kLG&!{cRm3tnYLbQbk@PzAwbt}g+1Crtb;AA42nN; zb+Db$9^qR;yV*pK*iC3Zqp*0H&>`l$*?xe~MW)dX>mgz2uMO6N#E3Rn4}L;q{Z^nI z)1LKY+1VFTnbq8&CszDY)hi=lu~ht}j=43&&7Xc1ft)r@TVOGK+N3F!T_ z7#b)=joV}w5qC3@E*OJ$Hj#D_gHA?E^a!C7jKbm(XAJb~%ntvm-$%5*25In?K1PZ` zEu+i&d(!i;g^})!xK=>{`4}eaYf$Ok?Ro{)8>qoE-Yc#Ru$|HO-r?@IAZG-%YS8VS z?fyHIGm?F;x?7==QP}r^`y-gcXt3|N`(tQhROZX^d;)nR%_?(!b3J>Y+@vTx=iBIM zgBm8D^j#%?3KjGTVw_B~{5c4tD7An0B+hUO5877`lY1b%NiZ8@Ze9jmlBTw6xciZ(zKoeWDzL27@&C zE)YGa9EY_g3Pr)NdJ;A<@ws3Qq4Yeuga$3aN$M%cVstdPLOl(`7+o|d&mhGwg-UFv zq0}I{wGuoH5rgQ~I>@|=U!74~7t~tTlWG?%v8?IZ572FC#oCV`To2?$%S_SEfZrgx zM6Grf(k*R`b`AJ1*ow!zaH&|1(sN?{~MYuu~_>FwpiK}?Pqx3(rUGf zu;0?wXqTYd(%Q7kAl&fFMp3^4=?2k_`gOozmR7Bk|Ex+au>?7cSmH9B!%Bn9BjvHq za<1TbT-w8#fIE9=iMY3iX2XQBbTj6qu%l!UJ;PFQ>D=iIm7jCySzwX91ORLsB*cG+J5|pvq5|`;R3i)*3=GGJp z8$`Q!RabDBL1q^kMl7vZ({Z|`P0_qqYiYHb50_Zl8Z8Oe=SP1znl{ak+bt3GWISX| z^y?|uWogxVD$3)2nYV%qVAvqKnGJdnb1ba{Lzru69cl>k4KiEmh2`Un=bw3Hdf~l2 zti7Y!KDPsp*(yX@WNct1YbrufaK%mh8O-7f_0_>pKuv z8Y2Dh9O)g1Z3eXheX3>SAx89xmyKPFJ_=C{ZlarMh4xSrA%PKnQf8yfh(1NL(QlC1 zZZ?JuiqbAR)ND*Q(7ZA^nAgLag9Qdr=N;Z0ysd|G2v+uR4#8^6nd}{cwLP3eak=HZ z(=!y;n@%4o`mT2vp6wy#q7;AahI688r6U76JyV53E?Zp}TQ@#KJK~&!pkNOH@jT4fhyX4_ell+m~!YxexTyDo5 za;MmiAIqo2o%m1+uXJK#%J#%g{EoyzSf2WhTnOvPGqDgpOg%-$U#D)8%itu5g@A#d z$=Dm{6v`kJC?uJI0l!iPqXM(A5GInb!qffeK;sFzR;*u0 zbudEWqF|bOk#ssvP2dg$>s5)wme}LOc}6_}TBw`EVCWKw{X(2}0?On4D}{AA)K5dzHLMzj+=o@2W?>LBG#Cn%z;IP;&r5OW8lkd_C zwNnW27cHNRJ;HG^PSI)RjJ=s;a`o3q9352SFP46eqqaH%&STCl=Sk_Dbl!d0eZ6Ob zr`a=6{=HlwACf&vp7NeDT%E0MP(M>g=*RW*`T%c*_i68o-q*Yz#^3neL2g{LV-GYt zTHsA*3%pI~ z{}D#TtJZ&W`{oimF0#3P8bD5sy#mjkc3~<{e&A^At!)mw@f61LP~Pm8@h6_k%H6E! Kcp4kC?EeAj$(sBC diff --git a/tests/fsharp/typeProviders/fsharp41/netstandard2.0/providerDesigner.dll b/tests/fsharp/typeProviders/fsharp41/netstandard2.0/providerDesigner.dll index 235336a0325eafa4dec905536e44afa61d1cee33..873999d0e966dfbc76c711964ff5b8ce9d9bf2ca 100644 GIT binary patch delta 4411 zcmZ{o4RjRM702(L+3%0+%)Hsn2fIrmi4a&2*#uBFKp{vXX(U24F{!2)5D|ewfYlUryx;r( z-+lMa&d%&?O|zk<*-*cNAO6?WwRJumy>{D!csha@#@xv7Fr4NOAh1^+eRE)hN;=pz zA3&W2NQ$O${UqZ!D$9{mHuo?-;N+|A)GXiP1F3^J&p>_)LmM~uE&!WJi31*`L(eT7 z=ottQT_N{c!aX!Y8i2@Eb2K|$JXqkW&Fb*3?Nl7(;kGczX5t5=Q@kY)sHIs3a$A_o zZl0S=Dc~~e>hGD#dtNW0vYB7=xWi*9Ni20*6H60Ih(R=X?%+LxIMG0iqVc)0%tcJZ zOe`K^6OD})YGgjqMl;w%n`lie37!-!qFFRW?(`3_+eQ0= zB)aVq+SN>do&%3WcMiN_D(kfIut{2N;Neda8;`IQArE^cJIBK#0vqqQOtkZ`g)q-h zO936vurO71UUXE@nF5(PACi|Dc{uB2&YAL#2o6gO4-j~momhk>8fn4sl(*1ef+gNe zI#y@YXmhTkGpD`JQgxqWgBXM+Ul9`6=PNV>p~Lqd$pkiM7mX$U9Abh;{WEBs7J9C{^Grs8tD0OGf)Fs1Iv+RU-Czuu-Gi%>(VfffkJt$Uysih-uV^T;dkMIh8D_ z)}i(Va8aWa^E0>rZfG=wFtTK;EsY`_be*h{rPH(!7lAiBtcaG7wSr>0CKf6*R9jeK zHSmidq?3(b40#%@vP%4Kp+uttRxhPWl`QDWH!p*k3bA7`-M$Q(G;IfY-d+p4vVra2 z4u{Dqtc4aW4O%a8wQx|Q!4m1;FA0Xv`8Km((&a+=9?G1k{ehDoqS_*wB(s?+jiR*nsD22wd4GFaR?v;8VSEDn& z2I&G6XmmrNsS1fn4u7%f0?by3l~#-wph_WDb|+o8^hamdbP*bK>sjd{H0svd$k*Wb z1<)5uGl^URuR<(M8MzDrU0XtWA*5@Y$rUKqwL|0^n5}Eq$yHdbYmywk1{-y8j{Gg` z*TqTXJ9uB$%E)y%p=(RX4LGN3o5@XZupdH7p@+yV@G8U#y-vP|kgiEGV1cg9k?F6k z*}7Pa99HRKz06^aLh2#q@g?2)GRI?6oYR1x#A!zCj?+w-H2#OuiqVXz3bE4aWiy6D z3aVRJaH?*dL@ZdTTg!+Qt8{G%v0<&QZ67>CQ%3#DX{{!75#wL}aYhwKC$y23=c1JlLpfn@J+J<%WOQ z{t!vRqq=yVBxA3>P?A&7Fo8K)X>;U0n63~zEnnumn5ApmWgq70S~2=@vaWSXek@T) zZK*HLo1onP)GtY2Toh;Ri#2i9RD4Mx)tQQ~=*|{76`SIm>DUtIOvi(|vr|gPBXQ0Q z?50HfSCeMoMcukw%)o1L*4t6I=ZE9;GIu+sDx`i){V_||#z+G&SJyaqCa%!6VjPV1 zx<=fCaU-KJs0U*R?ovc{@yvD)!I(nr!0u{6?A3_f@q%cW$ckx)_xwzgH9FznM9HfW zyHf@+T_biE4PrncwcQ|QDHLX1bV@-CDX12cg;V3KSy-+Ra~8R?aAuq{8*Ad6*|#5sp!v+gW&4aYXs>7hyYxJROeJ!UB%MVTvvsnK=gu2`Lav}HofHN%q61*Pqg z^#z&alzl0dThh5&C2r%c%5{-r1(_I)d|!}RY;ZMWwW-Cpi^ek7ekB%hO`h$xR_?gx zkgJvZ%+sO7FI`qRx|KiwH`U~z^dV~EMHzZ~YU*p?}AsWwk#z&U@GV#fO z2zSAvAeR4l1FMY;chH}1(s{=kdsE8h4F*5l6r*K+y%l%dk zd!m1yTEyKk&(>;7v%g>$9lIUZ9S593!p8|N*L;^zm?d-x|Z%9J9-mtB#d!Qa&2|x3&p}Tp+m5WcZ>VQptL~RF1;^h$uaq&oZ+74 zUg=)%-r{bHZg}WZZo*dEVc2SGg{Zw1_R#ly?1D{>R(Rbp1K)H=I3H)?Ugs?OHe;Ks zi_UjJEANJFLVr9iOu=JjHyn@t?N^Uwy68U+)3Od!z52!kemNaSgU`;kISpo%0vTpr zobHpdBX>UMkG{WluF>c*J0xo~cU>EO@`aHR>!wGAUyr}LeB$F(dDYX(D;F$&a(YB) z939=eDbFN4_7f#4H1ZCi;3u=xpA&s#$LA01$ur|BlhdaC(ZRlefpsUH*oUY8eXLC* adxQk+!958Ae#diTLwiISFW}mt=Kld_U7f7} delta 4388 zcmZ{o3v?4z8ppqH(k3&>B$-#zv`s<~DlJr~v>=ZHRf@I>g`(AVx4OXxR_zLwf<^J9 z3tgmGkUA_P+9Ry6Rs{uuf`WUfK-ULKRajXpN};GAk1DUO^4NQ4u4DJ?nx1^;{=WbJ ze)oQN=46`Gu1%<2o3Lbo?c4sTjZcMeVB;%y;Ac8w40H59VXU_&6M?=8$eV*im_!C! zssPL^03Ywo^-&UYiLB`zPG5gprf8e#B4(#OGj#yx?{9Z;(}n{$9Y##QhYbCfvA@56 ze2I3Jk9Crny#ZuyCP%80NwVGLu%-6}7;srjuOsgM+)M|NM1J@)#LK&dX~`s;=@l&3 zpQ+2{f2ow%1l!^V)C9krP?}VxCd!FPWl5!~UAFrN+57`I*{(Wd$0BM}c~wxIL;b2K zJBZaKyJT^2Z<&`xTaql68pT#qqb!mNqAbd;q|)rKWv492ygoKOP;krc83D5NWAQoR z0ulGdclAGKAA8VggC?aR!3M7?bbK9Oj5c^%ad9^IgG9&M_(GQr)~M8z#TSwBRGzA) zvrD{NzjSR4=yW%c z%;DgZMBOT`lCz;XRE#QY4HYG1!-3F##STvQF%nC|V^urc6Rsrj;qY4|&JN!mOZ*KX zkxp*Z?C>qwkQr&_1(Nx{g$(~H%fCbZ+iyC5t+rXqphdT7G`1M=3nR8$g|>akw6Y1u=#f6rXE4EM;`HBh&Q=Y+>Y4GhJ2C&L~y=k(&XXCh-wruxkc<$0)@y zA7{W>Mgvt!FvM(Wq`)U?tPmtBtNYSUUvh`mL}>U5ItCg_S|! zN3IUGGup#{OK3Nn=oPvN?PnAbE)zP$oHsiT5W2`T+F?B;4E?pidJq}W2J0a}h^*fV zw8MJnYl?)NwuO+zh<4Zjd5ma>4Ulh=(cxk!VAP>DxfVkuqYG*j7eh58yY>>%YD@xp zKP`p^N-^U$*+s9I+9C7KOU1xUqSM5Hc^)*O^x3n>$ z4z-LfYwwBA!xl!GFX~|Fxtgk|)Z@2puSZ|;T&-kvmH^6pA-}{Dp-h!MF)T%T`a=4dqFY@rNAa>F9aCf6(}T>#b`sIlivpg zjLrs1a373k)DhF>Rdk`BNoMpvc$OlX@)!V4(@`AgW#=sclz zIKiBwQhUh3&L0~l9_Kn=!-~_n?mNN=^OYktPX0$XGoKNt5hA#!nGBSjw})Wx)$9rf}N;K$G}ZsaLZ+p?E`I~#E$tKe7&I89 z!gs;gLHRhWHIXk0MU<1UiHXmJatNj8(Ir%92~AQ?K^CKX^0v`x7I=CRs8CV*}I_DvYu4BV2Nc-SAT$RODk4?1pay;FIr}bdIkap z(Isltvyg6SYt(a4U}CC{Pq4+(rl>!|`<7O# zUWEOYwnn`K-Ims-UIzY#Up9)`6-YOTZZx0)4zsjsjr?a-YKbMtVbl_rX&hD>WFDyv z>n!IA&W1~SI1_MZ4=oY*_R#E@FqUq{yc7-;4WehbOmko?-9U2*9`h_~vC88l%Q{6B zFluSFsuQPM+8Wh`ODwHT6>+7dq2|WzmKM-F*k)m0%ciEv-WdW4=LVOTDmsobmiKuS_qz zw}-VCR`#$)u+AXU8Nmk2*{VfwX%A;#T-(Fh7dKhX4y7+{>)}kpy@W{rX3;ckx2*MY z8g}-uUX2$GqRtiE)hOObyEhNNA4UwK+BhX0vn-AGWni_XmEbiv$I_C0*Wdz5F?M|i z;z~oLAD$z91F_AZR-jL{Y&^t>KJl`#i_u46s=-ZkGp*1bZX(1pqEE_flo-*cXf_56 zGTY6@h(R&hMTe4&=?0otCI|C+SaYzzAnLrsmxH(Ua1O!B9?l_HZ8?*DL$J1ob0{vi zoOgPM;(F8RCq>`&4a2iN#9S2PuibD?aIbV`K&N*qU&v)E>-2TwGt?ulIatp3 zk0Rpt_AA~GIQl7ljC+ziV1K~plSWEE;KrmINIdE<)Eg%x#db-M*|v9(6#h_MKV6F4=)O(osu))?$CV9 zfa*|`#6_Vr(v<+dZ-Qy|306qA!p(yyQVC|1PZo-A;9HooJwVs22CbBD8!>sgm7ZV@ku z|8Ogwe|cnYwbvm{mySsV@;-Th;#ZfcC)6_SindW7d&fciLhoIgfy4A$N;3wGCf}tO zs;3a(FKRv+d->yJoTAap8Amh8zI69=nUo8C`M{RWmUB_Hqu9M<9@x14<=X&o1 zZ?kuz^n0m7IwX1JJo!C&xH4PWpnRr`(2i^8wE?~g-_yPqeXsdGjKA@_gWR}g=N@Qw zw!oXN7I>SytMCZCD7L^FaVowcDp-XTxYhk2c{{MxdxYeVK#R=>Z%F;HUAh(bIegF_ z|MbrLGrZ(?g}ZZhRj+z^oNXQ%$8UPF(&@H4I3-ibOmo=e`$GDdrz7#N8mA=+DGrY! zkiSrT^0PY=afqJWbdNVWc0~C@_sx3X;i@SQ&zSbdctg{CyLak;C-sJ=(edc&T`un} z|09fwSFQi%_RS>@Tx56uG=Q8Mdj+38?Z#9a`GKRcx4Jpv!BeQ`p|sf};ZHU$D|fT3 K;c0Bla{LFjKbsu@ From 1d0b29c318ff75b3900a928cca92902e46e247a3 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 3 Mar 2022 14:37:34 +0000 Subject: [PATCH 09/13] fix baselines --- .../CompiledNameAttribute04.il.bsl | 68 ++++++++------- .../CodeGen/EmittedIL/Misc/Structs01.il.bsl | 82 +++++++++++-------- .../CodeGen/EmittedIL/Misc/Structs02.il.bsl | 82 +++++++++++-------- .../Misc/StructsAsArrayElements01.il.bsl | 82 +++++++++++-------- .../StaticInit/StaticInit_Struct01.il.bsl | 82 +++++++++++-------- 5 files changed, 223 insertions(+), 173 deletions(-) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl index 954e4e28fa0..ff9c17c6517 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000CE0 Length: 0x000002CB } .module CompiledNameAttribute04.exe -// MVID: {621F7961-34DF-584F-A745-038361791F62} +// MVID: {6220CCA3-34DF-584F-A745-0383A3CC2062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05A60000 +// Image base: 0x07130000 // =============== CLASS MEMBERS DECLARATION =================== @@ -214,27 +214,32 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 17 (0x11) + // Code size 27 (0x1b) .maxstack 3 - .locals init ([0] valuetype CompiledNameAttribute04/S V_0, - [1] valuetype CompiledNameAttribute04/S& V_1) + .locals init ([0] object V_0, + [1] valuetype CompiledNameAttribute04/S V_1, + [2] valuetype CompiledNameAttribute04/S& V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: isinst CompiledNameAttribute04/S - IL_0006: stloc.0 - .line 100001,100001 : 0,0 '' - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_000f + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst CompiledNameAttribute04/S + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0019 .line 100001,100001 : 0,0 '' - IL_000a: ldloca.s V_0 - IL_000c: stloc.1 - IL_000d: ldc.i4.1 - IL_000e: ret + IL_000d: ldarg.1 + IL_000e: unbox.any CompiledNameAttribute04/S + IL_0013: stloc.1 + IL_0014: ldloca.s V_1 + IL_0016: stloc.2 + IL_0017: ldc.i4.1 + IL_0018: ret .line 100001,100001 : 0,0 '' - IL_000f: ldc.i4.0 - IL_0010: ret + IL_0019: ldc.i4.0 + IL_001a: ret } // end of method S::Equals .method public hidebysig instance !!a @@ -264,26 +269,31 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 20 (0x14) + // Code size 30 (0x1e) .maxstack 4 - .locals init ([0] valuetype CompiledNameAttribute04/S V_0) + .locals init ([0] object V_0, + [1] valuetype CompiledNameAttribute04/S V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: isinst CompiledNameAttribute04/S - IL_0006: stloc.0 - .line 100001,100001 : 0,0 '' - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0012 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst CompiledNameAttribute04/S + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_001c .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: call instance bool CompiledNameAttribute04/S::Equals(valuetype CompiledNameAttribute04/S) - IL_0011: ret + IL_000d: ldarg.1 + IL_000e: unbox.any CompiledNameAttribute04/S + IL_0013: stloc.1 + IL_0014: ldarg.0 + IL_0015: ldloc.1 + IL_0016: call instance bool CompiledNameAttribute04/S::Equals(valuetype CompiledNameAttribute04/S) + IL_001b: ret .line 100001,100001 : 0,0 '' - IL_0012: ldc.i4.0 - IL_0013: ret + IL_001c: ldc.i4.0 + IL_001d: ret } // end of method S::Equals } // end of class S diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl index 415e1d96d75..d9c60a58612 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000748 Length: 0x00000231 } .module Structs01.exe -// MVID: {621F7962-701F-5E27-A745-038362791F62} +// MVID: {6220CCA3-701F-5E27-A745-0383A3CC2062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06730000 +// Image base: 0x06B90000 // =============== CLASS MEMBERS DECLARATION =================== @@ -200,34 +200,39 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 32 (0x20) + // Code size 42 (0x2a) .maxstack 4 - .locals init ([0] valuetype Experiment.Test/Test V_0, - [1] valuetype Experiment.Test/Test& V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .locals init ([0] object V_0, + [1] valuetype Experiment.Test/Test V_1, + [2] valuetype Experiment.Test/Test& V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: isinst Experiment.Test/Test - IL_0006: stloc.0 - .line 100001,100001 : 0,0 '' - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_001e + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst Experiment.Test/Test + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0028 .line 100001,100001 : 0,0 '' - IL_000a: ldloca.s V_0 - IL_000c: stloc.1 - IL_000d: ldarg.2 - IL_000e: stloc.2 - IL_000f: ldarg.0 - IL_0010: ldfld int32 Experiment.Test/Test::Field - IL_0015: ldloc.1 - IL_0016: ldfld int32 Experiment.Test/Test::Field - IL_001b: ceq - IL_001d: ret + IL_000d: ldarg.1 + IL_000e: unbox.any Experiment.Test/Test + IL_0013: stloc.1 + IL_0014: ldloca.s V_1 + IL_0016: stloc.2 + IL_0017: ldarg.2 + IL_0018: stloc.3 + IL_0019: ldarg.0 + IL_001a: ldfld int32 Experiment.Test/Test::Field + IL_001f: ldloc.2 + IL_0020: ldfld int32 Experiment.Test/Test::Field + IL_0025: ceq + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_001e: ldc.i4.0 - IL_001f: ret + IL_0028: ldc.i4.0 + IL_0029: ret } // end of method Test::Equals .method public specialname rtspecialname @@ -263,26 +268,31 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 20 (0x14) + // Code size 30 (0x1e) .maxstack 4 - .locals init ([0] valuetype Experiment.Test/Test V_0) + .locals init ([0] object V_0, + [1] valuetype Experiment.Test/Test V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: isinst Experiment.Test/Test - IL_0006: stloc.0 - .line 100001,100001 : 0,0 '' - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0012 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst Experiment.Test/Test + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_001c .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: call instance bool Experiment.Test/Test::Equals(valuetype Experiment.Test/Test) - IL_0011: ret + IL_000d: ldarg.1 + IL_000e: unbox.any Experiment.Test/Test + IL_0013: stloc.1 + IL_0014: ldarg.0 + IL_0015: ldloc.1 + IL_0016: call instance bool Experiment.Test/Test::Equals(valuetype Experiment.Test/Test) + IL_001b: ret .line 100001,100001 : 0,0 '' - IL_0012: ldc.i4.0 - IL_0013: ret + IL_001c: ldc.i4.0 + IL_001d: ret } // end of method Test::Equals } // end of class Test diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl index 85c29efad10..61ab2b426c5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000780 Length: 0x00000237 } .module Structs02.exe -// MVID: {621F7962-7040-5E27-A745-038362791F62} +// MVID: {6220CCA3-7040-5E27-A745-0383A3CC2062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07210000 +// Image base: 0x06A30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -211,34 +211,39 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 32 (0x20) + // Code size 42 (0x2a) .maxstack 4 - .locals init ([0] valuetype Experiment.Test/Repro V_0, - [1] valuetype Experiment.Test/Repro& V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .locals init ([0] object V_0, + [1] valuetype Experiment.Test/Repro V_1, + [2] valuetype Experiment.Test/Repro& V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: isinst Experiment.Test/Repro - IL_0006: stloc.0 - .line 100001,100001 : 0,0 '' - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_001e + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst Experiment.Test/Repro + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0028 .line 100001,100001 : 0,0 '' - IL_000a: ldloca.s V_0 - IL_000c: stloc.1 - IL_000d: ldarg.2 - IL_000e: stloc.2 - IL_000f: ldarg.0 - IL_0010: ldfld int32 Experiment.Test/Repro::hash@ - IL_0015: ldloc.1 - IL_0016: ldfld int32 Experiment.Test/Repro::hash@ - IL_001b: ceq - IL_001d: ret + IL_000d: ldarg.1 + IL_000e: unbox.any Experiment.Test/Repro + IL_0013: stloc.1 + IL_0014: ldloca.s V_1 + IL_0016: stloc.2 + IL_0017: ldarg.2 + IL_0018: stloc.3 + IL_0019: ldarg.0 + IL_001a: ldfld int32 Experiment.Test/Repro::hash@ + IL_001f: ldloc.2 + IL_0020: ldfld int32 Experiment.Test/Repro::hash@ + IL_0025: ceq + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_001e: ldc.i4.0 - IL_001f: ret + IL_0028: ldc.i4.0 + IL_0029: ret } // end of method Repro::Equals .method public specialname rtspecialname @@ -311,26 +316,31 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 20 (0x14) + // Code size 30 (0x1e) .maxstack 4 - .locals init ([0] valuetype Experiment.Test/Repro V_0) + .locals init ([0] object V_0, + [1] valuetype Experiment.Test/Repro V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: isinst Experiment.Test/Repro - IL_0006: stloc.0 - .line 100001,100001 : 0,0 '' - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0012 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst Experiment.Test/Repro + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_001c .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: call instance bool Experiment.Test/Repro::Equals(valuetype Experiment.Test/Repro) - IL_0011: ret + IL_000d: ldarg.1 + IL_000e: unbox.any Experiment.Test/Repro + IL_0013: stloc.1 + IL_0014: ldarg.0 + IL_0015: ldloc.1 + IL_0016: call instance bool Experiment.Test/Repro::Equals(valuetype Experiment.Test/Repro) + IL_001b: ret .line 100001,100001 : 0,0 '' - IL_0012: ldc.i4.0 - IL_0013: ret + IL_001c: ldc.i4.0 + IL_001d: ret } // end of method Repro::Equals .property instance int32 hash() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl index 40e13fc1c44..539be40b258 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000758 Length: 0x0000022C } .module StructsAsArrayElements01.dll -// MVID: {621F7962-29F3-6E68-A745-038362791F62} +// MVID: {6220CCA3-29F3-6E68-A745-0383A3CC2062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05160000 +// Image base: 0x06980000 // =============== CLASS MEMBERS DECLARATION =================== @@ -201,34 +201,39 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 32 (0x20) + // Code size 42 (0x2a) .maxstack 4 - .locals init ([0] valuetype StructsAsArrayElements01/T V_0, - [1] valuetype StructsAsArrayElements01/T& V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .locals init ([0] object V_0, + [1] valuetype StructsAsArrayElements01/T V_1, + [2] valuetype StructsAsArrayElements01/T& V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: isinst StructsAsArrayElements01/T - IL_0006: stloc.0 - .line 100001,100001 : 0,0 '' - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_001e + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst StructsAsArrayElements01/T + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_0028 .line 100001,100001 : 0,0 '' - IL_000a: ldloca.s V_0 - IL_000c: stloc.1 - IL_000d: ldarg.2 - IL_000e: stloc.2 - IL_000f: ldarg.0 - IL_0010: ldfld int32 StructsAsArrayElements01/T::i - IL_0015: ldloc.1 - IL_0016: ldfld int32 StructsAsArrayElements01/T::i - IL_001b: ceq - IL_001d: ret + IL_000d: ldarg.1 + IL_000e: unbox.any StructsAsArrayElements01/T + IL_0013: stloc.1 + IL_0014: ldloca.s V_1 + IL_0016: stloc.2 + IL_0017: ldarg.2 + IL_0018: stloc.3 + IL_0019: ldarg.0 + IL_001a: ldfld int32 StructsAsArrayElements01/T::i + IL_001f: ldloc.2 + IL_0020: ldfld int32 StructsAsArrayElements01/T::i + IL_0025: ceq + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_001e: ldc.i4.0 - IL_001f: ret + IL_0028: ldc.i4.0 + IL_0029: ret } // end of method T::Equals .method public hidebysig instance void @@ -264,26 +269,31 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 20 (0x14) + // Code size 30 (0x1e) .maxstack 4 - .locals init ([0] valuetype StructsAsArrayElements01/T V_0) + .locals init ([0] object V_0, + [1] valuetype StructsAsArrayElements01/T V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: isinst StructsAsArrayElements01/T - IL_0006: stloc.0 - .line 100001,100001 : 0,0 '' - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0012 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst StructsAsArrayElements01/T + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_001c .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: call instance bool StructsAsArrayElements01/T::Equals(valuetype StructsAsArrayElements01/T) - IL_0011: ret + IL_000d: ldarg.1 + IL_000e: unbox.any StructsAsArrayElements01/T + IL_0013: stloc.1 + IL_0014: ldarg.0 + IL_0015: ldloc.1 + IL_0016: call instance bool StructsAsArrayElements01/T::Equals(valuetype StructsAsArrayElements01/T) + IL_001b: ret .line 100001,100001 : 0,0 '' - IL_0012: ldc.i4.0 - IL_0013: ret + IL_001c: ldc.i4.0 + IL_001d: ret } // end of method T::Equals } // end of class T diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl index 7a6a5911bcd..7260c700b86 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x000007A8 Length: 0x0000021F } .module StaticInit_Struct01.dll -// MVID: {621F7972-05F6-D6CB-A745-038372791F62} +// MVID: {6220CCA3-05F6-D6CB-A745-0383A3CC2062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06C40000 +// Image base: 0x066A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -174,36 +174,41 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 35 (0x23) + // Code size 45 (0x2d) .maxstack 4 - .locals init ([0] valuetype StaticInit_Struct01/C V_0, - [1] valuetype StaticInit_Struct01/C& V_1, - [2] class [mscorlib]System.Collections.IEqualityComparer V_2) + .locals init ([0] object V_0, + [1] valuetype StaticInit_Struct01/C V_1, + [2] valuetype StaticInit_Struct01/C& V_2, + [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\StaticInit\\StaticInit_Struct01.fs' IL_0000: ldarg.1 - IL_0001: isinst StaticInit_Struct01/C - IL_0006: stloc.0 - .line 100001,100001 : 0,0 '' - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0021 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst StaticInit_Struct01/C + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_002b .line 100001,100001 : 0,0 '' - IL_000a: ldloca.s V_0 - IL_000c: stloc.1 - IL_000d: ldarg.2 - IL_000e: stloc.2 - IL_000f: ldarg.0 - IL_0010: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s - IL_0015: ldloc.1 - IL_0016: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s - IL_001b: call bool [netstandard]System.DateTime::Equals(valuetype [netstandard]System.DateTime, + IL_000d: ldarg.1 + IL_000e: unbox.any StaticInit_Struct01/C + IL_0013: stloc.1 + IL_0014: ldloca.s V_1 + IL_0016: stloc.2 + IL_0017: ldarg.2 + IL_0018: stloc.3 + IL_0019: ldarg.0 + IL_001a: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s + IL_001f: ldloc.2 + IL_0020: ldfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s + IL_0025: call bool [netstandard]System.DateTime::Equals(valuetype [netstandard]System.DateTime, valuetype [netstandard]System.DateTime) - IL_0020: ret + IL_002a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_002b: ldc.i4.0 + IL_002c: ret } // end of method C::Equals .method public specialname rtspecialname @@ -268,26 +273,31 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 20 (0x14) + // Code size 30 (0x1e) .maxstack 4 - .locals init ([0] valuetype StaticInit_Struct01/C V_0) + .locals init ([0] object V_0, + [1] valuetype StaticInit_Struct01/C V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 - IL_0001: isinst StaticInit_Struct01/C - IL_0006: stloc.0 - .line 100001,100001 : 0,0 '' - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0012 + IL_0001: stloc.0 + IL_0002: ldloc.0 + IL_0003: isinst StaticInit_Struct01/C + IL_0008: ldnull + IL_0009: cgt.un + IL_000b: brfalse.s IL_001c .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: call instance bool StaticInit_Struct01/C::Equals(valuetype StaticInit_Struct01/C) - IL_0011: ret + IL_000d: ldarg.1 + IL_000e: unbox.any StaticInit_Struct01/C + IL_0013: stloc.1 + IL_0014: ldarg.0 + IL_0015: ldloc.1 + IL_0016: call instance bool StaticInit_Struct01/C::Equals(valuetype StaticInit_Struct01/C) + IL_001b: ret .line 100001,100001 : 0,0 '' - IL_0012: ldc.i4.0 - IL_0013: ret + IL_001c: ldc.i4.0 + IL_001d: ret } // end of method C::Equals .method private specialname rtspecialname static From e7fe62b50f0adbf2dac83d1ef26186faed9c4a5c Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 3 Mar 2022 14:43:59 +0000 Subject: [PATCH 10/13] fix baselines --- .../Inlining/StructUnion01.il.bsl | 81 ++++++++++--------- 1 file changed, 42 insertions(+), 39 deletions(-) diff --git a/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl b/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl index 4190b17020a..ba67592d72c 100644 --- a/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl @@ -32,13 +32,13 @@ // Offset: 0x00000880 Length: 0x00000421 } .module StructUnion01.dll -// MVID: {621FF1EF-D3E9-6B24-A745-0383EFF11F62} +// MVID: {6220D390-D3E9-6B24-A745-038390D32062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05A00000 +// Image base: 0x06D10000 // =============== CLASS MEMBERS DECLARATION =================== @@ -374,35 +374,38 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 47 (0x2f) + // Code size 55 (0x37) .maxstack 4 .locals init (valuetype StructUnion01/U V_0) IL_0000: ldarg.1 IL_0001: isinst StructUnion01/U - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_002d - - IL_000a: ldarg.0 - IL_000b: pop - IL_000c: ldarg.0 - IL_000d: ldfld int32 StructUnion01/U::item1 - IL_0012: ldloca.s V_0 - IL_0014: ldfld int32 StructUnion01/U::item1 - IL_0019: bne.un.s IL_002b - - IL_001b: ldarg.0 - IL_001c: ldfld int32 StructUnion01/U::item2 - IL_0021: ldloca.s V_0 - IL_0023: ldfld int32 StructUnion01/U::item2 - IL_0028: ceq - IL_002a: ret - - IL_002b: ldc.i4.0 - IL_002c: ret - - IL_002d: ldc.i4.0 - IL_002e: ret + IL_0006: ldnull + IL_0007: cgt.un + IL_0009: brfalse.s IL_0035 + + IL_000b: ldarg.1 + IL_000c: unbox.any StructUnion01/U + IL_0011: stloc.0 + IL_0012: ldarg.0 + IL_0013: pop + IL_0014: ldarg.0 + IL_0015: ldfld int32 StructUnion01/U::item1 + IL_001a: ldloca.s V_0 + IL_001c: ldfld int32 StructUnion01/U::item1 + IL_0021: bne.un.s IL_0033 + + IL_0023: ldarg.0 + IL_0024: ldfld int32 StructUnion01/U::item2 + IL_0029: ldloca.s V_0 + IL_002b: ldfld int32 StructUnion01/U::item2 + IL_0030: ceq + IL_0032: ret + + IL_0033: ldc.i4.0 + IL_0034: ret + + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method U::Equals .method public hidebysig virtual final @@ -434,22 +437,22 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 20 (0x14) - .maxstack 4 - .locals init (valuetype StructUnion01/U V_0) + // Code size 26 (0x1a) + .maxstack 8 IL_0000: ldarg.1 IL_0001: isinst StructUnion01/U - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: brfalse.s IL_0012 + IL_0006: ldnull + IL_0007: cgt.un + IL_0009: brfalse.s IL_0018 - IL_000a: ldarg.0 - IL_000b: ldloc.0 - IL_000c: call instance bool StructUnion01/U::Equals(valuetype StructUnion01/U) - IL_0011: ret + IL_000b: ldarg.0 + IL_000c: ldarg.1 + IL_000d: unbox.any StructUnion01/U + IL_0012: call instance bool StructUnion01/U::Equals(valuetype StructUnion01/U) + IL_0017: ret - IL_0012: ldc.i4.0 - IL_0013: ret + IL_0018: ldc.i4.0 + IL_0019: ret } // end of method U::Equals .property instance int32 Tag() From e1edd3ced3205325266f795cc734fb365932eac8 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 3 Mar 2022 16:56:17 +0000 Subject: [PATCH 11/13] update baselines and improve isinst codegen --- src/fsharp/IlxGen.fs | 21 +- .../FSharp.Compiler.ComponentTests.fsproj | 1 + tests/fsharp/core/patterns/test.fsx | 367 ++++ tests/fsharp/typecheck/sigs/neg133.bsl | 16 + tests/fsharp/typecheck/sigs/neg133.fs | 66 +- .../CCtorDUWithMember01.il.bsl | 252 ++- .../CodeGen/EmittedIL/Misc/AnonRecd.il.bsl | 364 ++-- .../EmittedIL/Misc/EqualsOnUnions01.il.bsl | 650 ++++--- .../CodeGen/EmittedIL/Misc/ForLoop01.il.bsl | 44 +- .../Misc/GeneralizationOnUnions01.il.bsl | 164 +- .../Linq101Aggregates01.il.bsl | 184 +- .../Linq101ElementOperators01.il.bsl | 52 +- .../Linq101Ordering01.il.bsl | 52 +- .../Linq101Partitioning01.il.bsl | 52 +- .../Linq101Quantifiers01.il.bsl | 28 +- .../Linq101Select01.il.bsl | 76 +- .../Linq101SetOperators01.il.bsl | 52 +- .../Linq101Where01.il.bsl | 16 +- .../SeqExpressionSteppingTest5.il.bsl | 16 +- .../SeqExpressionSteppingTest6.il.bsl | 16 +- .../SeqExpressionSteppingTest7.il.bsl | 84 +- .../ToplevelModule-preview.il.bsl | 1044 ++++++----- .../ToplevelModule.il.bsl | 1044 ++++++----- .../ToplevelNamespace-preview.il.bsl | 1564 ++++++++--------- .../ToplevelNamespace.il.bsl | 1564 ++++++++--------- .../SteppingMatch/SteppingMatch06.il.bsl | 252 ++- .../SteppingMatch/SteppingMatch07.il.bsl | 252 ++- .../TestFunctions/TestFunction16.il.bsl | 522 +++--- .../TestFunctions/TestFunction17.il.bsl | 452 +++-- .../TestFunctions/TestFunction21.il.bsl | 522 +++--- .../TestFunctions/TestFunction24.il.bsl | 452 +++-- .../ForLoop/ForEachOnList01.il.bsl | 294 ++-- .../GenericComparison/Compare05.il.bsl | 478 +++-- .../GenericComparison/Compare06.il.bsl | 414 +++-- .../GenericComparison/Compare07.il.bsl | 522 +++--- .../GenericComparison/Compare10.il.bsl | 1120 ++++++------ .../GenericComparison/Equals04.il.bsl | 478 +++-- .../GenericComparison/Equals05.il.bsl | 414 +++-- .../GenericComparison/Equals06.il.bsl | 522 +++--- .../GenericComparison/Equals09.il.bsl | 1120 ++++++------ .../GenericComparison/Hash05.il.bsl | 478 +++-- .../GenericComparison/Hash06.il.bsl | 478 +++-- .../GenericComparison/Hash08.il.bsl | 414 +++-- .../GenericComparison/Hash09.il.bsl | 522 +++--- .../GenericComparison/Hash12.il.bsl | 1120 ++++++------ .../Optimizations/Inlining/Match01.il.bsl | 634 ++++--- .../Inlining/StructUnion01.il.bsl | 78 +- 47 files changed, 9428 insertions(+), 9899 deletions(-) diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index 109e104ee64..2870d76fbe7 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -4164,6 +4164,11 @@ and GenAsmCode cenv cgbuf eenv (il, tyargs, args, returnTys, m) sequel = GenSequel cenv eenv.cloc cgbuf sequel | _ -> failwith "Bad polymorphic IL instruction" + // ldnull; cgt.un then branch is used to test for null and can become a direct brtrue/brfalse + | [ AI_ldnull; AI_cgt_un ], [arg1], CmpThenBrOrContinue(1, [ I_brcmp (bi, label1) ]), _ -> + + GenExpr cenv cgbuf eenv arg1 (CmpThenBrOrContinue(pop 1, [ I_brcmp (bi, label1) ])) + // Strip off any ("ceq" x false) when the sequel is a comparison branch and change the BI_brfalse to a BI_brtrue // This is the instruction sequence for "not" // For these we can just generate the argument and change the test (from a brfalse to a brtrue and vice versa) @@ -4172,19 +4177,21 @@ and GenAsmCode cenv cgbuf eenv (il, tyargs, args, returnTys, m) sequel = CmpThenBrOrContinue(1, [I_brcmp (BI_brfalse | BI_brtrue as bi, label1) ]), _) -> - let bi = match bi with BI_brtrue -> BI_brfalse | _ -> BI_brtrue - GenExpr cenv cgbuf eenv arg1 (CmpThenBrOrContinue(pop 1, [ I_brcmp (bi, label1) ])) + let bi = match bi with BI_brtrue -> BI_brfalse | _ -> BI_brtrue + GenExpr cenv cgbuf eenv arg1 (CmpThenBrOrContinue(pop 1, [ I_brcmp (bi, label1) ])) // Query; when do we get a 'ret' in IL assembly code? | [ I_ret ], [arg1], sequel, [_ilRetTy] -> - GenExpr cenv cgbuf eenv arg1 Continue - CG.EmitInstr cgbuf (pop 1) Push0 I_ret - GenSequelEndScopes cgbuf sequel + + GenExpr cenv cgbuf eenv arg1 Continue + CG.EmitInstr cgbuf (pop 1) Push0 I_ret + GenSequelEndScopes cgbuf sequel // Query; when do we get a 'ret' in IL assembly code? | [ I_ret ], [], sequel, [_ilRetTy] -> - CG.EmitInstr cgbuf (pop 1) Push0 I_ret - GenSequelEndScopes cgbuf sequel + + CG.EmitInstr cgbuf (pop 1) Push0 I_ret + GenSequelEndScopes cgbuf sequel // 'throw' instructions are a bit of a problem - e.g. let x = (throw ...) in ... expects a value *) // to be left on the stack. But dead-code checking by some versions of the .NET verifier *) diff --git a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj index 461cdbb4924..7659d108169 100644 --- a/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj +++ b/tests/FSharp.Compiler.ComponentTests/FSharp.Compiler.ComponentTests.fsproj @@ -25,6 +25,7 @@ + diff --git a/tests/fsharp/core/patterns/test.fsx b/tests/fsharp/core/patterns/test.fsx index b22584c0b99..2f3ccd13ec5 100644 --- a/tests/fsharp/core/patterns/test.fsx +++ b/tests/fsharp/core/patterns/test.fsx @@ -1361,6 +1361,373 @@ module StructActivePatternTest = (* check for failure else sign off "ok" *) +let TestOneColumnOfTypeTestsWithSealedTypes(x: obj) = + match x with + | :? string -> 1 + | :? int -> 2 + | :? bool -> 3 + | :? float -> 4 + | :? char -> 5 + | _ -> 6 + +check "clkjcepw321" (TestOneColumnOfTypeTestsWithSealedTypes (box "a")) 1 +check "clkjcepw322" (TestOneColumnOfTypeTestsWithSealedTypes (box 1)) 2 +check "clkjcepw323" (TestOneColumnOfTypeTestsWithSealedTypes (box true)) 3 +check "clkjcepw324" (TestOneColumnOfTypeTestsWithSealedTypes (box 5.0)) 4 +check "clkjcepw325" (TestOneColumnOfTypeTestsWithSealedTypes (box 'a')) 5 +check "clkjcepw326" (TestOneColumnOfTypeTestsWithSealedTypes (box 5.0f)) 6 + + + +let TestTwoColumnsOfTypeTestsWithSealedTypes(x: obj, y: obj) = + match x, y with + | :? string, :? string -> 1 + | :? int, :? int -> 2 + | :? bool, :? bool -> 3 + | :? float, :? float -> 4 + | :? char, :? char -> 5 + | _ -> 6 + +check "clkjcepw3211" (TestTwoColumnsOfTypeTestsWithSealedTypes (box "a", box "a")) 1 +check "clkjcepw3222" (TestTwoColumnsOfTypeTestsWithSealedTypes (box 1, box 1)) 2 +check "clkjcepw3233" (TestTwoColumnsOfTypeTestsWithSealedTypes (box true, box true)) 3 +check "clkjcepw3244" (TestTwoColumnsOfTypeTestsWithSealedTypes (box 5.0, box 5.0)) 4 +check "clkjcepw3255" (TestTwoColumnsOfTypeTestsWithSealedTypes (box 'a', box 'a')) 5 +check "clkjcepw3266" (TestTwoColumnsOfTypeTestsWithSealedTypes (box 5.0, box 2)) 6 +check "clkjcepw3267" (TestTwoColumnsOfTypeTestsWithSealedTypes (box 5.0, box "a")) 6 +check "clkjcepw3268" (TestTwoColumnsOfTypeTestsWithSealedTypes (null, box "a")) 6 + +let TestColumnOfTypeTestsWithSealedTypesAndBind(x: obj, y: obj) = + match x, y with + | :? string as s1, (:? string as s2) -> s1.Length + s2.Length + | :? int as i1, (:? int as i2) -> i1 + i2 + | :? bool as b1, (:? bool as b2) -> (if b1 then 1 else 0) + (if b2 then 1 else 0) + | :? float as f1, (:? float as f2) -> int f2 + int f2 + | :? char as c1, (:? char as c2) -> int c1 + int c2 + | _ -> 6 + +check "clkjcepwx3211" (TestColumnOfTypeTestsWithSealedTypesAndBind (box "a", box "a")) 2 +check "clkjcepwx3222" (TestColumnOfTypeTestsWithSealedTypesAndBind (box 1, box 1)) 2 +check "clkjcepwx3233" (TestColumnOfTypeTestsWithSealedTypesAndBind (box true, box true)) 2 +check "clkjcepwx3244" (TestColumnOfTypeTestsWithSealedTypesAndBind (box 5.0, box 5.0)) 10 +check "clkjcepwx3255" (TestColumnOfTypeTestsWithSealedTypesAndBind (box 'a', box 'a')) 194 +check "clkjcepwx3266" (TestColumnOfTypeTestsWithSealedTypesAndBind (box 5.0, box 2)) 6 +check "clkjcepwx3267" (TestColumnOfTypeTestsWithSealedTypesAndBind (box 5.0, box "a")) 6 +check "clkjcepwx3268" (TestColumnOfTypeTestsWithSealedTypesAndBind (null, box "a")) 6 + +module TypeTests = + type A() = + member _.Code = 10 + + type B1() = + inherit A() + member _.Code = 11 + + type B2() = + inherit A() + interface System.IComparable with member _.CompareTo(y) = 0 + member _.Code = 12 + + [] + type C1() = + inherit B1() + member _.Code = 13 + + [] + type C2() = + inherit B2() + interface System.IComparable with member _.CompareTo(y) = 0 + member _.Code = 14 + + [] + type D() = + interface System.IComparable with member _.CompareTo(y) = 0 + member _.Code = 15 + + let TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypes(x: obj) = + match x with + | null -> 0 + | :? C1 -> 1 + | :? C2 -> 2 + | :? B1 -> 3 + | :? B2 -> 4 + | :? A -> 5 + | _ -> 6 + + check "aclkjcepw321" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypes null) 0 + check "aclkjcepw321" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypes (C1())) 1 + check "aclkjcepw322" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypes (C2())) 2 + check "aclkjcepw323" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypes (B1())) 3 + check "aclkjcepw324" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypes (B2())) 4 + check "aclkjcepw325" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypes (A())) 5 + check "aclkjcepw326" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypes "") 6 + + + let TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypesAndBind(x: obj) = + match x with + | null -> 0 + | :? C1 as v -> v.Code + | :? C2 as v -> v.Code + | :? B1 as v -> v.Code + | :? B2 as v -> v.Code + | :? A as v -> v.Code + | _ -> 6 + + check "waclkjcepw321" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypesAndBind null) 0 + check "waclkjcepw321" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypesAndBind (C1())) 13 + check "waclkjcepw322" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypesAndBind (C2())) 14 + check "waclkjcepw323" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypesAndBind (B1())) 11 + check "waclkjcepw324" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypesAndBind (B2())) 12 + check "waclkjcepw325" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypesAndBind (A())) 10 + check "waclkjcepw326" (TestOneColumnOfTypeTestsWithNullWithUnSealedClassTypesAndBind "") 6 + + let TestOneColumnOfTypeTestsWithUnSealedClassTypes(x: obj) = + match x with + | :? C1 -> 1 + | :? C2 -> 2 + | :? B1 -> 3 + | :? B2 -> 4 + | :? A -> 5 + | _ -> 6 + + check "eaclkjcepw321" (TestOneColumnOfTypeTestsWithUnSealedClassTypes null) 6 + check "eaclkjcepw321" (TestOneColumnOfTypeTestsWithUnSealedClassTypes (C1())) 1 + check "eaclkjcepw322" (TestOneColumnOfTypeTestsWithUnSealedClassTypes (C2())) 2 + check "eaclkjcepw323" (TestOneColumnOfTypeTestsWithUnSealedClassTypes (B1())) 3 + check "eaclkjcepw324" (TestOneColumnOfTypeTestsWithUnSealedClassTypes (B2())) 4 + check "eaclkjcepw325" (TestOneColumnOfTypeTestsWithUnSealedClassTypes (A())) 5 + check "eaclkjcepw326" (TestOneColumnOfTypeTestsWithUnSealedClassTypes "") 6 + + + let TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes(x: obj, y: obj) = + match x, y with + | null, null -> 0 + | :? C1, :? C1 -> 1 + | :? C2, :? C2 -> 2 + | :? B1, :? B1 -> 3 + | :? B2, :? B2 -> 4 + | :? A, :? A -> 5 + | _ -> 6 + + check "rclkjcepwx3211a" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (null, null)) 0 + check "rclkjcepwx3211a" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (box (C1()), box (C1()))) 1 + check "rclkjcepwx3222a" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (box (C2()), box (C2()))) 2 + check "rclkjcepwx3233a" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (box (B1()), box (B1()))) 3 + check "rclkjcepwx3244a" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (box (B2()), box (B2()))) 4 + check "rclkjcepwx3255a" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (box (A()), box (A()))) 5 + check "rclkjcepwx3211b" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (null, box (C1()))) 6 + check "rclkjcepwx3211b" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (null, box (C2()))) 6 + check "rclkjcepwx3211b" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (null, box (B1()))) 6 + check "rclkjcepwx3211b" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (null, box (B2()))) 6 + check "rclkjcepwx3211b" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (null, box (A()))) 6 + check "rclkjcepwx3268b" (TestTwoColumnOfTypeTestsWithNullAndUnSealedClassTypes (null, box "a")) 6 + + let TestTwoColumnOfTypeTestsWithUnSealedClassTypes(x: obj, y: obj) = + match x, y with + | :? C1, :? C1 -> 1 + | :? C2, :? C2 -> 2 + | :? B1, :? B1 -> 3 + | :? B2, :? B2 -> 4 + | :? A, :? A -> 5 + | _ -> 6 + + check "trclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (null, null)) 6 + check "trclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (box (C1()), box (C1()))) 1 + check "trclkjcepwx3222" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (box (C2()), box (C2()))) 2 + check "trclkjcepwx3233" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (box (B1()), box (B1()))) 3 + check "trclkjcepwx3244" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (box (B2()), box (B2()))) 4 + check "trclkjcepwx3255" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (box (A()), box (A()))) 5 + check "trclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (null, box (C1()))) 6 + check "trclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (null, box (C2()))) 6 + check "trclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (null, box (B1()))) 6 + check "trclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (null, box (B2()))) 6 + check "trclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (null, box (A()))) 6 + check "trclkjcepwx3268" (TestTwoColumnOfTypeTestsWithUnSealedClassTypes (null, box "a")) 6 + + let TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind(x: obj, y: obj) = + match x, y with + | :? C1 as v1, (:? C1 as v2) -> v1.Code + v2.Code + | :? C2 as v1, (:? C2 as v2) -> v1.Code + v2.Code + | :? B1 as v1, (:? B1 as v2) -> v1.Code + v2.Code + | :? B1 as v1, (:? B2 as v2) -> v1.Code + v2.Code + | :? B2 as v1, (:? B1 as v2) -> v1.Code + v2.Code + | :? B2 as v1, (:? B2 as v2) -> v1.Code + v2.Code + | :? A as v1, (:? A as v2) -> v1.Code + v2.Code + | _ -> 6 + + check "ytrclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (C1()), box (C1()))) 26 + check "ytrclkjcepwx3222" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (C2()), box (C2()))) 28 + check "ytrclkjcepwx3233" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (B1()), box (B1()))) 22 + check "ytrclkjcepwx3233" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (B1()), box (B2()))) 23 + check "ytrclkjcepwx3233" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (B2()), box (B1()))) 23 + check "ytrclkjcepwx3244" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (B2()), box (B2()))) 24 + check "ytrclkjcepwx3255" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (A()), box (B1()))) 20 + check "ytrclkjcepwx3255" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (A()), box (A()))) 20 + check "ytrclkjcepwx3255" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (box (B1()), box (A()))) 20 + check "ytrclkjcepwx3211" (TestTwoColumnOfTypeTestsWithUnSealedClassTypesWithBind (null, null)) 6 + + let TestOneColumnOfTypeTestsWithNullTrueValue(x: obj) = + match x with + | null -> 100 + | :? option -> 200 + | :? option -> 300 + | _ -> 500 + + check "vwewevwe11" (TestOneColumnOfTypeTestsWithNullTrueValue null) 100 + check "vwewevwe12" (TestOneColumnOfTypeTestsWithNullTrueValue (None: option)) 100 + check "vwewevwe13" (TestOneColumnOfTypeTestsWithNullTrueValue (None: option)) 100 + check "vwewevwe14" (TestOneColumnOfTypeTestsWithNullTrueValue (Some(3))) 200 + check "vwewevwe15" (TestOneColumnOfTypeTestsWithNullTrueValue (Some("3"))) 300 + check "vwewevwe16" (TestOneColumnOfTypeTestsWithNullTrueValue (Some(3.4))) 500 + + let TestTwoColumnsOfTypeTestsWithNullTrueValue(x: obj, y :obj) = + match x, y with + | null, null -> 100 + | :? option, :? option -> 200 + | :? option, :? option -> 300 + | :? option, :? option -> 400 + | _ -> 500 + + check "vwewevwe111" (TestTwoColumnsOfTypeTestsWithNullTrueValue (null, null)) 100 + check "vwewevwe122" (TestTwoColumnsOfTypeTestsWithNullTrueValue ((None: option), (None: option))) 100 + check "vwewevwe133" (TestTwoColumnsOfTypeTestsWithNullTrueValue ((None: option), (None: option))) 100 + check "vwewevwe144" (TestTwoColumnsOfTypeTestsWithNullTrueValue (Some(3), Some(3))) 200 + check "vwewevwe155" (TestTwoColumnsOfTypeTestsWithNullTrueValue (Some("3"), Some("3"))) 300 + check "vwewevwe166" (TestTwoColumnsOfTypeTestsWithNullTrueValue (Some(3.4), Some(3.4))) 500 + + let TestColumnOfTypeTestsWithNullAfterFirst(x: obj) = + match x with + | :? string -> 100 + | null -> 200 + | _ -> 500 + + check "vwewevwe1221" (TestColumnOfTypeTestsWithNullAfterFirst "a") 100 + check "vwewevwe1112" (TestColumnOfTypeTestsWithNullAfterFirst null) 200 + check "vwewevwe1333" (TestColumnOfTypeTestsWithNullAfterFirst 3) 500 + + let OneColumnOfTypeTestsInvolvingInterfacesAndSealed (x: obj) = + match x with + | :? string -> 1 + | :? System.IComparable -> 2 + | g -> 3 + + check "vwewevwe122t" (OneColumnOfTypeTestsInvolvingInterfacesAndSealed "a") 1 + check "vwewevwe133t" (OneColumnOfTypeTestsInvolvingInterfacesAndSealed 3) 2 + check "vwewevwe133t" (OneColumnOfTypeTestsInvolvingInterfacesAndSealed 3.14) 2 + check "vwewevwe111t" (OneColumnOfTypeTestsInvolvingInterfacesAndSealed null) 3 + + /// Note, some expansion does occur in this case. The first column-based type-test [A, IComparable] yields little frontier reduction + /// Failing A can't rule out IComparable (of course) + /// Succeeding A can't rule out IComparable (not sealed) + /// So IComparable frontiers end up duplicated + let TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (x: obj, y: obj) = + match x, y with + | :? A, :? A -> 1 + | :? System.IComparable, :? System.IComparable -> 2 + | :? A, :? System.IComparable -> 3 + | _ -> 4 + + // Note - + // A doesn't support IComparable + // B1 is a subtype of A and doesn't support IComparable + // B2 is a subtype of A and does support IComparable + // D is unrelated class and does support IComparable + check "vwewevwe122t1" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (A(), A())) 1 + check "vwewevwe122t2" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (A(), B1())) 1 + check "vwewevwe122t3" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (A(), B2())) 1 + check "vwewevwe122t4" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (B2(), B2())) 1 + check "vwewevwe122t5" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (C2(), B2())) 1 + check "vwewevwe122t6" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (B2(), D())) 2 + check "vwewevwe122t7" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (A(), D())) 3 + check "vwewevwe122t8" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (D(), A())) 4 + check "vwewevwe122t9" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (D(), D())) 2 + check "vwewevwe111tA" (TwoColumnOfTypeTestsInvolvingInterfacesAndUnsealed (null, null)) 4 + +module ExampleThatGeneratedExponentialCode = + type Foo = | Foo + type Bar = | Bar + type Baz = | Baz + type Alpha = | Alpha + type Beta = | Beta + type Gamma = | Gamma + type Delta = | Delta + + type TypeA<'a> = + | A of 'a + + type TypeB<'a> = + | B of 'a + + type IntA = TypeA + type IntB = TypeB + + type FloatA = TypeA + type FloatB = TypeB + + type StringA = TypeA + type StringB = TypeB + + type DecimalA = TypeA + type DecimalB = TypeB + + type ByteA = TypeA + type ByteB = TypeB + + type Int64A = TypeA + type Int64B = TypeB + + type Float32A = TypeA + type Float32B = TypeB + + type CharA = TypeA + type CharB = TypeB + + type FooA = TypeA + type FooB = TypeB + + type BarA = TypeA + type BarB = TypeB + + type BazA = TypeA + type BazB = TypeB + + type AlphaA = TypeA + type AlphaB = TypeB + + type BetaA = TypeA + type BetaB = TypeB + + type GammaA = TypeA + type GammaB = TypeB + + type DeltaA = TypeA + type DeltaB = TypeB + + let performMatch valueA valueB = + match box valueA, box valueB with + | :? IntA as a, :? IntB as b -> "1" + | :? FloatA as a, :? FloatB as b -> "2" + | :? StringA as a, :? StringB as b -> "3" + | :? DecimalA as a, :? DecimalB as b -> "4" + | :? ByteA as a, :? ByteB as b -> "5" + | :? Int64A as a, :? Int64B as b -> "6" + | :? Float32A as a, :? Float32B as b -> "2" + | :? CharA as a, :? CharB as b -> "8" + | :? FooA as a, :? FooB as b -> "9" + | :? BarA as a, :? BarB as b -> "A" + | :? BazA as a, :? BazB as b -> "B" + | :? AlphaA as a, :? AlphaB as b -> "C" + | :? BetaB as a, :? BetaB as b -> "D" + | :? GammaA as a, :? GammaB as b -> "E" + | :? DeltaA as a, :? DeltaB as b -> "F" //Comment out this line and the code runs as expected + | _ -> "Failed" + + let x = A Delta + let y = B Delta + + check "f3wev" (performMatch x y) "F" + + #if TESTS_AS_APP let RUN() = !failures #else diff --git a/tests/fsharp/typecheck/sigs/neg133.bsl b/tests/fsharp/typecheck/sigs/neg133.bsl index ed51fcc0580..ab7959c8782 100644 --- a/tests/fsharp/typecheck/sigs/neg133.bsl +++ b/tests/fsharp/typecheck/sigs/neg133.bsl @@ -2,3 +2,19 @@ neg133.fs(4,19,4,22): typecheck error FS3521: Invalid member declaration. The name of the member is missing or has parentheses. neg133.fs(7,19,7,27): typecheck error FS3521: Invalid member declaration. The name of the member is missing or has parentheses. + +neg133.fs(28,7,28,17): typecheck error FS0026: This rule will never be matched + +neg133.fs(34,7,34,17): typecheck error FS0026: This rule will never be matched + +neg133.fs(40,7,40,17): typecheck error FS0026: This rule will never be matched + +neg133.fs(46,7,46,20): typecheck error FS0026: This rule will never be matched + +neg133.fs(52,7,52,37): typecheck error FS0026: This rule will never be matched + +neg133.fs(57,7,57,19): typecheck error FS0026: This rule will never be matched + +neg133.fs(63,7,63,19): typecheck error FS0026: This rule will never be matched + +neg133.fs(69,7,69,21): typecheck error FS0026: This rule will never be matched diff --git a/tests/fsharp/typecheck/sigs/neg133.fs b/tests/fsharp/typecheck/sigs/neg133.fs index 5151f488580..99b8c6156df 100644 --- a/tests/fsharp/typecheck/sigs/neg133.fs +++ b/tests/fsharp/typecheck/sigs/neg133.fs @@ -1,7 +1,71 @@ module Neg133 - +open System type T = static member (y) = 0 type U = static member (y: int) = 0 + +type A() = class end + +type B1() = + inherit A() + +type B2() = + inherit A() + +[] +type C1() = + inherit B1() + +[] +type C2() = + inherit B2() + +let TestOneColumnOfTypeTestsWithUnSealedClassTypes_Redundant1(x: obj) = + match x with + | :? A -> 1 + | :? B1 -> 2 // expect - never matched + | _ -> 3 + +let TestOneColumnOfTypeTestsWithUnSealedClassTypes_Redundant2(x: obj) = + match x with + | :? A -> 1 + | :? C1 -> 2 // expect - never matched + | _ -> 3 + +let TestOneColumnOfTypeTestsWithUnSealedClassTypes_Redundant3(x: obj) = + match x with + | :? B1 -> 1 + | :? C1 -> 2 // expect - never matched + | _ -> 3 + +let TestColumnOfTypeTestsWithNullTrueValue_Redundant(x: obj) = + match x with + | :? option -> 0x200 + | null -> 0x100 // expect - never matched + | _ -> 0x500 + +let Misc_Redundant2(x: ValueType) = + match x with + | a -> 2 + | :? Enum & (:? ConsoleKey) -> 1 // expect - never matched + +let Misc_Redundant3(x: ValueType) = + match x with + | :? Enum -> 2 + | :? Enum -> 1 // expect - never matched + | g -> 3 + +let Misc_Redundant4(x: obj) = + match x with + | :? ValueType -> 1 + | :? Enum -> 2 // expect - never matched + | g -> 3 + +let Misc_Redundant5(x: obj) = + match x with + | :? IComparable -> 1 + | :? string -> 2 // expect - never matched + | g -> 3 + diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl index 39e183f3fff..8503e1b52d6 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000780 Length: 0x00000227 } .module CCtorDUWithMember01.exe -// MVID: {61E07031-26F1-14EE-A745-03833170E061} +// MVID: {6220E156-26F1-14EE-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x058B0000 +// Image base: 0x050C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -243,61 +243,55 @@ instance int32 CompareTo(class CCtorDUWithMember01a/C obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 48 (0x30) + // Code size 39 (0x27) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CCtorDUWithMember\\CCtorDUWithMember01a.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0020 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0024 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_0019: stloc.1 + IL_0006: ldarg.0 + IL_0007: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_000c: stloc.0 + IL_000d: ldarg.1 + IL_000e: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_0013: stloc.1 .line 100001,100001 : 0,0 '' - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un.s IL_0020 + IL_0014: ldloc.0 + IL_0015: ldloc.1 + IL_0016: bne.un.s IL_001a .line 100001,100001 : 0,0 '' - IL_001e: ldc.i4.0 - IL_001f: ret + IL_0018: ldc.i4.0 + IL_0019: ret .line 100001,100001 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldloc.1 - IL_0022: sub - IL_0023: ret + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: sub + IL_001d: ret .line 100001,100001 : 0,0 '' - IL_0024: ldc.i4.1 - IL_0025: ret + IL_001e: ldc.i4.1 + IL_001f: ret .line 100001,100001 : 0,0 '' - IL_0026: ldarg.1 - IL_0027: ldnull - IL_0028: cgt.un - IL_002a: brfalse.s IL_002e + IL_0020: ldarg.1 + IL_0021: brfalse.s IL_0025 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0023: ldc.i4.m1 + IL_0024: ret .line 100001,100001 : 0,0 '' - IL_002e: ldc.i4.0 - IL_002f: ret + IL_0025: ldc.i4.0 + IL_0026: ret } // end of method C::CompareTo .method public hidebysig virtual final @@ -318,7 +312,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 65 (0x41) + // Code size 56 (0x38) .maxstack 4 .locals init ([0] class CCtorDUWithMember01a/C V_0, [1] int32 V_1, @@ -329,82 +323,74 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0008: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any CCtorDUWithMember01a/C - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0030 + IL_000a: ldarg.1 + IL_000b: unbox.any CCtorDUWithMember01a/C + IL_0010: brfalse.s IL_002a .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_001e: stloc.1 - IL_001f: ldloc.0 - IL_0020: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_0025: stloc.2 + IL_0012: ldarg.0 + IL_0013: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_0018: stloc.1 + IL_0019: ldloc.0 + IL_001a: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_001f: stloc.2 .line 100001,100001 : 0,0 '' - IL_0026: ldloc.1 - IL_0027: ldloc.2 - IL_0028: bne.un.s IL_002c + IL_0020: ldloc.1 + IL_0021: ldloc.2 + IL_0022: bne.un.s IL_0026 .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0024: ldc.i4.0 + IL_0025: ret .line 100001,100001 : 0,0 '' - IL_002c: ldloc.1 - IL_002d: ldloc.2 - IL_002e: sub - IL_002f: ret + IL_0026: ldloc.1 + IL_0027: ldloc.2 + IL_0028: sub + IL_0029: ret .line 100001,100001 : 0,0 '' - IL_0030: ldc.i4.1 - IL_0031: ret + IL_002a: ldc.i4.1 + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_0032: ldarg.1 - IL_0033: unbox.any CCtorDUWithMember01a/C - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: brfalse.s IL_003f + IL_002c: ldarg.1 + IL_002d: unbox.any CCtorDUWithMember01a/C + IL_0032: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.m1 - IL_003e: ret + IL_0034: ldc.i4.m1 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_0036: ldc.i4.0 + IL_0037: ret } // end of method C::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 17 (0x11) + // Code size 14 (0xe) .maxstack 3 .locals init ([0] int32 V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_000f + IL_0001: brfalse.s IL_000c .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_000e: ret + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_000b: ret .line 100001,100001 : 0,0 '' - IL_000f: ldc.i4.0 - IL_0010: ret + IL_000c: ldc.i4.0 + IL_000d: ret } // end of method C::GetHashCode .method public hidebysig virtual final @@ -424,7 +410,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 47 (0x2f) + // Code size 44 (0x2c) .maxstack 4 .locals init ([0] class CCtorDUWithMember01a/C V_0, [1] class CCtorDUWithMember01a/C V_1, @@ -432,44 +418,42 @@ [3] int32 V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst CCtorDUWithMember01a/C - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst CCtorDUWithMember01a/C + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0025 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0022 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_001f: stloc.3 + IL_000d: ldloc.0 + IL_000e: stloc.1 + IL_000f: ldarg.0 + IL_0010: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_001c: stloc.3 .line 100001,100001 : 0,0 '' - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: ceq - IL_0024: ret + IL_001d: ldloc.2 + IL_001e: ldloc.3 + IL_001f: ceq + IL_0021: ret .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.0 - IL_0026: ret + IL_0022: ldc.i4.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0027: ldarg.1 - IL_0028: ldnull - IL_0029: cgt.un - IL_002b: ldc.i4.0 - IL_002c: ceq - IL_002e: ret + IL_0024: ldarg.1 + IL_0025: ldnull + IL_0026: cgt.un + IL_0028: ldc.i4.0 + IL_0029: ceq + IL_002b: ret } // end of method C::Equals .method public hidebysig specialname @@ -490,46 +474,42 @@ instance bool Equals(class CCtorDUWithMember01a/C obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 35 (0x23) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0021 + IL_0001: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_001f + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0019 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_0019: stloc.1 + IL_0006: ldarg.0 + IL_0007: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_000c: stloc.0 + IL_000d: ldarg.1 + IL_000e: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_0013: stloc.1 .line 100001,100001 : 0,0 '' - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: ceq - IL_001e: ret + IL_0014: ldloc.0 + IL_0015: ldloc.1 + IL_0016: ceq + IL_0018: ret .line 100001,100001 : 0,0 '' - IL_001f: ldc.i4.0 - IL_0020: ret + IL_0019: ldc.i4.0 + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldarg.1 - IL_0022: ldnull - IL_0023: cgt.un - IL_0025: ldc.i4.0 - IL_0026: ceq - IL_0028: ret + IL_001b: ldarg.1 + IL_001c: ldnull + IL_001d: cgt.un + IL_001f: ldc.i4.0 + IL_0020: ceq + IL_0022: ret } // end of method C::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AnonRecd.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AnonRecd.il.bsl index a752dfe4d88..643950ec138 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AnonRecd.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AnonRecd.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000001C8 Length: 0x0000006B } .module AnonRecd.exe -// MVID: {61E07031-C42F-5208-A745-03833170E061} +// MVID: {6220E156-C42F-5208-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07100000 +// Image base: 0x072D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -161,78 +161,72 @@ instance int32 CompareTo(class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 84 (0x54) + // Code size 75 (0x4b) .maxstack 5 .locals init ([0] int32 V_0) .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\unknown' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004a + IL_0001: brfalse.s IL_0044 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0048 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0042 .line 100001,100001 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: ldarg.0 + IL_0006: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: ldarg.0 + IL_000c: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_0011: ldarg.1 IL_0012: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0017: ldarg.1 - IL_0018: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_001d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, + IL_0017: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0022: stloc.0 + IL_001c: stloc.0 .line 100001,100001 : 0,0 '' - IL_0023: ldloc.0 - IL_0024: ldc.i4.0 - IL_0025: bge.s IL_0029 + IL_001d: ldloc.0 + IL_001e: ldc.i4.0 + IL_001f: bge.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.0 - IL_0028: ret + IL_0021: ldloc.0 + IL_0022: ret .line 100001,100001 : 0,0 '' - IL_0029: ldloc.0 - IL_002a: ldc.i4.0 - IL_002b: ble.s IL_002f + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: ble.s IL_0029 .line 100001,100001 : 0,0 '' - IL_002d: ldloc.0 - IL_002e: ret + IL_0027: ldloc.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0034: ldarg.0 + IL_0029: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_002e: ldarg.0 + IL_002f: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0034: ldarg.1 IL_0035: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_003a: ldarg.1 - IL_003b: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0040: tail. - IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, + IL_003a: tail. + IL_003c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0047: ret + IL_0041: ret .line 100001,100001 : 0,0 '' - IL_0048: ldc.i4.1 - IL_0049: ret + IL_0042: ldc.i4.1 + IL_0043: ret .line 100001,100001 : 0,0 '' - IL_004a: ldarg.1 - IL_004b: ldnull - IL_004c: cgt.un - IL_004e: brfalse.s IL_0052 + IL_0044: ldarg.1 + IL_0045: brfalse.s IL_0049 .line 100001,100001 : 0,0 '' - IL_0050: ldc.i4.m1 - IL_0051: ret + IL_0047: ldc.i4.m1 + IL_0048: ret .line 100001,100001 : 0,0 '' - IL_0052: ldc.i4.0 - IL_0053: ret + IL_0049: ldc.i4.0 + IL_004a: ret } // end of method '<>f__AnonymousType1912756633`2'::CompareTo .method public hidebysig virtual final @@ -254,7 +248,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 95 (0x5f) + // Code size 86 (0x56) .maxstack 5 .locals init ([0] class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> V_0, [1] class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> V_1, @@ -267,131 +261,123 @@ IL_0008: stloc.1 .line 100001,100001 : 0,0 '' IL_0009: ldarg.0 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse.s IL_0050 + IL_000a: brfalse.s IL_004a .line 100001,100001 : 0,0 '' - IL_000f: ldarg.1 - IL_0010: unbox.any class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> - IL_0015: ldnull - IL_0016: cgt.un - IL_0018: brfalse.s IL_004e + IL_000c: ldarg.1 + IL_000d: unbox.any class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> + IL_0012: brfalse.s IL_0048 .line 100001,100001 : 0,0 '' - IL_001a: ldarg.2 - IL_001b: ldarg.0 + IL_0014: ldarg.2 + IL_0015: ldarg.0 + IL_0016: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_001b: ldloc.1 IL_001c: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0021: ldloc.1 - IL_0022: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0027: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, + IL_0021: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_002c: stloc.2 + IL_0026: stloc.2 .line 100001,100001 : 0,0 '' - IL_002d: ldloc.2 - IL_002e: ldc.i4.0 - IL_002f: bge.s IL_0033 + IL_0027: ldloc.2 + IL_0028: ldc.i4.0 + IL_0029: bge.s IL_002d .line 100001,100001 : 0,0 '' - IL_0031: ldloc.2 - IL_0032: ret + IL_002b: ldloc.2 + IL_002c: ret .line 100001,100001 : 0,0 '' - IL_0033: ldloc.2 - IL_0034: ldc.i4.0 - IL_0035: ble.s IL_0039 + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: ble.s IL_0033 .line 100001,100001 : 0,0 '' - IL_0037: ldloc.2 - IL_0038: ret + IL_0031: ldloc.2 + IL_0032: ret .line 100001,100001 : 0,0 '' - IL_0039: ldarg.2 - IL_003a: ldarg.0 + IL_0033: ldarg.2 + IL_0034: ldarg.0 + IL_0035: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_003a: ldloc.1 IL_003b: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0040: ldloc.1 - IL_0041: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0046: tail. - IL_0048: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, + IL_0040: tail. + IL_0042: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericComparisonWithComparerj__TPar'>(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_004d: ret + IL_0047: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.1 - IL_004f: ret + IL_0048: ldc.i4.1 + IL_0049: ret .line 100001,100001 : 0,0 '' - IL_0050: ldarg.1 - IL_0051: unbox.any class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> - IL_0056: ldnull - IL_0057: cgt.un - IL_0059: brfalse.s IL_005d + IL_004a: ldarg.1 + IL_004b: unbox.any class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> + IL_0050: brfalse.s IL_0054 .line 100001,100001 : 0,0 '' - IL_005b: ldc.i4.m1 - IL_005c: ret + IL_0052: ldc.i4.m1 + IL_0053: ret .line 100001,100001 : 0,0 '' - IL_005d: ldc.i4.0 - IL_005e: ret + IL_0054: ldc.i4.0 + IL_0055: ret } // end of method '<>f__AnonymousType1912756633`2'::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 66 (0x42) + // Code size 63 (0x3f) .maxstack 7 .locals init ([0] int32 V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0040 - - .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: ldarg.0 - IL_000f: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0014: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, + IL_0001: brfalse.s IL_003d + + .line 100001,100001 : 0,0 '' + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: ldarg.0 + IL_000c: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0011: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, !!0) + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add - IL_0020: add - IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldarg.1 - IL_0029: ldarg.0 - IL_002a: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_002f: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldarg.1 + IL_0026: ldarg.0 + IL_0027: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_002c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericHashWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, !!0) + IL_0031: ldloc.0 + IL_0032: ldc.i4.6 + IL_0033: shl IL_0034: ldloc.0 - IL_0035: ldc.i4.6 - IL_0036: shl - IL_0037: ldloc.0 - IL_0038: ldc.i4.2 - IL_0039: shr - IL_003a: add - IL_003b: add - IL_003c: add - IL_003d: stloc.0 - IL_003e: ldloc.0 - IL_003f: ret + IL_0035: ldc.i4.2 + IL_0036: shr + IL_0037: add + IL_0038: add + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldloc.0 + IL_003c: ret .line 100001,100001 : 0,0 '' - IL_0040: ldc.i4.0 - IL_0041: ret + IL_003d: ldc.i4.0 + IL_003e: ret } // end of method '<>f__AnonymousType1912756633`2'::GetHashCode .method public hidebysig virtual final @@ -412,119 +398,113 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 71 (0x47) + // Code size 68 (0x44) .maxstack 5 .locals init ([0] class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> V_0, [1] class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003f + IL_0001: brfalse.s IL_003c .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003d + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.2 - IL_0013: ldarg.0 - IL_0014: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0019: ldloc.1 - IL_001a: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_001f: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, + IL_000d: ldloc.0 + IL_000e: stloc.1 + .line 100001,100001 : 0,0 '' + IL_000f: ldarg.2 + IL_0010: ldarg.0 + IL_0011: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_0016: ldloc.1 + IL_0017: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_001c: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_0024: brfalse.s IL_003b + IL_0021: brfalse.s IL_0038 .line 100001,100001 : 0,0 '' - IL_0026: ldarg.2 - IL_0027: ldarg.0 - IL_0028: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_002d: ldloc.1 - IL_002e: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0033: tail. - IL_0035: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, + IL_0023: ldarg.2 + IL_0024: ldarg.0 + IL_0025: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_002a: ldloc.1 + IL_002b: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_0030: tail. + IL_0032: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityWithComparerj__TPar'>(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_003a: ret + IL_0037: ret .line 100001,100001 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_0038: ldc.i4.0 + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.0 - IL_003e: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_003f: ldarg.1 - IL_0040: ldnull - IL_0041: cgt.un - IL_0043: ldc.i4.0 - IL_0044: ceq - IL_0046: ret + IL_003c: ldarg.1 + IL_003d: ldnull + IL_003e: cgt.un + IL_0040: ldc.i4.0 + IL_0041: ceq + IL_0043: ret } // end of method '<>f__AnonymousType1912756633`2'::Equals .method public hidebysig virtual final instance bool Equals(class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 57 (0x39) .maxstack 8 .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: brfalse.s IL_0031 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0035 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002f .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 + IL_0006: ldarg.0 + IL_0007: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ + IL_000c: ldarg.1 IL_000d: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0012: ldarg.1 - IL_0013: ldfld !0 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::A@ - IL_0018: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + IL_0012: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, !!0) - IL_001d: brfalse.s IL_0033 + IL_0017: brfalse.s IL_002d .line 100001,100001 : 0,0 '' - IL_001f: ldarg.0 + IL_0019: ldarg.0 + IL_001a: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ + IL_001f: ldarg.1 IL_0020: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_0025: ldarg.1 - IL_0026: ldfld !1 class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'>::B@ - IL_002b: tail. - IL_002d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, + IL_0025: tail. + IL_0027: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::GenericEqualityERj__TPar'>(!!0, !!0) - IL_0032: ret + IL_002c: ret .line 100001,100001 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_002d: ldc.i4.0 + IL_002e: ret .line 100001,100001 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 100001,100001 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0031: ldarg.1 + IL_0032: ldnull + IL_0033: cgt.un + IL_0035: ldc.i4.0 + IL_0036: ceq + IL_0038: ret } // end of method '<>f__AnonymousType1912756633`2'::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EqualsOnUnions01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EqualsOnUnions01.il.bsl index e54889aaaf5..657af9082f0 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EqualsOnUnions01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EqualsOnUnions01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000640 Length: 0x000001C7 } .module EqualsOnUnions01.exe -// MVID: {61EFEE1F-BBFB-14A0-A745-03831FEEEF61} +// MVID: {6220E156-BBFB-14A0-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06940000 +// Image base: 0x06E00000 // =============== CLASS MEMBERS DECLARATION =================== @@ -339,7 +339,7 @@ instance int32 CompareTo(class EqualsOnUnions01/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 131 (0x83) + // Code size 122 (0x7a) .maxstack 4 .locals init ([0] int32 V_0, [1] class EqualsOnUnions01/U V_1, @@ -353,106 +353,100 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\EqualsOnUnions01.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_0079 + IL_0001: brfalse IL_0073 .line 100001,100001 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse.s IL_0077 - - .line 100001,100001 : 0,0 '' - IL_000f: ldarg.0 - IL_0010: stloc.1 - IL_0011: ldloc.1 - IL_0012: isinst EqualsOnUnions01/U/B - IL_0017: brfalse.s IL_001c - - IL_0019: ldc.i4.1 - IL_001a: br.s IL_001d - - IL_001c: ldc.i4.0 - IL_001d: stloc.0 - IL_001e: ldarg.1 - IL_001f: stloc.3 - IL_0020: ldloc.3 - IL_0021: isinst EqualsOnUnions01/U/B - IL_0026: brfalse.s IL_002b - - IL_0028: ldc.i4.1 - IL_0029: br.s IL_002c - - IL_002b: ldc.i4.0 - IL_002c: stloc.2 + IL_0006: ldarg.1 + IL_0007: brfalse.s IL_0071 + + .line 100001,100001 : 0,0 '' + IL_0009: ldarg.0 + IL_000a: stloc.1 + IL_000b: ldloc.1 + IL_000c: isinst EqualsOnUnions01/U/B + IL_0011: brfalse.s IL_0016 + + IL_0013: ldc.i4.1 + IL_0014: br.s IL_0017 + + IL_0016: ldc.i4.0 + IL_0017: stloc.0 + IL_0018: ldarg.1 + IL_0019: stloc.3 + IL_001a: ldloc.3 + IL_001b: isinst EqualsOnUnions01/U/B + IL_0020: brfalse.s IL_0025 + + IL_0022: ldc.i4.1 + IL_0023: br.s IL_0026 + + IL_0025: ldc.i4.0 + IL_0026: stloc.2 + .line 100001,100001 : 0,0 '' + IL_0027: ldloc.0 + IL_0028: ldloc.2 + IL_0029: bne.un.s IL_006d + + .line 100001,100001 : 0,0 '' + IL_002b: ldarg.0 + IL_002c: isinst EqualsOnUnions01/U/B + IL_0031: brfalse.s IL_006b + + .line 100001,100001 : 0,0 '' + IL_0033: ldarg.0 + IL_0034: castclass EqualsOnUnions01/U/B + IL_0039: stloc.s V_4 + IL_003b: ldarg.1 + IL_003c: castclass EqualsOnUnions01/U/B + IL_0041: stloc.s V_5 + IL_0043: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0048: stloc.s V_6 + IL_004a: ldloc.s V_4 + IL_004c: ldfld int32 EqualsOnUnions01/U/B::item + IL_0051: stloc.s V_7 + IL_0053: ldloc.s V_5 + IL_0055: ldfld int32 EqualsOnUnions01/U/B::item + IL_005a: stloc.s V_8 .line 100001,100001 : 0,0 '' - IL_002d: ldloc.0 - IL_002e: ldloc.2 - IL_002f: bne.un.s IL_0073 + IL_005c: ldloc.s V_7 + IL_005e: ldloc.s V_8 + IL_0060: bge.s IL_0064 .line 100001,100001 : 0,0 '' - IL_0031: ldarg.0 - IL_0032: isinst EqualsOnUnions01/U/B - IL_0037: brfalse.s IL_0071 + IL_0062: ldc.i4.m1 + IL_0063: ret .line 100001,100001 : 0,0 '' - IL_0039: ldarg.0 - IL_003a: castclass EqualsOnUnions01/U/B - IL_003f: stloc.s V_4 - IL_0041: ldarg.1 - IL_0042: castclass EqualsOnUnions01/U/B - IL_0047: stloc.s V_5 - IL_0049: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004e: stloc.s V_6 - IL_0050: ldloc.s V_4 - IL_0052: ldfld int32 EqualsOnUnions01/U/B::item - IL_0057: stloc.s V_7 - IL_0059: ldloc.s V_5 - IL_005b: ldfld int32 EqualsOnUnions01/U/B::item - IL_0060: stloc.s V_8 - .line 100001,100001 : 0,0 '' - IL_0062: ldloc.s V_7 - IL_0064: ldloc.s V_8 - IL_0066: bge.s IL_006a + IL_0064: ldloc.s V_7 + IL_0066: ldloc.s V_8 + IL_0068: cgt + IL_006a: ret .line 100001,100001 : 0,0 '' - IL_0068: ldc.i4.m1 - IL_0069: ret + IL_006b: ldc.i4.0 + IL_006c: ret .line 100001,100001 : 0,0 '' - IL_006a: ldloc.s V_7 - IL_006c: ldloc.s V_8 - IL_006e: cgt + IL_006d: ldloc.0 + IL_006e: ldloc.2 + IL_006f: sub IL_0070: ret .line 100001,100001 : 0,0 '' - IL_0071: ldc.i4.0 + IL_0071: ldc.i4.1 IL_0072: ret .line 100001,100001 : 0,0 '' - IL_0073: ldloc.0 - IL_0074: ldloc.2 - IL_0075: sub - IL_0076: ret - - .line 100001,100001 : 0,0 '' - IL_0077: ldc.i4.1 - IL_0078: ret - - .line 100001,100001 : 0,0 '' - IL_0079: ldarg.1 - IL_007a: ldnull - IL_007b: cgt.un - IL_007d: brfalse.s IL_0081 + IL_0073: ldarg.1 + IL_0074: brfalse.s IL_0078 .line 100001,100001 : 0,0 '' - IL_007f: ldc.i4.m1 - IL_0080: ret + IL_0076: ldc.i4.m1 + IL_0077: ret .line 100001,100001 : 0,0 '' - IL_0081: ldc.i4.0 - IL_0082: ret + IL_0078: ldc.i4.0 + IL_0079: ret } // end of method U::CompareTo .method public hidebysig virtual final @@ -473,7 +467,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 146 (0x92) + // Code size 137 (0x89) .maxstack 4 .locals init ([0] class EqualsOnUnions01/U V_0, [1] int32 V_1, @@ -491,115 +485,109 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse IL_0083 + IL_0008: brfalse IL_007d .line 100001,100001 : 0,0 '' - IL_0010: ldarg.1 - IL_0011: unbox.any EqualsOnUnions01/U - IL_0016: ldnull - IL_0017: cgt.un - IL_0019: brfalse.s IL_0081 + IL_000d: ldarg.1 + IL_000e: unbox.any EqualsOnUnions01/U + IL_0013: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_001b: ldarg.0 - IL_001c: stloc.2 - IL_001d: ldloc.2 - IL_001e: isinst EqualsOnUnions01/U/B - IL_0023: brfalse.s IL_0028 + IL_0015: ldarg.0 + IL_0016: stloc.2 + IL_0017: ldloc.2 + IL_0018: isinst EqualsOnUnions01/U/B + IL_001d: brfalse.s IL_0022 - IL_0025: ldc.i4.1 - IL_0026: br.s IL_0029 + IL_001f: ldc.i4.1 + IL_0020: br.s IL_0023 - IL_0028: ldc.i4.0 - IL_0029: stloc.1 - IL_002a: ldloc.0 - IL_002b: stloc.s V_4 - IL_002d: ldloc.s V_4 - IL_002f: isinst EqualsOnUnions01/U/B - IL_0034: brfalse.s IL_0039 + IL_0022: ldc.i4.0 + IL_0023: stloc.1 + IL_0024: ldloc.0 + IL_0025: stloc.s V_4 + IL_0027: ldloc.s V_4 + IL_0029: isinst EqualsOnUnions01/U/B + IL_002e: brfalse.s IL_0033 - IL_0036: ldc.i4.1 - IL_0037: br.s IL_003a + IL_0030: ldc.i4.1 + IL_0031: br.s IL_0034 - IL_0039: ldc.i4.0 - IL_003a: stloc.3 + IL_0033: ldc.i4.0 + IL_0034: stloc.3 .line 100001,100001 : 0,0 '' - IL_003b: ldloc.1 - IL_003c: ldloc.3 - IL_003d: bne.un.s IL_007d + IL_0035: ldloc.1 + IL_0036: ldloc.3 + IL_0037: bne.un.s IL_0077 .line 100001,100001 : 0,0 '' - IL_003f: ldarg.0 - IL_0040: isinst EqualsOnUnions01/U/B - IL_0045: brfalse.s IL_007b + IL_0039: ldarg.0 + IL_003a: isinst EqualsOnUnions01/U/B + IL_003f: brfalse.s IL_0075 .line 100001,100001 : 0,0 '' - IL_0047: ldarg.0 - IL_0048: castclass EqualsOnUnions01/U/B - IL_004d: stloc.s V_5 - IL_004f: ldloc.0 - IL_0050: castclass EqualsOnUnions01/U/B - IL_0055: stloc.s V_6 - IL_0057: ldarg.2 - IL_0058: stloc.s V_7 - IL_005a: ldloc.s V_5 - IL_005c: ldfld int32 EqualsOnUnions01/U/B::item - IL_0061: stloc.s V_8 - IL_0063: ldloc.s V_6 - IL_0065: ldfld int32 EqualsOnUnions01/U/B::item - IL_006a: stloc.s V_9 + IL_0041: ldarg.0 + IL_0042: castclass EqualsOnUnions01/U/B + IL_0047: stloc.s V_5 + IL_0049: ldloc.0 + IL_004a: castclass EqualsOnUnions01/U/B + IL_004f: stloc.s V_6 + IL_0051: ldarg.2 + IL_0052: stloc.s V_7 + IL_0054: ldloc.s V_5 + IL_0056: ldfld int32 EqualsOnUnions01/U/B::item + IL_005b: stloc.s V_8 + IL_005d: ldloc.s V_6 + IL_005f: ldfld int32 EqualsOnUnions01/U/B::item + IL_0064: stloc.s V_9 .line 100001,100001 : 0,0 '' - IL_006c: ldloc.s V_8 - IL_006e: ldloc.s V_9 - IL_0070: bge.s IL_0074 + IL_0066: ldloc.s V_8 + IL_0068: ldloc.s V_9 + IL_006a: bge.s IL_006e .line 100001,100001 : 0,0 '' - IL_0072: ldc.i4.m1 - IL_0073: ret + IL_006c: ldc.i4.m1 + IL_006d: ret .line 100001,100001 : 0,0 '' - IL_0074: ldloc.s V_8 - IL_0076: ldloc.s V_9 - IL_0078: cgt - IL_007a: ret + IL_006e: ldloc.s V_8 + IL_0070: ldloc.s V_9 + IL_0072: cgt + IL_0074: ret .line 100001,100001 : 0,0 '' - IL_007b: ldc.i4.0 - IL_007c: ret + IL_0075: ldc.i4.0 + IL_0076: ret .line 100001,100001 : 0,0 '' - IL_007d: ldloc.1 - IL_007e: ldloc.3 - IL_007f: sub - IL_0080: ret + IL_0077: ldloc.1 + IL_0078: ldloc.3 + IL_0079: sub + IL_007a: ret .line 100001,100001 : 0,0 '' - IL_0081: ldc.i4.1 - IL_0082: ret + IL_007b: ldc.i4.1 + IL_007c: ret .line 100001,100001 : 0,0 '' - IL_0083: ldarg.1 - IL_0084: unbox.any EqualsOnUnions01/U - IL_0089: ldnull - IL_008a: cgt.un - IL_008c: brfalse.s IL_0090 + IL_007d: ldarg.1 + IL_007e: unbox.any EqualsOnUnions01/U + IL_0083: brfalse.s IL_0087 .line 100001,100001 : 0,0 '' - IL_008e: ldc.i4.m1 - IL_008f: ret + IL_0085: ldc.i4.m1 + IL_0086: ret .line 100001,100001 : 0,0 '' - IL_0090: ldc.i4.0 - IL_0091: ret + IL_0087: ldc.i4.0 + IL_0088: ret } // end of method U::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 67 (0x43) + // Code size 64 (0x40) .maxstack 7 .locals init ([0] int32 V_0, [1] class EqualsOnUnions01/U/B V_1, @@ -607,58 +595,56 @@ [3] class EqualsOnUnions01/U V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0041 + IL_0001: brfalse.s IL_003e .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: isinst EqualsOnUnions01/U/B - IL_000e: brfalse.s IL_0032 - - .line 100001,100001 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: castclass EqualsOnUnions01/U/B - IL_0016: stloc.1 - IL_0017: ldc.i4.1 - IL_0018: stloc.0 - IL_0019: ldc.i4 0x9e3779b9 - IL_001e: ldarg.1 - IL_001f: stloc.2 - IL_0020: ldloc.1 - IL_0021: ldfld int32 EqualsOnUnions01/U/B::item + IL_0005: ldarg.0 + IL_0006: isinst EqualsOnUnions01/U/B + IL_000b: brfalse.s IL_002f + + .line 100001,100001 : 0,0 '' + IL_000d: ldarg.0 + IL_000e: castclass EqualsOnUnions01/U/B + IL_0013: stloc.1 + IL_0014: ldc.i4.1 + IL_0015: stloc.0 + IL_0016: ldc.i4 0x9e3779b9 + IL_001b: ldarg.1 + IL_001c: stloc.2 + IL_001d: ldloc.1 + IL_001e: ldfld int32 EqualsOnUnions01/U/B::item + IL_0023: ldloc.0 + IL_0024: ldc.i4.6 + IL_0025: shl IL_0026: ldloc.0 - IL_0027: ldc.i4.6 - IL_0028: shl - IL_0029: ldloc.0 - IL_002a: ldc.i4.2 - IL_002b: shr - IL_002c: add - IL_002d: add - IL_002e: add - IL_002f: stloc.0 - IL_0030: ldloc.0 - IL_0031: ret - - .line 100001,100001 : 0,0 '' - IL_0032: ldarg.0 - IL_0033: stloc.3 - IL_0034: ldloc.3 - IL_0035: isinst EqualsOnUnions01/U/B - IL_003a: brfalse.s IL_003f - - IL_003c: ldc.i4.1 - IL_003d: br.s IL_0040 - - IL_003f: ldc.i4.0 - IL_0040: ret - - .line 100001,100001 : 0,0 '' - IL_0041: ldc.i4.0 - IL_0042: ret + IL_0027: ldc.i4.2 + IL_0028: shr + IL_0029: add + IL_002a: add + IL_002b: add + IL_002c: stloc.0 + IL_002d: ldloc.0 + IL_002e: ret + + .line 100001,100001 : 0,0 '' + IL_002f: ldarg.0 + IL_0030: stloc.3 + IL_0031: ldloc.3 + IL_0032: isinst EqualsOnUnions01/U/B + IL_0037: brfalse.s IL_003c + + IL_0039: ldc.i4.1 + IL_003a: br.s IL_003d + + IL_003c: ldc.i4.0 + IL_003d: ret + + .line 100001,100001 : 0,0 '' + IL_003e: ldc.i4.0 + IL_003f: ret } // end of method U::GetHashCode .method public hidebysig virtual final @@ -678,7 +664,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 114 (0x72) + // Code size 111 (0x6f) .maxstack 4 .locals init ([0] class EqualsOnUnions01/U V_0, [1] class EqualsOnUnions01/U V_1, @@ -691,95 +677,93 @@ [8] class [mscorlib]System.Collections.IEqualityComparer V_8) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006a + IL_0001: brfalse.s IL_0067 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst EqualsOnUnions01/U - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst EqualsOnUnions01/U + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0068 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0065 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: stloc.3 - IL_0014: ldloc.3 - IL_0015: isinst EqualsOnUnions01/U/B - IL_001a: brfalse.s IL_001f - - IL_001c: ldc.i4.1 - IL_001d: br.s IL_0020 - - IL_001f: ldc.i4.0 - IL_0020: stloc.2 - IL_0021: ldloc.1 - IL_0022: stloc.s V_5 - IL_0024: ldloc.s V_5 - IL_0026: isinst EqualsOnUnions01/U/B - IL_002b: brfalse.s IL_0030 - - IL_002d: ldc.i4.1 - IL_002e: br.s IL_0031 - - IL_0030: ldc.i4.0 - IL_0031: stloc.s V_4 - .line 100001,100001 : 0,0 '' - IL_0033: ldloc.2 - IL_0034: ldloc.s V_4 - IL_0036: bne.un.s IL_0066 + IL_000d: ldloc.0 + IL_000e: stloc.1 + IL_000f: ldarg.0 + IL_0010: stloc.3 + IL_0011: ldloc.3 + IL_0012: isinst EqualsOnUnions01/U/B + IL_0017: brfalse.s IL_001c - .line 100001,100001 : 0,0 '' - IL_0038: ldarg.0 - IL_0039: isinst EqualsOnUnions01/U/B - IL_003e: brfalse.s IL_0064 + IL_0019: ldc.i4.1 + IL_001a: br.s IL_001d - .line 100001,100001 : 0,0 '' - IL_0040: ldarg.0 - IL_0041: castclass EqualsOnUnions01/U/B - IL_0046: stloc.s V_6 - IL_0048: ldloc.1 - IL_0049: castclass EqualsOnUnions01/U/B - IL_004e: stloc.s V_7 - IL_0050: ldarg.2 - IL_0051: stloc.s V_8 - IL_0053: ldloc.s V_6 - IL_0055: ldfld int32 EqualsOnUnions01/U/B::item - IL_005a: ldloc.s V_7 - IL_005c: ldfld int32 EqualsOnUnions01/U/B::item - IL_0061: ceq - IL_0063: ret + IL_001c: ldc.i4.0 + IL_001d: stloc.2 + IL_001e: ldloc.1 + IL_001f: stloc.s V_5 + IL_0021: ldloc.s V_5 + IL_0023: isinst EqualsOnUnions01/U/B + IL_0028: brfalse.s IL_002d + + IL_002a: ldc.i4.1 + IL_002b: br.s IL_002e + + IL_002d: ldc.i4.0 + IL_002e: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_0030: ldloc.2 + IL_0031: ldloc.s V_4 + IL_0033: bne.un.s IL_0063 + + .line 100001,100001 : 0,0 '' + IL_0035: ldarg.0 + IL_0036: isinst EqualsOnUnions01/U/B + IL_003b: brfalse.s IL_0061 + + .line 100001,100001 : 0,0 '' + IL_003d: ldarg.0 + IL_003e: castclass EqualsOnUnions01/U/B + IL_0043: stloc.s V_6 + IL_0045: ldloc.1 + IL_0046: castclass EqualsOnUnions01/U/B + IL_004b: stloc.s V_7 + IL_004d: ldarg.2 + IL_004e: stloc.s V_8 + IL_0050: ldloc.s V_6 + IL_0052: ldfld int32 EqualsOnUnions01/U/B::item + IL_0057: ldloc.s V_7 + IL_0059: ldfld int32 EqualsOnUnions01/U/B::item + IL_005e: ceq + IL_0060: ret .line 100001,100001 : 0,0 '' - IL_0064: ldc.i4.1 - IL_0065: ret + IL_0061: ldc.i4.1 + IL_0062: ret .line 100001,100001 : 0,0 '' - IL_0066: ldc.i4.0 - IL_0067: ret + IL_0063: ldc.i4.0 + IL_0064: ret .line 100001,100001 : 0,0 '' - IL_0068: ldc.i4.0 - IL_0069: ret + IL_0065: ldc.i4.0 + IL_0066: ret .line 100001,100001 : 0,0 '' - IL_006a: ldarg.1 - IL_006b: ldnull - IL_006c: cgt.un - IL_006e: ldc.i4.0 - IL_006f: ceq - IL_0071: ret + IL_0067: ldarg.1 + IL_0068: ldnull + IL_0069: cgt.un + IL_006b: ldc.i4.0 + IL_006c: ceq + IL_006e: ret } // end of method U::Equals .method public hidebysig virtual final instance bool Equals(class EqualsOnUnions01/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 101 (0x65) + // Code size 95 (0x5f) .maxstack 4 .locals init ([0] int32 V_0, [1] class EqualsOnUnions01/U V_1, @@ -789,82 +773,78 @@ [5] class EqualsOnUnions01/U/B V_5) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_005d + IL_0001: brfalse.s IL_0057 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_005b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0055 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: stloc.1 - IL_000e: ldloc.1 - IL_000f: isinst EqualsOnUnions01/U/B - IL_0014: brfalse.s IL_0019 + IL_0006: ldarg.0 + IL_0007: stloc.1 + IL_0008: ldloc.1 + IL_0009: isinst EqualsOnUnions01/U/B + IL_000e: brfalse.s IL_0013 - IL_0016: ldc.i4.1 - IL_0017: br.s IL_001a + IL_0010: ldc.i4.1 + IL_0011: br.s IL_0014 - IL_0019: ldc.i4.0 - IL_001a: stloc.0 - IL_001b: ldarg.1 - IL_001c: stloc.3 - IL_001d: ldloc.3 - IL_001e: isinst EqualsOnUnions01/U/B - IL_0023: brfalse.s IL_0028 - - IL_0025: ldc.i4.1 - IL_0026: br.s IL_0029 - - IL_0028: ldc.i4.0 - IL_0029: stloc.2 - .line 100001,100001 : 0,0 '' - IL_002a: ldloc.0 - IL_002b: ldloc.2 - IL_002c: bne.un.s IL_0059 - - .line 100001,100001 : 0,0 '' - IL_002e: ldarg.0 - IL_002f: isinst EqualsOnUnions01/U/B - IL_0034: brfalse.s IL_0057 - - .line 100001,100001 : 0,0 '' - IL_0036: ldarg.0 - IL_0037: castclass EqualsOnUnions01/U/B - IL_003c: stloc.s V_4 - IL_003e: ldarg.1 - IL_003f: castclass EqualsOnUnions01/U/B - IL_0044: stloc.s V_5 - IL_0046: ldloc.s V_4 - IL_0048: ldfld int32 EqualsOnUnions01/U/B::item - IL_004d: ldloc.s V_5 - IL_004f: ldfld int32 EqualsOnUnions01/U/B::item - IL_0054: ceq - IL_0056: ret + IL_0013: ldc.i4.0 + IL_0014: stloc.0 + IL_0015: ldarg.1 + IL_0016: stloc.3 + IL_0017: ldloc.3 + IL_0018: isinst EqualsOnUnions01/U/B + IL_001d: brfalse.s IL_0022 + + IL_001f: ldc.i4.1 + IL_0020: br.s IL_0023 + IL_0022: ldc.i4.0 + IL_0023: stloc.2 .line 100001,100001 : 0,0 '' - IL_0057: ldc.i4.1 - IL_0058: ret + IL_0024: ldloc.0 + IL_0025: ldloc.2 + IL_0026: bne.un.s IL_0053 .line 100001,100001 : 0,0 '' - IL_0059: ldc.i4.0 - IL_005a: ret + IL_0028: ldarg.0 + IL_0029: isinst EqualsOnUnions01/U/B + IL_002e: brfalse.s IL_0051 .line 100001,100001 : 0,0 '' - IL_005b: ldc.i4.0 - IL_005c: ret + IL_0030: ldarg.0 + IL_0031: castclass EqualsOnUnions01/U/B + IL_0036: stloc.s V_4 + IL_0038: ldarg.1 + IL_0039: castclass EqualsOnUnions01/U/B + IL_003e: stloc.s V_5 + IL_0040: ldloc.s V_4 + IL_0042: ldfld int32 EqualsOnUnions01/U/B::item + IL_0047: ldloc.s V_5 + IL_0049: ldfld int32 EqualsOnUnions01/U/B::item + IL_004e: ceq + IL_0050: ret .line 100001,100001 : 0,0 '' - IL_005d: ldarg.1 - IL_005e: ldnull - IL_005f: cgt.un - IL_0061: ldc.i4.0 - IL_0062: ceq - IL_0064: ret + IL_0051: ldc.i4.1 + IL_0052: ret + + .line 100001,100001 : 0,0 '' + IL_0053: ldc.i4.0 + IL_0054: ret + + .line 100001,100001 : 0,0 '' + IL_0055: ldc.i4.0 + IL_0056: ret + + .line 100001,100001 : 0,0 '' + IL_0057: ldarg.1 + IL_0058: ldnull + IL_0059: cgt.un + IL_005b: ldc.i4.0 + IL_005c: ceq + IL_005e: ret } // end of method U::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop01.il.bsl index e8e857034c9..04d6481ef46 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x00000050 } .module ForLoop01.exe -// MVID: {61EFEC5E-1795-791C-A745-03835EECEF61} +// MVID: {6220E156-1795-791C-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06810000 +// Image base: 0x07270000 // =============== CLASS MEMBERS DECLARATION =================== @@ -63,7 +63,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 74 (0x4a) + // Code size 71 (0x47) .maxstack 5 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -84,30 +84,28 @@ IL_0019: stloc.1 .line 5,5 : 8,10 '' IL_001a: ldloc.1 - IL_001b: ldnull - IL_001c: cgt.un - IL_001e: brfalse.s IL_0049 + IL_001b: brfalse.s IL_0046 - IL_0020: ldloc.0 - IL_0021: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0026: stloc.2 + IL_001d: ldloc.0 + IL_001e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0023: stloc.2 .line 6,6 : 4,19 '' - IL_0027: ldstr "%A" - IL_002c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) - IL_0031: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0036: ldloc.2 - IL_0037: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_003c: pop - IL_003d: ldloc.1 - IL_003e: stloc.0 - IL_003f: ldloc.0 - IL_0040: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0045: stloc.1 + IL_0024: ldstr "%A" + IL_0029: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) + IL_002e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0033: ldloc.2 + IL_0034: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0039: pop + IL_003a: ldloc.1 + IL_003b: stloc.0 + IL_003c: ldloc.0 + IL_003d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0042: stloc.1 .line 100001,100001 : 0,0 '' - IL_0046: nop - IL_0047: br.s IL_001a + IL_0043: nop + IL_0044: br.s IL_001a - IL_0049: ret + IL_0046: ret } // end of method $ForLoop01::main@ } // end of class ''.$ForLoop01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl index 35320fbb8c0..5af2e0c6969 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000690 Length: 0x000001F4 } .module GeneralizationOnUnions01.exe -// MVID: {61E07031-4CA2-8CD1-A745-03833170E061} +// MVID: {6220E156-4CA2-8CD1-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x070E0000 +// Image base: 0x07190000 // =============== CLASS MEMBERS DECLARATION =================== @@ -145,42 +145,36 @@ instance int32 CompareTo(class GeneralizationOnUnions01/Weirdo obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 26 (0x1a) + // Code size 17 (0x11) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\GeneralizationOnUnions01.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0010 + IL_0001: brfalse.s IL_000a .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_000e + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0008 .line 100001,100001 : 0,0 '' - IL_000c: ldc.i4.0 - IL_000d: ret + IL_0006: ldc.i4.0 + IL_0007: ret .line 100001,100001 : 0,0 '' - IL_000e: ldc.i4.1 - IL_000f: ret + IL_0008: ldc.i4.1 + IL_0009: ret .line 100001,100001 : 0,0 '' - IL_0010: ldarg.1 - IL_0011: ldnull - IL_0012: cgt.un - IL_0014: brfalse.s IL_0018 + IL_000a: ldarg.1 + IL_000b: brfalse.s IL_000f .line 100001,100001 : 0,0 '' - IL_0016: ldc.i4.m1 - IL_0017: ret + IL_000d: ldc.i4.m1 + IL_000e: ret .line 100001,100001 : 0,0 '' - IL_0018: ldc.i4.0 - IL_0019: ret + IL_000f: ldc.i4.0 + IL_0010: ret } // end of method Weirdo::CompareTo .method public hidebysig virtual final @@ -201,7 +195,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 34 (0x22) .maxstack 3 .locals init ([0] class GeneralizationOnUnions01/Weirdo V_0) .line 100001,100001 : 0,0 '' @@ -210,65 +204,57 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_001c + IL_0008: brfalse.s IL_0016 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any GeneralizationOnUnions01/Weirdo - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_001a + IL_000a: ldarg.1 + IL_000b: unbox.any GeneralizationOnUnions01/Weirdo + IL_0010: brfalse.s IL_0014 .line 100001,100001 : 0,0 '' - IL_0018: ldc.i4.0 - IL_0019: ret + IL_0012: ldc.i4.0 + IL_0013: ret .line 100001,100001 : 0,0 '' - IL_001a: ldc.i4.1 - IL_001b: ret + IL_0014: ldc.i4.1 + IL_0015: ret .line 100001,100001 : 0,0 '' - IL_001c: ldarg.1 - IL_001d: unbox.any GeneralizationOnUnions01/Weirdo - IL_0022: ldnull - IL_0023: cgt.un - IL_0025: brfalse.s IL_0029 + IL_0016: ldarg.1 + IL_0017: unbox.any GeneralizationOnUnions01/Weirdo + IL_001c: brfalse.s IL_0020 .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.m1 - IL_0028: ret + IL_001e: ldc.i4.m1 + IL_001f: ret .line 100001,100001 : 0,0 '' - IL_0029: ldc.i4.0 - IL_002a: ret + IL_0020: ldc.i4.0 + IL_0021: ret } // end of method Weirdo::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 14 (0xe) + // Code size 11 (0xb) .maxstack 3 .locals init ([0] int32 V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_000c + IL_0001: brfalse.s IL_0009 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: pop - IL_000a: ldc.i4.0 - IL_000b: ret + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: pop + IL_0007: ldc.i4.0 + IL_0008: ret .line 100001,100001 : 0,0 '' - IL_000c: ldc.i4.0 - IL_000d: ret + IL_0009: ldc.i4.0 + IL_000a: ret } // end of method Weirdo::GetHashCode .method public hidebysig virtual final @@ -288,68 +274,64 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 30 (0x1e) + // Code size 27 (0x1b) .maxstack 4 .locals init ([0] class GeneralizationOnUnions01/Weirdo V_0, [1] class GeneralizationOnUnions01/Weirdo V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0016 + IL_0001: brfalse.s IL_0013 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst GeneralizationOnUnions01/Weirdo - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst GeneralizationOnUnions01/Weirdo + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0014 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0011 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldc.i4.1 - IL_0013: ret + IL_000d: ldloc.0 + IL_000e: stloc.1 + IL_000f: ldc.i4.1 + IL_0010: ret .line 100001,100001 : 0,0 '' - IL_0014: ldc.i4.0 - IL_0015: ret + IL_0011: ldc.i4.0 + IL_0012: ret .line 100001,100001 : 0,0 '' - IL_0016: ldarg.1 - IL_0017: ldnull - IL_0018: cgt.un - IL_001a: ldc.i4.0 - IL_001b: ceq - IL_001d: ret + IL_0013: ldarg.1 + IL_0014: ldnull + IL_0015: cgt.un + IL_0017: ldc.i4.0 + IL_0018: ceq + IL_001a: ret } // end of method Weirdo::Equals .method public hidebysig virtual final instance bool Equals(class GeneralizationOnUnions01/Weirdo obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 19 (0x13) + // Code size 16 (0x10) .maxstack 8 .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_000b + IL_0001: brfalse.s IL_0008 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: ret + IL_0003: ldarg.1 + IL_0004: ldnull + IL_0005: cgt.un + IL_0007: ret .line 100001,100001 : 0,0 '' - IL_000b: ldarg.1 - IL_000c: ldnull - IL_000d: cgt.un - IL_000f: ldc.i4.0 - IL_0010: ceq - IL_0012: ret + IL_0008: ldarg.1 + IL_0009: ldnull + IL_000a: cgt.un + IL_000c: ldc.i4.0 + IL_000d: ceq + IL_000f: ret } // end of method Weirdo::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl index c8603a78df6..f5998d14fb7 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl @@ -50,13 +50,13 @@ // Offset: 0x000005F0 Length: 0x00000211 } .module Linq101Aggregates01.exe -// MVID: {61FD32BA-D281-4783-A745-0383BA32FD61} +// MVID: {6220E157-D281-4783-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05570000 +// Image base: 0x067C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -193,7 +193,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -277,16 +277,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #1 input at line 11@12'::Close .method public strict virtual instance bool @@ -489,7 +487,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -573,16 +571,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method numSum@21::Close .method public strict virtual instance bool @@ -823,7 +819,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -907,16 +903,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method totalChars@30::Close .method public strict virtual instance bool @@ -1284,7 +1278,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1368,16 +1362,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method sum@42::Close .method public strict virtual instance bool @@ -1795,7 +1787,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1879,16 +1871,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method minNum@49::Close .method public strict virtual instance bool @@ -2129,7 +2119,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -2213,16 +2203,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method shortestWord@52::Close .method public strict virtual instance bool @@ -2590,7 +2578,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -2674,16 +2662,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method min@59::Close .method public strict virtual instance bool @@ -3185,7 +3171,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -3269,16 +3255,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method cheapestProducts@69::Close .method public strict virtual instance bool @@ -3653,7 +3637,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -3737,16 +3721,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method maxNum@74::Close .method public strict virtual instance bool @@ -3987,7 +3969,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -4071,16 +4053,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method longestLength@77::Close .method public strict virtual instance bool @@ -4448,7 +4428,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -4532,16 +4512,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method mostExpensivePrice@84::Close .method public strict virtual instance bool @@ -5025,7 +5003,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -5109,16 +5087,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method maxPrice@93::Close .method public strict virtual instance bool @@ -5370,7 +5346,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -5454,16 +5430,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method mostExpensiveProducts@94::Close .method public strict virtual instance bool @@ -5844,7 +5818,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 135 (0x87) + // Code size 132 (0x84) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -5928,16 +5902,14 @@ .line 100001,100001 : 0,0 '' IL_007e: ldloc.0 - IL_007f: ldnull - IL_0080: cgt.un - IL_0082: brfalse.s IL_0086 + IL_007f: brfalse.s IL_0083 .line 100001,100001 : 0,0 '' - IL_0084: ldloc.0 - IL_0085: throw + IL_0081: ldloc.0 + IL_0082: throw .line 100001,100001 : 0,0 '' - IL_0086: ret + IL_0083: ret } // end of method averageNum@100::Close .method public strict virtual instance bool @@ -6406,7 +6378,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -6490,16 +6462,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method averagePrice@115::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl index d87ae14159c..449fc70b7f1 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x00000388 Length: 0x00000127 } .module Linq101ElementOperators01.exe -// MVID: {61F2D6A6-19D7-C20D-A745-0383A6D6F261} +// MVID: {6220E157-19D7-C20D-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07130000 +// Image base: 0x06AB0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -188,7 +188,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -272,16 +272,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method products12@12::Close .method public strict virtual instance bool @@ -525,7 +523,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -609,16 +607,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method startsWithO@22::Close .method public strict virtual instance bool @@ -863,7 +859,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -947,16 +943,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method firstNumOrDefault@31::Close .method public strict virtual instance bool @@ -1159,7 +1153,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1243,16 +1237,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method fourthLowNum@52::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl index 55a7e663c2d..188edf08cb3 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl @@ -40,13 +40,13 @@ // Offset: 0x000003B8 Length: 0x00000134 } .module Linq101Ordering01.exe -// MVID: {61FD32BA-649A-6956-A745-0383BA32FD61} +// MVID: {6220E157-649A-6956-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x051E0000 +// Image base: 0x072B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -183,7 +183,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -267,16 +267,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #1 input at line 10@11'::Close .method public strict virtual instance bool @@ -517,7 +515,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -601,16 +599,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #2 input at line 17@18'::Close .method public strict virtual instance bool @@ -972,7 +968,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1056,16 +1052,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #4 input at line 43@44'::Close .method public strict virtual instance bool @@ -1308,7 +1302,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1392,16 +1386,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #5 input at line 51@52'::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl index dc9761089b4..71a8db12ddb 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x000003D8 Length: 0x00000138 } .module Linq101Partitioning01.exe -// MVID: {61FD32BA-B280-A6A2-A745-0383BA32FD61} +// MVID: {6220E157-B280-A6A2-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06E50000 +// Image base: 0x06F10000 // =============== CLASS MEMBERS DECLARATION =================== @@ -188,7 +188,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -272,16 +272,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #1 input at line 11@12'::Close .method public strict virtual instance bool @@ -693,7 +691,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -777,16 +775,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #3 input at line 28@29'::Close .method public strict virtual instance bool @@ -1198,7 +1194,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1282,16 +1278,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #5 input at line 44@45'::Close .method public strict virtual instance bool @@ -1534,7 +1528,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1618,16 +1612,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #6 input at line 51@52'::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl index cee73d81f73..e316390f8b9 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x00000398 Length: 0x000000FF } .module Linq101Quantifiers01.exe -// MVID: {61FD32BA-76DD-E373-A745-0383BA32FD61} +// MVID: {6220E157-76DD-E373-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07130000 +// Image base: 0x06B00000 // =============== CLASS MEMBERS DECLARATION =================== @@ -188,7 +188,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -272,16 +272,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method iAfterE@12::Close .method public strict virtual instance bool @@ -790,7 +788,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -874,16 +872,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method onlyOdd@32::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl index d8b2b469cfb..3cbe05caa2d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x00000648 Length: 0x00000204 } .module Linq101Select01.exe -// MVID: {61FD32BA-6057-8F80-A745-0383BA32FD61} +// MVID: {6220E157-6057-8F80-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05A30000 +// Image base: 0x06B30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -233,7 +233,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -317,16 +317,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #1 input at line 11@13'::Close .method public strict virtual instance bool @@ -573,7 +571,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -657,16 +655,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method productNames@22::Close .method public strict virtual instance bool @@ -914,7 +910,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -998,16 +994,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #2 input at line 28@30'::Close .method public strict virtual instance bool @@ -1258,7 +1252,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1342,16 +1336,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #3 input at line 37@39'::Close .method public strict virtual instance bool @@ -1606,7 +1598,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1690,16 +1682,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #4 input at line 44@46'::Close .method public strict virtual instance bool @@ -1953,7 +1943,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -2037,16 +2027,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #5 input at line 51@53'::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl index 4976371674b..bcbe15932b0 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x00000390 Length: 0x0000011E } .module Linq101SetOperators01.exe -// MVID: {61FD32BA-4EE5-349F-A745-0383BA32FD61} +// MVID: {6220E157-4EE5-349F-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05B90000 +// Image base: 0x06AA0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -188,7 +188,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -272,16 +272,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #1 input at line 12@13'::Close .method public strict virtual instance bool @@ -528,7 +526,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -612,16 +610,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #2 input at line 21@23'::Close .method public strict virtual instance bool @@ -870,7 +866,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -954,16 +950,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method productFirstChars@33::Close .method public strict virtual instance bool @@ -1212,7 +1206,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1296,16 +1290,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method customerFirstChars@39::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl index aecbaf18528..6c802eefced 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl @@ -45,13 +45,13 @@ // Offset: 0x000003D0 Length: 0x0000012E } .module Linq101Where01.exe -// MVID: {61FD32BA-FF23-CD21-A745-0383BA32FD61} +// MVID: {6220E157-FF23-CD21-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05C80000 +// Image base: 0x05850000 // =============== CLASS MEMBERS DECLARATION =================== @@ -735,7 +735,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 127 (0x7f) + // Code size 124 (0x7c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -819,16 +819,14 @@ .line 100001,100001 : 0,0 '' IL_0076: ldloc.0 - IL_0077: ldnull - IL_0078: cgt.un - IL_007a: brfalse.s IL_007e + IL_0077: brfalse.s IL_007b .line 100001,100001 : 0,0 '' - IL_007c: ldloc.0 - IL_007d: throw + IL_0079: ldloc.0 + IL_007a: throw .line 100001,100001 : 0,0 '' - IL_007e: ret + IL_007b: ret } // end of method 'Pipe #3 input at line 50@52'::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl index d8d9b87bf50..08c5cbfced7 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000AD } .module SeqExpressionSteppingTest5.exe -// MVID: {61FD4A6D-2432-9401-A745-03836D4AFD61} +// MVID: {6220E157-2432-9401-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06FD0000 +// Image base: 0x06920000 // =============== CLASS MEMBERS DECLARATION =================== @@ -213,7 +213,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 156 (0x9c) + // Code size 153 (0x99) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -313,16 +313,14 @@ .line 100001,100001 : 0,0 '' IL_0093: ldloc.0 - IL_0094: ldnull - IL_0095: cgt.un - IL_0097: brfalse.s IL_009b + IL_0094: brfalse.s IL_0098 .line 100001,100001 : 0,0 '' - IL_0099: ldloc.0 - IL_009a: throw + IL_0096: ldloc.0 + IL_0097: throw .line 100001,100001 : 0,0 '' - IL_009b: ret + IL_0098: ret } // end of method f4@5::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl index 619f85c4a5c..b7cbd0c93ee 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000002A0 Length: 0x000000BA } .module SeqExpressionSteppingTest6.exe -// MVID: {61FD4A6D-2432-94A2-A745-03836D4AFD61} +// MVID: {6220E157-2432-94A2-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06F10000 +// Image base: 0x06B60000 // =============== CLASS MEMBERS DECLARATION =================== @@ -252,7 +252,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 167 (0xa7) + // Code size 164 (0xa4) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -359,16 +359,14 @@ .line 100001,100001 : 0,0 '' IL_009e: ldloc.0 - IL_009f: ldnull - IL_00a0: cgt.un - IL_00a2: brfalse.s IL_00a6 + IL_009f: brfalse.s IL_00a3 .line 100001,100001 : 0,0 '' - IL_00a4: ldloc.0 - IL_00a5: throw + IL_00a1: ldloc.0 + IL_00a2: throw .line 100001,100001 : 0,0 '' - IL_00a6: ret + IL_00a3: ret } // end of method f7@6::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl index fb5d62e1ea4..29bf52bb2da 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000858 Length: 0x000003BA } .module SeqExpressionSteppingTest7.exe -// MVID: {61FD4A6D-2432-93C3-A745-03836D4AFD61} +// MVID: {6220E157-2432-93C3-A745-038357E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07240000 +// Image base: 0x05050000 // =============== CLASS MEMBERS DECLARATION =================== @@ -313,7 +313,7 @@ .method public static void testSimpleForEachListLoopWithOneStatement(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed { - // Code size 51 (0x33) + // Code size 48 (0x30) .maxstack 4 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -326,34 +326,32 @@ IL_0008: stloc.1 .line 28,28 : 11,13 '' IL_0009: ldloc.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse.s IL_0032 + IL_000a: brfalse.s IL_002f - IL_000f: ldloc.0 - IL_0010: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0015: stloc.2 + IL_000c: ldloc.0 + IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0012: stloc.2 .line 29,29 : 8,42 '' - IL_0016: ldstr "{0}" - IL_001b: ldloc.2 - IL_001c: box [mscorlib]System.Int32 - IL_0021: call void [mscorlib]System.Console::WriteLine(string, + IL_0013: ldstr "{0}" + IL_0018: ldloc.2 + IL_0019: box [mscorlib]System.Int32 + IL_001e: call void [mscorlib]System.Console::WriteLine(string, object) - IL_0026: ldloc.1 - IL_0027: stloc.0 - IL_0028: ldloc.0 - IL_0029: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_002e: stloc.1 + IL_0023: ldloc.1 + IL_0024: stloc.0 + IL_0025: ldloc.0 + IL_0026: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_002b: stloc.1 .line 100001,100001 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0009 + IL_002c: nop + IL_002d: br.s IL_0009 - IL_0032: ret + IL_002f: ret } // end of method SeqExpressionSteppingTest7::testSimpleForEachListLoopWithOneStatement .method public static void testSimpleForEachListLoopWithTwoStatements(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed { - // Code size 67 (0x43) + // Code size 64 (0x40) .maxstack 4 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -366,35 +364,33 @@ IL_0008: stloc.1 .line 32,32 : 11,13 '' IL_0009: ldloc.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse.s IL_0042 + IL_000a: brfalse.s IL_003f - IL_000f: ldloc.0 - IL_0010: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0015: stloc.2 + IL_000c: ldloc.0 + IL_000d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0012: stloc.2 .line 33,33 : 8,42 '' - IL_0016: ldstr "{0}" - IL_001b: ldloc.2 - IL_001c: box [mscorlib]System.Int32 - IL_0021: call void [mscorlib]System.Console::WriteLine(string, + IL_0013: ldstr "{0}" + IL_0018: ldloc.2 + IL_0019: box [mscorlib]System.Int32 + IL_001e: call void [mscorlib]System.Console::WriteLine(string, object) .line 34,34 : 8,42 '' - IL_0026: ldstr "{0}" - IL_002b: ldloc.2 - IL_002c: box [mscorlib]System.Int32 - IL_0031: call void [mscorlib]System.Console::WriteLine(string, + IL_0023: ldstr "{0}" + IL_0028: ldloc.2 + IL_0029: box [mscorlib]System.Int32 + IL_002e: call void [mscorlib]System.Console::WriteLine(string, object) - IL_0036: ldloc.1 - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003e: stloc.1 + IL_0033: ldloc.1 + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003b: stloc.1 .line 100001,100001 : 0,0 '' - IL_003f: nop - IL_0040: br.s IL_0009 + IL_003c: nop + IL_003d: br.s IL_0009 - IL_0042: ret + IL_003f: ret } // end of method SeqExpressionSteppingTest7::testSimpleForEachListLoopWithTwoStatements .method public static void testSimpleForEachIntRangeLoopWithOneStatement(int32 start, diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule-preview.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule-preview.il.bsl index 65eff8c5e03..62d954ac355 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule-preview.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule-preview.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00001158 Length: 0x00000405 } .module 'TopLevelModule-preview.dll' -// MVID: {621F796D-A1E9-C7BD-A745-03836D791F62} +// MVID: {6220E471-A1E9-C7BD-A745-038371E42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06FA0000 +// Image base: 0x06870000 // =============== CLASS MEMBERS DECLARATION =================== @@ -151,7 +151,7 @@ instance int32 CompareTo(class ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1, @@ -161,64 +161,58 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SerializableAttribute\\ToplevelModule.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 ABC/Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 ABC/Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 ABC/Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -239,7 +233,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1, @@ -253,115 +247,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any ABC/Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any ABC/Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 ABC/Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 ABC/Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 ABC/Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 ABC/Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any ABC/Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any ABC/Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 ABC/Expr::item + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -381,7 +367,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1, @@ -390,97 +376,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst ABC/Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst ABC/Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 ABC/Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 ABC/Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 ABC/Expr::item + IL_0012: ldloc.1 IL_0013: ldfld int32 ABC/Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -598,41 +578,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass ABC/MyExn - IL_0015: call instance int32 ABC/MyExn::get_Data0() + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass ABC/MyExn + IL_0012: call instance int32 ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl IL_001a: ldloc.0 - IL_001b: ldc.i4.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -652,7 +630,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 70 (0x46) + // Code size 67 (0x43) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, @@ -660,112 +638,106 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003e + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003c + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: isinst ABC/MyExn - IL_001a: ldnull - IL_001b: cgt.un - IL_001d: brfalse.s IL_003a + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst ABC/MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' - IL_001f: ldarg.2 - IL_0020: stloc.3 - IL_0021: ldarg.0 - IL_0022: castclass ABC/MyExn - IL_0027: call instance int32 ABC/MyExn::get_Data0() - IL_002c: ldloc.1 - IL_002d: castclass ABC/MyExn - IL_0032: call instance int32 ABC/MyExn::get_Data0() - IL_0037: ceq - IL_0039: ret + IL_001c: ldarg.2 + IL_001d: stloc.3 + IL_001e: ldarg.0 + IL_001f: castclass ABC/MyExn + IL_0024: call instance int32 ABC/MyExn::get_Data0() + IL_0029: ldloc.1 + IL_002a: castclass ABC/MyExn + IL_002f: call instance int32 ABC/MyExn::get_Data0() + IL_0034: ceq + IL_0036: ret .line 100001,100001 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.0 - IL_003d: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003e: ldarg.1 - IL_003f: ldnull - IL_0040: cgt.un - IL_0042: ldc.i4.0 - IL_0043: ceq - IL_0045: ret + IL_003b: ldarg.1 + IL_003c: ldnull + IL_003d: cgt.un + IL_003f: ldc.i4.0 + IL_0040: ceq + IL_0042: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 62 (0x3e) + // Code size 56 (0x38) .maxstack 4 .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 + + .line 100001,100001 : 0,0 '' + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 - - .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: isinst ABC/MyExn - IL_0014: ldnull - IL_0015: cgt.un - IL_0017: brfalse.s IL_0032 - - .line 100001,100001 : 0,0 '' - IL_0019: ldarg.0 - IL_001a: castclass ABC/MyExn - IL_001f: call instance int32 ABC/MyExn::get_Data0() - IL_0024: ldarg.1 - IL_0025: castclass ABC/MyExn - IL_002a: call instance int32 ABC/MyExn::get_Data0() - IL_002f: ceq - IL_0031: ret + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst ABC/MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0013: ldarg.0 + IL_0014: castclass ABC/MyExn + IL_0019: call instance int32 ABC/MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass ABC/MyExn + IL_0024: call instance int32 ABC/MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: ldc.i4.0 - IL_003b: ceq - IL_003d: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -944,7 +916,7 @@ instance int32 CompareTo(class ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1, @@ -953,64 +925,58 @@ [4] int32 V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 ABC/ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 ABC/ABC/Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 ABC/ABC/Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 ABC/ABC/Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1031,7 +997,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1, @@ -1045,115 +1011,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any ABC/ABC/Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any ABC/ABC/Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 ABC/ABC/Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 ABC/ABC/Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 ABC/ABC/Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 ABC/ABC/Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any ABC/ABC/Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any ABC/ABC/Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class ABC/ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 ABC/ABC/Expr::item + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 ABC/ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1173,7 +1131,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1, @@ -1182,97 +1140,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst ABC/ABC/Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst ABC/ABC/Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 ABC/ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 ABC/ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 ABC/ABC/Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 ABC/ABC/Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 ABC/ABC/Expr::item + IL_0012: ldloc.1 IL_0013: ldfld int32 ABC/ABC/Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 ABC/ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -1390,41 +1342,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass ABC/ABC/MyExn - IL_0015: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass ABC/ABC/MyExn + IL_0012: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl IL_001a: ldloc.0 - IL_001b: ldc.i4.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -1444,7 +1394,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 70 (0x46) + // Code size 67 (0x43) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, @@ -1452,112 +1402,106 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003e + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003c + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: isinst ABC/ABC/MyExn - IL_001a: ldnull - IL_001b: cgt.un - IL_001d: brfalse.s IL_003a + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst ABC/ABC/MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' - IL_001f: ldarg.2 - IL_0020: stloc.3 - IL_0021: ldarg.0 - IL_0022: castclass ABC/ABC/MyExn - IL_0027: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_002c: ldloc.1 - IL_002d: castclass ABC/ABC/MyExn - IL_0032: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0037: ceq - IL_0039: ret + IL_001c: ldarg.2 + IL_001d: stloc.3 + IL_001e: ldarg.0 + IL_001f: castclass ABC/ABC/MyExn + IL_0024: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0029: ldloc.1 + IL_002a: castclass ABC/ABC/MyExn + IL_002f: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0034: ceq + IL_0036: ret .line 100001,100001 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.0 - IL_003d: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003e: ldarg.1 - IL_003f: ldnull - IL_0040: cgt.un - IL_0042: ldc.i4.0 - IL_0043: ceq - IL_0045: ret + IL_003b: ldarg.1 + IL_003c: ldnull + IL_003d: cgt.un + IL_003f: ldc.i4.0 + IL_0040: ceq + IL_0042: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 62 (0x3e) + // Code size 56 (0x38) .maxstack 4 .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 + + .line 100001,100001 : 0,0 '' + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 - - .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: isinst ABC/ABC/MyExn - IL_0014: ldnull - IL_0015: cgt.un - IL_0017: brfalse.s IL_0032 - - .line 100001,100001 : 0,0 '' - IL_0019: ldarg.0 - IL_001a: castclass ABC/ABC/MyExn - IL_001f: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0024: ldarg.1 - IL_0025: castclass ABC/ABC/MyExn - IL_002a: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_002f: ceq - IL_0031: ret + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst ABC/ABC/MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0013: ldarg.0 + IL_0014: castclass ABC/ABC/MyExn + IL_0019: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass ABC/ABC/MyExn + IL_0024: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: ldc.i4.0 - IL_003b: ceq - IL_003d: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl index 37b1ecd0840..62506a71d24 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00001148 Length: 0x000003FD } .module TopLevelModule.dll -// MVID: {621F7967-37F5-C118-A745-038367791F62} +// MVID: {6220E46D-37F5-C118-A745-03836DE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06FB0000 +// Image base: 0x06C10000 // =============== CLASS MEMBERS DECLARATION =================== @@ -151,7 +151,7 @@ instance int32 CompareTo(class ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1, @@ -161,64 +161,58 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SerializableAttribute\\ToplevelModule.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 ABC/Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 ABC/Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 ABC/Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -239,7 +233,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1, @@ -253,115 +247,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any ABC/Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any ABC/Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 ABC/Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 ABC/Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 ABC/Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 ABC/Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any ABC/Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any ABC/Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 ABC/Expr::item + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -381,7 +367,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1, @@ -390,97 +376,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst ABC/Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst ABC/Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 ABC/Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 ABC/Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 ABC/Expr::item + IL_0012: ldloc.1 IL_0013: ldfld int32 ABC/Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -584,41 +564,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass ABC/MyExn - IL_0015: call instance int32 ABC/MyExn::get_Data0() + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass ABC/MyExn + IL_0012: call instance int32 ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl IL_001a: ldloc.0 - IL_001b: ldc.i4.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -638,7 +616,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 70 (0x46) + // Code size 67 (0x43) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, @@ -646,112 +624,106 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003e + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003c + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: isinst ABC/MyExn - IL_001a: ldnull - IL_001b: cgt.un - IL_001d: brfalse.s IL_003a + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst ABC/MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' - IL_001f: ldarg.2 - IL_0020: stloc.3 - IL_0021: ldarg.0 - IL_0022: castclass ABC/MyExn - IL_0027: call instance int32 ABC/MyExn::get_Data0() - IL_002c: ldloc.1 - IL_002d: castclass ABC/MyExn - IL_0032: call instance int32 ABC/MyExn::get_Data0() - IL_0037: ceq - IL_0039: ret + IL_001c: ldarg.2 + IL_001d: stloc.3 + IL_001e: ldarg.0 + IL_001f: castclass ABC/MyExn + IL_0024: call instance int32 ABC/MyExn::get_Data0() + IL_0029: ldloc.1 + IL_002a: castclass ABC/MyExn + IL_002f: call instance int32 ABC/MyExn::get_Data0() + IL_0034: ceq + IL_0036: ret .line 100001,100001 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.0 - IL_003d: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003e: ldarg.1 - IL_003f: ldnull - IL_0040: cgt.un - IL_0042: ldc.i4.0 - IL_0043: ceq - IL_0045: ret + IL_003b: ldarg.1 + IL_003c: ldnull + IL_003d: cgt.un + IL_003f: ldc.i4.0 + IL_0040: ceq + IL_0042: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 62 (0x3e) + // Code size 56 (0x38) .maxstack 4 .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 + + .line 100001,100001 : 0,0 '' + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 - - .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: isinst ABC/MyExn - IL_0014: ldnull - IL_0015: cgt.un - IL_0017: brfalse.s IL_0032 - - .line 100001,100001 : 0,0 '' - IL_0019: ldarg.0 - IL_001a: castclass ABC/MyExn - IL_001f: call instance int32 ABC/MyExn::get_Data0() - IL_0024: ldarg.1 - IL_0025: castclass ABC/MyExn - IL_002a: call instance int32 ABC/MyExn::get_Data0() - IL_002f: ceq - IL_0031: ret + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst ABC/MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0013: ldarg.0 + IL_0014: castclass ABC/MyExn + IL_0019: call instance int32 ABC/MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass ABC/MyExn + IL_0024: call instance int32 ABC/MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: ldc.i4.0 - IL_003b: ceq - IL_003d: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -930,7 +902,7 @@ instance int32 CompareTo(class ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1, @@ -939,64 +911,58 @@ [4] int32 V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 ABC/ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 ABC/ABC/Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 ABC/ABC/Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 ABC/ABC/Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1017,7 +983,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1, @@ -1031,115 +997,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any ABC/ABC/Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any ABC/ABC/Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 ABC/ABC/Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 ABC/ABC/Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 ABC/ABC/Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 ABC/ABC/Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any ABC/ABC/Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any ABC/ABC/Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class ABC/ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 ABC/ABC/Expr::item + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 ABC/ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1159,7 +1117,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1, @@ -1168,97 +1126,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst ABC/ABC/Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst ABC/ABC/Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 ABC/ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 ABC/ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 ABC/ABC/Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 ABC/ABC/Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0, [1] class ABC/ABC/Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 ABC/ABC/Expr::item + IL_0012: ldloc.1 IL_0013: ldfld int32 ABC/ABC/Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 ABC/ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -1362,41 +1314,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass ABC/ABC/MyExn - IL_0015: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass ABC/ABC/MyExn + IL_0012: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl IL_001a: ldloc.0 - IL_001b: ldc.i4.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -1416,7 +1366,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 70 (0x46) + // Code size 67 (0x43) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, @@ -1424,112 +1374,106 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003e + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003c + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: isinst ABC/ABC/MyExn - IL_001a: ldnull - IL_001b: cgt.un - IL_001d: brfalse.s IL_003a + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst ABC/ABC/MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' - IL_001f: ldarg.2 - IL_0020: stloc.3 - IL_0021: ldarg.0 - IL_0022: castclass ABC/ABC/MyExn - IL_0027: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_002c: ldloc.1 - IL_002d: castclass ABC/ABC/MyExn - IL_0032: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0037: ceq - IL_0039: ret + IL_001c: ldarg.2 + IL_001d: stloc.3 + IL_001e: ldarg.0 + IL_001f: castclass ABC/ABC/MyExn + IL_0024: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0029: ldloc.1 + IL_002a: castclass ABC/ABC/MyExn + IL_002f: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0034: ceq + IL_0036: ret .line 100001,100001 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.0 - IL_003d: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003e: ldarg.1 - IL_003f: ldnull - IL_0040: cgt.un - IL_0042: ldc.i4.0 - IL_0043: ceq - IL_0045: ret + IL_003b: ldarg.1 + IL_003c: ldnull + IL_003d: cgt.un + IL_003f: ldc.i4.0 + IL_0040: ceq + IL_0042: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 62 (0x3e) + // Code size 56 (0x38) .maxstack 4 .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 + + .line 100001,100001 : 0,0 '' + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 - - .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: isinst ABC/ABC/MyExn - IL_0014: ldnull - IL_0015: cgt.un - IL_0017: brfalse.s IL_0032 - - .line 100001,100001 : 0,0 '' - IL_0019: ldarg.0 - IL_001a: castclass ABC/ABC/MyExn - IL_001f: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_0024: ldarg.1 - IL_0025: castclass ABC/ABC/MyExn - IL_002a: call instance int32 ABC/ABC/MyExn::get_Data0() - IL_002f: ceq - IL_0031: ret + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst ABC/ABC/MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0013: ldarg.0 + IL_0014: castclass ABC/ABC/MyExn + IL_0019: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass ABC/ABC/MyExn + IL_0024: call instance int32 ABC/ABC/MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: ldc.i4.0 - IL_003b: ceq - IL_003d: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace-preview.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace-preview.il.bsl index c9283f43a6d..7deda04c06d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace-preview.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace-preview.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00001860 Length: 0x00000564 } .module 'ToplevelNamespace-preview.dll' -// MVID: {621F7970-96BA-B011-A745-038370791F62} +// MVID: {6220E473-96BA-B011-A745-038373E42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06FB0000 +// Image base: 0x06A50000 // =============== CLASS MEMBERS DECLARATION =================== @@ -146,7 +146,7 @@ instance int32 CompareTo(class XYZ.Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1, @@ -156,64 +156,58 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SerializableAttribute\\ToplevelNamespace.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 XYZ.Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 XYZ.Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 XYZ.Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 XYZ.Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -234,7 +228,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1, @@ -248,115 +242,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any XYZ.Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any XYZ.Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 XYZ.Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 XYZ.Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 XYZ.Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 XYZ.Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any XYZ.Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any XYZ.Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class XYZ.Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 XYZ.Expr::item + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -376,7 +362,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1, @@ -385,97 +371,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst XYZ.Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst XYZ.Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 XYZ.Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 XYZ.Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 XYZ.Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 XYZ.Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class XYZ.Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 XYZ.Expr::item + IL_0012: ldloc.1 IL_0013: ldfld int32 XYZ.Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 XYZ.Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -593,41 +573,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass XYZ.MyExn - IL_0015: call instance int32 XYZ.MyExn::get_Data0() + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.MyExn + IL_0012: call instance int32 XYZ.MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl IL_001a: ldloc.0 - IL_001b: ldc.i4.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -647,7 +625,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 70 (0x46) + // Code size 67 (0x43) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, @@ -655,112 +633,106 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003e + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003c + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: isinst XYZ.MyExn - IL_001a: ldnull - IL_001b: cgt.un - IL_001d: brfalse.s IL_003a + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst XYZ.MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' - IL_001f: ldarg.2 - IL_0020: stloc.3 - IL_0021: ldarg.0 - IL_0022: castclass XYZ.MyExn - IL_0027: call instance int32 XYZ.MyExn::get_Data0() - IL_002c: ldloc.1 - IL_002d: castclass XYZ.MyExn - IL_0032: call instance int32 XYZ.MyExn::get_Data0() - IL_0037: ceq - IL_0039: ret + IL_001c: ldarg.2 + IL_001d: stloc.3 + IL_001e: ldarg.0 + IL_001f: castclass XYZ.MyExn + IL_0024: call instance int32 XYZ.MyExn::get_Data0() + IL_0029: ldloc.1 + IL_002a: castclass XYZ.MyExn + IL_002f: call instance int32 XYZ.MyExn::get_Data0() + IL_0034: ceq + IL_0036: ret .line 100001,100001 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.0 - IL_003d: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003e: ldarg.1 - IL_003f: ldnull - IL_0040: cgt.un - IL_0042: ldc.i4.0 - IL_0043: ceq - IL_0045: ret + IL_003b: ldarg.1 + IL_003c: ldnull + IL_003d: cgt.un + IL_003f: ldc.i4.0 + IL_0040: ceq + IL_0042: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 62 (0x3e) + // Code size 56 (0x38) .maxstack 4 .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 + + .line 100001,100001 : 0,0 '' + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 - - .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: isinst XYZ.MyExn - IL_0014: ldnull - IL_0015: cgt.un - IL_0017: brfalse.s IL_0032 - - .line 100001,100001 : 0,0 '' - IL_0019: ldarg.0 - IL_001a: castclass XYZ.MyExn - IL_001f: call instance int32 XYZ.MyExn::get_Data0() - IL_0024: ldarg.1 - IL_0025: castclass XYZ.MyExn - IL_002a: call instance int32 XYZ.MyExn::get_Data0() - IL_002f: ceq - IL_0031: ret + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst XYZ.MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0013: ldarg.0 + IL_0014: castclass XYZ.MyExn + IL_0019: call instance int32 XYZ.MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass XYZ.MyExn + IL_0024: call instance int32 XYZ.MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: ldc.i4.0 - IL_003b: ceq - IL_003d: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -939,7 +911,7 @@ instance int32 CompareTo(class XYZ.ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1, @@ -948,64 +920,58 @@ [4] int32 V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 XYZ.ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 XYZ.ABC/Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 XYZ.ABC/Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 XYZ.ABC/Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1026,7 +992,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1, @@ -1040,115 +1006,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any XYZ.ABC/Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any XYZ.ABC/Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 XYZ.ABC/Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 XYZ.ABC/Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 XYZ.ABC/Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 XYZ.ABC/Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any XYZ.ABC/Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any XYZ.ABC/Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class XYZ.ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 XYZ.ABC/Expr::item + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1168,7 +1126,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1, @@ -1177,97 +1135,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst XYZ.ABC/Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst XYZ.ABC/Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 XYZ.ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 XYZ.ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 XYZ.ABC/Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 XYZ.ABC/Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class XYZ.ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 XYZ.ABC/Expr::item + IL_0012: ldloc.1 IL_0013: ldfld int32 XYZ.ABC/Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 XYZ.ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -1385,41 +1337,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass XYZ.ABC/MyExn - IL_0015: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.ABC/MyExn + IL_0012: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl IL_001a: ldloc.0 - IL_001b: ldc.i4.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -1439,7 +1389,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 70 (0x46) + // Code size 67 (0x43) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, @@ -1447,112 +1397,106 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003e + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003c + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: isinst XYZ.ABC/MyExn - IL_001a: ldnull - IL_001b: cgt.un - IL_001d: brfalse.s IL_003a + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst XYZ.ABC/MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' - IL_001f: ldarg.2 - IL_0020: stloc.3 - IL_0021: ldarg.0 - IL_0022: castclass XYZ.ABC/MyExn - IL_0027: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_002c: ldloc.1 - IL_002d: castclass XYZ.ABC/MyExn - IL_0032: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0037: ceq - IL_0039: ret + IL_001c: ldarg.2 + IL_001d: stloc.3 + IL_001e: ldarg.0 + IL_001f: castclass XYZ.ABC/MyExn + IL_0024: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0029: ldloc.1 + IL_002a: castclass XYZ.ABC/MyExn + IL_002f: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0034: ceq + IL_0036: ret .line 100001,100001 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.0 - IL_003d: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003e: ldarg.1 - IL_003f: ldnull - IL_0040: cgt.un - IL_0042: ldc.i4.0 - IL_0043: ceq - IL_0045: ret + IL_003b: ldarg.1 + IL_003c: ldnull + IL_003d: cgt.un + IL_003f: ldc.i4.0 + IL_0040: ceq + IL_0042: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 62 (0x3e) + // Code size 56 (0x38) .maxstack 4 .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 + + .line 100001,100001 : 0,0 '' + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 - - .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: isinst XYZ.ABC/MyExn - IL_0014: ldnull - IL_0015: cgt.un - IL_0017: brfalse.s IL_0032 - - .line 100001,100001 : 0,0 '' - IL_0019: ldarg.0 - IL_001a: castclass XYZ.ABC/MyExn - IL_001f: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0024: ldarg.1 - IL_0025: castclass XYZ.ABC/MyExn - IL_002a: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_002f: ceq - IL_0031: ret + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst XYZ.ABC/MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0013: ldarg.0 + IL_0014: castclass XYZ.ABC/MyExn + IL_0019: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass XYZ.ABC/MyExn + IL_0024: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: ldc.i4.0 - IL_003b: ceq - IL_003d: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -1731,7 +1675,7 @@ instance int32 CompareTo(class XYZ.ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1, @@ -1740,64 +1684,58 @@ [4] int32 V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1818,7 +1756,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1, @@ -1832,115 +1770,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any XYZ.ABC/ABC/Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any XYZ.ABC/ABC/Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any XYZ.ABC/ABC/Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any XYZ.ABC/ABC/Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class XYZ.ABC/ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1960,7 +1890,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1, @@ -1969,97 +1899,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst XYZ.ABC/ABC/Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst XYZ.ABC/ABC/Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class XYZ.ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0012: ldloc.1 IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -2177,41 +2101,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass XYZ.ABC/ABC/MyExn - IL_0015: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.ABC/ABC/MyExn + IL_0012: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl IL_001a: ldloc.0 - IL_001b: ldc.i4.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -2231,7 +2153,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 70 (0x46) + // Code size 67 (0x43) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, @@ -2239,112 +2161,106 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003e + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003c + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: isinst XYZ.ABC/ABC/MyExn - IL_001a: ldnull - IL_001b: cgt.un - IL_001d: brfalse.s IL_003a + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst XYZ.ABC/ABC/MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' - IL_001f: ldarg.2 - IL_0020: stloc.3 - IL_0021: ldarg.0 - IL_0022: castclass XYZ.ABC/ABC/MyExn - IL_0027: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_002c: ldloc.1 - IL_002d: castclass XYZ.ABC/ABC/MyExn - IL_0032: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0037: ceq - IL_0039: ret + IL_001c: ldarg.2 + IL_001d: stloc.3 + IL_001e: ldarg.0 + IL_001f: castclass XYZ.ABC/ABC/MyExn + IL_0024: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0029: ldloc.1 + IL_002a: castclass XYZ.ABC/ABC/MyExn + IL_002f: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0034: ceq + IL_0036: ret .line 100001,100001 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.0 - IL_003d: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003e: ldarg.1 - IL_003f: ldnull - IL_0040: cgt.un - IL_0042: ldc.i4.0 - IL_0043: ceq - IL_0045: ret + IL_003b: ldarg.1 + IL_003c: ldnull + IL_003d: cgt.un + IL_003f: ldc.i4.0 + IL_0040: ceq + IL_0042: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 62 (0x3e) + // Code size 56 (0x38) .maxstack 4 .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 + + .line 100001,100001 : 0,0 '' + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 - - .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: isinst XYZ.ABC/ABC/MyExn - IL_0014: ldnull - IL_0015: cgt.un - IL_0017: brfalse.s IL_0032 - - .line 100001,100001 : 0,0 '' - IL_0019: ldarg.0 - IL_001a: castclass XYZ.ABC/ABC/MyExn - IL_001f: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0024: ldarg.1 - IL_0025: castclass XYZ.ABC/ABC/MyExn - IL_002a: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_002f: ceq - IL_0031: ret + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst XYZ.ABC/ABC/MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0013: ldarg.0 + IL_0014: castclass XYZ.ABC/ABC/MyExn + IL_0019: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass XYZ.ABC/ABC/MyExn + IL_0024: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: ldc.i4.0 - IL_003b: ceq - IL_003d: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl index 0a43fab3392..25ca4618741 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00001850 Length: 0x0000055C } .module ToplevelNamespace.dll -// MVID: {621F796A-218B-729A-A745-03836A791F62} +// MVID: {6220E46F-218B-729A-A745-03836FE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07440000 +// Image base: 0x05570000 // =============== CLASS MEMBERS DECLARATION =================== @@ -146,7 +146,7 @@ instance int32 CompareTo(class XYZ.Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1, @@ -156,64 +156,58 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SerializableAttribute\\ToplevelNamespace.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 XYZ.Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 XYZ.Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 XYZ.Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 XYZ.Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -234,7 +228,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1, @@ -248,115 +242,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any XYZ.Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any XYZ.Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 XYZ.Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 XYZ.Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 XYZ.Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 XYZ.Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any XYZ.Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any XYZ.Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class XYZ.Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 XYZ.Expr::item + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -376,7 +362,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1, @@ -385,97 +371,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst XYZ.Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst XYZ.Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 XYZ.Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 XYZ.Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 XYZ.Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 XYZ.Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class XYZ.Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 XYZ.Expr::item + IL_0012: ldloc.1 IL_0013: ldfld int32 XYZ.Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 XYZ.Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -579,41 +559,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass XYZ.MyExn - IL_0015: call instance int32 XYZ.MyExn::get_Data0() + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.MyExn + IL_0012: call instance int32 XYZ.MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl IL_001a: ldloc.0 - IL_001b: ldc.i4.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -633,7 +611,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 70 (0x46) + // Code size 67 (0x43) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, @@ -641,112 +619,106 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003e + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003c + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: isinst XYZ.MyExn - IL_001a: ldnull - IL_001b: cgt.un - IL_001d: brfalse.s IL_003a + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst XYZ.MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' - IL_001f: ldarg.2 - IL_0020: stloc.3 - IL_0021: ldarg.0 - IL_0022: castclass XYZ.MyExn - IL_0027: call instance int32 XYZ.MyExn::get_Data0() - IL_002c: ldloc.1 - IL_002d: castclass XYZ.MyExn - IL_0032: call instance int32 XYZ.MyExn::get_Data0() - IL_0037: ceq - IL_0039: ret + IL_001c: ldarg.2 + IL_001d: stloc.3 + IL_001e: ldarg.0 + IL_001f: castclass XYZ.MyExn + IL_0024: call instance int32 XYZ.MyExn::get_Data0() + IL_0029: ldloc.1 + IL_002a: castclass XYZ.MyExn + IL_002f: call instance int32 XYZ.MyExn::get_Data0() + IL_0034: ceq + IL_0036: ret .line 100001,100001 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.0 - IL_003d: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003e: ldarg.1 - IL_003f: ldnull - IL_0040: cgt.un - IL_0042: ldc.i4.0 - IL_0043: ceq - IL_0045: ret + IL_003b: ldarg.1 + IL_003c: ldnull + IL_003d: cgt.un + IL_003f: ldc.i4.0 + IL_0040: ceq + IL_0042: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 62 (0x3e) + // Code size 56 (0x38) .maxstack 4 .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 + + .line 100001,100001 : 0,0 '' + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 - - .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: isinst XYZ.MyExn - IL_0014: ldnull - IL_0015: cgt.un - IL_0017: brfalse.s IL_0032 - - .line 100001,100001 : 0,0 '' - IL_0019: ldarg.0 - IL_001a: castclass XYZ.MyExn - IL_001f: call instance int32 XYZ.MyExn::get_Data0() - IL_0024: ldarg.1 - IL_0025: castclass XYZ.MyExn - IL_002a: call instance int32 XYZ.MyExn::get_Data0() - IL_002f: ceq - IL_0031: ret + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst XYZ.MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0013: ldarg.0 + IL_0014: castclass XYZ.MyExn + IL_0019: call instance int32 XYZ.MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass XYZ.MyExn + IL_0024: call instance int32 XYZ.MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: ldc.i4.0 - IL_003b: ceq - IL_003d: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -925,7 +897,7 @@ instance int32 CompareTo(class XYZ.ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1, @@ -934,64 +906,58 @@ [4] int32 V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 XYZ.ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 XYZ.ABC/Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 XYZ.ABC/Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 XYZ.ABC/Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1012,7 +978,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1, @@ -1026,115 +992,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any XYZ.ABC/Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any XYZ.ABC/Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 XYZ.ABC/Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 XYZ.ABC/Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 XYZ.ABC/Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 XYZ.ABC/Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any XYZ.ABC/Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any XYZ.ABC/Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class XYZ.ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 XYZ.ABC/Expr::item + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1154,7 +1112,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1, @@ -1163,97 +1121,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst XYZ.ABC/Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst XYZ.ABC/Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 XYZ.ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 XYZ.ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 XYZ.ABC/Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 XYZ.ABC/Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class XYZ.ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0, [1] class XYZ.ABC/Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 XYZ.ABC/Expr::item + IL_0012: ldloc.1 IL_0013: ldfld int32 XYZ.ABC/Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 XYZ.ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -1357,41 +1309,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass XYZ.ABC/MyExn - IL_0015: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.ABC/MyExn + IL_0012: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl IL_001a: ldloc.0 - IL_001b: ldc.i4.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -1411,7 +1361,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 70 (0x46) + // Code size 67 (0x43) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, @@ -1419,112 +1369,106 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003e + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003c + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: isinst XYZ.ABC/MyExn - IL_001a: ldnull - IL_001b: cgt.un - IL_001d: brfalse.s IL_003a + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst XYZ.ABC/MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' - IL_001f: ldarg.2 - IL_0020: stloc.3 - IL_0021: ldarg.0 - IL_0022: castclass XYZ.ABC/MyExn - IL_0027: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_002c: ldloc.1 - IL_002d: castclass XYZ.ABC/MyExn - IL_0032: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0037: ceq - IL_0039: ret + IL_001c: ldarg.2 + IL_001d: stloc.3 + IL_001e: ldarg.0 + IL_001f: castclass XYZ.ABC/MyExn + IL_0024: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0029: ldloc.1 + IL_002a: castclass XYZ.ABC/MyExn + IL_002f: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0034: ceq + IL_0036: ret .line 100001,100001 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.0 - IL_003d: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003e: ldarg.1 - IL_003f: ldnull - IL_0040: cgt.un - IL_0042: ldc.i4.0 - IL_0043: ceq - IL_0045: ret + IL_003b: ldarg.1 + IL_003c: ldnull + IL_003d: cgt.un + IL_003f: ldc.i4.0 + IL_0040: ceq + IL_0042: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 62 (0x3e) + // Code size 56 (0x38) .maxstack 4 .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 + + .line 100001,100001 : 0,0 '' + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 - - .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: isinst XYZ.ABC/MyExn - IL_0014: ldnull - IL_0015: cgt.un - IL_0017: brfalse.s IL_0032 - - .line 100001,100001 : 0,0 '' - IL_0019: ldarg.0 - IL_001a: castclass XYZ.ABC/MyExn - IL_001f: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_0024: ldarg.1 - IL_0025: castclass XYZ.ABC/MyExn - IL_002a: call instance int32 XYZ.ABC/MyExn::get_Data0() - IL_002f: ceq - IL_0031: ret + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst XYZ.ABC/MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0013: ldarg.0 + IL_0014: castclass XYZ.ABC/MyExn + IL_0019: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass XYZ.ABC/MyExn + IL_0024: call instance int32 XYZ.ABC/MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: ldc.i4.0 - IL_003b: ceq - IL_003d: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -1703,7 +1647,7 @@ instance int32 CompareTo(class XYZ.ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 55 (0x37) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1, @@ -1712,64 +1656,58 @@ [4] int32 V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.2 - IL_0018: ldloc.0 - IL_0019: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_001e: stloc.3 - IL_001f: ldloc.1 - IL_0020: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0025: stloc.s V_4 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.2 + IL_0012: ldloc.0 + IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0018: stloc.3 + IL_0019: ldloc.1 + IL_001a: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_001f: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0027: ldloc.3 - IL_0028: ldloc.s V_4 - IL_002a: bge.s IL_002e + IL_0021: ldloc.3 + IL_0022: ldloc.s V_4 + IL_0024: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0026: ldc.i4.m1 + IL_0027: ret .line 100001,100001 : 0,0 '' - IL_002e: ldloc.3 - IL_002f: ldloc.s V_4 - IL_0031: cgt - IL_0033: ret + IL_0028: ldloc.3 + IL_0029: ldloc.s V_4 + IL_002b: cgt + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.1 - IL_0035: ret + IL_002e: ldc.i4.1 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: brfalse.s IL_003e + IL_0030: ldarg.1 + IL_0031: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.m1 - IL_003d: ret + IL_0033: ldc.i4.m1 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1790,7 +1728,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 80 (0x50) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1, @@ -1804,115 +1742,107 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0041 + IL_0008: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any XYZ.ABC/ABC/Expr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_003f + IL_000a: ldarg.1 + IL_000b: unbox.any XYZ.ABC/ABC/Expr + IL_0010: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.3 - IL_0020: ldloc.1 - IL_0021: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_002e: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.3 + IL_001a: ldloc.1 + IL_001b: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0020: stloc.s V_4 + IL_0022: ldloc.2 + IL_0023: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0028: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0030: ldloc.s V_4 - IL_0032: ldloc.s V_5 - IL_0034: bge.s IL_0038 + IL_002a: ldloc.s V_4 + IL_002c: ldloc.s V_5 + IL_002e: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.m1 - IL_0037: ret + IL_0030: ldc.i4.m1 + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt - IL_003e: ret + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.1 - IL_0040: ret + IL_0039: ldc.i4.1 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: unbox.any XYZ.ABC/ABC/Expr - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: brfalse.s IL_004e + IL_003b: ldarg.1 + IL_003c: unbox.any XYZ.ABC/ABC/Expr + IL_0041: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_004c: ldc.i4.m1 - IL_004d: ret + IL_0043: ldc.i4.m1 + IL_0044: ret .line 100001,100001 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_0045: ldc.i4.0 + IL_0046: ret } // end of method Expr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 7 .locals init ([0] int32 V_0, [1] class XYZ.ABC/ABC/Expr V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldloc.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0024: ldc.i4.0 + IL_0025: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1932,7 +1862,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 52 (0x34) + // Code size 49 (0x31) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1, @@ -1941,97 +1871,91 @@ [4] class [mscorlib]System.Collections.IEqualityComparer V_4) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002c + IL_0001: brfalse.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst XYZ.ABC/ABC/Expr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst XYZ.ABC/ABC/Expr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002a + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0021: ldloc.3 - IL_0022: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0027: ceq - IL_0029: ret + IL_000f: ldarg.0 + IL_0010: pop + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_001e: ldloc.3 + IL_001f: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0024: ceq + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0027: ldc.i4.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002c: ldarg.1 - IL_002d: ldnull - IL_002e: cgt.un - IL_0030: ldc.i4.0 - IL_0031: ceq - IL_0033: ret + IL_0029: ldarg.1 + IL_002a: ldnull + IL_002b: cgt.un + IL_002d: ldc.i4.0 + IL_002e: ceq + IL_0030: ret } // end of method Expr::Equals .method public hidebysig virtual final instance bool Equals(class XYZ.ABC/ABC/Expr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 43 (0x2b) + // Code size 37 (0x25) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0, [1] class XYZ.ABC/ABC/Expr V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0023 + IL_0001: brfalse.s IL_001d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0021 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: ldloc.0 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldloc.0 + IL_000d: ldfld int32 XYZ.ABC/ABC/Expr::item + IL_0012: ldloc.1 IL_0013: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_0018: ldloc.1 - IL_0019: ldfld int32 XYZ.ABC/ABC/Expr::item - IL_001e: ceq - IL_0020: ret + IL_0018: ceq + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldc.i4.0 - IL_0022: ret + IL_001b: ldc.i4.0 + IL_001c: ret .line 100001,100001 : 0,0 '' - IL_0023: ldarg.1 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: ldc.i4.0 - IL_0028: ceq - IL_002a: ret + IL_001d: ldarg.1 + IL_001e: ldnull + IL_001f: cgt.un + IL_0021: ldc.i4.0 + IL_0022: ceq + IL_0024: ret } // end of method Expr::Equals .method public hidebysig virtual final @@ -2135,41 +2059,39 @@ GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 40 (0x28) + // Code size 37 (0x25) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: castclass XYZ.ABC/ABC/MyExn - IL_0015: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: castclass XYZ.ABC/ABC/MyExn + IL_0012: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0017: ldloc.0 + IL_0018: ldc.i4.6 + IL_0019: shl IL_001a: ldloc.0 - IL_001b: ldc.i4.6 - IL_001c: shl - IL_001d: ldloc.0 - IL_001e: ldc.i4.2 - IL_001f: shr - IL_0020: add - IL_0021: add - IL_0022: add - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ret + IL_001b: ldc.i4.2 + IL_001c: shr + IL_001d: add + IL_001e: add + IL_001f: add + IL_0020: stloc.0 + IL_0021: ldloc.0 + IL_0022: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -2189,7 +2111,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 70 (0x46) + // Code size 67 (0x43) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception V_1, @@ -2197,112 +2119,106 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003e + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst [mscorlib]System.Exception - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst [mscorlib]System.Exception + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003c + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: stloc.2 - IL_0014: ldloc.2 - IL_0015: isinst XYZ.ABC/ABC/MyExn - IL_001a: ldnull - IL_001b: cgt.un - IL_001d: brfalse.s IL_003a + IL_000f: ldloc.0 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: isinst XYZ.ABC/ABC/MyExn + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' - IL_001f: ldarg.2 - IL_0020: stloc.3 - IL_0021: ldarg.0 - IL_0022: castclass XYZ.ABC/ABC/MyExn - IL_0027: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_002c: ldloc.1 - IL_002d: castclass XYZ.ABC/ABC/MyExn - IL_0032: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0037: ceq - IL_0039: ret + IL_001c: ldarg.2 + IL_001d: stloc.3 + IL_001e: ldarg.0 + IL_001f: castclass XYZ.ABC/ABC/MyExn + IL_0024: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0029: ldloc.1 + IL_002a: castclass XYZ.ABC/ABC/MyExn + IL_002f: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0034: ceq + IL_0036: ret .line 100001,100001 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.0 - IL_003d: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003e: ldarg.1 - IL_003f: ldnull - IL_0040: cgt.un - IL_0042: ldc.i4.0 - IL_0043: ceq - IL_0045: ret + IL_003b: ldarg.1 + IL_003c: ldnull + IL_003d: cgt.un + IL_003f: ldc.i4.0 + IL_0040: ceq + IL_0042: ret } // end of method MyExn::Equals .method public hidebysig instance bool Equals(class [mscorlib]System.Exception obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 62 (0x3e) + // Code size 56 (0x38) .maxstack 4 .locals init ([0] object V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0036 + IL_0001: brfalse.s IL_0030 + + .line 100001,100001 : 0,0 '' + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002e .line 100001,100001 : 0,0 '' IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0034 - - .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: stloc.0 - IL_000e: ldloc.0 - IL_000f: isinst XYZ.ABC/ABC/MyExn - IL_0014: ldnull - IL_0015: cgt.un - IL_0017: brfalse.s IL_0032 - - .line 100001,100001 : 0,0 '' - IL_0019: ldarg.0 - IL_001a: castclass XYZ.ABC/ABC/MyExn - IL_001f: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_0024: ldarg.1 - IL_0025: castclass XYZ.ABC/ABC/MyExn - IL_002a: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() - IL_002f: ceq - IL_0031: ret + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: isinst XYZ.ABC/ABC/MyExn + IL_000e: ldnull + IL_000f: cgt.un + IL_0011: brfalse.s IL_002c + + .line 100001,100001 : 0,0 '' + IL_0013: ldarg.0 + IL_0014: castclass XYZ.ABC/ABC/MyExn + IL_0019: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_001e: ldarg.1 + IL_001f: castclass XYZ.ABC/ABC/MyExn + IL_0024: call instance int32 XYZ.ABC/ABC/MyExn::get_Data0() + IL_0029: ceq + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_002e: ldc.i4.0 + IL_002f: ret .line 100001,100001 : 0,0 '' - IL_0036: ldarg.1 - IL_0037: ldnull - IL_0038: cgt.un - IL_003a: ldc.i4.0 - IL_003b: ceq - IL_003d: ret + IL_0030: ldarg.1 + IL_0031: ldnull + IL_0032: cgt.un + IL_0034: ldc.i4.0 + IL_0035: ceq + IL_0037: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl index 9a57805b166..7787966afd7 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000680 Length: 0x000001D9 } .module SteppingMatch06.dll -// MVID: {61E07031-4FAE-FD21-A745-03833170E061} +// MVID: {6220E156-4FAE-FD21-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06D40000 +// Image base: 0x06930000 // =============== CLASS MEMBERS DECLARATION =================== @@ -205,62 +205,56 @@ instance int32 CompareTo(class SteppingMatch06/Discr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 48 (0x30) + // Code size 39 (0x27) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch06.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0020 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0024 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 SteppingMatch06/Discr::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 SteppingMatch06/Discr::_tag - IL_0019: stloc.1 + IL_0006: ldarg.0 + IL_0007: ldfld int32 SteppingMatch06/Discr::_tag + IL_000c: stloc.0 + IL_000d: ldarg.1 + IL_000e: ldfld int32 SteppingMatch06/Discr::_tag + IL_0013: stloc.1 .line 100001,100001 : 0,0 '' - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un.s IL_0020 + IL_0014: ldloc.0 + IL_0015: ldloc.1 + IL_0016: bne.un.s IL_001a .line 100001,100001 : 0,0 '' - IL_001e: ldc.i4.0 - IL_001f: ret + IL_0018: ldc.i4.0 + IL_0019: ret .line 100001,100001 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldloc.1 - IL_0022: sub - IL_0023: ret + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: sub + IL_001d: ret .line 100001,100001 : 0,0 '' - IL_0024: ldc.i4.1 - IL_0025: ret + IL_001e: ldc.i4.1 + IL_001f: ret .line 100001,100001 : 0,0 '' - IL_0026: ldarg.1 - IL_0027: ldnull - IL_0028: cgt.un - IL_002a: brfalse.s IL_002e + IL_0020: ldarg.1 + IL_0021: brfalse.s IL_0025 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0023: ldc.i4.m1 + IL_0024: ret .line 100001,100001 : 0,0 '' - IL_002e: ldc.i4.0 - IL_002f: ret + IL_0025: ldc.i4.0 + IL_0026: ret } // end of method Discr::CompareTo .method public hidebysig virtual final @@ -281,7 +275,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 65 (0x41) + // Code size 56 (0x38) .maxstack 4 .locals init ([0] class SteppingMatch06/Discr V_0, [1] int32 V_1, @@ -292,82 +286,74 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0008: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any SteppingMatch06/Discr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0030 + IL_000a: ldarg.1 + IL_000b: unbox.any SteppingMatch06/Discr + IL_0010: brfalse.s IL_002a .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: ldfld int32 SteppingMatch06/Discr::_tag - IL_001e: stloc.1 - IL_001f: ldloc.0 - IL_0020: ldfld int32 SteppingMatch06/Discr::_tag - IL_0025: stloc.2 + IL_0012: ldarg.0 + IL_0013: ldfld int32 SteppingMatch06/Discr::_tag + IL_0018: stloc.1 + IL_0019: ldloc.0 + IL_001a: ldfld int32 SteppingMatch06/Discr::_tag + IL_001f: stloc.2 .line 100001,100001 : 0,0 '' - IL_0026: ldloc.1 - IL_0027: ldloc.2 - IL_0028: bne.un.s IL_002c + IL_0020: ldloc.1 + IL_0021: ldloc.2 + IL_0022: bne.un.s IL_0026 .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0024: ldc.i4.0 + IL_0025: ret .line 100001,100001 : 0,0 '' - IL_002c: ldloc.1 - IL_002d: ldloc.2 - IL_002e: sub - IL_002f: ret + IL_0026: ldloc.1 + IL_0027: ldloc.2 + IL_0028: sub + IL_0029: ret .line 100001,100001 : 0,0 '' - IL_0030: ldc.i4.1 - IL_0031: ret + IL_002a: ldc.i4.1 + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_0032: ldarg.1 - IL_0033: unbox.any SteppingMatch06/Discr - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: brfalse.s IL_003f + IL_002c: ldarg.1 + IL_002d: unbox.any SteppingMatch06/Discr + IL_0032: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.m1 - IL_003e: ret + IL_0034: ldc.i4.m1 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_0036: ldc.i4.0 + IL_0037: ret } // end of method Discr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 17 (0x11) + // Code size 14 (0xe) .maxstack 3 .locals init ([0] int32 V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_000f + IL_0001: brfalse.s IL_000c .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: ldfld int32 SteppingMatch06/Discr::_tag - IL_000e: ret + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: ldfld int32 SteppingMatch06/Discr::_tag + IL_000b: ret .line 100001,100001 : 0,0 '' - IL_000f: ldc.i4.0 - IL_0010: ret + IL_000c: ldc.i4.0 + IL_000d: ret } // end of method Discr::GetHashCode .method public hidebysig virtual final @@ -387,7 +373,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 47 (0x2f) + // Code size 44 (0x2c) .maxstack 4 .locals init ([0] class SteppingMatch06/Discr V_0, [1] class SteppingMatch06/Discr V_1, @@ -395,90 +381,84 @@ [3] int32 V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst SteppingMatch06/Discr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst SteppingMatch06/Discr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0025 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0022 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 SteppingMatch06/Discr::_tag - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld int32 SteppingMatch06/Discr::_tag - IL_001f: stloc.3 + IL_000d: ldloc.0 + IL_000e: stloc.1 + IL_000f: ldarg.0 + IL_0010: ldfld int32 SteppingMatch06/Discr::_tag + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldfld int32 SteppingMatch06/Discr::_tag + IL_001c: stloc.3 .line 100001,100001 : 0,0 '' - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: ceq - IL_0024: ret + IL_001d: ldloc.2 + IL_001e: ldloc.3 + IL_001f: ceq + IL_0021: ret .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.0 - IL_0026: ret + IL_0022: ldc.i4.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0027: ldarg.1 - IL_0028: ldnull - IL_0029: cgt.un - IL_002b: ldc.i4.0 - IL_002c: ceq - IL_002e: ret + IL_0024: ldarg.1 + IL_0025: ldnull + IL_0026: cgt.un + IL_0028: ldc.i4.0 + IL_0029: ceq + IL_002b: ret } // end of method Discr::Equals .method public hidebysig virtual final instance bool Equals(class SteppingMatch06/Discr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 35 (0x23) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0021 + IL_0001: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_001f + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0019 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 SteppingMatch06/Discr::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 SteppingMatch06/Discr::_tag - IL_0019: stloc.1 + IL_0006: ldarg.0 + IL_0007: ldfld int32 SteppingMatch06/Discr::_tag + IL_000c: stloc.0 + IL_000d: ldarg.1 + IL_000e: ldfld int32 SteppingMatch06/Discr::_tag + IL_0013: stloc.1 .line 100001,100001 : 0,0 '' - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: ceq - IL_001e: ret + IL_0014: ldloc.0 + IL_0015: ldloc.1 + IL_0016: ceq + IL_0018: ret .line 100001,100001 : 0,0 '' - IL_001f: ldc.i4.0 - IL_0020: ret + IL_0019: ldc.i4.0 + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldarg.1 - IL_0022: ldnull - IL_0023: cgt.un - IL_0025: ldc.i4.0 - IL_0026: ceq - IL_0028: ret + IL_001b: ldarg.1 + IL_001c: ldnull + IL_001d: cgt.un + IL_001f: ldc.i4.0 + IL_0020: ceq + IL_0022: ret } // end of method Discr::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl index 733e90f336d..14ce575bea5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000680 Length: 0x000001D9 } .module SteppingMatch07.dll -// MVID: {61E07031-D373-07F3-A745-03833170E061} +// MVID: {6220E156-D373-07F3-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x073B0000 +// Image base: 0x05420000 // =============== CLASS MEMBERS DECLARATION =================== @@ -205,62 +205,56 @@ instance int32 CompareTo(class SteppingMatch07/Discr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 48 (0x30) + // Code size 39 (0x27) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\SteppingMatch\\SteppingMatch07.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0026 + IL_0001: brfalse.s IL_0020 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0024 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_001e .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 SteppingMatch07/Discr::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 SteppingMatch07/Discr::_tag - IL_0019: stloc.1 + IL_0006: ldarg.0 + IL_0007: ldfld int32 SteppingMatch07/Discr::_tag + IL_000c: stloc.0 + IL_000d: ldarg.1 + IL_000e: ldfld int32 SteppingMatch07/Discr::_tag + IL_0013: stloc.1 .line 100001,100001 : 0,0 '' - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: bne.un.s IL_0020 + IL_0014: ldloc.0 + IL_0015: ldloc.1 + IL_0016: bne.un.s IL_001a .line 100001,100001 : 0,0 '' - IL_001e: ldc.i4.0 - IL_001f: ret + IL_0018: ldc.i4.0 + IL_0019: ret .line 100001,100001 : 0,0 '' - IL_0020: ldloc.0 - IL_0021: ldloc.1 - IL_0022: sub - IL_0023: ret + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: sub + IL_001d: ret .line 100001,100001 : 0,0 '' - IL_0024: ldc.i4.1 - IL_0025: ret + IL_001e: ldc.i4.1 + IL_001f: ret .line 100001,100001 : 0,0 '' - IL_0026: ldarg.1 - IL_0027: ldnull - IL_0028: cgt.un - IL_002a: brfalse.s IL_002e + IL_0020: ldarg.1 + IL_0021: brfalse.s IL_0025 .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.m1 - IL_002d: ret + IL_0023: ldc.i4.m1 + IL_0024: ret .line 100001,100001 : 0,0 '' - IL_002e: ldc.i4.0 - IL_002f: ret + IL_0025: ldc.i4.0 + IL_0026: ret } // end of method Discr::CompareTo .method public hidebysig virtual final @@ -281,7 +275,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 65 (0x41) + // Code size 56 (0x38) .maxstack 4 .locals init ([0] class SteppingMatch07/Discr V_0, [1] int32 V_1, @@ -292,82 +286,74 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0008: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any SteppingMatch07/Discr - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0030 + IL_000a: ldarg.1 + IL_000b: unbox.any SteppingMatch07/Discr + IL_0010: brfalse.s IL_002a .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: ldfld int32 SteppingMatch07/Discr::_tag - IL_001e: stloc.1 - IL_001f: ldloc.0 - IL_0020: ldfld int32 SteppingMatch07/Discr::_tag - IL_0025: stloc.2 + IL_0012: ldarg.0 + IL_0013: ldfld int32 SteppingMatch07/Discr::_tag + IL_0018: stloc.1 + IL_0019: ldloc.0 + IL_001a: ldfld int32 SteppingMatch07/Discr::_tag + IL_001f: stloc.2 .line 100001,100001 : 0,0 '' - IL_0026: ldloc.1 - IL_0027: ldloc.2 - IL_0028: bne.un.s IL_002c + IL_0020: ldloc.1 + IL_0021: ldloc.2 + IL_0022: bne.un.s IL_0026 .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0024: ldc.i4.0 + IL_0025: ret .line 100001,100001 : 0,0 '' - IL_002c: ldloc.1 - IL_002d: ldloc.2 - IL_002e: sub - IL_002f: ret + IL_0026: ldloc.1 + IL_0027: ldloc.2 + IL_0028: sub + IL_0029: ret .line 100001,100001 : 0,0 '' - IL_0030: ldc.i4.1 - IL_0031: ret + IL_002a: ldc.i4.1 + IL_002b: ret .line 100001,100001 : 0,0 '' - IL_0032: ldarg.1 - IL_0033: unbox.any SteppingMatch07/Discr - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: brfalse.s IL_003f + IL_002c: ldarg.1 + IL_002d: unbox.any SteppingMatch07/Discr + IL_0032: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.m1 - IL_003e: ret + IL_0034: ldc.i4.m1 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_0036: ldc.i4.0 + IL_0037: ret } // end of method Discr::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 17 (0x11) + // Code size 14 (0xe) .maxstack 3 .locals init ([0] int32 V_0) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_000f + IL_0001: brfalse.s IL_000c .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldarg.0 - IL_0009: ldfld int32 SteppingMatch07/Discr::_tag - IL_000e: ret + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldarg.0 + IL_0006: ldfld int32 SteppingMatch07/Discr::_tag + IL_000b: ret .line 100001,100001 : 0,0 '' - IL_000f: ldc.i4.0 - IL_0010: ret + IL_000c: ldc.i4.0 + IL_000d: ret } // end of method Discr::GetHashCode .method public hidebysig virtual final @@ -387,7 +373,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 47 (0x2f) + // Code size 44 (0x2c) .maxstack 4 .locals init ([0] class SteppingMatch07/Discr V_0, [1] class SteppingMatch07/Discr V_1, @@ -395,90 +381,84 @@ [3] int32 V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0027 + IL_0001: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst SteppingMatch07/Discr - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst SteppingMatch07/Discr + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0025 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0022 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 SteppingMatch07/Discr::_tag - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld int32 SteppingMatch07/Discr::_tag - IL_001f: stloc.3 + IL_000d: ldloc.0 + IL_000e: stloc.1 + IL_000f: ldarg.0 + IL_0010: ldfld int32 SteppingMatch07/Discr::_tag + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: ldfld int32 SteppingMatch07/Discr::_tag + IL_001c: stloc.3 .line 100001,100001 : 0,0 '' - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: ceq - IL_0024: ret + IL_001d: ldloc.2 + IL_001e: ldloc.3 + IL_001f: ceq + IL_0021: ret .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.0 - IL_0026: ret + IL_0022: ldc.i4.0 + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0027: ldarg.1 - IL_0028: ldnull - IL_0029: cgt.un - IL_002b: ldc.i4.0 - IL_002c: ceq - IL_002e: ret + IL_0024: ldarg.1 + IL_0025: ldnull + IL_0026: cgt.un + IL_0028: ldc.i4.0 + IL_0029: ceq + IL_002b: ret } // end of method Discr::Equals .method public hidebysig virtual final instance bool Equals(class SteppingMatch07/Discr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) + // Code size 35 (0x23) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0021 + IL_0001: brfalse.s IL_001b .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_001f + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0019 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: ldfld int32 SteppingMatch07/Discr::_tag - IL_0012: stloc.0 - IL_0013: ldarg.1 - IL_0014: ldfld int32 SteppingMatch07/Discr::_tag - IL_0019: stloc.1 + IL_0006: ldarg.0 + IL_0007: ldfld int32 SteppingMatch07/Discr::_tag + IL_000c: stloc.0 + IL_000d: ldarg.1 + IL_000e: ldfld int32 SteppingMatch07/Discr::_tag + IL_0013: stloc.1 .line 100001,100001 : 0,0 '' - IL_001a: ldloc.0 - IL_001b: ldloc.1 - IL_001c: ceq - IL_001e: ret + IL_0014: ldloc.0 + IL_0015: ldloc.1 + IL_0016: ceq + IL_0018: ret .line 100001,100001 : 0,0 '' - IL_001f: ldc.i4.0 - IL_0020: ret + IL_0019: ldc.i4.0 + IL_001a: ret .line 100001,100001 : 0,0 '' - IL_0021: ldarg.1 - IL_0022: ldnull - IL_0023: cgt.un - IL_0025: ldc.i4.0 - IL_0026: ceq - IL_0028: ret + IL_001b: ldarg.1 + IL_001c: ldnull + IL_001d: cgt.un + IL_001f: ldc.i4.0 + IL_0020: ceq + IL_0022: ret } // end of method Discr::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction16.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction16.il.bsl index 92e53fdc94f..68c9a116549 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction16.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction16.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000688 Length: 0x000001CD } .module TestFunction16.exe -// MVID: {61EFEE1F-A624-45C5-A745-03831FEEEF61} +// MVID: {6220E156-A624-45C5-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x069E0000 +// Image base: 0x068C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -174,7 +174,7 @@ instance int32 CompareTo(class TestFunction16/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 120 (0x78) + // Code size 111 (0x6f) .maxstack 4 .locals init ([0] class TestFunction16/U V_0, [1] class TestFunction16/U V_1, @@ -188,110 +188,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction16.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006e + IL_0001: brfalse.s IL_0068 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006c + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0066 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 TestFunction16/U::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 TestFunction16/U::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 TestFunction16/U::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 TestFunction16/U::item1 + IL_0020: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 100001,100001 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 100001,100001 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 100001,100001 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 100001,100001 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 100001,100001 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 100001,100001 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 100001,100001 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 100001,100001 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.s V_6 - IL_004d: ldloc.0 - IL_004e: ldfld int32 TestFunction16/U::item2 - IL_0053: stloc.s V_7 - IL_0055: ldloc.1 - IL_0056: ldfld int32 TestFunction16/U::item2 - IL_005b: stloc.s V_8 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.s V_6 + IL_0047: ldloc.0 + IL_0048: ldfld int32 TestFunction16/U::item2 + IL_004d: stloc.s V_7 + IL_004f: ldloc.1 + IL_0050: ldfld int32 TestFunction16/U::item2 + IL_0055: stloc.s V_8 .line 100001,100001 : 0,0 '' - IL_005d: ldloc.s V_7 - IL_005f: ldloc.s V_8 - IL_0061: bge.s IL_0065 + IL_0057: ldloc.s V_7 + IL_0059: ldloc.s V_8 + IL_005b: bge.s IL_005f .line 100001,100001 : 0,0 '' - IL_0063: ldc.i4.m1 - IL_0064: ret + IL_005d: ldc.i4.m1 + IL_005e: ret .line 100001,100001 : 0,0 '' - IL_0065: ldloc.s V_7 - IL_0067: ldloc.s V_8 - IL_0069: cgt - IL_006b: ret + IL_005f: ldloc.s V_7 + IL_0061: ldloc.s V_8 + IL_0063: cgt + IL_0065: ret .line 100001,100001 : 0,0 '' - IL_006c: ldc.i4.1 - IL_006d: ret + IL_0066: ldc.i4.1 + IL_0067: ret .line 100001,100001 : 0,0 '' - IL_006e: ldarg.1 - IL_006f: ldnull - IL_0070: cgt.un - IL_0072: brfalse.s IL_0076 + IL_0068: ldarg.1 + IL_0069: brfalse.s IL_006d .line 100001,100001 : 0,0 '' - IL_0074: ldc.i4.m1 - IL_0075: ret + IL_006b: ldc.i4.m1 + IL_006c: ret .line 100001,100001 : 0,0 '' - IL_0076: ldc.i4.0 - IL_0077: ret + IL_006d: ldc.i4.0 + IL_006e: ret } // end of method U::CompareTo .method public hidebysig virtual final @@ -312,7 +306,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 130 (0x82) + // Code size 121 (0x79) .maxstack 4 .locals init ([0] class TestFunction16/U V_0, [1] class TestFunction16/U V_1, @@ -330,119 +324,113 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0073 - - .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any TestFunction16/U - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0071 - - .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop - .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.s V_4 - IL_0021: ldloc.1 - IL_0022: ldfld int32 TestFunction16/U::item1 - IL_0027: stloc.s V_5 - IL_0029: ldloc.2 - IL_002a: ldfld int32 TestFunction16/U::item1 - IL_002f: stloc.s V_6 + IL_0008: brfalse.s IL_006d + .line 100001,100001 : 0,0 '' - IL_0031: ldloc.s V_5 - IL_0033: ldloc.s V_6 - IL_0035: bge.s IL_003b + IL_000a: ldarg.1 + IL_000b: unbox.any TestFunction16/U + IL_0010: brfalse.s IL_006b .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.m1 + IL_0012: ldarg.0 + IL_0013: pop + .line 100001,100001 : 0,0 '' + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.s V_4 + IL_001b: ldloc.1 + IL_001c: ldfld int32 TestFunction16/U::item1 + IL_0021: stloc.s V_5 + IL_0023: ldloc.2 + IL_0024: ldfld int32 TestFunction16/U::item1 + IL_0029: stloc.s V_6 .line 100001,100001 : 0,0 '' - IL_0038: nop - IL_0039: br.s IL_0042 + IL_002b: ldloc.s V_5 + IL_002d: ldloc.s V_6 + IL_002f: bge.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003b: ldloc.s V_5 - IL_003d: ldloc.s V_6 - IL_003f: cgt + IL_0031: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_0041: nop + IL_0032: nop + IL_0033: br.s IL_003c + .line 100001,100001 : 0,0 '' - IL_0042: stloc.3 + IL_0035: ldloc.s V_5 + IL_0037: ldloc.s V_6 + IL_0039: cgt .line 100001,100001 : 0,0 '' - IL_0043: ldloc.3 - IL_0044: ldc.i4.0 - IL_0045: bge.s IL_0049 + IL_003b: nop + .line 100001,100001 : 0,0 '' + IL_003c: stloc.3 + .line 100001,100001 : 0,0 '' + IL_003d: ldloc.3 + IL_003e: ldc.i4.0 + IL_003f: bge.s IL_0043 .line 100001,100001 : 0,0 '' - IL_0047: ldloc.3 - IL_0048: ret + IL_0041: ldloc.3 + IL_0042: ret .line 100001,100001 : 0,0 '' - IL_0049: ldloc.3 - IL_004a: ldc.i4.0 - IL_004b: ble.s IL_004f + IL_0043: ldloc.3 + IL_0044: ldc.i4.0 + IL_0045: ble.s IL_0049 .line 100001,100001 : 0,0 '' - IL_004d: ldloc.3 - IL_004e: ret + IL_0047: ldloc.3 + IL_0048: ret .line 100001,100001 : 0,0 '' - IL_004f: ldarg.2 - IL_0050: stloc.s V_7 - IL_0052: ldloc.1 - IL_0053: ldfld int32 TestFunction16/U::item2 - IL_0058: stloc.s V_8 - IL_005a: ldloc.2 - IL_005b: ldfld int32 TestFunction16/U::item2 - IL_0060: stloc.s V_9 + IL_0049: ldarg.2 + IL_004a: stloc.s V_7 + IL_004c: ldloc.1 + IL_004d: ldfld int32 TestFunction16/U::item2 + IL_0052: stloc.s V_8 + IL_0054: ldloc.2 + IL_0055: ldfld int32 TestFunction16/U::item2 + IL_005a: stloc.s V_9 .line 100001,100001 : 0,0 '' - IL_0062: ldloc.s V_8 - IL_0064: ldloc.s V_9 - IL_0066: bge.s IL_006a + IL_005c: ldloc.s V_8 + IL_005e: ldloc.s V_9 + IL_0060: bge.s IL_0064 .line 100001,100001 : 0,0 '' - IL_0068: ldc.i4.m1 - IL_0069: ret + IL_0062: ldc.i4.m1 + IL_0063: ret .line 100001,100001 : 0,0 '' - IL_006a: ldloc.s V_8 - IL_006c: ldloc.s V_9 - IL_006e: cgt - IL_0070: ret + IL_0064: ldloc.s V_8 + IL_0066: ldloc.s V_9 + IL_0068: cgt + IL_006a: ret .line 100001,100001 : 0,0 '' - IL_0071: ldc.i4.1 - IL_0072: ret + IL_006b: ldc.i4.1 + IL_006c: ret .line 100001,100001 : 0,0 '' - IL_0073: ldarg.1 - IL_0074: unbox.any TestFunction16/U - IL_0079: ldnull - IL_007a: cgt.un - IL_007c: brfalse.s IL_0080 + IL_006d: ldarg.1 + IL_006e: unbox.any TestFunction16/U + IL_0073: brfalse.s IL_0077 .line 100001,100001 : 0,0 '' - IL_007e: ldc.i4.m1 - IL_007f: ret + IL_0075: ldc.i4.m1 + IL_0076: ret .line 100001,100001 : 0,0 '' - IL_0080: ldc.i4.0 - IL_0081: ret + IL_0077: ldc.i4.0 + IL_0078: ret } // end of method U::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 61 (0x3d) .maxstack 7 .locals init ([0] int32 V_0, [1] class TestFunction16/U V_1, @@ -450,57 +438,55 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003e + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 TestFunction16/U::item2 + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 TestFunction16/U::item2 + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldc.i4 0x9e3779b9 - IL_002a: ldarg.1 - IL_002b: stloc.3 - IL_002c: ldloc.1 - IL_002d: ldfld int32 TestFunction16/U::item1 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldc.i4 0x9e3779b9 + IL_0027: ldarg.1 + IL_0028: stloc.3 + IL_0029: ldloc.1 + IL_002a: ldfld int32 TestFunction16/U::item1 + IL_002f: ldloc.0 + IL_0030: ldc.i4.6 + IL_0031: shl IL_0032: ldloc.0 - IL_0033: ldc.i4.6 - IL_0034: shl - IL_0035: ldloc.0 - IL_0036: ldc.i4.2 - IL_0037: shr - IL_0038: add - IL_0039: add - IL_003a: add - IL_003b: stloc.0 - IL_003c: ldloc.0 - IL_003d: ret + IL_0033: ldc.i4.2 + IL_0034: shr + IL_0035: add + IL_0036: add + IL_0037: add + IL_0038: stloc.0 + IL_0039: ldloc.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_003b: ldc.i4.0 + IL_003c: ret } // end of method U::GetHashCode .method public hidebysig virtual final @@ -520,7 +506,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 73 (0x49) + // Code size 70 (0x46) .maxstack 4 .locals init ([0] class TestFunction16/U V_0, [1] class TestFunction16/U V_1, @@ -530,124 +516,118 @@ [5] class [mscorlib]System.Collections.IEqualityComparer V_5) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0041 + IL_0001: brfalse.s IL_003e .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst TestFunction16/U - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst TestFunction16/U + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003f + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_003c .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000f: ldarg.0 + IL_0010: pop .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 TestFunction16/U::item1 - IL_0021: ldloc.3 - IL_0022: ldfld int32 TestFunction16/U::item1 - IL_0027: ceq - IL_0029: brfalse.s IL_003d - - .line 100001,100001 : 0,0 '' - IL_002b: ldarg.2 - IL_002c: stloc.s V_5 - IL_002e: ldloc.2 - IL_002f: ldfld int32 TestFunction16/U::item2 - IL_0034: ldloc.3 - IL_0035: ldfld int32 TestFunction16/U::item2 - IL_003a: ceq - IL_003c: ret + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 TestFunction16/U::item1 + IL_001e: ldloc.3 + IL_001f: ldfld int32 TestFunction16/U::item1 + IL_0024: ceq + IL_0026: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.0 - IL_003e: ret + IL_0028: ldarg.2 + IL_0029: stloc.s V_5 + IL_002b: ldloc.2 + IL_002c: ldfld int32 TestFunction16/U::item2 + IL_0031: ldloc.3 + IL_0032: ldfld int32 TestFunction16/U::item2 + IL_0037: ceq + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: ldnull - IL_0043: cgt.un - IL_0045: ldc.i4.0 - IL_0046: ceq - IL_0048: ret + IL_003c: ldc.i4.0 + IL_003d: ret + + .line 100001,100001 : 0,0 '' + IL_003e: ldarg.1 + IL_003f: ldnull + IL_0040: cgt.un + IL_0042: ldc.i4.0 + IL_0043: ceq + IL_0045: ret } // end of method U::Equals .method public hidebysig virtual final instance bool Equals(class TestFunction16/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class TestFunction16/U V_0, [1] class TestFunction16/U V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 TestFunction16/U::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 TestFunction16/U::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 TestFunction16/U::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 TestFunction16/U::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 TestFunction16/U::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 TestFunction16/U::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method U::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction17.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction17.il.bsl index cadb6fe4694..0d46ddc1a9c 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction17.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction17.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000678 Length: 0x000001CD } .module TestFunction17.exe -// MVID: {61EFEE1F-A624-45A8-A745-03831FEEEF61} +// MVID: {6220E156-A624-45A8-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06AF0000 +// Image base: 0x051E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -119,7 +119,7 @@ instance int32 CompareTo(class TestFunction17/R obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 108 (0x6c) + // Code size 99 (0x63) .maxstack 4 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IComparer V_1, @@ -131,103 +131,97 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction17.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0062 + IL_0001: brfalse.s IL_005c .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0060 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_005a .line 100001,100001 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 TestFunction17/R::x@ - IL_0018: stloc.2 - IL_0019: ldarg.1 - IL_001a: ldfld int32 TestFunction17/R::x@ - IL_001f: stloc.3 + IL_0006: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 TestFunction17/R::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 TestFunction17/R::x@ + IL_0019: stloc.3 .line 100001,100001 : 0,0 '' - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: bge.s IL_0028 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: bge.s IL_0022 .line 100001,100001 : 0,0 '' - IL_0024: ldc.i4.m1 + IL_001e: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_0025: nop - IL_0026: br.s IL_002d + IL_001f: nop + IL_0020: br.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0028: ldloc.2 - IL_0029: ldloc.3 - IL_002a: cgt + IL_0022: ldloc.2 + IL_0023: ldloc.3 + IL_0024: cgt .line 100001,100001 : 0,0 '' - IL_002c: nop + IL_0026: nop .line 100001,100001 : 0,0 '' - IL_002d: stloc.0 + IL_0027: stloc.0 .line 100001,100001 : 0,0 '' - IL_002e: ldloc.0 - IL_002f: ldc.i4.0 - IL_0030: bge.s IL_0034 + IL_0028: ldloc.0 + IL_0029: ldc.i4.0 + IL_002a: bge.s IL_002e .line 100001,100001 : 0,0 '' - IL_0032: ldloc.0 - IL_0033: ret + IL_002c: ldloc.0 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_0034: ldloc.0 - IL_0035: ldc.i4.0 - IL_0036: ble.s IL_003a + IL_002e: ldloc.0 + IL_002f: ldc.i4.0 + IL_0030: ble.s IL_0034 .line 100001,100001 : 0,0 '' - IL_0038: ldloc.0 - IL_0039: ret + IL_0032: ldloc.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_003a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_003f: stloc.s V_4 - IL_0041: ldarg.0 - IL_0042: ldfld int32 TestFunction17/R::y@ - IL_0047: stloc.s V_5 - IL_0049: ldarg.1 - IL_004a: ldfld int32 TestFunction17/R::y@ - IL_004f: stloc.s V_6 + IL_0034: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0039: stloc.s V_4 + IL_003b: ldarg.0 + IL_003c: ldfld int32 TestFunction17/R::y@ + IL_0041: stloc.s V_5 + IL_0043: ldarg.1 + IL_0044: ldfld int32 TestFunction17/R::y@ + IL_0049: stloc.s V_6 .line 100001,100001 : 0,0 '' - IL_0051: ldloc.s V_5 - IL_0053: ldloc.s V_6 - IL_0055: bge.s IL_0059 + IL_004b: ldloc.s V_5 + IL_004d: ldloc.s V_6 + IL_004f: bge.s IL_0053 .line 100001,100001 : 0,0 '' - IL_0057: ldc.i4.m1 - IL_0058: ret + IL_0051: ldc.i4.m1 + IL_0052: ret .line 100001,100001 : 0,0 '' - IL_0059: ldloc.s V_5 - IL_005b: ldloc.s V_6 - IL_005d: cgt - IL_005f: ret + IL_0053: ldloc.s V_5 + IL_0055: ldloc.s V_6 + IL_0057: cgt + IL_0059: ret .line 100001,100001 : 0,0 '' - IL_0060: ldc.i4.1 - IL_0061: ret + IL_005a: ldc.i4.1 + IL_005b: ret .line 100001,100001 : 0,0 '' - IL_0062: ldarg.1 - IL_0063: ldnull - IL_0064: cgt.un - IL_0066: brfalse.s IL_006a + IL_005c: ldarg.1 + IL_005d: brfalse.s IL_0061 .line 100001,100001 : 0,0 '' - IL_0068: ldc.i4.m1 - IL_0069: ret + IL_005f: ldc.i4.m1 + IL_0060: ret .line 100001,100001 : 0,0 '' - IL_006a: ldc.i4.0 - IL_006b: ret + IL_0061: ldc.i4.0 + IL_0062: ret } // end of method R::CompareTo .method public hidebysig virtual final @@ -248,7 +242,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 125 (0x7d) + // Code size 116 (0x74) .maxstack 4 .locals init ([0] class TestFunction17/R V_0, [1] class TestFunction17/R V_1, @@ -267,161 +261,153 @@ IL_0008: stloc.1 .line 100001,100001 : 0,0 '' IL_0009: ldarg.0 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse.s IL_006e + IL_000a: brfalse.s IL_0068 .line 100001,100001 : 0,0 '' - IL_000f: ldarg.1 - IL_0010: unbox.any TestFunction17/R - IL_0015: ldnull - IL_0016: cgt.un - IL_0018: brfalse.s IL_006c + IL_000c: ldarg.1 + IL_000d: unbox.any TestFunction17/R + IL_0012: brfalse.s IL_0066 .line 100001,100001 : 0,0 '' - IL_001a: ldarg.2 - IL_001b: stloc.3 - IL_001c: ldarg.0 - IL_001d: ldfld int32 TestFunction17/R::x@ - IL_0022: stloc.s V_4 - IL_0024: ldloc.1 - IL_0025: ldfld int32 TestFunction17/R::x@ - IL_002a: stloc.s V_5 + IL_0014: ldarg.2 + IL_0015: stloc.3 + IL_0016: ldarg.0 + IL_0017: ldfld int32 TestFunction17/R::x@ + IL_001c: stloc.s V_4 + IL_001e: ldloc.1 + IL_001f: ldfld int32 TestFunction17/R::x@ + IL_0024: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_002c: ldloc.s V_4 - IL_002e: ldloc.s V_5 - IL_0030: bge.s IL_0036 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.s V_5 + IL_002a: bge.s IL_0030 .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.m1 + IL_002c: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_0033: nop - IL_0034: br.s IL_003d + IL_002d: nop + IL_002e: br.s IL_0037 .line 100001,100001 : 0,0 '' - IL_0036: ldloc.s V_4 - IL_0038: ldloc.s V_5 - IL_003a: cgt + IL_0030: ldloc.s V_4 + IL_0032: ldloc.s V_5 + IL_0034: cgt .line 100001,100001 : 0,0 '' - IL_003c: nop + IL_0036: nop .line 100001,100001 : 0,0 '' - IL_003d: stloc.2 + IL_0037: stloc.2 .line 100001,100001 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ldc.i4.0 - IL_0040: bge.s IL_0044 + IL_0038: ldloc.2 + IL_0039: ldc.i4.0 + IL_003a: bge.s IL_003e .line 100001,100001 : 0,0 '' - IL_0042: ldloc.2 - IL_0043: ret + IL_003c: ldloc.2 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ldc.i4.0 - IL_0046: ble.s IL_004a + IL_003e: ldloc.2 + IL_003f: ldc.i4.0 + IL_0040: ble.s IL_0044 .line 100001,100001 : 0,0 '' - IL_0048: ldloc.2 - IL_0049: ret + IL_0042: ldloc.2 + IL_0043: ret .line 100001,100001 : 0,0 '' - IL_004a: ldarg.2 - IL_004b: stloc.s V_6 - IL_004d: ldarg.0 - IL_004e: ldfld int32 TestFunction17/R::y@ - IL_0053: stloc.s V_7 - IL_0055: ldloc.1 - IL_0056: ldfld int32 TestFunction17/R::y@ - IL_005b: stloc.s V_8 + IL_0044: ldarg.2 + IL_0045: stloc.s V_6 + IL_0047: ldarg.0 + IL_0048: ldfld int32 TestFunction17/R::y@ + IL_004d: stloc.s V_7 + IL_004f: ldloc.1 + IL_0050: ldfld int32 TestFunction17/R::y@ + IL_0055: stloc.s V_8 .line 100001,100001 : 0,0 '' - IL_005d: ldloc.s V_7 - IL_005f: ldloc.s V_8 - IL_0061: bge.s IL_0065 + IL_0057: ldloc.s V_7 + IL_0059: ldloc.s V_8 + IL_005b: bge.s IL_005f .line 100001,100001 : 0,0 '' - IL_0063: ldc.i4.m1 - IL_0064: ret + IL_005d: ldc.i4.m1 + IL_005e: ret .line 100001,100001 : 0,0 '' - IL_0065: ldloc.s V_7 - IL_0067: ldloc.s V_8 - IL_0069: cgt - IL_006b: ret + IL_005f: ldloc.s V_7 + IL_0061: ldloc.s V_8 + IL_0063: cgt + IL_0065: ret .line 100001,100001 : 0,0 '' - IL_006c: ldc.i4.1 - IL_006d: ret + IL_0066: ldc.i4.1 + IL_0067: ret .line 100001,100001 : 0,0 '' - IL_006e: ldarg.1 - IL_006f: unbox.any TestFunction17/R - IL_0074: ldnull - IL_0075: cgt.un - IL_0077: brfalse.s IL_007b + IL_0068: ldarg.1 + IL_0069: unbox.any TestFunction17/R + IL_006e: brfalse.s IL_0072 .line 100001,100001 : 0,0 '' - IL_0079: ldc.i4.m1 - IL_007a: ret + IL_0070: ldc.i4.m1 + IL_0071: ret .line 100001,100001 : 0,0 '' - IL_007b: ldc.i4.0 - IL_007c: ret + IL_0072: ldc.i4.0 + IL_0073: ret } // end of method R::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 58 (0x3a) + // Code size 55 (0x37) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0038 + IL_0001: brfalse.s IL_0035 .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: ldfld int32 TestFunction17/R::y@ + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 TestFunction17/R::y@ + IL_0012: ldloc.0 + IL_0013: ldc.i4.6 + IL_0014: shl IL_0015: ldloc.0 - IL_0016: ldc.i4.6 - IL_0017: shl - IL_0018: ldloc.0 - IL_0019: ldc.i4.2 - IL_001a: shr - IL_001b: add - IL_001c: add - IL_001d: add - IL_001e: stloc.0 - IL_001f: ldc.i4 0x9e3779b9 - IL_0024: ldarg.1 - IL_0025: stloc.2 - IL_0026: ldarg.0 - IL_0027: ldfld int32 TestFunction17/R::x@ + IL_0016: ldc.i4.2 + IL_0017: shr + IL_0018: add + IL_0019: add + IL_001a: add + IL_001b: stloc.0 + IL_001c: ldc.i4 0x9e3779b9 + IL_0021: ldarg.1 + IL_0022: stloc.2 + IL_0023: ldarg.0 + IL_0024: ldfld int32 TestFunction17/R::x@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl IL_002c: ldloc.0 - IL_002d: ldc.i4.6 - IL_002e: shl - IL_002f: ldloc.0 - IL_0030: ldc.i4.2 - IL_0031: shr - IL_0032: add - IL_0033: add - IL_0034: add - IL_0035: stloc.0 - IL_0036: ldloc.0 - IL_0037: ret - - .line 100001,100001 : 0,0 '' - IL_0038: ldc.i4.0 - IL_0039: ret + IL_002d: ldc.i4.2 + IL_002e: shr + IL_002f: add + IL_0030: add + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.0 + IL_0034: ret + + .line 100001,100001 : 0,0 '' + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method R::GetHashCode .method public hidebysig virtual final @@ -441,7 +427,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 65 (0x41) + // Code size 62 (0x3e) .maxstack 4 .locals init ([0] class TestFunction17/R V_0, [1] class TestFunction17/R V_1, @@ -449,106 +435,100 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0039 + IL_0001: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst TestFunction17/R - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst TestFunction17/R + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0037 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldarg.2 - IL_0013: stloc.2 - IL_0014: ldarg.0 - IL_0015: ldfld int32 TestFunction17/R::x@ - IL_001a: ldloc.1 - IL_001b: ldfld int32 TestFunction17/R::x@ - IL_0020: ceq - IL_0022: brfalse.s IL_0035 + IL_000f: ldarg.2 + IL_0010: stloc.2 + IL_0011: ldarg.0 + IL_0012: ldfld int32 TestFunction17/R::x@ + IL_0017: ldloc.1 + IL_0018: ldfld int32 TestFunction17/R::x@ + IL_001d: ceq + IL_001f: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - IL_0024: ldarg.2 - IL_0025: stloc.3 - IL_0026: ldarg.0 - IL_0027: ldfld int32 TestFunction17/R::y@ - IL_002c: ldloc.1 - IL_002d: ldfld int32 TestFunction17/R::y@ - IL_0032: ceq - IL_0034: ret + IL_0021: ldarg.2 + IL_0022: stloc.3 + IL_0023: ldarg.0 + IL_0024: ldfld int32 TestFunction17/R::y@ + IL_0029: ldloc.1 + IL_002a: ldfld int32 TestFunction17/R::y@ + IL_002f: ceq + IL_0031: ret .line 100001,100001 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0039: ldarg.1 - IL_003a: ldnull - IL_003b: cgt.un - IL_003d: ldc.i4.0 - IL_003e: ceq - IL_0040: ret + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret } // end of method R::Equals .method public hidebysig virtual final instance bool Equals(class TestFunction17/R obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 47 (0x2f) .maxstack 8 .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002d + IL_0001: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_002b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 + IL_0006: ldarg.0 + IL_0007: ldfld int32 TestFunction17/R::x@ + IL_000c: ldarg.1 IL_000d: ldfld int32 TestFunction17/R::x@ - IL_0012: ldarg.1 - IL_0013: ldfld int32 TestFunction17/R::x@ - IL_0018: bne.un.s IL_0029 + IL_0012: bne.un.s IL_0023 .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 + IL_0014: ldarg.0 + IL_0015: ldfld int32 TestFunction17/R::y@ + IL_001a: ldarg.1 IL_001b: ldfld int32 TestFunction17/R::y@ - IL_0020: ldarg.1 - IL_0021: ldfld int32 TestFunction17/R::y@ - IL_0026: ceq - IL_0028: ret + IL_0020: ceq + IL_0022: ret .line 100001,100001 : 0,0 '' - IL_0029: ldc.i4.0 - IL_002a: ret + IL_0023: ldc.i4.0 + IL_0024: ret .line 100001,100001 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_0025: ldc.i4.0 + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_002d: ldarg.1 - IL_002e: ldnull - IL_002f: cgt.un - IL_0031: ldc.i4.0 - IL_0032: ceq - IL_0034: ret + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret } // end of method R::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction21.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction21.il.bsl index 26fad449662..0fbf7367fc5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction21.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction21.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000680 Length: 0x000001CD } .module TestFunction21.exe -// MVID: {61EFEE1F-A643-45E6-A745-03831FEEEF61} +// MVID: {6220E156-A643-45E6-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x069B0000 +// Image base: 0x06FC0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -174,7 +174,7 @@ instance int32 CompareTo(class TestFunction21/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 120 (0x78) + // Code size 111 (0x6f) .maxstack 4 .locals init ([0] class TestFunction21/U V_0, [1] class TestFunction21/U V_1, @@ -188,110 +188,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction21.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006e + IL_0001: brfalse.s IL_0068 .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006c + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0066 .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 TestFunction21/U::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 TestFunction21/U::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 TestFunction21/U::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 TestFunction21/U::item1 + IL_0020: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 100001,100001 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 100001,100001 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 100001,100001 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 100001,100001 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 100001,100001 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 100001,100001 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 100001,100001 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 100001,100001 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.s V_6 - IL_004d: ldloc.0 - IL_004e: ldfld int32 TestFunction21/U::item2 - IL_0053: stloc.s V_7 - IL_0055: ldloc.1 - IL_0056: ldfld int32 TestFunction21/U::item2 - IL_005b: stloc.s V_8 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.s V_6 + IL_0047: ldloc.0 + IL_0048: ldfld int32 TestFunction21/U::item2 + IL_004d: stloc.s V_7 + IL_004f: ldloc.1 + IL_0050: ldfld int32 TestFunction21/U::item2 + IL_0055: stloc.s V_8 .line 100001,100001 : 0,0 '' - IL_005d: ldloc.s V_7 - IL_005f: ldloc.s V_8 - IL_0061: bge.s IL_0065 + IL_0057: ldloc.s V_7 + IL_0059: ldloc.s V_8 + IL_005b: bge.s IL_005f .line 100001,100001 : 0,0 '' - IL_0063: ldc.i4.m1 - IL_0064: ret + IL_005d: ldc.i4.m1 + IL_005e: ret .line 100001,100001 : 0,0 '' - IL_0065: ldloc.s V_7 - IL_0067: ldloc.s V_8 - IL_0069: cgt - IL_006b: ret + IL_005f: ldloc.s V_7 + IL_0061: ldloc.s V_8 + IL_0063: cgt + IL_0065: ret .line 100001,100001 : 0,0 '' - IL_006c: ldc.i4.1 - IL_006d: ret + IL_0066: ldc.i4.1 + IL_0067: ret .line 100001,100001 : 0,0 '' - IL_006e: ldarg.1 - IL_006f: ldnull - IL_0070: cgt.un - IL_0072: brfalse.s IL_0076 + IL_0068: ldarg.1 + IL_0069: brfalse.s IL_006d .line 100001,100001 : 0,0 '' - IL_0074: ldc.i4.m1 - IL_0075: ret + IL_006b: ldc.i4.m1 + IL_006c: ret .line 100001,100001 : 0,0 '' - IL_0076: ldc.i4.0 - IL_0077: ret + IL_006d: ldc.i4.0 + IL_006e: ret } // end of method U::CompareTo .method public hidebysig virtual final @@ -312,7 +306,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 130 (0x82) + // Code size 121 (0x79) .maxstack 4 .locals init ([0] class TestFunction21/U V_0, [1] class TestFunction21/U V_1, @@ -330,119 +324,113 @@ IL_0006: stloc.0 .line 100001,100001 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0073 - - .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any TestFunction21/U - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0071 - - .line 100001,100001 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop - .line 100001,100001 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldarg.2 - IL_001f: stloc.s V_4 - IL_0021: ldloc.1 - IL_0022: ldfld int32 TestFunction21/U::item1 - IL_0027: stloc.s V_5 - IL_0029: ldloc.2 - IL_002a: ldfld int32 TestFunction21/U::item1 - IL_002f: stloc.s V_6 + IL_0008: brfalse.s IL_006d + .line 100001,100001 : 0,0 '' - IL_0031: ldloc.s V_5 - IL_0033: ldloc.s V_6 - IL_0035: bge.s IL_003b + IL_000a: ldarg.1 + IL_000b: unbox.any TestFunction21/U + IL_0010: brfalse.s IL_006b .line 100001,100001 : 0,0 '' - IL_0037: ldc.i4.m1 + IL_0012: ldarg.0 + IL_0013: pop + .line 100001,100001 : 0,0 '' + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldarg.2 + IL_0019: stloc.s V_4 + IL_001b: ldloc.1 + IL_001c: ldfld int32 TestFunction21/U::item1 + IL_0021: stloc.s V_5 + IL_0023: ldloc.2 + IL_0024: ldfld int32 TestFunction21/U::item1 + IL_0029: stloc.s V_6 .line 100001,100001 : 0,0 '' - IL_0038: nop - IL_0039: br.s IL_0042 + IL_002b: ldloc.s V_5 + IL_002d: ldloc.s V_6 + IL_002f: bge.s IL_0035 .line 100001,100001 : 0,0 '' - IL_003b: ldloc.s V_5 - IL_003d: ldloc.s V_6 - IL_003f: cgt + IL_0031: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_0041: nop + IL_0032: nop + IL_0033: br.s IL_003c + .line 100001,100001 : 0,0 '' - IL_0042: stloc.3 + IL_0035: ldloc.s V_5 + IL_0037: ldloc.s V_6 + IL_0039: cgt .line 100001,100001 : 0,0 '' - IL_0043: ldloc.3 - IL_0044: ldc.i4.0 - IL_0045: bge.s IL_0049 + IL_003b: nop + .line 100001,100001 : 0,0 '' + IL_003c: stloc.3 + .line 100001,100001 : 0,0 '' + IL_003d: ldloc.3 + IL_003e: ldc.i4.0 + IL_003f: bge.s IL_0043 .line 100001,100001 : 0,0 '' - IL_0047: ldloc.3 - IL_0048: ret + IL_0041: ldloc.3 + IL_0042: ret .line 100001,100001 : 0,0 '' - IL_0049: ldloc.3 - IL_004a: ldc.i4.0 - IL_004b: ble.s IL_004f + IL_0043: ldloc.3 + IL_0044: ldc.i4.0 + IL_0045: ble.s IL_0049 .line 100001,100001 : 0,0 '' - IL_004d: ldloc.3 - IL_004e: ret + IL_0047: ldloc.3 + IL_0048: ret .line 100001,100001 : 0,0 '' - IL_004f: ldarg.2 - IL_0050: stloc.s V_7 - IL_0052: ldloc.1 - IL_0053: ldfld int32 TestFunction21/U::item2 - IL_0058: stloc.s V_8 - IL_005a: ldloc.2 - IL_005b: ldfld int32 TestFunction21/U::item2 - IL_0060: stloc.s V_9 + IL_0049: ldarg.2 + IL_004a: stloc.s V_7 + IL_004c: ldloc.1 + IL_004d: ldfld int32 TestFunction21/U::item2 + IL_0052: stloc.s V_8 + IL_0054: ldloc.2 + IL_0055: ldfld int32 TestFunction21/U::item2 + IL_005a: stloc.s V_9 .line 100001,100001 : 0,0 '' - IL_0062: ldloc.s V_8 - IL_0064: ldloc.s V_9 - IL_0066: bge.s IL_006a + IL_005c: ldloc.s V_8 + IL_005e: ldloc.s V_9 + IL_0060: bge.s IL_0064 .line 100001,100001 : 0,0 '' - IL_0068: ldc.i4.m1 - IL_0069: ret + IL_0062: ldc.i4.m1 + IL_0063: ret .line 100001,100001 : 0,0 '' - IL_006a: ldloc.s V_8 - IL_006c: ldloc.s V_9 - IL_006e: cgt - IL_0070: ret + IL_0064: ldloc.s V_8 + IL_0066: ldloc.s V_9 + IL_0068: cgt + IL_006a: ret .line 100001,100001 : 0,0 '' - IL_0071: ldc.i4.1 - IL_0072: ret + IL_006b: ldc.i4.1 + IL_006c: ret .line 100001,100001 : 0,0 '' - IL_0073: ldarg.1 - IL_0074: unbox.any TestFunction21/U - IL_0079: ldnull - IL_007a: cgt.un - IL_007c: brfalse.s IL_0080 + IL_006d: ldarg.1 + IL_006e: unbox.any TestFunction21/U + IL_0073: brfalse.s IL_0077 .line 100001,100001 : 0,0 '' - IL_007e: ldc.i4.m1 - IL_007f: ret + IL_0075: ldc.i4.m1 + IL_0076: ret .line 100001,100001 : 0,0 '' - IL_0080: ldc.i4.0 - IL_0081: ret + IL_0077: ldc.i4.0 + IL_0078: ret } // end of method U::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 64 (0x40) + // Code size 61 (0x3d) .maxstack 7 .locals init ([0] int32 V_0, [1] class TestFunction21/U V_1, @@ -450,57 +438,55 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003e + IL_0001: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 100001,100001 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 100001,100001 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldarg.1 - IL_0014: stloc.2 - IL_0015: ldloc.1 - IL_0016: ldfld int32 TestFunction21/U::item2 + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldarg.1 + IL_0011: stloc.2 + IL_0012: ldloc.1 + IL_0013: ldfld int32 TestFunction21/U::item2 + IL_0018: ldloc.0 + IL_0019: ldc.i4.6 + IL_001a: shl IL_001b: ldloc.0 - IL_001c: ldc.i4.6 - IL_001d: shl - IL_001e: ldloc.0 - IL_001f: ldc.i4.2 - IL_0020: shr - IL_0021: add - IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldc.i4 0x9e3779b9 - IL_002a: ldarg.1 - IL_002b: stloc.3 - IL_002c: ldloc.1 - IL_002d: ldfld int32 TestFunction21/U::item1 + IL_001c: ldc.i4.2 + IL_001d: shr + IL_001e: add + IL_001f: add + IL_0020: add + IL_0021: stloc.0 + IL_0022: ldc.i4 0x9e3779b9 + IL_0027: ldarg.1 + IL_0028: stloc.3 + IL_0029: ldloc.1 + IL_002a: ldfld int32 TestFunction21/U::item1 + IL_002f: ldloc.0 + IL_0030: ldc.i4.6 + IL_0031: shl IL_0032: ldloc.0 - IL_0033: ldc.i4.6 - IL_0034: shl - IL_0035: ldloc.0 - IL_0036: ldc.i4.2 - IL_0037: shr - IL_0038: add - IL_0039: add - IL_003a: add - IL_003b: stloc.0 - IL_003c: ldloc.0 - IL_003d: ret + IL_0033: ldc.i4.2 + IL_0034: shr + IL_0035: add + IL_0036: add + IL_0037: add + IL_0038: stloc.0 + IL_0039: ldloc.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_003b: ldc.i4.0 + IL_003c: ret } // end of method U::GetHashCode .method public hidebysig virtual final @@ -520,7 +506,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 73 (0x49) + // Code size 70 (0x46) .maxstack 4 .locals init ([0] class TestFunction21/U V_0, [1] class TestFunction21/U V_1, @@ -530,124 +516,118 @@ [5] class [mscorlib]System.Collections.IEqualityComparer V_5) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0041 + IL_0001: brfalse.s IL_003e .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst TestFunction21/U - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst TestFunction21/U + IL_0009: stloc.0 .line 100001,100001 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_003f + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_003c .line 100001,100001 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000f: ldarg.0 + IL_0010: pop .line 100001,100001 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.2 - IL_0016: ldloc.1 - IL_0017: stloc.3 + IL_0011: ldarg.0 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: stloc.3 .line 100001,100001 : 0,0 '' - IL_0018: ldarg.2 - IL_0019: stloc.s V_4 - IL_001b: ldloc.2 - IL_001c: ldfld int32 TestFunction21/U::item1 - IL_0021: ldloc.3 - IL_0022: ldfld int32 TestFunction21/U::item1 - IL_0027: ceq - IL_0029: brfalse.s IL_003d - - .line 100001,100001 : 0,0 '' - IL_002b: ldarg.2 - IL_002c: stloc.s V_5 - IL_002e: ldloc.2 - IL_002f: ldfld int32 TestFunction21/U::item2 - IL_0034: ldloc.3 - IL_0035: ldfld int32 TestFunction21/U::item2 - IL_003a: ceq - IL_003c: ret + IL_0015: ldarg.2 + IL_0016: stloc.s V_4 + IL_0018: ldloc.2 + IL_0019: ldfld int32 TestFunction21/U::item1 + IL_001e: ldloc.3 + IL_001f: ldfld int32 TestFunction21/U::item1 + IL_0024: ceq + IL_0026: brfalse.s IL_003a .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.0 - IL_003e: ret + IL_0028: ldarg.2 + IL_0029: stloc.s V_5 + IL_002b: ldloc.2 + IL_002c: ldfld int32 TestFunction21/U::item2 + IL_0031: ldloc.3 + IL_0032: ldfld int32 TestFunction21/U::item2 + IL_0037: ceq + IL_0039: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_003a: ldc.i4.0 + IL_003b: ret .line 100001,100001 : 0,0 '' - IL_0041: ldarg.1 - IL_0042: ldnull - IL_0043: cgt.un - IL_0045: ldc.i4.0 - IL_0046: ceq - IL_0048: ret + IL_003c: ldc.i4.0 + IL_003d: ret + + .line 100001,100001 : 0,0 '' + IL_003e: ldarg.1 + IL_003f: ldnull + IL_0040: cgt.un + IL_0042: ldc.i4.0 + IL_0043: ceq + IL_0045: ret } // end of method U::Equals .method public hidebysig virtual final instance bool Equals(class TestFunction21/U obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class TestFunction21/U V_0, [1] class TestFunction21/U V_1) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 100001,100001 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 100001,100001 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 100001,100001 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 TestFunction21/U::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 TestFunction21/U::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 TestFunction21/U::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 TestFunction21/U::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 TestFunction21/U::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 TestFunction21/U::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 100001,100001 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 100001,100001 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method U::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction24.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction24.il.bsl index ba28389fd7d..41c5617313c 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction24.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction24.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000748 Length: 0x00000228 } .module TestFunction24.exe -// MVID: {61EFEE1F-A643-4587-A745-03831FEEEF61} +// MVID: {6220E156-A643-4587-A745-038356E12062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07110000 +// Image base: 0x095E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -141,7 +141,7 @@ instance int32 CompareTo(class TestFunction24/Point obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 108 (0x6c) + // Code size 99 (0x63) .maxstack 4 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IComparer V_1, @@ -153,103 +153,97 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction24.fs' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0062 + IL_0001: brfalse.s IL_005c .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0060 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_005a .line 16707566,16707566 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 TestFunction24/Point::x@ - IL_0018: stloc.2 - IL_0019: ldarg.1 - IL_001a: ldfld int32 TestFunction24/Point::x@ - IL_001f: stloc.3 + IL_0006: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 TestFunction24/Point::x@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 TestFunction24/Point::x@ + IL_0019: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: bge.s IL_0028 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: bge.s IL_0022 .line 16707566,16707566 : 0,0 '' - IL_0024: ldc.i4.m1 + IL_001e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0025: nop - IL_0026: br.s IL_002d + IL_001f: nop + IL_0020: br.s IL_0027 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.2 - IL_0029: ldloc.3 - IL_002a: cgt + IL_0022: ldloc.2 + IL_0023: ldloc.3 + IL_0024: cgt .line 16707566,16707566 : 0,0 '' - IL_002c: nop + IL_0026: nop .line 16707566,16707566 : 0,0 '' - IL_002d: stloc.0 + IL_0027: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.0 - IL_002f: ldc.i4.0 - IL_0030: bge.s IL_0034 + IL_0028: ldloc.0 + IL_0029: ldc.i4.0 + IL_002a: bge.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.0 - IL_0033: ret + IL_002c: ldloc.0 + IL_002d: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldloc.0 - IL_0035: ldc.i4.0 - IL_0036: ble.s IL_003a + IL_002e: ldloc.0 + IL_002f: ldc.i4.0 + IL_0030: ble.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.0 - IL_0039: ret + IL_0032: ldloc.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_003a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_003f: stloc.s V_4 - IL_0041: ldarg.0 - IL_0042: ldfld int32 TestFunction24/Point::y@ - IL_0047: stloc.s V_5 - IL_0049: ldarg.1 - IL_004a: ldfld int32 TestFunction24/Point::y@ - IL_004f: stloc.s V_6 + IL_0034: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0039: stloc.s V_4 + IL_003b: ldarg.0 + IL_003c: ldfld int32 TestFunction24/Point::y@ + IL_0041: stloc.s V_5 + IL_0043: ldarg.1 + IL_0044: ldfld int32 TestFunction24/Point::y@ + IL_0049: stloc.s V_6 .line 16707566,16707566 : 0,0 '' - IL_0051: ldloc.s V_5 - IL_0053: ldloc.s V_6 - IL_0055: bge.s IL_0059 + IL_004b: ldloc.s V_5 + IL_004d: ldloc.s V_6 + IL_004f: bge.s IL_0053 .line 16707566,16707566 : 0,0 '' - IL_0057: ldc.i4.m1 - IL_0058: ret + IL_0051: ldc.i4.m1 + IL_0052: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldloc.s V_5 - IL_005b: ldloc.s V_6 - IL_005d: cgt - IL_005f: ret + IL_0053: ldloc.s V_5 + IL_0055: ldloc.s V_6 + IL_0057: cgt + IL_0059: ret .line 16707566,16707566 : 0,0 '' - IL_0060: ldc.i4.1 - IL_0061: ret + IL_005a: ldc.i4.1 + IL_005b: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldarg.1 - IL_0063: ldnull - IL_0064: cgt.un - IL_0066: brfalse.s IL_006a + IL_005c: ldarg.1 + IL_005d: brfalse.s IL_0061 .line 16707566,16707566 : 0,0 '' - IL_0068: ldc.i4.m1 - IL_0069: ret + IL_005f: ldc.i4.m1 + IL_0060: ret .line 16707566,16707566 : 0,0 '' - IL_006a: ldc.i4.0 - IL_006b: ret + IL_0061: ldc.i4.0 + IL_0062: ret } // end of method Point::CompareTo .method public hidebysig virtual final @@ -270,7 +264,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 125 (0x7d) + // Code size 116 (0x74) .maxstack 4 .locals init ([0] class TestFunction24/Point V_0, [1] class TestFunction24/Point V_1, @@ -289,161 +283,153 @@ IL_0008: stloc.1 .line 16707566,16707566 : 0,0 '' IL_0009: ldarg.0 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse.s IL_006e + IL_000a: brfalse.s IL_0068 .line 16707566,16707566 : 0,0 '' - IL_000f: ldarg.1 - IL_0010: unbox.any TestFunction24/Point - IL_0015: ldnull - IL_0016: cgt.un - IL_0018: brfalse.s IL_006c + IL_000c: ldarg.1 + IL_000d: unbox.any TestFunction24/Point + IL_0012: brfalse.s IL_0066 .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.2 - IL_001b: stloc.3 - IL_001c: ldarg.0 - IL_001d: ldfld int32 TestFunction24/Point::x@ - IL_0022: stloc.s V_4 - IL_0024: ldloc.1 - IL_0025: ldfld int32 TestFunction24/Point::x@ - IL_002a: stloc.s V_5 + IL_0014: ldarg.2 + IL_0015: stloc.3 + IL_0016: ldarg.0 + IL_0017: ldfld int32 TestFunction24/Point::x@ + IL_001c: stloc.s V_4 + IL_001e: ldloc.1 + IL_001f: ldfld int32 TestFunction24/Point::x@ + IL_0024: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_002c: ldloc.s V_4 - IL_002e: ldloc.s V_5 - IL_0030: bge.s IL_0036 + IL_0026: ldloc.s V_4 + IL_0028: ldloc.s V_5 + IL_002a: bge.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0032: ldc.i4.m1 + IL_002c: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0033: nop - IL_0034: br.s IL_003d + IL_002d: nop + IL_002e: br.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0036: ldloc.s V_4 - IL_0038: ldloc.s V_5 - IL_003a: cgt + IL_0030: ldloc.s V_4 + IL_0032: ldloc.s V_5 + IL_0034: cgt .line 16707566,16707566 : 0,0 '' - IL_003c: nop + IL_0036: nop .line 16707566,16707566 : 0,0 '' - IL_003d: stloc.2 + IL_0037: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ldc.i4.0 - IL_0040: bge.s IL_0044 + IL_0038: ldloc.2 + IL_0039: ldc.i4.0 + IL_003a: bge.s IL_003e .line 16707566,16707566 : 0,0 '' - IL_0042: ldloc.2 - IL_0043: ret + IL_003c: ldloc.2 + IL_003d: ret .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ldc.i4.0 - IL_0046: ble.s IL_004a + IL_003e: ldloc.2 + IL_003f: ldc.i4.0 + IL_0040: ble.s IL_0044 .line 16707566,16707566 : 0,0 '' - IL_0048: ldloc.2 - IL_0049: ret + IL_0042: ldloc.2 + IL_0043: ret .line 16707566,16707566 : 0,0 '' - IL_004a: ldarg.2 - IL_004b: stloc.s V_6 - IL_004d: ldarg.0 - IL_004e: ldfld int32 TestFunction24/Point::y@ - IL_0053: stloc.s V_7 - IL_0055: ldloc.1 - IL_0056: ldfld int32 TestFunction24/Point::y@ - IL_005b: stloc.s V_8 + IL_0044: ldarg.2 + IL_0045: stloc.s V_6 + IL_0047: ldarg.0 + IL_0048: ldfld int32 TestFunction24/Point::y@ + IL_004d: stloc.s V_7 + IL_004f: ldloc.1 + IL_0050: ldfld int32 TestFunction24/Point::y@ + IL_0055: stloc.s V_8 .line 16707566,16707566 : 0,0 '' - IL_005d: ldloc.s V_7 - IL_005f: ldloc.s V_8 - IL_0061: bge.s IL_0065 + IL_0057: ldloc.s V_7 + IL_0059: ldloc.s V_8 + IL_005b: bge.s IL_005f .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.m1 - IL_0064: ret + IL_005d: ldc.i4.m1 + IL_005e: ret .line 16707566,16707566 : 0,0 '' - IL_0065: ldloc.s V_7 - IL_0067: ldloc.s V_8 - IL_0069: cgt - IL_006b: ret + IL_005f: ldloc.s V_7 + IL_0061: ldloc.s V_8 + IL_0063: cgt + IL_0065: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.1 - IL_006d: ret + IL_0066: ldc.i4.1 + IL_0067: ret .line 16707566,16707566 : 0,0 '' - IL_006e: ldarg.1 - IL_006f: unbox.any TestFunction24/Point - IL_0074: ldnull - IL_0075: cgt.un - IL_0077: brfalse.s IL_007b + IL_0068: ldarg.1 + IL_0069: unbox.any TestFunction24/Point + IL_006e: brfalse.s IL_0072 .line 16707566,16707566 : 0,0 '' - IL_0079: ldc.i4.m1 - IL_007a: ret + IL_0070: ldc.i4.m1 + IL_0071: ret .line 16707566,16707566 : 0,0 '' - IL_007b: ldc.i4.0 - IL_007c: ret + IL_0072: ldc.i4.0 + IL_0073: ret } // end of method Point::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 58 (0x3a) + // Code size 55 (0x37) .maxstack 7 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IEqualityComparer V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0038 + IL_0001: brfalse.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.1 - IL_000e: stloc.1 - IL_000f: ldarg.0 - IL_0010: ldfld int32 TestFunction24/Point::y@ + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 TestFunction24/Point::y@ + IL_0012: ldloc.0 + IL_0013: ldc.i4.6 + IL_0014: shl IL_0015: ldloc.0 - IL_0016: ldc.i4.6 - IL_0017: shl - IL_0018: ldloc.0 - IL_0019: ldc.i4.2 - IL_001a: shr - IL_001b: add - IL_001c: add - IL_001d: add - IL_001e: stloc.0 - IL_001f: ldc.i4 0x9e3779b9 - IL_0024: ldarg.1 - IL_0025: stloc.2 - IL_0026: ldarg.0 - IL_0027: ldfld int32 TestFunction24/Point::x@ + IL_0016: ldc.i4.2 + IL_0017: shr + IL_0018: add + IL_0019: add + IL_001a: add + IL_001b: stloc.0 + IL_001c: ldc.i4 0x9e3779b9 + IL_0021: ldarg.1 + IL_0022: stloc.2 + IL_0023: ldarg.0 + IL_0024: ldfld int32 TestFunction24/Point::x@ + IL_0029: ldloc.0 + IL_002a: ldc.i4.6 + IL_002b: shl IL_002c: ldloc.0 - IL_002d: ldc.i4.6 - IL_002e: shl - IL_002f: ldloc.0 - IL_0030: ldc.i4.2 - IL_0031: shr - IL_0032: add - IL_0033: add - IL_0034: add - IL_0035: stloc.0 - IL_0036: ldloc.0 - IL_0037: ret - - .line 16707566,16707566 : 0,0 '' - IL_0038: ldc.i4.0 - IL_0039: ret + IL_002d: ldc.i4.2 + IL_002e: shr + IL_002f: add + IL_0030: add + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.0 + IL_0034: ret + + .line 16707566,16707566 : 0,0 '' + IL_0035: ldc.i4.0 + IL_0036: ret } // end of method Point::GetHashCode .method public hidebysig virtual final @@ -463,7 +449,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 65 (0x41) + // Code size 62 (0x3e) .maxstack 4 .locals init ([0] class TestFunction24/Point V_0, [1] class TestFunction24/Point V_1, @@ -471,106 +457,100 @@ [3] class [mscorlib]System.Collections.IEqualityComparer V_3) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0039 + IL_0001: brfalse.s IL_0036 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst TestFunction24/Point - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst TestFunction24/Point + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0037 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: stloc.1 + IL_000d: ldloc.0 + IL_000e: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.2 - IL_0013: stloc.2 - IL_0014: ldarg.0 - IL_0015: ldfld int32 TestFunction24/Point::x@ - IL_001a: ldloc.1 - IL_001b: ldfld int32 TestFunction24/Point::x@ - IL_0020: ceq - IL_0022: brfalse.s IL_0035 + IL_000f: ldarg.2 + IL_0010: stloc.2 + IL_0011: ldarg.0 + IL_0012: ldfld int32 TestFunction24/Point::x@ + IL_0017: ldloc.1 + IL_0018: ldfld int32 TestFunction24/Point::x@ + IL_001d: ceq + IL_001f: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0024: ldarg.2 - IL_0025: stloc.3 - IL_0026: ldarg.0 - IL_0027: ldfld int32 TestFunction24/Point::y@ - IL_002c: ldloc.1 - IL_002d: ldfld int32 TestFunction24/Point::y@ - IL_0032: ceq - IL_0034: ret + IL_0021: ldarg.2 + IL_0022: stloc.3 + IL_0023: ldarg.0 + IL_0024: ldfld int32 TestFunction24/Point::y@ + IL_0029: ldloc.1 + IL_002a: ldfld int32 TestFunction24/Point::y@ + IL_002f: ceq + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldc.i4.0 - IL_0038: ret + IL_0034: ldc.i4.0 + IL_0035: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldarg.1 - IL_003a: ldnull - IL_003b: cgt.un - IL_003d: ldc.i4.0 - IL_003e: ceq - IL_0040: ret + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: ldc.i4.0 + IL_003b: ceq + IL_003d: ret } // end of method Point::Equals .method public hidebysig virtual final instance bool Equals(class TestFunction24/Point obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 47 (0x2f) .maxstack 8 .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002d + IL_0001: brfalse.s IL_0027 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_002b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 + IL_0006: ldarg.0 + IL_0007: ldfld int32 TestFunction24/Point::x@ + IL_000c: ldarg.1 IL_000d: ldfld int32 TestFunction24/Point::x@ - IL_0012: ldarg.1 - IL_0013: ldfld int32 TestFunction24/Point::x@ - IL_0018: bne.un.s IL_0029 + IL_0012: bne.un.s IL_0023 .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 + IL_0014: ldarg.0 + IL_0015: ldfld int32 TestFunction24/Point::y@ + IL_001a: ldarg.1 IL_001b: ldfld int32 TestFunction24/Point::y@ - IL_0020: ldarg.1 - IL_0021: ldfld int32 TestFunction24/Point::y@ - IL_0026: ceq - IL_0028: ret + IL_0020: ceq + IL_0022: ret .line 16707566,16707566 : 0,0 '' - IL_0029: ldc.i4.0 - IL_002a: ret + IL_0023: ldc.i4.0 + IL_0024: ret .line 16707566,16707566 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_0025: ldc.i4.0 + IL_0026: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldarg.1 - IL_002e: ldnull - IL_002f: cgt.un - IL_0031: ldc.i4.0 - IL_0032: ceq - IL_0034: ret + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret } // end of method Point::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnList01.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnList01.il.bsl index aaa09da6b40..c5ea752be6d 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnList01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnList01.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x000002F0 Length: 0x000000DB } .module ForEachOnList01.dll -// MVID: {61EFEE9C-56DF-F74F-A745-03839CEEEF61} +// MVID: {6220E4F8-56DF-F74F-A745-0383F8E42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05180000 +// Image base: 0x06C70000 // =============== CLASS MEMBERS DECLARATION =================== @@ -139,7 +139,7 @@ .method public static void test1(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 lst) cil managed { - // Code size 41 (0x29) + // Code size 38 (0x26) .maxstack 4 .locals init ([0] int32 z, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -156,33 +156,31 @@ IL_000a: stloc.2 .line 9,9 : 12,14 '' IL_000b: ldloc.2 - IL_000c: ldnull - IL_000d: cgt.un - IL_000f: brfalse.s IL_0028 + IL_000c: brfalse.s IL_0025 - IL_0011: ldloc.1 - IL_0012: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_0017: stloc.3 + IL_000e: ldloc.1 + IL_000f: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0014: stloc.3 .line 10,10 : 10,20 '' - IL_0018: ldloc.0 - IL_0019: ldloc.3 - IL_001a: add - IL_001b: stloc.0 - IL_001c: ldloc.2 - IL_001d: stloc.1 - IL_001e: ldloc.1 - IL_001f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0024: stloc.2 + IL_0015: ldloc.0 + IL_0016: ldloc.3 + IL_0017: add + IL_0018: stloc.0 + IL_0019: ldloc.2 + IL_001a: stloc.1 + IL_001b: ldloc.1 + IL_001c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0021: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0025: nop - IL_0026: br.s IL_000b + IL_0022: nop + IL_0023: br.s IL_000b - IL_0028: ret + IL_0025: ret } // end of method ForEachOnList01::test1 .method public static void test2() cil managed { - // Code size 63 (0x3f) + // Code size 60 (0x3c) .maxstack 6 .locals init ([0] int32 z, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -208,33 +206,31 @@ IL_0020: stloc.2 .line 14,14 : 12,14 '' IL_0021: ldloc.2 - IL_0022: ldnull - IL_0023: cgt.un - IL_0025: brfalse.s IL_003e + IL_0022: brfalse.s IL_003b - IL_0027: ldloc.1 - IL_0028: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_002d: stloc.3 + IL_0024: ldloc.1 + IL_0025: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_002a: stloc.3 .line 15,15 : 10,20 '' - IL_002e: ldloc.0 - IL_002f: ldloc.3 - IL_0030: add - IL_0031: stloc.0 - IL_0032: ldloc.2 - IL_0033: stloc.1 - IL_0034: ldloc.1 - IL_0035: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003a: stloc.2 + IL_002b: ldloc.0 + IL_002c: ldloc.3 + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.2 + IL_0030: stloc.1 + IL_0031: ldloc.1 + IL_0032: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0037: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003b: nop - IL_003c: br.s IL_0021 + IL_0038: nop + IL_0039: br.s IL_0021 - IL_003e: ret + IL_003b: ret } // end of method ForEachOnList01::test2 .method public static void test3() cil managed { - // Code size 67 (0x43) + // Code size 64 (0x40) .maxstack 6 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 xs, [1] int32 z, @@ -264,33 +260,31 @@ IL_0022: stloc.3 .line 20,20 : 12,14 '' IL_0023: ldloc.3 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: brfalse.s IL_0042 + IL_0024: brfalse.s IL_003f - IL_0029: ldloc.2 - IL_002a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_002f: stloc.s x + IL_0026: ldloc.2 + IL_0027: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_002c: stloc.s x .line 21,21 : 10,20 '' - IL_0031: ldloc.1 - IL_0032: ldloc.s x - IL_0034: add - IL_0035: stloc.1 - IL_0036: ldloc.3 - IL_0037: stloc.2 - IL_0038: ldloc.2 - IL_0039: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003e: stloc.3 + IL_002e: ldloc.1 + IL_002f: ldloc.s x + IL_0031: add + IL_0032: stloc.1 + IL_0033: ldloc.3 + IL_0034: stloc.2 + IL_0035: ldloc.2 + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003b: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_003f: nop - IL_0040: br.s IL_0023 + IL_003c: nop + IL_003d: br.s IL_0023 - IL_0042: ret + IL_003f: ret } // end of method ForEachOnList01::test3 .method public static void test4() cil managed { - // Code size 67 (0x43) + // Code size 64 (0x40) .maxstack 6 .locals init ([0] int32 z, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 xs, @@ -320,33 +314,31 @@ IL_0022: stloc.3 .line 26,26 : 12,14 '' IL_0023: ldloc.3 - IL_0024: ldnull - IL_0025: cgt.un - IL_0027: brfalse.s IL_0042 + IL_0024: brfalse.s IL_003f - IL_0029: ldloc.2 - IL_002a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_002f: stloc.s x + IL_0026: ldloc.2 + IL_0027: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_002c: stloc.s x .line 27,27 : 10,20 '' - IL_0031: ldloc.0 - IL_0032: ldloc.s x - IL_0034: add - IL_0035: stloc.0 - IL_0036: ldloc.3 - IL_0037: stloc.2 - IL_0038: ldloc.2 - IL_0039: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_003e: stloc.3 + IL_002e: ldloc.0 + IL_002f: ldloc.s x + IL_0031: add + IL_0032: stloc.0 + IL_0033: ldloc.3 + IL_0034: stloc.2 + IL_0035: ldloc.2 + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003b: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_003f: nop - IL_0040: br.s IL_0023 + IL_003c: nop + IL_003d: br.s IL_0023 - IL_0042: ret + IL_003f: ret } // end of method ForEachOnList01::test4 .method public static void test5() cil managed { - // Code size 90 (0x5a) + // Code size 87 (0x57) .maxstack 6 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 xs, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -373,39 +365,37 @@ IL_0020: stloc.2 .line 31,31 : 12,14 '' IL_0021: ldloc.2 - IL_0022: ldnull - IL_0023: cgt.un - IL_0025: brfalse.s IL_0059 + IL_0022: brfalse.s IL_0056 - IL_0027: ldloc.1 - IL_0028: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_002d: stloc.3 + IL_0024: ldloc.1 + IL_0025: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_002a: stloc.3 .line 32,32 : 10,24 '' - IL_002e: ldstr "%A" - IL_0033: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) - IL_0038: stloc.s V_4 - IL_003a: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_003f: ldloc.s V_4 - IL_0041: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, + IL_002b: ldstr "%A" + IL_0030: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) + IL_0035: stloc.s V_4 + IL_0037: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_003c: ldloc.s V_4 + IL_003e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0046: ldloc.3 - IL_0047: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_004c: pop - IL_004d: ldloc.2 - IL_004e: stloc.1 - IL_004f: ldloc.1 - IL_0050: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0055: stloc.2 + IL_0043: ldloc.3 + IL_0044: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0049: pop + IL_004a: ldloc.2 + IL_004b: stloc.1 + IL_004c: ldloc.1 + IL_004d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0052: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0056: nop - IL_0057: br.s IL_0021 + IL_0053: nop + IL_0054: br.s IL_0021 - IL_0059: ret + IL_0056: ret } // end of method ForEachOnList01::test5 .method public static void test6() cil managed { - // Code size 102 (0x66) + // Code size 99 (0x63) .maxstack 8 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -434,39 +424,37 @@ IL_002e: stloc.1 .line 36,36 : 11,13 '' IL_002f: ldloc.1 - IL_0030: ldnull - IL_0031: cgt.un - IL_0033: brfalse.s IL_0065 + IL_0030: brfalse.s IL_0062 - IL_0035: ldloc.0 - IL_0036: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_003b: stloc.2 + IL_0032: ldloc.0 + IL_0033: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0038: stloc.2 .line 41,41 : 9,23 '' - IL_003c: ldstr "%O" - IL_0041: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) - IL_0046: stloc.3 - IL_0047: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_004c: ldloc.3 - IL_004d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, + IL_0039: ldstr "%O" + IL_003e: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) + IL_0043: stloc.3 + IL_0044: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0049: ldloc.3 + IL_004a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0052: ldloc.2 - IL_0053: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0058: pop - IL_0059: ldloc.1 - IL_005a: stloc.0 - IL_005b: ldloc.0 - IL_005c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0061: stloc.1 + IL_004f: ldloc.2 + IL_0050: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0055: pop + IL_0056: ldloc.1 + IL_0057: stloc.0 + IL_0058: ldloc.0 + IL_0059: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_005e: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0062: nop - IL_0063: br.s IL_002f + IL_005f: nop + IL_0060: br.s IL_002f - IL_0065: ret + IL_0062: ret } // end of method ForEachOnList01::test6 .method public static void test7() cil managed { - // Code size 108 (0x6c) + // Code size 105 (0x69) .maxstack 8 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_0, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, @@ -496,39 +484,37 @@ IL_002e: stloc.1 .line 45,45 : 11,13 '' IL_002f: ldloc.1 - IL_0030: ldnull - IL_0031: cgt.un - IL_0033: brfalse.s IL_006b + IL_0030: brfalse.s IL_0068 - IL_0035: ldloc.0 - IL_0036: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_003b: stloc.2 + IL_0032: ldloc.0 + IL_0033: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0038: stloc.2 .line 50,50 : 9,24 '' - IL_003c: ldloc.2 - IL_003d: ldc.i4.1 - IL_003e: add - IL_003f: stloc.3 + IL_0039: ldloc.2 + IL_003a: ldc.i4.1 + IL_003b: add + IL_003c: stloc.3 .line 51,51 : 9,25 '' - IL_0040: ldstr "%O" - IL_0045: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) - IL_004a: stloc.s V_4 - IL_004c: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_0051: ldloc.s V_4 - IL_0053: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, + IL_003d: ldstr "%O" + IL_0042: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,int32>::.ctor(string) + IL_0047: stloc.s V_4 + IL_0049: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_004e: ldloc.s V_4 + IL_0050: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0058: ldloc.3 - IL_0059: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_005e: pop - IL_005f: ldloc.1 - IL_0060: stloc.0 - IL_0061: ldloc.0 - IL_0062: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0067: stloc.1 + IL_0055: ldloc.3 + IL_0056: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_005b: pop + IL_005c: ldloc.1 + IL_005d: stloc.0 + IL_005e: ldloc.0 + IL_005f: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_0064: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0068: nop - IL_0069: br.s IL_002f + IL_0065: nop + IL_0066: br.s IL_002f - IL_006b: ret + IL_0068: ret } // end of method ForEachOnList01::test7 } // end of class ForEachOnList01 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare05.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare05.il.bsl index ec8dc44767d..6831a0c3df9 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare05.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare05.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006E0 Length: 0x000003BA } .module Compare05.dll -// MVID: {61E0712B-051C-F88E-A745-03832B71E061} +// MVID: {6220E4FA-051C-F88E-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05910000 +// Image base: 0x06E50000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Compare05/CompareMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 110 (0x6e) .maxstack 4 .locals init ([0] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_1, @@ -189,110 +189,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare05.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + IL_0001: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0020: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.3 + IL_0046: ldloc.0 + IL_0047: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.1 + IL_004f: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_0067: ldarg.1 + IL_0068: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_006a: ldc.i4.m1 + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_006c: ldc.i4.0 + IL_006d: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -313,7 +307,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 124 (0x7c) + // Code size 115 (0x73) .maxstack 4 .locals init ([0] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_1, @@ -327,167 +321,159 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006d + IL_0008: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Compare05/CompareMicroPerfAndCodeGenerationTests/Key - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_006b + IL_000a: ldarg.1 + IL_000b: unbox.any Compare05/CompareMicroPerfAndCodeGenerationTests/Key + IL_0010: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_002c: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0026: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: bge.s IL_0038 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0035: nop - IL_0036: br.s IL_003f + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_003e: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003f: stloc.3 + IL_0039: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.3 - IL_0041: ldc.i4.0 - IL_0042: bge.s IL_0046 + IL_003a: ldloc.3 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.3 - IL_0045: ret + IL_003e: ldloc.3 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: ldloc.3 - IL_0047: ldc.i4.0 - IL_0048: ble.s IL_004c + IL_0040: ldloc.3 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_004a: ldloc.3 - IL_004b: ret + IL_0044: ldloc.3 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_004c: ldloc.1 - IL_004d: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.2 - IL_0055: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0046: ldloc.1 + IL_0047: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.2 + IL_004f: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: unbox.any Compare05/CompareMicroPerfAndCodeGenerationTests/Key - IL_0073: ldnull - IL_0074: cgt.un - IL_0076: brfalse.s IL_007a + IL_0067: ldarg.1 + IL_0068: unbox.any Compare05/CompareMicroPerfAndCodeGenerationTests/Key + IL_006d: brfalse.s IL_0071 .line 16707566,16707566 : 0,0 '' - IL_0078: ldc.i4.m1 - IL_0079: ret + IL_006f: ldc.i4.m1 + IL_0070: ret .line 16707566,16707566 : 0,0 '' - IL_007a: ldc.i4.0 - IL_007b: ret + IL_0071: ldc.i4.0 + IL_0072: ret } // end of method Key::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 57 (0x39) .maxstack 7 .locals init ([0] int32 V_0, [1] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add - IL_0020: add - IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl IL_002e: ldloc.0 - IL_002f: ldc.i4.6 - IL_0030: shl - IL_0031: ldloc.0 - IL_0032: ldc.i4.2 - IL_0033: shr - IL_0034: add - IL_0035: add - IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ret + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -507,123 +493,117 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_1, [2] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Compare05/CompareMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Compare05/CompareMicroPerfAndCodeGenerationTests/Key + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0013: ldloc.1 + IL_0014: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.2 + IL_001a: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0021: ldloc.1 + IL_0022: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.2 + IL_0028: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Compare05/CompareMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Key::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare06.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare06.il.bsl index 3b8f86e9aae..acd50e0b748 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare06.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare06.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006D8 Length: 0x000003BC } .module Compare06.dll -// MVID: {61E0712B-04FD-F88E-A745-03832B71E061} +// MVID: {6220E4FA-04FD-F88E-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04EF0000 +// Image base: 0x071C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -123,7 +123,7 @@ instance int32 CompareTo(class Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 101 (0x65) + // Code size 92 (0x5c) .maxstack 4 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IComparer V_1, @@ -132,103 +132,97 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare06.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_005b + IL_0001: brfalse.s IL_0055 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0059 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0053 .line 16707566,16707566 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: stloc.2 - IL_0019: ldarg.1 - IL_001a: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001f: stloc.3 + IL_0006: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: bge.s IL_0028 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: bge.s IL_0022 .line 16707566,16707566 : 0,0 '' - IL_0024: ldc.i4.m1 + IL_001e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0025: nop - IL_0026: br.s IL_002d + IL_001f: nop + IL_0020: br.s IL_0027 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.2 - IL_0029: ldloc.3 - IL_002a: cgt + IL_0022: ldloc.2 + IL_0023: ldloc.3 + IL_0024: cgt .line 16707566,16707566 : 0,0 '' - IL_002c: nop + IL_0026: nop + .line 16707566,16707566 : 0,0 '' + IL_0027: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0028: ldloc.0 + IL_0029: ldc.i4.0 + IL_002a: bge.s IL_002e + .line 16707566,16707566 : 0,0 '' - IL_002d: stloc.0 + IL_002c: ldloc.0 + IL_002d: ret + .line 16707566,16707566 : 0,0 '' IL_002e: ldloc.0 IL_002f: ldc.i4.0 - IL_0030: bge.s IL_0034 + IL_0030: ble.s IL_0034 .line 16707566,16707566 : 0,0 '' IL_0032: ldloc.0 IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldloc.0 - IL_0035: ldc.i4.0 - IL_0036: ble.s IL_003a - + IL_0034: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0039: stloc.1 + IL_003a: ldarg.0 + IL_003b: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0040: stloc.2 + IL_0041: ldarg.1 + IL_0042: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0047: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.0 - IL_0039: ret + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: bge.s IL_004e .line 16707566,16707566 : 0,0 '' - IL_003a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_003f: stloc.1 - IL_0040: ldarg.0 - IL_0041: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0046: stloc.2 - IL_0047: ldarg.1 - IL_0048: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_004d: stloc.3 + IL_004c: ldc.i4.m1 + IL_004d: ret + .line 16707566,16707566 : 0,0 '' IL_004e: ldloc.2 IL_004f: ldloc.3 - IL_0050: bge.s IL_0054 - - .line 16707566,16707566 : 0,0 '' - IL_0052: ldc.i4.m1 - IL_0053: ret - - .line 16707566,16707566 : 0,0 '' - IL_0054: ldloc.2 - IL_0055: ldloc.3 - IL_0056: cgt - IL_0058: ret + IL_0050: cgt + IL_0052: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldc.i4.1 - IL_005a: ret + IL_0053: ldc.i4.1 + IL_0054: ret .line 16707566,16707566 : 0,0 '' - IL_005b: ldarg.1 - IL_005c: ldnull - IL_005d: cgt.un - IL_005f: brfalse.s IL_0063 + IL_0055: ldarg.1 + IL_0056: brfalse.s IL_005a .line 16707566,16707566 : 0,0 '' - IL_0061: ldc.i4.m1 - IL_0062: ret + IL_0058: ldc.i4.m1 + IL_0059: ret .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.0 - IL_0064: ret + IL_005a: ldc.i4.0 + IL_005b: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final @@ -249,7 +243,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 106 (0x6a) + // Code size 97 (0x61) .maxstack 4 .locals init ([0] class Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR V_0, [1] int32 V_1, @@ -261,151 +255,143 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_005b + IL_0008: brfalse.s IL_0055 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0059 + IL_000a: ldarg.1 + IL_000b: unbox.any Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_0010: brfalse.s IL_0053 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001e: stloc.2 - IL_001f: ldloc.0 - IL_0020: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0025: stloc.3 + IL_0012: ldarg.0 + IL_0013: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_001f: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0026: ldloc.2 - IL_0027: ldloc.3 - IL_0028: bge.s IL_002e + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: bge.s IL_0028 .line 16707566,16707566 : 0,0 '' - IL_002a: ldc.i4.m1 + IL_0024: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002b: nop - IL_002c: br.s IL_0033 + IL_0025: nop + IL_0026: br.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.2 - IL_002f: ldloc.3 - IL_0030: cgt + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: cgt + .line 16707566,16707566 : 0,0 '' + IL_002c: nop .line 16707566,16707566 : 0,0 '' - IL_0032: nop + IL_002d: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0033: stloc.1 + IL_002e: ldloc.1 + IL_002f: ldc.i4.0 + IL_0030: bge.s IL_0034 + + .line 16707566,16707566 : 0,0 '' + IL_0032: ldloc.1 + IL_0033: ret + .line 16707566,16707566 : 0,0 '' IL_0034: ldloc.1 IL_0035: ldc.i4.0 - IL_0036: bge.s IL_003a + IL_0036: ble.s IL_003a .line 16707566,16707566 : 0,0 '' IL_0038: ldloc.1 IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.1 - IL_003b: ldc.i4.0 - IL_003c: ble.s IL_0040 - + IL_003a: ldarg.0 + IL_003b: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0040: stloc.2 + IL_0041: ldloc.0 + IL_0042: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0047: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.1 - IL_003f: ret + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: bge.s IL_004e .line 16707566,16707566 : 0,0 '' - IL_0040: ldarg.0 - IL_0041: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0046: stloc.2 - IL_0047: ldloc.0 - IL_0048: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_004d: stloc.3 + IL_004c: ldc.i4.m1 + IL_004d: ret + .line 16707566,16707566 : 0,0 '' IL_004e: ldloc.2 IL_004f: ldloc.3 - IL_0050: bge.s IL_0054 - - .line 16707566,16707566 : 0,0 '' - IL_0052: ldc.i4.m1 - IL_0053: ret + IL_0050: cgt + IL_0052: ret .line 16707566,16707566 : 0,0 '' - IL_0054: ldloc.2 - IL_0055: ldloc.3 - IL_0056: cgt - IL_0058: ret + IL_0053: ldc.i4.1 + IL_0054: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldc.i4.1 - IL_005a: ret + IL_0055: ldarg.1 + IL_0056: unbox.any Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_005b: brfalse.s IL_005f .line 16707566,16707566 : 0,0 '' - IL_005b: ldarg.1 - IL_005c: unbox.any Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR - IL_0061: ldnull - IL_0062: cgt.un - IL_0064: brfalse.s IL_0068 + IL_005d: ldc.i4.m1 + IL_005e: ret .line 16707566,16707566 : 0,0 '' - IL_0066: ldc.i4.m1 - IL_0067: ret - - .line 16707566,16707566 : 0,0 '' - IL_0068: ldc.i4.0 - IL_0069: ret + IL_005f: ldc.i4.0 + IL_0060: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 54 (0x36) + // Code size 51 (0x33) .maxstack 7 .locals init ([0] int32 V_0) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0034 + IL_0001: brfalse.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.0 - IL_000e: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl IL_0013: ldloc.0 - IL_0014: ldc.i4.6 - IL_0015: shl - IL_0016: ldloc.0 - IL_0017: ldc.i4.2 - IL_0018: shr - IL_0019: add - IL_001a: add - IL_001b: add - IL_001c: stloc.0 - IL_001d: ldc.i4 0x9e3779b9 - IL_0022: ldarg.0 - IL_0023: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl IL_0028: ldloc.0 - IL_0029: ldc.i4.6 - IL_002a: shl - IL_002b: ldloc.0 - IL_002c: ldc.i4.2 - IL_002d: shr - IL_002e: add - IL_002f: add - IL_0030: add - IL_0031: stloc.0 - IL_0032: ldloc.0 - IL_0033: ret + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_0031: ldc.i4.0 + IL_0032: ret } // end of method KeyR::GetHashCode .method public hidebysig virtual final @@ -425,103 +411,97 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 57 (0x39) + // Code size 54 (0x36) .maxstack 4 .locals init ([0] class Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR V_0) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0031 + IL_0001: brfalse.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002f + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0016: ldloc.0 - IL_0017: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001c: bne.un.s IL_002d + IL_000d: ldarg.0 + IL_000e: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0013: ldloc.0 + IL_0014: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: bne.un.s IL_002a .line 16707566,16707566 : 0,0 '' - IL_001e: ldarg.0 - IL_001f: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0024: ldloc.0 - IL_0025: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_002a: ceq - IL_002c: ret + IL_001b: ldarg.0 + IL_001c: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0021: ldloc.0 + IL_0022: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0027: ceq + IL_0029: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldc.i4.0 - IL_002e: ret + IL_002a: ldc.i4.0 + IL_002b: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldarg.1 - IL_0032: ldnull - IL_0033: cgt.un - IL_0035: ldc.i4.0 - IL_0036: ceq - IL_0038: ret + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: cgt.un + IL_0032: ldc.i4.0 + IL_0033: ceq + IL_0035: ret } // end of method KeyR::Equals .method public hidebysig virtual final instance bool Equals(class Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 47 (0x2f) .maxstack 8 .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002d + IL_0001: brfalse.s IL_0027 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_002b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 + IL_0006: ldarg.0 + IL_0007: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000c: ldarg.1 IL_000d: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0012: ldarg.1 - IL_0013: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: bne.un.s IL_0029 + IL_0012: bne.un.s IL_0023 .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 + IL_0014: ldarg.0 + IL_0015: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_001a: ldarg.1 IL_001b: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0020: ldarg.1 - IL_0021: ldfld int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0026: ceq - IL_0028: ret + IL_0020: ceq + IL_0022: ret .line 16707566,16707566 : 0,0 '' - IL_0029: ldc.i4.0 - IL_002a: ret + IL_0023: ldc.i4.0 + IL_0024: ret .line 16707566,16707566 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_0025: ldc.i4.0 + IL_0026: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldarg.1 - IL_002e: ldnull - IL_002f: cgt.un - IL_0031: ldc.i4.0 - IL_0032: ceq - IL_0034: ret + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret } // end of method KeyR::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare07.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare07.il.bsl index 58e70310db2..fba7d38dbf2 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare07.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare07.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000890 Length: 0x0000068C } .module Compare07.dll -// MVID: {61E0712B-05DE-F88E-A745-03832B71E061} +// MVID: {6220E4FA-05DE-F88E-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07590000 +// Image base: 0x06990000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 110 (0x6e) + // Code size 101 (0x65) .maxstack 5 .locals init ([0] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -189,92 +189,86 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare07.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0064 + IL_0001: brfalse.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0062 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_005c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0020: stloc.s V_5 + IL_0022: ldloc.3 + IL_0023: ldloc.s V_4 + IL_0025: ldloc.s V_5 + IL_0027: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0032: stloc.2 + IL_002c: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.2 - IL_0034: ldc.i4.0 - IL_0035: bge.s IL_0039 + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: bge.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0037: ldloc.2 - IL_0038: ret + IL_0031: ldloc.2 + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: ble.s IL_003f + IL_0033: ldloc.2 + IL_0034: ldc.i4.0 + IL_0035: ble.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_0037: ldloc.2 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0044: stloc.3 - IL_0045: ldloc.0 - IL_0046: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_004b: stloc.s V_4 - IL_004d: ldloc.1 - IL_004e: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0053: stloc.s V_5 - IL_0055: ldloc.3 - IL_0056: ldloc.s V_4 - IL_0058: ldloc.s V_5 - IL_005a: tail. - IL_005c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0039: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_003e: stloc.3 + IL_003f: ldloc.0 + IL_0040: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0045: stloc.s V_4 + IL_0047: ldloc.1 + IL_0048: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_004d: stloc.s V_5 + IL_004f: ldloc.3 + IL_0050: ldloc.s V_4 + IL_0052: ldloc.s V_5 + IL_0054: tail. + IL_0056: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0061: ret + IL_005b: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.1 - IL_0063: ret + IL_005c: ldc.i4.1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldarg.1 - IL_0065: ldnull - IL_0066: cgt.un - IL_0068: brfalse.s IL_006c + IL_005e: ldarg.1 + IL_005f: brfalse.s IL_0063 .line 16707566,16707566 : 0,0 '' - IL_006a: ldc.i4.m1 - IL_006b: ret + IL_0061: ldc.i4.m1 + IL_0062: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.0 - IL_006d: ret + IL_0063: ldc.i4.0 + IL_0064: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final @@ -296,7 +290,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 115 (0x73) + // Code size 106 (0x6a) .maxstack 5 .locals init ([0] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -310,160 +304,152 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0064 - - .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0062 - - .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop - .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_002c: stloc.s V_5 - IL_002e: ldarg.2 - IL_002f: ldloc.s V_4 - IL_0031: ldloc.s V_5 - IL_0033: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0008: brfalse.s IL_005e + + .line 16707566,16707566 : 0,0 '' + IL_000a: ldarg.1 + IL_000b: unbox.any class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0010: brfalse.s IL_005c + + .line 16707566,16707566 : 0,0 '' + IL_0012: ldarg.0 + IL_0013: pop + .line 16707566,16707566 : 0,0 '' + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0026: stloc.s V_5 + IL_0028: ldarg.2 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.s V_5 + IL_002d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0038: stloc.3 + IL_0032: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.3 - IL_003a: ldc.i4.0 - IL_003b: bge.s IL_003f + IL_0033: ldloc.3 + IL_0034: ldc.i4.0 + IL_0035: bge.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.3 - IL_003e: ret + IL_0037: ldloc.3 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.3 - IL_0040: ldc.i4.0 - IL_0041: ble.s IL_0045 + IL_0039: ldloc.3 + IL_003a: ldc.i4.0 + IL_003b: ble.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0043: ldloc.3 - IL_0044: ret + IL_003d: ldloc.3 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.1 - IL_0046: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_004b: stloc.s V_4 - IL_004d: ldloc.2 - IL_004e: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0053: stloc.s V_5 - IL_0055: ldarg.2 - IL_0056: ldloc.s V_4 - IL_0058: ldloc.s V_5 - IL_005a: tail. - IL_005c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_003f: ldloc.1 + IL_0040: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0045: stloc.s V_4 + IL_0047: ldloc.2 + IL_0048: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_004d: stloc.s V_5 + IL_004f: ldarg.2 + IL_0050: ldloc.s V_4 + IL_0052: ldloc.s V_5 + IL_0054: tail. + IL_0056: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0061: ret + IL_005b: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.1 - IL_0063: ret + IL_005c: ldc.i4.1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldarg.1 - IL_0065: unbox.any class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_006a: ldnull - IL_006b: cgt.un - IL_006d: brfalse.s IL_0071 + IL_005e: ldarg.1 + IL_005f: unbox.any class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0064: brfalse.s IL_0068 .line 16707566,16707566 : 0,0 '' - IL_006f: ldc.i4.m1 - IL_0070: ret + IL_0066: ldc.i4.m1 + IL_0067: ret .line 16707566,16707566 : 0,0 '' - IL_0071: ldc.i4.0 - IL_0072: ret + IL_0068: ldc.i4.0 + IL_0069: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 76 (0x4c) + // Code size 73 (0x49) .maxstack 7 .locals init ([0] int32 V_0, [1] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] !a V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004a + IL_0001: brfalse.s IL_0047 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0019: stloc.2 - IL_001a: ldarg.1 - IL_001b: ldloc.2 - IL_001c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0016: stloc.2 + IL_0017: ldarg.1 + IL_0018: ldloc.2 + IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0) + IL_001e: ldloc.0 + IL_001f: ldc.i4.6 + IL_0020: shl IL_0021: ldloc.0 - IL_0022: ldc.i4.6 - IL_0023: shl - IL_0024: ldloc.0 - IL_0025: ldc.i4.2 - IL_0026: shr - IL_0027: add - IL_0028: add - IL_0029: add - IL_002a: stloc.0 - IL_002b: ldc.i4 0x9e3779b9 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0036: stloc.2 - IL_0037: ldarg.1 - IL_0038: ldloc.2 - IL_0039: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_0022: ldc.i4.2 + IL_0023: shr + IL_0024: add + IL_0025: add + IL_0026: add + IL_0027: stloc.0 + IL_0028: ldc.i4 0x9e3779b9 + IL_002d: ldloc.1 + IL_002e: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0033: stloc.2 + IL_0034: ldarg.1 + IL_0035: ldloc.2 + IL_0036: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0) + IL_003b: ldloc.0 + IL_003c: ldc.i4.6 + IL_003d: shl IL_003e: ldloc.0 - IL_003f: ldc.i4.6 - IL_0040: shl - IL_0041: ldloc.0 - IL_0042: ldc.i4.2 - IL_0043: shr - IL_0044: add - IL_0045: add - IL_0046: add - IL_0047: stloc.0 - IL_0048: ldloc.0 - IL_0049: ret + IL_003f: ldc.i4.2 + IL_0040: shr + IL_0041: add + IL_0042: add + IL_0043: add + IL_0044: stloc.0 + IL_0045: ldloc.0 + IL_0046: ret .line 16707566,16707566 : 0,0 '' - IL_004a: ldc.i4.0 - IL_004b: ret + IL_0047: ldc.i4.0 + IL_0048: ret } // end of method GenericKey`1::GetHashCode .method public hidebysig virtual final @@ -483,7 +469,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 87 (0x57) + // Code size 84 (0x54) .maxstack 5 .locals init ([0] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -492,79 +478,77 @@ [4] !a V_4) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004f + IL_0001: brfalse.s IL_004c .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_004d + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_004a .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 - .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001c: stloc.3 - IL_001d: ldloc.2 - IL_001e: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0023: stloc.s V_4 - IL_0025: ldarg.2 - IL_0026: ldloc.3 - IL_0027: ldloc.s V_4 - IL_0029: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0013: ldloc.1 + IL_0014: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0020: stloc.s V_4 + IL_0022: ldarg.2 + IL_0023: ldloc.3 + IL_0024: ldloc.s V_4 + IL_0026: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_002e: brfalse.s IL_004b + IL_002b: brfalse.s IL_0048 .line 16707566,16707566 : 0,0 '' - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_003d: stloc.s V_4 - IL_003f: ldarg.2 - IL_0040: ldloc.3 - IL_0041: ldloc.s V_4 - IL_0043: tail. - IL_0045: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_002d: ldloc.1 + IL_002e: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0033: stloc.3 + IL_0034: ldloc.2 + IL_0035: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_003a: stloc.s V_4 + IL_003c: ldarg.2 + IL_003d: ldloc.3 + IL_003e: ldloc.s V_4 + IL_0040: tail. + IL_0042: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_004a: ret + IL_0047: ret .line 16707566,16707566 : 0,0 '' - IL_004b: ldc.i4.0 - IL_004c: ret + IL_0048: ldc.i4.0 + IL_0049: ret .line 16707566,16707566 : 0,0 '' - IL_004d: ldc.i4.0 - IL_004e: ret + IL_004a: ldc.i4.0 + IL_004b: ret .line 16707566,16707566 : 0,0 '' - IL_004f: ldarg.1 - IL_0050: ldnull - IL_0051: cgt.un - IL_0053: ldc.i4.0 - IL_0054: ceq - IL_0056: ret + IL_004c: ldarg.1 + IL_004d: ldnull + IL_004e: cgt.un + IL_0050: ldc.i4.0 + IL_0051: ceq + IL_0053: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final instance bool Equals(class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 77 (0x4d) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -572,66 +556,62 @@ [3] !a V_3) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0045 + IL_0001: brfalse.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0043 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_003d .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_000c: ldloc.0 + IL_000d: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0027: brfalse.s IL_0041 - - .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.0 - IL_002a: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_002f: stloc.2 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldloc.3 - IL_0039: tail. - IL_003b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_0021: brfalse.s IL_003b + + .line 16707566,16707566 : 0,0 '' + IL_0023: ldloc.0 + IL_0024: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0029: stloc.2 + IL_002a: ldloc.1 + IL_002b: ldfld !0 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0030: stloc.3 + IL_0031: ldloc.2 + IL_0032: ldloc.3 + IL_0033: tail. + IL_0035: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0040: ret + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_0041: ldc.i4.0 - IL_0042: ret + IL_003b: ldc.i4.0 + IL_003c: ret .line 16707566,16707566 : 0,0 '' - IL_0043: ldc.i4.0 - IL_0044: ret + IL_003d: ldc.i4.0 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldarg.1 - IL_0046: ldnull - IL_0047: cgt.un - IL_0049: ldc.i4.0 - IL_004a: ceq - IL_004c: ret + IL_003f: ldarg.1 + IL_0040: ldnull + IL_0041: cgt.un + IL_0043: ldc.i4.0 + IL_0044: ceq + IL_0046: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare10.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare10.il.bsl index 8da7724afcf..0a051d5133e 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare10.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare10.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000A98 Length: 0x0000058E } .module Compare10.dll -// MVID: {61E0712B-04BF-1753-A745-03832B71E061} +// MVID: {6220E4FA-04BF-1753-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06F10000 +// Image base: 0x07050000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Compare10/CompareMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 110 (0x6e) .maxstack 4 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_1, @@ -189,110 +189,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare10.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + IL_0001: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0020: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.3 + IL_0046: ldloc.0 + IL_0047: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.1 + IL_004f: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_0067: ldarg.1 + IL_0068: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_006a: ldc.i4.m1 + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_006c: ldc.i4.0 + IL_006d: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -313,7 +307,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 124 (0x7c) + // Code size 115 (0x73) .maxstack 4 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_1, @@ -327,167 +321,159 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006d + IL_0008: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/Key - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_006b + IL_000a: ldarg.1 + IL_000b: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/Key + IL_0010: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_002c: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0026: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: bge.s IL_0038 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0035: nop - IL_0036: br.s IL_003f + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_003e: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003f: stloc.3 + IL_0039: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.3 - IL_0041: ldc.i4.0 - IL_0042: bge.s IL_0046 + IL_003a: ldloc.3 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.3 - IL_0045: ret + IL_003e: ldloc.3 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: ldloc.3 - IL_0047: ldc.i4.0 - IL_0048: ble.s IL_004c + IL_0040: ldloc.3 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_004a: ldloc.3 - IL_004b: ret + IL_0044: ldloc.3 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_004c: ldloc.1 - IL_004d: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.2 - IL_0055: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0046: ldloc.1 + IL_0047: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.2 + IL_004f: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/Key - IL_0073: ldnull - IL_0074: cgt.un - IL_0076: brfalse.s IL_007a + IL_0067: ldarg.1 + IL_0068: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/Key + IL_006d: brfalse.s IL_0071 .line 16707566,16707566 : 0,0 '' - IL_0078: ldc.i4.m1 - IL_0079: ret + IL_006f: ldc.i4.m1 + IL_0070: ret .line 16707566,16707566 : 0,0 '' - IL_007a: ldc.i4.0 - IL_007b: ret + IL_0071: ldc.i4.0 + IL_0072: ret } // end of method Key::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 57 (0x39) .maxstack 7 .locals init ([0] int32 V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add - IL_0020: add - IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl IL_002e: ldloc.0 - IL_002f: ldc.i4.6 - IL_0030: shl - IL_0031: ldloc.0 - IL_0032: ldc.i4.2 - IL_0033: shr - IL_0034: add - IL_0035: add - IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ret + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -507,123 +493,117 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_1, [2] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/Key + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0013: ldloc.1 + IL_0014: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.2 + IL_001a: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0021: ldloc.1 + IL_0022: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.2 + IL_0028: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Compare10/CompareMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -802,7 +782,7 @@ instance int32 CompareTo(class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 169 (0xa9) + // Code size 160 (0xa0) .maxstack 5 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -817,116 +797,110 @@ [10] int32 V_10) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_009f + IL_0001: brfalse IL_0099 .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse IL_009d + IL_0006: ldarg.1 + IL_0007: brfalse IL_0097 .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000c: ldarg.0 + IL_000d: pop .line 16707566,16707566 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.0 - IL_0016: ldarg.1 - IL_0017: stloc.1 - IL_0018: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_001d: stloc.3 - IL_001e: ldloc.0 - IL_001f: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.1 - IL_0027: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_002c: stloc.s V_5 - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: ldloc.3 - IL_0033: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0017: stloc.3 + IL_0018: ldloc.0 + IL_0019: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.1 + IL_0021: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0026: stloc.s V_5 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: ldloc.3 + IL_002d: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0038: stloc.2 + IL_0032: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: bge.s IL_003f + IL_0033: ldloc.2 + IL_0034: ldc.i4.0 + IL_0035: bge.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_0037: ldloc.2 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ldc.i4.0 - IL_0041: ble.s IL_0045 + IL_0039: ldloc.2 + IL_003a: ldc.i4.0 + IL_003b: ble.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0043: ldloc.2 - IL_0044: ret + IL_003d: ldloc.2 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004a: stloc.3 - IL_004b: ldloc.0 - IL_004c: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0051: stloc.s V_6 - IL_0053: ldloc.1 - IL_0054: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0059: stloc.s V_7 - IL_005b: ldloc.s V_6 - IL_005d: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0062: stloc.s V_4 - IL_0064: ldloc.s V_6 - IL_0066: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_006b: stloc.s V_5 - IL_006d: ldloc.s V_7 - IL_006f: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0074: stloc.s V_8 - IL_0076: ldloc.s V_7 - IL_0078: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_007d: stloc.s V_9 - IL_007f: ldloc.s V_4 - IL_0081: ldloc.s V_8 - IL_0083: ldloc.3 - IL_0084: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_003f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0044: stloc.3 + IL_0045: ldloc.0 + IL_0046: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_004b: stloc.s V_6 + IL_004d: ldloc.1 + IL_004e: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0053: stloc.s V_7 + IL_0055: ldloc.s V_6 + IL_0057: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_005c: stloc.s V_4 + IL_005e: ldloc.s V_6 + IL_0060: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0065: stloc.s V_5 + IL_0067: ldloc.s V_7 + IL_0069: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_006e: stloc.s V_8 + IL_0070: ldloc.s V_7 + IL_0072: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0077: stloc.s V_9 + IL_0079: ldloc.s V_4 + IL_007b: ldloc.s V_8 + IL_007d: ldloc.3 + IL_007e: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0089: stloc.s V_10 + IL_0083: stloc.s V_10 .line 16707566,16707566 : 0,0 '' - IL_008b: ldloc.s V_10 - IL_008d: brfalse.s IL_0092 + IL_0085: ldloc.s V_10 + IL_0087: brfalse.s IL_008c .line 16707566,16707566 : 0,0 '' - IL_008f: ldloc.s V_10 - IL_0091: ret + IL_0089: ldloc.s V_10 + IL_008b: ret .line 16707566,16707566 : 0,0 '' - IL_0092: ldloc.s V_5 - IL_0094: ldloc.s V_9 - IL_0096: ldloc.3 - IL_0097: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_008c: ldloc.s V_5 + IL_008e: ldloc.s V_9 + IL_0090: ldloc.3 + IL_0091: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_009c: ret + IL_0096: ret .line 16707566,16707566 : 0,0 '' - IL_009d: ldc.i4.1 - IL_009e: ret + IL_0097: ldc.i4.1 + IL_0098: ret .line 16707566,16707566 : 0,0 '' - IL_009f: ldarg.1 - IL_00a0: ldnull - IL_00a1: cgt.un - IL_00a3: brfalse.s IL_00a7 + IL_0099: ldarg.1 + IL_009a: brfalse.s IL_009e .line 16707566,16707566 : 0,0 '' - IL_00a5: ldc.i4.m1 - IL_00a6: ret + IL_009c: ldc.i4.m1 + IL_009d: ret .line 16707566,16707566 : 0,0 '' - IL_00a7: ldc.i4.0 - IL_00a8: ret + IL_009e: ldc.i4.0 + IL_009f: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final @@ -947,7 +921,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 174 (0xae) + // Code size 165 (0xa5) .maxstack 5 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -966,121 +940,115 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse IL_009f + IL_0008: brfalse IL_0099 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.1 - IL_0011: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_0016: ldnull - IL_0017: cgt.un - IL_0019: brfalse IL_009d - - .line 16707566,16707566 : 0,0 '' - IL_001e: ldarg.0 - IL_001f: pop - .line 16707566,16707566 : 0,0 '' - IL_0020: ldarg.0 - IL_0021: stloc.1 - IL_0022: ldloc.0 - IL_0023: stloc.2 - IL_0024: ldloc.1 - IL_0025: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_002a: stloc.s V_4 - IL_002c: ldloc.2 - IL_002d: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0032: stloc.s V_5 - IL_0034: ldloc.s V_4 - IL_0036: ldloc.s V_5 - IL_0038: ldarg.2 - IL_0039: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_000d: ldarg.1 + IL_000e: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_0013: brfalse IL_0097 + + .line 16707566,16707566 : 0,0 '' + IL_0018: ldarg.0 + IL_0019: pop + .line 16707566,16707566 : 0,0 '' + IL_001a: ldarg.0 + IL_001b: stloc.1 + IL_001c: ldloc.0 + IL_001d: stloc.2 + IL_001e: ldloc.1 + IL_001f: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0024: stloc.s V_4 + IL_0026: ldloc.2 + IL_0027: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_002c: stloc.s V_5 + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: ldarg.2 + IL_0033: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_003e: stloc.3 + IL_0038: stloc.3 + .line 16707566,16707566 : 0,0 '' + IL_0039: ldloc.3 + IL_003a: ldc.i4.0 + IL_003b: bge.s IL_003f + + .line 16707566,16707566 : 0,0 '' + IL_003d: ldloc.3 + IL_003e: ret + .line 16707566,16707566 : 0,0 '' IL_003f: ldloc.3 IL_0040: ldc.i4.0 - IL_0041: bge.s IL_0045 + IL_0041: ble.s IL_0045 .line 16707566,16707566 : 0,0 '' IL_0043: ldloc.3 IL_0044: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.3 - IL_0046: ldc.i4.0 - IL_0047: ble.s IL_004b - - .line 16707566,16707566 : 0,0 '' - IL_0049: ldloc.3 - IL_004a: ret - - .line 16707566,16707566 : 0,0 '' - IL_004b: ldloc.1 - IL_004c: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0051: stloc.s V_6 - IL_0053: ldloc.2 - IL_0054: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0059: stloc.s V_7 - IL_005b: ldloc.s V_6 - IL_005d: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0062: stloc.s V_4 - IL_0064: ldloc.s V_6 - IL_0066: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_006b: stloc.s V_5 - IL_006d: ldloc.s V_7 - IL_006f: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0074: stloc.s V_8 - IL_0076: ldloc.s V_7 - IL_0078: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_007d: stloc.s V_9 - IL_007f: ldloc.s V_4 - IL_0081: ldloc.s V_8 - IL_0083: ldarg.2 - IL_0084: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_0045: ldloc.1 + IL_0046: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_004b: stloc.s V_6 + IL_004d: ldloc.2 + IL_004e: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0053: stloc.s V_7 + IL_0055: ldloc.s V_6 + IL_0057: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_005c: stloc.s V_4 + IL_005e: ldloc.s V_6 + IL_0060: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0065: stloc.s V_5 + IL_0067: ldloc.s V_7 + IL_0069: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_006e: stloc.s V_8 + IL_0070: ldloc.s V_7 + IL_0072: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0077: stloc.s V_9 + IL_0079: ldloc.s V_4 + IL_007b: ldloc.s V_8 + IL_007d: ldarg.2 + IL_007e: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0089: stloc.s V_10 + IL_0083: stloc.s V_10 .line 16707566,16707566 : 0,0 '' - IL_008b: ldloc.s V_10 - IL_008d: brfalse.s IL_0092 + IL_0085: ldloc.s V_10 + IL_0087: brfalse.s IL_008c .line 16707566,16707566 : 0,0 '' - IL_008f: ldloc.s V_10 - IL_0091: ret + IL_0089: ldloc.s V_10 + IL_008b: ret .line 16707566,16707566 : 0,0 '' - IL_0092: ldloc.s V_5 - IL_0094: ldloc.s V_9 - IL_0096: ldarg.2 - IL_0097: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_008c: ldloc.s V_5 + IL_008e: ldloc.s V_9 + IL_0090: ldarg.2 + IL_0091: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_009c: ret + IL_0096: ret .line 16707566,16707566 : 0,0 '' - IL_009d: ldc.i4.1 - IL_009e: ret + IL_0097: ldc.i4.1 + IL_0098: ret .line 16707566,16707566 : 0,0 '' - IL_009f: ldarg.1 - IL_00a0: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_00a5: ldnull - IL_00a6: cgt.un - IL_00a8: brfalse.s IL_00ac + IL_0099: ldarg.1 + IL_009a: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_009f: brfalse.s IL_00a3 .line 16707566,16707566 : 0,0 '' - IL_00aa: ldc.i4.m1 - IL_00ab: ret + IL_00a1: ldc.i4.m1 + IL_00a2: ret .line 16707566,16707566 : 0,0 '' - IL_00ac: ldc.i4.0 - IL_00ad: ret + IL_00a3: ldc.i4.0 + IL_00a4: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 107 (0x6b) + // Code size 104 (0x68) .maxstack 7 .locals init ([0] int32 V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1090,75 +1058,73 @@ [5] int32 V_5) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0069 + IL_0001: brfalse.s IL_0066 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0019: stloc.2 - IL_001a: ldloc.2 - IL_001b: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0020: stloc.3 - IL_0021: ldloc.2 - IL_0022: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0027: stloc.s V_4 - IL_0029: ldloc.3 - IL_002a: ldarg.1 - IL_002b: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: ldc.i4.5 - IL_0035: shl - IL_0036: ldloc.s V_5 - IL_0038: add - IL_0039: ldloc.s V_4 - IL_003b: ldarg.1 - IL_003c: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0041: xor + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0016: stloc.2 + IL_0017: ldloc.2 + IL_0018: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_001d: stloc.3 + IL_001e: ldloc.2 + IL_001f: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0024: stloc.s V_4 + IL_0026: ldloc.3 + IL_0027: ldarg.1 + IL_0028: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_002d: stloc.s V_5 + IL_002f: ldloc.s V_5 + IL_0031: ldc.i4.5 + IL_0032: shl + IL_0033: ldloc.s V_5 + IL_0035: add + IL_0036: ldloc.s V_4 + IL_0038: ldarg.1 + IL_0039: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_003e: xor + IL_003f: ldloc.0 + IL_0040: ldc.i4.6 + IL_0041: shl IL_0042: ldloc.0 - IL_0043: ldc.i4.6 - IL_0044: shl - IL_0045: ldloc.0 - IL_0046: ldc.i4.2 - IL_0047: shr - IL_0048: add - IL_0049: add - IL_004a: add - IL_004b: stloc.0 - IL_004c: ldc.i4 0x9e3779b9 - IL_0051: ldloc.1 - IL_0052: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0057: ldarg.1 - IL_0058: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_0043: ldc.i4.2 + IL_0044: shr + IL_0045: add + IL_0046: add + IL_0047: add + IL_0048: stloc.0 + IL_0049: ldc.i4 0x9e3779b9 + IL_004e: ldloc.1 + IL_004f: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0054: ldarg.1 + IL_0055: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_005a: ldloc.0 + IL_005b: ldc.i4.6 + IL_005c: shl IL_005d: ldloc.0 - IL_005e: ldc.i4.6 - IL_005f: shl - IL_0060: ldloc.0 - IL_0061: ldc.i4.2 - IL_0062: shr - IL_0063: add - IL_0064: add - IL_0065: add - IL_0066: stloc.0 - IL_0067: ldloc.0 - IL_0068: ret - - .line 16707566,16707566 : 0,0 '' - IL_0069: ldc.i4.0 - IL_006a: ret + IL_005e: ldc.i4.2 + IL_005f: shr + IL_0060: add + IL_0061: add + IL_0062: add + IL_0063: stloc.0 + IL_0064: ldloc.0 + IL_0065: ret + + .line 16707566,16707566 : 0,0 '' + IL_0066: ldc.i4.0 + IL_0067: ret } // end of method KeyWithInnerKeys::GetHashCode .method public hidebysig virtual final @@ -1178,7 +1144,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 138 (0x8a) + // Code size 135 (0x87) .maxstack 5 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1191,157 +1157,151 @@ [8] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_8) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_0082 + IL_0001: brfalse IL_007f .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_000f: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: brfalse.s IL_0080 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_007d .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0010: ldarg.0 + IL_0011: pop .line 16707566,16707566 : 0,0 '' - IL_0015: ldarg.0 - IL_0016: stloc.1 - IL_0017: ldloc.0 - IL_0018: stloc.2 + IL_0012: ldarg.0 + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0019: ldloc.1 - IL_001a: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0026: stloc.s V_4 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldarg.2 - IL_002c: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_0016: ldloc.1 + IL_0017: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_001c: stloc.3 + IL_001d: ldloc.2 + IL_001e: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0023: stloc.s V_4 + IL_0025: ldloc.3 + IL_0026: ldloc.s V_4 + IL_0028: ldarg.2 + IL_0029: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_0031: brfalse.s IL_007e - - .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.1 - IL_0034: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0039: stloc.s V_5 - IL_003b: ldloc.2 - IL_003c: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0041: stloc.s V_6 - IL_0043: ldloc.s V_5 - IL_0045: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_004a: stloc.3 - IL_004b: ldloc.s V_5 - IL_004d: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0052: stloc.s V_4 - IL_0054: ldloc.s V_6 - IL_0056: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_005b: stloc.s V_7 - IL_005d: ldloc.s V_6 - IL_005f: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0064: stloc.s V_8 - .line 16707566,16707566 : 0,0 '' - IL_0066: ldloc.3 - IL_0067: ldloc.s V_7 - IL_0069: ldarg.2 - IL_006a: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_002e: brfalse.s IL_007b + + .line 16707566,16707566 : 0,0 '' + IL_0030: ldloc.1 + IL_0031: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0036: stloc.s V_5 + IL_0038: ldloc.2 + IL_0039: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_003e: stloc.s V_6 + IL_0040: ldloc.s V_5 + IL_0042: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0047: stloc.3 + IL_0048: ldloc.s V_5 + IL_004a: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_004f: stloc.s V_4 + IL_0051: ldloc.s V_6 + IL_0053: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0058: stloc.s V_7 + IL_005a: ldloc.s V_6 + IL_005c: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0061: stloc.s V_8 + .line 16707566,16707566 : 0,0 '' + IL_0063: ldloc.3 + IL_0064: ldloc.s V_7 + IL_0066: ldarg.2 + IL_0067: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_006f: brfalse.s IL_007c + IL_006c: brfalse.s IL_0079 .line 16707566,16707566 : 0,0 '' - IL_0071: ldloc.s V_4 - IL_0073: ldloc.s V_8 - IL_0075: ldarg.2 - IL_0076: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_006e: ldloc.s V_4 + IL_0070: ldloc.s V_8 + IL_0072: ldarg.2 + IL_0073: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_007b: ret + IL_0078: ret .line 16707566,16707566 : 0,0 '' - IL_007c: ldc.i4.0 - IL_007d: ret + IL_0079: ldc.i4.0 + IL_007a: ret .line 16707566,16707566 : 0,0 '' - IL_007e: ldc.i4.0 - IL_007f: ret + IL_007b: ldc.i4.0 + IL_007c: ret .line 16707566,16707566 : 0,0 '' - IL_0080: ldc.i4.0 - IL_0081: ret + IL_007d: ldc.i4.0 + IL_007e: ret .line 16707566,16707566 : 0,0 '' - IL_0082: ldarg.1 - IL_0083: ldnull - IL_0084: cgt.un - IL_0086: ldc.i4.0 - IL_0087: ceq - IL_0089: ret + IL_007f: ldarg.1 + IL_0080: ldnull + IL_0081: cgt.un + IL_0083: ldc.i4.0 + IL_0084: ceq + IL_0086: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final instance bool Equals(class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 69 (0x45) + // Code size 63 (0x3f) .maxstack 4 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003d + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_003b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0012: ldloc.1 IL_0013: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0018: ldloc.1 - IL_0019: ldfld class Compare10/CompareMicroPerfAndCodeGenerationTests/Key Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001e: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(class Compare10/CompareMicroPerfAndCodeGenerationTests/Key) - IL_0023: brfalse.s IL_0039 + IL_0018: callvirt instance bool Compare10/CompareMicroPerfAndCodeGenerationTests/Key::Equals(class Compare10/CompareMicroPerfAndCodeGenerationTests/Key) + IL_001d: brfalse.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0025: ldloc.0 + IL_001f: ldloc.0 + IL_0020: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0025: ldloc.1 IL_0026: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_002b: ldloc.1 - IL_002c: ldfld class [mscorlib]System.Tuple`2 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0031: tail. - IL_0033: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, + IL_002b: tail. + IL_002d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, !!0) - IL_0038: ret + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_0033: ldc.i4.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_0035: ldc.i4.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_003d: ldarg.1 - IL_003e: ldnull - IL_003f: cgt.un - IL_0041: ldc.i4.0 - IL_0042: ceq - IL_0044: ret + IL_0037: ldarg.1 + IL_0038: ldnull + IL_0039: cgt.un + IL_003b: ldc.i4.0 + IL_003c: ceq + IL_003e: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals04.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals04.il.bsl index 233ebf4b5d6..cab49924b5d 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals04.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals04.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006E0 Length: 0x000003B7 } .module Equals04.dll -// MVID: {61E0712B-0759-EA8A-A745-03832B71E061} +// MVID: {6220E4FA-0759-EA8A-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05A30000 +// Image base: 0x06980000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 110 (0x6e) .maxstack 4 .locals init ([0] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_1, @@ -189,110 +189,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals04.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + IL_0001: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0020: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.3 + IL_0046: ldloc.0 + IL_0047: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.1 + IL_004f: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_0067: ldarg.1 + IL_0068: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_006a: ldc.i4.m1 + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_006c: ldc.i4.0 + IL_006d: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -313,7 +307,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 124 (0x7c) + // Code size 115 (0x73) .maxstack 4 .locals init ([0] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_1, @@ -327,167 +321,159 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006d + IL_0008: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Equals04/EqualsMicroPerfAndCodeGenerationTests/Key - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_006b + IL_000a: ldarg.1 + IL_000b: unbox.any Equals04/EqualsMicroPerfAndCodeGenerationTests/Key + IL_0010: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_002c: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0026: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: bge.s IL_0038 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0035: nop - IL_0036: br.s IL_003f + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_003e: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003f: stloc.3 + IL_0039: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.3 - IL_0041: ldc.i4.0 - IL_0042: bge.s IL_0046 + IL_003a: ldloc.3 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.3 - IL_0045: ret + IL_003e: ldloc.3 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: ldloc.3 - IL_0047: ldc.i4.0 - IL_0048: ble.s IL_004c + IL_0040: ldloc.3 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_004a: ldloc.3 - IL_004b: ret + IL_0044: ldloc.3 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_004c: ldloc.1 - IL_004d: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.2 - IL_0055: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0046: ldloc.1 + IL_0047: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.2 + IL_004f: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: unbox.any Equals04/EqualsMicroPerfAndCodeGenerationTests/Key - IL_0073: ldnull - IL_0074: cgt.un - IL_0076: brfalse.s IL_007a + IL_0067: ldarg.1 + IL_0068: unbox.any Equals04/EqualsMicroPerfAndCodeGenerationTests/Key + IL_006d: brfalse.s IL_0071 .line 16707566,16707566 : 0,0 '' - IL_0078: ldc.i4.m1 - IL_0079: ret + IL_006f: ldc.i4.m1 + IL_0070: ret .line 16707566,16707566 : 0,0 '' - IL_007a: ldc.i4.0 - IL_007b: ret + IL_0071: ldc.i4.0 + IL_0072: ret } // end of method Key::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 57 (0x39) .maxstack 7 .locals init ([0] int32 V_0, [1] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add - IL_0020: add - IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl IL_002e: ldloc.0 - IL_002f: ldc.i4.6 - IL_0030: shl - IL_0031: ldloc.0 - IL_0032: ldc.i4.2 - IL_0033: shr - IL_0034: add - IL_0035: add - IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ret + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -507,123 +493,117 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_1, [2] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Equals04/EqualsMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Equals04/EqualsMicroPerfAndCodeGenerationTests/Key + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0013: ldloc.1 + IL_0014: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.2 + IL_001a: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0021: ldloc.1 + IL_0022: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.2 + IL_0028: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Key::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals05.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals05.il.bsl index 5a5cbc04fa0..b0c17b08fc5 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals05.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals05.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006D0 Length: 0x000003B9 } .module Equals05.dll -// MVID: {61E0712B-0759-CBC5-A745-03832B71E061} +// MVID: {6220E4FA-0759-CBC5-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05A70000 +// Image base: 0x067F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -123,7 +123,7 @@ instance int32 CompareTo(class Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 101 (0x65) + // Code size 92 (0x5c) .maxstack 4 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IComparer V_1, @@ -132,103 +132,97 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals05.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_005b + IL_0001: brfalse.s IL_0055 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0059 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0053 .line 16707566,16707566 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: stloc.2 - IL_0019: ldarg.1 - IL_001a: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001f: stloc.3 + IL_0006: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: bge.s IL_0028 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: bge.s IL_0022 .line 16707566,16707566 : 0,0 '' - IL_0024: ldc.i4.m1 + IL_001e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0025: nop - IL_0026: br.s IL_002d + IL_001f: nop + IL_0020: br.s IL_0027 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.2 - IL_0029: ldloc.3 - IL_002a: cgt + IL_0022: ldloc.2 + IL_0023: ldloc.3 + IL_0024: cgt .line 16707566,16707566 : 0,0 '' - IL_002c: nop + IL_0026: nop + .line 16707566,16707566 : 0,0 '' + IL_0027: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0028: ldloc.0 + IL_0029: ldc.i4.0 + IL_002a: bge.s IL_002e + .line 16707566,16707566 : 0,0 '' - IL_002d: stloc.0 + IL_002c: ldloc.0 + IL_002d: ret + .line 16707566,16707566 : 0,0 '' IL_002e: ldloc.0 IL_002f: ldc.i4.0 - IL_0030: bge.s IL_0034 + IL_0030: ble.s IL_0034 .line 16707566,16707566 : 0,0 '' IL_0032: ldloc.0 IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldloc.0 - IL_0035: ldc.i4.0 - IL_0036: ble.s IL_003a - + IL_0034: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0039: stloc.1 + IL_003a: ldarg.0 + IL_003b: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0040: stloc.2 + IL_0041: ldarg.1 + IL_0042: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0047: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.0 - IL_0039: ret + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: bge.s IL_004e .line 16707566,16707566 : 0,0 '' - IL_003a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_003f: stloc.1 - IL_0040: ldarg.0 - IL_0041: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0046: stloc.2 - IL_0047: ldarg.1 - IL_0048: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_004d: stloc.3 + IL_004c: ldc.i4.m1 + IL_004d: ret + .line 16707566,16707566 : 0,0 '' IL_004e: ldloc.2 IL_004f: ldloc.3 - IL_0050: bge.s IL_0054 - - .line 16707566,16707566 : 0,0 '' - IL_0052: ldc.i4.m1 - IL_0053: ret - - .line 16707566,16707566 : 0,0 '' - IL_0054: ldloc.2 - IL_0055: ldloc.3 - IL_0056: cgt - IL_0058: ret + IL_0050: cgt + IL_0052: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldc.i4.1 - IL_005a: ret + IL_0053: ldc.i4.1 + IL_0054: ret .line 16707566,16707566 : 0,0 '' - IL_005b: ldarg.1 - IL_005c: ldnull - IL_005d: cgt.un - IL_005f: brfalse.s IL_0063 + IL_0055: ldarg.1 + IL_0056: brfalse.s IL_005a .line 16707566,16707566 : 0,0 '' - IL_0061: ldc.i4.m1 - IL_0062: ret + IL_0058: ldc.i4.m1 + IL_0059: ret .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.0 - IL_0064: ret + IL_005a: ldc.i4.0 + IL_005b: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final @@ -249,7 +243,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 106 (0x6a) + // Code size 97 (0x61) .maxstack 4 .locals init ([0] class Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR V_0, [1] int32 V_1, @@ -261,151 +255,143 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_005b + IL_0008: brfalse.s IL_0055 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0059 + IL_000a: ldarg.1 + IL_000b: unbox.any Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_0010: brfalse.s IL_0053 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001e: stloc.2 - IL_001f: ldloc.0 - IL_0020: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0025: stloc.3 + IL_0012: ldarg.0 + IL_0013: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_001f: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0026: ldloc.2 - IL_0027: ldloc.3 - IL_0028: bge.s IL_002e + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: bge.s IL_0028 .line 16707566,16707566 : 0,0 '' - IL_002a: ldc.i4.m1 + IL_0024: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002b: nop - IL_002c: br.s IL_0033 + IL_0025: nop + IL_0026: br.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.2 - IL_002f: ldloc.3 - IL_0030: cgt + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: cgt + .line 16707566,16707566 : 0,0 '' + IL_002c: nop .line 16707566,16707566 : 0,0 '' - IL_0032: nop + IL_002d: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0033: stloc.1 + IL_002e: ldloc.1 + IL_002f: ldc.i4.0 + IL_0030: bge.s IL_0034 + + .line 16707566,16707566 : 0,0 '' + IL_0032: ldloc.1 + IL_0033: ret + .line 16707566,16707566 : 0,0 '' IL_0034: ldloc.1 IL_0035: ldc.i4.0 - IL_0036: bge.s IL_003a + IL_0036: ble.s IL_003a .line 16707566,16707566 : 0,0 '' IL_0038: ldloc.1 IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.1 - IL_003b: ldc.i4.0 - IL_003c: ble.s IL_0040 - + IL_003a: ldarg.0 + IL_003b: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0040: stloc.2 + IL_0041: ldloc.0 + IL_0042: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0047: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.1 - IL_003f: ret + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: bge.s IL_004e .line 16707566,16707566 : 0,0 '' - IL_0040: ldarg.0 - IL_0041: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0046: stloc.2 - IL_0047: ldloc.0 - IL_0048: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_004d: stloc.3 + IL_004c: ldc.i4.m1 + IL_004d: ret + .line 16707566,16707566 : 0,0 '' IL_004e: ldloc.2 IL_004f: ldloc.3 - IL_0050: bge.s IL_0054 - - .line 16707566,16707566 : 0,0 '' - IL_0052: ldc.i4.m1 - IL_0053: ret + IL_0050: cgt + IL_0052: ret .line 16707566,16707566 : 0,0 '' - IL_0054: ldloc.2 - IL_0055: ldloc.3 - IL_0056: cgt - IL_0058: ret + IL_0053: ldc.i4.1 + IL_0054: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldc.i4.1 - IL_005a: ret + IL_0055: ldarg.1 + IL_0056: unbox.any Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_005b: brfalse.s IL_005f .line 16707566,16707566 : 0,0 '' - IL_005b: ldarg.1 - IL_005c: unbox.any Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR - IL_0061: ldnull - IL_0062: cgt.un - IL_0064: brfalse.s IL_0068 + IL_005d: ldc.i4.m1 + IL_005e: ret .line 16707566,16707566 : 0,0 '' - IL_0066: ldc.i4.m1 - IL_0067: ret - - .line 16707566,16707566 : 0,0 '' - IL_0068: ldc.i4.0 - IL_0069: ret + IL_005f: ldc.i4.0 + IL_0060: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 54 (0x36) + // Code size 51 (0x33) .maxstack 7 .locals init ([0] int32 V_0) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0034 + IL_0001: brfalse.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.0 - IL_000e: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl IL_0013: ldloc.0 - IL_0014: ldc.i4.6 - IL_0015: shl - IL_0016: ldloc.0 - IL_0017: ldc.i4.2 - IL_0018: shr - IL_0019: add - IL_001a: add - IL_001b: add - IL_001c: stloc.0 - IL_001d: ldc.i4 0x9e3779b9 - IL_0022: ldarg.0 - IL_0023: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl IL_0028: ldloc.0 - IL_0029: ldc.i4.6 - IL_002a: shl - IL_002b: ldloc.0 - IL_002c: ldc.i4.2 - IL_002d: shr - IL_002e: add - IL_002f: add - IL_0030: add - IL_0031: stloc.0 - IL_0032: ldloc.0 - IL_0033: ret + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_0031: ldc.i4.0 + IL_0032: ret } // end of method KeyR::GetHashCode .method public hidebysig virtual final @@ -425,103 +411,97 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 57 (0x39) + // Code size 54 (0x36) .maxstack 4 .locals init ([0] class Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR V_0) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0031 + IL_0001: brfalse.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002f + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0016: ldloc.0 - IL_0017: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001c: bne.un.s IL_002d + IL_000d: ldarg.0 + IL_000e: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0013: ldloc.0 + IL_0014: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: bne.un.s IL_002a .line 16707566,16707566 : 0,0 '' - IL_001e: ldarg.0 - IL_001f: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0024: ldloc.0 - IL_0025: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_002a: ceq - IL_002c: ret + IL_001b: ldarg.0 + IL_001c: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0021: ldloc.0 + IL_0022: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0027: ceq + IL_0029: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldc.i4.0 - IL_002e: ret + IL_002a: ldc.i4.0 + IL_002b: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldarg.1 - IL_0032: ldnull - IL_0033: cgt.un - IL_0035: ldc.i4.0 - IL_0036: ceq - IL_0038: ret + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: cgt.un + IL_0032: ldc.i4.0 + IL_0033: ceq + IL_0035: ret } // end of method KeyR::Equals .method public hidebysig virtual final instance bool Equals(class Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 47 (0x2f) .maxstack 8 .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002d + IL_0001: brfalse.s IL_0027 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_002b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 + IL_0006: ldarg.0 + IL_0007: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000c: ldarg.1 IL_000d: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0012: ldarg.1 - IL_0013: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: bne.un.s IL_0029 + IL_0012: bne.un.s IL_0023 .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 + IL_0014: ldarg.0 + IL_0015: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_001a: ldarg.1 IL_001b: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0020: ldarg.1 - IL_0021: ldfld int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0026: ceq - IL_0028: ret + IL_0020: ceq + IL_0022: ret .line 16707566,16707566 : 0,0 '' - IL_0029: ldc.i4.0 - IL_002a: ret + IL_0023: ldc.i4.0 + IL_0024: ret .line 16707566,16707566 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_0025: ldc.i4.0 + IL_0026: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldarg.1 - IL_002e: ldnull - IL_002f: cgt.un - IL_0031: ldc.i4.0 - IL_0032: ceq - IL_0034: ret + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret } // end of method KeyR::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals06.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals06.il.bsl index e468f464a09..de363af55d2 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals06.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals06.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000890 Length: 0x00000688 } .module Equals06.dll -// MVID: {61E0712B-0759-31EC-A745-03832B71E061} +// MVID: {6220E4FA-0759-31EC-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07210000 +// Image base: 0x067E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 110 (0x6e) + // Code size 101 (0x65) .maxstack 5 .locals init ([0] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -189,92 +189,86 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals06.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0064 + IL_0001: brfalse.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0062 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_005c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0020: stloc.s V_5 + IL_0022: ldloc.3 + IL_0023: ldloc.s V_4 + IL_0025: ldloc.s V_5 + IL_0027: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0032: stloc.2 + IL_002c: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.2 - IL_0034: ldc.i4.0 - IL_0035: bge.s IL_0039 + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: bge.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0037: ldloc.2 - IL_0038: ret + IL_0031: ldloc.2 + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: ble.s IL_003f + IL_0033: ldloc.2 + IL_0034: ldc.i4.0 + IL_0035: ble.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_0037: ldloc.2 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0044: stloc.3 - IL_0045: ldloc.0 - IL_0046: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_004b: stloc.s V_4 - IL_004d: ldloc.1 - IL_004e: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0053: stloc.s V_5 - IL_0055: ldloc.3 - IL_0056: ldloc.s V_4 - IL_0058: ldloc.s V_5 - IL_005a: tail. - IL_005c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0039: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_003e: stloc.3 + IL_003f: ldloc.0 + IL_0040: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0045: stloc.s V_4 + IL_0047: ldloc.1 + IL_0048: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_004d: stloc.s V_5 + IL_004f: ldloc.3 + IL_0050: ldloc.s V_4 + IL_0052: ldloc.s V_5 + IL_0054: tail. + IL_0056: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0061: ret + IL_005b: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.1 - IL_0063: ret + IL_005c: ldc.i4.1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldarg.1 - IL_0065: ldnull - IL_0066: cgt.un - IL_0068: brfalse.s IL_006c + IL_005e: ldarg.1 + IL_005f: brfalse.s IL_0063 .line 16707566,16707566 : 0,0 '' - IL_006a: ldc.i4.m1 - IL_006b: ret + IL_0061: ldc.i4.m1 + IL_0062: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.0 - IL_006d: ret + IL_0063: ldc.i4.0 + IL_0064: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final @@ -296,7 +290,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 115 (0x73) + // Code size 106 (0x6a) .maxstack 5 .locals init ([0] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -310,160 +304,152 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0064 - - .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0062 - - .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop - .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_002c: stloc.s V_5 - IL_002e: ldarg.2 - IL_002f: ldloc.s V_4 - IL_0031: ldloc.s V_5 - IL_0033: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0008: brfalse.s IL_005e + + .line 16707566,16707566 : 0,0 '' + IL_000a: ldarg.1 + IL_000b: unbox.any class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0010: brfalse.s IL_005c + + .line 16707566,16707566 : 0,0 '' + IL_0012: ldarg.0 + IL_0013: pop + .line 16707566,16707566 : 0,0 '' + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0026: stloc.s V_5 + IL_0028: ldarg.2 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.s V_5 + IL_002d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0038: stloc.3 + IL_0032: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.3 - IL_003a: ldc.i4.0 - IL_003b: bge.s IL_003f + IL_0033: ldloc.3 + IL_0034: ldc.i4.0 + IL_0035: bge.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.3 - IL_003e: ret + IL_0037: ldloc.3 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.3 - IL_0040: ldc.i4.0 - IL_0041: ble.s IL_0045 + IL_0039: ldloc.3 + IL_003a: ldc.i4.0 + IL_003b: ble.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0043: ldloc.3 - IL_0044: ret + IL_003d: ldloc.3 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.1 - IL_0046: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_004b: stloc.s V_4 - IL_004d: ldloc.2 - IL_004e: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0053: stloc.s V_5 - IL_0055: ldarg.2 - IL_0056: ldloc.s V_4 - IL_0058: ldloc.s V_5 - IL_005a: tail. - IL_005c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_003f: ldloc.1 + IL_0040: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0045: stloc.s V_4 + IL_0047: ldloc.2 + IL_0048: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_004d: stloc.s V_5 + IL_004f: ldarg.2 + IL_0050: ldloc.s V_4 + IL_0052: ldloc.s V_5 + IL_0054: tail. + IL_0056: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0061: ret + IL_005b: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.1 - IL_0063: ret + IL_005c: ldc.i4.1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldarg.1 - IL_0065: unbox.any class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_006a: ldnull - IL_006b: cgt.un - IL_006d: brfalse.s IL_0071 + IL_005e: ldarg.1 + IL_005f: unbox.any class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0064: brfalse.s IL_0068 .line 16707566,16707566 : 0,0 '' - IL_006f: ldc.i4.m1 - IL_0070: ret + IL_0066: ldc.i4.m1 + IL_0067: ret .line 16707566,16707566 : 0,0 '' - IL_0071: ldc.i4.0 - IL_0072: ret + IL_0068: ldc.i4.0 + IL_0069: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 76 (0x4c) + // Code size 73 (0x49) .maxstack 7 .locals init ([0] int32 V_0, [1] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] !a V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004a + IL_0001: brfalse.s IL_0047 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0019: stloc.2 - IL_001a: ldarg.1 - IL_001b: ldloc.2 - IL_001c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0016: stloc.2 + IL_0017: ldarg.1 + IL_0018: ldloc.2 + IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0) + IL_001e: ldloc.0 + IL_001f: ldc.i4.6 + IL_0020: shl IL_0021: ldloc.0 - IL_0022: ldc.i4.6 - IL_0023: shl - IL_0024: ldloc.0 - IL_0025: ldc.i4.2 - IL_0026: shr - IL_0027: add - IL_0028: add - IL_0029: add - IL_002a: stloc.0 - IL_002b: ldc.i4 0x9e3779b9 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0036: stloc.2 - IL_0037: ldarg.1 - IL_0038: ldloc.2 - IL_0039: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_0022: ldc.i4.2 + IL_0023: shr + IL_0024: add + IL_0025: add + IL_0026: add + IL_0027: stloc.0 + IL_0028: ldc.i4 0x9e3779b9 + IL_002d: ldloc.1 + IL_002e: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0033: stloc.2 + IL_0034: ldarg.1 + IL_0035: ldloc.2 + IL_0036: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0) + IL_003b: ldloc.0 + IL_003c: ldc.i4.6 + IL_003d: shl IL_003e: ldloc.0 - IL_003f: ldc.i4.6 - IL_0040: shl - IL_0041: ldloc.0 - IL_0042: ldc.i4.2 - IL_0043: shr - IL_0044: add - IL_0045: add - IL_0046: add - IL_0047: stloc.0 - IL_0048: ldloc.0 - IL_0049: ret + IL_003f: ldc.i4.2 + IL_0040: shr + IL_0041: add + IL_0042: add + IL_0043: add + IL_0044: stloc.0 + IL_0045: ldloc.0 + IL_0046: ret .line 16707566,16707566 : 0,0 '' - IL_004a: ldc.i4.0 - IL_004b: ret + IL_0047: ldc.i4.0 + IL_0048: ret } // end of method GenericKey`1::GetHashCode .method public hidebysig virtual final @@ -483,7 +469,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 87 (0x57) + // Code size 84 (0x54) .maxstack 5 .locals init ([0] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -492,79 +478,77 @@ [4] !a V_4) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004f + IL_0001: brfalse.s IL_004c .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_004d + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_004a .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 - .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001c: stloc.3 - IL_001d: ldloc.2 - IL_001e: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0023: stloc.s V_4 - IL_0025: ldarg.2 - IL_0026: ldloc.3 - IL_0027: ldloc.s V_4 - IL_0029: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0013: ldloc.1 + IL_0014: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0020: stloc.s V_4 + IL_0022: ldarg.2 + IL_0023: ldloc.3 + IL_0024: ldloc.s V_4 + IL_0026: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_002e: brfalse.s IL_004b + IL_002b: brfalse.s IL_0048 .line 16707566,16707566 : 0,0 '' - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_003d: stloc.s V_4 - IL_003f: ldarg.2 - IL_0040: ldloc.3 - IL_0041: ldloc.s V_4 - IL_0043: tail. - IL_0045: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_002d: ldloc.1 + IL_002e: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0033: stloc.3 + IL_0034: ldloc.2 + IL_0035: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_003a: stloc.s V_4 + IL_003c: ldarg.2 + IL_003d: ldloc.3 + IL_003e: ldloc.s V_4 + IL_0040: tail. + IL_0042: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_004a: ret + IL_0047: ret .line 16707566,16707566 : 0,0 '' - IL_004b: ldc.i4.0 - IL_004c: ret + IL_0048: ldc.i4.0 + IL_0049: ret .line 16707566,16707566 : 0,0 '' - IL_004d: ldc.i4.0 - IL_004e: ret + IL_004a: ldc.i4.0 + IL_004b: ret .line 16707566,16707566 : 0,0 '' - IL_004f: ldarg.1 - IL_0050: ldnull - IL_0051: cgt.un - IL_0053: ldc.i4.0 - IL_0054: ceq - IL_0056: ret + IL_004c: ldarg.1 + IL_004d: ldnull + IL_004e: cgt.un + IL_0050: ldc.i4.0 + IL_0051: ceq + IL_0053: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final instance bool Equals(class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 77 (0x4d) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -572,66 +556,62 @@ [3] !a V_3) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0045 + IL_0001: brfalse.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0043 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_003d .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_000c: ldloc.0 + IL_000d: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0027: brfalse.s IL_0041 - - .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.0 - IL_002a: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_002f: stloc.2 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldloc.3 - IL_0039: tail. - IL_003b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_0021: brfalse.s IL_003b + + .line 16707566,16707566 : 0,0 '' + IL_0023: ldloc.0 + IL_0024: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0029: stloc.2 + IL_002a: ldloc.1 + IL_002b: ldfld !0 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0030: stloc.3 + IL_0031: ldloc.2 + IL_0032: ldloc.3 + IL_0033: tail. + IL_0035: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0040: ret + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_0041: ldc.i4.0 - IL_0042: ret + IL_003b: ldc.i4.0 + IL_003c: ret .line 16707566,16707566 : 0,0 '' - IL_0043: ldc.i4.0 - IL_0044: ret + IL_003d: ldc.i4.0 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldarg.1 - IL_0046: ldnull - IL_0047: cgt.un - IL_0049: ldc.i4.0 - IL_004a: ceq - IL_004c: ret + IL_003f: ldarg.1 + IL_0040: ldnull + IL_0041: cgt.un + IL_0043: ldc.i4.0 + IL_0044: ceq + IL_0046: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals09.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals09.il.bsl index b20d3357b04..1f195ecf0a9 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals09.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals09.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000A98 Length: 0x0000058B } .module Equals09.dll -// MVID: {61E0712B-0759-46D9-A745-03832B71E061} +// MVID: {6220E4FA-0759-46D9-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B60000 +// Image base: 0x06F20000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 110 (0x6e) .maxstack 4 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_1, @@ -189,110 +189,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals09.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + IL_0001: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0020: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.3 + IL_0046: ldloc.0 + IL_0047: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.1 + IL_004f: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_0067: ldarg.1 + IL_0068: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_006a: ldc.i4.m1 + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_006c: ldc.i4.0 + IL_006d: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -313,7 +307,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 124 (0x7c) + // Code size 115 (0x73) .maxstack 4 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_1, @@ -327,167 +321,159 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006d + IL_0008: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/Key - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_006b + IL_000a: ldarg.1 + IL_000b: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/Key + IL_0010: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_002c: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0026: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: bge.s IL_0038 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0035: nop - IL_0036: br.s IL_003f + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_003e: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003f: stloc.3 + IL_0039: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.3 - IL_0041: ldc.i4.0 - IL_0042: bge.s IL_0046 + IL_003a: ldloc.3 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.3 - IL_0045: ret + IL_003e: ldloc.3 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: ldloc.3 - IL_0047: ldc.i4.0 - IL_0048: ble.s IL_004c + IL_0040: ldloc.3 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_004a: ldloc.3 - IL_004b: ret + IL_0044: ldloc.3 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_004c: ldloc.1 - IL_004d: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.2 - IL_0055: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0046: ldloc.1 + IL_0047: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.2 + IL_004f: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/Key - IL_0073: ldnull - IL_0074: cgt.un - IL_0076: brfalse.s IL_007a + IL_0067: ldarg.1 + IL_0068: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/Key + IL_006d: brfalse.s IL_0071 .line 16707566,16707566 : 0,0 '' - IL_0078: ldc.i4.m1 - IL_0079: ret + IL_006f: ldc.i4.m1 + IL_0070: ret .line 16707566,16707566 : 0,0 '' - IL_007a: ldc.i4.0 - IL_007b: ret + IL_0071: ldc.i4.0 + IL_0072: ret } // end of method Key::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 57 (0x39) .maxstack 7 .locals init ([0] int32 V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add - IL_0020: add - IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl IL_002e: ldloc.0 - IL_002f: ldc.i4.6 - IL_0030: shl - IL_0031: ldloc.0 - IL_0032: ldc.i4.2 - IL_0033: shr - IL_0034: add - IL_0035: add - IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ret + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -507,123 +493,117 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_1, [2] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/Key + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0013: ldloc.1 + IL_0014: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.2 + IL_001a: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0021: ldloc.1 + IL_0022: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.2 + IL_0028: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -802,7 +782,7 @@ instance int32 CompareTo(class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 169 (0xa9) + // Code size 160 (0xa0) .maxstack 5 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -817,116 +797,110 @@ [10] int32 V_10) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_009f + IL_0001: brfalse IL_0099 .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse IL_009d + IL_0006: ldarg.1 + IL_0007: brfalse IL_0097 .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000c: ldarg.0 + IL_000d: pop .line 16707566,16707566 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.0 - IL_0016: ldarg.1 - IL_0017: stloc.1 - IL_0018: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_001d: stloc.3 - IL_001e: ldloc.0 - IL_001f: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.1 - IL_0027: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_002c: stloc.s V_5 - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: ldloc.3 - IL_0033: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0017: stloc.3 + IL_0018: ldloc.0 + IL_0019: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.1 + IL_0021: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0026: stloc.s V_5 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: ldloc.3 + IL_002d: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0038: stloc.2 + IL_0032: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: bge.s IL_003f + IL_0033: ldloc.2 + IL_0034: ldc.i4.0 + IL_0035: bge.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_0037: ldloc.2 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ldc.i4.0 - IL_0041: ble.s IL_0045 + IL_0039: ldloc.2 + IL_003a: ldc.i4.0 + IL_003b: ble.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0043: ldloc.2 - IL_0044: ret + IL_003d: ldloc.2 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004a: stloc.3 - IL_004b: ldloc.0 - IL_004c: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0051: stloc.s V_6 - IL_0053: ldloc.1 - IL_0054: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0059: stloc.s V_7 - IL_005b: ldloc.s V_6 - IL_005d: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0062: stloc.s V_4 - IL_0064: ldloc.s V_6 - IL_0066: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_006b: stloc.s V_5 - IL_006d: ldloc.s V_7 - IL_006f: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0074: stloc.s V_8 - IL_0076: ldloc.s V_7 - IL_0078: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_007d: stloc.s V_9 - IL_007f: ldloc.s V_4 - IL_0081: ldloc.s V_8 - IL_0083: ldloc.3 - IL_0084: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_003f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0044: stloc.3 + IL_0045: ldloc.0 + IL_0046: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_004b: stloc.s V_6 + IL_004d: ldloc.1 + IL_004e: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0053: stloc.s V_7 + IL_0055: ldloc.s V_6 + IL_0057: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_005c: stloc.s V_4 + IL_005e: ldloc.s V_6 + IL_0060: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0065: stloc.s V_5 + IL_0067: ldloc.s V_7 + IL_0069: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_006e: stloc.s V_8 + IL_0070: ldloc.s V_7 + IL_0072: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0077: stloc.s V_9 + IL_0079: ldloc.s V_4 + IL_007b: ldloc.s V_8 + IL_007d: ldloc.3 + IL_007e: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0089: stloc.s V_10 + IL_0083: stloc.s V_10 .line 16707566,16707566 : 0,0 '' - IL_008b: ldloc.s V_10 - IL_008d: brfalse.s IL_0092 + IL_0085: ldloc.s V_10 + IL_0087: brfalse.s IL_008c .line 16707566,16707566 : 0,0 '' - IL_008f: ldloc.s V_10 - IL_0091: ret + IL_0089: ldloc.s V_10 + IL_008b: ret .line 16707566,16707566 : 0,0 '' - IL_0092: ldloc.s V_5 - IL_0094: ldloc.s V_9 - IL_0096: ldloc.3 - IL_0097: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_008c: ldloc.s V_5 + IL_008e: ldloc.s V_9 + IL_0090: ldloc.3 + IL_0091: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_009c: ret + IL_0096: ret .line 16707566,16707566 : 0,0 '' - IL_009d: ldc.i4.1 - IL_009e: ret + IL_0097: ldc.i4.1 + IL_0098: ret .line 16707566,16707566 : 0,0 '' - IL_009f: ldarg.1 - IL_00a0: ldnull - IL_00a1: cgt.un - IL_00a3: brfalse.s IL_00a7 + IL_0099: ldarg.1 + IL_009a: brfalse.s IL_009e .line 16707566,16707566 : 0,0 '' - IL_00a5: ldc.i4.m1 - IL_00a6: ret + IL_009c: ldc.i4.m1 + IL_009d: ret .line 16707566,16707566 : 0,0 '' - IL_00a7: ldc.i4.0 - IL_00a8: ret + IL_009e: ldc.i4.0 + IL_009f: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final @@ -947,7 +921,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 174 (0xae) + // Code size 165 (0xa5) .maxstack 5 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -966,121 +940,115 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse IL_009f + IL_0008: brfalse IL_0099 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.1 - IL_0011: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_0016: ldnull - IL_0017: cgt.un - IL_0019: brfalse IL_009d - - .line 16707566,16707566 : 0,0 '' - IL_001e: ldarg.0 - IL_001f: pop - .line 16707566,16707566 : 0,0 '' - IL_0020: ldarg.0 - IL_0021: stloc.1 - IL_0022: ldloc.0 - IL_0023: stloc.2 - IL_0024: ldloc.1 - IL_0025: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_002a: stloc.s V_4 - IL_002c: ldloc.2 - IL_002d: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0032: stloc.s V_5 - IL_0034: ldloc.s V_4 - IL_0036: ldloc.s V_5 - IL_0038: ldarg.2 - IL_0039: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_000d: ldarg.1 + IL_000e: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_0013: brfalse IL_0097 + + .line 16707566,16707566 : 0,0 '' + IL_0018: ldarg.0 + IL_0019: pop + .line 16707566,16707566 : 0,0 '' + IL_001a: ldarg.0 + IL_001b: stloc.1 + IL_001c: ldloc.0 + IL_001d: stloc.2 + IL_001e: ldloc.1 + IL_001f: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0024: stloc.s V_4 + IL_0026: ldloc.2 + IL_0027: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_002c: stloc.s V_5 + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: ldarg.2 + IL_0033: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_003e: stloc.3 + IL_0038: stloc.3 + .line 16707566,16707566 : 0,0 '' + IL_0039: ldloc.3 + IL_003a: ldc.i4.0 + IL_003b: bge.s IL_003f + + .line 16707566,16707566 : 0,0 '' + IL_003d: ldloc.3 + IL_003e: ret + .line 16707566,16707566 : 0,0 '' IL_003f: ldloc.3 IL_0040: ldc.i4.0 - IL_0041: bge.s IL_0045 + IL_0041: ble.s IL_0045 .line 16707566,16707566 : 0,0 '' IL_0043: ldloc.3 IL_0044: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.3 - IL_0046: ldc.i4.0 - IL_0047: ble.s IL_004b - - .line 16707566,16707566 : 0,0 '' - IL_0049: ldloc.3 - IL_004a: ret - - .line 16707566,16707566 : 0,0 '' - IL_004b: ldloc.1 - IL_004c: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0051: stloc.s V_6 - IL_0053: ldloc.2 - IL_0054: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0059: stloc.s V_7 - IL_005b: ldloc.s V_6 - IL_005d: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0062: stloc.s V_4 - IL_0064: ldloc.s V_6 - IL_0066: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_006b: stloc.s V_5 - IL_006d: ldloc.s V_7 - IL_006f: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0074: stloc.s V_8 - IL_0076: ldloc.s V_7 - IL_0078: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_007d: stloc.s V_9 - IL_007f: ldloc.s V_4 - IL_0081: ldloc.s V_8 - IL_0083: ldarg.2 - IL_0084: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_0045: ldloc.1 + IL_0046: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_004b: stloc.s V_6 + IL_004d: ldloc.2 + IL_004e: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0053: stloc.s V_7 + IL_0055: ldloc.s V_6 + IL_0057: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_005c: stloc.s V_4 + IL_005e: ldloc.s V_6 + IL_0060: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0065: stloc.s V_5 + IL_0067: ldloc.s V_7 + IL_0069: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_006e: stloc.s V_8 + IL_0070: ldloc.s V_7 + IL_0072: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0077: stloc.s V_9 + IL_0079: ldloc.s V_4 + IL_007b: ldloc.s V_8 + IL_007d: ldarg.2 + IL_007e: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0089: stloc.s V_10 + IL_0083: stloc.s V_10 .line 16707566,16707566 : 0,0 '' - IL_008b: ldloc.s V_10 - IL_008d: brfalse.s IL_0092 + IL_0085: ldloc.s V_10 + IL_0087: brfalse.s IL_008c .line 16707566,16707566 : 0,0 '' - IL_008f: ldloc.s V_10 - IL_0091: ret + IL_0089: ldloc.s V_10 + IL_008b: ret .line 16707566,16707566 : 0,0 '' - IL_0092: ldloc.s V_5 - IL_0094: ldloc.s V_9 - IL_0096: ldarg.2 - IL_0097: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_008c: ldloc.s V_5 + IL_008e: ldloc.s V_9 + IL_0090: ldarg.2 + IL_0091: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_009c: ret + IL_0096: ret .line 16707566,16707566 : 0,0 '' - IL_009d: ldc.i4.1 - IL_009e: ret + IL_0097: ldc.i4.1 + IL_0098: ret .line 16707566,16707566 : 0,0 '' - IL_009f: ldarg.1 - IL_00a0: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_00a5: ldnull - IL_00a6: cgt.un - IL_00a8: brfalse.s IL_00ac + IL_0099: ldarg.1 + IL_009a: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_009f: brfalse.s IL_00a3 .line 16707566,16707566 : 0,0 '' - IL_00aa: ldc.i4.m1 - IL_00ab: ret + IL_00a1: ldc.i4.m1 + IL_00a2: ret .line 16707566,16707566 : 0,0 '' - IL_00ac: ldc.i4.0 - IL_00ad: ret + IL_00a3: ldc.i4.0 + IL_00a4: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 107 (0x6b) + // Code size 104 (0x68) .maxstack 7 .locals init ([0] int32 V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1090,75 +1058,73 @@ [5] int32 V_5) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0069 + IL_0001: brfalse.s IL_0066 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0019: stloc.2 - IL_001a: ldloc.2 - IL_001b: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0020: stloc.3 - IL_0021: ldloc.2 - IL_0022: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0027: stloc.s V_4 - IL_0029: ldloc.3 - IL_002a: ldarg.1 - IL_002b: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: ldc.i4.5 - IL_0035: shl - IL_0036: ldloc.s V_5 - IL_0038: add - IL_0039: ldloc.s V_4 - IL_003b: ldarg.1 - IL_003c: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0041: xor + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0016: stloc.2 + IL_0017: ldloc.2 + IL_0018: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_001d: stloc.3 + IL_001e: ldloc.2 + IL_001f: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0024: stloc.s V_4 + IL_0026: ldloc.3 + IL_0027: ldarg.1 + IL_0028: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_002d: stloc.s V_5 + IL_002f: ldloc.s V_5 + IL_0031: ldc.i4.5 + IL_0032: shl + IL_0033: ldloc.s V_5 + IL_0035: add + IL_0036: ldloc.s V_4 + IL_0038: ldarg.1 + IL_0039: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_003e: xor + IL_003f: ldloc.0 + IL_0040: ldc.i4.6 + IL_0041: shl IL_0042: ldloc.0 - IL_0043: ldc.i4.6 - IL_0044: shl - IL_0045: ldloc.0 - IL_0046: ldc.i4.2 - IL_0047: shr - IL_0048: add - IL_0049: add - IL_004a: add - IL_004b: stloc.0 - IL_004c: ldc.i4 0x9e3779b9 - IL_0051: ldloc.1 - IL_0052: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0057: ldarg.1 - IL_0058: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_0043: ldc.i4.2 + IL_0044: shr + IL_0045: add + IL_0046: add + IL_0047: add + IL_0048: stloc.0 + IL_0049: ldc.i4 0x9e3779b9 + IL_004e: ldloc.1 + IL_004f: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0054: ldarg.1 + IL_0055: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_005a: ldloc.0 + IL_005b: ldc.i4.6 + IL_005c: shl IL_005d: ldloc.0 - IL_005e: ldc.i4.6 - IL_005f: shl - IL_0060: ldloc.0 - IL_0061: ldc.i4.2 - IL_0062: shr - IL_0063: add - IL_0064: add - IL_0065: add - IL_0066: stloc.0 - IL_0067: ldloc.0 - IL_0068: ret - - .line 16707566,16707566 : 0,0 '' - IL_0069: ldc.i4.0 - IL_006a: ret + IL_005e: ldc.i4.2 + IL_005f: shr + IL_0060: add + IL_0061: add + IL_0062: add + IL_0063: stloc.0 + IL_0064: ldloc.0 + IL_0065: ret + + .line 16707566,16707566 : 0,0 '' + IL_0066: ldc.i4.0 + IL_0067: ret } // end of method KeyWithInnerKeys::GetHashCode .method public hidebysig virtual final @@ -1178,7 +1144,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 138 (0x8a) + // Code size 135 (0x87) .maxstack 5 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1191,157 +1157,151 @@ [8] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_8) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_0082 + IL_0001: brfalse IL_007f .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_000f: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: brfalse.s IL_0080 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_007d .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0010: ldarg.0 + IL_0011: pop .line 16707566,16707566 : 0,0 '' - IL_0015: ldarg.0 - IL_0016: stloc.1 - IL_0017: ldloc.0 - IL_0018: stloc.2 + IL_0012: ldarg.0 + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0019: ldloc.1 - IL_001a: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0026: stloc.s V_4 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldarg.2 - IL_002c: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_0016: ldloc.1 + IL_0017: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_001c: stloc.3 + IL_001d: ldloc.2 + IL_001e: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0023: stloc.s V_4 + IL_0025: ldloc.3 + IL_0026: ldloc.s V_4 + IL_0028: ldarg.2 + IL_0029: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_0031: brfalse.s IL_007e - - .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.1 - IL_0034: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0039: stloc.s V_5 - IL_003b: ldloc.2 - IL_003c: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0041: stloc.s V_6 - IL_0043: ldloc.s V_5 - IL_0045: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_004a: stloc.3 - IL_004b: ldloc.s V_5 - IL_004d: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0052: stloc.s V_4 - IL_0054: ldloc.s V_6 - IL_0056: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_005b: stloc.s V_7 - IL_005d: ldloc.s V_6 - IL_005f: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0064: stloc.s V_8 - .line 16707566,16707566 : 0,0 '' - IL_0066: ldloc.3 - IL_0067: ldloc.s V_7 - IL_0069: ldarg.2 - IL_006a: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_002e: brfalse.s IL_007b + + .line 16707566,16707566 : 0,0 '' + IL_0030: ldloc.1 + IL_0031: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0036: stloc.s V_5 + IL_0038: ldloc.2 + IL_0039: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_003e: stloc.s V_6 + IL_0040: ldloc.s V_5 + IL_0042: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0047: stloc.3 + IL_0048: ldloc.s V_5 + IL_004a: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_004f: stloc.s V_4 + IL_0051: ldloc.s V_6 + IL_0053: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0058: stloc.s V_7 + IL_005a: ldloc.s V_6 + IL_005c: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0061: stloc.s V_8 + .line 16707566,16707566 : 0,0 '' + IL_0063: ldloc.3 + IL_0064: ldloc.s V_7 + IL_0066: ldarg.2 + IL_0067: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_006f: brfalse.s IL_007c + IL_006c: brfalse.s IL_0079 .line 16707566,16707566 : 0,0 '' - IL_0071: ldloc.s V_4 - IL_0073: ldloc.s V_8 - IL_0075: ldarg.2 - IL_0076: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_006e: ldloc.s V_4 + IL_0070: ldloc.s V_8 + IL_0072: ldarg.2 + IL_0073: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_007b: ret + IL_0078: ret .line 16707566,16707566 : 0,0 '' - IL_007c: ldc.i4.0 - IL_007d: ret + IL_0079: ldc.i4.0 + IL_007a: ret .line 16707566,16707566 : 0,0 '' - IL_007e: ldc.i4.0 - IL_007f: ret + IL_007b: ldc.i4.0 + IL_007c: ret .line 16707566,16707566 : 0,0 '' - IL_0080: ldc.i4.0 - IL_0081: ret + IL_007d: ldc.i4.0 + IL_007e: ret .line 16707566,16707566 : 0,0 '' - IL_0082: ldarg.1 - IL_0083: ldnull - IL_0084: cgt.un - IL_0086: ldc.i4.0 - IL_0087: ceq - IL_0089: ret + IL_007f: ldarg.1 + IL_0080: ldnull + IL_0081: cgt.un + IL_0083: ldc.i4.0 + IL_0084: ceq + IL_0086: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final instance bool Equals(class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 69 (0x45) + // Code size 63 (0x3f) .maxstack 4 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003d + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_003b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0012: ldloc.1 IL_0013: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0018: ldloc.1 - IL_0019: ldfld class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001e: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key) - IL_0023: brfalse.s IL_0039 + IL_0018: callvirt instance bool Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::Equals(class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key) + IL_001d: brfalse.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0025: ldloc.0 + IL_001f: ldloc.0 + IL_0020: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0025: ldloc.1 IL_0026: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_002b: ldloc.1 - IL_002c: ldfld class [mscorlib]System.Tuple`2 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0031: tail. - IL_0033: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, + IL_002b: tail. + IL_002d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, !!0) - IL_0038: ret + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_0033: ldc.i4.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_0035: ldc.i4.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_003d: ldarg.1 - IL_003e: ldnull - IL_003f: cgt.un - IL_0041: ldc.i4.0 - IL_0042: ceq - IL_0044: ret + IL_0037: ldarg.1 + IL_0038: ldnull + IL_0039: cgt.un + IL_003b: ldc.i4.0 + IL_003c: ceq + IL_003e: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.il.bsl index 83743703bab..d7ae1be31ae 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006D8 Length: 0x000003B1 } .module Hash05.dll -// MVID: {61F0294F-9642-7857-A745-03834F29F061} +// MVID: {6220E4FA-9642-7857-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A20000 +// Image base: 0x053B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Hash05/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 110 (0x6e) .maxstack 4 .locals init ([0] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -189,110 +189,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash05.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + IL_0001: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0020: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.3 + IL_0046: ldloc.0 + IL_0047: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.1 + IL_004f: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_0067: ldarg.1 + IL_0068: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_006a: ldc.i4.m1 + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_006c: ldc.i4.0 + IL_006d: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -313,7 +307,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 124 (0x7c) + // Code size 115 (0x73) .maxstack 4 .locals init ([0] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -327,167 +321,159 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006d + IL_0008: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Hash05/HashMicroPerfAndCodeGenerationTests/Key - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_006b + IL_000a: ldarg.1 + IL_000b: unbox.any Hash05/HashMicroPerfAndCodeGenerationTests/Key + IL_0010: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_002c: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0026: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: bge.s IL_0038 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0035: nop - IL_0036: br.s IL_003f + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_003e: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003f: stloc.3 + IL_0039: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.3 - IL_0041: ldc.i4.0 - IL_0042: bge.s IL_0046 + IL_003a: ldloc.3 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.3 - IL_0045: ret + IL_003e: ldloc.3 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: ldloc.3 - IL_0047: ldc.i4.0 - IL_0048: ble.s IL_004c + IL_0040: ldloc.3 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_004a: ldloc.3 - IL_004b: ret + IL_0044: ldloc.3 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_004c: ldloc.1 - IL_004d: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.2 - IL_0055: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0046: ldloc.1 + IL_0047: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.2 + IL_004f: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: unbox.any Hash05/HashMicroPerfAndCodeGenerationTests/Key - IL_0073: ldnull - IL_0074: cgt.un - IL_0076: brfalse.s IL_007a + IL_0067: ldarg.1 + IL_0068: unbox.any Hash05/HashMicroPerfAndCodeGenerationTests/Key + IL_006d: brfalse.s IL_0071 .line 16707566,16707566 : 0,0 '' - IL_0078: ldc.i4.m1 - IL_0079: ret + IL_006f: ldc.i4.m1 + IL_0070: ret .line 16707566,16707566 : 0,0 '' - IL_007a: ldc.i4.0 - IL_007b: ret + IL_0071: ldc.i4.0 + IL_0072: ret } // end of method Key::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 57 (0x39) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add - IL_0020: add - IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl IL_002e: ldloc.0 - IL_002f: ldc.i4.6 - IL_0030: shl - IL_0031: ldloc.0 - IL_0032: ldc.i4.2 - IL_0033: shr - IL_0034: add - IL_0035: add - IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ret + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -507,123 +493,117 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_1, [2] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Hash05/HashMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Hash05/HashMicroPerfAndCodeGenerationTests/Key + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0013: ldloc.1 + IL_0014: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.2 + IL_001a: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0021: ldloc.1 + IL_0022: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.2 + IL_0028: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Hash05/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Key::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.il.bsl index 123b3da4dc0..a1e7b24c811 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006D8 Length: 0x000003B2 } .module Hash06.dll -// MVID: {61F0294F-9642-78F2-A745-03834F29F061} +// MVID: {6220E4FA-9642-78F2-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B50000 +// Image base: 0x06FE0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Hash06/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 110 (0x6e) .maxstack 4 .locals init ([0] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -189,110 +189,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash06.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + IL_0001: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0020: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.3 + IL_0046: ldloc.0 + IL_0047: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.1 + IL_004f: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_0067: ldarg.1 + IL_0068: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_006a: ldc.i4.m1 + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_006c: ldc.i4.0 + IL_006d: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -313,7 +307,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 124 (0x7c) + // Code size 115 (0x73) .maxstack 4 .locals init ([0] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -327,167 +321,159 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006d + IL_0008: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Hash06/HashMicroPerfAndCodeGenerationTests/Key - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_006b + IL_000a: ldarg.1 + IL_000b: unbox.any Hash06/HashMicroPerfAndCodeGenerationTests/Key + IL_0010: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_002c: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0026: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: bge.s IL_0038 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0035: nop - IL_0036: br.s IL_003f + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_003e: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003f: stloc.3 + IL_0039: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.3 - IL_0041: ldc.i4.0 - IL_0042: bge.s IL_0046 + IL_003a: ldloc.3 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.3 - IL_0045: ret + IL_003e: ldloc.3 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: ldloc.3 - IL_0047: ldc.i4.0 - IL_0048: ble.s IL_004c + IL_0040: ldloc.3 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_004a: ldloc.3 - IL_004b: ret + IL_0044: ldloc.3 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_004c: ldloc.1 - IL_004d: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.2 - IL_0055: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0046: ldloc.1 + IL_0047: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.2 + IL_004f: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: unbox.any Hash06/HashMicroPerfAndCodeGenerationTests/Key - IL_0073: ldnull - IL_0074: cgt.un - IL_0076: brfalse.s IL_007a + IL_0067: ldarg.1 + IL_0068: unbox.any Hash06/HashMicroPerfAndCodeGenerationTests/Key + IL_006d: brfalse.s IL_0071 .line 16707566,16707566 : 0,0 '' - IL_0078: ldc.i4.m1 - IL_0079: ret + IL_006f: ldc.i4.m1 + IL_0070: ret .line 16707566,16707566 : 0,0 '' - IL_007a: ldc.i4.0 - IL_007b: ret + IL_0071: ldc.i4.0 + IL_0072: ret } // end of method Key::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 57 (0x39) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add - IL_0020: add - IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl IL_002e: ldloc.0 - IL_002f: ldc.i4.6 - IL_0030: shl - IL_0031: ldloc.0 - IL_0032: ldc.i4.2 - IL_0033: shr - IL_0034: add - IL_0035: add - IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ret + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -507,123 +493,117 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_1, [2] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Hash06/HashMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Hash06/HashMicroPerfAndCodeGenerationTests/Key + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0013: ldloc.1 + IL_0014: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.2 + IL_001a: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0021: ldloc.1 + IL_0022: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.2 + IL_0028: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Hash06/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Key::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.il.bsl index 367e8b2108b..4df8e882961 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000006C8 Length: 0x000003B3 } .module Hash08.dll -// MVID: {61F0294F-9642-77BC-A745-03834F29F061} +// MVID: {6220E4FA-9642-77BC-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x073F0000 +// Image base: 0x066F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -123,7 +123,7 @@ instance int32 CompareTo(class Hash08/HashMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 101 (0x65) + // Code size 92 (0x5c) .maxstack 4 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IComparer V_1, @@ -132,103 +132,97 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash08.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_005b + IL_0001: brfalse.s IL_0055 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0059 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0053 .line 16707566,16707566 : 0,0 '' - IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0011: stloc.1 - IL_0012: ldarg.0 - IL_0013: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: stloc.2 - IL_0019: ldarg.1 - IL_001a: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001f: stloc.3 + IL_0006: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_000b: stloc.1 + IL_000c: ldarg.0 + IL_000d: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0012: stloc.2 + IL_0013: ldarg.1 + IL_0014: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: bge.s IL_0028 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: bge.s IL_0022 .line 16707566,16707566 : 0,0 '' - IL_0024: ldc.i4.m1 + IL_001e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0025: nop - IL_0026: br.s IL_002d + IL_001f: nop + IL_0020: br.s IL_0027 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.2 - IL_0029: ldloc.3 - IL_002a: cgt + IL_0022: ldloc.2 + IL_0023: ldloc.3 + IL_0024: cgt .line 16707566,16707566 : 0,0 '' - IL_002c: nop + IL_0026: nop + .line 16707566,16707566 : 0,0 '' + IL_0027: stloc.0 + .line 16707566,16707566 : 0,0 '' + IL_0028: ldloc.0 + IL_0029: ldc.i4.0 + IL_002a: bge.s IL_002e + .line 16707566,16707566 : 0,0 '' - IL_002d: stloc.0 + IL_002c: ldloc.0 + IL_002d: ret + .line 16707566,16707566 : 0,0 '' IL_002e: ldloc.0 IL_002f: ldc.i4.0 - IL_0030: bge.s IL_0034 + IL_0030: ble.s IL_0034 .line 16707566,16707566 : 0,0 '' IL_0032: ldloc.0 IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldloc.0 - IL_0035: ldc.i4.0 - IL_0036: ble.s IL_003a - + IL_0034: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0039: stloc.1 + IL_003a: ldarg.0 + IL_003b: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0040: stloc.2 + IL_0041: ldarg.1 + IL_0042: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0047: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.0 - IL_0039: ret + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: bge.s IL_004e .line 16707566,16707566 : 0,0 '' - IL_003a: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_003f: stloc.1 - IL_0040: ldarg.0 - IL_0041: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0046: stloc.2 - IL_0047: ldarg.1 - IL_0048: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_004d: stloc.3 + IL_004c: ldc.i4.m1 + IL_004d: ret + .line 16707566,16707566 : 0,0 '' IL_004e: ldloc.2 IL_004f: ldloc.3 - IL_0050: bge.s IL_0054 - - .line 16707566,16707566 : 0,0 '' - IL_0052: ldc.i4.m1 - IL_0053: ret - - .line 16707566,16707566 : 0,0 '' - IL_0054: ldloc.2 - IL_0055: ldloc.3 - IL_0056: cgt - IL_0058: ret + IL_0050: cgt + IL_0052: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldc.i4.1 - IL_005a: ret + IL_0053: ldc.i4.1 + IL_0054: ret .line 16707566,16707566 : 0,0 '' - IL_005b: ldarg.1 - IL_005c: ldnull - IL_005d: cgt.un - IL_005f: brfalse.s IL_0063 + IL_0055: ldarg.1 + IL_0056: brfalse.s IL_005a .line 16707566,16707566 : 0,0 '' - IL_0061: ldc.i4.m1 - IL_0062: ret + IL_0058: ldc.i4.m1 + IL_0059: ret .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.0 - IL_0064: ret + IL_005a: ldc.i4.0 + IL_005b: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final @@ -249,7 +243,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 106 (0x6a) + // Code size 97 (0x61) .maxstack 4 .locals init ([0] class Hash08/HashMicroPerfAndCodeGenerationTests/KeyR V_0, [1] int32 V_1, @@ -261,151 +255,143 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_005b + IL_0008: brfalse.s IL_0055 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Hash08/HashMicroPerfAndCodeGenerationTests/KeyR - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0059 + IL_000a: ldarg.1 + IL_000b: unbox.any Hash08/HashMicroPerfAndCodeGenerationTests/KeyR + IL_0010: brfalse.s IL_0053 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001e: stloc.2 - IL_001f: ldloc.0 - IL_0020: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0025: stloc.3 + IL_0012: ldarg.0 + IL_0013: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0018: stloc.2 + IL_0019: ldloc.0 + IL_001a: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_001f: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0026: ldloc.2 - IL_0027: ldloc.3 - IL_0028: bge.s IL_002e + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: bge.s IL_0028 .line 16707566,16707566 : 0,0 '' - IL_002a: ldc.i4.m1 + IL_0024: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002b: nop - IL_002c: br.s IL_0033 + IL_0025: nop + IL_0026: br.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.2 - IL_002f: ldloc.3 - IL_0030: cgt + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: cgt + .line 16707566,16707566 : 0,0 '' + IL_002c: nop .line 16707566,16707566 : 0,0 '' - IL_0032: nop + IL_002d: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0033: stloc.1 + IL_002e: ldloc.1 + IL_002f: ldc.i4.0 + IL_0030: bge.s IL_0034 + + .line 16707566,16707566 : 0,0 '' + IL_0032: ldloc.1 + IL_0033: ret + .line 16707566,16707566 : 0,0 '' IL_0034: ldloc.1 IL_0035: ldc.i4.0 - IL_0036: bge.s IL_003a + IL_0036: ble.s IL_003a .line 16707566,16707566 : 0,0 '' IL_0038: ldloc.1 IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.1 - IL_003b: ldc.i4.0 - IL_003c: ble.s IL_0040 - + IL_003a: ldarg.0 + IL_003b: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0040: stloc.2 + IL_0041: ldloc.0 + IL_0042: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0047: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.1 - IL_003f: ret + IL_0048: ldloc.2 + IL_0049: ldloc.3 + IL_004a: bge.s IL_004e .line 16707566,16707566 : 0,0 '' - IL_0040: ldarg.0 - IL_0041: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0046: stloc.2 - IL_0047: ldloc.0 - IL_0048: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_004d: stloc.3 + IL_004c: ldc.i4.m1 + IL_004d: ret + .line 16707566,16707566 : 0,0 '' IL_004e: ldloc.2 IL_004f: ldloc.3 - IL_0050: bge.s IL_0054 - - .line 16707566,16707566 : 0,0 '' - IL_0052: ldc.i4.m1 - IL_0053: ret + IL_0050: cgt + IL_0052: ret .line 16707566,16707566 : 0,0 '' - IL_0054: ldloc.2 - IL_0055: ldloc.3 - IL_0056: cgt - IL_0058: ret + IL_0053: ldc.i4.1 + IL_0054: ret .line 16707566,16707566 : 0,0 '' - IL_0059: ldc.i4.1 - IL_005a: ret + IL_0055: ldarg.1 + IL_0056: unbox.any Hash08/HashMicroPerfAndCodeGenerationTests/KeyR + IL_005b: brfalse.s IL_005f .line 16707566,16707566 : 0,0 '' - IL_005b: ldarg.1 - IL_005c: unbox.any Hash08/HashMicroPerfAndCodeGenerationTests/KeyR - IL_0061: ldnull - IL_0062: cgt.un - IL_0064: brfalse.s IL_0068 + IL_005d: ldc.i4.m1 + IL_005e: ret .line 16707566,16707566 : 0,0 '' - IL_0066: ldc.i4.m1 - IL_0067: ret - - .line 16707566,16707566 : 0,0 '' - IL_0068: ldc.i4.0 - IL_0069: ret + IL_005f: ldc.i4.0 + IL_0060: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 54 (0x36) + // Code size 51 (0x33) .maxstack 7 .locals init ([0] int32 V_0) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0034 + IL_0001: brfalse.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldc.i4 0x9e3779b9 - IL_000d: ldarg.0 - IL_000e: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0003: ldc.i4.0 + IL_0004: stloc.0 + IL_0005: ldc.i4 0x9e3779b9 + IL_000a: ldarg.0 + IL_000b: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0010: ldloc.0 + IL_0011: ldc.i4.6 + IL_0012: shl IL_0013: ldloc.0 - IL_0014: ldc.i4.6 - IL_0015: shl - IL_0016: ldloc.0 - IL_0017: ldc.i4.2 - IL_0018: shr - IL_0019: add - IL_001a: add - IL_001b: add - IL_001c: stloc.0 - IL_001d: ldc.i4 0x9e3779b9 - IL_0022: ldarg.0 - IL_0023: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0014: ldc.i4.2 + IL_0015: shr + IL_0016: add + IL_0017: add + IL_0018: add + IL_0019: stloc.0 + IL_001a: ldc.i4 0x9e3779b9 + IL_001f: ldarg.0 + IL_0020: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0025: ldloc.0 + IL_0026: ldc.i4.6 + IL_0027: shl IL_0028: ldloc.0 - IL_0029: ldc.i4.6 - IL_002a: shl - IL_002b: ldloc.0 - IL_002c: ldc.i4.2 - IL_002d: shr - IL_002e: add - IL_002f: add - IL_0030: add - IL_0031: stloc.0 - IL_0032: ldloc.0 - IL_0033: ret + IL_0029: ldc.i4.2 + IL_002a: shr + IL_002b: add + IL_002c: add + IL_002d: add + IL_002e: stloc.0 + IL_002f: ldloc.0 + IL_0030: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_0031: ldc.i4.0 + IL_0032: ret } // end of method KeyR::GetHashCode .method public hidebysig virtual final @@ -425,103 +411,97 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 57 (0x39) + // Code size 54 (0x36) .maxstack 4 .locals init ([0] class Hash08/HashMicroPerfAndCodeGenerationTests/KeyR V_0) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0031 + IL_0001: brfalse.s IL_002e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Hash08/HashMicroPerfAndCodeGenerationTests/KeyR - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Hash08/HashMicroPerfAndCodeGenerationTests/KeyR + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_002f + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0016: ldloc.0 - IL_0017: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_001c: bne.un.s IL_002d + IL_000d: ldarg.0 + IL_000e: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0013: ldloc.0 + IL_0014: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_0019: bne.un.s IL_002a .line 16707566,16707566 : 0,0 '' - IL_001e: ldarg.0 - IL_001f: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0024: ldloc.0 - IL_0025: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_002a: ceq - IL_002c: ret + IL_001b: ldarg.0 + IL_001c: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0021: ldloc.0 + IL_0022: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_0027: ceq + IL_0029: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldc.i4.0 - IL_002e: ret + IL_002a: ldc.i4.0 + IL_002b: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002c: ldc.i4.0 + IL_002d: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldarg.1 - IL_0032: ldnull - IL_0033: cgt.un - IL_0035: ldc.i4.0 - IL_0036: ceq - IL_0038: ret + IL_002e: ldarg.1 + IL_002f: ldnull + IL_0030: cgt.un + IL_0032: ldc.i4.0 + IL_0033: ceq + IL_0035: ret } // end of method KeyR::Equals .method public hidebysig virtual final instance bool Equals(class Hash08/HashMicroPerfAndCodeGenerationTests/KeyR obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 47 (0x2f) .maxstack 8 .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_002d + IL_0001: brfalse.s IL_0027 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_002b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0025 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 + IL_0006: ldarg.0 + IL_0007: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ + IL_000c: ldarg.1 IL_000d: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0012: ldarg.1 - IL_0013: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key1@ - IL_0018: bne.un.s IL_0029 + IL_0012: bne.un.s IL_0023 .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 + IL_0014: ldarg.0 + IL_0015: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ + IL_001a: ldarg.1 IL_001b: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0020: ldarg.1 - IL_0021: ldfld int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::key2@ - IL_0026: ceq - IL_0028: ret + IL_0020: ceq + IL_0022: ret .line 16707566,16707566 : 0,0 '' - IL_0029: ldc.i4.0 - IL_002a: ret + IL_0023: ldc.i4.0 + IL_0024: ret .line 16707566,16707566 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_0025: ldc.i4.0 + IL_0026: ret .line 16707566,16707566 : 0,0 '' - IL_002d: ldarg.1 - IL_002e: ldnull - IL_002f: cgt.un - IL_0031: ldc.i4.0 - IL_0032: ceq - IL_0034: ret + IL_0027: ldarg.1 + IL_0028: ldnull + IL_0029: cgt.un + IL_002b: ldc.i4.0 + IL_002c: ceq + IL_002e: ret } // end of method KeyR::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.il.bsl index c30b1196014..8ecc2bff4a1 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000888 Length: 0x00000680 } .module Hash09.dll -// MVID: {61F0294F-9642-77DB-A745-03834F29F061} +// MVID: {6220E4FA-9642-77DB-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x069F0000 +// Image base: 0x07390000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 110 (0x6e) + // Code size 101 (0x65) .maxstack 5 .locals init ([0] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -189,92 +189,86 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash09.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0064 + IL_0001: brfalse.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0062 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_005c .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0026: stloc.s V_5 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0020: stloc.s V_5 + IL_0022: ldloc.3 + IL_0023: ldloc.s V_4 + IL_0025: ldloc.s V_5 + IL_0027: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0032: stloc.2 + IL_002c: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.2 - IL_0034: ldc.i4.0 - IL_0035: bge.s IL_0039 + IL_002d: ldloc.2 + IL_002e: ldc.i4.0 + IL_002f: bge.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0037: ldloc.2 - IL_0038: ret + IL_0031: ldloc.2 + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: ble.s IL_003f + IL_0033: ldloc.2 + IL_0034: ldc.i4.0 + IL_0035: ble.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_0037: ldloc.2 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0044: stloc.3 - IL_0045: ldloc.0 - IL_0046: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_004b: stloc.s V_4 - IL_004d: ldloc.1 - IL_004e: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0053: stloc.s V_5 - IL_0055: ldloc.3 - IL_0056: ldloc.s V_4 - IL_0058: ldloc.s V_5 - IL_005a: tail. - IL_005c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0039: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_003e: stloc.3 + IL_003f: ldloc.0 + IL_0040: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0045: stloc.s V_4 + IL_0047: ldloc.1 + IL_0048: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_004d: stloc.s V_5 + IL_004f: ldloc.3 + IL_0050: ldloc.s V_4 + IL_0052: ldloc.s V_5 + IL_0054: tail. + IL_0056: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0061: ret + IL_005b: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.1 - IL_0063: ret + IL_005c: ldc.i4.1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldarg.1 - IL_0065: ldnull - IL_0066: cgt.un - IL_0068: brfalse.s IL_006c + IL_005e: ldarg.1 + IL_005f: brfalse.s IL_0063 .line 16707566,16707566 : 0,0 '' - IL_006a: ldc.i4.m1 - IL_006b: ret + IL_0061: ldc.i4.m1 + IL_0062: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.0 - IL_006d: ret + IL_0063: ldc.i4.0 + IL_0064: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final @@ -296,7 +290,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 115 (0x73) + // Code size 106 (0x6a) .maxstack 5 .locals init ([0] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -310,160 +304,152 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0064 - - .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0062 - - .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop - .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_002c: stloc.s V_5 - IL_002e: ldarg.2 - IL_002f: ldloc.s V_4 - IL_0031: ldloc.s V_5 - IL_0033: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_0008: brfalse.s IL_005e + + .line 16707566,16707566 : 0,0 '' + IL_000a: ldarg.1 + IL_000b: unbox.any class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0010: brfalse.s IL_005c + + .line 16707566,16707566 : 0,0 '' + IL_0012: ldarg.0 + IL_0013: pop + .line 16707566,16707566 : 0,0 '' + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0026: stloc.s V_5 + IL_0028: ldarg.2 + IL_0029: ldloc.s V_4 + IL_002b: ldloc.s V_5 + IL_002d: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0038: stloc.3 + IL_0032: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.3 - IL_003a: ldc.i4.0 - IL_003b: bge.s IL_003f + IL_0033: ldloc.3 + IL_0034: ldc.i4.0 + IL_0035: bge.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.3 - IL_003e: ret + IL_0037: ldloc.3 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.3 - IL_0040: ldc.i4.0 - IL_0041: ble.s IL_0045 + IL_0039: ldloc.3 + IL_003a: ldc.i4.0 + IL_003b: ble.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0043: ldloc.3 - IL_0044: ret + IL_003d: ldloc.3 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.1 - IL_0046: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_004b: stloc.s V_4 - IL_004d: ldloc.2 - IL_004e: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0053: stloc.s V_5 - IL_0055: ldarg.2 - IL_0056: ldloc.s V_4 - IL_0058: ldloc.s V_5 - IL_005a: tail. - IL_005c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_003f: ldloc.1 + IL_0040: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0045: stloc.s V_4 + IL_0047: ldloc.2 + IL_0048: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_004d: stloc.s V_5 + IL_004f: ldarg.2 + IL_0050: ldloc.s V_4 + IL_0052: ldloc.s V_5 + IL_0054: tail. + IL_0056: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) - IL_0061: ret + IL_005b: ret .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.1 - IL_0063: ret + IL_005c: ldc.i4.1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldarg.1 - IL_0065: unbox.any class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_006a: ldnull - IL_006b: cgt.un - IL_006d: brfalse.s IL_0071 + IL_005e: ldarg.1 + IL_005f: unbox.any class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0064: brfalse.s IL_0068 .line 16707566,16707566 : 0,0 '' - IL_006f: ldc.i4.m1 - IL_0070: ret + IL_0066: ldc.i4.m1 + IL_0067: ret .line 16707566,16707566 : 0,0 '' - IL_0071: ldc.i4.0 - IL_0072: ret + IL_0068: ldc.i4.0 + IL_0069: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 76 (0x4c) + // Code size 73 (0x49) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] !a V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004a + IL_0001: brfalse.s IL_0047 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0019: stloc.2 - IL_001a: ldarg.1 - IL_001b: ldloc.2 - IL_001c: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0016: stloc.2 + IL_0017: ldarg.1 + IL_0018: ldloc.2 + IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0) + IL_001e: ldloc.0 + IL_001f: ldc.i4.6 + IL_0020: shl IL_0021: ldloc.0 - IL_0022: ldc.i4.6 - IL_0023: shl - IL_0024: ldloc.0 - IL_0025: ldc.i4.2 - IL_0026: shr - IL_0027: add - IL_0028: add - IL_0029: add - IL_002a: stloc.0 - IL_002b: ldc.i4 0x9e3779b9 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0036: stloc.2 - IL_0037: ldarg.1 - IL_0038: ldloc.2 - IL_0039: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_0022: ldc.i4.2 + IL_0023: shr + IL_0024: add + IL_0025: add + IL_0026: add + IL_0027: stloc.0 + IL_0028: ldc.i4 0x9e3779b9 + IL_002d: ldloc.1 + IL_002e: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0033: stloc.2 + IL_0034: ldarg.1 + IL_0035: ldloc.2 + IL_0036: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0) + IL_003b: ldloc.0 + IL_003c: ldc.i4.6 + IL_003d: shl IL_003e: ldloc.0 - IL_003f: ldc.i4.6 - IL_0040: shl - IL_0041: ldloc.0 - IL_0042: ldc.i4.2 - IL_0043: shr - IL_0044: add - IL_0045: add - IL_0046: add - IL_0047: stloc.0 - IL_0048: ldloc.0 - IL_0049: ret + IL_003f: ldc.i4.2 + IL_0040: shr + IL_0041: add + IL_0042: add + IL_0043: add + IL_0044: stloc.0 + IL_0045: ldloc.0 + IL_0046: ret .line 16707566,16707566 : 0,0 '' - IL_004a: ldc.i4.0 - IL_004b: ret + IL_0047: ldc.i4.0 + IL_0048: ret } // end of method GenericKey`1::GetHashCode .method public hidebysig virtual final @@ -483,7 +469,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 87 (0x57) + // Code size 84 (0x54) .maxstack 5 .locals init ([0] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -492,79 +478,77 @@ [4] !a V_4) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_004f + IL_0001: brfalse.s IL_004c .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_004d + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_004a .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 - .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001c: stloc.3 - IL_001d: ldloc.2 - IL_001e: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0023: stloc.s V_4 - IL_0025: ldarg.2 - IL_0026: ldloc.3 - IL_0027: ldloc.s V_4 - IL_0029: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 + .line 16707566,16707566 : 0,0 '' + IL_0013: ldloc.1 + IL_0014: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0020: stloc.s V_4 + IL_0022: ldarg.2 + IL_0023: ldloc.3 + IL_0024: ldloc.s V_4 + IL_0026: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_002e: brfalse.s IL_004b + IL_002b: brfalse.s IL_0048 .line 16707566,16707566 : 0,0 '' - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_003d: stloc.s V_4 - IL_003f: ldarg.2 - IL_0040: ldloc.3 - IL_0041: ldloc.s V_4 - IL_0043: tail. - IL_0045: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, + IL_002d: ldloc.1 + IL_002e: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0033: stloc.3 + IL_0034: ldloc.2 + IL_0035: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_003a: stloc.s V_4 + IL_003c: ldarg.2 + IL_003d: ldloc.3 + IL_003e: ldloc.s V_4 + IL_0040: tail. + IL_0042: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityWithComparerIntrinsic(class [mscorlib]System.Collections.IEqualityComparer, !!0, !!0) - IL_004a: ret + IL_0047: ret .line 16707566,16707566 : 0,0 '' - IL_004b: ldc.i4.0 - IL_004c: ret + IL_0048: ldc.i4.0 + IL_0049: ret .line 16707566,16707566 : 0,0 '' - IL_004d: ldc.i4.0 - IL_004e: ret + IL_004a: ldc.i4.0 + IL_004b: ret .line 16707566,16707566 : 0,0 '' - IL_004f: ldarg.1 - IL_0050: ldnull - IL_0051: cgt.un - IL_0053: ldc.i4.0 - IL_0054: ceq - IL_0056: ret + IL_004c: ldarg.1 + IL_004d: ldnull + IL_004e: cgt.un + IL_0050: ldc.i4.0 + IL_0051: ceq + IL_0053: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final instance bool Equals(class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 77 (0x4d) + // Code size 71 (0x47) .maxstack 4 .locals init ([0] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -572,66 +556,62 @@ [3] !a V_3) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0045 + IL_0001: brfalse.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0043 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_003d .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 - IL_0013: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldloc.3 - IL_0022: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_000c: ldloc.0 + IL_000d: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0012: stloc.2 + IL_0013: ldloc.1 + IL_0014: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item1 + IL_0019: stloc.3 + IL_001a: ldloc.2 + IL_001b: ldloc.3 + IL_001c: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0027: brfalse.s IL_0041 - - .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.0 - IL_002a: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_002f: stloc.2 - IL_0030: ldloc.1 - IL_0031: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 - IL_0036: stloc.3 - IL_0037: ldloc.2 - IL_0038: ldloc.3 - IL_0039: tail. - IL_003b: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, + IL_0021: brfalse.s IL_003b + + .line 16707566,16707566 : 0,0 '' + IL_0023: ldloc.0 + IL_0024: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0029: stloc.2 + IL_002a: ldloc.1 + IL_002b: ldfld !0 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::item2 + IL_0030: stloc.3 + IL_0031: ldloc.2 + IL_0032: ldloc.3 + IL_0033: tail. + IL_0035: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic(!!0, !!0) - IL_0040: ret + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_0041: ldc.i4.0 - IL_0042: ret + IL_003b: ldc.i4.0 + IL_003c: ret .line 16707566,16707566 : 0,0 '' - IL_0043: ldc.i4.0 - IL_0044: ret + IL_003d: ldc.i4.0 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldarg.1 - IL_0046: ldnull - IL_0047: cgt.un - IL_0049: ldc.i4.0 - IL_004a: ceq - IL_004c: ret + IL_003f: ldarg.1 + IL_0040: ldnull + IL_0041: cgt.un + IL_0043: ldc.i4.0 + IL_0044: ceq + IL_0046: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.il.bsl index 074c977668d..514de1155d5 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000A90 Length: 0x00000585 } .module Hash12.dll -// MVID: {61F0294F-9661-796E-A745-03834F29F061} +// MVID: {6220E4FA-9661-796E-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07540000 +// Image base: 0x07040000 // =============== CLASS MEMBERS DECLARATION =================== @@ -178,7 +178,7 @@ instance int32 CompareTo(class Hash12/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 119 (0x77) + // Code size 110 (0x6e) .maxstack 4 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -189,110 +189,104 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 16707566,16707566 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash12.fsx' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_006d + IL_0001: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_006b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 - IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_0017: stloc.3 - IL_0018: ldloc.0 - IL_0019: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: stloc.s V_4 - IL_0020: ldloc.1 - IL_0021: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0026: stloc.s V_5 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 + IL_000c: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0011: stloc.3 + IL_0012: ldloc.0 + IL_0013: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0018: stloc.s V_4 + IL_001a: ldloc.1 + IL_001b: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0020: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.s V_4 - IL_002a: ldloc.s V_5 - IL_002c: bge.s IL_0032 + IL_0022: ldloc.s V_4 + IL_0024: ldloc.s V_5 + IL_0026: bge.s IL_002c .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.m1 + IL_0028: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_002f: nop - IL_0030: br.s IL_0039 + IL_0029: nop + IL_002a: br.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: cgt + IL_002c: ldloc.s V_4 + IL_002e: ldloc.s V_5 + IL_0030: cgt .line 16707566,16707566 : 0,0 '' - IL_0038: nop + IL_0032: nop .line 16707566,16707566 : 0,0 '' - IL_0039: stloc.2 + IL_0033: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0034: ldloc.2 + IL_0035: ldc.i4.0 + IL_0036: bge.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_0038: ldloc.2 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: ble.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004b: stloc.3 - IL_004c: ldloc.0 - IL_004d: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.1 - IL_0055: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0040: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0045: stloc.3 + IL_0046: ldloc.0 + IL_0047: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.1 + IL_004f: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: ldnull - IL_006f: cgt.un - IL_0071: brfalse.s IL_0075 + IL_0067: ldarg.1 + IL_0068: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_0073: ldc.i4.m1 - IL_0074: ret + IL_006a: ldc.i4.m1 + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_0075: ldc.i4.0 - IL_0076: ret + IL_006c: ldc.i4.0 + IL_006d: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -313,7 +307,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 124 (0x7c) + // Code size 115 (0x73) .maxstack 4 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -327,167 +321,159 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006d + IL_0008: brfalse.s IL_0067 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/Key - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_006b + IL_000a: ldarg.1 + IL_000b: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/Key + IL_0010: brfalse.s IL_0065 .line 16707566,16707566 : 0,0 '' - IL_0018: ldarg.0 - IL_0019: pop + IL_0012: ldarg.0 + IL_0013: pop .line 16707566,16707566 : 0,0 '' - IL_001a: ldarg.0 - IL_001b: stloc.1 - IL_001c: ldloc.0 - IL_001d: stloc.2 - IL_001e: ldloc.1 - IL_001f: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.2 - IL_0027: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_002c: stloc.s V_5 + IL_0014: ldarg.0 + IL_0015: stloc.1 + IL_0016: ldloc.0 + IL_0017: stloc.2 + IL_0018: ldloc.1 + IL_0019: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.2 + IL_0021: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0026: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: bge.s IL_0038 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0035: nop - IL_0036: br.s IL_003f + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: ldloc.s V_5 - IL_003c: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_003e: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003f: stloc.3 + IL_0039: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.3 - IL_0041: ldc.i4.0 - IL_0042: bge.s IL_0046 + IL_003a: ldloc.3 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.3 - IL_0045: ret + IL_003e: ldloc.3 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0046: ldloc.3 - IL_0047: ldc.i4.0 - IL_0048: ble.s IL_004c + IL_0040: ldloc.3 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_004a: ldloc.3 - IL_004b: ret + IL_0044: ldloc.3 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - IL_004c: ldloc.1 - IL_004d: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0052: stloc.s V_4 - IL_0054: ldloc.2 - IL_0055: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_005a: stloc.s V_5 + IL_0046: ldloc.1 + IL_0047: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_004c: stloc.s V_4 + IL_004e: ldloc.2 + IL_004f: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0054: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_005c: ldloc.s V_4 - IL_005e: ldloc.s V_5 - IL_0060: bge.s IL_0064 + IL_0056: ldloc.s V_4 + IL_0058: ldloc.s V_5 + IL_005a: bge.s IL_005e .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_005c: ldc.i4.m1 + IL_005d: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldloc.s V_4 - IL_0066: ldloc.s V_5 - IL_0068: cgt - IL_006a: ret + IL_005e: ldloc.s V_4 + IL_0060: ldloc.s V_5 + IL_0062: cgt + IL_0064: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.1 - IL_006c: ret + IL_0065: ldc.i4.1 + IL_0066: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldarg.1 - IL_006e: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/Key - IL_0073: ldnull - IL_0074: cgt.un - IL_0076: brfalse.s IL_007a + IL_0067: ldarg.1 + IL_0068: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/Key + IL_006d: brfalse.s IL_0071 .line 16707566,16707566 : 0,0 '' - IL_0078: ldc.i4.m1 - IL_0079: ret + IL_006f: ldc.i4.m1 + IL_0070: ret .line 16707566,16707566 : 0,0 '' - IL_007a: ldc.i4.0 - IL_007b: ret + IL_0071: ldc.i4.0 + IL_0072: ret } // end of method Key::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 60 (0x3c) + // Code size 57 (0x39) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003a + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0016: ldloc.0 + IL_0017: ldc.i4.6 + IL_0018: shl IL_0019: ldloc.0 - IL_001a: ldc.i4.6 - IL_001b: shl - IL_001c: ldloc.0 - IL_001d: ldc.i4.2 - IL_001e: shr - IL_001f: add - IL_0020: add - IL_0021: add - IL_0022: stloc.0 - IL_0023: ldc.i4 0x9e3779b9 - IL_0028: ldloc.1 - IL_0029: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001a: ldc.i4.2 + IL_001b: shr + IL_001c: add + IL_001d: add + IL_001e: add + IL_001f: stloc.0 + IL_0020: ldc.i4 0x9e3779b9 + IL_0025: ldloc.1 + IL_0026: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_002b: ldloc.0 + IL_002c: ldc.i4.6 + IL_002d: shl IL_002e: ldloc.0 - IL_002f: ldc.i4.6 - IL_0030: shl - IL_0031: ldloc.0 - IL_0032: ldc.i4.2 - IL_0033: shr - IL_0034: add - IL_0035: add - IL_0036: add - IL_0037: stloc.0 - IL_0038: ldloc.0 - IL_0039: ret + IL_002f: ldc.i4.2 + IL_0030: shr + IL_0031: add + IL_0032: add + IL_0033: add + IL_0034: stloc.0 + IL_0035: ldloc.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0037: ldc.i4.0 + IL_0038: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -507,123 +493,117 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 63 (0x3f) + // Code size 60 (0x3c) .maxstack 4 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_1, [2] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_2) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0037 + IL_0001: brfalse.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: isinst Hash12/HashMicroPerfAndCodeGenerationTests/Key - IL_000c: stloc.0 + IL_0003: ldarg.1 + IL_0004: isinst Hash12/HashMicroPerfAndCodeGenerationTests/Key + IL_0009: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000d: ldloc.0 - IL_000e: brfalse.s IL_0035 + IL_000a: ldloc.0 + IL_000b: brfalse.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.0 - IL_0011: pop + IL_000d: ldarg.0 + IL_000e: pop .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: stloc.1 - IL_0014: ldloc.0 - IL_0015: stloc.2 + IL_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.0 + IL_0012: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0016: ldloc.1 - IL_0017: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001c: ldloc.2 - IL_001d: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0022: bne.un.s IL_0033 + IL_0013: ldloc.1 + IL_0014: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0019: ldloc.2 + IL_001a: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_001f: bne.un.s IL_0030 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.1 - IL_0025: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002a: ldloc.2 - IL_002b: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0030: ceq - IL_0032: ret + IL_0021: ldloc.1 + IL_0022: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0027: ldloc.2 + IL_0028: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_002d: ceq + IL_002f: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldc.i4.0 - IL_0034: ret + IL_0030: ldc.i4.0 + IL_0031: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0032: ldc.i4.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: ldc.i4.0 - IL_003c: ceq - IL_003e: ret + IL_0034: ldarg.1 + IL_0035: ldnull + IL_0036: cgt.un + IL_0038: ldc.i4.0 + IL_0039: ceq + IL_003b: ret } // end of method Key::Equals .method public hidebysig virtual final instance bool Equals(class Hash12/HashMicroPerfAndCodeGenerationTests/Key obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 59 (0x3b) + // Code size 53 (0x35) .maxstack 4 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0033 + IL_0001: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0031 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 + IL_0012: ldloc.1 IL_0013: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_0018: ldloc.1 - IL_0019: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item1 - IL_001e: bne.un.s IL_002f + IL_0018: bne.un.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 + IL_0020: ldloc.1 IL_0021: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_0026: ldloc.1 - IL_0027: ldfld int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::item2 - IL_002c: ceq - IL_002e: ret + IL_0026: ceq + IL_0028: ret .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_0031: ldc.i4.0 - IL_0032: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_0033: ldarg.1 - IL_0034: ldnull - IL_0035: cgt.un - IL_0037: ldc.i4.0 - IL_0038: ceq - IL_003a: ret + IL_002d: ldarg.1 + IL_002e: ldnull + IL_002f: cgt.un + IL_0031: ldc.i4.0 + IL_0032: ceq + IL_0034: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -802,7 +782,7 @@ instance int32 CompareTo(class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 169 (0xa9) + // Code size 160 (0xa0) .maxstack 5 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -817,116 +797,110 @@ [10] int32 V_10) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_009f + IL_0001: brfalse IL_0099 .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse IL_009d + IL_0006: ldarg.1 + IL_0007: brfalse IL_0097 .line 16707566,16707566 : 0,0 '' - IL_0012: ldarg.0 - IL_0013: pop + IL_000c: ldarg.0 + IL_000d: pop .line 16707566,16707566 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: stloc.0 - IL_0016: ldarg.1 - IL_0017: stloc.1 - IL_0018: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_001d: stloc.3 - IL_001e: ldloc.0 - IL_001f: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0024: stloc.s V_4 - IL_0026: ldloc.1 - IL_0027: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_002c: stloc.s V_5 - IL_002e: ldloc.s V_4 - IL_0030: ldloc.s V_5 - IL_0032: ldloc.3 - IL_0033: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + IL_0012: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0017: stloc.3 + IL_0018: ldloc.0 + IL_0019: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_001e: stloc.s V_4 + IL_0020: ldloc.1 + IL_0021: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0026: stloc.s V_5 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: ldloc.3 + IL_002d: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0038: stloc.2 + IL_0032: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.2 - IL_003a: ldc.i4.0 - IL_003b: bge.s IL_003f + IL_0033: ldloc.2 + IL_0034: ldc.i4.0 + IL_0035: bge.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_003d: ldloc.2 - IL_003e: ret + IL_0037: ldloc.2 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ldc.i4.0 - IL_0041: ble.s IL_0045 + IL_0039: ldloc.2 + IL_003a: ldc.i4.0 + IL_003b: ble.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0043: ldloc.2 - IL_0044: ret + IL_003d: ldloc.2 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0045: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_004a: stloc.3 - IL_004b: ldloc.0 - IL_004c: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0051: stloc.s V_6 - IL_0053: ldloc.1 - IL_0054: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0059: stloc.s V_7 - IL_005b: ldloc.s V_6 - IL_005d: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0062: stloc.s V_4 - IL_0064: ldloc.s V_6 - IL_0066: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_006b: stloc.s V_5 - IL_006d: ldloc.s V_7 - IL_006f: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0074: stloc.s V_8 - IL_0076: ldloc.s V_7 - IL_0078: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_007d: stloc.s V_9 - IL_007f: ldloc.s V_4 - IL_0081: ldloc.s V_8 - IL_0083: ldloc.3 - IL_0084: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_003f: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_0044: stloc.3 + IL_0045: ldloc.0 + IL_0046: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_004b: stloc.s V_6 + IL_004d: ldloc.1 + IL_004e: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0053: stloc.s V_7 + IL_0055: ldloc.s V_6 + IL_0057: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_005c: stloc.s V_4 + IL_005e: ldloc.s V_6 + IL_0060: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0065: stloc.s V_5 + IL_0067: ldloc.s V_7 + IL_0069: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_006e: stloc.s V_8 + IL_0070: ldloc.s V_7 + IL_0072: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0077: stloc.s V_9 + IL_0079: ldloc.s V_4 + IL_007b: ldloc.s V_8 + IL_007d: ldloc.3 + IL_007e: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0089: stloc.s V_10 + IL_0083: stloc.s V_10 .line 16707566,16707566 : 0,0 '' - IL_008b: ldloc.s V_10 - IL_008d: brfalse.s IL_0092 + IL_0085: ldloc.s V_10 + IL_0087: brfalse.s IL_008c .line 16707566,16707566 : 0,0 '' - IL_008f: ldloc.s V_10 - IL_0091: ret + IL_0089: ldloc.s V_10 + IL_008b: ret .line 16707566,16707566 : 0,0 '' - IL_0092: ldloc.s V_5 - IL_0094: ldloc.s V_9 - IL_0096: ldloc.3 - IL_0097: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_008c: ldloc.s V_5 + IL_008e: ldloc.s V_9 + IL_0090: ldloc.3 + IL_0091: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_009c: ret + IL_0096: ret .line 16707566,16707566 : 0,0 '' - IL_009d: ldc.i4.1 - IL_009e: ret + IL_0097: ldc.i4.1 + IL_0098: ret .line 16707566,16707566 : 0,0 '' - IL_009f: ldarg.1 - IL_00a0: ldnull - IL_00a1: cgt.un - IL_00a3: brfalse.s IL_00a7 + IL_0099: ldarg.1 + IL_009a: brfalse.s IL_009e .line 16707566,16707566 : 0,0 '' - IL_00a5: ldc.i4.m1 - IL_00a6: ret + IL_009c: ldc.i4.m1 + IL_009d: ret .line 16707566,16707566 : 0,0 '' - IL_00a7: ldc.i4.0 - IL_00a8: ret + IL_009e: ldc.i4.0 + IL_009f: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final @@ -947,7 +921,7 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 174 (0xae) + // Code size 165 (0xa5) .maxstack 5 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -966,121 +940,115 @@ IL_0006: stloc.0 .line 16707566,16707566 : 0,0 '' IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse IL_009f + IL_0008: brfalse IL_0099 .line 16707566,16707566 : 0,0 '' - IL_0010: ldarg.1 - IL_0011: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_0016: ldnull - IL_0017: cgt.un - IL_0019: brfalse IL_009d - - .line 16707566,16707566 : 0,0 '' - IL_001e: ldarg.0 - IL_001f: pop - .line 16707566,16707566 : 0,0 '' - IL_0020: ldarg.0 - IL_0021: stloc.1 - IL_0022: ldloc.0 - IL_0023: stloc.2 - IL_0024: ldloc.1 - IL_0025: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_002a: stloc.s V_4 - IL_002c: ldloc.2 - IL_002d: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0032: stloc.s V_5 - IL_0034: ldloc.s V_4 - IL_0036: ldloc.s V_5 - IL_0038: ldarg.2 - IL_0039: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_000d: ldarg.1 + IL_000e: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_0013: brfalse IL_0097 + + .line 16707566,16707566 : 0,0 '' + IL_0018: ldarg.0 + IL_0019: pop + .line 16707566,16707566 : 0,0 '' + IL_001a: ldarg.0 + IL_001b: stloc.1 + IL_001c: ldloc.0 + IL_001d: stloc.2 + IL_001e: ldloc.1 + IL_001f: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0024: stloc.s V_4 + IL_0026: ldloc.2 + IL_0027: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_002c: stloc.s V_5 + IL_002e: ldloc.s V_4 + IL_0030: ldloc.s V_5 + IL_0032: ldarg.2 + IL_0033: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_003e: stloc.3 + IL_0038: stloc.3 + .line 16707566,16707566 : 0,0 '' + IL_0039: ldloc.3 + IL_003a: ldc.i4.0 + IL_003b: bge.s IL_003f + + .line 16707566,16707566 : 0,0 '' + IL_003d: ldloc.3 + IL_003e: ret + .line 16707566,16707566 : 0,0 '' IL_003f: ldloc.3 IL_0040: ldc.i4.0 - IL_0041: bge.s IL_0045 + IL_0041: ble.s IL_0045 .line 16707566,16707566 : 0,0 '' IL_0043: ldloc.3 IL_0044: ret .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.3 - IL_0046: ldc.i4.0 - IL_0047: ble.s IL_004b - - .line 16707566,16707566 : 0,0 '' - IL_0049: ldloc.3 - IL_004a: ret - - .line 16707566,16707566 : 0,0 '' - IL_004b: ldloc.1 - IL_004c: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0051: stloc.s V_6 - IL_0053: ldloc.2 - IL_0054: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0059: stloc.s V_7 - IL_005b: ldloc.s V_6 - IL_005d: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0062: stloc.s V_4 - IL_0064: ldloc.s V_6 - IL_0066: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_006b: stloc.s V_5 - IL_006d: ldloc.s V_7 - IL_006f: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0074: stloc.s V_8 - IL_0076: ldloc.s V_7 - IL_0078: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_007d: stloc.s V_9 - IL_007f: ldloc.s V_4 - IL_0081: ldloc.s V_8 - IL_0083: ldarg.2 - IL_0084: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_0045: ldloc.1 + IL_0046: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_004b: stloc.s V_6 + IL_004d: ldloc.2 + IL_004e: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0053: stloc.s V_7 + IL_0055: ldloc.s V_6 + IL_0057: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_005c: stloc.s V_4 + IL_005e: ldloc.s V_6 + IL_0060: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0065: stloc.s V_5 + IL_0067: ldloc.s V_7 + IL_0069: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_006e: stloc.s V_8 + IL_0070: ldloc.s V_7 + IL_0072: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0077: stloc.s V_9 + IL_0079: ldloc.s V_4 + IL_007b: ldloc.s V_8 + IL_007d: ldarg.2 + IL_007e: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_0089: stloc.s V_10 + IL_0083: stloc.s V_10 .line 16707566,16707566 : 0,0 '' - IL_008b: ldloc.s V_10 - IL_008d: brfalse.s IL_0092 + IL_0085: ldloc.s V_10 + IL_0087: brfalse.s IL_008c .line 16707566,16707566 : 0,0 '' - IL_008f: ldloc.s V_10 - IL_0091: ret + IL_0089: ldloc.s V_10 + IL_008b: ret .line 16707566,16707566 : 0,0 '' - IL_0092: ldloc.s V_5 - IL_0094: ldloc.s V_9 - IL_0096: ldarg.2 - IL_0097: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, + IL_008c: ldloc.s V_5 + IL_008e: ldloc.s V_9 + IL_0090: ldarg.2 + IL_0091: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::CompareTo(object, class [mscorlib]System.Collections.IComparer) - IL_009c: ret + IL_0096: ret .line 16707566,16707566 : 0,0 '' - IL_009d: ldc.i4.1 - IL_009e: ret + IL_0097: ldc.i4.1 + IL_0098: ret .line 16707566,16707566 : 0,0 '' - IL_009f: ldarg.1 - IL_00a0: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_00a5: ldnull - IL_00a6: cgt.un - IL_00a8: brfalse.s IL_00ac + IL_0099: ldarg.1 + IL_009a: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_009f: brfalse.s IL_00a3 .line 16707566,16707566 : 0,0 '' - IL_00aa: ldc.i4.m1 - IL_00ab: ret + IL_00a1: ldc.i4.m1 + IL_00a2: ret .line 16707566,16707566 : 0,0 '' - IL_00ac: ldc.i4.0 - IL_00ad: ret + IL_00a3: ldc.i4.0 + IL_00a4: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 107 (0x6b) + // Code size 104 (0x68) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1090,75 +1058,73 @@ [5] int32 V_5) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0069 + IL_0001: brfalse.s IL_0066 .line 16707566,16707566 : 0,0 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 + IL_0003: ldc.i4.0 + IL_0004: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0008: ldarg.0 - IL_0009: pop + IL_0005: ldarg.0 + IL_0006: pop .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.0 - IL_000b: stloc.1 - IL_000c: ldc.i4.0 - IL_000d: stloc.0 - IL_000e: ldc.i4 0x9e3779b9 - IL_0013: ldloc.1 - IL_0014: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0019: stloc.2 - IL_001a: ldloc.2 - IL_001b: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_0020: stloc.3 - IL_0021: ldloc.2 - IL_0022: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0027: stloc.s V_4 - IL_0029: ldloc.3 - IL_002a: ldarg.1 - IL_002b: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0030: stloc.s V_5 - IL_0032: ldloc.s V_5 - IL_0034: ldc.i4.5 - IL_0035: shl - IL_0036: ldloc.s V_5 - IL_0038: add - IL_0039: ldloc.s V_4 - IL_003b: ldarg.1 - IL_003c: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0041: xor + IL_0007: ldarg.0 + IL_0008: stloc.1 + IL_0009: ldc.i4.0 + IL_000a: stloc.0 + IL_000b: ldc.i4 0x9e3779b9 + IL_0010: ldloc.1 + IL_0011: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0016: stloc.2 + IL_0017: ldloc.2 + IL_0018: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_001d: stloc.3 + IL_001e: ldloc.2 + IL_001f: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0024: stloc.s V_4 + IL_0026: ldloc.3 + IL_0027: ldarg.1 + IL_0028: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_002d: stloc.s V_5 + IL_002f: ldloc.s V_5 + IL_0031: ldc.i4.5 + IL_0032: shl + IL_0033: ldloc.s V_5 + IL_0035: add + IL_0036: ldloc.s V_4 + IL_0038: ldarg.1 + IL_0039: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_003e: xor + IL_003f: ldloc.0 + IL_0040: ldc.i4.6 + IL_0041: shl IL_0042: ldloc.0 - IL_0043: ldc.i4.6 - IL_0044: shl - IL_0045: ldloc.0 - IL_0046: ldc.i4.2 - IL_0047: shr - IL_0048: add - IL_0049: add - IL_004a: add - IL_004b: stloc.0 - IL_004c: ldc.i4 0x9e3779b9 - IL_0051: ldloc.1 - IL_0052: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0057: ldarg.1 - IL_0058: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_0043: ldc.i4.2 + IL_0044: shr + IL_0045: add + IL_0046: add + IL_0047: add + IL_0048: stloc.0 + IL_0049: ldc.i4 0x9e3779b9 + IL_004e: ldloc.1 + IL_004f: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0054: ldarg.1 + IL_0055: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_005a: ldloc.0 + IL_005b: ldc.i4.6 + IL_005c: shl IL_005d: ldloc.0 - IL_005e: ldc.i4.6 - IL_005f: shl - IL_0060: ldloc.0 - IL_0061: ldc.i4.2 - IL_0062: shr - IL_0063: add - IL_0064: add - IL_0065: add - IL_0066: stloc.0 - IL_0067: ldloc.0 - IL_0068: ret - - .line 16707566,16707566 : 0,0 '' - IL_0069: ldc.i4.0 - IL_006a: ret + IL_005e: ldc.i4.2 + IL_005f: shr + IL_0060: add + IL_0061: add + IL_0062: add + IL_0063: stloc.0 + IL_0064: ldloc.0 + IL_0065: ret + + .line 16707566,16707566 : 0,0 '' + IL_0066: ldc.i4.0 + IL_0067: ret } // end of method KeyWithInnerKeys::GetHashCode .method public hidebysig virtual final @@ -1178,7 +1144,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 138 (0x8a) + // Code size 135 (0x87) .maxstack 5 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1191,157 +1157,151 @@ [8] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_8) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_0082 + IL_0001: brfalse IL_007f .line 16707566,16707566 : 0,0 '' - IL_0009: ldarg.1 - IL_000a: isinst Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_000f: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0010: ldloc.0 - IL_0011: brfalse.s IL_0080 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_007d .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0010: ldarg.0 + IL_0011: pop .line 16707566,16707566 : 0,0 '' - IL_0015: ldarg.0 - IL_0016: stloc.1 - IL_0017: ldloc.0 - IL_0018: stloc.2 + IL_0012: ldarg.0 + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0019: ldloc.1 - IL_001a: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001f: stloc.3 - IL_0020: ldloc.2 - IL_0021: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0026: stloc.s V_4 - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: ldarg.2 - IL_002c: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_0016: ldloc.1 + IL_0017: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_001c: stloc.3 + IL_001d: ldloc.2 + IL_001e: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0023: stloc.s V_4 + IL_0025: ldloc.3 + IL_0026: ldloc.s V_4 + IL_0028: ldarg.2 + IL_0029: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_0031: brfalse.s IL_007e - - .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.1 - IL_0034: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0039: stloc.s V_5 - IL_003b: ldloc.2 - IL_003c: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0041: stloc.s V_6 - IL_0043: ldloc.s V_5 - IL_0045: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_004a: stloc.3 - IL_004b: ldloc.s V_5 - IL_004d: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0052: stloc.s V_4 - IL_0054: ldloc.s V_6 - IL_0056: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() - IL_005b: stloc.s V_7 - IL_005d: ldloc.s V_6 - IL_005f: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() - IL_0064: stloc.s V_8 - .line 16707566,16707566 : 0,0 '' - IL_0066: ldloc.3 - IL_0067: ldloc.s V_7 - IL_0069: ldarg.2 - IL_006a: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_002e: brfalse.s IL_007b + + .line 16707566,16707566 : 0,0 '' + IL_0030: ldloc.1 + IL_0031: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0036: stloc.s V_5 + IL_0038: ldloc.2 + IL_0039: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_003e: stloc.s V_6 + IL_0040: ldloc.s V_5 + IL_0042: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0047: stloc.3 + IL_0048: ldloc.s V_5 + IL_004a: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_004f: stloc.s V_4 + IL_0051: ldloc.s V_6 + IL_0053: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() + IL_0058: stloc.s V_7 + IL_005a: ldloc.s V_6 + IL_005c: call instance !1 class [mscorlib]System.Tuple`2::get_Item2() + IL_0061: stloc.s V_8 + .line 16707566,16707566 : 0,0 '' + IL_0063: ldloc.3 + IL_0064: ldloc.s V_7 + IL_0066: ldarg.2 + IL_0067: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_006f: brfalse.s IL_007c + IL_006c: brfalse.s IL_0079 .line 16707566,16707566 : 0,0 '' - IL_0071: ldloc.s V_4 - IL_0073: ldloc.s V_8 - IL_0075: ldarg.2 - IL_0076: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, + IL_006e: ldloc.s V_4 + IL_0070: ldloc.s V_8 + IL_0072: ldarg.2 + IL_0073: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_007b: ret + IL_0078: ret .line 16707566,16707566 : 0,0 '' - IL_007c: ldc.i4.0 - IL_007d: ret + IL_0079: ldc.i4.0 + IL_007a: ret .line 16707566,16707566 : 0,0 '' - IL_007e: ldc.i4.0 - IL_007f: ret + IL_007b: ldc.i4.0 + IL_007c: ret .line 16707566,16707566 : 0,0 '' - IL_0080: ldc.i4.0 - IL_0081: ret + IL_007d: ldc.i4.0 + IL_007e: ret .line 16707566,16707566 : 0,0 '' - IL_0082: ldarg.1 - IL_0083: ldnull - IL_0084: cgt.un - IL_0086: ldc.i4.0 - IL_0087: ceq - IL_0089: ret + IL_007f: ldarg.1 + IL_0080: ldnull + IL_0081: cgt.un + IL_0083: ldc.i4.0 + IL_0084: ceq + IL_0086: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final instance bool Equals(class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 69 (0x45) + // Code size 63 (0x3f) .maxstack 4 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1) .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_003d + IL_0001: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_003b + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.0 - IL_000d: pop + IL_0006: ldarg.0 + IL_0007: pop .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: stloc.0 - IL_0010: ldarg.1 - IL_0011: stloc.1 + IL_0008: ldarg.0 + IL_0009: stloc.0 + IL_000a: ldarg.1 + IL_000b: stloc.1 .line 16707566,16707566 : 0,0 '' - IL_0012: ldloc.0 + IL_000c: ldloc.0 + IL_000d: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 + IL_0012: ldloc.1 IL_0013: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_0018: ldloc.1 - IL_0019: ldfld class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item1 - IL_001e: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(class Hash12/HashMicroPerfAndCodeGenerationTests/Key) - IL_0023: brfalse.s IL_0039 + IL_0018: callvirt instance bool Hash12/HashMicroPerfAndCodeGenerationTests/Key::Equals(class Hash12/HashMicroPerfAndCodeGenerationTests/Key) + IL_001d: brfalse.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0025: ldloc.0 + IL_001f: ldloc.0 + IL_0020: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 + IL_0025: ldloc.1 IL_0026: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_002b: ldloc.1 - IL_002c: ldfld class [mscorlib]System.Tuple`2 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::item2 - IL_0031: tail. - IL_0033: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, + IL_002b: tail. + IL_002d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericEqualityERIntrinsic>(!!0, !!0) - IL_0038: ret + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_0033: ldc.i4.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_0035: ldc.i4.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_003d: ldarg.1 - IL_003e: ldnull - IL_003f: cgt.un - IL_0041: ldc.i4.0 - IL_0042: ceq - IL_0044: ret + IL_0037: ldarg.1 + IL_0038: ldnull + IL_0039: cgt.un + IL_003b: ldc.i4.0 + IL_003c: ceq + IL_003e: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/Inlining/Match01.il.bsl b/tests/fsharpqa/Source/Optimizations/Inlining/Match01.il.bsl index cc844fbd85e..593b363fecc 100644 --- a/tests/fsharpqa/Source/Optimizations/Inlining/Match01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/Inlining/Match01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 5:0:0:0 + .ver 6:0:0:0 } .assembly Match01 { @@ -32,13 +32,13 @@ // Offset: 0x000006F0 Length: 0x000003B7 } .module Match01.dll -// MVID: {60BE1F16-FAFE-C8E4-A745-0383161FBE60} +// MVID: {6220E4FA-FAFE-C8E4-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x09680000 +// Image base: 0x074A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -623,39 +623,33 @@ instance int32 CompareTo(class Match01/Test1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 33 (0x21) + // Code size 24 (0x18) .maxstack 8 IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse.s IL_0017 + IL_0001: brfalse.s IL_0011 - IL_0006: ldarg.1 - IL_0007: ldnull - IL_0008: cgt.un - IL_000a: brfalse.s IL_0015 + IL_0003: ldarg.1 + IL_0004: brfalse.s IL_000f - IL_000c: ldarg.0 - IL_000d: ldarg.1 - IL_000e: ldnull - IL_000f: call int32 Match01::CompareTo$cont@4(class Match01/Test1, + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: ldnull + IL_0009: call int32 Match01::CompareTo$cont@4(class Match01/Test1, class Match01/Test1, class [FSharp.Core]Microsoft.FSharp.Core.Unit) - IL_0014: ret + IL_000e: ret - IL_0015: ldc.i4.1 - IL_0016: ret + IL_000f: ldc.i4.1 + IL_0010: ret - IL_0017: ldarg.1 - IL_0018: ldnull - IL_0019: cgt.un - IL_001b: brfalse.s IL_001f + IL_0011: ldarg.1 + IL_0012: brfalse.s IL_0016 - IL_001d: ldc.i4.m1 - IL_001e: ret + IL_0014: ldc.i4.m1 + IL_0015: ret - IL_001f: ldc.i4.0 - IL_0020: ret + IL_0016: ldc.i4.0 + IL_0017: ret } // end of method Test1::CompareTo .method public hidebysig virtual final @@ -676,52 +670,46 @@ class [mscorlib]System.Collections.IComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 50 (0x32) + // Code size 41 (0x29) .maxstack 5 .locals init (class Match01/Test1 V_0) IL_0000: ldarg.1 IL_0001: unbox.any Match01/Test1 IL_0006: stloc.0 IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0023 - - IL_000d: ldarg.1 - IL_000e: unbox.any Match01/Test1 - IL_0013: ldnull - IL_0014: cgt.un - IL_0016: brfalse.s IL_0021 - - IL_0018: ldarg.0 - IL_0019: ldloc.0 - IL_001a: ldnull - IL_001b: call int32 Match01::'CompareTo$cont@4-1'(class Match01/Test1, + IL_0008: brfalse.s IL_001d + + IL_000a: ldarg.1 + IL_000b: unbox.any Match01/Test1 + IL_0010: brfalse.s IL_001b + + IL_0012: ldarg.0 + IL_0013: ldloc.0 + IL_0014: ldnull + IL_0015: call int32 Match01::'CompareTo$cont@4-1'(class Match01/Test1, class Match01/Test1, class [FSharp.Core]Microsoft.FSharp.Core.Unit) - IL_0020: ret + IL_001a: ret - IL_0021: ldc.i4.1 - IL_0022: ret + IL_001b: ldc.i4.1 + IL_001c: ret - IL_0023: ldarg.1 - IL_0024: unbox.any Match01/Test1 - IL_0029: ldnull - IL_002a: cgt.un - IL_002c: brfalse.s IL_0030 + IL_001d: ldarg.1 + IL_001e: unbox.any Match01/Test1 + IL_0023: brfalse.s IL_0027 - IL_002e: ldc.i4.m1 - IL_002f: ret + IL_0025: ldc.i4.m1 + IL_0026: ret - IL_0030: ldc.i4.0 - IL_0031: ret + IL_0027: ldc.i4.0 + IL_0028: ret } // end of method Test1::CompareTo .method public hidebysig virtual final instance int32 GetHashCode(class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 170 (0xaa) + // Code size 167 (0xa7) .maxstack 7 .locals init (int32 V_0, class Match01/Test1/X11 V_1, @@ -729,105 +717,103 @@ class Match01/Test1/X13 V_3, class Match01/Test1/X14 V_4) IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_00a8 - - IL_0009: ldc.i4.0 - IL_000a: stloc.0 - IL_000b: ldarg.0 - IL_000c: call instance int32 Match01/Test1::get_Tag() - IL_0011: switch ( - IL_0026, - IL_0046, - IL_0066, - IL_0086) - IL_0026: ldarg.0 - IL_0027: castclass Match01/Test1/X11 - IL_002c: stloc.1 - IL_002d: ldc.i4.0 - IL_002e: stloc.0 - IL_002f: ldc.i4 0x9e3779b9 - IL_0034: ldloc.1 - IL_0035: ldfld int32 Match01/Test1/X11::item + IL_0001: brfalse IL_00a5 + + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + IL_0008: ldarg.0 + IL_0009: call instance int32 Match01/Test1::get_Tag() + IL_000e: switch ( + IL_0023, + IL_0043, + IL_0063, + IL_0083) + IL_0023: ldarg.0 + IL_0024: castclass Match01/Test1/X11 + IL_0029: stloc.1 + IL_002a: ldc.i4.0 + IL_002b: stloc.0 + IL_002c: ldc.i4 0x9e3779b9 + IL_0031: ldloc.1 + IL_0032: ldfld int32 Match01/Test1/X11::item + IL_0037: ldloc.0 + IL_0038: ldc.i4.6 + IL_0039: shl IL_003a: ldloc.0 - IL_003b: ldc.i4.6 - IL_003c: shl - IL_003d: ldloc.0 - IL_003e: ldc.i4.2 - IL_003f: shr - IL_0040: add - IL_0041: add - IL_0042: add - IL_0043: stloc.0 - IL_0044: ldloc.0 - IL_0045: ret - - IL_0046: ldarg.0 - IL_0047: castclass Match01/Test1/X12 - IL_004c: stloc.2 - IL_004d: ldc.i4.1 - IL_004e: stloc.0 - IL_004f: ldc.i4 0x9e3779b9 - IL_0054: ldloc.2 - IL_0055: ldfld int32 Match01/Test1/X12::item + IL_003b: ldc.i4.2 + IL_003c: shr + IL_003d: add + IL_003e: add + IL_003f: add + IL_0040: stloc.0 + IL_0041: ldloc.0 + IL_0042: ret + + IL_0043: ldarg.0 + IL_0044: castclass Match01/Test1/X12 + IL_0049: stloc.2 + IL_004a: ldc.i4.1 + IL_004b: stloc.0 + IL_004c: ldc.i4 0x9e3779b9 + IL_0051: ldloc.2 + IL_0052: ldfld int32 Match01/Test1/X12::item + IL_0057: ldloc.0 + IL_0058: ldc.i4.6 + IL_0059: shl IL_005a: ldloc.0 - IL_005b: ldc.i4.6 - IL_005c: shl - IL_005d: ldloc.0 - IL_005e: ldc.i4.2 - IL_005f: shr - IL_0060: add - IL_0061: add - IL_0062: add - IL_0063: stloc.0 - IL_0064: ldloc.0 - IL_0065: ret - - IL_0066: ldarg.0 - IL_0067: castclass Match01/Test1/X13 - IL_006c: stloc.3 - IL_006d: ldc.i4.2 - IL_006e: stloc.0 - IL_006f: ldc.i4 0x9e3779b9 - IL_0074: ldloc.3 - IL_0075: ldfld int32 Match01/Test1/X13::item + IL_005b: ldc.i4.2 + IL_005c: shr + IL_005d: add + IL_005e: add + IL_005f: add + IL_0060: stloc.0 + IL_0061: ldloc.0 + IL_0062: ret + + IL_0063: ldarg.0 + IL_0064: castclass Match01/Test1/X13 + IL_0069: stloc.3 + IL_006a: ldc.i4.2 + IL_006b: stloc.0 + IL_006c: ldc.i4 0x9e3779b9 + IL_0071: ldloc.3 + IL_0072: ldfld int32 Match01/Test1/X13::item + IL_0077: ldloc.0 + IL_0078: ldc.i4.6 + IL_0079: shl IL_007a: ldloc.0 - IL_007b: ldc.i4.6 - IL_007c: shl - IL_007d: ldloc.0 - IL_007e: ldc.i4.2 - IL_007f: shr - IL_0080: add - IL_0081: add - IL_0082: add - IL_0083: stloc.0 - IL_0084: ldloc.0 - IL_0085: ret - - IL_0086: ldarg.0 - IL_0087: castclass Match01/Test1/X14 - IL_008c: stloc.s V_4 - IL_008e: ldc.i4.3 - IL_008f: stloc.0 - IL_0090: ldc.i4 0x9e3779b9 - IL_0095: ldloc.s V_4 - IL_0097: ldfld int32 Match01/Test1/X14::item + IL_007b: ldc.i4.2 + IL_007c: shr + IL_007d: add + IL_007e: add + IL_007f: add + IL_0080: stloc.0 + IL_0081: ldloc.0 + IL_0082: ret + + IL_0083: ldarg.0 + IL_0084: castclass Match01/Test1/X14 + IL_0089: stloc.s V_4 + IL_008b: ldc.i4.3 + IL_008c: stloc.0 + IL_008d: ldc.i4 0x9e3779b9 + IL_0092: ldloc.s V_4 + IL_0094: ldfld int32 Match01/Test1/X14::item + IL_0099: ldloc.0 + IL_009a: ldc.i4.6 + IL_009b: shl IL_009c: ldloc.0 - IL_009d: ldc.i4.6 - IL_009e: shl - IL_009f: ldloc.0 - IL_00a0: ldc.i4.2 - IL_00a1: shr - IL_00a2: add - IL_00a3: add - IL_00a4: add - IL_00a5: stloc.0 - IL_00a6: ldloc.0 - IL_00a7: ret - - IL_00a8: ldc.i4.0 - IL_00a9: ret + IL_009d: ldc.i4.2 + IL_009e: shr + IL_009f: add + IL_00a0: add + IL_00a1: add + IL_00a2: stloc.0 + IL_00a3: ldloc.0 + IL_00a4: ret + + IL_00a5: ldc.i4.0 + IL_00a6: ret } // end of method Test1::GetHashCode .method public hidebysig virtual final @@ -847,7 +833,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 212 (0xd4) + // Code size 209 (0xd1) .maxstack 4 .locals init (class Match01/Test1 V_0, int32 V_1, @@ -861,104 +847,102 @@ class Match01/Test1/X14 V_9, class Match01/Test1/X14 V_10) IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_00cc - - IL_0009: ldarg.1 - IL_000a: isinst Match01/Test1 - IL_000f: stloc.0 - IL_0010: ldloc.0 - IL_0011: brfalse IL_00ca - - IL_0016: ldarg.0 - IL_0017: ldfld int32 Match01/Test1::_tag - IL_001c: stloc.1 - IL_001d: ldloc.0 - IL_001e: ldfld int32 Match01/Test1::_tag - IL_0023: stloc.2 - IL_0024: ldloc.1 - IL_0025: ldloc.2 - IL_0026: bne.un IL_00c8 - - IL_002b: ldarg.0 - IL_002c: call instance int32 Match01/Test1::get_Tag() - IL_0031: switch ( - IL_0046, - IL_0065, - IL_0086, - IL_00a7) - IL_0046: ldarg.0 - IL_0047: castclass Match01/Test1/X11 - IL_004c: stloc.3 - IL_004d: ldloc.0 - IL_004e: castclass Match01/Test1/X11 - IL_0053: stloc.s V_4 - IL_0055: ldloc.3 - IL_0056: ldfld int32 Match01/Test1/X11::item - IL_005b: ldloc.s V_4 - IL_005d: ldfld int32 Match01/Test1/X11::item - IL_0062: ceq - IL_0064: ret - - IL_0065: ldarg.0 - IL_0066: castclass Match01/Test1/X12 - IL_006b: stloc.s V_5 - IL_006d: ldloc.0 - IL_006e: castclass Match01/Test1/X12 - IL_0073: stloc.s V_6 - IL_0075: ldloc.s V_5 - IL_0077: ldfld int32 Match01/Test1/X12::item - IL_007c: ldloc.s V_6 - IL_007e: ldfld int32 Match01/Test1/X12::item - IL_0083: ceq - IL_0085: ret - - IL_0086: ldarg.0 - IL_0087: castclass Match01/Test1/X13 - IL_008c: stloc.s V_7 - IL_008e: ldloc.0 - IL_008f: castclass Match01/Test1/X13 - IL_0094: stloc.s V_8 - IL_0096: ldloc.s V_7 - IL_0098: ldfld int32 Match01/Test1/X13::item - IL_009d: ldloc.s V_8 - IL_009f: ldfld int32 Match01/Test1/X13::item - IL_00a4: ceq - IL_00a6: ret + IL_0001: brfalse IL_00c9 - IL_00a7: ldarg.0 - IL_00a8: castclass Match01/Test1/X14 - IL_00ad: stloc.s V_9 - IL_00af: ldloc.0 - IL_00b0: castclass Match01/Test1/X14 - IL_00b5: stloc.s V_10 - IL_00b7: ldloc.s V_9 - IL_00b9: ldfld int32 Match01/Test1/X14::item - IL_00be: ldloc.s V_10 - IL_00c0: ldfld int32 Match01/Test1/X14::item - IL_00c5: ceq - IL_00c7: ret - - IL_00c8: ldc.i4.0 - IL_00c9: ret - - IL_00ca: ldc.i4.0 - IL_00cb: ret - - IL_00cc: ldarg.1 - IL_00cd: ldnull - IL_00ce: cgt.un - IL_00d0: ldc.i4.0 - IL_00d1: ceq - IL_00d3: ret + IL_0006: ldarg.1 + IL_0007: isinst Match01/Test1 + IL_000c: stloc.0 + IL_000d: ldloc.0 + IL_000e: brfalse IL_00c7 + + IL_0013: ldarg.0 + IL_0014: ldfld int32 Match01/Test1::_tag + IL_0019: stloc.1 + IL_001a: ldloc.0 + IL_001b: ldfld int32 Match01/Test1::_tag + IL_0020: stloc.2 + IL_0021: ldloc.1 + IL_0022: ldloc.2 + IL_0023: bne.un IL_00c5 + + IL_0028: ldarg.0 + IL_0029: call instance int32 Match01/Test1::get_Tag() + IL_002e: switch ( + IL_0043, + IL_0062, + IL_0083, + IL_00a4) + IL_0043: ldarg.0 + IL_0044: castclass Match01/Test1/X11 + IL_0049: stloc.3 + IL_004a: ldloc.0 + IL_004b: castclass Match01/Test1/X11 + IL_0050: stloc.s V_4 + IL_0052: ldloc.3 + IL_0053: ldfld int32 Match01/Test1/X11::item + IL_0058: ldloc.s V_4 + IL_005a: ldfld int32 Match01/Test1/X11::item + IL_005f: ceq + IL_0061: ret + + IL_0062: ldarg.0 + IL_0063: castclass Match01/Test1/X12 + IL_0068: stloc.s V_5 + IL_006a: ldloc.0 + IL_006b: castclass Match01/Test1/X12 + IL_0070: stloc.s V_6 + IL_0072: ldloc.s V_5 + IL_0074: ldfld int32 Match01/Test1/X12::item + IL_0079: ldloc.s V_6 + IL_007b: ldfld int32 Match01/Test1/X12::item + IL_0080: ceq + IL_0082: ret + + IL_0083: ldarg.0 + IL_0084: castclass Match01/Test1/X13 + IL_0089: stloc.s V_7 + IL_008b: ldloc.0 + IL_008c: castclass Match01/Test1/X13 + IL_0091: stloc.s V_8 + IL_0093: ldloc.s V_7 + IL_0095: ldfld int32 Match01/Test1/X13::item + IL_009a: ldloc.s V_8 + IL_009c: ldfld int32 Match01/Test1/X13::item + IL_00a1: ceq + IL_00a3: ret + + IL_00a4: ldarg.0 + IL_00a5: castclass Match01/Test1/X14 + IL_00aa: stloc.s V_9 + IL_00ac: ldloc.0 + IL_00ad: castclass Match01/Test1/X14 + IL_00b2: stloc.s V_10 + IL_00b4: ldloc.s V_9 + IL_00b6: ldfld int32 Match01/Test1/X14::item + IL_00bb: ldloc.s V_10 + IL_00bd: ldfld int32 Match01/Test1/X14::item + IL_00c2: ceq + IL_00c4: ret + + IL_00c5: ldc.i4.0 + IL_00c6: ret + + IL_00c7: ldc.i4.0 + IL_00c8: ret + + IL_00c9: ldarg.1 + IL_00ca: ldnull + IL_00cb: cgt.un + IL_00cd: ldc.i4.0 + IL_00ce: ceq + IL_00d0: ret } // end of method Test1::Equals .method public hidebysig virtual final instance bool Equals(class Match01/Test1 obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 206 (0xce) + // Code size 200 (0xc8) .maxstack 4 .locals init (int32 V_0, int32 V_1, @@ -971,96 +955,92 @@ class Match01/Test1/X14 V_8, class Match01/Test1/X14 V_9) IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: cgt.un - IL_0004: brfalse IL_00c6 + IL_0001: brfalse IL_00c0 - IL_0009: ldarg.1 - IL_000a: ldnull - IL_000b: cgt.un - IL_000d: brfalse IL_00c4 + IL_0006: ldarg.1 + IL_0007: brfalse IL_00be - IL_0012: ldarg.0 - IL_0013: ldfld int32 Match01/Test1::_tag - IL_0018: stloc.0 - IL_0019: ldarg.1 - IL_001a: ldfld int32 Match01/Test1::_tag - IL_001f: stloc.1 - IL_0020: ldloc.0 - IL_0021: ldloc.1 - IL_0022: bne.un IL_00c2 - - IL_0027: ldarg.0 - IL_0028: call instance int32 Match01/Test1::get_Tag() - IL_002d: switch ( - IL_0042, - IL_005f, - IL_0080, - IL_00a1) - IL_0042: ldarg.0 - IL_0043: castclass Match01/Test1/X11 - IL_0048: stloc.2 - IL_0049: ldarg.1 - IL_004a: castclass Match01/Test1/X11 - IL_004f: stloc.3 - IL_0050: ldloc.2 + IL_000c: ldarg.0 + IL_000d: ldfld int32 Match01/Test1::_tag + IL_0012: stloc.0 + IL_0013: ldarg.1 + IL_0014: ldfld int32 Match01/Test1::_tag + IL_0019: stloc.1 + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: bne.un IL_00bc + + IL_0021: ldarg.0 + IL_0022: call instance int32 Match01/Test1::get_Tag() + IL_0027: switch ( + IL_003c, + IL_0059, + IL_007a, + IL_009b) + IL_003c: ldarg.0 + IL_003d: castclass Match01/Test1/X11 + IL_0042: stloc.2 + IL_0043: ldarg.1 + IL_0044: castclass Match01/Test1/X11 + IL_0049: stloc.3 + IL_004a: ldloc.2 + IL_004b: ldfld int32 Match01/Test1/X11::item + IL_0050: ldloc.3 IL_0051: ldfld int32 Match01/Test1/X11::item - IL_0056: ldloc.3 - IL_0057: ldfld int32 Match01/Test1/X11::item - IL_005c: ceq - IL_005e: ret - - IL_005f: ldarg.0 - IL_0060: castclass Match01/Test1/X12 - IL_0065: stloc.s V_4 - IL_0067: ldarg.1 - IL_0068: castclass Match01/Test1/X12 - IL_006d: stloc.s V_5 - IL_006f: ldloc.s V_4 - IL_0071: ldfld int32 Match01/Test1/X12::item - IL_0076: ldloc.s V_5 - IL_0078: ldfld int32 Match01/Test1/X12::item - IL_007d: ceq - IL_007f: ret - - IL_0080: ldarg.0 - IL_0081: castclass Match01/Test1/X13 - IL_0086: stloc.s V_6 - IL_0088: ldarg.1 - IL_0089: castclass Match01/Test1/X13 - IL_008e: stloc.s V_7 - IL_0090: ldloc.s V_6 - IL_0092: ldfld int32 Match01/Test1/X13::item - IL_0097: ldloc.s V_7 - IL_0099: ldfld int32 Match01/Test1/X13::item - IL_009e: ceq - IL_00a0: ret - - IL_00a1: ldarg.0 - IL_00a2: castclass Match01/Test1/X14 - IL_00a7: stloc.s V_8 - IL_00a9: ldarg.1 - IL_00aa: castclass Match01/Test1/X14 - IL_00af: stloc.s V_9 - IL_00b1: ldloc.s V_8 - IL_00b3: ldfld int32 Match01/Test1/X14::item - IL_00b8: ldloc.s V_9 - IL_00ba: ldfld int32 Match01/Test1/X14::item - IL_00bf: ceq - IL_00c1: ret - - IL_00c2: ldc.i4.0 - IL_00c3: ret - + IL_0056: ceq + IL_0058: ret + + IL_0059: ldarg.0 + IL_005a: castclass Match01/Test1/X12 + IL_005f: stloc.s V_4 + IL_0061: ldarg.1 + IL_0062: castclass Match01/Test1/X12 + IL_0067: stloc.s V_5 + IL_0069: ldloc.s V_4 + IL_006b: ldfld int32 Match01/Test1/X12::item + IL_0070: ldloc.s V_5 + IL_0072: ldfld int32 Match01/Test1/X12::item + IL_0077: ceq + IL_0079: ret + + IL_007a: ldarg.0 + IL_007b: castclass Match01/Test1/X13 + IL_0080: stloc.s V_6 + IL_0082: ldarg.1 + IL_0083: castclass Match01/Test1/X13 + IL_0088: stloc.s V_7 + IL_008a: ldloc.s V_6 + IL_008c: ldfld int32 Match01/Test1/X13::item + IL_0091: ldloc.s V_7 + IL_0093: ldfld int32 Match01/Test1/X13::item + IL_0098: ceq + IL_009a: ret + + IL_009b: ldarg.0 + IL_009c: castclass Match01/Test1/X14 + IL_00a1: stloc.s V_8 + IL_00a3: ldarg.1 + IL_00a4: castclass Match01/Test1/X14 + IL_00a9: stloc.s V_9 + IL_00ab: ldloc.s V_8 + IL_00ad: ldfld int32 Match01/Test1/X14::item + IL_00b2: ldloc.s V_9 + IL_00b4: ldfld int32 Match01/Test1/X14::item + IL_00b9: ceq + IL_00bb: ret + + IL_00bc: ldc.i4.0 + IL_00bd: ret + + IL_00be: ldc.i4.0 + IL_00bf: ret + + IL_00c0: ldarg.1 + IL_00c1: ldnull + IL_00c2: cgt.un IL_00c4: ldc.i4.0 - IL_00c5: ret - - IL_00c6: ldarg.1 - IL_00c7: ldnull - IL_00c8: cgt.un - IL_00ca: ldc.i4.0 - IL_00cb: ceq - IL_00cd: ret + IL_00c5: ceq + IL_00c7: ret } // end of method Test1::Equals .method public hidebysig virtual final diff --git a/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl b/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl index ba67592d72c..462de29a875 100644 --- a/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/Inlining/StructUnion01.il.bsl @@ -32,13 +32,13 @@ // Offset: 0x00000880 Length: 0x00000421 } .module StructUnion01.dll -// MVID: {6220D390-D3E9-6B24-A745-038390D32062} +// MVID: {6220E4FA-D3E9-6B24-A745-0383FAE42062} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06D10000 +// Image base: 0x072B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -374,38 +374,36 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 55 (0x37) + // Code size 52 (0x34) .maxstack 4 .locals init (valuetype StructUnion01/U V_0) IL_0000: ldarg.1 IL_0001: isinst StructUnion01/U - IL_0006: ldnull - IL_0007: cgt.un - IL_0009: brfalse.s IL_0035 - - IL_000b: ldarg.1 - IL_000c: unbox.any StructUnion01/U - IL_0011: stloc.0 - IL_0012: ldarg.0 - IL_0013: pop - IL_0014: ldarg.0 - IL_0015: ldfld int32 StructUnion01/U::item1 - IL_001a: ldloca.s V_0 - IL_001c: ldfld int32 StructUnion01/U::item1 - IL_0021: bne.un.s IL_0033 - - IL_0023: ldarg.0 - IL_0024: ldfld int32 StructUnion01/U::item2 - IL_0029: ldloca.s V_0 - IL_002b: ldfld int32 StructUnion01/U::item2 - IL_0030: ceq - IL_0032: ret - - IL_0033: ldc.i4.0 - IL_0034: ret - - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0006: brfalse.s IL_0032 + + IL_0008: ldarg.1 + IL_0009: unbox.any StructUnion01/U + IL_000e: stloc.0 + IL_000f: ldarg.0 + IL_0010: pop + IL_0011: ldarg.0 + IL_0012: ldfld int32 StructUnion01/U::item1 + IL_0017: ldloca.s V_0 + IL_0019: ldfld int32 StructUnion01/U::item1 + IL_001e: bne.un.s IL_0030 + + IL_0020: ldarg.0 + IL_0021: ldfld int32 StructUnion01/U::item2 + IL_0026: ldloca.s V_0 + IL_0028: ldfld int32 StructUnion01/U::item2 + IL_002d: ceq + IL_002f: ret + + IL_0030: ldc.i4.0 + IL_0031: ret + + IL_0032: ldc.i4.0 + IL_0033: ret } // end of method U::Equals .method public hidebysig virtual final @@ -437,22 +435,20 @@ instance bool Equals(object obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 26 (0x1a) + // Code size 23 (0x17) .maxstack 8 IL_0000: ldarg.1 IL_0001: isinst StructUnion01/U - IL_0006: ldnull - IL_0007: cgt.un - IL_0009: brfalse.s IL_0018 + IL_0006: brfalse.s IL_0015 - IL_000b: ldarg.0 - IL_000c: ldarg.1 - IL_000d: unbox.any StructUnion01/U - IL_0012: call instance bool StructUnion01/U::Equals(valuetype StructUnion01/U) - IL_0017: ret + IL_0008: ldarg.0 + IL_0009: ldarg.1 + IL_000a: unbox.any StructUnion01/U + IL_000f: call instance bool StructUnion01/U::Equals(valuetype StructUnion01/U) + IL_0014: ret - IL_0018: ldc.i4.0 - IL_0019: ret + IL_0015: ldc.i4.0 + IL_0016: ret } // end of method U::Equals .property instance int32 Tag() From 0066e067df1cde21f31a1d151d4483b2413135b5 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 3 Mar 2022 17:46:30 +0000 Subject: [PATCH 12/13] missing file --- .../EmittedIL/TypeTestsInPatternMatching.fs | 317 ++++++++++++++++++ 1 file changed, 317 insertions(+) create mode 100644 tests/FSharp.Compiler.ComponentTests/EmittedIL/TypeTestsInPatternMatching.fs diff --git a/tests/FSharp.Compiler.ComponentTests/EmittedIL/TypeTestsInPatternMatching.fs b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TypeTestsInPatternMatching.fs new file mode 100644 index 00000000000..d28bc0f6b2b --- /dev/null +++ b/tests/FSharp.Compiler.ComponentTests/EmittedIL/TypeTestsInPatternMatching.fs @@ -0,0 +1,317 @@ +// Copyright (c) Microsoft Corporation. All Rights Reserved. See License.txt in the project root for license information. + +namespace FSharp.Compiler.ComponentTests.EmittedIL + +open Xunit +open FSharp.Test.Compiler + +module TypeTestsInPatternMatching = + + [] + let ``Test codegen for one column of sealed types``() = + FSharp """ +module Test +let TestOneColumnOfTypeTestsWithSealedTypes(x: obj) = + match x with + | :? string -> 1 + | :? int -> 2 + | :? bool -> 3 + | :? float -> 4 + | :? char -> 5 + | _ -> 6 + """ + |> compile + |> shouldSucceed + |> verifyIL [ + """ + .method public static int32 TestOneColumnOfTypeTestsWithSealedTypes(object x) cil managed + { + + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: isinst [runtime]System.String + IL_0006: brtrue.s IL_002a + + IL_0008: ldarg.0 + IL_0009: isinst [runtime]System.Int32 + IL_000e: brtrue.s IL_002c + + IL_0010: ldarg.0 + IL_0011: isinst [runtime]System.Boolean + IL_0016: brtrue.s IL_002e + + IL_0018: ldarg.0 + IL_0019: isinst [runtime]System.Double + IL_001e: brtrue.s IL_0030 + + IL_0020: ldarg.0 + IL_0021: isinst [runtime]System.Char + IL_0026: brfalse.s IL_0034 + + IL_0028: br.s IL_0032 + + IL_002a: ldc.i4.1 + IL_002b: ret + + IL_002c: ldc.i4.2 + IL_002d: ret + + IL_002e: ldc.i4.3 + IL_002f: ret + + IL_0030: ldc.i4.4 + IL_0031: ret + + IL_0032: ldc.i4.5 + IL_0033: ret + + IL_0034: ldc.i4.6 + IL_0035: ret + } +""" + ] + + + + [] + let ``Test codegen for two columns of sealed types``() = + FSharp """ +module Test +let TestTwoColumnsOfTypeTestsWithSealedTypes(x: obj, y: obj) = + match x, y with + | :? string, :? string -> 1 + | :? int, :? int -> 2 + | :? bool, :? bool -> 3 + | :? float, :? float -> 4 + | :? char, :? char -> 5 + | _ -> 6 + """ + |> compile + |> shouldSucceed + |> verifyIL [ + """ + .method public static int32 TestTwoColumnsOfTypeTestsWithSealedTypes(object x, + object y) cil managed + { + + .maxstack 3 + .locals init (string V_0) + IL_0000: ldarg.0 + IL_0001: isinst [runtime]System.String + IL_0006: brfalse.s IL_0014 + + IL_0008: ldarg.1 + IL_0009: isinst [runtime]System.String + IL_000e: stloc.0 + IL_000f: ldloc.0 + IL_0010: brfalse.s IL_005c + + IL_0012: ldc.i4.1 + IL_0013: ret + + IL_0014: ldarg.0 + IL_0015: isinst [runtime]System.Int32 + IL_001a: brfalse.s IL_0026 + + IL_001c: ldarg.1 + IL_001d: isinst [runtime]System.Int32 + IL_0022: brfalse.s IL_005c + + IL_0024: ldc.i4.2 + IL_0025: ret + + IL_0026: ldarg.0 + IL_0027: isinst [runtime]System.Boolean + IL_002c: brfalse.s IL_0038 + + IL_002e: ldarg.1 + IL_002f: isinst [runtime]System.Boolean + IL_0034: brfalse.s IL_005c + + IL_0036: ldc.i4.3 + IL_0037: ret + + IL_0038: ldarg.0 + IL_0039: isinst [runtime]System.Double + IL_003e: brfalse.s IL_004a + + IL_0040: ldarg.1 + IL_0041: isinst [runtime]System.Double + IL_0046: brfalse.s IL_005c + + IL_0048: ldc.i4.4 + IL_0049: ret + + IL_004a: ldarg.0 + IL_004b: isinst [runtime]System.Char + IL_0050: brfalse.s IL_005c + + IL_0052: ldarg.1 + IL_0053: isinst [runtime]System.Char + IL_0058: brfalse.s IL_005c + + IL_005a: ldc.i4.5 + IL_005b: ret + + IL_005c: ldc.i4.6 + IL_005d: ret + } +""" + + ] + + + + + [] + let ``Test codegen for two columns of sealed types with bind``() = + FSharp """ +module Test +let TestTwoColumnsOfTypeTestsWithSealedTypes(x: obj, y: obj) = + match x, y with + | :? string as s1, (:? string as s2) -> s1.Length + s2.Length + | :? int as i1, (:? int as i2) -> i1 + i2 + | :? bool as b1, (:? bool as b2) -> (if b1 then 1 else 0) + (if b2 then 1 else 0) + | :? float as f1, (:? float as f2) -> int f2 + int f2 + | :? char as c1, (:? char as c2) -> int c1 + int c2 + | _ -> 6 + """ + |> compile + |> shouldSucceed + |> verifyIL [ + """ + .method public static int32 TestTwoColumnsOfTypeTestsWithSealedTypes(object x, + object y) cil managed + { + + .maxstack 4 + .locals init (string V_0, + string V_1, + string V_2, + int32 V_3, + int32 V_4, + bool V_5, + bool V_6, + float64 V_7, + float64 V_8, + char V_9, + char V_10) + IL_0000: ldarg.0 + IL_0001: isinst [runtime]System.String + IL_0006: brfalse.s IL_002c + + IL_0008: ldarg.1 + IL_0009: isinst [runtime]System.String + IL_000e: stloc.0 + IL_000f: ldloc.0 + IL_0010: brfalse IL_00d8 + + IL_0015: ldloc.0 + IL_0016: stloc.1 + IL_0017: ldarg.0 + IL_0018: unbox.any [runtime]System.String + IL_001d: stloc.2 + IL_001e: ldloc.2 + IL_001f: callvirt instance int32 [runtime]System.String::get_Length() + IL_0024: ldloc.1 + IL_0025: callvirt instance int32 [runtime]System.String::get_Length() + IL_002a: add + IL_002b: ret + + IL_002c: ldarg.0 + IL_002d: isinst [runtime]System.Int32 + IL_0032: brfalse.s IL_0053 + + IL_0034: ldarg.1 + IL_0035: isinst [runtime]System.Int32 + IL_003a: brfalse IL_00d8 + + IL_003f: ldarg.1 + IL_0040: unbox.any [runtime]System.Int32 + IL_0045: stloc.3 + IL_0046: ldarg.0 + IL_0047: unbox.any [runtime]System.Int32 + IL_004c: stloc.s V_4 + IL_004e: ldloc.s V_4 + IL_0050: ldloc.3 + IL_0051: add + IL_0052: ret + + IL_0053: ldarg.0 + IL_0054: isinst [runtime]System.Boolean + IL_0059: brfalse.s IL_0088 + + IL_005b: ldarg.1 + IL_005c: isinst [runtime]System.Boolean + IL_0061: brfalse IL_00d8 + + IL_0066: ldarg.1 + IL_0067: unbox.any [runtime]System.Boolean + IL_006c: stloc.s V_5 + IL_006e: ldarg.0 + IL_006f: unbox.any [runtime]System.Boolean + IL_0074: stloc.s V_6 + IL_0076: ldloc.s V_6 + IL_0078: brfalse.s IL_007d + + IL_007a: ldc.i4.1 + IL_007b: br.s IL_007e + + IL_007d: ldc.i4.0 + IL_007e: ldloc.s V_5 + IL_0080: brfalse.s IL_0085 + + IL_0082: ldc.i4.1 + IL_0083: br.s IL_0086 + + IL_0085: ldc.i4.0 + IL_0086: add + IL_0087: ret + + IL_0088: ldarg.0 + IL_0089: isinst [runtime]System.Double + IL_008e: brfalse.s IL_00b0 + + IL_0090: ldarg.1 + IL_0091: isinst [runtime]System.Double + IL_0096: brfalse.s IL_00d8 + + IL_0098: ldarg.1 + IL_0099: unbox.any [runtime]System.Double + IL_009e: stloc.s V_7 + IL_00a0: ldarg.0 + IL_00a1: unbox.any [runtime]System.Double + IL_00a6: stloc.s V_8 + IL_00a8: ldloc.s V_7 + IL_00aa: conv.i4 + IL_00ab: ldloc.s V_7 + IL_00ad: conv.i4 + IL_00ae: add + IL_00af: ret + + IL_00b0: ldarg.0 + IL_00b1: isinst [runtime]System.Char + IL_00b6: brfalse.s IL_00d8 + + IL_00b8: ldarg.1 + IL_00b9: isinst [runtime]System.Char + IL_00be: brfalse.s IL_00d8 + + IL_00c0: ldarg.1 + IL_00c1: unbox.any [runtime]System.Char + IL_00c6: stloc.s V_9 + IL_00c8: ldarg.0 + IL_00c9: unbox.any [runtime]System.Char + IL_00ce: stloc.s V_10 + IL_00d0: ldloc.s V_10 + IL_00d2: conv.i4 + IL_00d3: ldloc.s V_9 + IL_00d5: conv.i4 + IL_00d6: add + IL_00d7: ret + + IL_00d8: ldc.i4.6 + IL_00d9: ret + } +""" + ] \ No newline at end of file From 36d0f18517d85425713e2a5be923e0189e44d5da Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 3 Mar 2022 21:19:55 +0000 Subject: [PATCH 13/13] update baselines --- src/fsharp/PatternMatchCompilation.fs | 10 +- .../CodeGen/EmittedIL/BooleanLogic.fs | 112 +++++++++--------- .../ExpressionQuotations/Baselines/TryWith.fs | 24 +--- 3 files changed, 70 insertions(+), 76 deletions(-) diff --git a/src/fsharp/PatternMatchCompilation.fs b/src/fsharp/PatternMatchCompilation.fs index d43cdb235dc..d75d150393e 100644 --- a/src/fsharp/PatternMatchCompilation.fs +++ b/src/fsharp/PatternMatchCompilation.fs @@ -1480,8 +1480,9 @@ let CompilePatternBasic | TPat_exnconstr (ecref, argpats, _) -> + let srcTy1 = g.exn_ty let tgtTy1 = mkAppTy ecref [] - if taken |> List.exists (discrimsEq g (DecisionTreeTest.IsInst (g.exn_ty, tgtTy1))) then [] else + if taken |> List.exists (discrimsEq g (DecisionTreeTest.IsInst (srcTy1, tgtTy1))) then [] else match discrim with | DecisionTreeTest.IsInst (_srcTy, tgtTy2) -> @@ -1492,6 +1493,13 @@ let CompilePatternBasic // Successful tests against F# exception definitions refute all other non-equivalent type tests // F# exception definitions are sealed. [] + + | DecisionTreeTest.IsNull _ -> + match computeWhatSuccessfulTypeTestImpliesAboutNullTest g tgtTy1 with + | Implication.Succeeds -> [Frontier (i, newActives, valMap)] + | Implication.Fails -> [] + | Implication.Nothing -> [frontier] + | _ -> [frontier] diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs index 2a981b237f5..249bead6d8d 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/BooleanLogic.fs @@ -79,64 +79,62 @@ let ApplyDefaults () = """ (fun verifier -> verifier.VerifyIL [ """ -.method public static void ApplyDefaults() cil managed -{ - - .maxstack 5 - .locals init (int32 V_0, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_2, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_3, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_4, - class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_5, - bool V_6) - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: br.s IL_004b - - IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 DontEliminateForLoops::get_unsolved() - IL_0009: stloc.1 - IL_000a: ldsfld class DontEliminateForLoops/ApplyDefaults@8 DontEliminateForLoops/ApplyDefaults@8::@_instance - IL_000f: stloc.2 - IL_0010: ldloc.1 - IL_0011: stloc.3 - IL_0012: ldloc.3 - IL_0013: stloc.s V_4 - IL_0015: ldloc.s V_4 - IL_0017: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_001c: stloc.s V_5 - IL_001e: ldloc.s V_5 - IL_0020: ldnull - IL_0021: cgt.un - IL_0023: brfalse.s IL_0047 - - IL_0025: ldloc.s V_4 - IL_0027: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() - IL_002c: stloc.s V_6 - IL_002e: ldloc.2 - IL_002f: ldloc.s V_6 - IL_0031: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0036: pop - IL_0037: ldloc.s V_5 - IL_0039: stloc.s V_4 - IL_003b: ldloc.s V_4 - IL_003d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() - IL_0042: stloc.s V_5 - IL_0044: nop - IL_0045: br.s IL_001e - - IL_0047: ldloc.0 - IL_0048: ldc.i4.1 - IL_0049: add - IL_004a: stloc.0 - IL_004b: ldloc.0 - IL_004c: ldc.i4.1 - IL_004d: ldc.i4.s 10 - IL_004f: add - IL_0050: blt.s IL_0004 + .method public static void ApplyDefaults() cil managed + { - IL_0052: ret -} + .maxstack 5 + .locals init (int32 V_0, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_2, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_3, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_4, + class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_5, + bool V_6) + IL_0000: ldc.i4.0 + IL_0001: stloc.0 + IL_0002: br.s IL_0048 + + IL_0004: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 DontEliminateForLoops::get_unsolved() + IL_0009: stloc.1 + IL_000a: ldsfld class DontEliminateForLoops/ApplyDefaults@8 DontEliminateForLoops/ApplyDefaults@8::@_instance + IL_000f: stloc.2 + IL_0010: ldloc.1 + IL_0011: stloc.3 + IL_0012: ldloc.3 + IL_0013: stloc.s V_4 + IL_0015: ldloc.s V_4 + IL_0017: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_001c: stloc.s V_5 + IL_001e: ldloc.s V_5 + IL_0020: brfalse.s IL_0044 + + IL_0022: ldloc.s V_4 + IL_0024: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0029: stloc.s V_6 + IL_002b: ldloc.2 + IL_002c: ldloc.s V_6 + IL_002e: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0033: pop + IL_0034: ldloc.s V_5 + IL_0036: stloc.s V_4 + IL_0038: ldloc.s V_4 + IL_003a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() + IL_003f: stloc.s V_5 + IL_0041: nop + IL_0042: br.s IL_001e + + IL_0044: ldloc.0 + IL_0045: ldc.i4.1 + IL_0046: add + IL_0047: stloc.0 + IL_0048: ldloc.0 + IL_0049: ldc.i4.1 + IL_004a: ldc.i4.s 10 + IL_004c: add + IL_004d: blt.s IL_0004 + + IL_004f: ret + } """ ]) diff --git a/tests/fsharpqa/Source/Conformance/Expressions/ExpressionQuotations/Baselines/TryWith.fs b/tests/fsharpqa/Source/Conformance/Expressions/ExpressionQuotations/Baselines/TryWith.fs index 9f56dadfef2..fc6a9008b88 100644 --- a/tests/fsharpqa/Source/Conformance/Expressions/ExpressionQuotations/Baselines/TryWith.fs +++ b/tests/fsharpqa/Source/Conformance/Expressions/ExpressionQuotations/Baselines/TryWith.fs @@ -18,38 +18,26 @@ let r1 = verify q (|TryWith|_|) "TryWith (Let (x, Value (1), Call (None, Raise, [Coerce (NewObject (E, Value (3)), Exception)])), matchValue, IfThenElse (TypeTest (ArgumentException, matchValue), - IfThenElse (Let (e, Call (None, UnboxGeneric, [matchValue]), + IfThenElse (Let (e, Call (None, UnboxFast, [matchValue]), Call (None, op_Inequality, [PropertyGet (Some (e), InnerException, []), Value ()])), - Let (e, Call (None, UnboxGeneric, [matchValue]), - Value (1)), - IfThenElse (TypeTest (E, matchValue), - Let (x, - PropertyGet (Some (Coerce (matchValue, - E)), - Data0, []), - Value (1)), Value (0))), + Let (e, Call (None, UnboxFast, [matchValue]), + Value (1)), Value (0)), IfThenElse (TypeTest (E, matchValue), Let (x, PropertyGet (Some (Coerce (matchValue, E)), Data0, []), Value (1)), Value (0))), matchValue, IfThenElse (TypeTest (ArgumentException, matchValue), - IfThenElse (Let (e, Call (None, UnboxGeneric, [matchValue]), + IfThenElse (Let (e, Call (None, UnboxFast, [matchValue]), Call (None, op_Inequality, [PropertyGet (Some (e), InnerException, []), Value ()])), - Let (e, Call (None, UnboxGeneric, [matchValue]), - Value (-1)), - IfThenElse (TypeTest (E, matchValue), - Let (x, - PropertyGet (Some (Coerce (matchValue, - E)), - Data0, []), x), - Call (None, Reraise, []))), + Let (e, Call (None, UnboxFast, [matchValue]), + Value (-1)), Call (None, Reraise, [])), IfThenElse (TypeTest (E, matchValue), Let (x, PropertyGet (Some (Coerce (matchValue, E)),