From d4b8d9cf9161bf8bd17e524dc500e64063d1cea8 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Tue, 25 Jan 2022 13:34:10 +0000 Subject: [PATCH 01/35] cleanup changes, squash --- src/fsharp/AttributeChecking.fs | 2 +- src/fsharp/AugmentWithHashCompare.fs | 42 +- src/fsharp/CheckComputationExpressions.fs | 412 ++- src/fsharp/CheckDeclarations.fs | 29 +- src/fsharp/CheckExpressions.fs | 396 ++- src/fsharp/CheckExpressions.fsi | 7 +- src/fsharp/CompilerConfig.fs | 6 +- src/fsharp/CompilerConfig.fsi | 4 +- src/fsharp/CompilerImports.fs | 2 +- src/fsharp/CompilerOptions.fs | 6 +- src/fsharp/ConstraintSolver.fs | 4 +- src/fsharp/DetupleArgs.fs | 4 +- src/fsharp/FSComp.txt | 1 + src/fsharp/FSharp.Core/async.fs | 61 +- src/fsharp/FSharp.Core/async.fsi | 14 + src/fsharp/FSharp.Core/resumable.fs | 42 +- src/fsharp/FSharp.Core/resumable.fsi | 23 + src/fsharp/FindUnsolved.fs | 12 +- src/fsharp/IlxGen.fs | 670 ++-- src/fsharp/InnerLambdasToTopLevelFuncs.fs | 21 +- src/fsharp/LowerCallsAndSeqs.fs | 223 +- src/fsharp/LowerStateMachines.fs | 85 +- src/fsharp/LowerStateMachines.fsi | 2 + src/fsharp/MethodCalls.fs | 4 +- src/fsharp/Optimizer.fs | 214 +- src/fsharp/ParseAndCheckInputs.fs | 2 +- src/fsharp/PatternMatchCompilation.fs | 12 +- src/fsharp/PostInferenceChecks.fs | 52 +- src/fsharp/QuotationPickler.fs | 2 +- src/fsharp/QuotationPickler.fsi | 2 +- src/fsharp/QuotationTranslator.fs | 23 +- src/fsharp/SyntaxTree.fs | 22 +- src/fsharp/SyntaxTree.fsi | 24 +- src/fsharp/SyntaxTreeOps.fs | 22 +- src/fsharp/SyntaxTreeOps.fsi | 4 + src/fsharp/TcGlobals.fs | 29 +- src/fsharp/TypeRelations.fs | 8 +- src/fsharp/TypedTree.fs | 62 +- src/fsharp/TypedTreeBasics.fs | 10 +- src/fsharp/TypedTreeOps.fs | 400 +-- src/fsharp/TypedTreeOps.fsi | 42 +- src/fsharp/TypedTreePickle.fs | 13 +- src/fsharp/absil/il.fs | 6 +- src/fsharp/absil/il.fsi | 6 +- src/fsharp/absil/ilread.fs | 4 +- src/fsharp/absil/ilwrite.fs | 6 +- src/fsharp/absil/ilwritepdb.fs | 12 +- src/fsharp/absil/ilwritepdb.fsi | 2 +- src/fsharp/autobox.fs | 6 +- src/fsharp/fsc.fs | 6 +- src/fsharp/fsi/fsi.fs | 6 +- src/fsharp/ilx/EraseClosures.fs | 41 +- src/fsharp/ilx/EraseClosures.fsi | 10 +- src/fsharp/infos.fs | 1 + src/fsharp/pars.fsy | 180 +- src/fsharp/range.fs | 122 +- src/fsharp/range.fsi | 28 +- src/fsharp/service/FSharpCheckerResults.fs | 2 +- src/fsharp/service/FSharpParseFileResults.fs | 50 +- .../service/ServiceInterfaceStubGenerator.fs | 10 +- src/fsharp/service/ServiceParseTreeWalk.fs | 6 +- src/fsharp/service/ServiceParsedInputOps.fs | 4 +- src/fsharp/service/ServiceStructure.fs | 2 +- src/fsharp/symbols/Exprs.fs | 91 +- src/fsharp/symbols/Exprs.fsi | 15 +- src/fsharp/xlf/FSComp.txt.cs.xlf | 5 + src/fsharp/xlf/FSComp.txt.de.xlf | 5 + src/fsharp/xlf/FSComp.txt.es.xlf | 5 + src/fsharp/xlf/FSComp.txt.fr.xlf | 5 + src/fsharp/xlf/FSComp.txt.it.xlf | 5 + src/fsharp/xlf/FSComp.txt.ja.xlf | 5 + src/fsharp/xlf/FSComp.txt.ko.xlf | 5 + src/fsharp/xlf/FSComp.txt.pl.xlf | 5 + src/fsharp/xlf/FSComp.txt.pt-BR.xlf | 5 + src/fsharp/xlf/FSComp.txt.ru.xlf | 5 + src/fsharp/xlf/FSComp.txt.tr.xlf | 5 + src/fsharp/xlf/FSComp.txt.zh-Hans.xlf | 5 + src/fsharp/xlf/FSComp.txt.zh-Hant.xlf | 5 + ...erService.SurfaceArea.netstandard.expected | 94 +- tests/FSharp.Core.UnitTests/SurfaceArea.fs | 3 + .../EmittedIL/ComputedListExpressions.fs | 354 +- .../Compiler/CodeGen/EmittedIL/Mutation.fs | 64 +- .../CodeGen/EmittedIL/TaskGeneratedCode.fs | 1213 ++++--- .../core/state-machines/neg-resumable-02.bsl | 2 - tests/fsharp/typecheck/sigs/neg59.bsl | 4 +- tests/fsharp/typecheck/sigs/neg61.bsl | 4 +- .../AsyncExpressionSteppingTest1.il.bsl | 7 +- .../AsyncExpressionSteppingTest2.il.bsl | 198 +- .../AsyncExpressionSteppingTest3.il.bsl | 12 +- .../AsyncExpressionSteppingTest4.il.bsl | 130 +- .../AsyncExpressionSteppingTest5.il.bsl | 1227 ++++++- .../AsyncExpressionSteppingTest6.il.bsl | 26 +- .../EmittedIL/AttributeTargets/Default.il.bsl | 7 +- .../EmittedIL/AttributeTargets/Field.il.bsl | 7 +- .../AttributeTargets/Property.il.bsl | 7 +- .../CCtorDUWithMember01.il.bsl | 234 +- .../CCtorDUWithMember02.il.bsl | 8 +- .../CCtorDUWithMember03.il.bsl | 8 +- .../CCtorDUWithMember04.il.bsl | 8 +- .../CompiledNameAttribute04.il.bsl | 35 +- .../ComputationExpr01.il.bsl | 9 +- .../ComputationExpr02.il.bsl | 9 +- .../ComputationExpr03.il.bsl | 16 +- .../ComputationExpr04.il.bsl | 66 +- .../ComputationExpr05.il.bsl | 51 +- .../ComputationExpr06.il.bsl | 28 +- .../ComputationExpr07.il.bsl | 13 +- .../GeneratedIterators/GenIter01.il.bsl | 88 +- .../GeneratedIterators/GenIter02.il.bsl | 96 +- .../GeneratedIterators/GenIter03.il.bsl | 88 +- .../GeneratedIterators/GenIter04.il.bsl | 95 +- .../ListExpressionSteppingTest1.il.bsl | 9 +- .../ListExpressionSteppingTest2.il.bsl | 13 +- .../ListExpressionSteppingTest3.il.bsl | 12 +- .../ListExpressionSteppingTest4.il.bsl | 12 +- .../ListExpressionSteppingTest5.il.bsl | 12 +- .../ListExpressionSteppingTest6.il.bsl | 165 +- .../EmittedIL/Misc/AbstractClass.il.bsl | 12 +- .../CodeGen/EmittedIL/Misc/AnonRecd.il.bsl | 328 +- .../Misc/ArgumentNamesInClosures01.il.bsl | 9 +- .../EmittedIL/Misc/CodeGenRenamings01.il.bsl | 17 +- .../CodeGen/EmittedIL/Misc/Decimal01.il.bsl | 8 +- .../EmittedIL/Misc/EqualsOnUnions01.il.bsl | 504 ++- .../CodeGen/EmittedIL/Misc/ForLoop01.il.bsl | 13 +- .../CodeGen/EmittedIL/Misc/ForLoop02.il.bsl | 12 +- .../CodeGen/EmittedIL/Misc/ForLoop03.il.bsl | 23 +- .../Misc/GeneralizationOnUnions01.il.bsl | 165 +- .../Misc/GenericTypeStaticField01.il.bsl | 70 +- .../EmittedIL/Misc/IfThenElse01.il.bsl | 8 +- .../EmittedIL/Misc/NoBoxingOnDispose01.il.bsl | 34 +- .../Misc/NonEscapingArguments02.il.bsl | 13 +- .../CodeGen/EmittedIL/Misc/Structs01.il.bsl | 20 +- .../CodeGen/EmittedIL/Misc/Structs02.il.bsl | 24 +- .../Misc/StructsAsArrayElements01.il.bsl | 20 +- .../Misc/TryWith_NoFilterBlocks01.il.bsl | 7 +- .../Source/CodeGen/EmittedIL/Misc/cas.il.bsl | 12 +- .../Operators/comparison_decimal01.il.bsl | 17 +- .../Linq101Aggregates01.il.bsl | 2927 ++++++++--------- .../Linq101ElementOperators01.il.bsl | 643 ++-- .../Linq101Grouping01.il.bsl | 47 +- .../Linq101Joins01.il.bsl | 26 +- .../Linq101Ordering01.il.bsl | 546 ++- .../Linq101Partitioning01.il.bsl | 554 ++-- .../Linq101Quantifiers01.il.bsl | 488 +-- .../Linq101Select01.il.bsl | 216 +- .../Linq101SetOperators01.il.bsl | 222 +- .../Linq101Where01.il.bsl | 52 +- .../SeqExpressionSteppingTest1.il.bsl | 8 +- .../SeqExpressionSteppingTest2.il.bsl | 10 +- .../SeqExpressionSteppingTest3.il.bsl | 8 +- .../SeqExpressionSteppingTest4.il.bsl | 11 +- .../SeqExpressionSteppingTest5.il.bsl | 31 +- .../SeqExpressionSteppingTest6.il.bsl | 43 +- .../SeqExpressionSteppingTest7.fs | 69 + .../SeqExpressionSteppingTest7.il.bsl | 758 ++++- .../SeqExpressionTailCalls01.il.bsl | 9 +- .../SeqExpressionTailCalls02.il.bsl | 12 +- .../ToplevelModule.il.bsl | 996 +++--- .../ToplevelNamespace.il.bsl | 1490 ++++----- .../EmittedIL/StaticInit/LetBinding01.il.bsl | 8 +- .../StaticInit/StaticInit_Class01.il.bsl | 14 +- .../StaticInit/StaticInit_Struct01.il.bsl | 34 +- .../SteppingMatch/SteppingMatch06.il.bsl | 230 +- .../SteppingMatch/SteppingMatch07.il.bsl | 230 +- .../SteppingMatch/SteppingMatch09.il.bsl | 8 +- .../TestFunctions/TestFunction16.il.bsl | 410 ++- .../TestFunctions/TestFunction17.il.bsl | 368 +-- .../TestFunctions/TestFunction19.il.bsl | 20 +- .../TestFunctions/TestFunction20.il.bsl | 15 +- .../TestFunctions/TestFunction21.il.bsl | 416 ++- .../TestFunctions/TestFunction23.il.bsl | 14 +- .../TestFunctions/TestFunction24.il.bsl | 366 +-- .../TestFunctions/TestFunction3b.il.bsl | 6 +- .../TestFunctions/TestFunction3c.il.bsl | 7 +- .../TestFunctions/TestFunction9b4.il.bsl | 13 +- .../TestFunctions/Testfunction22b.il.bsl | 8 +- .../TestFunctions/Testfunction22c.il.bsl | 8 +- .../TestFunctions/Testfunction9b.il.bsl | 9 +- .../TestFunctions/Testfunction9b1.il.bsl | 9 +- .../TestFunctions/Testfunction9b2.il.bsl | 9 +- .../TestFunctions/Testfunction9b3.il.bsl | 9 +- .../EmittedIL/Tuples/OptionalArg01.il.bsl | 130 +- .../CodeGen/EmittedIL/Tuples/Tuple01.il.bsl | 8 +- .../CodeGen/EmittedIL/Tuples/Tuple02.il.bsl | 8 +- .../CodeGen/EmittedIL/Tuples/Tuple03.il.bsl | 8 +- .../CodeGen/EmittedIL/Tuples/Tuple04.il.bsl | 8 +- .../CodeGen/EmittedIL/Tuples/Tuple05.il.bsl | 8 +- .../CodeGen/EmittedIL/Tuples/Tuple06.il.bsl | 8 +- .../CodeGen/EmittedIL/Tuples/Tuple07.il.bsl | 8 +- .../CodeGen/EmittedIL/Tuples/Tuple08.il.bsl | 8 +- .../EmittedIL/Tuples/TupleElimination.il.bsl | 8 +- .../EmittedIL/Tuples/TupleMonster.il.bsl | 8 +- .../Tuples/ValueTupleAliasConstructor.il.bsl | 8 +- .../ComputationExpressions/E_MissingFor.fs | 2 +- .../General/E_ObjectConstructorAndTry01.fs | 2 +- .../General/E_ObjectConstructorAndTry02.fs | 2 +- .../ForLoop/ForEachOnArray01.il.bsl | 12 +- .../ForLoop/ForEachOnList01.il.bsl | 56 +- .../ForLoop/ForEachOnString01.il.bsl | 66 +- .../ForLoop/NoAllocationOfTuple01.il.bsl | 10 +- .../ForLoop/NoIEnumerable01.il.bsl | 10 +- .../ForLoop/NoIEnumerable02.il.bsl | 10 +- .../ForLoop/NoIEnumerable03.il.bsl | 10 +- .../ForLoop/ZeroToArrLength01.il.bsl | 10 +- .../ForLoop/ZeroToArrLength02.il.bsl | 10 +- .../GenericComparison/Compare01.il.bsl | 10 +- .../GenericComparison/Compare02.il.bsl | 10 +- .../GenericComparison/Compare03.il.bsl | 10 +- .../GenericComparison/Compare04.il.bsl | 10 +- .../GenericComparison/Compare05.il.bsl | 402 ++- .../GenericComparison/Compare06.il.bsl | 350 +- .../GenericComparison/Compare07.il.bsl | 462 ++- .../GenericComparison/Compare08.il.bsl | 10 +- .../GenericComparison/Compare09.il.bsl | 10 +- .../GenericComparison/Compare10.il.bsl | 930 +++--- .../GenericComparison/Compare11.il.bsl | 10 +- .../GenericComparison/Equals01.il.bsl | 10 +- .../GenericComparison/Equals02.il.bsl | 10 +- .../GenericComparison/Equals03.il.bsl | 10 +- .../GenericComparison/Equals04.il.bsl | 402 ++- .../GenericComparison/Equals05.il.bsl | 350 +- .../GenericComparison/Equals06.il.bsl | 462 ++- .../GenericComparison/Equals07.il.bsl | 10 +- .../GenericComparison/Equals08.il.bsl | 10 +- .../GenericComparison/Equals09.il.bsl | 930 +++--- .../GenericComparison/Hash01.il.bsl | 10 +- .../GenericComparison/Hash02.il.bsl | 8 +- .../GenericComparison/Hash03.il.bsl | 10 +- .../GenericComparison/Hash04.il.bsl | 10 +- .../GenericComparison/Hash05.il.bsl | 402 ++- .../GenericComparison/Hash06.il.bsl | 402 ++- .../GenericComparison/Hash07.il.bsl | 10 +- .../GenericComparison/Hash08.il.bsl | 350 +- .../GenericComparison/Hash09.il.bsl | 462 ++- .../GenericComparison/Hash10.il.bsl | 10 +- .../GenericComparison/Hash11.il.bsl | 10 +- .../GenericComparison/Hash12.il.bsl | 930 +++--- tests/service/ExprTests.fs | 30 +- tests/service/ProjectAnalysisTests.fs | 2 +- .../TheBigFileOfDebugStepping.fsx | 1110 ++++++- 240 files changed, 16231 insertions(+), 13174 deletions(-) diff --git a/src/fsharp/AttributeChecking.fs b/src/fsharp/AttributeChecking.fs index 8c5302a97de..3e860b56617 100644 --- a/src/fsharp/AttributeChecking.fs +++ b/src/fsharp/AttributeChecking.fs @@ -51,7 +51,7 @@ let rec private evalILAttribElem e = | ILAttribElem.TypeRef None -> null let rec private evalFSharpAttribArg g e = - match e with + match stripDebugPoints e with | Expr.Const (c, _, _) -> match c with | Const.Bool b -> box b diff --git a/src/fsharp/AugmentWithHashCompare.fs b/src/fsharp/AugmentWithHashCompare.fs index eb723a014a3..acfc6d3ae31 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 DebugPointAtTarget.No m g.int_ty + (mkCond DebugPointAtBinding.NoneAtSticky m g.int_ty (mkClt g m ne (mkZero g m)) ne - (mkCond DebugPointAtBinding.NoneAtSticky DebugPointAtTarget.No m g.int_ty + (mkCond DebugPointAtBinding.NoneAtSticky 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 DebugPointAtTarget.No m g.bool_ty e acc (mkFalse g m)) a b + List.foldBack (fun e acc -> mkCond DebugPointAtBinding.NoneAtSticky 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,8 +303,8 @@ 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, DebugPointAtTarget.No)) ] - let dflt = Some(mbuilder.AddResultTarget(mkFalse g m, DebugPointAtTarget.No)) + mbuilder.AddResultTarget(expr)) ] + let dflt = Some(mbuilder.AddResultTarget(mkFalse g m)) let dtree = TDSwitch(DebugPointAtSwitch.No, thate, cases, dflt, m) mbuilder.Close(dtree, m, g.bool_ty) @@ -326,8 +326,8 @@ 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, DebugPointAtTarget.No)) ] - let dflt = mbuilder.AddResultTarget(mkFalse g m, DebugPointAtTarget.No) + mbuilder.AddResultTarget(expr)) ] + let dflt = mbuilder.AddResultTarget(mkFalse g m) 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 @@ -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, DebugPointAtTarget.No))) + Some (mkCase(DecisionTreeTest.UnionCase(cref, tinst), mbuilder.AddResultTarget(test))) 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, DebugPointAtTarget.No)) + let dflt = if isNil nullary then None else Some (mbuilder.AddResultTarget(mkZero g m)) 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 DebugPointAtTarget.No m g.int_ty + mkCond DebugPointAtBinding.NoneAtSticky 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, DebugPointAtTarget.No))) + Some (mkCase(DecisionTreeTest.UnionCase(cref, tinst), mbuilder.AddResultTarget(test))) 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, DebugPointAtTarget.No)) + let dflt = if isNil nullary then None else Some (mbuilder.AddResultTarget(mkZero g m)) 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 DebugPointAtTarget.No m g.int_ty + mkCond DebugPointAtBinding.NoneAtSticky 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, DebugPointAtTarget.No))) + Some (mkCase(DecisionTreeTest.UnionCase(cref, tinst), mbuilder.AddResultTarget(test))) 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, DebugPointAtTarget.No))) + let dflt = (if isNil nullary then None else Some (mbuilder.AddResultTarget(mkTrue g m))) 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 DebugPointAtTarget.No m g.bool_ty + mkCond DebugPointAtBinding.NoneAtSticky 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, DebugPointAtTarget.No))) + Some (mkCase(DecisionTreeTest.UnionCase(cref, tinst), mbuilder.AddResultTarget (test))) 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, DebugPointAtTarget.No)) + let dflt = if isNil nullary then None else Some (mbuilder.AddResultTarget(mkTrue g m)) 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 DebugPointAtTarget.No m g.bool_ty + mkCond DebugPointAtBinding.NoneAtSticky 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, DebugPointAtTarget.No))) + Some(mkCase(DecisionTreeTest.UnionCase(c1ref, tinst), mbuilder.AddResultTarget(test))) let nullary, nonNullary = ucases |> List.mapi mkCase @@ -657,7 +657,7 @@ 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, DebugPointAtTarget.No)) + Some(mbuilder.AddResultTarget(tag)) 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 diff --git a/src/fsharp/CheckComputationExpressions.fs b/src/fsharp/CheckComputationExpressions.fs index 2f23df7172c..2b83c3c8868 100644 --- a/src/fsharp/CheckComputationExpressions.fs +++ b/src/fsharp/CheckComputationExpressions.fs @@ -79,11 +79,11 @@ let (|JoinRelation|_|) cenv env (e: SynExpr) = | _ -> None -let elimFastIntegerForLoop (spBind, id, start, dir, finish, innerExpr, m) = +let elimFastIntegerForLoop (spFor, spTo, id, start, dir, finish, innerExpr, m) = let pseudoEnumExpr = if dir then mkSynInfix m start ".." finish else mkSynTrifix m ".. .." start (SynExpr.Const (SynConst.Int32 -1, start.Range)) finish - SynExpr.ForEach (spBind, SeqExprOnly false, true, mkSynPatVar None id, pseudoEnumExpr, innerExpr, m) + SynExpr.ForEach (spFor, spTo, SeqExprOnly false, true, mkSynPatVar None id, pseudoEnumExpr, innerExpr, m) /// Check if a computation or sequence expression is syntactically free of 'yield' (though not yield!) let YieldFree (cenv: cenv) expr = @@ -226,7 +226,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter // Give bespoke error messages for the FSharp.Core "query" builder let isQuery = - match interpExpr with + match stripDebugPoints interpExpr with | Expr.Val (vf, _, m) -> let item = Item.CustomBuilder (vf.DisplayName, vf) CallNameResolutionSink cenv.tcSink (m, env.NameEnv, item, emptyTyparInst, ItemOccurence.Use, env.eAccessRights) @@ -495,7 +495,8 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let (|ForEachThen|_|) e = match e with - | SynExpr.ForEach (_spBind, SeqExprOnly false, isFromSource, pat1, expr1, SynExpr.Sequential (_, true, clause, rest, _), _) -> Some (isFromSource, pat1, expr1, clause, rest) + | SynExpr.ForEach (_spFor, _spIn, SeqExprOnly false, isFromSource, pat1, expr1, SynExpr.Sequential (_, true, clause, rest, _), _) -> + Some (isFromSource, pat1, expr1, clause, rest) | _ -> None let (|CustomOpId|_|) predicate e = @@ -707,15 +708,18 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter // This is not pretty - we have to decide which range markers we use for the calls to Combine and Delay // NOTE: we should probably suppress these sequence points altogether let rangeForCombine innerComp1 = - match innerComp1 with - | SynExpr.IfThenElse (ifToThenRange=mIfToThen) -> mIfToThen - | SynExpr.Match (matchDebugPoint=DebugPointAtBinding.Yes mMatch) -> mMatch - | SynExpr.TryWith (tryDebugPoint=DebugPointAtTry.Yes mTry) -> mTry - | SynExpr.TryFinally (tryDebugPoint=DebugPointAtTry.Yes mTry) -> mTry - | SynExpr.For (forDebugPoint=DebugPointAtFor.Yes mBind) -> mBind - | SynExpr.ForEach (forDebugPoint=DebugPointAtFor.Yes mBind) -> mBind - | SynExpr.While (whileDebugPoint=DebugPointAtWhile.Yes mWhile) -> mWhile - | _ -> innerComp1.Range + let m = + match innerComp1 with + | SynExpr.IfThenElse (ifToThenRange=mIfToThen) -> mIfToThen + | SynExpr.Match (matchDebugPoint=DebugPointAtBinding.Yes mMatch) -> mMatch + | SynExpr.TryWith (tryDebugPoint=DebugPointAtTry.Yes mTry) -> mTry + | SynExpr.TryFinally (tryDebugPoint=DebugPointAtTry.Yes mTry) -> mTry + | SynExpr.For (forDebugPoint=DebugPointAtFor.Yes mBind) -> mBind + | SynExpr.ForEach (forDebugPoint=DebugPointAtFor.Yes mBind) -> mBind + | SynExpr.While (whileDebugPoint=DebugPointAtWhile.Yes mWhile) -> mWhile + | _ -> innerComp1.Range + + m.NoteSourceConstruct(NotedSourceConstruct.Combine) // Check for 'where x > y', 'select x, y' and other mis-applications of infix operators, give a good error message, and return a flag let checkForBinaryApp comp = @@ -745,6 +749,12 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter patvs, envinner), id) + // Flag that a debug point should get emitted prior to both the evaluation of 'rhsExpr' and the call to Using + let addBindDebugPoint spBind e = + match spBind with + | DebugPointAtBinding.Yes m -> SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes m, true), e) + | _ -> e + let emptyVarSpace = LazyWithContext.NotLazy ([], env) // If there are no 'yield' in the computation expression, and the builder supports 'Yield', @@ -926,18 +936,31 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let varSpaceExpr = mkExprForVarSpace mOpCore valsInner let varSpacePat = mkPatForVarSpace mOpCore valsInner let joinExpr = mkOverallExprGivenVarSpaceExpr varSpaceExpr - Some (trans CompExprTranslationPass.Initial q varSpaceInner (SynExpr.ForEach (DebugPointAtFor.No, SeqExprOnly false, false, varSpacePat, joinExpr, innerComp, mOpCore)) translatedCtxt) + let consumingExpr = SynExpr.ForEach (DebugPointAtFor.No, DebugPointAtInOrTo.No, SeqExprOnly false, false, varSpacePat, joinExpr, innerComp, mOpCore) + Some (trans CompExprTranslationPass.Initial q varSpaceInner consumingExpr translatedCtxt) - | SynExpr.ForEach (spForLoop, SeqExprOnly _seqExprOnly, isFromSource, pat, sourceExpr, innerComp, _) -> + | SynExpr.ForEach (spFor, spIn, SeqExprOnly _seqExprOnly, isFromSource, pat, sourceExpr, innerComp, _mEntireForEach) -> let sourceExpr = match RewriteRangeExpr sourceExpr with | Some e -> e | None -> sourceExpr let wrappedSourceExpr = mkSourceExprConditional isFromSource sourceExpr - let mFor = match spForLoop with DebugPointAtFor.Yes m -> m.NoteDebugPoint(RangeDebugPointKind.For) | _ -> pat.Range + + let mFor = + match spFor with + | DebugPointAtFor.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.For) + | DebugPointAtFor.No -> pat.Range + + // For computation expressions, 'in' or 'to' is hit on each MoveNext. + // To support this a named debug point for the "in" keyword is available to inlined code. + match spIn with + | DebugPointAtInOrTo.Yes mIn -> + cenv.namedDebugPointsForInlinedCode[{Range=mFor; Name="ForLoop.InOrToKeyword"}] <- mIn + | _ -> () + let mPat = pat.Range - let spBind = match spForLoop with DebugPointAtFor.Yes m -> DebugPointAtBinding.Yes m | DebugPointAtFor.No -> DebugPointAtBinding.NoneAtSticky + if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mFor ad "For" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("For"), mFor)) @@ -949,33 +972,80 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter vspecs, envinner) 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, DebugPointAtTarget.Yes)], spBind, mFor) ])) ) + (fun innerCompR -> + + let forCall = + mkSynCall "For" mFor [wrappedSourceExpr; SynExpr.MatchLambda (false, mPat, [SynMatchClause(pat, None, None, innerCompR, mPat, DebugPointAtTarget.Yes)], DebugPointAtBinding.NoneAtInvisible, mFor) ] + + let forCall = + match spFor with + | DebugPointAtFor.Yes m -> SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes m, false), forCall) + | DebugPointAtFor.No -> forCall + + translatedCtxt forCall)) + + | SynExpr.For (forDebugPoint=spFor; toDebugPoint=spTo; ident=id; identBody=start; direction=dir; toBody=finish; doBody=innerComp; range=m) -> + let mFor = match spFor with DebugPointAtFor.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.For) | _ -> m - | SynExpr.For (forDebugPoint=spBind; ident=id; identBody=start; direction=dir; toBody=finish; doBody=innerComp; range=m) -> - let mFor = match spBind with DebugPointAtFor.Yes m -> m.NoteDebugPoint(RangeDebugPointKind.For) | _ -> m if isQuery then errorR(Error(FSComp.SR.tcNoIntegerForLoopInQuery(), mFor)) - Some (trans CompExprTranslationPass.Initial q varSpace (elimFastIntegerForLoop (spBind, id, start, dir, finish, innerComp, m)) translatedCtxt ) + + let reduced = elimFastIntegerForLoop (spFor, spTo, id, start, dir, finish, innerComp, m) + Some (trans CompExprTranslationPass.Initial q varSpace reduced translatedCtxt ) | SynExpr.While (spWhile, guardExpr, innerComp, _) -> let mGuard = guardExpr.Range - let mWhile = match spWhile with DebugPointAtWhile.Yes m -> m.NoteDebugPoint(RangeDebugPointKind.While) | _ -> mGuard + let mWhile = match spWhile with DebugPointAtWhile.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.While) | _ -> mGuard + if isQuery then error(Error(FSComp.SR.tcNoWhileInQuery(), mWhile)) + if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mWhile ad "While" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("While"), mWhile)) + if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mWhile ad "Delay" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("Delay"), mWhile)) - Some(trans CompExprTranslationPass.Initial q varSpace innerComp (fun holeFill -> translatedCtxt (mkSynCall "While" mWhile [mkSynDelay2 guardExpr; mkSynCall "Delay" mWhile [mkSynDelay innerComp.Range holeFill]])) ) - | SynExpr.TryFinally (innerComp, unwindExpr, mTryToLast, spTry, _spFinally) -> + // 'while' is hit just before each time the guard is called + let guardExpr = + match spWhile with + | DebugPointAtWhile.Yes mWhile -> + SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mWhile, false), guardExpr) + | DebugPointAtWhile.No -> guardExpr + + Some(trans CompExprTranslationPass.Initial q varSpace innerComp (fun holeFill -> + translatedCtxt + (mkSynCall "While" mWhile + [ mkSynDelay2 guardExpr; + mkSynCall "Delay" mWhile [mkSynDelay innerComp.Range holeFill]])) ) + + | SynExpr.TryFinally (innerComp, unwindExpr, mTryToLast, spTry, spFinally) -> + + let mTry = match spTry with DebugPointAtTry.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.Try) | _ -> mTryToLast + + // Put down a debug point for the 'finally' + let unwindExpr2 = + match spFinally with + | DebugPointAtFinally.Yes mFinally -> SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mFinally, false), unwindExpr) + | DebugPointAtFinally.No -> unwindExpr - let mTry = match spTry with DebugPointAtTry.Yes m -> m.NoteDebugPoint(RangeDebugPointKind.Try) | _ -> mTryToLast if isQuery then error(Error(FSComp.SR.tcNoTryFinallyInQuery(), mTry)) + if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mTry ad "TryFinally" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("TryFinally"), mTry)) + if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mTry ad "Delay" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("Delay"), mTry)) - Some (translatedCtxt (mkSynCall "TryFinally" mTry [mkSynCall "Delay" mTry [mkSynDelay innerComp.Range (transNoQueryOps innerComp)]; mkSynDelay2 unwindExpr])) + + let innerExpr = + transNoQueryOps innerComp + |> fun e -> + match spTry with + | DebugPointAtTry.Yes mTry -> SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mTry, false), e) + | _ -> e + + Some (translatedCtxt + (mkSynCall "TryFinally" mTry [ + mkSynCall "Delay" mTry [mkSynDelay innerComp.Range innerExpr] + mkSynDelay2 unwindExpr2])) | SynExpr.Paren (_, _, _, m) -> error(Error(FSComp.SR.tcConstructIsAmbiguousInComputationExpression(), m)) @@ -1003,7 +1073,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter // Rebind using for ... let rebind = - SynExpr.ForEach (DebugPointAtFor.No, SeqExprOnly false, false, varSpacePat, dataCompPrior, comp, comp.Range) + SynExpr.ForEach (DebugPointAtFor.No, DebugPointAtInOrTo.No, SeqExprOnly false, false, varSpacePat, dataCompPrior, comp, comp.Range) // Retry with the 'for' loop packaging. Set firstTry=false just in case 'join' processing fails tryTrans CompExprTranslationPass.Subsequent q varSpace rebind id @@ -1020,7 +1090,6 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let isYield = not (customOperationMaintainsVarSpaceUsingBind nm) translatedCtxt (transNoQueryOps (SynExpr.YieldOrReturn ((isYield, false), varSpaceExpr, mClause))) - // Now run the consumeCustomOpClauses Some (consumeCustomOpClauses q varSpace dataCompPriorToOp comp false mClause) @@ -1040,22 +1109,26 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter match tryTrans CompExprTranslationPass.Initial CustomOperationsMode.Denied varSpace innerComp1 id with | Some c -> // "cexpr; cexpr" is treated as builder.Combine(cexpr1, cexpr1) - // This is not pretty - we have to decide which range markers we use for the calls to Combine and Delay - // NOTE: we should probably suppress these sequence points altogether let m1 = rangeForCombine innerComp1 + if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env m ad "Combine" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("Combine"), m)) + if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env m ad "Delay" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("Delay"), m)) - Some (translatedCtxt (mkSynCall "Combine" m1 [c; mkSynCall "Delay" m1 [mkSynDelay innerComp2.Range (transNoQueryOps innerComp2)]])) + + let combineCall = mkSynCall "Combine" m1 [c; mkSynCall "Delay" m1 [mkSynDelay innerComp2.Range (transNoQueryOps innerComp2)]] + + Some (translatedCtxt combineCall) + | None -> // "do! expr; cexpr" is treated as { let! () = expr in cexpr } match innerComp1 with | SynExpr.DoBang (rhsExpr, m) -> let sp = match sp with - | DebugPointAtSequential.SuppressExpr -> DebugPointAtBinding.NoneAtDo - | DebugPointAtSequential.SuppressBoth -> DebugPointAtBinding.NoneAtDo + | DebugPointAtSequential.SuppressExpr -> DebugPointAtBinding.ImplicitAtDo + | DebugPointAtSequential.SuppressBoth -> DebugPointAtBinding.ImplicitAtDo | DebugPointAtSequential.SuppressStmt -> DebugPointAtBinding.Yes m | DebugPointAtSequential.SuppressNeither -> DebugPointAtBinding.Yes m Some(trans CompExprTranslationPass.Initial q varSpace (SynExpr.LetOrUseBang (sp, false, true, SynPat.Const(SynConst.Unit, rhsExpr.Range), None, rhsExpr, [], innerComp2, m)) translatedCtxt) @@ -1121,13 +1194,15 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter // 'use x = expr in expr' | SynExpr.LetOrUse (isUse=true; bindings=[SynBinding (kind=SynBindingKind.Normal; headPat=pat; expr=rhsExpr; debugPoint=spBind)]; body=innerComp) -> - let bindRange = match spBind with DebugPointAtBinding.Yes m -> m | _ -> rhsExpr.Range - if isQuery then error(Error(FSComp.SR.tcUseMayNotBeUsedInQueries(), bindRange)) + let mBind = match spBind with DebugPointAtBinding.Yes m -> m | _ -> rhsExpr.Range + if isQuery then error(Error(FSComp.SR.tcUseMayNotBeUsedInQueries(), mBind)) let innerCompRange = innerComp.Range - 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 ])) + let consumeExpr = SynExpr.MatchLambda(false, innerCompRange, [SynMatchClause(pat, None, None, transNoQueryOps innerComp, innerCompRange, DebugPointAtTarget.Yes)], DebugPointAtBinding.NoneAtInvisible, innerCompRange) + + if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mBind ad "Using" builderTy) then + error(Error(FSComp.SR.tcRequireBuilderMethod("Using"), mBind)) + + Some (translatedCtxt (mkSynCall "Using" mBind [rhsExpr; consumeExpr ]) |> addBindDebugPoint spBind) // 'let! pat = expr in expr' // --> build.Bind(e1, (fun _argN -> match _argN with pat -> expr)) @@ -1135,8 +1210,8 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter // --> build.BindReturn(e1, (fun _argN -> match _argN with pat -> expr-without-return)) | SynExpr.LetOrUseBang (bindDebugPoint=spBind; isUse=false; isFromSource=isFromSource; pat=pat; rhs=rhsExpr; andBangs=[]; body=innerComp) -> - let bindRange = match spBind with DebugPointAtBinding.Yes m -> m | _ -> rhsExpr.Range - if isQuery then error(Error(FSComp.SR.tcBindMayNotBeUsedInQueries(), bindRange)) + let mBind = match spBind with DebugPointAtBinding.Yes m -> m | _ -> rhsExpr.Range + if isQuery then error(Error(FSComp.SR.tcBindMayNotBeUsedInQueries(), mBind)) // Add the variables to the query variable space, on demand let varSpace = @@ -1146,26 +1221,29 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter vspecs, envinner) let rhsExpr = mkSourceExprConditional isFromSource rhsExpr - Some (transBind q varSpace bindRange "Bind" [rhsExpr] pat spBind innerComp translatedCtxt) + Some (transBind q varSpace mBind (addBindDebugPoint spBind) "Bind" [rhsExpr] pat innerComp translatedCtxt) // 'use! pat = e1 in e2' --> build.Bind(e1, (function _argN -> match _argN with pat -> build.Using(x, (fun _argN -> match _argN with pat -> e2)))) | SynExpr.LetOrUseBang (bindDebugPoint=spBind; isUse=true; isFromSource=isFromSource; pat=SynPat.Named (ident=id; isThisVal=false) as pat; rhs=rhsExpr; andBangs=[]; body=innerComp) | SynExpr.LetOrUseBang (bindDebugPoint=spBind; isUse=true; isFromSource=isFromSource; pat=SynPat.LongIdent (longDotId=LongIdentWithDots(id=[id])) as pat; rhs=rhsExpr; andBangs=[]; body=innerComp) -> - let bindRange = match spBind with DebugPointAtBinding.Yes m -> m | _ -> rhsExpr.Range - if isQuery then error(Error(FSComp.SR.tcBindMayNotBeUsedInQueries(), bindRange)) + let mBind = match spBind with DebugPointAtBinding.Yes m -> m | _ -> rhsExpr.Range + if isQuery then error(Error(FSComp.SR.tcBindMayNotBeUsedInQueries(), mBind)) - if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env bindRange ad "Using" builderTy) then - error(Error(FSComp.SR.tcRequireBuilderMethod("Using"), bindRange)) - if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env bindRange ad "Bind" builderTy) then - error(Error(FSComp.SR.tcRequireBuilderMethod("Bind"), bindRange)) + if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mBind ad "Using" builderTy) then + error(Error(FSComp.SR.tcRequireBuilderMethod("Using"), mBind)) + if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mBind ad "Bind" builderTy) then + error(Error(FSComp.SR.tcRequireBuilderMethod("Bind"), mBind)) - 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, DebugPointAtTarget.Yes)], spBind, bindRange) - let rhsExpr = mkSourceExprConditional isFromSource rhsExpr - // TODO: consider allowing translation to BindReturn - Some(translatedCtxt (mkSynCall "Bind" bindRange [rhsExpr; consumeExpr])) + let bindExpr = + let consumeExpr = SynExpr.MatchLambda(false, mBind, [SynMatchClause(pat, None, None, transNoQueryOps innerComp, innerComp.Range, DebugPointAtTarget.Yes)], DebugPointAtBinding.NoneAtInvisible, mBind) + let consumeExpr = mkSynCall "Using" mBind [SynExpr.Ident(id); consumeExpr ] + let consumeExpr = SynExpr.MatchLambda(false, mBind, [SynMatchClause(pat, None, None, consumeExpr, id.idRange, DebugPointAtTarget.No)], DebugPointAtBinding.NoneAtInvisible, mBind) + let rhsExpr = mkSourceExprConditional isFromSource rhsExpr + mkSynCall "Bind" mBind [rhsExpr; consumeExpr] + |> addBindDebugPoint spBind + + Some(translatedCtxt bindExpr) // 'use! pat = e1 ... in e2' where 'pat' is not a simple name --> error | SynExpr.LetOrUseBang (isUse=true; pat=pat; andBangs=andBangs) -> @@ -1180,14 +1258,14 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter // build.BindNReturn(expr1, expr2, ...) // or // build.Bind(build.MergeSources(expr1, expr2), ...) - | SynExpr.LetOrUseBang(bindDebugPoint=letSpBind; isUse=false; isFromSource=isFromSource; pat=letPat; rhs=letRhsExpr; andBangs=andBangBindings; body=innerComp; range=letBindRange) -> + | SynExpr.LetOrUseBang(bindDebugPoint=spBind; isUse=false; isFromSource=isFromSource; pat=letPat; rhs=letRhsExpr; andBangs=andBangBindings; body=innerComp; range=letBindRange) -> if not (cenv.g.langVersion.SupportsFeature LanguageFeature.AndBang) then error(Error(FSComp.SR.tcAndBangNotSupported(), comp.Range)) if isQuery then error(Error(FSComp.SR.tcBindMayNotBeUsedInQueries(), letBindRange)) - let bindRange = match letSpBind with DebugPointAtBinding.Yes m -> m | _ -> letRhsExpr.Range + let mBind = match spBind with DebugPointAtBinding.Yes m -> m | _ -> letRhsExpr.Range let sources = (letRhsExpr :: [for SynExprAndBang(body=andExpr) in andBangBindings -> andExpr ]) |> List.map (mkSourceExprConditional isFromSource) let pats = letPat :: [for SynExprAndBang(pat = andPat) in andBangBindings -> andPat ] let sourcesRange = sources |> List.map (fun e -> e.Range) |> List.reduce unionRanges @@ -1197,7 +1275,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let bindNName = "Bind"+string numSources // Check if this is a Bind2Return etc. - let hasBindReturnN = not (isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env bindRange ad bindReturnNName builderTy)) + let hasBindReturnN = not (isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mBind ad bindReturnNName builderTy)) if hasBindReturnN && Option.isSome (convertSimpleReturnToExpr varSpace innerComp) then let consumePat = SynPat.Tuple(false, pats, letPat.Range) @@ -1208,12 +1286,12 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let _, _, vspecs, envinner, _ = TcMatchPattern cenv (NewInferenceType()) env tpenv (consumePat, None) vspecs, envinner) - Some (transBind q varSpace bindRange bindNName sources consumePat letSpBind innerComp translatedCtxt) + Some (transBind q varSpace mBind (addBindDebugPoint spBind) bindNName sources consumePat innerComp translatedCtxt) else // Check if this is a Bind2 etc. - let hasBindN = not (isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env bindRange ad bindNName builderTy)) + let hasBindN = not (isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mBind ad bindNName builderTy)) if hasBindN then let consumePat = SynPat.Tuple(false, pats, letPat.Range) @@ -1224,7 +1302,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let _, _, vspecs, envinner, _ = TcMatchPattern cenv (NewInferenceType()) env tpenv (consumePat, None) vspecs, envinner) - Some (transBind q varSpace bindRange bindNName sources consumePat letSpBind innerComp translatedCtxt) + Some (transBind q varSpace mBind (addBindDebugPoint spBind) bindNName sources consumePat innerComp translatedCtxt) else // Look for the maximum supported MergeSources, MergeSources3, ... @@ -1233,13 +1311,13 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let maxMergeSources = let rec loop (n: int) = let mergeSourcesName = mkMergeSourcesName n - if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env bindRange ad mergeSourcesName builderTy) then + if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mBind ad mergeSourcesName builderTy) then (n-1) else loop (n+1) loop 2 - if maxMergeSources = 1 then error(Error(FSComp.SR.tcRequireMergeSourcesOrBindN(bindNName), bindRange)) + if maxMergeSources = 1 then error(Error(FSComp.SR.tcRequireMergeSourcesOrBindN(bindNName), mBind)) let rec mergeSources (sourcesAndPats: (SynExpr * SynPat) list) = let numSourcesAndPats = sourcesAndPats.Length @@ -1252,8 +1330,8 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter // Call MergeSources2(e1, e2), MergeSources3(e1, e2, e3) etc let mergeSourcesName = mkMergeSourcesName numSourcesAndPats - if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env bindRange ad mergeSourcesName builderTy) then - error(Error(FSComp.SR.tcRequireMergeSourcesOrBindN(bindNName), bindRange)) + if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mBind ad mergeSourcesName builderTy) then + error(Error(FSComp.SR.tcRequireMergeSourcesOrBindN(bindNName), mBind)) let source = mkSynCall mergeSourcesName sourcesRange (List.map fst sourcesAndPats) let pat = SynPat.Tuple(false, List.map snd sourcesAndPats, letPat.Range) @@ -1265,8 +1343,8 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let nowSourcesAndPats, laterSourcesAndPats = List.splitAt (maxMergeSources - 1) sourcesAndPats let mergeSourcesName = mkMergeSourcesName maxMergeSources - if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env bindRange ad mergeSourcesName builderTy) then - error(Error(FSComp.SR.tcRequireMergeSourcesOrBindN(bindNName), bindRange)) + if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mBind ad mergeSourcesName builderTy) then + error(Error(FSComp.SR.tcRequireMergeSourcesOrBindN(bindNName), mBind)) let laterSource, laterPat = mergeSources laterSourcesAndPats let source = mkSynCall mergeSourcesName sourcesRange (List.map fst nowSourcesAndPats @ [laterSource]) @@ -1283,7 +1361,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter vspecs, envinner) // Build the 'Bind' call - Some (transBind q varSpace bindRange "Bind" [mergedSources] consumePat letSpBind innerComp translatedCtxt) + Some (transBind q varSpace mBind (addBindDebugPoint spBind) "Bind" [mergedSources] consumePat innerComp translatedCtxt) | SynExpr.Match (mMatch, spMatch, expr, mWith, clauses, m) -> if isQuery then error(Error(FSComp.SR.tcMatchMayNotBeUsedWithQuery(), mMatch)) @@ -1291,26 +1369,31 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter Some(translatedCtxt (SynExpr.Match (mMatch, spMatch, expr, mWith, clauses, m))) // 'match! expr with pats ...' --> build.Bind(e1, (function pats ...)) + // FUTURE: consider allowing translation to BindReturn | SynExpr.MatchBang (mMatch, spMatch, expr, _mWith, clauses, _m) -> - let matchExpr = mkSourceExpr expr + let inputExpr = mkSourceExpr expr if isQuery then error(Error(FSComp.SR.tcMatchMayNotBeUsedWithQuery(), mMatch)) if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mMatch ad "Bind" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("Bind"), mMatch)) let clauses = clauses |> List.map (fun (SynMatchClause(pat, cond, arrow, innerComp, patm, sp)) -> SynMatchClause(pat, cond, arrow, transNoQueryOps innerComp, patm, sp)) - let consumeExpr = SynExpr.MatchLambda (false, mMatch, clauses, spMatch, mMatch) + let consumeExpr = SynExpr.MatchLambda (false, mMatch, clauses, DebugPointAtBinding.NoneAtInvisible, mMatch) - // TODO: consider allowing translation to BindReturn - Some(translatedCtxt (mkSynCall "Bind" mMatch [matchExpr; consumeExpr])) + let callExpr = + mkSynCall "Bind" mMatch [inputExpr; consumeExpr] + |> addBindDebugPoint spMatch + + Some(translatedCtxt callExpr) - | SynExpr.TryWith (_mTry, innerComp, _mTryToWith, _mWith, clauses, _mWithToLast, mTryToLast, spTry, _spWith) -> - let mTry = match spTry with DebugPointAtTry.Yes m -> m.NoteDebugPoint(RangeDebugPointKind.Try) | _ -> mTryToLast + | SynExpr.TryWith (_mTry, innerComp, _mTryToWith, _mWith, clauses, _mWithToLast, mTryToLast, spTry, spWith) -> + let mTry = match spTry with DebugPointAtTry.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.Try) | _ -> mTryToLast + let spWith2 = match spWith with DebugPointAtWith.Yes m -> DebugPointAtBinding.Yes m | _ -> DebugPointAtBinding.NoneAtInvisible if isQuery then error(Error(FSComp.SR.tcTryWithMayNotBeUsedInQueries(), mTry)) let clauses = clauses |> List.map (fun (SynMatchClause(pat, cond, arrow, clauseComp, patm, sp)) -> SynMatchClause(pat, cond, arrow, transNoQueryOps clauseComp, patm, sp)) - let consumeExpr = SynExpr.MatchLambda(true, mTryToLast, clauses, DebugPointAtBinding.NoneAtSticky, mTryToLast) + let consumeExpr = SynExpr.MatchLambda(true, mTryToLast, clauses, spWith2, mTryToLast) if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mTry ad "TryWith" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("TryWith"), mTry)) @@ -1318,29 +1401,58 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mTry ad "Delay" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("Delay"), mTry)) - Some(translatedCtxt (mkSynCall "TryWith" mTry [mkSynCall "Delay" mTry [mkSynDelay2 (transNoQueryOps innerComp)]; consumeExpr])) + let innerExpr = + transNoQueryOps innerComp + |> fun e -> + match spTry with + | DebugPointAtTry.Yes m -> SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes m, false), e) + | _ -> e + + let callExpr = + mkSynCall "TryWith" mTry [ + mkSynCall "Delay" mTry [mkSynDelay2 innerExpr] + consumeExpr + ] + //|> fun e -> SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes m), e) + + Some(translatedCtxt callExpr) | SynExpr.YieldOrReturnFrom ((true, _), yieldExpr, m) -> let yieldFromExpr = mkSourceExpr yieldExpr if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env m ad "YieldFrom" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("YieldFrom"), m)) - Some (translatedCtxt (mkSynCall "YieldFrom" m [yieldFromExpr])) + + let yieldFromCall = + mkSynCall "YieldFrom" m [yieldFromExpr] + |> fun e -> SynExpr.DebugPoint(None, e) + + Some (translatedCtxt yieldFromCall) | SynExpr.YieldOrReturnFrom ((false, _), returnedExpr, m) -> let returnFromExpr = mkSourceExpr returnedExpr if isQuery then error(Error(FSComp.SR.tcReturnMayNotBeUsedInQueries(), m)) + if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env m ad "ReturnFrom" builderTy) then errorR(Error(FSComp.SR.tcRequireBuilderMethod("ReturnFrom"), m)) Some (translatedCtxt returnFromExpr) else - Some (translatedCtxt (mkSynCall "ReturnFrom" m [returnFromExpr])) + let returnFromCall = + mkSynCall "ReturnFrom" m [returnFromExpr] + |> fun e -> SynExpr.DebugPoint(None, e) + Some (translatedCtxt returnFromCall) - | SynExpr.YieldOrReturn ((isYield, _), yieldExpr, m) -> + | SynExpr.YieldOrReturn ((isYield, _), yieldOrReturnExpr, m) -> let methName = (if isYield then "Yield" else "Return") if isQuery && not isYield then error(Error(FSComp.SR.tcReturnMayNotBeUsedInQueries(), m)) + if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env m ad methName builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod(methName), m)) - Some(translatedCtxt (mkSynCall methName m [yieldExpr])) + + let yieldOrReturnCall = + mkSynCall methName m [yieldOrReturnExpr] + |> fun e -> SynExpr.DebugPoint(None, e) + + Some(translatedCtxt yieldOrReturnCall) | _ -> None @@ -1427,7 +1539,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter if maintainsVarSpaceUsingBind then SynExpr.LetOrUseBang (DebugPointAtBinding.NoneAtLet, false, false, intoPat, None, dataCompAfterOp, [], contExpr, intoPat.Range) else - SynExpr.ForEach (DebugPointAtFor.No, SeqExprOnly false, false, intoPat, dataCompAfterOp, contExpr, intoPat.Range) + SynExpr.ForEach (DebugPointAtFor.No, DebugPointAtInOrTo.No, SeqExprOnly false, false, intoPat, dataCompAfterOp, contExpr, intoPat.Range) trans CompExprTranslationPass.Initial q emptyVarSpace rebind id @@ -1449,7 +1561,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter if lastUsesBind then SynExpr.LetOrUseBang (DebugPointAtBinding.NoneAtLet, false, false, varSpacePat, None, dataCompPrior, [], compClausesExpr, compClausesExpr.Range) else - SynExpr.ForEach (DebugPointAtFor.No, SeqExprOnly false, false, varSpacePat, dataCompPrior, compClausesExpr, compClausesExpr.Range) + SynExpr.ForEach (DebugPointAtFor.No, DebugPointAtInOrTo.No, SeqExprOnly false, false, varSpacePat, dataCompPrior, compClausesExpr, compClausesExpr.Range) trans CompExprTranslationPass.Initial q varSpace rebind id @@ -1474,7 +1586,8 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter match TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env m ad "Zero" builderTy with | minfo :: _ when MethInfoHasAttribute cenv.g m cenv.g.attrib_DefaultValueAttribute minfo -> SynExpr.ImplicitZero m | _ -> SynExpr.YieldOrReturn ((false, true), SynExpr.Const (SynConst.Unit, m), m) - trans CompExprTranslationPass.Initial q varSpace (SynExpr.LetOrUseBang (DebugPointAtBinding.NoneAtDo, false, false, SynPat.Const(SynConst.Unit, mUnit), None, rhsExpr, [], bodyExpr, m)) translatedCtxt + let letBangBind = SynExpr.LetOrUseBang (DebugPointAtBinding.ImplicitAtDo, false, false, SynPat.Const(SynConst.Unit, mUnit), None, rhsExpr, [], bodyExpr, m) + trans CompExprTranslationPass.Initial q varSpace letBangBind translatedCtxt // "expr;" in final position is treated as { expr; zero } // Suppress the sequence point on the "zero" @@ -1496,7 +1609,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter SynExpr.Sequential(DebugPointAtSequential.SuppressExpr, true, comp, holeFill, comp.Range) translatedCtxt fillExpr) - and transBind q varSpace bindRange bindName bindArgs (consumePat: SynPat) spBind (innerComp: SynExpr) translatedCtxt = + and transBind q varSpace bindRange addBindDebugPoint bindName bindArgs (consumePat: SynPat) (innerComp: SynExpr) translatedCtxt = let innerRange = innerComp.Range @@ -1514,7 +1627,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, DebugPointAtTarget.Yes)], spBind, innerRange) + let consumeExpr = SynExpr.MatchLambda(false, consumePat.Range, [SynMatchClause(consumePat, None, None, innerExpr, innerRange, DebugPointAtTarget.Yes)], DebugPointAtBinding.NoneAtInvisible, innerRange) translatedCtxt (mkSynCall bindName bindRange (bindArgs @ [consumeExpr])) match customOpInfo with @@ -1530,8 +1643,9 @@ 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, DebugPointAtTarget.Yes)], spBind, innerRange) - translatedCtxt (mkSynCall bindName bindRange (bindArgs @ [consumeExpr]))) + let consumeExpr = SynExpr.MatchLambda(false, consumePat.Range, [SynMatchClause(consumePat, None, None, holeFill, innerRange, DebugPointAtTarget.Yes)], DebugPointAtBinding.NoneAtInvisible, innerRange) + let bindCall = mkSynCall bindName bindRange (bindArgs @ [consumeExpr]) + translatedCtxt (bindCall |> addBindDebugPoint)) and convertSimpleReturnToExpr varSpace innerComp = match innerComp with @@ -1648,6 +1762,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter | _ -> env let lambdaExpr, tpenv= TcExpr cenv (MustEqual (builderTy --> overallTy)) env tpenv lambdaExpr + // beta-var-reduce to bind the builder using a 'let' binding let coreExpr = mkApps cenv.g ((lambdaExpr, tyOfExpr cenv.g lambdaExpr), [], [interpExpr], mBuilderVal) @@ -1696,7 +1811,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, DebugPointAtTarget.Yes, None), pat'.Range) ] + [TClause(pat', None, TTarget(vspecs, innerExpr, None), pat'.Range) ] let compileSeqExprMatchClauses (cenv: cenv) env inputExprMark (pat: Pattern, vspecs) innerExpr inputExprOpt bindPatTy genInnerTy = let patMark = pat.Range @@ -1724,13 +1839,13 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m = cenv.g.langVersion.SupportsFeature LanguageFeature.ImplicitYield && (YieldFree cenv comp) - let mkDelayedExpr m (coreExpr: Expr) = + let mkSeqDelayedExpr m (coreExpr: Expr) = let overallTy = tyOfExpr cenv.g coreExpr mkSeqDelay cenv env m overallTy coreExpr let rec tryTcSequenceExprBody env genOuterTy tpenv comp = match comp with - | SynExpr.ForEach (spFor, SeqExprOnly _seqExprOnly, _isFromSource, pat, pseudoEnumExpr, innerComp, m) -> + | SynExpr.ForEach (spFor, spIn, SeqExprOnly _seqExprOnly, _isFromSource, pat, pseudoEnumExpr, innerComp, _m) -> let pseudoEnumExpr = match RewriteRangeExpr pseudoEnumExpr with | Some e -> e @@ -1738,73 +1853,82 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m = // This expression is not checked with the knowledge it is an IEnumerable, since we permit other enumerable types with GetEnumerator/MoveNext methods, as does C# let pseudoEnumExpr, arbitraryTy, tpenv = TcExprOfUnknownType cenv env tpenv pseudoEnumExpr let enumExpr, enumElemTy = ConvertArbitraryExprToEnumerable cenv arbitraryTy env pseudoEnumExpr - let pat', _, (vspecs: Val list), envinner, tpenv = TcMatchPattern cenv enumElemTy env tpenv (pat, None) - let innerExpr, tpenv = tcSequenceExprBody envinner genOuterTy tpenv innerComp + let patR, _, vspecs, envinner, tpenv = TcMatchPattern cenv enumElemTy env tpenv (pat, None) + let innerExpr, tpenv = + let envinner = { envinner with eIsControlFlow = true } + tcSequenceExprBody envinner genOuterTy tpenv innerComp - let enumExprMark = enumExpr.Range + let enumExprRange = enumExpr.Range + + // We attach the debug point to the lambda expression so we can fetch it out again in LowerComputedListOrArraySeqExpr + let mFor = match spFor with DebugPointAtFor.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.For) | _ -> enumExprRange + // We attach the debug point to the lambda expression so we can fetch it out again in LowerComputedListOrArraySeqExpr - let mFor = - match spFor with - | DebugPointAtFor.Yes m -> m.NoteDebugPoint(RangeDebugPointKind.For) - | _ -> enumExprMark + let mIn = match spIn with DebugPointAtInOrTo.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.InOrTo) | _ -> pat.Range - match pat', vspecs, innerExpr with - // peephole optimization: "for x in e1 -> e2" == "e1 |> List.map (fun x -> e2)" *) + match patR, vspecs, innerExpr with + // Legacy peephole optimization: + // "seq { .. for x in e1 -> e2 .. }" == "e1 |> Seq.map (fun x -> e2)" + // "seq { .. for x in e1 do yield e2 .. }" == "e1 |> Seq.map (fun x -> e2)" + // + // This transformation is visible in quotations and thus needs to remain. | (TPat_as (TPat_wild _, PBind (v, _), _), vs, - Expr.App (Expr.Val (vf, _, _), _, [genEnumElemTy], [yexpr], _)) + Expr.App (Expr.Val (vf, _, _), _, [genEnumElemTy], [yieldExpr], _mYield)) when vs.Length = 1 && valRefEq cenv.g vf cenv.g.seq_singleton_vref -> - - let lam = mkLambda mFor v (yexpr, genEnumElemTy) - // SEQUENCE POINTS: need to build a let here consuming spBind + // The debug point mFor is attached to the 'map' + // The debug point mIn is attached to the lambda + // Note: the 'yield' part of the debug point for 'yield expr' is currently lost in debug points. + let lam = mkLambda mIn v (yieldExpr, genEnumElemTy) let enumExpr = mkCoerceIfNeeded cenv.g (mkSeqTy cenv.g enumElemTy) (tyOfExpr cenv.g enumExpr) enumExpr - Some(mkCallSeqMap cenv.g m enumElemTy genEnumElemTy lam enumExpr, tpenv) + Some(mkCallSeqMap cenv.g mFor enumElemTy genEnumElemTy lam enumExpr, tpenv) | _ -> - let enumExprMark = enumExpr.Range - - // SEQUENCE POINTS: need to build a let here consuming spBind + // The debug point mFor is attached to the 'collect' + // The debug point mIn is attached to the lambda + let matchv, matchExpr = compileSeqExprMatchClauses cenv env enumExprRange (patR, vspecs) innerExpr None enumElemTy genOuterTy + let lam = mkLambda mIn matchv (matchExpr, tyOfExpr cenv.g matchExpr) + Some(mkSeqCollect cenv env mFor enumElemTy genOuterTy lam enumExpr, tpenv) - let matchv, matchExpr = compileSeqExprMatchClauses cenv env enumExprMark (pat', vspecs) innerExpr None enumElemTy genOuterTy - let lam = mkLambda mFor matchv (matchExpr, tyOfExpr cenv.g matchExpr) - Some(mkSeqCollect cenv env m enumElemTy genOuterTy lam enumExpr, tpenv) - - | SynExpr.For (forDebugPoint=spBind; ident=id; identBody=start; direction=dir; toBody=finish; doBody=innerComp; range=m) -> - Some(tcSequenceExprBody env genOuterTy tpenv (elimFastIntegerForLoop (spBind, id, start, dir, finish, innerComp, m))) + | SynExpr.For (forDebugPoint=spFor; toDebugPoint=spTo; ident=id; identBody=start; direction=dir; toBody=finish; doBody=innerComp; range=m) -> + Some(tcSequenceExprBody env genOuterTy tpenv (elimFastIntegerForLoop (spFor, spTo, id, start, dir, finish, innerComp, m))) | SynExpr.While (spWhile, guardExpr, innerComp, _m) -> - let guardExpr, tpenv = TcExpr cenv (MustEqual cenv.g.bool_ty) env tpenv guardExpr - let innerExpr, tpenv = tcSequenceExprBody env genOuterTy tpenv innerComp + let guardExpr, tpenv = + let env = { env with eIsControlFlow = false } + TcExpr cenv (MustEqual cenv.g.bool_ty) env tpenv guardExpr + + let innerExpr, tpenv = + let env = { env with eIsControlFlow = true } + tcSequenceExprBody env genOuterTy tpenv innerComp let guardExprMark = guardExpr.Range - let guardExpr = mkUnitDelayLambda cenv.g guardExprMark guardExpr + let guardLambdaExpr = mkUnitDelayLambda cenv.g guardExprMark guardExpr // We attach the debug point to the lambda expression so we can fetch it out again in LowerComputedListOrArraySeqExpr - let mWhile = - match spWhile with - | DebugPointAtWhile.Yes m -> m.NoteDebugPoint(RangeDebugPointKind.While) - | _ -> guardExprMark + let mWhile = match spWhile with DebugPointAtWhile.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.While) | _ -> guardExprMark - let innerExpr = mkDelayedExpr mWhile innerExpr - Some(mkSeqGenerated cenv env guardExprMark genOuterTy guardExpr innerExpr, tpenv) + let innerDelayedExpr = mkSeqDelayedExpr mWhile innerExpr + Some(mkSeqGenerated cenv env guardExprMark genOuterTy guardLambdaExpr innerDelayedExpr, tpenv) | SynExpr.TryFinally (innerComp, unwindExpr, mTryToLast, spTry, spFinally) -> + let env = { env with eIsControlFlow = true } let innerExpr, tpenv = tcSequenceExprBody env genOuterTy tpenv innerComp let unwindExpr, tpenv = TcExpr cenv (MustEqual cenv.g.unit_ty) env tpenv unwindExpr // We attach the debug points to the lambda expressions so we can fetch it out again in LowerComputedListOrArraySeqExpr let mTry = match spTry with - | DebugPointAtTry.Yes m -> m.NoteDebugPoint(RangeDebugPointKind.Try) + | DebugPointAtTry.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.Try) | _ -> unwindExpr.Range let mFinally = match spFinally with - | DebugPointAtFinally.Yes m -> m.NoteDebugPoint(RangeDebugPointKind.Finally) + | DebugPointAtFinally.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.Finally) | _ -> unwindExpr.Range - let innerExpr = mkDelayedExpr mTry innerExpr + let innerExpr = mkSeqDelayedExpr mTry innerExpr let unwindExpr = mkUnitDelayLambda cenv.g mFinally unwindExpr Some(mkSeqFinally cenv env mTryToLast genOuterTy innerExpr unwindExpr, tpenv) @@ -1821,22 +1945,25 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m = | SynExpr.Sequential (sp, true, innerComp1, innerComp2, m) -> // "expr; cexpr" is treated as sequential execution // "cexpr; cexpr" is treated as append - let res, tpenv = tcSequenceExprBodyAsSequenceOrStatement env genOuterTy tpenv innerComp1 + let env1 = { env with eIsControlFlow = (match sp with DebugPointAtSequential.SuppressNeither | DebugPointAtSequential.SuppressExpr -> true | _ -> false) } + let res, tpenv = tcSequenceExprBodyAsSequenceOrStatement env1 genOuterTy tpenv innerComp1 + let env2 = { env with eIsControlFlow = (match sp with DebugPointAtSequential.SuppressNeither | DebugPointAtSequential.SuppressStmt -> true | _ -> false) } match res with | Choice1Of2 innerExpr1 -> - let innerExpr2, tpenv = tcSequenceExprBody env genOuterTy tpenv innerComp2 - let innerExpr2 = mkDelayedExpr innerExpr2.Range innerExpr2 + let innerExpr2, tpenv = tcSequenceExprBody env2 genOuterTy tpenv innerComp2 + let innerExpr2 = mkSeqDelayedExpr innerExpr2.Range innerExpr2 Some(mkSeqAppend cenv env innerComp1.Range genOuterTy innerExpr1 innerExpr2, tpenv) | Choice2Of2 stmt1 -> - let innerExpr2, tpenv = tcSequenceExprBody env genOuterTy tpenv innerComp2 - Some(Expr.Sequential(stmt1, innerExpr2, NormalSeq, sp, m), tpenv) + let innerExpr2, tpenv = tcSequenceExprBody env2 genOuterTy tpenv innerComp2 + Some(Expr.Sequential(stmt1, innerExpr2, NormalSeq, m), tpenv) | SynExpr.IfThenElse (_, _, guardExpr, _, thenComp, _, elseCompOpt, spIfToThen, _isRecovery, mIfToThen, mIfToEndOfElseBranch) -> let guardExpr', tpenv = TcExpr cenv (MustEqual cenv.g.bool_ty) env tpenv guardExpr + let env = { env with eIsControlFlow = true } 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 DebugPointAtTarget.Yes mIfToEndOfElseBranch genOuterTy guardExpr' thenExpr elseExpr, tpenv) + Some(mkCond spIfToThen mIfToEndOfElseBranch genOuterTy guardExpr' thenExpr elseExpr, tpenv) // 'let x = expr in expr' | SynExpr.LetOrUse (_, false (* not a 'use' binding *), _, _, _) -> @@ -1855,16 +1982,20 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m = let inputExprTy = NewInferenceType () let pat', _, vspecs, envinner, tpenv = TcMatchPattern cenv bindPatTy env tpenv (pat, None) UnifyTypes cenv env m inputExprTy bindPatTy - let inputExpr, tpenv = TcExpr cenv (MustEqual inputExprTy) env tpenv rhsExpr - let innerExpr, tpenv = tcSequenceExprBody envinner genOuterTy tpenv innerComp + let inputExpr, tpenv = + let env = { env with eIsControlFlow = true } + TcExpr cenv (MustEqual inputExprTy) env tpenv rhsExpr + let innerExpr, tpenv = + let envinner = { envinner with eIsControlFlow = true } + tcSequenceExprBody envinner genOuterTy tpenv innerComp let mBind = match spBind with - | DebugPointAtBinding.Yes m -> m.NoteDebugPoint(RangeDebugPointKind.Binding) + | DebugPointAtBinding.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.Binding) | _ -> inputExpr.Range let inputExprMark = inputExpr.Range - let matchv, matchExpr = compileSeqExprMatchClauses cenv env inputExprMark (pat', vspecs) innerExpr (Some inputExpr) bindPatTy genOuterTy + let matchv, matchExpr = compileSeqExprMatchClauses cenv envinner inputExprMark (pat', vspecs) innerExpr (Some inputExpr) bindPatTy genOuterTy let consumeExpr = mkLambda mBind matchv (matchExpr, genOuterTy) - //SEQPOINT NEEDED - we must consume spBind on this path + // The 'mBind' is attached to the lambda Some(mkSeqUsing cenv env wholeExprMark bindPatTy genOuterTy inputExpr consumeExpr, tpenv) | SynExpr.LetOrUseBang (range=m) -> @@ -1875,8 +2006,9 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m = let tclauses, tpenv = (tpenv, clauses) ||> List.mapFold (fun tpenv (SynMatchClause(pat, cond, _, innerComp, _, sp)) -> let pat', cond', vspecs, envinner, tpenv = TcMatchPattern cenv matchty env tpenv (pat, cond) + let envinner = match sp with DebugPointAtTarget.Yes -> { envinner with eIsControlFlow = true } | DebugPointAtTarget.No -> envinner let innerExpr, tpenv = tcSequenceExprBody envinner genOuterTy tpenv innerComp - TClause(pat', cond', TTarget(vspecs, innerExpr, sp, None), pat'.Range), tpenv) + TClause(pat', cond', TTarget(vspecs, innerExpr, None), pat'.Range), tpenv) let inputExprTy = tyOfExpr cenv.g inputExpr let inputExprMark = inputExpr.Range let matchv, matchExpr = CompilePatternForMatchClauses cenv env inputExprMark inputExprMark true ThrowIncompleteMatchException (Some inputExpr) inputExprTy genOuterTy tclauses @@ -1886,6 +2018,7 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m = error(Error(FSComp.SR.tcTryIllegalInSequenceExpression(), mTryToWith)) | SynExpr.YieldOrReturnFrom ((isYield, _), yieldExpr, m) -> + let env = { env with eIsControlFlow = true } let resultExpr, genExprTy, tpenv = TcExprOfUnknownType cenv env tpenv yieldExpr if not isYield then errorR(Error(FSComp.SR.tcUseYieldBangForMultipleResults(), m)) @@ -1894,6 +2027,7 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m = Some(mkCoerceExpr(resultExpr, genOuterTy, m, genExprTy), tpenv) | SynExpr.YieldOrReturn ((isYield, _), yieldExpr, m) -> + let env = { env with eIsControlFlow = true } let genResultTy = NewInferenceType () if not isYield then errorR(Error(FSComp.SR.tcSeqResultsUseYield(), m)) UnifyTypes cenv env m genOuterTy (mkSeqTy cenv.g genResultTy) @@ -1910,7 +2044,7 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m = expr, tpenv | Choice2Of2 stmt -> let m = comp.Range - let resExpr = Expr.Sequential(stmt, mkSeqEmpty cenv env m genOuterTy, NormalSeq, DebugPointAtSequential.SuppressExpr, m) + let resExpr = Expr.Sequential(stmt, mkSeqEmpty cenv env m genOuterTy, NormalSeq, m) resExpr, tpenv and tcSequenceExprBodyAsSequenceOrStatement env genOuterTy tpenv comp = @@ -1934,7 +2068,7 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m = Choice2Of2 stmt, tpenv let coreExpr, tpenv = tcSequenceExprBody env overallTy.Commit tpenv comp - let delayedExpr = mkDelayedExpr coreExpr.Range coreExpr + let delayedExpr = mkSeqDelayedExpr coreExpr.Range coreExpr delayedExpr, tpenv let TcSequenceExpressionEntry (cenv: cenv) env (overallTy: OverallTy) tpenv (hasBuilder, comp) m = diff --git a/src/fsharp/CheckDeclarations.fs b/src/fsharp/CheckDeclarations.fs index b89976d0a97..2114104c6bf 100644 --- a/src/fsharp/CheckDeclarations.fs +++ b/src/fsharp/CheckDeclarations.fs @@ -1143,6 +1143,7 @@ module IncrClassChecking = Some (localRep.MakeValueGetAddress readonly thisValOpt thisTyInst safeStaticInitInfo v m) | _ -> None + RewriteExpr { PreIntercept = Some FixupExprNode PostTransform = (fun _ -> None) PreInterceptBinding = None @@ -1315,7 +1316,7 @@ module IncrClassChecking = (isPriorToSuperInit, (fun e -> let e = match adjustSafeInitFieldExprOpt with None -> e | Some ae -> mkCompGenSequential m ae e - mkSequential DebugPointAtSequential.SuppressNeither m assignExpr e)), [] + mkSequential m assignExpr e)), [] /// Work out the implicit construction side effects of a 'let', 'let rec' or 'do' /// binding in the implicit class construction sequence @@ -1343,7 +1344,7 @@ module IncrClassChecking = | IncrClassDo (doExpr, isStatic) -> let doExpr = reps.FixupIncrClassExprPhase2C cenv (Some thisVal) safeStaticInitInfo thisTyInst doExpr - let binder = (fun e -> mkSequential DebugPointAtSequential.SuppressNeither doExpr.Range doExpr e) + let binder = (fun e -> mkSequential doExpr.Range doExpr e) let isPriorToSuperInit = false if isStatic then ([(isPriorToSuperInit, binder)], [], []), reps @@ -1363,7 +1364,7 @@ module IncrClassChecking = | Some v -> let setExpr = mkRefCellSet g m ctorInfo.InstanceCtorThisVal.Type (exprForVal m v) (exprForVal m ctorInfo.InstanceCtorThisVal) let setExpr = reps.FixupIncrClassExprPhase2C cenv (Some thisVal) safeStaticInitInfo thisTyInst setExpr - let binder = (fun e -> mkSequential DebugPointAtSequential.SuppressNeither setExpr.Range setExpr e) + let binder = (fun e -> mkSequential setExpr.Range setExpr e) let isPriorToSuperInit = false yield (isPriorToSuperInit, binder) ] @@ -1377,7 +1378,7 @@ module IncrClassChecking = | SafeInitField (rfref, _) -> let setExpr = mkRecdFieldSetViaExprAddr (exprForVal m thisVal, rfref, thisTyInst, mkOne g m, m) let setExpr = reps.FixupIncrClassExprPhase2C cenv (Some thisVal) safeStaticInitInfo thisTyInst setExpr - let binder = (fun e -> mkSequential DebugPointAtSequential.SuppressNeither setExpr.Range setExpr e) + let binder = (fun e -> mkSequential setExpr.Range setExpr e) let isPriorToSuperInit = false yield (isPriorToSuperInit, binder) | NoSafeInitInfo -> @@ -1464,8 +1465,14 @@ module IncrClassChecking = | _ -> inheritsExpr - let spAtSuperInit = (if inheritsIsVisible then DebugPointAtSequential.SuppressNeither else DebugPointAtSequential.SuppressStmt) - mkSequential spAtSuperInit m inheritsExpr ctorBody + // Add the debug point + let inheritsExpr = + if inheritsIsVisible then + Expr.DebugPoint(DebugPointAtLeafExpr.Yes inheritsExpr.Range, inheritsExpr) + else + inheritsExpr + + mkSequential m inheritsExpr ctorBody // Add the normal let ctorBody = List.foldBack (fun (_, binder) acc -> binder acc) ctorInitActionsPre ctorBody @@ -1872,7 +1879,7 @@ module MutRecBindingChecking = // Type check local recursive binding let binds = binds |> List.map (fun bind -> RecDefnBindingInfo(ExprContainerInfo, NoNewSlots, ClassLetBinding isStatic, bind)) - let binds, env, tpenv = TcLetrec ErrorOnOverrides cenv envForBinding tpenv (binds, scopem(*bindsm*), scopem) + let binds, env, tpenv = TcLetrecBindings ErrorOnOverrides cenv envForBinding tpenv (binds, scopem(*bindsm*), scopem) let bindRs = [IncrClassBindingGroup(binds, isStatic, true)] binds, bindRs, env, tpenv else @@ -5365,7 +5372,7 @@ let rec TcModuleOrNamespaceElementNonMutRec (cenv: cenv) parent typeNames scopem if letrec then let scopem = unionRanges m scopem let binds = binds |> List.map (fun bind -> RecDefnBindingInfo(containerInfo, NoNewSlots, ModuleOrMemberBinding, bind)) - let binds, env, _ = TcLetrec WarnOnOverrides cenv env tpenv (binds, m, scopem) + let binds, env, _ = TcLetrecBindings WarnOnOverrides cenv env tpenv (binds, m, scopem) return ((fun e -> TMDefRec(true, [], [], binds |> List.map ModuleOrNamespaceBinding.Binding, m) :: e), []), env, env else let binds, env, _ = TcLetBindings cenv env containerInfo ModuleOrMemberBinding tpenv (binds, m, scopem) @@ -5709,7 +5716,8 @@ let emptyTcEnv g = eFamilyType = None eCtorInfo = None eCallerMemberName = None - eLambdaArgInfos = [] } + eLambdaArgInfos = [] + eIsControlFlow = false } let CreateInitialTcEnv(g, amap, scopem, assemblyName, ccus) = (emptyTcEnv g, ccus) ||> List.collectFold (fun env (ccu, autoOpens, internalsVisible) -> @@ -5959,7 +5967,8 @@ let TypeCheckOneImplFile | _ -> () | _ -> ()) - let implFile = TImplFile (qualNameOfFile, scopedPragmas, implFileExprAfterSig, hasExplicitEntryPoint, isScript, anonRecdTypes) + let namedDebugPointsForInlinedCode = cenv.namedDebugPointsForInlinedCode |> Seq.toArray |> Array.map (fun (KeyValue(k,v)) -> (k,v)) |> Map + let implFile = TImplFile (qualNameOfFile, scopedPragmas, implFileExprAfterSig, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode) return (topAttrs, implFile, implFileTypePriorToSig, envAtEnd, cenv.createsGeneratedProvidedTypes) } diff --git a/src/fsharp/CheckExpressions.fs b/src/fsharp/CheckExpressions.fs index 5c66fd46a4e..1d87dbee1f5 100644 --- a/src/fsharp/CheckExpressions.fs +++ b/src/fsharp/CheckExpressions.fs @@ -222,6 +222,9 @@ type TcEnv = // Active arg infos in iterated lambdas , allowing us to determine the attributes of arguments eLambdaArgInfos: ArgReprInfo list list + + // Do we lay down an implicit debug point? + eIsControlFlow: bool } member tenv.DisplayEnv = tenv.eNameResEnv.DisplayEnv @@ -409,6 +412,8 @@ type TcFileState = /// The set of active conditional defines. The value is None when conditional erasure is disabled in tooling. conditionalDefines: string list option + namedDebugPointsForInlinedCode: Dictionary + isInternalTestSpanStackReferring: bool // forward call TcSequenceExpressionEntry: TcFileState -> TcEnv -> OverallTy -> UnscopedTyparEnv -> bool * SynExpr -> range -> Expr * UnscopedTyparEnv @@ -442,6 +447,7 @@ type TcFileState = synArgNameGenerator = SynArgNameGenerator() isSig = isSig haveSig = haveSig + namedDebugPointsForInlinedCode = Dictionary() compilingCanonicalFslibModuleType = (isSig || not haveSig) && g.compilingFslib conditionalDefines = conditionalDefines isInternalTestSpanStackReferring = isInternalTestSpanStackReferring @@ -696,9 +702,9 @@ let UnifyFunctionType extraInfo cenv denv mFunExpr ty = let ReportImplicitlyIgnoredBoolExpression denv m ty expr = let checkExpr m expr = - match expr with + match stripDebugPoints expr with | Expr.App (Expr.Val (vf, _, _), _, _, exprs, _) when vf.LogicalName = opNameEquals -> - match exprs with + match List.map stripDebugPoints exprs with | Expr.App (Expr.Val (propRef, _, _), _, _, Expr.Val (vf, _, _) :: _, _) :: _ -> if propRef.IsPropertyGetterMethod then let propertyName = propRef.PropertyName @@ -722,12 +728,12 @@ let ReportImplicitlyIgnoredBoolExpression denv m ty expr = | _ -> UnitTypeExpectedWithEquality (denv, ty, m) | _ -> UnitTypeExpected (denv, ty, m) - match expr with - | Expr.Let (_, Expr.Sequential (_, inner, _, _, _), _, _) - | Expr.Sequential (_, inner, _, _, _) -> + match stripDebugPoints expr with + | Expr.Let (_, DebugPoints(Expr.Sequential (_, inner, _, _), _), _, _) + | Expr.Sequential (_, inner, _, _) -> let rec extractNext expr = - match expr with - | Expr.Sequential (_, inner, _, _, _) -> extractNext inner + match stripDebugPoints expr with + | Expr.Sequential (_, inner, _, _) -> extractNext inner | _ -> checkExpr expr.Range expr extractNext inner | expr -> checkExpr m expr @@ -1033,7 +1039,7 @@ let noArgOrRetAttribs = ArgAndRetAttribs ([], []) /// A flag to represent the sort of bindings are we processing. /// Processing "declaration" and "class" bindings that make up a module (such as "let x = 1 let y = 2") -/// shares the same code paths (e.g. TcLetBinding and TcLetrec) as processing expression bindings (such as "let x = 1 in ...") +/// shares the same code paths (e.g. TcLetBinding and TcLetrecBindings) as processing expression bindings (such as "let x = 1 in ...") /// Member bindings also use this path. // // However there are differences in how different bindings get processed, @@ -1534,7 +1540,7 @@ let AdjustAndForgetUsesOfRecValue cenv (vrefTgt: ValRef) (valScheme: ValScheme) // Keep any values for explicit type arguments let fixedUpExpr = let vrefFlags, tyargs0 = - match fixupPoint.Value with + match stripDebugPoints fixupPoint.Value with | Expr.App (Expr.Val (_, vrefFlags, _), _, tyargs0, [], _) -> vrefFlags, tyargs0 | Expr.Val (_, vrefFlags, _) -> vrefFlags, [] | _ -> @@ -2092,6 +2098,7 @@ module GeneralizationHelpers = | Expr.TyChoose (_, b, _) -> IsGeneralizableValue g b | Expr.Obj (_, ty, _, _, _, _, _) -> isInterfaceTy g ty || isDelegateTy g ty | Expr.Link eref -> IsGeneralizableValue g eref.Value + | Expr.DebugPoint (_, innerExpr) -> IsGeneralizableValue g innerExpr | _ -> false @@ -2467,7 +2474,7 @@ module BindingNormalization = NormalizeStaticMemberBinding cenv memberFlags valSynData memberId vis typars args m rhsExpr | _ -> NormalizedBindingPat(pat, rhsExpr, valSynData, typars) - // Object constructors are normalized in TcLetrec + // Object constructors are normalized in TcLetrecBindings // Here we are normalizing member definitions with simple (not long) ids, // e.g. "static member x = 3" and "member x = 3" (instance with missing "this." comes through here. It is trapped and generates a warning) | SynPat.Named(id, false, vis, m) @@ -3043,7 +3050,7 @@ let BuildILFieldGet g amap m objExpr (finfo: ILFieldInfo) = /// Checks that setting a field value does not set a literal or initonly field let private CheckFieldLiteralArg (finfo: ILFieldInfo) argExpr m = finfo.LiteralValue |> Option.iter (fun _ -> - match argExpr with + match stripDebugPoints argExpr with | Expr.Const (v, _, _) -> let literalValue = string v error (Error(FSComp.SR.tcLiteralFieldAssignmentWithArg literalValue, m)) @@ -3145,9 +3152,9 @@ let CompilePatternForMatchClauses cenv env mExpr matchm warnOnUnused actionOnFai // Avoid creating a dummy in the common cases where we are about to bind a name for the expression // CLEANUP: avoid code duplication with code further below, i.e.all callers should call CompilePatternForMatch match tclauses with - | [TClause(TPat_as (pat1, PBind (asVal, TypeScheme(generalizedTypars, _)), _), None, TTarget(vs, e, spTarget, _), m2)] -> + | [TClause(TPat_as (pat1, PBind (asVal, TypeScheme(generalizedTypars, _)), _), None, TTarget(vs, e, _), m2)] -> let vs2 = ListSet.remove valEq asVal vs - let expr = CompilePatternForMatch cenv env mExpr matchm warnOnUnused actionOnFailure (asVal, generalizedTypars, None) [TClause(pat1, None, TTarget(vs2, e, spTarget, None), m2)] inputTy resultTy + let expr = CompilePatternForMatch cenv env mExpr matchm warnOnUnused actionOnFailure (asVal, generalizedTypars, None) [TClause(pat1, None, TTarget(vs2, e, None), m2)] inputTy resultTy asVal, expr | _ -> let matchValueTmp, _ = mkCompGenLocal mExpr "matchValue" inputTy @@ -3375,7 +3382,7 @@ let EliminateInitializationGraphs let mutable definiteDependencies = [] let rec stripChooseAndExpr e = - match stripExpr e with + match stripDebugPoints (stripExpr e) with | Expr.TyChoose (_, b, _) -> stripChooseAndExpr b | e -> e @@ -3441,13 +3448,14 @@ let EliminateInitializationGraphs CheckExpr (strict st) e1 List.iter (CheckExpr (strict st)) args // Binary expressions - | Expr.Sequential (e1, e2, _, _, _) + | Expr.Sequential (e1, e2, _, _) | Expr.StaticOptimization (_, e1, e2, _) -> CheckExpr (strict st) e1; CheckExpr (strict st) e2 // n-ary expressions | Expr.Op (op, _, args, m) -> CheckExprOp st op m; List.iter (CheckExpr (strict st)) args // misc | Expr.Link eref -> CheckExpr st eref.Value + | Expr.DebugPoint (_, e2) -> CheckExpr st e2 | Expr.TyChoose (_, b, _) -> CheckExpr st b | Expr.Quote _ -> () | Expr.WitnessArg (_witnessInfo, _m) -> () @@ -3459,7 +3467,7 @@ let EliminateInitializationGraphs | TDSuccess (es, _) -> es |> List.iter (CheckExpr st) | TDBind(bind, e) -> CheckBinding st bind; CheckDecisionTree st e - and CheckDecisionTreeTarget st (TTarget(_, e, _, _)) = CheckExpr st e + and CheckDecisionTreeTarget st (TTarget(_, e, _)) = CheckExpr st e and CheckExprOp st op m = match op with @@ -3578,7 +3586,7 @@ let CheckAndRewriteObjectCtor g env (ctorLambdaExpr: Expr) = let ty = tyOfExpr g recdExpr let thisExpr = mkGetArg0 m ty let setExpr = mkRefCellSet g m ty (exprForValRef m (mkLocalValRef safeInitVal)) thisExpr - Expr.Sequential (recdExpr, setExpr, ThenDoSeq, DebugPointAtSequential.SuppressStmt, m) + Expr.Sequential (recdExpr, setExpr, ThenDoSeq, m) let recdExpr = match ctorInfo.safeInitInfo with | NoSafeInitInfo -> recdExpr @@ -3587,7 +3595,7 @@ let CheckAndRewriteObjectCtor g env (ctorLambdaExpr: Expr) = let thisExpr = mkGetArg0 m thisTy let thisTyInst = argsOfAppTy g thisTy let setExpr = mkRecdFieldSetViaExprAddr (thisExpr, rfref, thisTyInst, mkOne g m, m) - Expr.Sequential (recdExpr, setExpr, ThenDoSeq, DebugPointAtSequential.SuppressStmt, m) + Expr.Sequential (recdExpr, setExpr, ThenDoSeq, m) recdExpr @@ -3598,21 +3606,24 @@ let CheckAndRewriteObjectCtor g env (ctorLambdaExpr: Expr) = | Expr.Op (TOp.Recd (RecdExprIsObjInit, _), _, _, _) -> rewriteConstruction expr // = "a; " - | Expr.Sequential (a, body, NormalSeq, spSeq, b) -> Expr.Sequential (a, checkAndRewrite body, NormalSeq, spSeq, b) + | Expr.Sequential (a, body, NormalSeq, b) -> + Expr.Sequential (a, checkAndRewrite body, NormalSeq, b) // = " then " - | Expr.Sequential (body, a, ThenDoSeq, spSeq, b) -> Expr.Sequential (checkAndRewrite body, a, ThenDoSeq, spSeq, b) + | Expr.Sequential (body, a, ThenDoSeq, b) -> + Expr.Sequential (checkAndRewrite body, a, ThenDoSeq, b) // = "let pat = expr in " | Expr.Let (bind, body, m, _) -> mkLetBind m bind (checkAndRewrite body) // The constructor is a sequence "let pat = expr in " | Expr.Match (spBind, a, b, targets, c, d) -> - let targets = targets |> Array.map (fun (TTarget(vs, body, spTarget, flags)) -> TTarget(vs, checkAndRewrite body, spTarget, flags)) + let targets = targets |> Array.map (fun (TTarget(vs, body, flags)) -> TTarget(vs, checkAndRewrite body, flags)) Expr.Match (spBind, a, b, targets, c, d) // = "let rec binds in " - | Expr.LetRec (a, body, _, _) -> Expr.LetRec (a, checkAndRewrite body, m, Construct.NewFreeVarsCache()) + | Expr.LetRec (a, body, _, _) -> + Expr.LetRec (a, checkAndRewrite body, m, Construct.NewFreeVarsCache()) // = "new C(...)" | Expr.App (f, b, c, d, m) -> @@ -3621,25 +3632,28 @@ let CheckAndRewriteObjectCtor g env (ctorLambdaExpr: Expr) = let expr = Expr.App (f, b, c, d, m) rewriteConstruction expr + | Expr.DebugPoint (dp, innerExpr) -> + Expr.DebugPoint (dp, checkAndRewrite innerExpr) + | _ -> error expr and checkAndRewriteCtorUsage expr = - match expr with - | Expr.Link eref -> - let e = checkAndRewriteCtorUsage eref.Value - eref.Value <- e - expr - - // Type applications are ok, e.g. - // type C<'a>(x: int) = - // new() = C<'a>(3) - | Expr.App (f, fty, tyargs, [], m) -> - let f = checkAndRewriteCtorUsage f - Expr.App (f, fty, tyargs, [], m) - - // Self-calls are OK and get rewritten. - | Expr.Val (vref, NormalValUse, a) -> + match expr with + | Expr.Link eref -> + let e = checkAndRewriteCtorUsage eref.Value + eref.Value <- e + expr + + // Type applications are ok, e.g. + // type C<'a>(x: int) = + // new() = C<'a>(3) + | Expr.App (f, fty, tyargs, [], m) -> + let f = checkAndRewriteCtorUsage f + Expr.App (f, fty, tyargs, [], m) + + // Self-calls are OK and get rewritten. + | Expr.Val (vref, NormalValUse, a) -> let isCtor = match vref.MemberInfo with | None -> false @@ -3649,6 +3663,10 @@ let CheckAndRewriteObjectCtor g env (ctorLambdaExpr: Expr) = error expr else Expr.Val (vref, CtorValUsedAsSelfInit, a) + + | Expr.DebugPoint (dp, innerExpr) -> + Expr.DebugPoint (dp, checkAndRewriteCtorUsage innerExpr) + | _ -> error expr @@ -3844,7 +3862,7 @@ type RecDefnBindingInfo = declKind: DeclKind * synBinding: SynBinding -/// RecursiveBindingInfo - flows through initial steps of TcLetrec +/// RecursiveBindingInfo - flows through initial steps of TcLetrecBindings type RecursiveBindingInfo = | RecursiveBindingInfo of recBindIndex: int * // index of the binding in the recursive group @@ -3901,7 +3919,7 @@ let GetInstanceMemberThisVariable (vspec: Val, expr) = // Skip over LAM tps. Choose 'a. if vspec.IsInstanceMember then let rec firstArg e = - match e with + match stripDebugPoints e with | Expr.TyLambda (_, _, b, _, _) -> firstArg b | Expr.TyChoose (_, b, _) -> firstArg b | Expr.Lambda (_, _, _, [v], _, _, _) -> Some v @@ -4500,6 +4518,7 @@ and TcStaticConstantParameter cenv (env: TcEnv) tpenv kind (StripParenTypes v) i | SynConst.Bool b when typeEquiv g g.bool_ty kind -> record(g.bool_ty); box (b: bool) | _ -> fail() v, tpenv + | SynType.StaticConstantExpr(e, _ ) -> // If an error occurs, don't try to recover, since the constant expression will be nothing like what we need @@ -4508,7 +4527,7 @@ and TcStaticConstantParameter cenv (env: TcEnv) tpenv kind (StripParenTypes v) i // Evaluate the constant expression using static attribute argument rules let te = EvalLiteralExprOrAttribArg g te let v = - match stripExpr te with + match stripDebugPoints (stripExpr te) with // Check we have a residue constant. We know the type was correct because we checked the expression with this type. | Expr.Const (c, _, _) -> match c with @@ -4530,9 +4549,11 @@ and TcStaticConstantParameter cenv (env: TcEnv) tpenv kind (StripParenTypes v) i | _ -> fail() | _ -> error(Error(FSComp.SR.tcInvalidConstantExpression(), v.Range)) v, tpenv' + | SynType.LongIdent lidwd -> let m = lidwd.Range TcStaticConstantParameter cenv env tpenv kind (SynType.StaticConstantExpr(SynExpr.LongIdent (false, lidwd, None, m), m)) idOpt container + | _ -> fail() @@ -5456,6 +5477,7 @@ and TcExprThen cenv (overallTy: OverallTy) env tpenv isArg synExpr delayed = match synExpr with | LongOrSingleIdent (isOpt, longId, altNameRefCellOpt, mLongId) -> + TcNonControlFlowExpr env <| fun env -> if isOpt then errorR(Error(FSComp.SR.tcSyntaxErrorUnexpectedQMark(), mLongId)) // Check to see if pattern translation decided to use an alternative identifier. match altNameRefCellOpt with @@ -5467,6 +5489,7 @@ and TcExprThen cenv (overallTy: OverallTy) env tpenv isArg synExpr delayed = // f(x) // hpa=true // f[x] // hpa=true | SynExpr.App (hpa, isInfix, func, arg, mFuncAndArg) -> + TcNonControlFlowExpr env <| fun env -> // func (arg)[arg2] gives warning that .[ must be used. match delayed with @@ -5502,12 +5525,14 @@ and TcExprThen cenv (overallTy: OverallTy) env tpenv isArg synExpr delayed = // e1.id1.id2 // etc. | SynExpr.DotGet (e1, _, LongIdentWithDots(longId, _), _) -> + TcNonControlFlowExpr env <| fun env -> TcExprThen cenv overallTy env tpenv false e1 ((DelayedDotLookup (longId, synExpr.RangeWithoutAnyExtraDot)) :: delayed) // e1.[e2] // e1.[e21, ..., e2n] // etc. | SynExpr.DotIndexedGet (e1, IndexerArgs indexArgs, mDot, mWholeExpr) -> + TcNonControlFlowExpr env <| fun env -> if not isArg && cenv.g.langVersion.SupportsFeature LanguageFeature.IndexerNotationWithoutDot then informationalWarning(Error(FSComp.SR.tcIndexNotationDeprecated(), mDot)) TcIndexerThen cenv env overallTy mWholeExpr mDot tpenv None e1 indexArgs delayed @@ -5516,6 +5541,7 @@ and TcExprThen cenv (overallTy: OverallTy) env tpenv isArg synExpr delayed = // e1.[e21, ..., e2n] <- e3 // etc. | SynExpr.DotIndexedSet (e1, IndexerArgs indexArgs, e3, mOfLeftOfSet, mDot, mWholeExpr) -> + TcNonControlFlowExpr env <| fun env -> if cenv.g.langVersion.SupportsFeature LanguageFeature.IndexerNotationWithoutDot then warning(Error(FSComp.SR.tcIndexNotationDeprecated(), mDot)) TcIndexerThen cenv env overallTy mWholeExpr mDot tpenv (Some (e3, mOfLeftOfSet)) e1 indexArgs delayed @@ -5637,6 +5663,29 @@ and TcAdjustExprForTypeDirectedConversions cenv (overallTy: OverallTy) actualTy | _ -> expr +and TcNonControlFlowExpr (env: TcEnv) f = + if env.eIsControlFlow then + let envinner = { env with eIsControlFlow = false } + let res, tpenv = f envinner + let m = res.Range + + // If the range is associated with calls like `async.For` for computation expression syntax control-flow + // desugaring then don't emit a debug point - the debug points are placed separately in CheckComputationExpressions.fs + match m.NotedSourceConstruct with + | NotedSourceConstruct.Binding + | NotedSourceConstruct.Finally + | NotedSourceConstruct.Try + | NotedSourceConstruct.For + | NotedSourceConstruct.InOrTo + | NotedSourceConstruct.Combine + | NotedSourceConstruct.With + | NotedSourceConstruct.While -> + res, tpenv + | NotedSourceConstruct.None -> + mkDebugPoint res.Range res, tpenv + else + f env + and TcExprUndelayed cenv (overallTy: OverallTy) env tpenv (synExpr: SynExpr) = match synExpr with @@ -5656,15 +5705,18 @@ and TcExprUndelayed cenv (overallTy: OverallTy) env tpenv (synExpr: SynExpr) = | SynExpr.TypeApp _ | SynExpr.Ident _ | SynExpr.LongIdent _ | SynExpr.App _ | SynExpr.DotGet _ -> error(Error(FSComp.SR.tcExprUndelayed(), synExpr.Range)) | SynExpr.Const (SynConst.String (s, _, m), _) -> + TcNonControlFlowExpr env <| fun env -> CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy.Commit, env.AccessRights) TcConstStringExpr cenv overallTy env m tpenv s | SynExpr.InterpolatedString (parts, _, m) -> + TcNonControlFlowExpr env <| fun env -> checkLanguageFeatureError cenv.g.langVersion LanguageFeature.StringInterpolation m CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy.Commit, env.AccessRights) TcInterpolatedStringExpr cenv overallTy env m tpenv parts | SynExpr.Const (synConst, m) -> + TcNonControlFlowExpr env <| fun env -> CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy.Commit, env.AccessRights) TcConstExpr cenv overallTy env m tpenv synConst @@ -5673,8 +5725,11 @@ and TcExprUndelayed cenv (overallTy: OverallTy) env tpenv (synExpr: SynExpr) = | SynExpr.Match (_mMatch, spMatch, synInputExpr, _mWith, synClauses, _m) -> - let inputExpr, inputTy, tpenv = TcExprOfUnknownType cenv env tpenv synInputExpr + let inputExpr, inputTy, tpenv = + let env = { env with eIsControlFlow = false } + TcExprOfUnknownType cenv env tpenv synInputExpr let mInputExpr = inputExpr.Range + let env = { env with eIsControlFlow = true } let matchVal, matchExpr, tpenv = TcAndPatternCompileMatchClauses mInputExpr mInputExpr ThrowIncompleteMatchException cenv (Some inputExpr) inputTy overallTy env tpenv synClauses let overallExpr = mkLet spMatch mInputExpr matchVal inputExpr matchExpr overallExpr, tpenv @@ -5683,82 +5738,107 @@ and TcExprUndelayed cenv (overallTy: OverallTy) env tpenv (synExpr: SynExpr) = TcExprMatchLambda cenv overallTy env tpenv (isExnMatch, mArg, clauses, spMatch, m) | SynExpr.Assert (x, m) -> + TcNonControlFlowExpr env <| fun env -> TcAssertExpr cenv overallTy env m tpenv x + | SynExpr.DebugPoint (dpOpt, innerExpr) -> + match dpOpt with + | Some (dp , isExpr)-> + let env = if isExpr then { env with eIsControlFlow = false } else { env with eIsControlFlow = true } + let innerExprR, tpenv = TcExpr cenv overallTy env tpenv innerExpr + Expr.DebugPoint (dp, innerExprR), tpenv + | None -> + let env = { env with eIsControlFlow = true } + TcExpr cenv overallTy env tpenv innerExpr + | SynExpr.Fixed (_, m) -> error(Error(FSComp.SR.tcFixedNotAllowed(), m)) // e: ty | SynExpr.Typed (synBodyExpr, synType, m) -> + TcNonControlFlowExpr env <| fun env -> TcExprTypeAnnotated cenv overallTy env tpenv (synBodyExpr, synType, m) // e :? ty | SynExpr.TypeTest (synInnerExpr, tgtTy, m) -> + TcNonControlFlowExpr env <| fun env -> TcExprTypeTest cenv overallTy env tpenv (synInnerExpr, tgtTy, m) // SynExpr.AddressOf is noted in the syntax ast in order to recognize it as concrete type information // during type checking, in particular prior to resolving overloads. This helps distinguish // its use at method calls from the use of the conflicting 'ref' mechanism for passing byref parameters | SynExpr.AddressOf (byref, synInnerExpr, opm, m) -> + TcNonControlFlowExpr env <| fun env -> TcExpr cenv overallTy env tpenv (mkSynPrefixPrim opm m (if byref then "~&" else "~&&") synInnerExpr) | SynExpr.Upcast (synInnerExpr, _, m) | SynExpr.InferredUpcast (synInnerExpr, m) -> + TcNonControlFlowExpr env <| fun env -> TcExprUpcast cenv overallTy env tpenv (synExpr, synInnerExpr, m) | SynExpr.Downcast (synInnerExpr, _, m) | SynExpr.InferredDowncast (synInnerExpr, m) -> + TcNonControlFlowExpr env <| fun env -> TcExprDowncast cenv overallTy env tpenv (synExpr, synInnerExpr, m) | SynExpr.Null m -> + TcNonControlFlowExpr env <| fun env -> AddCxTypeMustSupportNull env.DisplayEnv cenv.css m NoTrace overallTy.Commit mkNull m overallTy.Commit, tpenv | SynExpr.Lazy (synInnerExpr, m) -> + TcNonControlFlowExpr env <| fun env -> TcExprLazy cenv overallTy env tpenv (synInnerExpr, m) | SynExpr.Tuple (isExplicitStruct, args, _, m) -> + TcNonControlFlowExpr env <| fun env -> TcExprTuple cenv overallTy env tpenv (isExplicitStruct, args, m) | SynExpr.AnonRecd (isStruct, optOrigExpr, unsortedFieldExprs, mWholeExpr) -> + TcNonControlFlowExpr env <| fun env -> TcPossiblyPropogatingExprLeafThenConvert (fun ty -> isAnonRecdTy cenv.g ty || isTyparTy cenv.g ty) cenv overallTy env mWholeExpr (fun overallTy -> TcAnonRecdExpr cenv overallTy env tpenv (isStruct, optOrigExpr, unsortedFieldExprs, mWholeExpr) ) | SynExpr.ArrayOrList (isArray, args, m) -> - TcExprArrayOrList cenv overallTy env tpenv (isArray, args, m) + TcNonControlFlowExpr env <| fun env -> + TcExprArrayOrList cenv overallTy env tpenv (isArray, args, m) | SynExpr.New (superInit, synObjTy, arg, mNewExpr) -> - let objTy, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.Use env tpenv synObjTy + let objTy, tpenv = TcType cenv NewTyparsOK CheckCxs ItemOccurence.Use env tpenv synObjTy - TcPropagatingExprLeafThenConvert cenv overallTy objTy env (* true *) mNewExpr (fun () -> - TcNewExpr cenv env tpenv objTy (Some synObjTy.Range) superInit arg mNewExpr - ) + TcNonControlFlowExpr env <| fun env -> + TcPropagatingExprLeafThenConvert cenv overallTy objTy env (* true *) mNewExpr (fun () -> + TcNewExpr cenv env tpenv objTy (Some synObjTy.Range) superInit arg mNewExpr + ) | SynExpr.ObjExpr (synObjTy, argopt, _mWith, binds, extraImpls, mNewExpr, m) -> - TcExprObjectExpr cenv overallTy env tpenv (synObjTy, argopt, binds, extraImpls, mNewExpr, m) + TcNonControlFlowExpr env <| fun env -> + TcExprObjectExpr cenv overallTy env tpenv (synObjTy, argopt, binds, extraImpls, mNewExpr, m) | SynExpr.Record (inherits, optOrigExpr, flds, mWholeExpr) -> - TcExprRecord cenv overallTy env tpenv (inherits, optOrigExpr, flds, mWholeExpr) + TcNonControlFlowExpr env <| fun env -> + TcExprRecord cenv overallTy env tpenv (inherits, optOrigExpr, flds, mWholeExpr) | SynExpr.While (spWhile, synGuardExpr, synBodyExpr, m) -> TcExprWhileLoop cenv overallTy env tpenv (spWhile, synGuardExpr, synBodyExpr, m) - | SynExpr.For (spBind, id, _, start, dir, finish, body, m) -> - TcExprIntegerForLoop cenv overallTy env tpenv (spBind, id, start, dir, finish, body, m) + | SynExpr.For (spFor, spTo, id, _, start, dir, finish, body, m) -> + TcExprIntegerForLoop cenv overallTy env tpenv (spFor, spTo, id, start, dir, finish, body, m) - | SynExpr.ForEach (spForLoop, SeqExprOnly seqExprOnly, isFromSource, pat, enumSynExpr, bodySynExpr, m) -> + | SynExpr.ForEach (spFor, spIn, SeqExprOnly seqExprOnly, isFromSource, pat, synEnumExpr, synBodyExpr, m) -> assert isFromSource if seqExprOnly then warning (Error(FSComp.SR.tcExpressionRequiresSequence(), m)) - let enumSynExpr = - match RewriteRangeExpr enumSynExpr with + let synEnumExpr = + match RewriteRangeExpr synEnumExpr with | Some e -> e - | None -> enumSynExpr - TcForEachExpr cenv overallTy env tpenv (pat, enumSynExpr, bodySynExpr, m, spForLoop) + | None -> synEnumExpr + TcForEachExpr cenv overallTy env tpenv (pat, synEnumExpr, synBodyExpr, m, spFor, spIn) | SynExpr.ComputationExpr (hasSeqBuilder, comp, m) -> let env = ExitFamilyRegion env cenv.TcSequenceExpressionEntry cenv env overallTy tpenv (hasSeqBuilder, comp) m | SynExpr.ArrayOrListComputed (isArray, comp, m) -> + TcNonControlFlowExpr env <| fun env -> let env = ExitFamilyRegion env CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy.Commit, env.eAccessRights) cenv.TcArrayOrListComputedExpression cenv env overallTy tpenv (isArray, comp) m @@ -5804,40 +5884,51 @@ and TcExprUndelayed cenv (overallTy: OverallTy) env tpenv (synExpr: SynExpr) = // This is for internal use in the libraries only | SynExpr.LibraryOnlyStaticOptimization (constraints, e2, e3, m) -> + TcNonControlFlowExpr env <| fun env -> TcExprStaticOptimization cenv overallTy env tpenv (constraints, e2, e3, m) // e1.longId <- e2 | SynExpr.DotSet (e1, lidwd, e2, mStmt) -> + TcNonControlFlowExpr env <| fun env -> TcExprDotSet cenv overallTy env tpenv (e1, lidwd, e2, mStmt) // e1 <- e2 | SynExpr.Set (e1, e2, mStmt) -> + TcNonControlFlowExpr env <| fun env -> TcExprThen cenv overallTy env tpenv false e1 [MakeDelayedSet(e2, mStmt)] // e1.longId(e2) <- e3, very rarely used named property setters | SynExpr.DotNamedIndexedPropertySet (e1, lidwd, e2, e3, mStmt) -> + TcNonControlFlowExpr env <| fun env -> TcExprDotNamedIndexedPropertySet cenv overallTy env tpenv (e1, lidwd, e2, e3, mStmt) | SynExpr.LongIdentSet (lidwd, e2, m) -> + TcNonControlFlowExpr env <| fun env -> TcExprLongIdentSet cenv overallTy env tpenv (lidwd, e2, m) // Type.Items(e1) <- e2 | SynExpr.NamedIndexedPropertySet (lidwd, e1, e2, mStmt) -> + TcNonControlFlowExpr env <| fun env -> TcExprNamedIndexPropertySet cenv overallTy env tpenv (lidwd, e1, e2, mStmt) | SynExpr.TraitCall (tps, memSpfn, arg, m) -> - TcExprTraitCall cenv overallTy env tpenv (tps, memSpfn, arg, m) + TcNonControlFlowExpr env <| fun env -> + TcExprTraitCall cenv overallTy env tpenv (tps, memSpfn, arg, m) | SynExpr.LibraryOnlyUnionCaseFieldGet (e1, c, n, m) -> - TcExprUnionCaseFieldGet cenv overallTy env tpenv (e1, c, n, m) + TcNonControlFlowExpr env <| fun env -> + TcExprUnionCaseFieldGet cenv overallTy env tpenv (e1, c, n, m) | SynExpr.LibraryOnlyUnionCaseFieldSet (e1, c, n, e2, m) -> + TcNonControlFlowExpr env <| fun env -> TcExprUnionCaseFieldSet cenv overallTy env tpenv (e1, c, n, e2, m) | SynExpr.LibraryOnlyILAssembly (s, tyargs, args, rtys, m) -> + TcNonControlFlowExpr env <| fun env -> TcExprILAssembly cenv overallTy env tpenv (s, tyargs, args, rtys, m) | SynExpr.Quote (oper, raw, ast, isFromQueryExpression, m) -> + TcNonControlFlowExpr env <| fun env -> CallExprHasTypeSink cenv.tcSink (m, env.NameEnv, overallTy.Commit, env.AccessRights) TcQuotationExpr cenv overallTy env tpenv (oper, raw, ast, isFromQueryExpression, m) @@ -5878,6 +5969,7 @@ and TcExprMatchLambda cenv overallTy env tpenv (isExnMatch, mArg, clauses, spMat let domainTy, resultTy = UnifyFunctionType None cenv env.DisplayEnv m overallTy.Commit let idv1, idve1 = mkCompGenLocal mArg (cenv.synArgNameGenerator.New()) domainTy let envinner = ExitFamilyRegion env + let envinner = { envinner with eIsControlFlow = true } let idv2, matchExpr, tpenv = TcAndPatternCompileMatchClauses m mArg (if isExnMatch then Throw else ThrowIncompleteMatchException) cenv None domainTy (MustConvertTo (false, resultTy)) envinner tpenv clauses let overallExpr = mkMultiLambda m [idv1] ((mkLet spMatch m idv2 idve1 matchExpr), resultTy) overallExpr, tpenv @@ -5932,7 +6024,9 @@ and TcExprDowncast cenv overallTy env tpenv (synExpr, synInnerExpr, m) = and TcExprLazy cenv overallTy env tpenv (synInnerExpr, m) = let innerTy = NewInferenceType () UnifyTypes cenv env m overallTy.Commit (mkLazyTy cenv.g innerTy) - let innerExpr, tpenv = TcExpr cenv (MustEqual innerTy) env tpenv synInnerExpr + let envinner = ExitFamilyRegion env + let envinner = { envinner with eIsControlFlow = true } + let innerExpr, tpenv = TcExpr cenv (MustEqual innerTy) envinner tpenv synInnerExpr let expr = mkLazyDelayed cenv.g m innerTy (mkUnitDelayLambda cenv.g m innerExpr) expr, tpenv @@ -6018,25 +6112,35 @@ and TcExprRecord cenv overallTy env tpenv (inherits, optOrigExpr, flds, mWholeEx and TcExprWhileLoop cenv overallTy env tpenv (spWhile, synGuardExpr, synBodyExpr, m) = UnifyTypes cenv env m overallTy.Commit cenv.g.unit_ty - let guardExpr, tpenv = TcExpr cenv (MustEqual cenv.g.bool_ty) env tpenv synGuardExpr - let bodyExpr, tpenv = TcStmt cenv env tpenv synBodyExpr + let guardExpr, tpenv = + let env = { env with eIsControlFlow = false } + TcExpr cenv (MustEqual cenv.g.bool_ty) env tpenv synGuardExpr + let bodyExpr, tpenv = + let env = { env with eIsControlFlow = true } + TcStmt cenv env tpenv synBodyExpr mkWhile cenv.g (spWhile, NoSpecialWhileLoopMarker, guardExpr, bodyExpr, m), tpenv -and TcExprIntegerForLoop cenv overallTy env tpenv (spBind, id, start, dir, finish, body, m) = +and TcExprIntegerForLoop cenv overallTy env tpenv (spFor, spTo, id, start, dir, finish, body, m) = UnifyTypes cenv env m overallTy.Commit cenv.g.unit_ty - let startExpr, tpenv = TcExpr cenv (MustEqual cenv.g.int_ty) env tpenv start - let finishExpr, tpenv = TcExpr cenv (MustEqual cenv.g.int_ty) env tpenv finish + let startExpr, tpenv = + let env = { env with eIsControlFlow = false } + TcExpr cenv (MustEqual cenv.g.int_ty) env tpenv start + let finishExpr, tpenv = + let env = { env with eIsControlFlow = false } + TcExpr cenv (MustEqual cenv.g.int_ty) env tpenv finish let idv, _ = mkLocal id.idRange id.idText cenv.g.int_ty let envinner = AddLocalVal cenv.g cenv.tcSink m idv env + let envinner = { envinner with eIsControlFlow = true } // notify name resolution sink about loop variable let item = Item.Value(mkLocalValRef idv) CallNameResolutionSink cenv.tcSink (idv.Range, env.NameEnv, item, emptyTyparInst, ItemOccurence.Binding, env.AccessRights) let bodyExpr, tpenv = TcStmt cenv envinner tpenv body - mkFastForLoop cenv.g (spBind, m, idv, startExpr, dir, finishExpr, bodyExpr), tpenv + mkFastForLoop cenv.g (spFor, spTo, m, idv, startExpr, dir, finishExpr, bodyExpr), tpenv and TcExprTryWith cenv overallTy env tpenv (synBodyExpr, _mTryToWith, synWithClauses, mWithToLast, mTryToLast, spTry, spWith) = + let env = { env with eIsControlFlow = true } let bodyExpr, tpenv = TcExpr cenv overallTy env tpenv synBodyExpr // Compile the pattern twice, once as a List.filter with all succeeding targets returning "1", and once as a proper catch block. let filterClauses = @@ -6051,6 +6155,7 @@ and TcExprTryWith cenv overallTy env tpenv (synBodyExpr, _mTryToWith, synWithCla mkTryWith cenv.g (bodyExpr, v1, filterExpr, v2, handlerExpr, mTryToLast, overallTy.Commit, spTry, spWith), tpenv and TcExprTryFinally cenv overallTy env tpenv (synBodyExpr, synFinallyExpr, mTryToLast, spTry, spFinally) = + let env = { env with eIsControlFlow = true } let bodyExpr, tpenv = TcExpr cenv overallTy env tpenv synBodyExpr let finallyExpr, tpenv = TcStmt cenv env tpenv synFinallyExpr mkTryFinally cenv.g (bodyExpr, finallyExpr, mTryToLast, overallTy.Commit, spTry, spFinally), tpenv @@ -6061,23 +6166,27 @@ and TcExprJoinIn cenv overallTy env tpenv (e1, mInToken, e2, mAll) = let _, _, tpenv = suppressErrorReporting (fun () -> TcExprOfUnknownType cenv env tpenv e2) mkDefault(mAll, overallTy.Commit), tpenv -and TcExprSequential cenv overallTy env tpenv (synExpr, sp, dir, synExpr1, synExpr2, m) = +and TcExprSequential cenv overallTy env tpenv (synExpr, _sp, dir, synExpr1, synExpr2, m) = if dir then TcLinearExprs (TcExprThatCanBeCtorBody cenv) cenv env overallTy tpenv false synExpr (fun x -> x) else // Constructors using "new (...) = then " + let env = { env with eIsControlFlow = true } let expr1, tpenv = TcExprThatCanBeCtorBody cenv overallTy env tpenv synExpr1 if (GetCtorShapeCounter env) <> 1 then errorR(Error(FSComp.SR.tcExpressionFormRequiresObjectConstructor(), m)) let expr2, tpenv = TcStmtThatCantBeCtorBody cenv env tpenv synExpr2 - Expr.Sequential (expr1, expr2, ThenDoSeq, sp, m), tpenv + Expr.Sequential (expr1, expr2, ThenDoSeq, m), tpenv and TcExprSequentialOrImplicitYield cenv overallTy env tpenv (sp, synExpr1, synExpr2, otherExpr, m) = - let isStmt, expr1, tpenv = TryTcStmt cenv env tpenv synExpr1 + let isStmt, expr1, tpenv = + let env1 = { env with eIsControlFlow = (match sp with DebugPointAtSequential.SuppressNeither | DebugPointAtSequential.SuppressExpr -> true | _ -> false) } + TryTcStmt cenv env1 tpenv synExpr1 if isStmt then - let env = ShrinkContext env m synExpr2.Range - let expr2, tpenv = TcExprThatCanBeCtorBody cenv overallTy env tpenv synExpr2 - Expr.Sequential(expr1, expr2, NormalSeq, sp, m), tpenv + let env2 = { env with eIsControlFlow = (match sp with DebugPointAtSequential.SuppressNeither | DebugPointAtSequential.SuppressStmt -> true | _ -> false) } + let env2 = ShrinkContext env2 m synExpr2.Range + let expr2, tpenv = TcExprThatCanBeCtorBody cenv overallTy env2 tpenv synExpr2 + Expr.Sequential(expr1, expr2, NormalSeq, m), tpenv else // The first expression wasn't unit-typed, so proceed to the alternative interpretation // Note a copy of the first expression is embedded in 'otherExpr' and thus @@ -6243,6 +6352,7 @@ and TcIteratedLambdas cenv isFirst (env: TcEnv) overallTy takenNames tpenv e = mkMultiLambda m vspecs (bodyExpr, resultTy), tpenv | e -> + let env = { env with eIsControlFlow = true } // Dive into the expression to check for syntax errors and suppress them if they show. conditionallySuppressErrorReporting (not isFirst && synExprContainsError e) (fun () -> TcExpr cenv overallTy env tpenv e) @@ -7524,7 +7634,8 @@ and TcAnonRecdExpr cenv (overallTy: TType) env tpenv (isStruct, optOrigSynExpr, let expr = mkCompGenLet mOrigExpr oldv origExprChecked expr expr, tpenv -and TcForEachExpr cenv overallTy env tpenv (pat, enumSynExpr, bodySynExpr, mWholeExpr, spForLoop) = +and TcForEachExpr cenv overallTy env tpenv (synPat, synEnumExpr, synBodyExpr, mWholeExpr, spFor, spIn) = + let tryGetOptimizeSpanMethodsAux g m ty isReadOnlySpan = match (if isReadOnlySpan then tryDestReadOnlySpanTy g m ty else tryDestSpanTy g m ty) with | ValueSome(struct(_, destTy)) -> @@ -7546,17 +7657,23 @@ and TcForEachExpr cenv overallTy env tpenv (pat, enumSynExpr, bodySynExpr, mWhol UnifyTypes cenv env mWholeExpr overallTy.Commit cenv.g.unit_ty - let mPat = pat.Range - //let mBodyExpr = bodySynExpr.Range - let mEnumExpr = enumSynExpr.Range - let mForLoopStart = match spForLoop with DebugPointAtFor.Yes mStart -> mStart | DebugPointAtFor.No -> mEnumExpr + let mPat = synPat.Range + let mBodyExpr = synBodyExpr.Range + let mEnumExpr = synEnumExpr.Range + let mFor = match spFor with DebugPointAtFor.Yes mStart -> mStart | DebugPointAtFor.No -> mEnumExpr + let mIn = match spIn with DebugPointAtInOrTo.Yes mStart -> mStart | DebugPointAtInOrTo.No -> mBodyExpr + let spEnumExpr = DebugPointAtBinding.Yes mEnumExpr + let spForBind = match spFor with DebugPointAtFor.Yes m -> DebugPointAtBinding.Yes m | DebugPointAtFor.No -> DebugPointAtBinding.NoneAtSticky + let spInAsWhile = match spIn with DebugPointAtInOrTo.Yes m -> DebugPointAtWhile.Yes m | DebugPointAtInOrTo.No -> DebugPointAtWhile.No // Check the expression being enumerated - let enumExpr, enumExprTy, tpenv = TcExprOfUnknownType cenv env tpenv enumSynExpr + let enumExpr, enumExprTy, tpenv = + let env = { env with eIsControlFlow = false } + TcExprOfUnknownType cenv env tpenv synEnumExpr // Depending on its type we compile it in different ways let enumElemTy, bodyExprFixup, overallExprFixup, iterationTechnique = - match enumExpr with + match stripDebugPoints enumExpr with // optimize 'for i in n .. m do' | Expr.App (Expr.Val (vf, _, _), _, [tyarg], [startExpr;finishExpr], _) @@ -7570,13 +7687,13 @@ and TcForEachExpr cenv overallTy env tpenv (pat, enumSynExpr, bodySynExpr, mWhol let elemTy = destArrayTy cenv.g enumExprTy // Evaluate the array index lookup - let bodyExprFixup elemVar bodyExpr = mkCompGenLet mForLoopStart elemVar (mkLdelem cenv.g mForLoopStart elemTy arrExpr idxExpr) bodyExpr + let bodyExprFixup elemVar bodyExpr = mkInvisibleLet mIn elemVar (mkLdelem cenv.g mIn elemTy arrExpr idxExpr) bodyExpr // Evaluate the array expression once and put it in arrVar - let overallExprFixup overallExpr = mkCompGenLet mForLoopStart arrVar enumExpr overallExpr + let overallExprFixup overallExpr = mkLet spForBind mFor arrVar enumExpr overallExpr // Ask for a loop over integers for the given range - (elemTy, bodyExprFixup, overallExprFixup, Choice2Of3 (idxVar, mkZero cenv.g mForLoopStart, mkDecr cenv.g mForLoopStart (mkLdlen cenv.g mForLoopStart arrExpr))) + (elemTy, bodyExprFixup, overallExprFixup, Choice2Of3 (idxVar, mkZero cenv.g mFor, mkDecr cenv.g mFor (mkLdlen cenv.g mFor arrExpr))) | _ -> // try optimize 'for i in span do' for span or readonlyspan @@ -7590,18 +7707,18 @@ and TcForEachExpr cenv overallTy env tpenv (pat, enumSynExpr, bodySynExpr, mWhol // Evaluate the span index lookup let bodyExprFixup elemVar bodyExpr = - let elemAddrVar, _ = mkCompGenLocal mForLoopStart "addr" elemAddrTy - let e = mkCompGenLet mForLoopStart elemVar (mkAddrGet mForLoopStart (mkLocalValRef elemAddrVar)) bodyExpr + let elemAddrVar, _ = mkCompGenLocal mIn "addr" elemAddrTy + let e = mkInvisibleLet mIn elemVar (mkAddrGet mIn (mkLocalValRef elemAddrVar)) bodyExpr let getItemCallExpr, _ = BuildMethodCall tcVal cenv.g cenv.amap PossiblyMutates mWholeExpr true getItemMethInfo ValUseFlag.NormalValUse [] [ spanExpr ] [ idxExpr ] - mkCompGenLet mForLoopStart elemAddrVar getItemCallExpr e + mkInvisibleLet mIn elemAddrVar getItemCallExpr e // Evaluate the span expression once and put it in spanVar - let overallExprFixup overallExpr = mkCompGenLet mForLoopStart spanVar enumExpr overallExpr + let overallExprFixup overallExpr = mkLet spForBind mFor spanVar enumExpr overallExpr let getLengthCallExpr, _ = BuildMethodCall tcVal cenv.g cenv.amap PossiblyMutates mWholeExpr true getLengthMethInfo ValUseFlag.NormalValUse [] [ spanExpr ] [] // Ask for a loop over integers for the given range - (elemTy, bodyExprFixup, overallExprFixup, Choice2Of3 (idxVar, mkZero cenv.g mForLoopStart, mkDecr cenv.g mForLoopStart getLengthCallExpr)) + (elemTy, bodyExprFixup, overallExprFixup, Choice2Of3 (idxVar, mkZero cenv.g mFor, mkDecr cenv.g mFor getLengthCallExpr)) | _ -> let enumerableVar, enumerableExprInVar = mkCompGenLocal mEnumExpr "inputSequence" enumExprTy @@ -7609,7 +7726,10 @@ and TcForEachExpr cenv overallTy env tpenv (pat, enumSynExpr, bodySynExpr, mWhol AnalyzeArbitraryExprAsEnumerable cenv env true mEnumExpr enumExprTy enumerableExprInVar (enumElemTy, (fun _ x -> x), id, Choice3Of3(enumerableVar, enumeratorVar, enumeratorExpr, getEnumExpr, getEnumTy, guardExpr, currentExpr)) - let pat, _, vspecs, envinner, tpenv = TcMatchPattern cenv enumElemTy env tpenv (pat, None) + let pat, _, vspecs, envinner, tpenv = + let env = { env with eIsControlFlow = false } + TcMatchPattern cenv enumElemTy env tpenv (synPat, None) + let elemVar, pat = // nice: don't introduce awful temporary for r.h.s. in the 99% case where we know what we're binding it to match pat with @@ -7620,14 +7740,16 @@ and TcForEachExpr cenv overallTy env tpenv (pat, enumSynExpr, bodySynExpr, mWhol tmp, pat // Check the body of the loop - let bodyExpr, tpenv = TcStmt cenv envinner tpenv bodySynExpr + let bodyExpr, tpenv = + let envinner = { envinner with eIsControlFlow = true } + TcStmt cenv envinner tpenv synBodyExpr // Add the pattern match compilation let bodyExpr = let valsDefinedByMatching = ListSet.remove valEq elemVar vspecs CompilePatternForMatch - cenv env enumSynExpr.Range pat.Range false IgnoreWithWarning (elemVar, [], None) - [TClause(pat, None, TTarget(valsDefinedByMatching, bodyExpr, DebugPointAtTarget.Yes, None), mForLoopStart)] + cenv env synEnumExpr.Range pat.Range false IgnoreWithWarning (elemVar, [], None) + [TClause(pat, None, TTarget(valsDefinedByMatching, bodyExpr, None), mIn)] enumElemTy overallTy.Commit @@ -7641,27 +7763,26 @@ and TcForEachExpr cenv overallTy env tpenv (pat, enumSynExpr, bodySynExpr, mWhol // Build iteration as a for loop | Choice1Of3(startExpr, finishExpr) -> - mkFastForLoop cenv.g (spForLoop, mWholeExpr, elemVar, startExpr, true, finishExpr, bodyExpr) + mkFastForLoop cenv.g (spFor, spIn, mWholeExpr, elemVar, startExpr, true, finishExpr, bodyExpr) // Build iteration as a for loop with a specific index variable that is not the same as the elemVar | Choice2Of3(idxVar, startExpr, finishExpr) -> - mkFastForLoop cenv.g (spForLoop, mWholeExpr, idxVar, startExpr, true, finishExpr, bodyExpr) + mkFastForLoop cenv.g (DebugPointAtFor.No, spIn, mWholeExpr, idxVar, startExpr, true, finishExpr, bodyExpr) // Build iteration as a while loop with a try/finally disposal | Choice3Of3(enumerableVar, enumeratorVar, _, getEnumExpr, _, guardExpr, currentExpr) -> - // This compiled for must be matched EXACTLY by CompiledForEachExpr in opt.fs and creflect.fs - mkCompGenLet mForLoopStart enumerableVar enumExpr - (let cleanupE = BuildDisposableCleanup cenv env mWholeExpr enumeratorVar - let spBind = match spForLoop with DebugPointAtFor.Yes spStart -> DebugPointAtBinding.Yes spStart | DebugPointAtFor.No -> DebugPointAtBinding.NoneAtSticky - (mkLet spBind mForLoopStart enumeratorVar getEnumExpr + // This compiled for must be matched EXACTLY by CompiledForEachExpr + mkLet spForBind mFor enumerableVar enumExpr + (mkLet spEnumExpr mFor enumeratorVar getEnumExpr (mkTryFinally cenv.g (mkWhile cenv.g - (DebugPointAtWhile.No, + (spInAsWhile, WhileLoopForCompiledForEachExprMarker, guardExpr, - mkCompGenLet mForLoopStart elemVar currentExpr bodyExpr, - mForLoopStart), - cleanupE, mForLoopStart, cenv.g.unit_ty, DebugPointAtTry.No, DebugPointAtFinally.No)))) + mkInvisibleLet mIn elemVar currentExpr bodyExpr, + mFor), + BuildDisposableCleanup cenv env mWholeExpr enumeratorVar, + mFor, cenv.g.unit_ty, DebugPointAtTry.No, DebugPointAtFinally.No))) let overallExpr = overallExprFixup overallExpr overallExpr, tpenv @@ -8472,6 +8593,7 @@ and TcImplicitOpItemThen cenv overallTy env id sln tpenv mItem delayed = | SynExpr.InferredUpcast (synExpr, _) | SynExpr.InferredDowncast (synExpr, _) | SynExpr.AddressOf (_, synExpr, _, _) + | SynExpr.DebugPoint (_, synExpr) | SynExpr.Quote (_, _, synExpr, _, _) -> isSimpleArgument synExpr | SynExpr.InterpolatedString _ @@ -9686,12 +9808,14 @@ and CheckRecursiveBindingIds binds = and TcLinearExprs bodyChecker cenv env overallTy tpenv isCompExpr expr cont = match expr with | SynExpr.Sequential (sp, true, e1, e2, m) when not isCompExpr -> - let e1', _ = TcStmtThatCantBeCtorBody cenv env tpenv e1 - // tailcall - let env = ShrinkContext env m e2.Range + let e1', _ = + let env1 = { env with eIsControlFlow = (match sp with | DebugPointAtSequential.SuppressNeither | DebugPointAtSequential.SuppressExpr -> true | _ -> false) } + TcStmtThatCantBeCtorBody cenv env1 tpenv e1 + let env2 = { env with eIsControlFlow = (match sp with | DebugPointAtSequential.SuppressNeither | DebugPointAtSequential.SuppressStmt -> true | _ -> false) } + let env2 = ShrinkContext env2 m e2.Range // tailcall - TcLinearExprs bodyChecker cenv env overallTy tpenv isCompExpr e2 (fun (e2', tpenv) -> - cont (Expr.Sequential (e1', e2', NormalSeq, sp, m), tpenv)) + TcLinearExprs bodyChecker cenv env2 overallTy tpenv isCompExpr e2 (fun (e2', tpenv) -> + cont (Expr.Sequential (e1', e2', NormalSeq, m), tpenv)) | SynExpr.LetOrUse (isRec, isUse, binds, body, m) when not (isUse && isCompExpr) -> if isRec then @@ -9699,7 +9823,8 @@ and TcLinearExprs bodyChecker cenv env overallTy tpenv isCompExpr expr cont = CheckRecursiveBindingIds binds let binds = List.map (fun x -> RecDefnBindingInfo(ExprContainerInfo, NoNewSlots, ExpressionBinding, x)) binds if isUse then errorR(Error(FSComp.SR.tcBindingCannotBeUseAndRec(), m)) - let binds, envinner, tpenv = TcLetrec ErrorOnOverrides cenv env tpenv (binds, m, m) + let binds, envinner, tpenv = TcLetrecBindings ErrorOnOverrides cenv env tpenv (binds, m, m) + let envinner = { envinner with eIsControlFlow = true } let bodyExpr, tpenv = bodyChecker overallTy envinner tpenv body let bodyExpr = bindLetRec binds m bodyExpr cont (bodyExpr, tpenv) @@ -9707,12 +9832,17 @@ and TcLinearExprs bodyChecker cenv env overallTy tpenv isCompExpr expr cont = // TcLinearExprs processes multiple 'let' bindings in a tail recursive way let mkf, envinner, tpenv = TcLetBinding cenv isUse env ExprContainerInfo ExpressionBinding tpenv (binds, m, body.Range) let envinner = ShrinkContext envinner m body.Range + let envinner = { envinner with eIsControlFlow = true } // tailcall TcLinearExprs bodyChecker cenv envinner overallTy tpenv isCompExpr body (fun (x, tpenv) -> cont (fst (mkf (x, overallTy.Commit)), tpenv)) | SynExpr.IfThenElse (_, _, synBoolExpr, _, synThenExpr, _, synElseExprOpt, spIfToThen, isRecovery, mIfToThen, m) when not isCompExpr -> - let boolExpr, tpenv = TcExprThatCantBeCtorBody cenv (MustEqual cenv.g.bool_ty) env tpenv synBoolExpr + let boolExpr, tpenv = + let env = { env with eIsControlFlow = false } + TcExprThatCantBeCtorBody cenv (MustEqual cenv.g.bool_ty) env tpenv synBoolExpr + + let env = { env with eIsControlFlow = true } let thenExpr, tpenv = let env = match env.eContextInfo with @@ -9730,15 +9860,14 @@ and TcLinearExprs bodyChecker cenv env overallTy tpenv isCompExpr expr cont = match synElseExprOpt with | None -> let elseExpr = mkUnit cenv.g mIfToThen - 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 + let overallExpr = primMkCond spIfToThen 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 DebugPointAtTarget.Yes DebugPointAtTarget.Yes m overallTy.Commit boolExpr thenExpr elseExpr + let resExpr = primMkCond spIfToThen m overallTy.Commit boolExpr thenExpr elseExpr cont (resExpr, tpenv)) | _ -> @@ -9772,8 +9901,9 @@ and TcMatchClause cenv inputTy (resultTy: OverallTy) env isFirst tpenv synMatchC let (SynMatchClause(pat, optWhenExpr, _, e, patm, spTgt)) = synMatchClause 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 resultEnv = match spTgt with DebugPointAtTarget.Yes -> { resultEnv with eIsControlFlow = true } | DebugPointAtTarget.No -> resultEnv let e', tpenv = TcExprThatCanBeCtorBody cenv resultTy resultEnv tpenv e - TClause(pat', optWhenExprR, TTarget(vspecs, e', spTgt, None), patm), tpenv + TClause(pat', optWhenExprR, TTarget(vspecs, e', None), patm), tpenv and TcStaticOptimizationConstraint cenv env tpenv c = match c with @@ -9798,7 +9928,7 @@ and TcAndBuildFixedExpr cenv env (overallPatTy, fixedExpr, overallExprTy, mBindi match overallExprTy with | ty when isByrefTy cenv.g ty -> let okByRef = - match stripExpr fixedExpr with + match stripDebugPoints (stripExpr fixedExpr) with | Expr.Op (op, tyargs, args, _) -> match op, tyargs, args with | TOp.ValFieldGetAddr (rfref, _), _, [_] -> not rfref.Tycon.IsStructOrEnumTycon @@ -9978,8 +10108,7 @@ and TcNormalizedBinding declKind (cenv: cenv) env tpenv overallTy safeThisValOpt errorR(Error(FSComp.SR.tcFixedNotAllowed(), mBinding)) if (not declKind.CanBeDllImport || (match memberFlagsOpt with Some memberFlags -> memberFlags.IsInstance | _ -> false)) && - HasFSharpAttributeOpt cenv.g cenv.g.attrib_DllImportAttribute valAttribs - then + HasFSharpAttributeOpt cenv.g cenv.g.attrib_DllImportAttribute valAttribs then errorR(Error(FSComp.SR.tcDllImportNotAllowed(), mBinding)) if Option.isNone memberFlagsOpt && HasFSharpAttribute cenv.g cenv.g.attrib_ConditionalAttribute valAttribs then @@ -10040,10 +10169,11 @@ and TcNormalizedBinding declKind (cenv: cenv) env tpenv overallTy safeThisValOpt | None -> envinner - // Now tc the r.h.s. // If binding a ctor then set the ugly counter that permits us to write ctor expressions on the r.h.s. let isCtor = (match memberFlagsOpt with Some memberFlags -> memberFlags.MemberKind = SynMemberKind.Constructor | _ -> false) + // Now check the r-ght of the binding. + // // At each module binding, dive into the expression to check for syntax errors and suppress them if they show. // Don't do this for lambdas, because we always check for suppression for all lambda bodies in TcIteratedLambdas let rhsExprChecked, tpenv = @@ -10056,7 +10186,12 @@ and TcNormalizedBinding declKind (cenv: cenv) env tpenv overallTy safeThisValOpt // Save the arginfos away to match them up in the lambda let (PartialValReprInfo(argInfos, _)) = partialValReprInfo - let envinner = { envinner with eLambdaArgInfos = argInfos } + + // The right-hand-side is control flow (has an implicit debug point) in any situation where we + // haven't extended the debug point to include the 'let'. + let rhsIsControlFlow = match spBind with DebugPointAtBinding.Yes _ -> false | _ -> true + + let envinner = { envinner with eLambdaArgInfos = argInfos; eIsControlFlow = rhsIsControlFlow } if isCtor then TcExprThatIsCtorBody (safeThisValOpt, safeInitInfo) cenv (MustEqual overallExprTy) envinner tpenv rhsExpr else TcExprThatCantBeCtorBody cenv (MustConvertTo (false, overallExprTy)) envinner tpenv rhsExpr) @@ -10137,10 +10272,10 @@ and TcNonrecBindingTyparDecls cenv env tpenv bind = let (NormalizedBinding(_, _, _, _, _, _, synTyparDecls, _, _, _, _, _)) = bind TcBindingTyparDecls true cenv env tpenv synTyparDecls -and TcNonRecursiveBinding declKind cenv env tpenv ty b = - let b = BindingNormalization.NormalizeBinding ValOrMemberBinding cenv env b - let explicitTyparInfo, tpenv = TcNonrecBindingTyparDecls cenv env tpenv b - TcNormalizedBinding declKind cenv env tpenv ty None NoSafeInitInfo ([], explicitTyparInfo) b +and TcNonRecursiveBinding declKind cenv env tpenv ty binding = + let binding = BindingNormalization.NormalizeBinding ValOrMemberBinding cenv env binding + let explicitTyparInfo, tpenv = TcNonrecBindingTyparDecls cenv env tpenv binding + TcNormalizedBinding declKind cenv env tpenv ty None NoSafeInitInfo ([], explicitTyparInfo) binding //------------------------------------------------------------------------- // TcAttribute* @@ -10287,7 +10422,7 @@ and TcAttributeEx canFail cenv (env: TcEnv) attrTgt attrEx (synAttr: SynAttribut AttribNamedArg(nm, argty, isProp, mkAttribExpr callerArgExpr)) - match expr with + match stripDebugPoints expr with | Expr.Op (TOp.ILCall (_, _, isStruct, _, _, _, _, ilMethRef, [], [], _), [], args, m) -> if isStruct then error (Error(FSComp.SR.tcCustomAttributeMustBeReferenceType(), m)) if args.Length <> ilMethRef.ArgTypes.Length then error (Error(FSComp.SR.tcCustomAttributeArgumentMismatch(), m)) @@ -10406,7 +10541,7 @@ and TcLetBinding cenv isUse env containerInfo declKind tpenv (synBinds, synBinds // Don't introduce temporary or 'let' for 'match against wild' or 'match against unit' | TPat_wild _ | TPat_const (Const.Unit, _) when not isUse && not isFixed && isNil generalizedTypars -> - let mkSequentialBind (tm, tmty) = (mkSequential DebugPointAtSequential.SuppressNeither m rhsExpr tm, tmty) + let mkSequentialBind (tm, tmty) = mkSequential m rhsExpr tm, tmty (buildExpr >> mkSequentialBind, env, tpenv) | _ -> @@ -10457,7 +10592,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, DebugPointAtTarget.No, None), m)] + let clauses = [TClause(checkedPat2, None, TTarget(valsDefinedByMatching, bodyExpr, 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 @@ -10470,7 +10605,7 @@ and TcLetBinding cenv isUse env containerInfo declKind tpenv (synBinds, synBinds (allValsDefinedByPattern, (bodyExpr, bodyExprTy)) ||> List.foldBack (fun v (bodyExpr, bodyExprTy) -> AddCxTypeMustSubsumeType ContextInfo.NoContext denv cenv.css v.Range NoTrace cenv.g.system_IDisposable_ty v.Type let cleanupE = BuildDisposableCleanup cenv env m v - mkTryFinally cenv.g (bodyExpr, cleanupE, m, bodyExprTy, DebugPointAtTry.Body, DebugPointAtFinally.No), bodyExprTy) + mkTryFinally cenv.g (bodyExpr, cleanupE, m, bodyExprTy, DebugPointAtTry.No, DebugPointAtFinally.No), bodyExprTy) else (bodyExpr, bodyExprTy) @@ -10491,9 +10626,10 @@ and TcLetBindings cenv env containerInfo declKind tpenv (binds, bindsm, scopem) let mkf, env, tpenv = TcLetBinding cenv false env containerInfo declKind tpenv (binds, bindsm, scopem) let unite = mkUnit cenv.g bindsm let expr, _ = mkf (unite, cenv.g.unit_ty) - let rec stripLets acc = function + let rec stripLets acc expr = + match stripDebugPoints expr with | Expr.Let (bind, body, m, _) -> stripLets (TMDefLet(bind, m) :: acc) body - | Expr.Sequential (e1, e2, NormalSeq, _, m) -> stripLets (TMDefDo(e1, m) :: acc) e2 + | Expr.Sequential (e1, e2, NormalSeq, m) -> stripLets (TMDefDo(e1, m) :: acc) e2 | Expr.Const (Const.Unit, _, _) -> List.rev acc | _ -> failwith "TcLetBindings: let sequence is non linear. Maybe a LHS pattern was not linearised?" let binds = stripLets [] expr @@ -10705,7 +10841,7 @@ and CheckForNonAbstractInterface declKind tcref (memberFlags: SynMemberFlags) m error(Error(FSComp.SR.tcConcreteMembersIllegalInInterface(), m)) //------------------------------------------------------------------------- -// TcLetrec - AnalyzeAndMakeAndPublishRecursiveValue s +// TcLetrecBindings - AnalyzeAndMakeAndPublishRecursiveValue s //------------------------------------------------------------------------ and AnalyzeRecursiveStaticMemberOrValDecl @@ -11039,7 +11175,7 @@ and AnalyzeAndMakeAndPublishRecursiveValue let recBindIdx = recBindIdx + 1 - // Done - add the declared name to the List.map and return the bundle for use by TcLetrec + // Done - add the declared name to the List.map and return the bundle for use by TcLetrecBindings let primaryBinding: PreCheckingRecursiveBinding = { SyntacticBinding = revisedBinding RecBindingInfo = rbinfo } @@ -11490,12 +11626,12 @@ and FixupLetrecBind cenv denv generalizedTyparsForRecursiveBlock (bind: PostSpec Binding = TBind(vspec, expr, spBind) } //------------------------------------------------------------------------- -// TcLetrec - for both expressions and class-let-rec-declarations +// TcLetrecBindings - for both expressions and class-let-rec-declarations //------------------------------------------------------------------------ and unionGeneralizedTypars typarSets = List.foldBack (ListSet.unionFavourRight typarEq) typarSets [] -and TcLetrec overridesOK cenv env tpenv (binds, bindsm, scopem) = +and TcLetrecBindings overridesOK cenv env tpenv (binds, bindsm, scopem) = // Create prelimRecValues for the recursive items (includes type info from LHS of bindings) *) let binds = binds |> List.map (fun (RecDefnBindingInfo(a, b, c, bind)) -> NormalizedRecBindingDefn(a, b, c, BindingNormalization.NormalizeBinding ValOrMemberBinding cenv env bind)) diff --git a/src/fsharp/CheckExpressions.fsi b/src/fsharp/CheckExpressions.fsi index 146be1dde99..97f0191a8e4 100644 --- a/src/fsharp/CheckExpressions.fsi +++ b/src/fsharp/CheckExpressions.fsi @@ -3,6 +3,7 @@ module internal FSharp.Compiler.CheckExpressions open System +open System.Collections.Generic open Internal.Utilities.Collections open Internal.Utilities.Library open FSharp.Compiler @@ -102,6 +103,8 @@ type TcEnv = // Active arg infos in iterated lambdas , allowing us to determine the attributes of arguments eLambdaArgInfos: ArgReprInfo list list + + eIsControlFlow: bool } member DisplayEnv : DisplayEnv @@ -226,6 +229,8 @@ type TcFileState = /// The set of active conditional defines. The value is None when conditional erasure is disabled in tooling. conditionalDefines: string list option + namedDebugPointsForInlinedCode: Dictionary + isInternalTestSpanStackReferring: bool // forward call TcSequenceExpressionEntry: TcFileState -> TcEnv -> OverallTy -> UnscopedTyparEnv -> bool * SynExpr -> range -> Expr * UnscopedTyparEnv @@ -705,7 +710,7 @@ val TcLetrecBinding: cenv:TcFileState * envRec:TcEnv * scopem:range * extraGener val TcLetrecComputeCtorSafeThisValBind: cenv:TcFileState -> safeThisValOpt:Val option -> Binding option /// Check a collection of `let rec` bindings -val TcLetrec: overridesOK:OverridesOK -> cenv:TcFileState -> env:TcEnv -> tpenv:UnscopedTyparEnv -> binds:RecDefnBindingInfo list * bindsm:range * scopem:range -> Bindings * TcEnv * UnscopedTyparEnv +val TcLetrecBindings: overridesOK:OverridesOK -> cenv:TcFileState -> env:TcEnv -> tpenv:UnscopedTyparEnv -> binds:RecDefnBindingInfo list * bindsm:range * scopem:range -> Bindings * TcEnv * UnscopedTyparEnv /// Part of check a collection of recursive bindings that might include members val TcLetrecAdjustMemberForSpecialVals: cenv: TcFileState -> pgrbind: PostGeneralizationRecursiveBinding -> PostSpecialValsRecursiveBinding diff --git a/src/fsharp/CompilerConfig.fs b/src/fsharp/CompilerConfig.fs index dae491a9d44..f04d303ca97 100644 --- a/src/fsharp/CompilerConfig.fs +++ b/src/fsharp/CompilerConfig.fs @@ -459,7 +459,7 @@ type TcConfigBuilder = /// if true, strip away data that would not be of use to end users, but is useful to us for debugging // REVIEW: "stripDebugData"? - mutable noDebugData: bool + mutable noDebugAttributes: bool /// if true, indicates all type checking and code generation is in the context of fsi.exe isInteractive: bool @@ -654,7 +654,7 @@ type TcConfigBuilder = #endif pause = false alwaysCallVirt = true - noDebugData = false + noDebugAttributes = false emitDebugInfoInQuotations = false exename = None shadowCopyReferences = false @@ -1037,7 +1037,7 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) = #endif member x.pause = data.pause member x.alwaysCallVirt = data.alwaysCallVirt - member x.noDebugData = data.noDebugData + member x.noDebugAttributes = data.noDebugAttributes member x.isInteractive = data.isInteractive member x.isInvalidationSupported = data.isInvalidationSupported member x.emitDebugInfoInQuotations = data.emitDebugInfoInQuotations diff --git a/src/fsharp/CompilerConfig.fsi b/src/fsharp/CompilerConfig.fsi index 4a80fea97d1..b353f42e06a 100644 --- a/src/fsharp/CompilerConfig.fsi +++ b/src/fsharp/CompilerConfig.fsi @@ -261,7 +261,7 @@ type TcConfigBuilder = #endif mutable pause: bool mutable alwaysCallVirt: bool - mutable noDebugData: bool + mutable noDebugAttributes: bool /// If true, indicates all type checking and code generation is in the context of fsi.exe isInteractive: bool @@ -452,7 +452,7 @@ type TcConfig = #endif member pause: bool member alwaysCallVirt: bool - member noDebugData: bool + member noDebugAttributes: bool /// If true, indicates all type checking and code generation is in the context of fsi.exe member isInteractive: bool diff --git a/src/fsharp/CompilerImports.fs b/src/fsharp/CompilerImports.fs index 7013a767976..0f10e4a6fd0 100644 --- a/src/fsharp/CompilerImports.fs +++ b/src/fsharp/CompilerImports.fs @@ -1913,7 +1913,7 @@ and [] TcImports(tcConfigP: TcConfigProvider, initialResolutions: TcAsse let tcGlobals = TcGlobals(tcConfig.compilingFslib, ilGlobals, fslibCcu, tcConfig.implicitIncludeDir, tcConfig.mlCompatibility, tcConfig.isInteractive, tryFindSysTypeCcu, tcConfig.emitDebugInfoInQuotations, - tcConfig.noDebugData, tcConfig.pathMap, tcConfig.langVersion) + tcConfig.noDebugAttributes, tcConfig.pathMap, tcConfig.langVersion) #if DEBUG // the global_g reference cell is used only for debug printing diff --git a/src/fsharp/CompilerOptions.fs b/src/fsharp/CompilerOptions.fs index 378eba3bac4..8a2facfd135 100644 --- a/src/fsharp/CompilerOptions.fs +++ b/src/fsharp/CompilerOptions.fs @@ -1201,7 +1201,7 @@ let internalFlags (tcConfigB:TcConfigBuilder) = // "Resolve assembly references using MSBuild resolution rules rather than directory based (Default=true except when running fsc.exe under mono)") CompilerOption ("msbuildresolution", tagNone, - OptionUnit (fun () -> tcConfigB.useSimpleResolution<-false), + OptionUnit (fun () -> tcConfigB.useSimpleResolution <- false), Some(InternalCommandLineOption("msbuildresolution", rangeCmdArgs)), None) CompilerOption @@ -1211,8 +1211,8 @@ let internalFlags (tcConfigB:TcConfigBuilder) = CompilerOption ("nodebugdata", tagNone, - OptionUnit (fun () -> tcConfigB.noDebugData<-true), - Some(InternalCommandLineOption("--nodebugdata", rangeCmdArgs)), None) + OptionUnit (fun () -> tcConfigB.noDebugAttributes <- true), + Some(InternalCommandLineOption("nodebugdata", rangeCmdArgs)), None) testFlag tcConfigB ] @ diff --git a/src/fsharp/ConstraintSolver.fs b/src/fsharp/ConstraintSolver.fs index 2bb3bfefb99..60fe6051355 100644 --- a/src/fsharp/ConstraintSolver.fs +++ b/src/fsharp/ConstraintSolver.fs @@ -2755,11 +2755,11 @@ and ReportNoCandidatesError (csenv: ConstraintSolverEnv) (nUnnamedCallerArgs, nN |> ErrorD and ReportNoCandidatesErrorExpr csenv callerArgCounts methodName ad calledMethGroup = - let isSequential e = match e with | Expr.Sequential _ -> true | _ -> false + let isSequential e = match stripDebugPoints e with Expr.Sequential _ -> true | _ -> false ReportNoCandidatesError csenv callerArgCounts methodName ad calledMethGroup isSequential and ReportNoCandidatesErrorSynExpr csenv callerArgCounts methodName ad calledMethGroup = - let isSequential e = match e with | SynExpr.Sequential _ -> true | _ -> false + let isSequential e = match e with SynExpr.Sequential _ -> true | _ -> false ReportNoCandidatesError csenv callerArgCounts methodName ad calledMethGroup isSequential /// When checking whether a method solves a trait constraint, we can assume the trait is solved diff --git a/src/fsharp/DetupleArgs.fs b/src/fsharp/DetupleArgs.fs index bbbf217c21d..2e37c37154d 100644 --- a/src/fsharp/DetupleArgs.fs +++ b/src/fsharp/DetupleArgs.fs @@ -153,7 +153,7 @@ let DetupleRewriteStackGuardDepth = StackGuard.GetDepthOption "DetupleRewrite" let (|TyappAndApp|_|) e = match e with | Expr.App (f, fty, tys, args, m) -> - match stripExpr f with + match stripDebugPoints (stripExpr f) with | Expr.App (f2, fty2, tys2, [], m2) -> Some(f2, fty2, tys2 @ tys, args, m2) | Expr.App _ -> Some(f, fty, tys, args, m) (* has args, so not combine ty args *) | f -> Some(f, fty, tys, args, m) @@ -298,7 +298,7 @@ module GlobalUsageAnalysis = let context = [] recognise context origExpr - let targetIntercept exprF z = function TTarget(_argvs, body, _, _) -> Some (foldUnderLambda exprF z body) + let targetIntercept exprF z = function TTarget(_argvs, body, _) -> Some (foldUnderLambda exprF z body) let tmethodIntercept exprF z = function TObjExprMethod(_, _, _, _, e, _m) -> Some (foldUnderLambda exprF z e) {ExprFolder0 with diff --git a/src/fsharp/FSComp.txt b/src/fsharp/FSComp.txt index a220e93d164..19b32e17b8b 100644 --- a/src/fsharp/FSComp.txt +++ b/src/fsharp/FSComp.txt @@ -1619,6 +1619,7 @@ forFormatInvalidForInterpolated4,"Interpolated strings used as type IFormattable 3511,reprStateMachineNotCompilable,"This state machine is not statically compilable. %s. An alternative dynamic implementation will be used, which may be slower. Consider adjusting your code to ensure this state machine is statically compilable, or else suppress this warning." 3512,reprStateMachineNotCompilableNoAlternative,"This state machine is not statically compilable and no alternative is available. %s. Use an 'if __useResumableCode then else ' to give an alternative." 3513,tcResumableCodeInvocation,"Resumable code invocation. Suppress this warning if you are defining new low-level resumable code in terms of existing resumable code." +3514,ilxGenUnknownDebugPoint,"Unknown debug point '%s'. The available debug points are '%s'." reprResumableCodeInvokeNotReduced,"A resumable code invocation at '%s' could not be reduced" reprResumableCodeContainsLetRec,"A 'let rec' occured in the resumable code specification" reprResumableCodeContainsDynamicResumeAtInBody,"A target label for __resumeAt was not statically determined. A __resumeAt with a non-static target label may only appear at the start of a resumable code method" diff --git a/src/fsharp/FSharp.Core/async.fs b/src/fsharp/FSharp.Core/async.fs index 6578233e762..94ef8f2e02d 100644 --- a/src/fsharp/FSharp.Core/async.fs +++ b/src/fsharp/FSharp.Core/async.fs @@ -16,6 +16,9 @@ namespace Microsoft.FSharp.Control open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators open Microsoft.FSharp.Control open Microsoft.FSharp.Collections +#if !BUILDING_WITH_LKG && !BUILD_FROM_SOURCE + open Microsoft.FSharp.Core.CompilerServices.StateMachineHelpers +#endif type LinkedSubSource(cancellationToken: CancellationToken) = @@ -504,7 +507,7 @@ namespace Microsoft.FSharp.Control let MakeAsync body = { Invoke = body } [] - let MakeAsyncWithCancelCheck body = + let inline MakeAsyncWithCancelCheck ([] body) = MakeAsync (fun ctxt -> if ctxt.IsCancellationRequested then ctxt.OnCancellation () @@ -641,7 +644,9 @@ namespace Microsoft.FSharp.Control /// - Hijack check after 'entering' the try/finally and before running the body (see TryFinally) /// - Apply 'finallyFunction' with exception protection (see TryFinally) let inline CreateTryFinallyAsync finallyFunction computation = - MakeAsync (fun ctxt -> TryFinally ctxt computation finallyFunction) + MakeAsync (fun ctxt -> + TryFinally ctxt computation (fun () -> + finallyFunction())) /// Create an async for a try/with filtering exceptions through a pattern match /// - Cancellation check before entering the try (see TryWith) @@ -649,7 +654,9 @@ namespace Microsoft.FSharp.Control /// - Apply `filterFunction' to argument with exception protection (see TryWith) /// - Hijack check before invoking the resulting computation or exception continuation let inline CreateTryWithFilterAsync filterFunction computation = - MakeAsync (fun ctxt -> TryWith ctxt computation filterFunction) + MakeAsync (fun ctxt -> + TryWith ctxt computation (fun exn -> + filterFunction exn)) /// Create an async for a try/with filtering /// - Cancellation check before entering the try (see TryWith) @@ -657,7 +664,9 @@ namespace Microsoft.FSharp.Control /// - Apply `catchFunction' to argument with exception protection (see TryWith) /// - Hijack check before invoking the resulting computation or exception continuation let inline CreateTryWithAsync catchFunction computation = - MakeAsync (fun ctxt -> TryWith ctxt computation (fun exn -> Some (catchFunction exn))) + MakeAsync (fun ctxt -> + TryWith ctxt computation (fun exn -> + Some (catchFunction exn))) /// Call the finallyFunction if the computation results in a cancellation, and then continue with cancellation. /// If the finally function gives an exception then continue with cancellation regardless. @@ -680,7 +689,7 @@ namespace Microsoft.FSharp.Control /// A single pre-allocated computation that returns a unit result /// - Cancellation check (see CreateReturnAsync) /// - Hijack check (see CreateReturnAsync) - let unitAsync = + let UnitAsync = CreateReturnAsync() /// Implement use/Dispose @@ -690,16 +699,16 @@ namespace Microsoft.FSharp.Control /// - Cancellation check after 'entering' the implied try/finally and before running the body (see CreateTryFinallyAsync) /// - Hijack check after 'entering' the implied try/finally and before running the body (see CreateTryFinallyAsync) /// - Run 'disposeFunction' with exception protection (see CreateTryFinallyAsync) - let CreateUsingAsync (resource:'T :> IDisposable) (computation:'T -> Async<'a>) : Async<'a> = + let inline CreateUsingAsync (resource:'T :> IDisposable) ([] computation:'T -> Async<'a>) : Async<'a> = let disposeFunction () = Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicFunctions.Dispose resource CreateTryFinallyAsync disposeFunction (CreateCallAsync computation resource) /// - Initial cancellation check (see CreateBindAsync) /// - Initial hijack check (see CreateBindAsync) - /// - Cancellation check after (see unitAsync) - /// - No hijack check after (see unitAsync) + /// - Cancellation check after (see UnitAsync) + /// - No hijack check after (see UnitAsync) let inline CreateIgnoreAsync computation = - CreateBindAsync computation (fun _ -> unitAsync) + CreateBindAsync computation (fun _ -> UnitAsync) /// Implement the while loop construct of async computation expressions /// - No initial cancellation check before first execution of guard @@ -708,18 +717,18 @@ namespace Microsoft.FSharp.Control /// - Hijack check before each execution of guard (see CreateBindAsync) /// - Cancellation check before each execution of the body after guard (CreateBindAsync) /// - No hijack check before each execution of the body after guard (see CreateBindAsync) - /// - Cancellation check after guard fails (see unitAsync) - /// - Hijack check after guard fails (see unitAsync) + /// - Cancellation check after guard fails (see UnitAsync) + /// - Hijack check after guard fails (see UnitAsync) /// - Apply 'guardFunc' with exception protection (see ProtectCode) // // Note: There are allocations during loop set up, but no allocations during iterations of the loop - let CreateWhileAsync guardFunc computation = + let inline CreateWhileAsync ([] guardFunc) computation = if guardFunc() then let mutable whileAsync = Unchecked.defaultof<_> - whileAsync <- CreateBindAsync computation (fun () -> if guardFunc() then whileAsync else unitAsync) + whileAsync <- CreateBindAsync computation (fun () -> if guardFunc() then whileAsync else UnitAsync) whileAsync else - unitAsync + UnitAsync #if REDUCED_ALLOCATIONS_BUT_RUNS_SLOWER /// Implement the while loop construct of async computation expressions @@ -763,10 +772,14 @@ namespace Microsoft.FSharp.Control // Note: No allocations during iterations of the loop apart from those from // applying the loop body to the element - let CreateForLoopAsync (source: seq<_>) computation = + let inline CreateForLoopAsync (source: seq<_>) computation = CreateUsingAsync (source.GetEnumerator()) (fun ie -> CreateWhileAsync - (fun () -> ie.MoveNext()) + (fun () -> +#if !BUILDING_WITH_LKG && !BUILD_FROM_SOURCE + __debugPoint "ForLoop.InOrToKeyword" +#endif + ie.MoveNext()) (CreateDelayAsync (fun () -> computation ie.Current))) #if REDUCED_ALLOCATIONS_BUT_RUNS_SLOWER @@ -1278,7 +1291,7 @@ namespace Microsoft.FSharp.Control [] type AsyncBuilder() = - member _.Zero () = unitAsync + member _.Zero () = UnitAsync member _.Delay generator = CreateDelayAsync generator @@ -1290,9 +1303,19 @@ namespace Microsoft.FSharp.Control member _.Using (resource, binder) = CreateUsingAsync resource binder - member _.While (guard, computation) = CreateWhileAsync guard computation +#if BUILDING_WITH_LKG || BUILD_FROM_SOURCE + member _.While (guard, computation) = +#else + member inline _.While (guard, computation) = +#endif + CreateWhileAsync (fun () -> + guard()) computation +#if BUILDING_WITH_LKG || BUILD_FROM_SOURCE member _.For (sequence, body) = CreateForLoopAsync sequence body +#else + member inline _.For (sequence, body) = CreateForLoopAsync sequence body +#endif member inline _.Combine (computation1, computation2) = CreateSequentialAsync computation1 computation2 @@ -1311,7 +1334,7 @@ namespace Microsoft.FSharp.Control static member CancellationToken = cancellationTokenAsync - static member CancelCheck () = unitAsync + static member CancelCheck () = UnitAsync static member FromContinuations (callback: ('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) : Async<'T> = MakeAsyncWithCancelCheck (fun ctxt -> diff --git a/src/fsharp/FSharp.Core/async.fsi b/src/fsharp/FSharp.Core/async.fsi index d127f6f6380..f6d67ddebcd 100644 --- a/src/fsharp/FSharp.Core/async.fsi +++ b/src/fsharp/FSharp.Core/async.fsi @@ -789,6 +789,12 @@ namespace Microsoft.FSharp.Control /// A value indicating asynchronous execution. val TryWith: ctxt:AsyncActivation<'T> -> computation: Async<'T> -> catchFunction: (Exception -> Async<'T> option) -> AsyncReturn +#if !BUILDING_WITH_LKG && !BUILD_FROM_SOURCE + /// The F# compiler emits calls to this function to implement F# async expressions. + /// The unit-returning async. + val UnitAsync: Async +#endif + [] // Internals used by MailboxProcessor type internal ResultCell<'T> = @@ -827,7 +833,11 @@ namespace Microsoft.FSharp.Control /// for each element. /// /// +#if BUILDING_WITH_LKG || BUILD_FROM_SOURCE member For: sequence:seq<'T> * body:('T -> Async) -> Async +#else + member inline For: sequence:seq<'T> * body:('T -> Async) -> Async +#endif /// Creates an asynchronous computation that just returns (). /// @@ -871,7 +881,11 @@ namespace Microsoft.FSharp.Control /// An asynchronous computation that behaves similarly to a while loop when run. /// /// +#if BUILDING_WITH_LKG || BUILD_FROM_SOURCE member While : guard:(unit -> bool) * computation:Async -> Async +#else + member inline While : guard:(unit -> bool) * computation:Async -> Async +#endif /// Creates an asynchronous computation that returns the result v. /// diff --git a/src/fsharp/FSharp.Core/resumable.fs b/src/fsharp/FSharp.Core/resumable.fs index 96d282bbcd5..813270ff343 100644 --- a/src/fsharp/FSharp.Core/resumable.fs +++ b/src/fsharp/FSharp.Core/resumable.fs @@ -84,6 +84,10 @@ module StateMachineHelpers = [] let __useResumableCode<'T> : bool = false + [] + let __debugPoint (_name: string) : unit = () + //failwith "__debugPoint should always be eliminated by the F# compiler" + [] let __resumableEntry () : int option = failwith "__resumableEntry should always be guarded by __useResumableCode and only used in valid state machine implementations" @@ -210,22 +214,12 @@ module ResumableCode = let mutable __stack_fin = false let mutable __stack_caught = false let mutable __stack_savedExn = Unchecked.defaultof<_> - // This is a meaningless assignment but ensures a debug point gets laid down - // at the 'try' in the try/with for code as we enter into the handler. - __stack_fin <- __stack_fin || __stack_fin try // The try block may contain await points. let __stack_body_fin = body.Invoke(&sm) // If we make it to the assignment we prove we've made a step __stack_fin <- __stack_body_fin with exn -> - // Note, remarkExpr in the F# compiler detects this pattern as the code - // is inlined and elides the debug sequence point on the code. This is because the inlining will associate - // the sequence point with the 'try' of the TryFinally because that is the range - // given for the whole expression - // task.TryWith(....) - // If you change this code you should check debug sequence points and the generated - // code tests for try/with in tasks. __stack_caught <- true __stack_savedExn <- exn @@ -274,25 +268,12 @@ module ResumableCode = if __useResumableCode then //-- RESUMABLE CODE START let mutable __stack_fin = false - // This is a meaningless assignment but ensures a debug point gets laid down - // at the 'try' in the try/finally. The 'try' is used as the range for the - // F# computation expression desugaring to 'TryFinally' and this range in turn gets applied - // to inlined code. - __stack_fin <- __stack_fin || __stack_fin try let __stack_body_fin = body.Invoke(&sm) // If we make it to the assignment we prove we've made a step, an early 'ret' exit out of the try/with // may skip this step. __stack_fin <- __stack_body_fin with _exn -> - // Note, remarkExpr in the F# compiler detects this pattern as the code - // is inlined and elides the debug sequence point on either the 'compensation' - // 'reraise' statement for the code. This is because the inlining will associate - // the sequence point with the 'try' of the TryFinally because that is the range - // given for the whole expression - // task.TryFinally(....) - // If you change this code you should check debug sequence points and the generated - // code tests for try/finally in tasks. let __stack_ignore = compensation.Invoke(&sm) reraise() @@ -312,11 +293,6 @@ module ResumableCode = //-- RESUMABLE CODE START let mutable __stack_fin = false let mutable savedExn = None - // This is a meaningless assignment but ensures a debug point gets laid down - // at the 'try' in the try/finally. The 'try' is used as the range for the - // F# computation expression desugaring to 'TryFinally' and this range in turn gets applied - // to inlined code. - __stack_fin <- __stack_fin || __stack_fin try let __stack_body_fin = body.Invoke(&sm) // If we make it to the assignment we prove we've made a step, an early 'ret' exit out of the try/with @@ -329,10 +305,12 @@ module ResumableCode = if __stack_fin then let __stack_compensation_fin = compensation.Invoke(&sm) __stack_fin <- __stack_compensation_fin + if __stack_fin then match savedExn with | None -> () | Some exn -> raise exn + __stack_fin //-- RESUMABLE CODE END else @@ -351,7 +329,13 @@ module ResumableCode = // A for loop is just a using statement on the sequence's enumerator... Using (sequence.GetEnumerator(), // ... and its body is a while loop that advances the enumerator and runs the body on each element. - (fun e -> While((fun () -> e.MoveNext()), ResumableCode<'Data, unit>(fun sm -> (body e.Current).Invoke(&sm))))) + (fun e -> + While( + (fun () -> + __debugPoint "ForLoop.InOrToKeyword" + e.MoveNext()), + ResumableCode<'Data, unit>(fun sm -> + (body e.Current).Invoke(&sm))))) let YieldDynamic (sm: byref>) : bool = let cont = ResumptionFunc<'Data>(fun _sm -> true) diff --git a/src/fsharp/FSharp.Core/resumable.fsi b/src/fsharp/FSharp.Core/resumable.fsi index 303c9c67a4c..f223ddbf726 100644 --- a/src/fsharp/FSharp.Core/resumable.fsi +++ b/src/fsharp/FSharp.Core/resumable.fsi @@ -136,6 +136,29 @@ module StateMachineHelpers = [] val __useResumableCode<'T> : bool + /// + /// Indicates a named debug point arising from the context of inlined resumable code. + /// + /// + /// If the code was ultimately inlined from a "try .. with" construct in a computation expression, + /// the names "TryWith.TryKeyword" and "TryWith.WithKeyword" can be used. + /// + /// If the code was ultimately inlined from a "try .. finally" construct in a computation expression, + /// the names "TryFinally.TryKeyword" and "TryFinally.FinallyKeyword" can be used. + /// + /// If the code was ultimately inlined from a "while .. do" construct in a computation expression, + /// the name "While.WhileKeyword" can be used. + /// + /// If the code was ultimately inlined from a "for .. in .. do" or "for .. = .. to .. do" construct in a computation expression, + /// the name "ForLoop.InOrToKeyword" can be used. + /// + /// If the name doesn't correspond to a known debug point arising from the original source context, then no + /// debug point is emitted. If opt-in warning 3514 is enabled a warning is emitted. + /// + + [] + val __debugPoint: string -> unit + /// /// Indicates a resumption point within resumable code /// diff --git a/src/fsharp/FindUnsolved.fs b/src/fsharp/FindUnsolved.fs index fded9468d87..9b6a998d1b2 100644 --- a/src/fsharp/FindUnsolved.fs +++ b/src/fsharp/FindUnsolved.fs @@ -44,7 +44,7 @@ let rec accExpr (cenv:cenv) (env:env) expr = let expr = stripExpr expr match expr with - | Expr.Sequential (e1, e2, _, _, _) -> + | Expr.Sequential (e1, e2, _, _) -> accExpr cenv env e1 accExpr cenv env e2 @@ -119,7 +119,11 @@ let rec accExpr (cenv:cenv) (env:env) expr = | Expr.WitnessArg (traitInfo, _m) -> accTraitInfo cenv env traitInfo - | Expr.Link _eref -> failwith "Unexpected Expr.Link" + | Expr.Link eref -> + accExpr cenv env eref.Value + + | Expr.DebugPoint (_, innerExpr) -> + accExpr cenv env innerExpr and accMethods cenv env baseValOpt l = List.iter (accMethod cenv env baseValOpt) l @@ -158,7 +162,7 @@ and accTraitInfo cenv env (TTrait(tys, _nm, _, argtys, rty, _sln)) = tys |> List.iter (accTy cenv env) and accLambdas cenv env topValInfo e ety = - match e with + match stripDebugPoints e with | Expr.TyChoose (_tps, e1, _m) -> accLambdas cenv env topValInfo e1 ety | Expr.Lambda _ | Expr.TyLambda _ -> @@ -177,7 +181,7 @@ and accExprs cenv env exprs = and accTargets cenv env m ty targets = Array.iter (accTarget cenv env m ty) targets -and accTarget cenv env _m _ty (TTarget(_vs, e, _, _)) = +and accTarget cenv env _m _ty (TTarget(_vs, e, _)) = accExpr cenv env e and accDTree cenv env x = diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index a32fe936ae7..3650216d180 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -245,6 +245,12 @@ type cenv = /// The options for ILX code generation opts: IlxGenOptions + /// Collection of all debug points available for inlined code + namedDebugPointsForInlinedCode: Map + + // /// Unnamed extra debug points that have been emitted + //emittedPriorDebugPoints: HashSet + /// Cache the generation of the "unit" type mutable ilUnitTy: ILType option @@ -1475,7 +1481,7 @@ and AddBindingsForModuleTopVals _g allocVal _cloc eenv vs = let AddIncrementalLocalAssemblyFragmentToIlxGenEnv (amap: ImportMap, isIncrementalFragment, g, ccu, fragName, intraAssemblyInfo, eenv, typedImplFiles) = let cloc = CompLocForFragment fragName ccu let allocVal = ComputeAndAddStorageForLocalTopVal (amap, g, intraAssemblyInfo, true, NoShadowLocal) - (eenv, typedImplFiles) ||> List.fold (fun eenv (TImplFile (qname, _, mexpr, _, _, _)) -> + (eenv, typedImplFiles) ||> List.fold (fun eenv (TImplFile (qualifiedNameOfFile=qname; implExprWithSig=mexpr)) -> let cloc = { cloc with TopImplQualifiedName = qname.Text } if isIncrementalFragment then match mexpr with @@ -1496,8 +1502,8 @@ let GenILSourceMarker (g: TcGlobals) (m: range) = endLine= m.EndLine, endColumn=m.EndColumn+1) -/// Optionally generate IL debugging information. -let GenPossibleILSourceMarker cenv m = +/// Optionally generate DebugRange for methods. This gets attached to the whole method. +let GenPossibleILDebugRange cenv m = if cenv.opts.generateDebugSymbols then Some (GenILSourceMarker cenv.g m ) else @@ -1816,8 +1822,8 @@ type AssemblyBuilder(cenv: cenv, anonTypeTable: AnonTypeGenerationTable) as mgbu match explicitEntryPointInfo with | Some tref -> let InitializeCompiledScript(fspec, m) = - let ilDebugPoint = GenPossibleILSourceMarker cenv m - mgbuf.AddExplicitInitToSpecificMethodDef((fun (md: ILMethodDef) -> md.IsEntryPoint), tref, fspec, ilDebugPoint, imports, [], []) + let ilDebugRange = GenPossibleILDebugRange cenv m + mgbuf.AddExplicitInitToSpecificMethodDef((fun (md: ILMethodDef) -> md.IsEntryPoint), tref, fspec, ilDebugRange, imports, [], []) scriptInitFspecs |> List.iter InitializeCompiledScript | None -> () @@ -1944,8 +1950,6 @@ type CodeGenBuffer(m: range, | true, l -> lab2pc (n + 1) l | _ -> codeLabelToPC.[lbl] - let mutable lastDebugPoint = None - // 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 @@ -1970,6 +1974,7 @@ type CodeGenBuffer(m: range, nstack <- nstack - 1 member _.GetCurrentStack() = stack + member _.AssertEmptyStack() = if not (isNil stack) then let msg = @@ -1989,9 +1994,6 @@ type CodeGenBuffer(m: range, cgbuf.DoPushes pushes is |> List.iter codebuf.Add - member _.GetLastDebugPoint() = - lastDebugPoint - member private _.EnsureNopBetweenDebugPoints() = // 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 @@ -2002,9 +2004,10 @@ type CodeGenBuffer(m: range, codebuf.Add(AI_nop) - member cgbuf.EmitDebugPoint src = + member cgbuf.EmitDebugPoint (m: range) = if mgbuf.cenv.opts.generateDebugSymbols then - let attr = GenILSourceMarker g src + + let attr = GenILSourceMarker g m let i = I_seqpoint attr hasDebugPoints <- true @@ -2021,8 +2024,6 @@ type CodeGenBuffer(m: range, cgbuf.EnsureNopBetweenDebugPoints() codebuf.Add i - // 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/ @@ -2138,7 +2139,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 EmitDebugPoint (cgbuf: CodeGenBuffer) src = cgbuf.EmitDebugPoint src + let EmitDebugPoint (cgbuf: CodeGenBuffer) m = cgbuf.EmitDebugPoint m 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 @@ -2249,7 +2250,7 @@ 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 if it has some debug points. - let sourceRange = if hasDebugPoints then GenPossibleILSourceMarker cenv m else None + let ilDebugRange = if hasDebugPoints then GenPossibleILDebugRange cenv m else None let ilImports = eenv.imports @@ -2257,7 +2258,7 @@ let CodeGenMethod cenv mgbuf (entryPointInfo, methodName, eenv, alreadyUsedArgs, let maxStack = maxStack + 2 // Build an Abstract IL method - let body = mkILMethodBody (eenv.initLocals, locals, maxStack, code, sourceRange, ilImports) + let body = mkILMethodBody (eenv.initLocals, locals, maxStack, code, ilDebugRange, ilImports) instrs, body @@ -2284,215 +2285,68 @@ let compileStateMachineExpressions = true // try (System.Environment.GetEnvironm // Sequence Point Logic //------------------------------------------------------------------------- -type EmitDebugPointState = - /// 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 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 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) = +/// Returns (useWholeExprRange, sequencePointForBind, sequencePointGenerationFlagForRhsOfBind) +let ComputeDebugPointForBinding g bind = + let (TBind(_, e, spBind)) = bind if BindingEmitsNoCode g bind then - false, None, SPSuppress + false, None else match spBind, stripExpr e with - | DebugPointAtBinding.NoneAtInvisible, _ -> false, None, SPSuppress - | DebugPointAtBinding.NoneAtSticky, _ -> true, None, SPSuppress - | DebugPointAtBinding.NoneAtDo, _ -> false, None, SPAlways - | DebugPointAtBinding.NoneAtLet, _ -> false, None, SPSuppress + | DebugPointAtBinding.NoneAtInvisible, _ -> false, None + | DebugPointAtBinding.NoneAtSticky, _ -> true, None + | DebugPointAtBinding.ImplicitAtDo, _ -> false, None + | DebugPointAtBinding.NoneAtLet, _ -> false, None // 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 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. -let BindingEmitsDebugPoint g bind = - match ComputeDebugPointForBinding g bind with - | _, None, SPSuppress -> false - | _ -> true - -let BindingIsInvisible (TBind(_, _, spBind)) = - match spBind with - | DebugPointAtBinding.NoneAtInvisible _ -> true - | _ -> false - -/// Determines if the code generated for a binding is to be marked as hidden, e.g. the 'newobj' for a local function definition. -let BindingEmitsHiddenCode (TBind(_, e, spBind)) = - match spBind, stripExpr e with - | _, (Expr.Lambda _ | Expr.TyLambda _) -> true - | _ -> false - -/// 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 - | SPAlways -> - match stripExpr expr with - | Expr.Let (bind, body, _, _) -> - BindingEmitsDebugPoint g bind || - FirstEmittedCodeWillBeDebugPoint g sp bind.Expr || - (BindingEmitsNoCode g bind && FirstEmittedCodeWillBeDebugPoint g sp body) - | Expr.LetRec (binds, body, _, _) -> - binds |> List.exists (BindingEmitsDebugPoint g) || - (binds |> List.forall (BindingEmitsNoCode g) && FirstEmittedCodeWillBeDebugPoint g sp body) - | Expr.Sequential (stmt1, expr2, NormalSeq, spSeq, _) -> - match spSeq with - | DebugPointAtSequential.SuppressNeither -> FirstEmittedCodeWillBeDebugPoint g sp stmt1 - | DebugPointAtSequential.SuppressExpr -> FirstEmittedCodeWillBeDebugPoint g sp stmt1 - | DebugPointAtSequential.SuppressStmt -> FirstEmittedCodeWillBeDebugPoint g sp expr2 - | DebugPointAtSequential.SuppressBoth -> false - | Expr.Sequential (expr1, stmt2, ThenDoSeq, spSeq, _) -> - match spSeq with - | DebugPointAtSequential.SuppressNeither -> FirstEmittedCodeWillBeDebugPoint g sp expr1 - | DebugPointAtSequential.SuppressExpr -> FirstEmittedCodeWillBeDebugPoint g sp stmt2 - | 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 _, _) - | TOp.While (DebugPointAtWhile.Yes _, _)), _, _, _) -> true - | _ -> false - - | SPSuppress -> - false - -/// 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 = - assert (not (FirstEmittedCodeWillBeDebugPoint g sp expr)) - match sp with - | SPAlways -> - match stripExpr expr with - - // In some cases, we emit debug points for the 'whole' of a 'let' expression. - // Specifically, when - // + 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 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 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 debug point. - | Expr.Let (bind, _, _, _) when BindingEmitsNoCode g bind -> false - | Expr.LetRec (binds, _, _, _) when binds |> List.forall (BindingEmitsNoCode g) -> false - - // Suppress debug points for the whole 'a;b' and do it at 'a' instead. - | Expr.Sequential _ -> false - - // 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 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'. - // - // 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 - | Expr.Op (TOp.While _, _, _, _) -> false - | _ -> true - | SPSuppress -> - false - -/// Emit hidden code markers for some compound expressions. Specifically, emit a hidden code marker for 'let f() = a in body' -/// because the binding for 'f' will emit some code which we don't want to be visible. -/// let someCode x = -/// let f () = a -/// body -let EmitHiddenCodeMarkerForWholeExpr g sp expr = - assert (not (FirstEmittedCodeWillBeDebugPoint g sp expr)) - assert (not (EmitDebugPointForWholeExpr g sp expr)) - match sp with - | SPAlways -> - match stripExpr expr with - | Expr.Let (bind, _, _, _) when BindingEmitsHiddenCode bind -> true - | Expr.LetRec (binds, _, _, _) when binds |> List.exists BindingEmitsHiddenCode -> true - | _ -> false - | SPSuppress -> - false - -/// Some expressions must emit some preparation code, then emit the actual code. -let rec RangeOfDebugPointForWholeExpr g expr = - match stripExpr expr with - | Expr.Let (bind, body, _, _) -> - match ComputeDebugPointForBinding g bind with - // For sticky bindings, prefer the range of the overall expression. - | true, _, _ -> expr.Range - | _, None, SPSuppress -> RangeOfDebugPointForWholeExpr g body - | _, Some m, _ -> m - | _, None, SPAlways -> RangeOfDebugPointForWholeExpr g bind.Expr - | Expr.LetRec (_, body, _, _) -> RangeOfDebugPointForWholeExpr g body - | Expr.Sequential (expr1, _, NormalSeq, _, _) -> RangeOfDebugPointForWholeExpr g expr1 - | _ -> expr.Range - -/// Used to avoid emitting multiple debug points in decision tree generation -let DoesGenExprStartWithDebugPoint g sp expr = - FirstEmittedCodeWillBeDebugPoint g sp expr || - EmitDebugPointForWholeExpr g sp expr - -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.EmitDebugPoint cgbuf (RangeOfDebugPointForWholeExpr g expr) - elif EmitHiddenCodeMarkerForWholeExpr g sp expr then - cgbuf.EmitStartOfHiddenCode() + | _, (Expr.Lambda _ | Expr.TyLambda _) -> false, None + | DebugPointAtBinding.Yes m, _ -> false, Some m //------------------------------------------------------------------------- // Generate expressions //------------------------------------------------------------------------- -let rec GenExpr cenv cgbuf eenv sp (expr: Expr) sequel = +let rec GenExpr cenv cgbuf eenv (expr: Expr) sequel = cenv.stackGuard.Guard <| fun () -> - GenExprAux cenv cgbuf eenv sp expr sequel + GenExprAux cenv cgbuf eenv expr sequel /// Process the debug point and check for alternative ways to generate this expression. /// Returns 'true' if the expression was processed by alternative means. -and GenExprPreSteps (cenv: cenv) (cgbuf: CodeGenBuffer) eenv sp expr sequel = +and GenExprPreSteps (cenv: cenv) (cgbuf: CodeGenBuffer) eenv expr sequel = let g = cenv.g + + // Check for the '__debugPoint" construct for inlined code + match expr with + | Expr.Sequential((DebugPointExpr g debugPointName) as dpExpr, codeExpr, NormalSeq, m) -> + match cenv.namedDebugPointsForInlinedCode.TryGetValue({Range=m; Name=debugPointName}) with + | false, _ -> + // printfn $"---- Unfound debug point {debugPointName} at {m}" + // for KeyValue(k,v) in cenv.namedDebugPointsForInlinedCode do + // printfn $"{k.Range} , {k.Name} -> {v}" + let others = + [ for k in cenv.namedDebugPointsForInlinedCode.Keys do + if Range.equals m k.Range then + yield k.Name ] + |> String.concat "," + informationalWarning(Error(FSComp.SR.ilxGenUnknownDebugPoint(debugPointName, others), dpExpr.Range)) + | true, dp -> + // printfn $"---- Found debug point {debugPointName} at {m} --> {dp}" + CG.EmitDebugPoint cgbuf dp + GenExpr cenv cgbuf eenv codeExpr sequel + true + + | _ -> - ProcessDebugPointForExpr cenv cgbuf sp expr + //ProcessDebugPointForExpr cenv cgbuf expr match (if compileSequenceExpressions then LowerComputedListOrArrayExpr cenv.tcVal g cenv.amap expr else None) with | Some altExpr -> - GenExpr cenv cgbuf eenv sp altExpr sequel + GenExpr cenv cgbuf eenv altExpr sequel true | None -> @@ -2510,7 +2364,7 @@ and GenExprPreSteps (cenv: cenv) (cgbuf: CodeGenBuffer) eenv sp expr sequel = | LoweredStateMachineResult.UseAlternative (msg, altExpr) -> checkLanguageFeatureError cenv.g.langVersion LanguageFeature.ResumableStateMachines expr.Range warning(Error(FSComp.SR.reprStateMachineNotCompilable(msg), expr.Range)) - GenExpr cenv cgbuf eenv sp altExpr sequel + GenExpr cenv cgbuf eenv altExpr sequel true | LoweredStateMachineResult.NoAlternative msg -> checkLanguageFeatureError cenv.g.langVersion LanguageFeature.ResumableStateMachines expr.Range @@ -2520,17 +2374,17 @@ and GenExprPreSteps (cenv: cenv) (cgbuf: CodeGenBuffer) eenv sp expr sequel = | LoweredStateMachineResult.NotAStateMachine -> match expr with | IfUseResumableStateMachinesExpr g (_thenExpr, elseExpr) -> - GenExpr cenv cgbuf eenv sp elseExpr sequel + GenExpr cenv cgbuf eenv elseExpr sequel true | _ -> false -and GenExprAux (cenv: cenv) (cgbuf: CodeGenBuffer) eenv sp expr sequel = +and GenExprAux (cenv: cenv) (cgbuf: CodeGenBuffer) eenv expr (sequel: sequel) = let g = cenv.g let expr = stripExpr expr // Process the debug point and see if there's a replacement technique to process this expression - if GenExprPreSteps cenv cgbuf eenv sp expr sequel then () else + if GenExprPreSteps cenv cgbuf eenv expr sequel then () else match expr with // Most generation of linear expressions is implemented routinely using tailcalls and the correct sequels. @@ -2540,7 +2394,11 @@ and GenExprAux (cenv: cenv) (cgbuf: CodeGenBuffer) eenv sp expr sequel = | Expr.Let _ | LinearOpExpr _ | Expr.Match _ -> - GenLinearExpr cenv cgbuf eenv sp expr sequel false id |> ignore + GenLinearExpr cenv cgbuf eenv expr sequel false id |> ignore + + | Expr.DebugPoint (DebugPointAtLeafExpr.Yes m, innerExpr) -> + CG.EmitDebugPoint cgbuf m + GenExpr cenv cgbuf eenv innerExpr sequel | Expr.Const (c, m, ty) -> GenConstant cenv cgbuf eenv (c, m, ty) sequel @@ -2560,7 +2418,7 @@ and GenExprAux (cenv: cenv) (cgbuf: CodeGenBuffer) eenv sp expr sequel = | _ -> false ) -> // application of local type functions with type parameters = measure types and body = local value - inline the body - GenExpr cenv cgbuf eenv sp v sequel + GenExpr cenv cgbuf eenv v sequel | Expr.App (f, fty, tyargs, curriedArgs, m) -> GenApp cenv cgbuf eenv (f, fty, tyargs, curriedArgs, m) sequel @@ -2614,8 +2472,8 @@ and GenExprAux (cenv: cenv) (cgbuf: CodeGenBuffer) eenv sp expr sequel = GenAsmCode cenv cgbuf eenv (instrs, tyargs, args, retTypes, m) sequel | TOp.While (sp, _), [Expr.Lambda (_, _, _, [_], e1, _, _);Expr.Lambda (_, _, _, [_], e2, _, _)], [] -> GenWhileLoop cenv cgbuf eenv (sp, e1, e2, m) sequel - | TOp.For (spStart, dir), [Expr.Lambda (_, _, _, [_], e1, _, _);Expr.Lambda (_, _, _, [_], e2, _, _);Expr.Lambda (_, _, _, [v], e3, _, _)], [] -> - GenForLoop cenv cgbuf eenv (spStart, v, e1, dir, e2, e3, m) sequel + | TOp.IntegerForLoop (spFor, spTo, dir), [Expr.Lambda (_, _, _, [_], e1, _, _);Expr.Lambda (_, _, _, [_], e2, _, _);Expr.Lambda (_, _, _, [v], e3, _, _)], [] -> + GenIntegerForLoop cenv cgbuf eenv (spFor, spTo, v, e1, dir, e2, e3, m) sequel | TOp.TryFinally (spTry, spFinally), [Expr.Lambda (_, _, _, [_], e1, _, _); Expr.Lambda (_, _, _, [_], e2, _, _)], [resty] -> GenTryFinally cenv cgbuf eenv (e1, e2, m, resty, spTry, spFinally) sequel | TOp.TryWith (spTry, spWith), [Expr.Lambda (_, _, _, [_], e1, _, _); Expr.Lambda (_, _, _, [vf], ef, _, _);Expr.Lambda (_, _, _, [vh], eh, _, _)], [resty] -> @@ -2650,7 +2508,7 @@ and GenExprAux (cenv: cenv) (cgbuf: CodeGenBuffer) eenv sp expr sequel = CG.EmitInstr cgbuf (pop 0) Push0 (I_br label) // NOTE: discard sequel | TOp.Return, [e], _ -> - GenExpr cenv cgbuf eenv SPSuppress e eenv.exitSequel + GenExpr cenv cgbuf eenv e eenv.exitSequel // NOTE: discard sequel | TOp.Return, [], _ -> GenSequel cenv eenv.cloc cgbuf ReturnVoid @@ -2681,13 +2539,13 @@ and GenExprAux (cenv: cenv) (cgbuf: CodeGenBuffer) eenv sp expr sequel = | Expr.TyChoose (_, _, m) -> error(InternalError("Unexpected Expr.TyChoose", m)) and GenExprs cenv cgbuf eenv es = - List.iter (fun e -> GenExpr cenv cgbuf eenv SPSuppress e Continue) es + List.iter (fun e -> GenExpr cenv cgbuf eenv e Continue) es -and CodeGenMethodForExpr cenv mgbuf (spReq, entryPointInfo, methodName, eenv, alreadyUsedArgs, selfArgOpt, expr0, sequel0) = +and CodeGenMethodForExpr cenv mgbuf (entryPointInfo, methodName, eenv, alreadyUsedArgs, selfArgOpt, expr0, sequel0) = let eenv = { eenv with exitSequel = sequel0 } let _, code = CodeGenMethod cenv mgbuf (entryPointInfo, methodName, eenv, alreadyUsedArgs, selfArgOpt, - (fun cgbuf eenv -> GenExpr cenv cgbuf eenv spReq expr0 sequel0), + (fun cgbuf eenv -> GenExpr cenv cgbuf eenv expr0 sequel0), expr0.Range) code @@ -2793,7 +2651,7 @@ and GenConstant cenv cgbuf eenv (c, m, ty) sequel = | None -> match TryEliminateDesugaredConstants g m c with | Some e -> - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue | None -> let emitInt64Constant i = // see https://github.com/dotnet/fsharp/pull/3620 @@ -2886,7 +2744,7 @@ and GenGetTupleField cenv cgbuf eenv (tupInfo, e, tys, n, m) sequel = elast else getCompiledTupleItem g (elast, tysB, n-goodTupleFields, m) - GenExpr cenv cgbuf eenv SPSuppress (getCompiledTupleItem cenv.g (e, tys, n, m)) sequel + GenExpr cenv cgbuf eenv (getCompiledTupleItem cenv.g (e, tys, n, m)) sequel and GenAllocExn cenv cgbuf eenv (c, args, m) sequel = GenExprs cenv cgbuf eenv args @@ -2908,26 +2766,17 @@ and GenAllocUnionCase cenv cgbuf eenv (c,tyargs,args,m) sequel = GenAllocUnionCaseCore cenv cgbuf eenv (c,tyargs,args.Length,m) GenSequel cenv eenv.cloc cgbuf sequel -and GenLinearExpr cenv cgbuf eenv sp expr sequel preSteps (contf: FakeUnit -> FakeUnit) = +and GenLinearExpr cenv cgbuf eenv expr sequel preSteps (contf: FakeUnit -> FakeUnit) = let expr = stripExpr expr match expr with - | Expr.Sequential (e1, e2, specialSeqFlag, spSeq, _) -> + | Expr.Sequential (e1, e2, specialSeqFlag, _) -> // 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 debug points on both - // left and right of the sequence - let spStmt, spExpr = - match spSeq with - | DebugPointAtSequential.SuppressNeither -> SPAlways, SPAlways - | DebugPointAtSequential.SuppressStmt -> SPSuppress, sp - | DebugPointAtSequential.SuppressExpr -> sp, SPSuppress - | DebugPointAtSequential.SuppressBoth -> SPSuppress, SPSuppress + if preSteps && GenExprPreSteps cenv cgbuf eenv expr sequel then contf Fake else match specialSeqFlag with | NormalSeq -> - GenExpr cenv cgbuf eenv spStmt e1 discard - GenLinearExpr cenv cgbuf eenv spExpr e2 sequel true contf + GenExpr cenv cgbuf eenv e1 discard + GenLinearExpr cenv cgbuf eenv e2 sequel true contf | ThenDoSeq -> // "e then ()" with DebugPointAtSequential.SuppressStmt is used // in mkDebugPoint to emit a debug point on "e". However we don't want this to interfere @@ -2935,52 +2784,41 @@ and GenLinearExpr cenv cgbuf eenv sp expr sequel preSteps (contf: FakeUnit -> Fa // worked out "spExpr" up above. match e2 with | Expr.Const (Const.Unit, _, _) -> - GenExpr cenv cgbuf eenv spExpr e1 sequel + GenExpr cenv cgbuf eenv e1 sequel | _ -> let g = cenv.g let isUnit = isUnitTy g (tyOfExpr g e1) if isUnit then - GenExpr cenv cgbuf eenv spExpr e1 discard - GenExpr cenv cgbuf eenv spStmt e2 discard + GenExpr cenv cgbuf eenv e1 discard + GenExpr cenv cgbuf eenv e2 discard GenUnitThenSequel cenv eenv e2.Range eenv.cloc cgbuf sequel else - GenExpr cenv cgbuf eenv spExpr e1 Continue - GenExpr cenv cgbuf eenv spStmt e2 discard + GenExpr cenv cgbuf eenv e1 Continue + GenExpr cenv cgbuf eenv e2 discard GenSequel cenv eenv.cloc cgbuf sequel contf Fake | Expr.Let (bind, body, _, _) -> // 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 + if preSteps && GenExprPreSteps cenv cgbuf eenv expr sequel then contf Fake else // This case implemented here to get a guaranteed tailcall // Make sure we generate the debug point outside the scope of the variable let startMark, endMark 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 startMark) - - // 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 debug point in the body - let spBody = - match bind.DebugPoint with - | DebugPointAtBinding.Yes _ - | DebugPointAtBinding.NoneAtLet - | DebugPointAtBinding.NoneAtDo -> SPAlways - | DebugPointAtBinding.NoneAtInvisible -> sp - | DebugPointAtBinding.NoneAtSticky -> SPSuppress + GenDebugPointForBind cenv cgbuf bind + GenBindingAfterDebugPoint cenv cgbuf eenv bind false (Some startMark) // Generate the body - GenLinearExpr cenv cgbuf eenv spBody body (EndLocalScope(sequel, endMark)) true contf + GenLinearExpr cenv cgbuf eenv body (EndLocalScope(sequel, endMark)) true contf | Expr.Match (spBind, _exprm, tree, targets, m, ty) -> // 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 + if preSteps && GenExprPreSteps cenv cgbuf eenv expr sequel then contf Fake else match spBind with | DebugPointAtBinding.Yes m -> CG.EmitDebugPoint cgbuf m - | DebugPointAtBinding.NoneAtDo + | DebugPointAtBinding.ImplicitAtDo | DebugPointAtBinding.NoneAtLet | DebugPointAtBinding.NoneAtInvisible | DebugPointAtBinding.NoneAtSticky -> () @@ -3021,18 +2859,22 @@ and GenLinearExpr cenv cgbuf eenv sp expr sequel preSteps (contf: FakeUnit -> Fa GenSequel cenv eenv.cloc cgbuf sequelAfterJoin Fake)) + | Expr.DebugPoint (DebugPointAtLeafExpr.Yes m, innerExpr) -> + CG.EmitDebugPoint cgbuf m + GenLinearExpr cenv cgbuf eenv innerExpr sequel true contf + | LinearOpExpr (TOp.UnionCase c, tyargs, argsFront, argLast, m) -> // 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 + if preSteps && GenExprPreSteps cenv cgbuf eenv expr sequel then contf Fake else GenExprs cenv cgbuf eenv argsFront - GenLinearExpr cenv cgbuf eenv SPSuppress argLast Continue true (contf << (fun Fake -> + GenLinearExpr cenv cgbuf eenv argLast Continue true (contf << (fun Fake -> GenAllocUnionCaseCore cenv cgbuf eenv (c, tyargs, argsFront.Length + 1, m) GenSequel cenv eenv.cloc cgbuf sequel Fake)) | _ -> - GenExpr cenv cgbuf eenv sp expr sequel + GenExpr cenv cgbuf eenv expr sequel contf Fake and GenAllocRecd cenv cgbuf eenv ctorInfo (tcref,argtys,args,m) sequel = @@ -3048,7 +2890,7 @@ and GenAllocRecd cenv cgbuf eenv ctorInfo (tcref,argtys,args,m) sequel = | RecdExprIsObjInit -> (args, relevantFields) ||> List.iter2 (fun e f -> CG.EmitInstr cgbuf (pop 0) (Push (if tcref.IsStructOrEnumTycon then [ILType.Byref ty] else [ty])) mkLdarg0 - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue GenFieldStore false cenv cgbuf eenv (tcref.MakeNestedRecdFieldRef f, argtys, m) discard) // Object construction doesn't generate a true value. // Object constructions will always just get thrown away so this is safe @@ -3077,7 +2919,7 @@ and GenGetAnonRecdField cenv cgbuf eenv (anonInfo: AnonRecdTypeInfo, e, tyargs, let ilTypeArgs = GenTypeArgs cenv.amap m eenv.tyenv tyargs let anonMethod = anonMethods.[n] let anonFieldType = ilTypeArgs.[n] - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue CG.EmitInstr cgbuf (pop 1) (Push [anonFieldType]) (mkNormalCall (mkILMethSpec(anonMethod, boxity, ilTypeArgs, []))) GenSequel cenv eenv.cloc cgbuf sequel @@ -3092,7 +2934,7 @@ and GenNewArraySimple cenv cgbuf eenv (elems, elemTy, m) sequel = CG.EmitInstrs cgbuf (pop 0) (Push [ilArrTy]) [ (AI_ldc (DT_I4, ILConst.I4 elems.Length)); I_newarr (ILArrayShape.SingleDimensional, ilElemTy) ] elems |> List.iteri (fun i e -> CG.EmitInstrs cgbuf (pop 0) (Push [ilArrTy; cenv.g.ilg.typ_Int32]) [ AI_dup; (AI_ldc (DT_I4, ILConst.I4 i)) ] - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue CG.EmitInstr cgbuf (pop 3) Push0 (I_stelem_any (ILArrayShape.SingleDimensional, ilElemTy))) GenSequel cenv eenv.cloc cgbuf sequel @@ -3107,9 +2949,9 @@ and GenNewArray cenv cgbuf eenv (elems: Expr list, elemTy, m) sequel = GenNewArraySimple cenv cgbuf eenv (elems, elemTy, m) sequel else // Try to emit a constant byte-blob array - let elems' = Array.ofList elems + let elemsArray = Array.ofList elems let test, write = - match elems'.[0] with + match stripDebugPoints elemsArray.[0] with | Expr.Const (Const.Bool _, _, _) -> (function Const.Bool _ -> true | _ -> false), (fun (buf: ByteBuffer) -> function Const.Bool b -> buf.EmitBoolAsByte b | _ -> failwith "unreachable") @@ -3142,9 +2984,9 @@ and GenNewArray cenv cgbuf eenv (elems: Expr list, elemTy, m) sequel = (fun buf -> function Const.Int64 b -> buf.EmitInt64 b | _ -> failwith "unreachable") | _ -> (function _ -> false), (fun _ _ -> failwith "unreachable") - if elems' |> Array.forall (function Expr.Const (c, _, _) -> test c | _ -> false) then + if elemsArray |> Array.forall (function Expr.Const (c, _, _) -> test c | _ -> false) then let ilElemTy = GenType cenv.amap m eenv.tyenv elemTy - GenConstArray cenv cgbuf eenv ilElemTy elems' (fun buf -> function Expr.Const (c, _, _) -> write buf c | _ -> failwith "unreachable") + GenConstArray cenv cgbuf eenv ilElemTy elemsArray (fun buf -> function Expr.Const (c, _, _) -> write buf c | _ -> failwith "unreachable") GenSequel cenv eenv.cloc cgbuf sequel else @@ -3158,16 +3000,16 @@ and GenCoerce cenv cgbuf eenv (e, tgty, m, srcty) sequel = TypeFeasiblySubsumesType 0 g cenv.amap m tgty NoCoerce srcty then if isInterfaceTy g tgty then - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue let ilToTy = GenType cenv.amap m eenv.tyenv tgty // Section "III.1.8.1.3 Merging stack states" of ECMA-335 implies that no unboxing // is required, but we still push the coerced type on to the code gen buffer. CG.EmitInstrs cgbuf (pop 1) (Push [ilToTy]) [] GenSequel cenv eenv.cloc cgbuf sequel else - GenExpr cenv cgbuf eenv SPSuppress e sequel + GenExpr cenv cgbuf eenv e sequel else - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue if not (isObjTy g srcty) then let ilFromTy = GenType cenv.amap m eenv.tyenv srcty CG.EmitInstrs cgbuf (pop 1) (Push [g.ilg.typ_Object]) [ I_box ilFromTy ] @@ -3186,7 +3028,7 @@ and GenReraise cenv cgbuf eenv (rtnty, m) sequel = GenSequel cenv eenv.cloc cgbuf sequel and GenGetExnField cenv cgbuf eenv (e, ecref, fieldNum, m) sequel = - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue let exnc = stripExnEqns ecref let ty = GenExnType cenv.amap m eenv.tyenv ecref CG.EmitInstrs cgbuf (pop 0) Push0 [ I_castclass ty] @@ -3200,14 +3042,14 @@ and GenGetExnField cenv cgbuf eenv (e, ecref, fieldNum, m) sequel = GenSequel cenv eenv.cloc cgbuf sequel and GenSetExnField cenv cgbuf eenv (e, ecref, fieldNum, e2, m) sequel = - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue let exnc = stripExnEqns ecref let ty = GenExnType cenv.amap m eenv.tyenv ecref CG.EmitInstrs cgbuf (pop 0) Push0 [ I_castclass ty ] let fld = List.item fieldNum exnc.TrueInstanceFieldsAsList let ftyp = GenType cenv.amap m eenv.tyenv fld.FormalType let ilFieldName = ComputeFieldName exnc fld - GenExpr cenv cgbuf eenv SPSuppress e2 Continue + GenExpr cenv cgbuf eenv e2 Continue CG.EmitInstr cgbuf (pop 2) Push0 (mkNormalStfld(mkILFieldSpecInTy (ty, ilFieldName, ftyp))) GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel @@ -3223,7 +3065,7 @@ and UnionCodeGen (cgbuf: CodeGenBuffer) = and GenUnionCaseProof cenv cgbuf eenv (e, ucref, tyargs, m) sequel = let g = cenv.g - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue let cuspec, idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs let fty = EraseUnions.GetILTypeForAlternative cuspec idx let avoidHelpers = entityRefInThisAssembly g.compilingFslib ucref.TyconRef @@ -3235,7 +3077,7 @@ and GenGetUnionCaseField cenv cgbuf eenv (e, ucref, tyargs, n, m) sequel = let g = cenv.g assert (ucref.Tycon.IsStructOrEnumTycon || isProvenUnionCaseTy (tyOfExpr g e)) - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue let cuspec, idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs let fty = actualTypOfIlxUnionField cuspec idx n let avoidHelpers = entityRefInThisAssembly g.compilingFslib ucref.TyconRef @@ -3246,7 +3088,7 @@ and GenGetUnionCaseFieldAddr cenv cgbuf eenv (e, ucref, tyargs, n, m) sequel = let g = cenv.g assert (ucref.Tycon.IsStructOrEnumTycon || isProvenUnionCaseTy (tyOfExpr g e)) - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue let cuspec, idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs let fty = actualTypOfIlxUnionField cuspec idx n let avoidHelpers = entityRefInThisAssembly g.compilingFslib ucref.TyconRef @@ -3255,7 +3097,7 @@ and GenGetUnionCaseFieldAddr cenv cgbuf eenv (e, ucref, tyargs, n, m) sequel = and GenGetUnionCaseTag cenv cgbuf eenv (e, tcref, tyargs, m) sequel = let g = cenv.g - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue let cuspec = GenUnionSpec cenv.amap m eenv.tyenv tcref tyargs let avoidHelpers = entityRefInThisAssembly g.compilingFslib tcref EraseUnions.emitLdDataTag g.ilg (UnionCodeGen cgbuf) (avoidHelpers, cuspec) @@ -3264,17 +3106,17 @@ and GenGetUnionCaseTag cenv cgbuf eenv (e, tcref, tyargs, m) sequel = and GenSetUnionCaseField cenv cgbuf eenv (e, ucref, tyargs, n, e2, m) sequel = let g = cenv.g - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue let cuspec, idx = GenUnionCaseSpec cenv.amap m eenv.tyenv ucref tyargs let avoidHelpers = entityRefInThisAssembly g.compilingFslib ucref.TyconRef EraseUnions.emitCastData g.ilg (UnionCodeGen cgbuf) (false, avoidHelpers, cuspec, idx) CG.EmitInstrs cgbuf (pop 1) (Push [cuspec.DeclaringType]) [ ] // push/pop to match the line above - GenExpr cenv cgbuf eenv SPSuppress e2 Continue + GenExpr cenv cgbuf eenv e2 Continue CG.EmitInstrs cgbuf (pop 2) Push0 (EraseUnions.mkStData (cuspec, idx, n)) GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel and GenGetRecdFieldAddr cenv cgbuf eenv (e, f, tyargs, m) sequel = - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue let fref = GenRecdFieldRef m cenv eenv.tyenv f tyargs CG.EmitInstrs cgbuf (pop 1) (Push [ILType.Byref fref.ActualType]) [ I_ldflda fref ] GenSequel cenv eenv.cloc cgbuf sequel @@ -3285,13 +3127,13 @@ and GenGetStaticFieldAddr cenv cgbuf eenv (f, tyargs, m) sequel = GenSequel cenv eenv.cloc cgbuf sequel and GenGetRecdField cenv cgbuf eenv (e, f, tyargs, m) sequel = - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue GenFieldGet false cenv cgbuf eenv (f, tyargs, m) GenSequel cenv eenv.cloc cgbuf sequel and GenSetRecdField cenv cgbuf eenv (e1, f, tyargs, e2, m) sequel = - GenExpr cenv cgbuf eenv SPSuppress e1 Continue - GenExpr cenv cgbuf eenv SPSuppress e2 Continue + GenExpr cenv cgbuf eenv e1 Continue + GenExpr cenv cgbuf eenv e2 Continue GenFieldStore false cenv cgbuf eenv (f, tyargs, m) sequel and GenGetStaticField cenv cgbuf eenv (f, tyargs, m) sequel = @@ -3299,7 +3141,7 @@ and GenGetStaticField cenv cgbuf eenv (f, tyargs, m) sequel = GenSequel cenv eenv.cloc cgbuf sequel and GenSetStaticField cenv cgbuf eenv (f, tyargs, e2, m) sequel = - GenExpr cenv cgbuf eenv SPSuppress e2 Continue + GenExpr cenv cgbuf eenv e2 Continue GenFieldStore true cenv cgbuf eenv (f, tyargs, m) sequel and mk_field_pops isStatic n = if isStatic then pop n else pop (n+1) @@ -3342,12 +3184,12 @@ and GenUntupledArgsDiscardingLoneUnit cenv cgbuf eenv m numObjArgs curriedArgInf // new C() | [[]], [arg] when numObjArgs = 0 -> assert isUnitTy g (tyOfExpr g arg) - GenExpr cenv cgbuf eenv SPSuppress arg discard + GenExpr cenv cgbuf eenv arg discard // obj.M() | [[_];[]], [arg1;arg2] when numObjArgs = 1 -> assert isUnitTy g (tyOfExpr g arg2) - GenExpr cenv cgbuf eenv SPSuppress arg1 Continue - GenExpr cenv cgbuf eenv SPSuppress arg2 discard + GenExpr cenv cgbuf eenv arg1 Continue + GenExpr cenv cgbuf eenv arg2 discard | _ -> (curriedArgInfos, args) ||> List.iter2 (fun argInfos x -> GenUntupledArgExpr cenv cgbuf eenv m argInfos x) @@ -3359,11 +3201,11 @@ and GenUntupledArgExpr cenv cgbuf eenv m argInfos expr = if numRequiredExprs = 0 then () elif numRequiredExprs = 1 then - GenExpr cenv cgbuf eenv SPSuppress expr Continue + GenExpr cenv cgbuf eenv expr Continue elif isRefTupleExpr expr then let es = tryDestRefTupleExpr expr if es.Length <> numRequiredExprs then error(InternalError("GenUntupledArgExpr (2)", m)) - es |> List.iter (fun x -> GenExpr cenv cgbuf eenv SPSuppress x Continue) + es |> List.iter (fun x -> GenExpr cenv cgbuf eenv x Continue) else let ty = tyOfExpr g expr let locv, loce = mkCompGenLocal m "arg" ty @@ -3395,7 +3237,7 @@ and GenWitnessArgFromTraitInfo cenv cgbuf eenv m traitInfo = failwith "unexpected non-generation of witness " | Choice2Of2 arg -> let eenv = { eenv with suppressWitnesses = true } - GenExpr cenv cgbuf eenv SPSuppress arg Continue + GenExpr cenv cgbuf eenv arg Continue | Some storage -> let ty = GenWitnessTy g traitInfo.TraitKey GenGetStorageAndSequel cenv cgbuf eenv m (ty, GenType cenv.amap m eenv.tyenv ty) storage None @@ -3433,7 +3275,7 @@ and GenWitnessArgs cenv cgbuf eenv m tps tyargs = | Choice1Of2 traitInfo -> GenWitnessArgFromTraitInfo cenv cgbuf eenv m traitInfo | Choice2Of2 arg -> - GenExpr cenv cgbuf eenv SPSuppress arg Continue + GenExpr cenv cgbuf eenv arg Continue and IsBranchTailcall (cenv: cenv) eenv (v: ValRef, tyargs, curriedArgs: _ list) sequel = let g = cenv.g @@ -3461,7 +3303,7 @@ and IsBranchTailcall (cenv: cenv) eenv (v: ValRef, tyargs, curriedArgs: _ list) and GenApp (cenv: cenv) cgbuf eenv (f, fty, tyargs, curriedArgs, m) sequel = let g = cenv.g - match (f, tyargs, curriedArgs) with + match (stripDebugPoints f, tyargs, curriedArgs) with // Look for tailcall to turn into branch | Expr.Val (v, _, _), _, _ when IsBranchTailcall cenv eenv (v, tyargs, curriedArgs) sequel -> let kind, mark = ListAssoc.find g.valRefEq v eenv.innerVals // already checked above in when guard @@ -3521,8 +3363,8 @@ and GenApp (cenv: cenv) cgbuf eenv (f, fty, tyargs, curriedArgs, m) sequel = (valRefEq g v g.reference_equality_inner_vref) && isAppTy g ty -> - GenExpr cenv cgbuf eenv SPSuppress arg1 Continue - GenExpr cenv cgbuf eenv SPSuppress arg2 Continue + GenExpr cenv cgbuf eenv arg1 Continue + GenExpr cenv cgbuf eenv arg2 Continue CG.EmitInstr cgbuf (pop 2) (Push [g.ilg.typ_Bool]) AI_ceq GenSequel cenv eenv.cloc cgbuf sequel @@ -3539,12 +3381,12 @@ and GenApp (cenv: cenv) cgbuf eenv (f, fty, tyargs, curriedArgs, m) sequel = // // The token for the "GenericMethodDefinition" is loaded | Expr.Val (v, _, m), _, [arg] when valRefEq g v g.methodhandleof_vref -> - let (|OptionalCoerce|) = function Expr.Op (TOp.Coerce _, _, [arg], _) -> arg | x -> x - let (|OptionalTyapp|) = function Expr.App (f, _, [_], [], _) -> f | x -> x - match arg with + let (|OptionalCoerce|) x = match stripDebugPoints x with Expr.Op (TOp.Coerce _, _, [arg], _) -> arg | x -> x + let (|OptionalTyapp|) x = match stripDebugPoints x with Expr.App (f, _, [_], [], _) -> f | x -> x + match stripDebugPoints arg with // Generate ldtoken instruction for "methodhandleof(fun (a, b, c) -> f(a, b, c))" // where f is an F# function value or F# method - | Expr.Lambda (_, _, _, _, Expr.App (OptionalCoerce(OptionalTyapp(Expr.Val (vref, _, _))), _, _, _, _), _, _) -> + | Expr.Lambda (_, _, _, _, DebugPoints(Expr.App (OptionalCoerce(OptionalTyapp(Expr.Val (vref, _, _))), _, _, _, _), _), _, _) -> let storage = StorageForValRef g m vref eenv match storage with @@ -3555,7 +3397,7 @@ and GenApp (cenv: cenv) cgbuf eenv (f, fty, tyargs, curriedArgs, m) sequel = // Generate ldtoken instruction for "methodhandleof(fun (a, b, c) -> obj.M(a, b, c))" // where M is an IL method. - | Expr.Lambda (_, _, _, _, Expr.Op (TOp.ILCall (_, _, isStruct, _, _, _, _, ilMethRef, enclTypeInst, methInst, _), _, _, _), _, _) -> + | Expr.Lambda (_, _, _, _, DebugPoints (Expr.Op (TOp.ILCall (_, _, isStruct, _, _, _, _, ilMethRef, enclTypeInst, methInst, _), _, _, _), _), _, _) -> let boxity = (if isStruct then AsValue else AsObject) let mkFormalParams gparams = gparams |> DropErasedTyargs |> List.mapi (fun n _gf -> mkILTyvarTy (uint16 n)) @@ -3675,7 +3517,7 @@ and GenApp (cenv: cenv) cgbuf eenv (f, fty, tyargs, curriedArgs, m) sequel = assert(g.CompilerGlobalState |> Option.isSome) g.CompilerGlobalState.Value.IlxGenNiceNameGenerator.FreshCompilerGeneratedName ("arg", m), ilTy, false let loc, _realloc, eenv = AllocLocal cenv cgbuf eenv true locName scopeMarks - GenExpr cenv cgbuf eenv SPSuppress laterArg Continue + GenExpr cenv cgbuf eenv laterArg Continue EmitSetLocal cgbuf loc Choice1Of2 (ilTy, loc), eenv else @@ -3701,7 +3543,7 @@ and GenApp (cenv: cenv) cgbuf eenv (f, fty, tyargs, curriedArgs, m) sequel = //printfn "%d EXTRA ARGS IN TOP APP at %s" laterArgs.Length (stringOfRange m) whereSaved |> List.iter (function | Choice1Of2 (ilTy, loc) -> EmitGetLocal cgbuf ilTy loc - | Choice2Of2 expr -> GenExpr cenv cgbuf eenv SPSuppress expr Continue) + | Choice2Of2 expr -> GenExpr cenv cgbuf eenv expr Continue) GenIndirectCall cenv cgbuf eenv (actualRetTy, [], laterArgs, m) sequel) | _ -> failwith "??" @@ -3715,7 +3557,7 @@ and GenApp (cenv: cenv) cgbuf eenv (f, fty, tyargs, curriedArgs, m) sequel = | _ -> (* worst case: generate a first-class function value and call *) - GenExpr cenv cgbuf eenv SPSuppress f Continue + GenExpr cenv cgbuf eenv f Continue GenCurriedArgsAndIndirectCall cenv cgbuf eenv (fty, tyargs, curriedArgs, m) sequel and CanTailcall (hasStructObjArg, ccallInfo, withinSEH, hasByrefArg, mustGenerateUnitAfterCall, isDllImport, isSelfInit, makesNoCriticalTailcalls, sequel) = @@ -3913,11 +3755,10 @@ and GenIndirectCall cenv cgbuf eenv (functy, tyargs, curriedArgs, m) sequel = and GenTry cenv cgbuf eenv scopeMarks (e1, m, resultTy, spTry) = let g = cenv.g - let sp = - match spTry with - | DebugPointAtTry.Yes m -> CG.EmitDebugPoint cgbuf m; SPAlways - | DebugPointAtTry.Body -> SPAlways - | DebugPointAtTry.No -> SPSuppress + + match spTry with + | DebugPointAtTry.Yes m -> CG.EmitDebugPoint cgbuf m + | DebugPointAtTry.No -> () let stack, eenvinner = EmitSaveStack cenv cgbuf eenv m scopeMarks let startTryMark = CG.GenerateMark cgbuf "startTryMark" @@ -3942,11 +3783,8 @@ 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 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 debug point - GenExpr cenv cgbuf eenvinner sp e1 exitSequel + // Generate the body of the try. + GenExpr cenv cgbuf eenvinner e1 exitSequel CG.SetMarkToHere cgbuf endTryMark let tryMarks = (startTryMark.CodeLabel, endTryMark.CodeLabel) whereToSaveOpt, eenvinner, stack, tryMarks, afterHandler @@ -3980,7 +3818,6 @@ and GenTryWith cenv cgbuf eenv (e1, vf: Val, ef, vh: Val, eh, m, resty, spTry, s | DebugPointAtWith.Yes m -> CG.EmitDebugPoint cgbuf m | DebugPointAtWith.No -> () - CG.SetStack cgbuf [g.ilg.typ_Object] let _, eenvinner = AllocLocalVal cenv cgbuf vf eenvinner None (startOfFilter, afterFilter) CG.EmitInstr cgbuf (pop 1) (Push [g.iltyp_Exception]) (I_castclass g.iltyp_Exception) @@ -3989,7 +3826,7 @@ and GenTryWith cenv cgbuf eenv (e1, vf: Val, ef, vh: Val, eh, m, resty, spTry, s // 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 + GenExpr cenv cgbuf eenvinner ef sequelOnBranches CG.SetMarkToHere cgbuf afterJoin CG.SetStack cgbuf stackAfterJoin GenSequel cenv eenv.cloc cgbuf sequelAfterJoin @@ -4005,7 +3842,7 @@ and GenTryWith cenv cgbuf eenv (e1, vf: Val, ef, vh: Val, eh, m, resty, spTry, s GenStoreVal cenv cgbuf eenvinner vh.Range vh let exitSequel = LeaveHandler (false, whereToSaveOpt, afterHandler, true) - GenExpr cenv cgbuf eenvinner SPAlways eh exitSequel + GenExpr cenv cgbuf eenvinner eh exitSequel let endOfHandler = CG.GenerateMark cgbuf "endOfHandler" let handlerMarks = (startOfHandler.CodeLabel, endOfHandler.CodeLabel) @@ -4025,7 +3862,7 @@ and GenTryWith cenv cgbuf eenv (e1, vf: Val, ef, vh: Val, eh, m, resty, spTry, s let exitSequel = LeaveHandler (false, whereToSaveOpt, afterHandler, true) let eenvinner = { eenvinner with exitSequel = exitSequel } - GenExpr cenv cgbuf eenvinner SPAlways eh exitSequel + GenExpr cenv cgbuf eenvinner eh exitSequel let endOfHandler = CG.GenerateMark cgbuf "endOfHandler" let handlerMarks = (startOfHandler.CodeLabel, endOfHandler.CodeLabel) @@ -4063,14 +3900,12 @@ and GenTryFinally cenv cgbuf eenv (bodyExpr, handlerExpr, m, resty, spTry, spFin let startOfHandler = CG.GenerateMark cgbuf "startOfHandler" CG.SetStack cgbuf [] - let sp = - match spFinally with - | DebugPointAtFinally.Yes m -> CG.EmitDebugPoint cgbuf m; SPAlways - | DebugPointAtFinally.Body -> SPAlways - | DebugPointAtFinally.No -> SPSuppress + match spFinally with + | DebugPointAtFinally.Yes m -> CG.EmitDebugPoint cgbuf m + | DebugPointAtFinally.No -> () let exitSequel = LeaveHandler (true, whereToSaveOpt, afterHandler, true) - GenExpr cenv cgbuf eenvinner sp handlerExpr exitSequel + GenExpr cenv cgbuf eenvinner handlerExpr exitSequel let endOfHandler = CG.GenerateMark cgbuf "endOfHandler" let handlerMarks = (startOfHandler.CodeLabel, endOfHandler.CodeLabel) cgbuf.EmitExceptionClause @@ -4095,7 +3930,7 @@ and GenTryFinally cenv cgbuf eenv (bodyExpr, handlerExpr, m, resty, spTry, spFin // Generate for-loop //-------------------------------------------------------------------------- -and GenForLoop cenv cgbuf eenv (spFor, v, e1, dir, e2, loopBody, m) sequel = +and GenIntegerForLoop cenv cgbuf eenv (spFor, spTo, v, e1, dir, e2, loopBody, m) sequel = let eenv = SetIsInLoop true eenv let g = cenv.g @@ -4131,10 +3966,10 @@ and GenForLoop cenv cgbuf eenv (spFor, v, e1, dir, e2, loopBody, m) sequel = | DebugPointAtFor.Yes spStart -> CG.EmitDebugPoint cgbuf spStart | DebugPointAtFor.No -> () - GenExpr cenv cgbuf eenv SPSuppress e1 Continue + GenExpr cenv cgbuf eenv e1 Continue GenStoreVal cenv cgbuf eenvinner m v if isFSharpStyle then - GenExpr cenv cgbuf eenvinner SPSuppress e2 Continue + GenExpr cenv cgbuf eenvinner e2 Continue EmitSetLocal cgbuf finishIdx EmitGetLocal cgbuf g.ilg.typ_Int32 finishIdx GenGetLocalVal cenv cgbuf eenvinner e2.Range v None @@ -4143,10 +3978,14 @@ and GenForLoop cenv cgbuf eenv (spFor, v, e1, dir, e2, loopBody, m) sequel = else CG.EmitInstr cgbuf (pop 0) Push0 (I_br test.CodeLabel) + cgbuf.EmitStartOfHiddenCode() + // .inner CG.SetMarkToHere cgbuf inner + // - GenExpr cenv cgbuf eenvinner SPAlways loopBody discard + GenExpr cenv cgbuf eenvinner loopBody discard + // v++ or v-- GenGetLocalVal cenv cgbuf eenvinner e2.Range v None @@ -4160,9 +3999,9 @@ and GenForLoop cenv cgbuf eenv (spFor, v, e1, dir, e2, loopBody, m) sequel = // FSharpForLoopUp: if v <> e2 + 1 then goto .inner // FSharpForLoopDown: if v <> e2 - 1 then goto .inner // CSharpStyle: if v < e2 then goto .inner - match spFor with - | DebugPointAtFor.Yes spStart -> CG.EmitDebugPoint cgbuf spStart - | DebugPointAtFor.No -> () //CG.EmitDebugPoint cgbuf e2.Range + match spTo with + | DebugPointAtInOrTo.Yes spStart -> CG.EmitDebugPoint cgbuf spStart + | DebugPointAtInOrTo.No -> () GenGetLocalVal cenv cgbuf eenvinner e2.Range v None @@ -4175,7 +4014,7 @@ and GenForLoop cenv cgbuf eenv (spFor, v, e1, dir, e2, loopBody, m) sequel = CG.EmitInstr cgbuf (pop 1) Push0 (if isUp then AI_add else AI_sub) GenSequel cenv eenv.cloc cgbuf e2Sequel else - GenExpr cenv cgbuf eenv SPSuppress e2 e2Sequel + GenExpr cenv cgbuf eenv e2 e2Sequel // .finish - loop-exit here CG.SetMarkToHere cgbuf finish @@ -4191,20 +4030,18 @@ and GenForLoop cenv cgbuf eenv (spFor, v, e1, dir, e2, loopBody, m) sequel = and GenWhileLoop cenv cgbuf eenv (spWhile, condExpr, bodyExpr, m) sequel = let eenv = SetIsInLoop true eenv let finish = CG.GenerateDelayMark cgbuf "while_finish" - let startTest = CG.GenerateMark cgbuf "startTest" - let spCondition = - match spWhile with - | DebugPointAtWhile.Yes spStart -> CG.EmitDebugPoint cgbuf spStart; SPSuppress - | DebugPointAtWhile.No -> SPSuppress + match spWhile with + | DebugPointAtWhile.Yes spStart -> CG.EmitDebugPoint cgbuf spStart + | DebugPointAtWhile.No -> () + + let startTest = CG.GenerateMark cgbuf "startTest" - // 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 condExpr (CmpThenBrOrContinue (pop 1, [ I_brcmp(BI_brfalse, finish.CodeLabel) ])) - GenExpr cenv cgbuf eenv SPAlways bodyExpr (DiscardThen (Br startTest)) + GenExpr cenv cgbuf eenv bodyExpr (DiscardThen (Br startTest)) CG.SetMarkToHere cgbuf finish - // SEQUENCE POINTS: Emit a debug point to cover 'done' if present GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel //-------------------------------------------------------------------------- @@ -4280,11 +4117,11 @@ and GenAsmCode cenv cgbuf eenv (il, tyargs, args, returnTys, m) sequel = _) -> let bi = match bi with BI_brtrue -> BI_brfalse | _ -> BI_brtrue - GenExpr cenv cgbuf eenv SPSuppress arg1 (CmpThenBrOrContinue(pop 1, [ I_brcmp (bi, label1) ])) + 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 SPSuppress arg1 Continue + GenExpr cenv cgbuf eenv arg1 Continue CG.EmitInstr cgbuf (pop 1) Push0 I_ret GenSequelEndScopes cgbuf sequel @@ -4303,7 +4140,7 @@ and GenAsmCode cenv cgbuf eenv (il, tyargs, args, returnTys, m) sequel = match sequelIgnoreEndScopes sequel with | s when IsSequelImmediate s -> (* In most cases we can avoid doing this... *) - GenExpr cenv cgbuf eenv SPSuppress arg1 Continue + GenExpr cenv cgbuf eenv arg1 Continue CG.EmitInstr cgbuf (pop 1) Push0 I_throw GenSequelEndScopes cgbuf sequel | _ -> @@ -4316,7 +4153,7 @@ and GenAsmCode cenv cgbuf eenv (il, tyargs, args, returnTys, m) sequel = CG.EmitInstrs cgbuf (pop 0) (Push [ilRetTy]) [AI_ldnull; I_unbox_any ilRetTy; I_br after3.CodeLabel ] CG.SetMarkToHere cgbuf after2 - GenExpr cenv cgbuf eenv SPSuppress arg1 Continue + GenExpr cenv cgbuf eenv arg1 Continue CG.EmitInstr cgbuf (pop 1) Push0 I_throw CG.SetMarkToHere cgbuf after3 GenSequel cenv eenv.cloc cgbuf sequel @@ -4413,7 +4250,7 @@ and GenQuotation cenv cgbuf eenv (ast, qdataCell, m, ety) sequel = mkCallCastQuotation g m (List.head (argsOfAppTy g ety)) deserializeExpr else deserializeExpr - GenExpr cenv cgbuf eenv SPSuppress afterCastExpr sequel + GenExpr cenv cgbuf eenv afterCastExpr sequel //-------------------------------------------------------------------------- // Generate calls to IL methods @@ -4498,17 +4335,17 @@ and GenTraitCall (cenv: cenv) cgbuf eenv (traitInfo: TraitConstraintInfo, argExp let exnArg = mkString g m (FSComp.SR.ilDynamicInvocationNotSupported(traitInfo.MemberName)) let exnExpr = MakeNotSupportedExnExpr cenv eenv (exnArg, m) let replacementExpr = mkThrow m (tyOfExpr g expr) exnExpr - GenExpr cenv cgbuf eenv SPSuppress replacementExpr sequel + GenExpr cenv cgbuf eenv replacementExpr sequel | Some expr -> let expr = cenv.optimizeDuringCodeGen false expr - GenExpr cenv cgbuf eenv SPSuppress expr sequel + GenExpr cenv cgbuf eenv expr sequel //-------------------------------------------------------------------------- // Generate byref-related operations //-------------------------------------------------------------------------- and GenGetAddrOfRefCellField cenv cgbuf eenv (e, ty, m) sequel = - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue let fref = GenRecdFieldRef m cenv eenv.tyenv (mkRefCellContentsRef cenv.g) [ty] CG.EmitInstrs cgbuf (pop 1) (Push [ILType.Byref fref.ActualType]) [ I_ldflda fref ] GenSequel cenv eenv.cloc cgbuf sequel @@ -4547,7 +4384,7 @@ and GenGetByref cenv cgbuf eenv (v: ValRef, m) sequel = and GenSetByref cenv cgbuf eenv (v: ValRef, e, m) sequel = GenGetLocalVRef cenv cgbuf eenv m v None - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue let ilty = GenType cenv.amap m eenv.tyenv (destByrefTy cenv.g v.Type) CG.EmitInstrs cgbuf (pop 2) Push0 [ mkNormalStobj ilty ] GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel @@ -4784,7 +4621,7 @@ and GenObjectMethod cenv eenvinner (cgbuf: CodeGenBuffer) useMethodImpl tmethod let sequel = (if slotSigHasVoidReturnTy slotsig then discardAndReturnVoid else Return) - let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways, [], nameOfOverridenMethod, eenvForMeth, 0, selfArgOpt, methBodyExpr, sequel) + let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf ([], nameOfOverridenMethod, eenvForMeth, 0, selfArgOpt, methBodyExpr, sequel) let nameOfOverridingMethod, methodImplGenerator = GenMethodImpl cenv eenvinner (useMethodImpl, slotsig) methBodyExpr.Range @@ -4896,7 +4733,7 @@ and GenStructStateMachine cenv cgbuf eenvouter (res: LoweredStateMachine) sequel let eenvinner = eenvinner |> AddStorageForLocalVals g (thisVals |> List.map (fun v -> (v.Deref, Arg 0))) let eenvinner = eenvinner |> AddStorageForLocalVals g (argVals |> List.mapi (fun i v -> v, Arg (i+1))) let sequel = if retTy.IsNone then discardAndReturnVoid else Return - let ilCode = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPSuppress, [], imethName, eenvinner, 1+argVals.Length, None, bodyR, sequel) + let ilCode = CodeGenMethodForExpr cenv cgbuf.mgbuf ([], imethName, eenvinner, 1+argVals.Length, None, bodyR, sequel) let ilParams = (ilArgTys,argVals) ||> List.map2 (fun ty v -> mkILParamNamed(v.LogicalName, ty)) mkILNonGenericVirtualMethod(imethName, ILMemberAccess.Public, ilParams, mkILReturn ilRetTy, MethodBody.IL (notlazy ilCode)) ] @@ -4995,7 +4832,7 @@ and GenStructStateMachine cenv cgbuf eenvouter (res: LoweredStateMachine) sequel CG.EmitInstr cgbuf (pop 2) (Push [ ]) (mkNormalStfld (mkILFieldSpecInTy (ilCloTy, ilv.fvName, ilv.fvType))) // Generate the start expression - GenExpr cenv cgbuf eenvouter SPSuppress afterCodeBody sequel + GenExpr cenv cgbuf eenvouter afterCodeBody sequel ) @@ -5020,7 +4857,8 @@ and GenObjectExpr cenv cgbuf eenvouter objExpr (baseType, baseValOpt, basecall, let ilTyForOverriding = mkILBoxedTy ilCloTypeRef ilCloGenericActuals let eenvinner = bindBaseOrThisVarOpt cenv eenvinner baseValOpt - let ilCtorBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways, [], cloName, eenvinner, 1, None, basecall, discardAndReturnVoid) + + let ilCtorBody = CodeGenMethodForExpr cenv cgbuf.mgbuf ([], cloName, eenvinner, 1, None, basecall, discardAndReturnVoid) let genMethodAndOptionalMethodImpl tmethod useMethodImpl = [ for (useMethodImpl, methodImplGeneratorFunction, methTyparsOfOverridingMethod), mdef in GenObjectMethod cenv eenvinner cgbuf useMethodImpl tmethod do @@ -5107,29 +4945,23 @@ and GenSequenceExpr |> AddNonUserCompilerGeneratedAttribs g let closeMethod = - // 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, None, closeExpr, discardAndReturnVoid) + let ilCode = CodeGenMethodForExpr cenv cgbuf.mgbuf ([], "Close", eenvinner, 1, None, closeExpr, discardAndReturnVoid) mkILNonGenericVirtualMethod("Close", ILMemberAccess.Public, [], mkILReturn ILType.Void, MethodBody.IL (lazy ilCode)) let checkCloseMethod = - // 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, None, checkCloseExpr, Return) + let ilCode = CodeGenMethodForExpr cenv cgbuf.mgbuf ([], "get_CheckClose", eenvinner, 1, None, checkCloseExpr, Return) mkILNonGenericVirtualMethod("get_CheckClose", ILMemberAccess.Public, [], mkILReturn g.ilg.typ_Bool, MethodBody.IL (lazy ilCode)) let generateNextMethod = - // 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) ] let ilParams = [mkILParamNamed("next", ILType.Byref ilCloEnumerableTy)] let ilReturn = mkILReturn g.ilg.typ_Int32 - let ilCode = MethodBody.IL (lazy (CodeGenMethodForExpr cenv cgbuf.mgbuf (spReq, [], "GenerateNext", eenvinner, 2, None, generateNextExpr, Return))) + let ilCode = MethodBody.IL (lazy (CodeGenMethodForExpr cenv cgbuf.mgbuf ([], "GenerateNext", eenvinner, 2, None, generateNextExpr, Return))) mkILNonGenericVirtualMethod("GenerateNext", ILMemberAccess.Public, ilParams, ilReturn, ilCode) let lastGeneratedMethod = - let ilCode = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPSuppress, [], "get_LastGenerated", eenvinner, 1, None, exprForValRef m currvref, Return) + let ilCode = CodeGenMethodForExpr cenv cgbuf.mgbuf ([], "get_LastGenerated", eenvinner, 1, None, exprForValRef m currvref, Return) mkILNonGenericVirtualMethod("get_LastGenerated", ILMemberAccess.Public, [], mkILReturn ilCloSeqElemTy, MethodBody.IL (lazy ilCode)) |> AddNonUserCompilerGeneratedAttribs g @@ -5201,7 +5033,7 @@ and GenClosureTypeDefs cenv (tref: ILTypeRef, ilGenParams, attrs, ilCloAllFreeVa .WithEncoding(ILDefaultPInvokeEncoding.Auto) .WithInitSemantics(ILTypeInit.BeforeField) - let tdefs = EraseClosures.convIlxClosureDef g.ilxPubCloEnv tref.Enclosing tdef cloInfo + let tdefs = EraseClosures.convIlxClosureDef g.ilxPubCloEnv cenv.opts.generateDebugSymbols tref.Enclosing tdef cloInfo tdefs and GenStaticDelegateClosureTypeDefs cenv (tref: ILTypeRef, ilGenParams, attrs, ilCloAllFreeVars, ilCloLambdas, ilCtorBody, mdefs, mimpls, ext, ilIntfTys, staticCloInfo) = @@ -5239,7 +5071,7 @@ and GenClosureAsLocalTypeFunction cenv (cgbuf: CodeGenBuffer) eenv thisVars expr | _ -> failwith "AdjustNamedLocalTypeFuncIlxClosureInfo: local functions can currently only be type functions" strip cloinfo.ilCloLambdas - let ilCloBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways, entryPointInfo, cloinfo.cloName, eenvinner, 1, None, body, Return) + let ilCloBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (entryPointInfo, cloinfo.cloName, eenvinner, 1, None, body, Return) let ilCtorBody = mkILMethodBody (true, [], 8, nonBranchingInstrsToCode (mkCallBaseConstructor(g.ilg.typ_Object, [])), None, eenv.imports) let cloMethods = [ mkILGenericVirtualMethod("DirectInvoke", ILMemberAccess.Assembly, ilDirectGenericParams, ilDirectWitnessParams, mkILReturn ilCloFormalReturnTy, MethodBody.IL(lazy ilCloBody)) ] @@ -5251,8 +5083,7 @@ and GenClosureAsFirstClassFunction cenv (cgbuf: CodeGenBuffer) eenv thisVars m e let cloinfo, body, eenvinner = GetIlxClosureInfo cenv m ILBoxity.AsObject false true thisVars eenv expr let entryPointInfo = thisVars |> List.map (fun v -> (v, BranchCallClosure (cloinfo.cloArityInfo))) let ilCloTypeRef = cloinfo.cloSpec.TypeRef - - let ilCloBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways, entryPointInfo, cloinfo.cloName, eenvinner, 1, None, body, Return) + let ilCloBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (entryPointInfo, cloinfo.cloName, eenvinner, 1, None, body, Return) let cloTypeDefs = GenClosureTypeDefs cenv (ilCloTypeRef, cloinfo.cloILGenericParams, [], cloinfo.ilCloAllFreeVars, cloinfo.ilCloLambdas, ilCloBody, [], [], g.ilg.typ_Object, [], Some cloinfo.cloSpec) cloinfo, ilCloTypeRef, cloTypeDefs @@ -5550,7 +5381,8 @@ and GenDelegateExpr cenv cgbuf eenvouter expr (TObjExprMethod(TSlotSig(_, delega let ilDelegeeParams, ilDelegeeRet = GenActualSlotsig m cenv envForDelegeeUnderTypars slotsig methTyparsOfOverridingMethod tmvs let envForDelegeeMeth = AddStorageForLocalVals g (List.mapi (fun i v -> (v, Arg (i+numthis))) tmvs) envForDelegeeUnderTypars - let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPAlways, [], delegeeMethName, envForDelegeeMeth, 1, None, body, (if slotSigHasVoidReturnTy slotsig then discardAndReturnVoid else Return)) + + let ilMethodBody = CodeGenMethodForExpr cenv cgbuf.mgbuf ([], delegeeMethName, envForDelegeeMeth, 1, None, body, (if slotSigHasVoidReturnTy slotsig then discardAndReturnVoid else Return)) let delegeeInvokeMeth = (if useStaticClosure then mkILNonGenericStaticMethod else mkILNonGenericInstanceMethod) (delegeeMethName, @@ -5618,7 +5450,7 @@ and GenStaticOptimization cenv cgbuf eenv (constraints, e2, e3, _m) sequel = e2 else e3 - GenExpr cenv cgbuf eenv SPSuppress e sequel + GenExpr cenv cgbuf eenv e sequel //------------------------------------------------------------------------- // Generate discrimination trees @@ -5681,8 +5513,8 @@ and GenPostponedDecisionTreeTargets cenv cgbuf targetInfos stackAtTargets sequel match targetInfos with | [] -> contf Fake | targetInfo :: rest -> - let eenvAtTarget, spExprAtTarget, exprAtTarget, sequelAtTarget = GenDecisionTreeTarget cenv cgbuf stackAtTargets targetInfo sequel - GenLinearExpr cenv cgbuf eenvAtTarget spExprAtTarget exprAtTarget sequelAtTarget true (fun Fake -> + let eenvAtTarget, exprAtTarget, sequelAtTarget = GenDecisionTreeTarget cenv cgbuf stackAtTargets targetInfo sequel + GenLinearExpr cenv cgbuf eenvAtTarget exprAtTarget sequelAtTarget true (fun Fake -> GenPostponedDecisionTreeTargets cenv cgbuf rest stackAtTargets sequel contf ) @@ -5697,8 +5529,8 @@ and GenDecisionTreeAndTargetsInner cenv cgbuf inplabOpt stackAtTargets eenv tree cgbuf.SetMarkToHereIfNecessary inplabOpt let startMark, endMark as scopeMarks = StartDelayedLocalScope "dtreeBind" cgbuf let eenv = AllocStorageForBind cenv cgbuf scopeMarks eenv bind - let sp = GenDebugPointForBind cenv cgbuf bind - GenBindingAfterDebugPoint cenv cgbuf eenv sp bind false (Some startMark) + GenDebugPointForBind cenv cgbuf bind + GenBindingAfterDebugPoint cenv cgbuf eenv bind false (Some startMark) // We don't get the scope marks quite right for dtree-bound variables. This is because // we effectively lose an EndLocalScope for all dtrees that go to the same target @@ -5709,8 +5541,8 @@ and GenDecisionTreeAndTargetsInner cenv cgbuf inplabOpt stackAtTargets eenv tree | TDSuccess(es, targetIdx) -> 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) + | Some (eenvAtTarget, exprAtTarget, sequelAtTarget) -> + GenLinearExpr cenv cgbuf eenvAtTarget exprAtTarget sequelAtTarget true (fun Fake -> contf targetInfos) | _ -> contf targetInfos @@ -5731,11 +5563,11 @@ and GetTarget (targets:_[]) n = /// 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) targetInfos sequel = - let (TTarget(vs, successExpr, spTarget, stateVarFlagsOpt)) = GetTarget targets targetIdx + let (TTarget(vs, successExpr, stateVarFlagsOpt)) = 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] @@ -5755,7 +5587,7 @@ and GenDecisionTreeSuccess cenv cgbuf inplabOpt stackAtTargets eenv es targetIdx GetStoreValCtxt cenv cgbuf eenvAtTarget v // Emit the expression - GenBindingRhs cenv cgbuf eenv SPSuppress v e) + GenBindingRhs cenv cgbuf eenv v e) vs |> List.rev |> List.iter (fun v -> // Store the results @@ -5795,7 +5627,7 @@ and GenDecisionTreeSuccess cenv cgbuf inplabOpt stackAtTargets eenv es targetIdx let eenvAtTarget = AllocStorageForBinds cenv cgbuf scopeMarks eenv binds - let targetInfo = (targetMarkBeforeBinds, targetMarkAfterBinds, eenvAtTarget, successExpr, spTarget, vs, es, stateVarFlagsOpt, startMark, endMark) + let targetInfo = (targetMarkBeforeBinds, targetMarkAfterBinds, eenvAtTarget, successExpr, vs, es, stateVarFlagsOpt, startMark, endMark) let targetCount = targetCounts.[targetIdx] @@ -5822,9 +5654,8 @@ and GenDecisionTreeSuccess cenv cgbuf inplabOpt stackAtTargets eenv es targetIdx targetInfos, genTargetInfoOpt and GenDecisionTreeTarget cenv cgbuf stackAtTargets targetInfo sequel = - let targetMarkBeforeBinds, targetMarkAfterBinds, eenvAtTarget, successExpr, spTarget, vs, es, stateVarFlagsOpt, startMark, endMark = targetInfo + let targetMarkBeforeBinds, targetMarkAfterBinds, eenvAtTarget, successExpr, vs, es, stateVarFlagsOpt, startMark, endMark = targetInfo CG.SetMarkToHere cgbuf targetMarkBeforeBinds - let spExpr = (match spTarget with DebugPointAtTarget.Yes -> SPAlways | DebugPointAtTarget.No _ -> SPSuppress) cgbuf.EmitStartOfHiddenCode() @@ -5833,7 +5664,7 @@ and GenDecisionTreeTarget cenv cgbuf stackAtTargets targetInfo sequel = GenBindings cenv cgbuf eenvAtTarget binds stateVarFlagsOpt CG.SetMarkToHere cgbuf targetMarkAfterBinds CG.SetStack cgbuf stackAtTargets - (eenvAtTarget, spExpr, successExpr, (EndLocalScope(sequel, endMark))) + (eenvAtTarget, successExpr, (EndLocalScope(sequel, endMark))) and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defaultTargetOpt switchm targets targetCounts targetInfos sequel contf = let g = cenv.g @@ -5885,10 +5716,10 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau let bi = match firstDiscrim with | DecisionTreeTest.Const(Const.Zero) -> - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue BI_brfalse | DecisionTreeTest.IsNull -> - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue let srcTy = tyOfExpr g e if isTyparTy g srcTy then let ilFromTy = GenType cenv.amap m eenv.tyenv srcTy @@ -5896,7 +5727,7 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau BI_brfalse | DecisionTreeTest.IsInst (_srcty, tgty) -> let e = mkCallTypeTest g m tgty e - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue BI_brtrue | _ -> failwith "internal error: GenDecisionTreeSwitch" CG.EmitInstr cgbuf (pop 1) Push0 (I_brcmp (bi, (List.head caseLabels).CodeLabel)) @@ -5904,7 +5735,7 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau | DecisionTreeTest.ActivePatternCase _ -> error(InternalError("internal error in codegen: DecisionTreeTest.ActivePatternCase", switchm)) | DecisionTreeTest.UnionCase (hdc, tyargs) -> - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue let cuspec = GenUnionSpec cenv.amap m eenv.tyenv hdc.TyconRef tyargs let dests = if cases.Length <> caseLabels.Length then failwith "internal error: DecisionTreeTest.UnionCase" @@ -5919,7 +5750,7 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau GenDecisionTreeCases cenv cgbuf stackAtTargets eenv defaultTargetOpt targets targetCounts targetInfos sequel caseLabels cases contf | DecisionTreeTest.Const c -> - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue match c with | Const.Bool _ -> failwith "should have been done earlier" | Const.SByte _ @@ -5993,13 +5824,13 @@ and GenDecisionTreeTest cenv cloc cgbuf stackAtTargets e tester isNullTest eenv not isNullTest && isNil es1 && isNil es2 && (match GetTarget targets n1, GetTarget targets n2 with - | TTarget(_, BoolExpr b1, _, _), TTarget(_, BoolExpr b2, _, _) -> b1 = not b2 + | TTarget(_, BoolExpr b1, _), TTarget(_, BoolExpr b2, _) -> b1 = not b2 | _ -> false) -> match GetTarget targets n1, GetTarget targets n2 with - | TTarget(_, BoolExpr b1, _, _), _ -> - GenExpr cenv cgbuf eenv SPSuppress e Continue + | TTarget(_, BoolExpr b1, _), _ -> + GenExpr cenv cgbuf eenv e Continue match tester with | Some (pops, pushes, i) -> match i with @@ -6030,7 +5861,7 @@ and GenDecisionTreeTest cenv cloc cgbuf stackAtTargets e tester isNullTest eenv // OK, there is more logic in the decision tree on the failure branch 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) ])) + GenExpr cenv cgbuf eenv e (CmpThenBrOrContinue(pop 1, [ I_brcmp (testForSuccess, success.CodeLabel) ])) 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 ) @@ -6042,7 +5873,7 @@ and GenDecisionTreeTest cenv cloc cgbuf stackAtTargets e tester isNullTest eenv // logic first. 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) ])) + GenExpr cenv cgbuf eenv e (CmpThenBrOrContinue(pop 1, [ I_brcmp (testForFailure, failure.CodeLabel) ])) 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 ) @@ -6050,7 +5881,7 @@ and GenDecisionTreeTest cenv cloc cgbuf stackAtTargets e tester isNullTest eenv // Turn 'isdata' tests that branch into EI_brisdata tests | Some (_, _, Choice1Of2 (avoidHelpers, cuspec, idx)) -> 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))) + GenExpr cenv cgbuf eenv e (CmpThenBrOrContinue(pop 1, EraseUnions.mkBrIsData g.ilg false (avoidHelpers, cuspec, idx, failure.CodeLabel))) 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 @@ -6058,7 +5889,7 @@ and GenDecisionTreeTest cenv cloc cgbuf stackAtTargets e tester isNullTest eenv | Some (pops, pushes, i) -> let failure = CG.GenerateDelayMark cgbuf "testFailure" - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue match i with | Choice1Of2 (avoidHelpers, cuspec, idx) -> CG.EmitInstrs cgbuf pops pushes (EraseUnions.mkIsData g.ilg (avoidHelpers, cuspec, idx)) | Choice2Of2 i -> CG.EmitInstr cgbuf pops pushes i @@ -6070,9 +5901,9 @@ and GenDecisionTreeTest cenv cloc cgbuf stackAtTargets e tester isNullTest eenv /// Generate fixups for letrec bindings and GenLetRecFixup cenv cgbuf eenv (ilxCloSpec: IlxClosureSpec, e, ilField: ILFieldSpec, e2, _m) = - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue CG.EmitInstrs cgbuf (pop 0) Push0 [ I_castclass ilxCloSpec.ILType ] - GenExpr cenv cgbuf eenv SPSuppress e2 Continue + GenExpr cenv cgbuf eenv e2 Continue CG.EmitInstrs cgbuf (pop 2) Push0 [ mkNormalStfld (mkILFieldSpec(ilField.FieldRef, ilxCloSpec.ILType)) ] /// Generate letrec bindings @@ -6112,7 +5943,7 @@ and GenLetRecBindings cenv (cgbuf: CodeGenBuffer) eenv (allBinds: Bindings, m) = let fv = vref.Deref let needsFixup = Zset.contains fv forwardReferenceSet if needsFixup then - let fixup = (boundv, fv, (fun () -> GenExpr cenv cgbuf eenv SPSuppress (set e) discard)) + let fixup = (boundv, fv, (fun () -> GenExpr cenv cgbuf eenv (set e) discard)) fixups.Value <- fixup :: fixups.Value | _ -> failwith "compute real fixup vars" @@ -6155,20 +5986,19 @@ and GenLetRec cenv cgbuf eenv (binds, body, m) sequel = let _, endMark as scopeMarks = StartLocalScope "letrec" cgbuf let eenv = AllocStorageForBinds cenv cgbuf scopeMarks eenv binds GenLetRecBindings cenv cgbuf eenv (binds, m) - GenExpr cenv cgbuf eenv SPAlways body (EndLocalScope(sequel, endMark)) + GenExpr cenv cgbuf eenv body (EndLocalScope(sequel, endMark)) //------------------------------------------------------------------------- // Generate simple bindings //------------------------------------------------------------------------- and GenDebugPointForBind cenv cgbuf bind = - let _, pt, sp = ComputeDebugPointForBinding cenv.g bind + let _, pt = ComputeDebugPointForBinding cenv.g bind pt |> Option.iter (CG.EmitDebugPoint cgbuf) - sp and GenBinding cenv cgbuf eenv (bind: Binding) (isStateVar: bool) = - let sp = GenDebugPointForBind cenv cgbuf bind - GenBindingAfterDebugPoint cenv cgbuf eenv sp bind isStateVar None + GenDebugPointForBind cenv cgbuf bind + GenBindingAfterDebugPoint cenv cgbuf eenv bind isStateVar None and ComputeMemberAccessRestrictedBySig eenv vspec = let isHidden = @@ -6184,8 +6014,9 @@ and ComputeMethodAccessRestrictedBySig eenv vspec = vspec.IsIncrClassGeneratedMember // compiler generated members for class function 'let' bindings get assembly visibility ComputeMemberAccess isHidden -and GenBindingAfterDebugPoint cenv cgbuf eenv sp (TBind(vspec, rhsExpr, _)) isStateVar startMarkOpt = +and GenBindingAfterDebugPoint cenv cgbuf eenv bind isStateVar startMarkOpt = let g = cenv.g + let (TBind(vspec, rhsExpr, _)) = bind // Record the closed reflection definition if publishing // There is no real reason we're doing this so late in the day @@ -6213,7 +6044,7 @@ and GenBindingAfterDebugPoint cenv cgbuf eenv sp (TBind(vspec, rhsExpr, _)) isSt match StorageForVal cenv.g m vspec eenv with | Null -> - GenExpr cenv cgbuf eenv SPSuppress rhsExpr discard + GenExpr cenv cgbuf eenv rhsExpr discard CommitStartScope cgbuf startMarkOpt // The initialization code for static 'let' and 'do' bindings gets compiled into the initialization .cctor for the whole file @@ -6221,7 +6052,7 @@ and GenBindingAfterDebugPoint cenv cgbuf eenv sp (TBind(vspec, rhsExpr, _)) isSt let tps, _, _, _, cctorBody, _ = IteratedAdjustArityOfLambda g cenv.amap vspec.ValReprInfo.Value rhsExpr let eenv = EnvForTypars tps eenv CommitStartScope cgbuf startMarkOpt - GenExpr cenv cgbuf eenv SPSuppress cctorBody discard + GenExpr cenv cgbuf eenv cctorBody discard | Method (topValInfo, _, mspec, mspecW, _, ctps, mtps, curriedArgInfos, paramInfos, witnessInfos, argTys, retInfo) when not isStateVar -> @@ -6260,7 +6091,7 @@ and GenBindingAfterDebugPoint cenv cgbuf eenv sp (TBind(vspec, rhsExpr, _)) isSt cgbuf.mgbuf.AddOrMergePropertyDef(ilGetterMethSpec.MethodRef.DeclaringTypeRef, ilPropDef, m) let ilMethodDef = - let ilCode = CodeGenMethodForExpr cenv cgbuf.mgbuf (SPSuppress, [], ilGetterMethSpec.Name, eenv, 0, None, rhsExpr, Return) + let ilCode = CodeGenMethodForExpr cenv cgbuf.mgbuf ([], ilGetterMethSpec.Name, eenv, 0, None, rhsExpr, Return) let ilMethodBody = MethodBody.IL(lazy ilCode) (mkILStaticMethod ([], ilGetterMethSpec.Name, access, [], mkILReturn ilTy, ilMethodBody)).WithSpecialName |> AddNonUserCompilerGeneratedAttribs g @@ -6352,7 +6183,7 @@ and GenBindingAfterDebugPoint cenv cgbuf eenv sp (TBind(vspec, rhsExpr, _)) isSt mkILStaticMethod([], ilSetterMethRef.Name, access, [mkILParamNamed("value", fty)], mkILReturn ILType.Void, body).WithSpecialName cgbuf.mgbuf.AddMethodDef(ilTypeRefForProperty, setterMethod) - GenBindingRhs cenv cgbuf eenv sp vspec rhsExpr + GenBindingRhs cenv cgbuf eenv vspec rhsExpr CommitStartScope cgbuf startMarkOpt match optShadowLocal with @@ -6373,7 +6204,7 @@ and GenBindingAfterDebugPoint cenv cgbuf eenv sp (TBind(vspec, rhsExpr, _)) isSt CommitStartScope cgbuf startMarkOpt | _ -> GetStoreValCtxt cenv cgbuf eenv vspec - GenBindingRhs cenv cgbuf eenv SPSuppress vspec rhsExpr + GenBindingRhs cenv cgbuf eenv vspec rhsExpr CommitStartScope cgbuf startMarkOpt GenStoreVal cenv cgbuf eenv vspec.Range vspec @@ -6828,7 +6659,7 @@ and GenMethodForBinding | [h] -> Some h | _ -> None - let ilCodeLazy = CodeGenMethodForExpr cenv mgbuf (SPAlways, tailCallInfo, mspec.Name, eenvForMeth, 0, selfValOpt, bodyExpr, sequel) + let ilCodeLazy = CodeGenMethodForExpr cenv mgbuf (tailCallInfo, mspec.Name, eenvForMeth, 0, selfValOpt, bodyExpr, sequel) // This is the main code generation for most methods false, MethodBody.IL(notlazy ilCodeLazy), false @@ -7074,7 +6905,7 @@ and GenBindings cenv cgbuf eenv binds stateVarFlagsOpt = and GenSetVal cenv cgbuf eenv (vref, e, m) sequel = let storage = StorageForValRef cenv.g m vref eenv GetStoreValCtxt cenv cgbuf eenv vref.Deref - GenExpr cenv cgbuf eenv SPSuppress e Continue + GenExpr cenv cgbuf eenv e Continue GenSetStorage vref.Range cgbuf storage GenUnitThenSequel cenv eenv m eenv.cloc cgbuf sequel @@ -7086,20 +6917,20 @@ and GenGetVal cenv cgbuf eenv (v: ValRef, m) sequel = GenGetValRefAndSequel cenv cgbuf eenv m v None GenSequel cenv eenv.cloc cgbuf sequel -and GenBindingRhs cenv cgbuf eenv sp (vspec: Val) expr = +and GenBindingRhs cenv cgbuf eenv (vspec: Val) expr = let g = cenv.g match expr with | Expr.TyLambda _ | Expr.Lambda _ -> match IsLocalErasedTyLambda g eenv vspec expr with | Some body -> - GenExpr cenv cgbuf eenv sp body Continue + GenExpr cenv cgbuf eenv body Continue | None -> let isLocalTypeFunc = IsNamedLocalTypeFuncVal g vspec expr let thisVars = if isLocalTypeFunc then [] else [ mkLocalValRef vspec ] GenLambda cenv cgbuf eenv isLocalTypeFunc thisVars expr Continue | _ -> - GenExpr cenv cgbuf eenv sp expr Continue + GenExpr cenv cgbuf eenv expr Continue and CommitStartScope cgbuf startMarkOpt = match startMarkOpt with @@ -7197,7 +7028,7 @@ and GenGetStorageAndSequel (cenv: cenv) cgbuf eenv m (ty, ilTy) storage storeSeq let specializedExpr = if isNil args && isNil tyargs' then failwith ("non-lambda at use of method " + vref.LogicalName) MakeApplicationAndBetaReduce cenv.g (expr, exprty, [tyargs'], args, m) - GenExpr cenv cgbuf eenv SPSuppress specializedExpr sequel + GenExpr cenv cgbuf eenv specializedExpr sequel | Null -> CG.EmitInstr cgbuf (pop 0) (Push [ilTy]) AI_ldnull @@ -7349,7 +7180,7 @@ and EmitRestoreStack cgbuf (savedStack, savedStackLocals) = and GenAttribArg amap g eenv x (ilArgTy: ILType) = let exprL expr = exprL g expr - match x, ilArgTy with + match stripDebugPoints x, ilArgTy with // Detect 'null' used for an array argument | Expr.Const (Const.Zero, _, _), ILType.Array _ -> ILAttribElem.Null @@ -7559,7 +7390,7 @@ and GenModuleDef cenv (cgbuf: CodeGenBuffer) qname lazyInitInfo eenv x = eenvinner | TMDefDo(e, _) -> - GenExpr cenv cgbuf eenv SPAlways e discard + GenExpr cenv cgbuf eenv e discard eenv | TMAbstract mexpr -> @@ -7609,7 +7440,7 @@ and GenModuleBinding cenv (cgbuf: CodeGenBuffer) (qname: QualifiedNameOfFile) la /// Generate the namespace fragments in a single file and GenImplFile cenv (mgbuf: AssemblyBuilder) mainInfoOpt eenv (implFile: TypedImplFileAfterOptimization) = - let (TImplFile (qname, _, mexpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = implFile.ImplFile + let (TImplFile (qname, _, mexpr, hasExplicitEntryPoint, isScript, anonRecdTypes, _)) = implFile.ImplFile let optimizeDuringCodeGen = implFile.OptimizeDuringCodeGen let g = cenv.g let m = qname.Range @@ -7696,8 +7527,8 @@ and GenImplFile cenv (mgbuf: AssemblyBuilder) mainInfoOpt eenv (implFile: TypedI if doesSomething then lazyInitInfo.Add (fun fspec feefee seqpt -> // This adds the explicit init of the .cctor to the explicit entry point main method - let ilDebugPoint = GenPossibleILSourceMarker cenv m - mgbuf.AddExplicitInitToSpecificMethodDef((fun md -> md.IsEntryPoint), tref, fspec, ilDebugPoint, eenv.imports, feefee, seqpt)) + let ilDebugRange = GenPossibleILDebugRange cenv m + mgbuf.AddExplicitInitToSpecificMethodDef((fun md -> md.IsEntryPoint), tref, fspec, ilDebugRange, eenv.imports, feefee, seqpt)) let cctorMethDef = mkILClassCtor (MethodBody.IL (lazy topCode)) mgbuf.AddMethodDef(initClassTy.TypeRef, cctorMethDef) @@ -7762,8 +7593,8 @@ and GenForceWholeFileInitializationAsPartOfCCtor cenv (mgbuf: AssemblyBuilder) ( // Authoring a .cctor with effects forces the cctor for the 'initialization' module by doing a dummy store & load of a field // Doing both a store and load keeps FxCop happier because it thinks the field is useful lazyInitInfo.Add (fun fspec feefee seqpt -> - let ilDebugPoint = GenPossibleILSourceMarker cenv m - mgbuf.AddExplicitInitToSpecificMethodDef((fun md -> md.Name = ".cctor"), tref, fspec, ilDebugPoint, imports, feefee, seqpt)) + let ilDebugRange = GenPossibleILDebugRange cenv m + mgbuf.AddExplicitInitToSpecificMethodDef((fun md -> md.Name = ".cctor"), tref, fspec, ilDebugRange, imports, feefee, seqpt)) /// Generate an Equals method. @@ -8880,12 +8711,21 @@ type IlxAssemblyGenerator(amap: ImportMap, tcGlobals: TcGlobals, tcVal: Constrai ilxGenEnv <- AddIncrementalLocalAssemblyFragmentToIlxGenEnv (amap, isIncrementalFragment, tcGlobals, ccu, fragName, intraAssemblyInfo, ilxGenEnv, typedImplFiles) /// Generate ILX code for an assembly fragment - member _.GenerateCode (codeGenOpts, typedAssembly, assemAttribs, moduleAttribs) = + member _.GenerateCode (codeGenOpts, typedAssembly: TypedAssemblyAfterOptimization, assemAttribs, moduleAttribs) = + let namedDebugPointsForInlinedCode = + let (TypedAssemblyAfterOptimization impls) = typedAssembly + [| for impl in impls do + let (TImplFile(namedDebugPointsForInlinedCode=dps)) = impl.ImplFile + for KeyValue(k,v) in dps do + yield (k,v) |] + |> Map let cenv: cenv = { g=tcGlobals tcVal = tcVal viewCcu = ccu ilUnitTy = None + namedDebugPointsForInlinedCode = namedDebugPointsForInlinedCode + //emittedPriorDebugPoints = HashSet() amap = amap casApplied = casApplied intraAssemblyInfo = intraAssemblyInfo diff --git a/src/fsharp/InnerLambdasToTopLevelFuncs.fs b/src/fsharp/InnerLambdasToTopLevelFuncs.fs index 9536978c39a..67c9b33aed6 100644 --- a/src/fsharp/InnerLambdasToTopLevelFuncs.fs +++ b/src/fsharp/InnerLambdasToTopLevelFuncs.fs @@ -1111,6 +1111,7 @@ module Pass4_RewriteAssembly = | LinearMatchExpr _ | Expr.LetRec _ // note, Expr.LetRec not normally considered linear, but keeping it here as it's always been here | Expr.Let _ + | Expr.DebugPoint _ | Expr.Sequential _ -> TransLinearExpr penv z expr (fun res -> res) @@ -1211,10 +1212,14 @@ module Pass4_RewriteAssembly = /// to represent the rebuild-the-term stack and TransLinearExpr penv z expr (contf: Expr * RewriteState -> Expr * RewriteState) = match expr with - | Expr.Sequential (e1, e2, dir, spSeq, m) -> + | Expr.Sequential (e1, e2, dir, m) -> let e1, z = TransExpr penv z e1 TransLinearExpr penv z e2 (contf << (fun (e2, z) -> - Expr.Sequential (e1, e2, dir, spSeq, m), z)) + Expr.Sequential (e1, e2, dir, m), z)) + + | Expr.DebugPoint (dpm, innerExpr) -> + TransLinearExpr penv z innerExpr (contf << (fun (innerExprR, z) -> + Expr.DebugPoint (dpm, innerExprR), z)) // letrec - pass_recbinds does the work | Expr.LetRec (binds, e, m, _) -> @@ -1251,12 +1256,12 @@ module Pass4_RewriteAssembly = let e = mkLetsFromBindings m rebinds e MakePreDecs m pds (mkLetsFromBindings m binds e), z)) - | LinearMatchExpr (spBind, exprm, dtree, tg1, e2, sp2, m2, ty) -> + | LinearMatchExpr (spBind, exprm, dtree, tg1, e2, m2, ty) -> let dtree, z = TransDecisionTree penv z dtree let tg1, z = TransDecisionTreeTarget penv z tg1 // tailcall TransLinearExpr penv z e2 (contf << (fun (e2, z) -> - rebuildLinearMatchExpr (spBind, exprm, dtree, tg1, e2, sp2, m2, ty), z)) + rebuildLinearMatchExpr (spBind, exprm, dtree, tg1, e2, m2, ty), z)) | LinearOpExpr (op, tyargs, argsHead, argLast, m) -> let argsHead,z = List.mapFold (TransExpr penv) z argsHead @@ -1300,11 +1305,11 @@ module Pass4_RewriteAssembly = let dflt, z = Option.mapFold (TransDecisionTree penv) z dflt TDSwitch (sp, e, cases, dflt, m), z - and TransDecisionTreeTarget penv z (TTarget(vs, e, spTarget, flags)) = + and TransDecisionTreeTarget penv z (TTarget(vs, e, flags)) = let z = EnterInner z let e, z = TransExpr penv z e let z = ExitInner z - TTarget(vs, e, spTarget, flags), z + TTarget(vs, e, flags), z and TransValBinding penv z bind = TransBindingRhs penv z bind @@ -1349,9 +1354,9 @@ module Pass4_RewriteAssembly = let rhs, z = TransModuleDef penv z rhs ModuleOrNamespaceBinding.Module(nm, rhs), z - let TransImplFile penv z (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = + let TransImplFile penv z (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = let moduleExpr, z = TransModuleExpr penv z moduleExpr - (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)), z + (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)), z //------------------------------------------------------------------------- // pass5: copyExpr diff --git a/src/fsharp/LowerCallsAndSeqs.fs b/src/fsharp/LowerCallsAndSeqs.fs index c8c19cbe03e..df0b97ec74e 100644 --- a/src/fsharp/LowerCallsAndSeqs.fs +++ b/src/fsharp/LowerCallsAndSeqs.fs @@ -13,6 +13,7 @@ open FSharp.Compiler.Infos open FSharp.Compiler.MethodCalls open FSharp.Compiler.Syntax open FSharp.Compiler.TcGlobals +open FSharp.Compiler.Text open FSharp.Compiler.TypeRelations open FSharp.Compiler.TypedTree open FSharp.Compiler.TypedTreeBasics @@ -137,12 +138,13 @@ let (|SeqAppend|_|) g expr = /// Detect a 'while gd do expr' within a 'seq { ... }' let (|SeqWhile|_|) g expr = match expr with - | ValApp g g.seq_generated_vref (_, [Expr.Lambda (_, _, _, [dummyv], gd, _, _);arg2], m) - when not (isVarFreeInExpr dummyv gd) -> + | ValApp g g.seq_generated_vref (_, [Expr.Lambda (_, _, _, [dummyv], guardExpr, _, _);innerExpr], m) + when not (isVarFreeInExpr dummyv guardExpr) -> - // The debug point for 'while' is attached to the second argument, see TcSequenceExpression - let mWhile = arg2.Range - Some (gd, arg2, mWhile, m) + // The debug point for 'while' is attached to the innerExpr, see TcSequenceExpression + let mWhile = innerExpr.Range + let spWhile = match mWhile.NotedSourceConstruct with NotedSourceConstruct.While -> DebugPointAtWhile.Yes mWhile | _ -> DebugPointAtWhile.No + Some (guardExpr, innerExpr, spWhile, m) | _ -> None @@ -156,8 +158,10 @@ let (|SeqTryFinally|_|) g expr = // respectively, see TcSequenceExpression let mTry = arg1.Range let mFinally = arg2.Range + let spTry = match mTry.NotedSourceConstruct with NotedSourceConstruct.Try -> DebugPointAtTry.Yes mTry | _ -> DebugPointAtTry.No + let spFinally = match mFinally.NotedSourceConstruct with NotedSourceConstruct.Finally -> DebugPointAtFinally.Yes mFinally | _ -> DebugPointAtFinally.No - Some (arg1, compensation, mTry, mFinally, m) + Some (arg1, compensation, spTry, spFinally, m) | _ -> None @@ -165,21 +169,25 @@ let (|SeqTryFinally|_|) g expr = let (|SeqUsing|_|) g expr = match expr with | ValApp g g.seq_using_vref ([_;_;elemTy], [resource;Expr.Lambda (_, _, _, [v], body, mBind, _)], m) -> - Some (resource, v, body, elemTy, mBind, m) + // The debug point mFor at the 'use x = ... ' gets attached to the lambda + let spBind = match mBind.NotedSourceConstruct with NotedSourceConstruct.Binding -> DebugPointAtBinding.Yes mBind | _ -> DebugPointAtBinding.NoneAtInvisible + Some (resource, v, body, elemTy, spBind, m) | _ -> None let (|SeqForEach|_|) g expr = match expr with // Nested for loops are represented by calls to Seq.collect - | ValApp g g.seq_collect_vref ([_inpElemTy;_enumty2;genElemTy], [Expr.Lambda (_, _, _, [v], body, mFor, _); inp], m) -> - // The debug point mFor at the 'for' gets attached to the first argument, see TcSequenceExpression - Some (inp, v, body, genElemTy, mFor, m) + | ValApp g g.seq_collect_vref ([_inpElemTy;_enumty2;genElemTy], [Expr.Lambda (_, _, _, [v], body, mIn, _); inp], mFor) -> + // The debug point mIn at the 'in' gets attached to the first argument, see TcSequenceExpression + let spIn = match mIn.NotedSourceConstruct with NotedSourceConstruct.InOrTo -> DebugPointAtInOrTo.Yes mIn | _ -> DebugPointAtInOrTo.No + Some (inp, v, body, genElemTy, mFor, mIn, spIn) // "for x in e -> e2" is converted to a call to Seq.map by the F# type checker. This could be removed, except it is also visible in F# quotations. - | ValApp g g.seq_map_vref ([_inpElemTy;genElemTy], [Expr.Lambda (_, _, _, [v], body, mFor, _); inp], m) -> + | ValApp g g.seq_map_vref ([_inpElemTy;genElemTy], [Expr.Lambda (_, _, _, [v], body, mIn, _); inp], mFor) -> + let spIn = match mIn.NotedSourceConstruct with NotedSourceConstruct.InOrTo -> DebugPointAtInOrTo.Yes mIn | _ -> DebugPointAtInOrTo.No // The debug point mFor at the 'for' gets attached to the first argument, see TcSequenceExpression - Some (inp, v, mkCallSeqSingleton g body.Range genElemTy body, genElemTy, mFor, m) + Some (inp, v, mkCallSeqSingleton g body.Range genElemTy body, genElemTy, mFor, mIn, spIn) | _ -> None @@ -252,18 +260,18 @@ let ConvertSequenceExprToObject g amap overallExpr = printfn "LowerSeq: found state variable %s" bind.Var.DisplayName let (TBind(v, e, sp)) = bind - let sp, spm = + let addDebugPoint e = match sp with - | DebugPointAtBinding.Yes m -> DebugPointAtSequential.SuppressNeither, m - | _ -> DebugPointAtSequential.SuppressStmt, e.Range + | DebugPointAtBinding.Yes m -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, e) + | _ -> e let vref = mkLocalValRef v { resBody with phase2 = (fun ctxt -> let generateBody, disposeBody, checkDisposeBody = resBody.phase2 ctxt let generate = - mkCompGenSequential m - (mkSequential sp m - (mkValSet spm vref e) + mkSequential m + (mkSequential m + (mkValSet m vref e |> addDebugPoint) generateBody) // zero out the current value to free up its memory (mkValSet m vref (mkDefault (m, vref.Type))) @@ -301,7 +309,7 @@ let ConvertSequenceExprToObject g amap overallExpr = let label = generateCodeLabel() Some { phase2 = (fun (pcVar, currVar, _nextv, pcMap) -> let generate = - mkSequential DebugPointAtSequential.SuppressNeither m + mkSequential m (mkValSet m pcVar (mkInt32 g m pcMap.[label])) (mkCompGenSequential m (mkValSet m currVar e) @@ -343,11 +351,11 @@ let ConvertSequenceExprToObject g amap overallExpr = Some { phase2 = (fun ctxt -> let generate1, dispose1, checkDispose1 = res1.phase2 ctxt let generate2, dispose2, checkDispose2 = res2.phase2 ctxt - let generate = mkSequential DebugPointAtSequential.SuppressNeither m generate1 generate2 + let generate = mkSequential m generate1 generate2 // Order shouldn't matter here, since disposals actions are linked together by goto's (each ends in a goto). // However leaving as is for now. - let dispose = mkCompGenSequential m dispose2 dispose1 - let checkDispose = mkCompGenSequential m checkDispose2 checkDispose1 + let dispose = mkSequential m dispose2 dispose1 + let checkDispose = mkSequential m checkDispose2 checkDispose1 generate, dispose, checkDispose) entryPoints= res1.entryPoints @ res2.entryPoints stateVars = res1.stateVars @ res2.stateVars @@ -356,9 +364,8 @@ let ConvertSequenceExprToObject g amap overallExpr = | _ -> None - | SeqWhile g (guardExpr, bodyExpr, mWhile, m) -> - // printfn "found Seq.while" - let resBody = ConvertSeqExprCode false false noDisposeContinuationLabel currentDisposeContinuationLabel bodyExpr + | SeqWhile g (guardExpr, innerExpr, spWhile, m) -> + let resBody = ConvertSeqExprCode false false noDisposeContinuationLabel currentDisposeContinuationLabel innerExpr match resBody with | Some res2 -> let asyncVars = @@ -369,7 +376,7 @@ let ConvertSequenceExprToObject g amap overallExpr = Some { phase2 = (fun ctxt -> let generate2, dispose2, checkDispose2 = res2.phase2 ctxt - let generate = mkWhile g (DebugPointAtWhile.Yes mWhile, NoSpecialWhileLoopMarker, guardExpr, generate2, m) + let generate = mkWhile g (spWhile, NoSpecialWhileLoopMarker, guardExpr, generate2, m) let dispose = dispose2 let checkDispose = checkDispose2 generate, dispose, checkDispose) @@ -380,48 +387,71 @@ let ConvertSequenceExprToObject g amap overallExpr = | _ -> None - | SeqUsing g (resource, v, body, elemTy, mBind, m) -> - // printfn "found Seq.using" + | SeqUsing g (resource, v, body, elemTy, spBind, m) -> let reduction = - mkLet (DebugPointAtBinding.Yes mBind) m v resource + mkLet spBind m v resource (mkCallSeqFinally g m elemTy body (mkUnitDelayLambda g m (mkCallDispose g m v.Type (exprForVal m v)))) ConvertSeqExprCode false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel reduction - | SeqForEach g (inp, v, body, genElemTy, mFor, m) -> + | SeqForEach g (inp, v, body, genElemTy, mFor, mIn, spIn) -> // printfn "found Seq.for" let inpElemTy = v.Type let inpEnumTy = mkIEnumeratorTy g inpElemTy - let enumv, enume = mkCompGenLocal m "enum" inpEnumTy + let enumv, enume = mkCompGenLocal mFor "enum" inpEnumTy // [[ use enum = inp.GetEnumerator() // while enum.MoveNext() do // let v = enum.Current // body ]] + + // A debug point should get emitted prior to both the evaluation of 'inp' and the call to GetEnumerator + let addForDebugPoint e = Expr.DebugPoint(DebugPointAtLeafExpr.Yes mFor, e) + + // The 'in' debug point is put back into the TypedTree at the right place for SeqWhile + let mIn = match spIn with DebugPointAtInOrTo.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.While) | DebugPointAtInOrTo.No -> mIn + let reduction = - mkCallSeqUsing g m inpEnumTy genElemTy (callNonOverloadedILMethod g amap m "GetEnumerator" (mkSeqTy g inpElemTy) [inp]) - (mkLambdaNoType g m enumv - (mkCallSeqGenerated g m genElemTy (mkUnitDelayLambda g mFor (callNonOverloadedILMethod g amap m "MoveNext" inpEnumTy [enume])) - (mkInvisibleLet m v (callNonOverloadedILMethod g amap m "get_Current" inpEnumTy [enume]) - (mkCoerceIfNeeded g (mkSeqTy g genElemTy) (tyOfExpr g body) body)))) + mkInvisibleLet mFor enumv (callNonOverloadedILMethod g amap mFor "GetEnumerator" (mkSeqTy g inpElemTy) [inp]) + // try..finally - will get reduced again + (mkCallSeqFinally g mFor genElemTy + // while e.MoveNext do (will get reduced again) + // - The lambda of the call to Seq.generated gets mIn as expected by SeqWhile + (mkCallSeqGenerated g mFor genElemTy + (mkUnitDelayLambda g mIn (callNonOverloadedILMethod g amap mIn "MoveNext" inpEnumTy [enume])) + // let v = e.Current + (mkInvisibleLet mIn v + (callNonOverloadedILMethod g amap mIn "get_Current" inpEnumTy [enume]) + (mkCoerceIfNeeded g (mkSeqTy g genElemTy) (tyOfExpr g body) + body))) + (mkUnitDelayLambda g mFor (mkCallDispose g mFor enumv.Type enume))) + |> addForDebugPoint + ConvertSeqExprCode false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel reduction - | SeqTryFinally g (e1, compensation, mTry, mFinally, m) -> - // printfn "found Seq.try/finally" + | SeqTryFinally g (e1, compensation, spTry, spFinally, m) -> let innerDisposeContinuationLabel = generateCodeLabel() let resBody = ConvertSeqExprCode false false noDisposeContinuationLabel innerDisposeContinuationLabel e1 match resBody with | Some res1 -> let asyncVars = unionFreeVars res1.asyncVars (freeInExpr CollectLocals compensation) + let addTryDebugPoint e = + match spTry with + | DebugPointAtTry.Yes m -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, e) + | _ -> e + let addFinallyDebugPoint e = + match spFinally with + | DebugPointAtFinally.Yes m -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, e) + | _ -> e Some { phase2 = (fun (pcVar, _currv, _, pcMap as ctxt) -> let generate1, dispose1, checkDispose1 = res1.phase2 ctxt let generate = // copy the compensation expression - one copy for the success continuation and one for the exception let compensation = copyExpr g CloneAllAndMarkExprValsAsCompilerGenerated compensation - mkCompGenSequential m + mkSequential m // set the PC to the inner finally, so that if an exception happens we run the right finally - (mkSequential DebugPointAtSequential.SuppressStmt m - (mkValSet mTry pcVar (mkInt32 g m pcMap.[innerDisposeContinuationLabel])) + (mkSequential m + (mkValSet m pcVar (mkInt32 g m pcMap.[innerDisposeContinuationLabel]) |> addTryDebugPoint) generate1 ) // set the PC past the try/finally before trying to run it, to make sure we only run it once (mkLabelled m innerDisposeContinuationLabel @@ -430,17 +460,17 @@ let ConvertSequenceExprToObject g amap overallExpr = compensation)) let dispose = // generate inner try/finallys, then outer try/finallys - mkCompGenSequential m + mkSequential m dispose1 // set the PC past the try/finally before trying to run it, to make sure we only run it once (mkLabelled m innerDisposeContinuationLabel - (mkSequential DebugPointAtSequential.SuppressStmt m - (mkValSet mFinally pcVar (mkInt32 g m pcMap.[currentDisposeContinuationLabel])) - (mkCompGenSequential m + (mkSequential m + (mkValSet m pcVar (mkInt32 g m pcMap.[currentDisposeContinuationLabel]) |> addFinallyDebugPoint) + (mkSequential m compensation (Expr.Op (TOp.Goto currentDisposeContinuationLabel, [], [], m))))) let checkDispose = - mkCompGenSequential m + mkSequential m checkDispose1 (mkLabelled m innerDisposeContinuationLabel (Expr.Op (TOp.Return, [], [mkTrue g m (* yes, we must dispose!!! *) ], m))) @@ -465,14 +495,14 @@ let ConvertSequenceExprToObject g amap overallExpr = significantClose = false asyncVars = emptyFreeVars } - | Expr.Sequential (expr1, expr2, NormalSeq, sp, m) -> + | Expr.Sequential (expr1, expr2, NormalSeq, m) -> match ConvertSeqExprCode false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel expr2 with | Some res2-> // printfn "found sequential execution" Some { res2 with phase2 = (fun ctxt -> let generate2, dispose2, checkDispose2 = res2.phase2 ctxt - let generate = Expr.Sequential (expr1, generate2, NormalSeq, sp, m) + let generate = Expr.Sequential (expr1, generate2, NormalSeq, m) let dispose = dispose2 let checkDispose = checkDispose2 generate, dispose, checkDispose) } @@ -532,7 +562,10 @@ let ConvertSequenceExprToObject g amap overallExpr = // TODO: remove this limitation | Expr.Match (spBind, exprm, pt, targets, m, ty) -> // lower all the targets. abandon if any fail to lower - let tglArray = targets |> Array.map (fun (TTarget(_vs, targetExpr, _spTarget, _)) -> ConvertSeqExprCode false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel targetExpr) + let tglArray = + targets + |> Array.map (fun (TTarget(_vs, targetExpr, _)) -> ConvertSeqExprCode false isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel targetExpr) + if tglArray |> Array.forall Option.isSome then let tglArray = Array.map Option.get tglArray let tgl = Array.toList tglArray @@ -540,11 +573,11 @@ let ConvertSequenceExprToObject g amap overallExpr = let asyncVars = (emptyFreeVars, Array.zip targets tglArray) - ||> Array.fold (fun fvs (TTarget(_vs, _, _spTarget, _), res) -> + ||> Array.fold (fun fvs (TTarget(_vs, _, _), res) -> if res.entryPoints.IsEmpty then fvs else unionFreeVars fvs res.asyncVars) let stateVars = - (targets, tglArray) ||> Array.zip |> Array.toList |> List.collect (fun (TTarget(vs, _, _, _), res) -> + (targets, tglArray) ||> Array.zip |> Array.toList |> List.collect (fun (TTarget(vs, _, _), res) -> let stateVars = vs |> List.filter (fun v -> res.asyncVars.FreeLocals.Contains(v)) |> List.map mkLocalValRef stateVars @ res.stateVars) @@ -553,15 +586,15 @@ let ConvertSequenceExprToObject g amap overallExpr = Some { phase2 = (fun ctxt -> let gtgs, disposals, checkDisposes = (Array.toList targets, tgl) - ||> List.map2 (fun (TTarget(vs, _, spTarget, _)) res -> + ||> List.map2 (fun (TTarget(vs, _, _)) res -> let flags = vs |> List.map (fun v -> res.asyncVars.FreeLocals.Contains(v)) let generate, dispose, checkDispose = res.phase2 ctxt - let gtg = TTarget(vs, generate, spTarget, Some flags) + let gtg = TTarget(vs, generate, Some flags) gtg, dispose, checkDispose) |> List.unzip3 let generate = primMkMatch (spBind, exprm, pt, Array.ofList gtgs, m, ty) - let dispose = if isNil disposals then mkUnit g m else List.reduce (mkCompGenSequential m) disposals - let checkDispose = if isNil checkDisposes then mkFalse g m else List.reduce (mkCompGenSequential m) checkDisposes + let dispose = if isNil disposals then mkUnit g m else List.reduce (mkSequential m) disposals + let checkDispose = if isNil checkDisposes then mkFalse g m else List.reduce (mkSequential m) checkDisposes generate, dispose, checkDispose) entryPoints=labs stateVars = stateVars @@ -570,6 +603,19 @@ let ConvertSequenceExprToObject g amap overallExpr = else None + | Expr.DebugPoint(dp, innerExpr) -> + let resInnerExpr = ConvertSeqExprCode isWholeExpr isTailCall noDisposeContinuationLabel currentDisposeContinuationLabel innerExpr + match resInnerExpr with + | Some res2 -> + Some { res2 with + phase2 = (fun ctxt -> + let generate2, dispose2, checkDispose2 = res2.phase2 ctxt + let generate = Expr.DebugPoint (dp, generate2) + let dispose = dispose2 + let checkDispose = checkDispose2 + generate, dispose, checkDispose) } + | None -> None + // yield! e ---> (for x in e -> x) // // Design choice: we compile 'yield! e' as 'for x in e do yield x'. @@ -602,7 +648,7 @@ let ConvertSequenceExprToObject g amap overallExpr = let label = generateCodeLabel() Some { phase2 = (fun (pcVar, _currv, nextVar, pcMap) -> let generate = - mkSequential DebugPointAtSequential.SuppressStmt m + mkSequential m (mkValSet m pcVar (mkInt32 g m pcMap.[label])) (mkCompGenSequential m (mkAddrSet m nextVar arbitrarySeqExpr) @@ -680,7 +726,7 @@ let ConvertSequenceExprToObject g amap overallExpr = // noDispose: // return false let checkDisposeExprWithCleanup = - mkCompGenSequential m + mkSequential m checkDisposeExprCore (mkLabelled m noDisposeContinuationLabel (Expr.Op (TOp.Return, [], [mkFalse g m], m))) @@ -688,7 +734,7 @@ 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), DebugPointAtTarget.No) + let mkGotoLabelTarget lab = mbuilder.AddResultTarget(Expr.Op (TOp.Goto lab, [], [], m)) let dtree = TDSwitch( DebugPointAtSwitch.No, @@ -757,7 +803,7 @@ let ConvertSequenceExprToObject g amap overallExpr = // DONE_DISPOSE: let whileLoop = let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m) - let addResultTarget e = mbuilder.AddResultTarget(e, DebugPointAtTarget.No) + let addResultTarget e = mbuilder.AddResultTarget(e) let dtree = TDSwitch(DebugPointAtSwitch.No, pcExpr, @@ -870,7 +916,7 @@ let LowerComputedListOrArraySeqExpr tcVal g amap m collectorTy overallSeqExpr = let rec ConvertSeqExprCode isUninteresting isTailcall expr = match expr with | SeqYield g (e, m) -> - let exprR = mkCallCollectorAdd tcVal (g: TcGlobals) infoReader m collExpr e + let exprR = mkCallCollectorAdd tcVal g infoReader m collExpr e Result.Ok (false, exprR) | SeqDelay g (delayedExpr, _elemTy) -> @@ -881,31 +927,31 @@ let LowerComputedListOrArraySeqExpr tcVal g amap m collectorTy overallSeqExpr = let res2 = ConvertSeqExprCode false isTailcall e2 match res1, res2 with | Result.Ok (_, e1R), Result.Ok (closed2, e2R) -> - let exprR = mkSequential DebugPointAtSequential.SuppressNeither m e1R e2R + let exprR = mkSequential m e1R e2R Result.Ok (closed2, exprR) | Result.Error msg, _ | _, Result.Error msg -> Result.Error msg - | SeqWhile g (guardExpr, bodyExpr, mWhile, m) -> + | SeqWhile g (guardExpr, bodyExpr, spWhile, m) -> let resBody = ConvertSeqExprCode false false bodyExpr match resBody with | Result.Ok (_, bodyExprR) -> - let exprR = mkWhile g (DebugPointAtWhile.Yes mWhile, NoSpecialWhileLoopMarker, guardExpr, bodyExprR, m) + let exprR = mkWhile g (spWhile, NoSpecialWhileLoopMarker, guardExpr, bodyExprR, m) Result.Ok (false, exprR) | Result.Error msg -> Result.Error msg - | SeqUsing g (resource, v, bodyExpr, _elemTy, mBind, m) -> + | SeqUsing g (resource, v, bodyExpr, _elemTy, spBind, m) -> let resBody = ConvertSeqExprCode false false bodyExpr match resBody with | Result.Ok (_, bodyExprR) -> // printfn "found Seq.using" let cleanupE = BuildDisposableCleanup tcVal g infoReader m v let exprR = - mkLet (DebugPointAtBinding.Yes mBind) m v resource - (mkTryFinally g (bodyExprR, cleanupE, m, tyOfExpr g bodyExpr, DebugPointAtTry.Body, DebugPointAtFinally.No)) + mkLet spBind m v resource + (mkTryFinally g (bodyExprR, cleanupE, m, tyOfExpr g bodyExpr, DebugPointAtTry.No, DebugPointAtFinally.No)) Result.Ok (false, exprR) | Result.Error msg -> Result.Error msg - | SeqForEach g (inp, v, bodyExpr, _genElemTy, mFor, m) -> + | SeqForEach g (inp, v, bodyExpr, _genElemTy, mFor, mIn, spIn) -> let resBody = ConvertSeqExprCode false false bodyExpr match resBody with | Result.Ok (_, bodyExprR) -> @@ -915,23 +961,31 @@ let LowerComputedListOrArraySeqExpr tcVal g amap m collectorTy overallSeqExpr = let enumv, enumve = mkCompGenLocal m "enum" inpEnumTy let guardExpr = callNonOverloadedILMethod g amap m "MoveNext" inpEnumTy [enumve] let cleanupE = BuildDisposableCleanup tcVal g infoReader m enumv + + // A debug point should get emitted prior to both the evaluation of 'inp' and the call to GetEnumerator + let addForDebugPoint e = Expr.DebugPoint(DebugPointAtLeafExpr.Yes mFor, e) + + let spInAsWhile = match spIn with DebugPointAtInOrTo.Yes m -> DebugPointAtWhile.Yes m | DebugPointAtInOrTo.No -> DebugPointAtWhile.No + let exprR = - mkInvisibleLet m enumv (callNonOverloadedILMethod g amap m "GetEnumerator" (mkSeqTy g inpElemTy) [inp]) + mkInvisibleLet mFor enumv (callNonOverloadedILMethod g amap mFor "GetEnumerator" (mkSeqTy g inpElemTy) [inp]) (mkTryFinally g - (mkWhile g (DebugPointAtWhile.Yes mFor, NoSpecialWhileLoopMarker, guardExpr, - (mkInvisibleLet m v - (callNonOverloadedILMethod g amap m "get_Current" inpEnumTy [enumve])) - bodyExprR, m), - cleanupE, m, tyOfExpr g bodyExpr, DebugPointAtTry.Body, DebugPointAtFinally.Body)) + (mkWhile g (spInAsWhile, NoSpecialWhileLoopMarker, guardExpr, + (mkInvisibleLet mIn v + (callNonOverloadedILMethod g amap mIn "get_Current" inpEnumTy [enumve])) + bodyExprR, mIn), + cleanupE, + mFor, tyOfExpr g bodyExpr, DebugPointAtTry.No, DebugPointAtFinally.No)) + |> addForDebugPoint Result.Ok (false, exprR) | Result.Error msg -> Result.Error msg - | SeqTryFinally g (bodyExpr, compensation, mTry, mFinally, m) -> + | SeqTryFinally g (bodyExpr, compensation, spTry, spFinally, m) -> let resBody = ConvertSeqExprCode false false bodyExpr match resBody with | Result.Ok (_, bodyExprR) -> let exprR = - mkTryFinally g (bodyExprR, compensation, m, tyOfExpr g bodyExpr, DebugPointAtTry.Yes mTry, DebugPointAtFinally.Yes mFinally) + mkTryFinally g (bodyExprR, compensation, m, tyOfExpr g bodyExpr, spTry, spFinally) Result.Ok (false, exprR) | Result.Error msg -> Result.Error msg @@ -939,11 +993,11 @@ let LowerComputedListOrArraySeqExpr tcVal g amap m collectorTy overallSeqExpr = let exprR = mkUnit g m Result.Ok(false, exprR) - | Expr.Sequential (x1, bodyExpr, NormalSeq, ty, m) -> + | Expr.Sequential (x1, bodyExpr, NormalSeq, m) -> let resBody = ConvertSeqExprCode isUninteresting isTailcall bodyExpr match resBody with | Result.Ok (closed, bodyExprR) -> - let exprR = Expr.Sequential (x1, bodyExprR, NormalSeq, ty, m) + let exprR = Expr.Sequential (x1, bodyExprR, NormalSeq, m) Result.Ok(closed, exprR) | Result.Error msg -> Result.Error msg @@ -966,11 +1020,12 @@ let LowerComputedListOrArraySeqExpr tcVal g amap m collectorTy overallSeqExpr = | Expr.Match (spBind, exprm, pt, targets, m, ty) -> // lower all the targets. abandon if any fail to lower let resTargets = - targets |> Array.map (fun (TTarget(vs, targetExpr, spTarget, flags)) -> + targets |> Array.map (fun (TTarget(vs, targetExpr, flags)) -> match ConvertSeqExprCode false false targetExpr with | Result.Ok (_, targetExprR) -> - Result.Ok (TTarget(vs, targetExprR, spTarget, flags)) + Result.Ok (TTarget(vs, targetExprR, flags)) | Result.Error msg -> Result.Error msg ) + if resTargets |> Array.forall (function Result.Ok _ -> true | _ -> false) then let tglArray = Array.map (function Result.Ok v -> v | _ -> failwith "unreachable") resTargets @@ -979,6 +1034,14 @@ let LowerComputedListOrArraySeqExpr tcVal g amap m collectorTy overallSeqExpr = else resTargets |> Array.pick (function Result.Error msg -> Some (Result.Error msg) | _ -> None) + | Expr.DebugPoint(dp, innerExpr) -> + let resInnerExpr = ConvertSeqExprCode isUninteresting isTailcall innerExpr + match resInnerExpr with + | Result.Ok (flag, innerExprR) -> + let exprR = Expr.DebugPoint(dp, innerExprR) + Result.Ok (flag, exprR) + | Result.Error msg -> Result.Error msg + // yield! e ---> (for x in e -> x) | arbitrarySeqExpr -> @@ -1005,7 +1068,7 @@ let LowerComputedListOrArraySeqExpr tcVal g amap m collectorTy overallSeqExpr = // If we ended with AddManyAndClose then we're done overallSeqExprR else - mkCompGenSequential m + mkSequential m overallSeqExprR (mkCallCollectorClose tcVal g infoReader m collExpr)) |> Some diff --git a/src/fsharp/LowerStateMachines.fs b/src/fsharp/LowerStateMachines.fs index 332326f23ca..b4d446761bc 100644 --- a/src/fsharp/LowerStateMachines.fs +++ b/src/fsharp/LowerStateMachines.fs @@ -2,6 +2,7 @@ module internal FSharp.Compiler.LowerStateMachines +open System.Collections.Generic open Internal.Utilities.Collections open Internal.Utilities.Library open Internal.Utilities.Library.Extras @@ -10,6 +11,7 @@ open FSharp.Compiler.ErrorLogger open FSharp.Compiler.TcGlobals open FSharp.Compiler.Syntax open FSharp.Compiler.Syntax.PrettyNaming +open FSharp.Compiler.Text open FSharp.Compiler.TypedTree open FSharp.Compiler.TypedTreeBasics open FSharp.Compiler.TypedTreeOps @@ -47,9 +49,9 @@ let sm_verbose = false #endif let rec (|OptionalResumeAtExpr|) g expr = - match expr with + match stripDebugPoints expr with | IfUseResumableStateMachinesExpr g (OptionalResumeAtExpr g res, _) -> res - | Expr.Sequential(ResumeAtExpr g pcExpr, codeExpr, NormalSeq, _, _m) -> (Some pcExpr, codeExpr) + | Expr.Sequential(DebugPoints(ResumeAtExpr g pcExpr, _), codeExpr, NormalSeq, _m) -> (Some pcExpr, codeExpr) | _ -> (None, expr) /// Implement a decision to represent a 'let' binding as a non-escaping local variable (rather than a state machine variable) @@ -79,22 +81,22 @@ let RepresentBindingAsStateVar g (bind: Binding) (resBody: StateMachineConversio printfn "LowerStateMachine: found state variable %s" bind.Var.DisplayName let (TBind(v, e, sp)) = bind - let sp, spm = + let addDebugPoint innerExpr = match sp with - | DebugPointAtBinding.Yes m -> DebugPointAtSequential.SuppressNeither, m - | _ -> DebugPointAtSequential.SuppressStmt, e.Range + | DebugPointAtBinding.Yes m -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, innerExpr) + | _ -> innerExpr let vref = mkLocalValRef v { resBody with - phase1 = mkSequential sp m (mkValSet spm vref e) resBody.phase1 + phase1 = mkSequential m (mkValSet m vref e |> addDebugPoint) resBody.phase1 phase2 = (fun ctxt -> let generateBody = resBody.phase2 ctxt let generate = - mkSequential sp m - (mkValSet spm vref e) + mkSequential m + (mkValSet m vref e |> addDebugPoint) // 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 DebugPointAtTarget.No m g.bool_ty generateBody + mkCond DebugPointAtBinding.NoneAtInvisible m g.bool_ty generateBody (mkCompGenSequential m (mkValSet m vref (mkDefault (m, vref.Type))) (mkTrue g m)) @@ -254,9 +256,9 @@ type LowerStateMachine(g: TcGlobals) = | Some bodyExpr2 -> Some (mkLetRecBinds m binds bodyExpr2) | None -> None - | Expr.Sequential (x1, bodyExpr, sp, ty, m) -> + | Expr.Sequential (x1, bodyExpr, sp, m) -> match TryReduceApp env bodyExpr args with - | Some bodyExpr2 -> Some (Expr.Sequential (x1, bodyExpr2, sp, ty, m)) + | Some bodyExpr2 -> Some (Expr.Sequential (x1, bodyExpr2, sp, m)) | None -> None // This construct arises from the 'mkDefault' in the 'Throw' case of an incomplete pattern match @@ -266,7 +268,7 @@ type LowerStateMachine(g: TcGlobals) = | Expr.Match (spBind, exprm, dtree, targets, m, ty) -> let mutable newTyOpt = None let targets2 = - targets |> Array.choose (fun (TTarget(vs, targetExpr, spTarget, flags)) -> + targets |> Array.choose (fun (TTarget(vs, targetExpr, flags)) -> // Incomplete exception matching expressions give rise to targets with I_throw. // and System.Runtime.ExceptionServices.ExceptionDispatchInfo::Throw(...) // @@ -279,8 +281,8 @@ type LowerStateMachine(g: TcGlobals) = | Expr.Op (TOp.ILAsm ([ I_throw ], [_oldTy]), a, b, c), Some newTy -> let targetExpr2 = Expr.Op (TOp.ILAsm ([ I_throw ], [newTy]), a, b, c) Some targetExpr2 - | Expr.Sequential (Expr.Op (TOp.ILCall ( _, _, _, _, _, _, _, ilMethodRef, _, _, _), _, _, _) as e1, Expr.Const (Const.Zero, m, _oldTy), a, b, c), Some newTy when ilMethodRef.Name = "Throw" -> - let targetExpr2 = Expr.Sequential (e1, Expr.Const (Const.Zero, m, newTy), a, b, c) + | Expr.Sequential (DebugPoints((Expr.Op (TOp.ILCall ( _, _, _, _, _, _, _, ilMethodRef, _, _, _), _, _, _) as e1), rebuild1), Expr.Const (Const.Zero, m, _oldTy), a, c), Some newTy when ilMethodRef.Name = "Throw" -> + let targetExpr2 = Expr.Sequential (e1, rebuild1 (Expr.Const (Const.Zero, m, newTy)), a, c) Some targetExpr2 | _ -> @@ -291,7 +293,7 @@ type LowerStateMachine(g: TcGlobals) = | None -> None match targetExpr2Opt with - | Some targetExpr2 -> Some (TTarget(vs, targetExpr2, spTarget, flags)) + | Some targetExpr2 -> Some (TTarget(vs, targetExpr2, flags)) | None -> None) if targets2.Length = targets.Length then Some (Expr.Match (spBind, exprm, dtree, targets2, m, ty)) @@ -313,6 +315,11 @@ type LowerStateMachine(g: TcGlobals) = | Some bodyExpr2 -> Some (mkTryWith g (bodyExpr2, filterVar, filterExpr, handlerVar, handlerExpr, m, resTy, spTry, spWith)) | None -> None + | Expr.DebugPoint (dp, innerExpr) -> + match TryReduceApp env innerExpr args with + | Some innerExpr2 -> Some (Expr.DebugPoint (dp, innerExpr2)) + | None -> None + | _ -> None @@ -416,7 +423,7 @@ 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), DebugPointAtTarget.No) + let mkGotoLabelTarget lab = mbuilder.AddResultTarget(Expr.Op (TOp.Goto lab, [], [], m)) let dtree = TDSwitch( DebugPointAtSwitch.No, @@ -482,8 +489,8 @@ type LowerStateMachine(g: TcGlobals) = // The expanded code for state machines may use for loops, however the // body must be synchronous. - | ForLoopExpr (sp1, sp2, e1, e2, v, e3, m) -> - ConvertResumableFastIntegerForLoop env pcValInfo (sp1, sp2, e1, e2, v, e3, m) + | IntegerForLoopExpr (sp1, sp2, style, e1, e2, v, e3, m) -> + ConvertResumableIntegerForLoop env pcValInfo (sp1, sp2, style, e1, e2, v, e3, m) // The expanded code for state machines may use try/with.... | TryWithExpr (spTry, spWith, resTy, bodyExpr, filterVar, filterExpr, handlerVar, handlerExpr, m) -> @@ -501,7 +508,10 @@ type LowerStateMachine(g: TcGlobals) = ConvertResumableLet env pcValInfo (bind, bodyExpr, m) | Expr.LetRec _ -> - Result.Error (FSComp.SR.reprResumableCodeContainsLetRec()) + Result.Error (FSComp.SR.reprResumableCodeContainsLetRec()) + + | Expr.DebugPoint(dp, innerExpr) -> + ConvertResumableDebugPoint env pcValInfo (dp, innerExpr) // Arbitrary expression | _ -> @@ -542,7 +552,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 DebugPointAtTarget.No m (tyOfExpr g noneBranchExpr) (mkFalse g m) (mkLabelled m lab e1) e2 + mkCond DebugPointAtBinding.NoneAtSticky 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 @@ -605,6 +615,18 @@ type LowerStateMachine(g: TcGlobals) = |> Result.Ok | Result.Error err, _ | _, Result.Error err -> Result.Error err + and ConvertResumableDebugPoint env pcValInfo (dp, innerExpr) = + let res1 = ConvertResumableCode env pcValInfo innerExpr + match res1 with + | Result.Ok res1 -> + { res1 with + phase1 = Expr.DebugPoint(dp, res1.phase1) + phase2 = (fun ctxt -> + let generate1 = res1.phase2 ctxt + Expr.DebugPoint(dp, generate1)) } + |> Result.Ok + | Result.Error err -> Result.Error err + and ConvertResumableWhile env pcValInfo (sp1, sp2, guardExpr, bodyExpr, m) = if sm_verbose then printfn "WhileExpr" @@ -659,8 +681,8 @@ type LowerStateMachine(g: TcGlobals) = |> Result.Ok | Result.Error err, _ | _, Result.Error err -> Result.Error err - and ConvertResumableFastIntegerForLoop env pcValInfo (sp1, sp2, e1, e2, v, e3, m) = - if sm_verbose then printfn "ForLoopExpr" + and ConvertResumableIntegerForLoop env pcValInfo (spFor, spTo, style, e1, e2, v, e3, m) = + if sm_verbose then printfn "IntegerForLoopExpr" let res1 = ConvertResumableCode env pcValInfo e1 let res2 = ConvertResumableCode env pcValInfo e2 let res3 = ConvertResumableCode env pcValInfo e3 @@ -670,7 +692,7 @@ type LowerStateMachine(g: TcGlobals) = if eps.Length > 0 then Result.Error(FSComp.SR.reprResumableCodeContainsFastIntegerForLoop()) else - { phase1 = mkFor g (sp1, v, res1.phase1, sp2, res2.phase1, res3.phase1, m) + { phase1 = mkIntegerForLoop g (spFor, spTo, v, res1.phase1, style, res2.phase1, res3.phase1, m) phase2 = (fun ctxt -> let e1R = res1.phase2 ctxt let e2R = res2.phase2 ctxt @@ -685,7 +707,7 @@ type LowerStateMachine(g: TcGlobals) = e3R (mkValSet m (mkLocalValRef pcVal) (mkZero g m)) - mkFor g (sp1, v, e1R, sp2, e2R, e3R2, m)) + mkIntegerForLoop g (spFor, spTo, v, e1R, style, e2R, e3R2, m)) entryPoints= eps stateVars = res1.stateVars @ res2.stateVars @ res3.stateVars thisVars = res1.thisVars @ res2.thisVars @ res3.thisVars @@ -747,8 +769,9 @@ type LowerStateMachine(g: TcGlobals) = // lower all the targets. let dtreeR = ConvertStateMachineLeafDecisionTree env dtree let tglArray = - targets |> Array.map (fun (TTarget(_vs, targetExpr, _spTarget, _)) -> + targets |> Array.map (fun (TTarget(_vs, targetExpr, _)) -> ConvertResumableCode env pcValInfo targetExpr) + match (tglArray |> Array.forall (function Result.Ok _ -> true | Result.Error _ -> false)) with | true -> let tglArray = tglArray |> Array.map (function Result.Ok v -> v | _ -> failwith "unreachable") @@ -756,25 +779,25 @@ type LowerStateMachine(g: TcGlobals) = let entryPoints = tgl |> List.collect (fun res -> res.entryPoints) let resumableVars = (emptyFreeVars, Array.zip targets tglArray) - ||> Array.fold (fun fvs (TTarget(_vs, _, _spTarget, _), res) -> + ||> Array.fold (fun fvs (TTarget(_vs, _, _), res) -> if res.entryPoints.IsEmpty then fvs else unionFreeVars fvs res.resumableVars) let stateVars = - (targets, tglArray) ||> Array.zip |> Array.toList |> List.collect (fun (TTarget(vs, _, _, _), res) -> + (targets, tglArray) ||> Array.zip |> Array.toList |> List.collect (fun (TTarget(vs, _, _), res) -> let stateVars = vs |> List.filter (fun v -> res.resumableVars.FreeLocals.Contains(v)) |> List.map mkLocalValRef stateVars @ res.stateVars) let thisVars = tglArray |> Array.toList |> List.collect (fun res -> res.thisVars) { phase1 = let gtgs = - (targets, tglArray) ||> Array.map2 (fun (TTarget(vs, _, spTarget, _)) res -> + (targets, tglArray) ||> Array.map2 (fun (TTarget(vs, _, _)) res -> let flags = vs |> List.map (fun v -> res.resumableVars.FreeLocals.Contains(v)) - TTarget(vs, res.phase1, spTarget, Some flags)) + TTarget(vs, res.phase1, Some flags)) primMkMatch (spBind, exprm, dtreeR, gtgs, m, ty) phase2 = (fun ctxt -> let gtgs = - (targets, tglArray) ||> Array.map2 (fun (TTarget(vs, _, spTarget, _)) res -> + (targets, tglArray) ||> Array.map2 (fun (TTarget(vs, _, _)) res -> let flags = vs |> List.map (fun v -> res.resumableVars.FreeLocals.Contains(v)) - TTarget(vs, res.phase2 ctxt, spTarget, Some flags)) + TTarget(vs, res.phase2 ctxt, Some flags)) let generate = primMkMatch (spBind, exprm, dtreeR, gtgs, m, ty) generate) diff --git a/src/fsharp/LowerStateMachines.fsi b/src/fsharp/LowerStateMachines.fsi index 5a37c4ada6f..3cff9856315 100644 --- a/src/fsharp/LowerStateMachines.fsi +++ b/src/fsharp/LowerStateMachines.fsi @@ -2,6 +2,8 @@ module internal FSharp.Compiler.LowerStateMachines +open System.Collections.Generic +open FSharp.Compiler.Text open FSharp.Compiler.TypedTree open FSharp.Compiler.TcGlobals diff --git a/src/fsharp/MethodCalls.fs b/src/fsharp/MethodCalls.fs index c44e2cd86b5..5f9c47e5ca4 100644 --- a/src/fsharp/MethodCalls.fs +++ b/src/fsharp/MethodCalls.fs @@ -1805,7 +1805,7 @@ module ProvidedMethodCalls = let testExpr = exprToExpr test let ifTrueExpr = exprToExpr thenBranch let ifFalseExpr = exprToExpr elseBranch - let te = mkCond DebugPointAtBinding.NoneAtSticky DebugPointAtTarget.No m (tyOfExpr g ifTrueExpr) testExpr ifTrueExpr ifFalseExpr + let te = mkCond DebugPointAtBinding.NoneAtSticky m (tyOfExpr g ifTrueExpr) testExpr ifTrueExpr ifFalseExpr None, (te, tyOfExpr g te) | ProvidedVarExpr providedVar -> let _, vTe = varToExpr (exprType.PApply((fun _ -> providedVar), m)) @@ -1873,7 +1873,7 @@ module ProvidedMethodCalls = let vT = addVar v let e3T = exprToExpr e3 removeVar v - let exprT = mkFastForLoop g (DebugPointAtFor.No, m, vT, e1T, true, e2T, e3T) + let exprT = mkFastForLoop g (DebugPointAtFor.No, DebugPointAtInOrTo.No, m, vT, e1T, true, e2T, e3T) None, (exprT, tyOfExpr g exprT) | ProvidedNewDelegateExpr (delegateTy, boundVars, delegateBodyExpr) -> let delegateTy, boundVars, delegateBodyExpr = exprType.PApply3((fun _ -> (delegateTy, boundVars, delegateBodyExpr)), m) diff --git a/src/fsharp/Optimizer.fs b/src/fsharp/Optimizer.fs index 0b88e9c2c3b..6ea86c374fc 100644 --- a/src/fsharp/Optimizer.fs +++ b/src/fsharp/Optimizer.fs @@ -1304,7 +1304,7 @@ let IsTyFuncValRefExpr = function /// Type applications of existing functions are always simple constants, with the exception of F# 'type functions' let rec IsSmallConstExpr x = - match x with + match stripDebugPoints x with | Expr.Op (TOp.LValueOp (LAddrOf _, _), [], [], _) -> true // &x is always a constant | Expr.Val (v, _, _m) -> not v.IsMutable | Expr.App (fe, _, _tyargs, args, _) -> isNil args && not (IsTyFuncValRefExpr fe) && IsSmallConstExpr fe @@ -1354,7 +1354,7 @@ let IsKnownOnlyMutableBeforeUse (vref: ValRef) = // arbitrary-side-effect (e.g. 'non-termination' or 'fire the missiles') let IsDiscardableEffectExpr expr = - match expr with + match stripDebugPoints expr with | Expr.Op (TOp.LValueOp (LByrefGet _, _), [], [], _) -> true | _ -> false @@ -1386,14 +1386,14 @@ let IlAssemblyCodeInstrHasEffect i = let IlAssemblyCodeHasEffect instrs = List.exists IlAssemblyCodeInstrHasEffect instrs let rec ExprHasEffect g expr = - match expr with + match stripDebugPoints expr with | Expr.Val (vref, _, _) -> vref.IsTypeFunction || vref.IsMutable | Expr.Quote _ | Expr.Lambda _ | Expr.TyLambda _ | Expr.Const _ -> false // type applications do not have effects, with the exception of type functions - | Expr.App (f0, _, _, [], _) -> (IsTyFuncValRefExpr f0) || ExprHasEffect g f0 + | Expr.App (f0, _, _, [], _) -> IsTyFuncValRefExpr f0 || ExprHasEffect g f0 | Expr.Op (op, _, args, m) -> ExprsHaveEffect g args || OpHasEffect g m op | Expr.LetRec (binds, body, _, _) -> BindingsHaveEffect g binds || ExprHasEffect g body | Expr.Let (bind, body, _, _) -> BindingHasEffect g bind || ExprHasEffect g body @@ -1433,7 +1433,7 @@ and OpHasEffect g m op = | TOp.ExnFieldSet _ | TOp.Coerce | TOp.Reraise - | TOp.For _ + | TOp.IntegerForLoop _ | TOp.While _ | TOp.TryWith _ (* conservative *) | TOp.TryFinally _ (* conservative *) @@ -1446,7 +1446,8 @@ and OpHasEffect g m op = | TOp.ValFieldSet _ -> true -let TryEliminateBinding cenv _env (TBind(vspec1, e1, spBind)) e2 _m = +let TryEliminateBinding cenv _env bind e2 _m = + let (TBind(vspec1, e1, spBind)) = bind // don't eliminate bindings if we're not optimizing AND the binding is not a compiler generated variable if not (cenv.optimizing && cenv.settings.EliminateImmediatelyConsumedLocals()) && not vspec1.IsCompilerGenerated then @@ -1474,25 +1475,26 @@ let TryEliminateBinding cenv _env (TBind(vspec1, e1, spBind)) e2 _m = | argsrh :: argsrt when not (ExprHasEffect cenv.g argsrh) -> GetImmediateUseContext (argsrh :: rargsl) argsrt | _ -> None - match stripExpr e2 with + let (DebugPoints(e2, recreate0)) = e2 + match e2 with // Immediate consumption of value as itself 'let x = e in x' | Expr.Val (VRefLocal vspec2, _, _) when IsUniqueUse vspec2 [] -> - Some e1 + Some (e1 |> recreate0) // Immediate consumption of function in an application in a sequential, e.g. 'let part1 = e in part1 arg; rest' // See https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1034-lambda-optimizations.md - | Expr.Sequential(Expr.App(Expr.Val (VRefLocal vspec2, _, _), f0ty, c, args, d), rest, NormalSeq, sp, m) + | Expr.Sequential(DebugPoints(Expr.App(Expr.Val (VRefLocal vspec2, _, _), f0ty, c, args, d), recreate), rest, NormalSeq, m) when IsUniqueUse vspec2 (rest :: args) -> - Some (Expr.Sequential(Expr.App(e1, f0ty, c, args, d), rest, NormalSeq, sp, m)) + Some (Expr.Sequential(recreate(Expr.App(e1, f0ty, c, args, d)), rest, NormalSeq, m) |> recreate0) // Immediate consumption of delegate via an application in a sequential, e.g. 'let part1 = e in part1.Invoke(args); rest' // See https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1034-lambda-optimizations.md - | Expr.Sequential(DelegateInvokeExpr cenv.g (invokeRef, f0ty, tyargs, Expr.Val (VRefLocal vspec2, _, _), args, _), rest, NormalSeq, sp, m) + | Expr.Sequential(DebugPoints(DelegateInvokeExpr cenv.g (invokeRef, f0ty, tyargs, Expr.Val (VRefLocal vspec2, _, _), args, _), recreate), rest, NormalSeq, m) when IsUniqueUse vspec2 (rest :: args) -> let invoke = MakeFSharpDelegateInvokeAndTryBetaReduce cenv.g (invokeRef, e1, f0ty, tyargs, args, m) - Some (Expr.Sequential(invoke, rest, NormalSeq, sp, m)) + Some (Expr.Sequential(recreate invoke, rest, NormalSeq, m) |> recreate0) // Immediate consumption of value by a pattern match 'let x = e in match x with ...' | Expr.Match (spMatch, _exprm, TDSwitch(sp, Expr.Val (VRefLocal vspec2, _, _), cases, dflt, _), targets, m, ty2) @@ -1501,15 +1503,15 @@ let TryEliminateBinding cenv _env (TBind(vspec1, e1, spBind)) e2 _m = not (Zset.contains vspec1 fvs.FreeLocals)) -> let spMatch = spBind.Combine spMatch - Some (Expr.Match (spMatch, e1.Range, TDSwitch(sp, e1, cases, dflt, m), targets, m, ty2)) + Some (Expr.Match (spMatch, e1.Range, TDSwitch(sp, e1, cases, dflt, m), targets, m, ty2) |> recreate0) // 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 // Note: do not include functions with a single arg of unit type, introduced by abstractBigTargets | Expr.App (f, f0ty, tyargs, args, m) -> match GetImmediateUseContext [] (f :: args) with - | Some([], rargs) -> Some (MakeApplicationAndBetaReduce cenv.g (e1, f0ty, [tyargs], rargs, m)) - | Some(f :: largs, rargs) -> Some (MakeApplicationAndBetaReduce cenv.g (f, f0ty, [tyargs], largs @ (e1 :: rargs), m)) + | Some([], rargs) -> Some (MakeApplicationAndBetaReduce cenv.g (e1, f0ty, [tyargs], rargs, m) |> recreate0) + | Some(f :: largs, rargs) -> Some (MakeApplicationAndBetaReduce cenv.g (f, f0ty, [tyargs], largs @ (e1 :: rargs), m) |> recreate0) | None -> None // Bug 6311: a special case of nested elimination of locals (which really should be handled more generally) @@ -1518,9 +1520,9 @@ let TryEliminateBinding cenv _env (TBind(vspec1, e1, spBind)) e2 _m = // 'let x = e in op[op[arg1;arg2];x]' --> op[op[arg1;arg2];e] when arg1, arg2 have no side effects etc. | Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [arg1;arg2], m2);arg3], m1) -> match GetImmediateUseContext [] [arg1;arg2;arg3] with - | Some([], [arg2;arg3]) -> Some (Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [e1;arg2], m2);arg3], m1)) - | Some([arg1], [arg3]) -> Some (Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [arg1;e1], m2);arg3], m1)) - | Some([arg1;arg2], []) -> Some (Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [arg1;arg2], m2);e1], m1)) + | Some([], [arg2;arg3]) -> Some (Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [e1;arg2], m2);arg3], m1) |> recreate0) + | Some([arg1], [arg3]) -> Some (Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [arg1;e1], m2);arg3], m1) |> recreate0) + | Some([arg1;arg2], []) -> Some (Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [arg1;arg2], m2);e1], m1) |> recreate0) | Some _ -> error(InternalError("unexpected return pattern from GetImmediateUseContext", m1)) | None -> None @@ -1528,7 +1530,7 @@ let TryEliminateBinding cenv _env (TBind(vspec1, e1, spBind)) e2 _m = // 'let x = e in op[x;....]' | Expr.Op (c, tyargs, args, m) -> match GetImmediateUseContext [] args with - | Some(largs, rargs) -> Some (Expr.Op (c, tyargs, (largs @ (e1 :: rargs)), m)) + | Some(largs, rargs) -> Some (Expr.Op (c, tyargs, (largs @ (e1 :: rargs)), m) |> recreate0) | None -> None | _ -> @@ -1541,7 +1543,7 @@ let TryEliminateLet cenv env bind e2 m = /// Detect the application of a value to an arbitrary number of arguments let rec (|KnownValApp|_|) expr = - match stripExpr expr with + match stripDebugPoints expr with | Expr.Val (vref, _, _) -> Some(vref, [], []) | Expr.App (KnownValApp(vref, typeArgs1, otherArgs1), _, typeArgs2, otherArgs2, _) -> Some(vref, typeArgs1@typeArgs2, otherArgs1@otherArgs2) | _ -> None @@ -1558,7 +1560,7 @@ let (|TDBoolSwitch|_|) dtree = /// Check target that have a constant bool value let (|ConstantBoolTarget|_|) target = match target with - | TTarget([], Expr.Const (Const.Bool b, _, _), _, _) -> Some b + | TTarget([], Expr.Const (Const.Bool b, _, _), _) -> Some b | _ -> None /// Is this a tree, where each decision is a two-way switch (to prevent later duplication of trees), and each branch returns or true/false, @@ -1572,7 +1574,7 @@ let rec CountBoolLogicTree (targets: DecisionTreeTarget[], costOuterCaseTree, co | TDSuccess([], idx) -> match targets.[idx] with | ConstantBoolTarget result -> (if result = testBool then costOuterCaseTree else costOuterDefaultTree), 0 - | TTarget([], _exp, _, _) -> costOuterCaseTree + costOuterDefaultTree, 10 + | TTarget([], _exp, _) -> costOuterCaseTree + costOuterDefaultTree, 10 | _ -> 100, 100 | _ -> 100, 100 @@ -1588,7 +1590,7 @@ let rec RewriteBoolLogicTree (targets: DecisionTreeTarget[], outerCaseTree, oute | TDSuccess([], idx) -> match targets.[idx] with | ConstantBoolTarget result -> if result = testBool then outerCaseTree else outerDefaultTree - | TTarget([], exp, _, _) -> mkBoolSwitch DebugPointAtSwitch.No 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" @@ -1603,8 +1605,9 @@ let rec CombineBoolLogic expr = // try to find nested boolean switch match expr with | Expr.Match (outerSP, outerMatchRange, - TDBoolSwitch(_switchSP, Expr.Match (_innerSP, _innerMatchRange, innerTree, innerTargets, _innerDefaultRange, _innerMatchTy), - outerTestBool, outerCaseTree, outerDefaultTree, _outerSwitchRange ), + TDBoolSwitch(_switchSP, + DebugPoints(Expr.Match (_innerSP, _innerMatchRange, innerTree, innerTargets, _innerDefaultRange, _innerMatchTy), _), + outerTestBool, outerCaseTree, outerDefaultTree, _outerSwitchRange ), outerTargets, outerDefaultRange, outerMatchTy) -> let costOuterCaseTree = match outerCaseTree with TDSuccess _ -> 0 | _ -> 1 @@ -1684,11 +1687,20 @@ let rec RearrangeTupleBindings expr fin = match RearrangeTupleBindings body fin with | Some b -> Some (mkLetBind m bind b) | None -> None - | Expr.Op (TOp.Tuple tupInfo, _, _, _) when not (evalTupInfoIsStruct tupInfo) -> Some (fin expr) - | Expr.Sequential (e1, e2, kind, sp, m) -> + + | Expr.Op (TOp.Tuple tupInfo, _, _, _) when not (evalTupInfoIsStruct tupInfo) -> + Some (fin expr) + + | Expr.Sequential (e1, e2, kind, m) -> match RearrangeTupleBindings e2 fin with - | Some b -> Some (Expr.Sequential (e1, b, kind, sp, m)) + | Some b -> Some (Expr.Sequential (e1, b, kind, m)) | None -> None + + | Expr.DebugPoint (dp, innerExpr) -> + match RearrangeTupleBindings innerExpr fin with + | Some innerExprR -> Some (Expr.DebugPoint (dp, innerExprR)) + | None -> None + | _ -> None // Attempts to rewrite tuple bindings containing ifs/matches by introducing a mutable local for each tuple element. @@ -1727,9 +1739,9 @@ let TryRewriteBranchingTupleBinding g (v: Val) rhs tgtSeqPtOpt body m = match expr with | Expr.Match (sp, inputRange, decision, targets, fullRange, ty) -> // Recurse down every if/match branch - let rewrittenTargets = targets |> Array.choose (fun (TTarget (vals, targetExpr, sp, flags)) -> + let rewrittenTargets = targets |> Array.choose (fun (TTarget (vals, targetExpr, flags)) -> match dive g m requisites targetExpr with - | Some rewritten -> TTarget (vals, rewritten, sp, flags) |> Some + | Some rewritten -> TTarget (vals, rewritten, flags) |> Some | _ -> None) // If not all branches can be rewritten, keep the original expression as it is @@ -1737,20 +1749,29 @@ let TryRewriteBranchingTupleBinding g (v: Val) rhs tgtSeqPtOpt body m = None else Expr.Match (sp, inputRange, decision, rewrittenTargets, fullRange, ty) |> Some + | Expr.Op (TOp.Tuple tupInfo, _, tupleElements, m) when not (evalTupInfoIsStruct tupInfo) -> // Replace tuple allocation with mutations of locals let _, _, _, vrefs = requisites.Value List.map2 (mkValSet m) vrefs tupleElements - |> mkSequentials DebugPointAtSequential.SuppressStmt g m + |> mkSequentials g m |> Some - | Expr.Sequential (e1, e2, kind, sp, m) -> + + | Expr.Sequential (e1, e2, kind, m) -> match dive g m requisites e2 with - | Some rewritten -> Expr.Sequential (e1, rewritten, kind, sp, m) |> Some + | Some rewritten -> Expr.Sequential (e1, rewritten, kind, m) |> Some + | _ -> None + + | Expr.DebugPoint (dp, innerExpr) -> + match dive g m requisites innerExpr with + | Some innerExprR -> Expr.DebugPoint (dp, innerExprR) |> Some | _ -> None + | Expr.Let (bind, body, m, _) -> match dive g m requisites body with | Some rewritten -> mkLetBind m bind rewritten |> Some | _ -> None + | _ -> None let requisites = lazy ( @@ -1767,7 +1788,7 @@ let TryRewriteBranchingTupleBinding g (v: Val) rhs tgtSeqPtOpt body m = mkLetsBind m binds rhsAndTupleBinding |> Some | _ -> None -let ExpandStructuralBinding cenv expr = +let rec ExpandStructuralBinding cenv expr = assert cenv.settings.ExpandStructuralValues() match expr with | Expr.Let (TBind(v, rhs, tgtSeqPtOpt), body, m, _) @@ -1791,6 +1812,7 @@ let ExpandStructuralBinding cenv expr = let ve, bind = MakeStructuralBindingTemp v 0 arg argTy let newExpr = mkSome cenv.g argTy ve m mkLetBind m bind (mkLet tgtSeqPtOpt m v newExpr body) + | e -> ExpandStructuralBindingRaw cenv e @@ -1905,14 +1927,25 @@ let rec tryRewriteToSeqCombinators g (e: Expr) = // match --> match | Expr.Match (spBind, exprm, pt, targets, m, _ty) -> - let targets = targets |> Array.map (fun (TTarget(vs, e, spTarget, flags)) -> match tryRewriteToSeqCombinators g e with None -> None | Some e -> Some(TTarget(vs, e, spTarget, flags))) + let targets = + targets |> Array.map (fun (TTarget(vs, e, flags)) -> + match tryRewriteToSeqCombinators g e with + | None -> None + | Some e -> Some(TTarget(vs, e, flags))) + if targets |> Array.forall Option.isSome then let targets = targets |> Array.map Option.get - let ty = targets |> Array.pick (fun (TTarget(_, e, _, _)) -> Some(tyOfExpr g e)) + let ty = targets |> Array.pick (fun (TTarget(_, e, _)) -> Some(tyOfExpr g e)) Some (Expr.Match (spBind, exprm, pt, targets, m, ty)) else None + | Expr.DebugPoint (dp, innerExpr) -> + match tryRewriteToSeqCombinators g innerExpr with + | Some innerExprR -> + Some (Expr.DebugPoint (dp, innerExprR)) + | None -> None + | _ -> None @@ -1927,7 +1960,7 @@ let TryDetectQueryQuoteAndRun cenv (expr: Expr) = match expr with | QueryRun g (bodyOfRun, reqdResultInfo) -> //printfn "found Query.Run" - match bodyOfRun with + match stripDebugPoints bodyOfRun with | Expr.Quote (quotedExpr, _, true, _, _) -> // true = isFromQueryExpression @@ -1938,7 +1971,7 @@ let TryDetectQueryQuoteAndRun cenv (expr: Expr) = // try to rewrite the core into combinators approximating the compiled form of seq { ... }, which in turn // are eligible for state-machine representation. If that fails, we still rewrite to combinator form. let rec loopOuter (e: Expr) = - match e with + match stripDebugPoints e with | QueryFor g (qTy, _, resultElemTy, _, _) | QuerySelect g (qTy, _, resultElemTy, _, _) @@ -2011,6 +2044,21 @@ let IsILMethodRefSystemStringConcatArray (mref: ILMethodRef) = ilTy.TypeRef.Name = "System.String" -> true | _ -> false)) +let rec IsDebugPipeRightExpr cenv expr = + let g = cenv.g + match expr with + | Expr.DebugPoint (_, innerExpr) -> IsDebugPipeRightExpr cenv innerExpr + | Expr.App _ -> + if cenv.settings.DebugPointsForPipeRight then + match expr with + | OpPipeRight g _ + | OpPipeRight2 g _ + | OpPipeRight3 g _ -> true + | _ -> false + else false + | _ -> false + + /// Optimize/analyze an expression let rec OptimizeExpr cenv (env: IncrementalOptimizationEnv) expr = cenv.stackGuard.Guard <| fun () -> @@ -2021,11 +2069,14 @@ let rec OptimizeExpr cenv (env: IncrementalOptimizationEnv) expr = let expr = stripExpr expr + if IsDebugPipeRightExpr cenv expr then OptimizeDebugPipeRights cenv env expr else + match expr with // treat the common linear cases to avoid stack overflows, using an explicit continuation | LinearOpExpr _ | LinearMatchExpr _ | Expr.Sequential _ + | Expr.DebugPoint _ | Expr.Let _ -> OptimizeLinearExpr cenv env expr id @@ -2064,12 +2115,8 @@ let rec OptimizeExpr cenv (env: IncrementalOptimizationEnv) expr = OptimizeFSharpDelegateInvoke cenv env (iref, delegatef, fty, tyargs, args, m) | _ -> let attempt = - if cenv.settings.DebugPointsForPipeRight then - match expr with - | OpPipeRight cenv.g _ - | OpPipeRight2 cenv.g _ - | OpPipeRight3 cenv.g _ -> Some (OptimizeDebugPipeRights cenv env expr) - | _ -> None + if IsDebugPipeRightExpr cenv expr then + Some (OptimizeDebugPipeRights cenv env expr) else None match attempt with | Some res -> res @@ -2248,8 +2295,8 @@ and OptimizeExprOp cenv env (op, tyargs, args, m) = | TOp.While (spWhile, marker), _, [Expr.Lambda (_, _, _, [_], e1, _, _);Expr.Lambda (_, _, _, [_], e2, _, _)] -> OptimizeWhileLoop cenv { env with disableMethodSplitting=true } (spWhile, marker, e1, e2, m) - | TOp.For (spStart, dir), _, [Expr.Lambda (_, _, _, [_], e1, _, _);Expr.Lambda (_, _, _, [_], e2, _, _);Expr.Lambda (_, _, _, [v], e3, _, _)] -> - OptimizeFastIntegerForLoop cenv { env with disableMethodSplitting=true } (spStart, v, e1, dir, e2, e3, m) + | TOp.IntegerForLoop (spFor, spTo, dir), _, [Expr.Lambda (_, _, _, [_], e1, _, _);Expr.Lambda (_, _, _, [_], e2, _, _);Expr.Lambda (_, _, _, [v], e3, _, _)] -> + OptimizeFastIntegerForLoop cenv { env with disableMethodSplitting=true } (spFor, spTo, v, e1, dir, e2, e3, m) | TOp.TryFinally (spTry, spFinally), [resty], [Expr.Lambda (_, _, _, [_], e1, _, _); Expr.Lambda (_, _, _, [_], e2, _, _)] -> OptimizeTryFinally cenv env (spTry, spFinally, e1, e2, m, resty) @@ -2344,7 +2391,7 @@ and OptimizeExprOpFallback cenv env (op, tyargs, argsR, m) arginfos valu = | TOp.Bytes bytes -> bytes.Length/10, valu | TOp.UInt16s bytes -> bytes.Length/10, valu | TOp.ValFieldGetAddr _ - | TOp.Array | TOp.For _ | TOp.While _ | TOp.TryWith _ | TOp.TryFinally _ + | TOp.Array | TOp.IntegerForLoop _ | TOp.While _ | TOp.TryWith _ | TOp.TryFinally _ | TOp.ILCall _ | TOp.TraitCall _ | TOp.LValueOp _ | TOp.ValFieldSet _ | TOp.UnionCaseFieldSet _ | TOp.RefAddrGet _ | TOp.Coerce | TOp.Reraise | TOp.UnionCaseFieldGetAddr _ @@ -2428,7 +2475,7 @@ and TryOptimizeUnionCaseGet cenv _env (e1info, cspec, _tys, n, m) = | _ -> None /// Optimize/analyze a for-loop -and OptimizeFastIntegerForLoop cenv env (spStart, v, e1, dir, e2, e3, m) = +and OptimizeFastIntegerForLoop cenv env (spFor, spTo, v, e1, dir, e2, e3, m) = let e1R, e1info = OptimizeExpr cenv env e1 let e2R, e2info = OptimizeExpr cenv env e2 let env = BindInternalValToUnknown cenv v env @@ -2466,7 +2513,7 @@ and OptimizeFastIntegerForLoop cenv env (spStart, v, e1, dir, e2, e3, m) = if cenv.settings.EliminateForLoop && not eff then mkUnit cenv.g m, { TotalSize=0; FunctionSize=0; HasEffect=false; MightMakeCriticalTailcall=false; Info=UnknownValue } else - let exprR = mkFor cenv.g (spStart, v, e1R, dir, e2R, e3R, m) + let exprR = mkIntegerForLoop cenv.g (spFor, spTo, v, e1R, dir, e2R, e3R, m) exprR, { TotalSize=AddTotalSizes einfos + forAndWhileLoopSize FunctionSize=AddFunctionSizes einfos + forAndWhileLoopSize HasEffect=eff @@ -2497,7 +2544,7 @@ and OptimizeLinearExpr cenv env expr contf = // Eliminate subsumption coercions for functions. This must be done post-typechecking because we need // complete inference types. - let expr = DetectAndOptimizeForExpression cenv.g OptimizeAllForExpressions expr + let expr = DetectAndOptimizeForEachExpression cenv.g OptimizeAllForExpressions expr let expr = if cenv.settings.ExpandStructuralValues() then ExpandStructuralBinding cenv expr else expr let expr = stripExpr expr @@ -2520,17 +2567,19 @@ and OptimizeLinearExpr cenv env expr contf = | _ -> match expr with - | Expr.Sequential (e1, e2, flag, spSeq, m) -> + | Expr.Sequential (e1, e2, flag, m) -> + let e1R, e1info = OptimizeExpr cenv env e1 + OptimizeLinearExpr cenv env e2 (contf << (fun (e2R, e2info) -> if (flag = NormalSeq) && // Always eliminate '(); expr' sequences, even in debug code, to ensure that // conditional method calls don't leave a dangling breakpoint (see FSharp 1.0 bug 6034) - (cenv.settings.EliminateSequential || (match e1R with Expr.Const (Const.Unit, _, _) -> true | _ -> false)) && + (cenv.settings.EliminateSequential || (match stripDebugPoints e1R with Expr.Const (Const.Unit, _, _) -> true | _ -> false)) && not e1info.HasEffect then e2R, e2info else - Expr.Sequential (e1R, e2R, flag, spSeq, m), + Expr.Sequential (e1R, e2R, flag, m), { TotalSize = e1info.TotalSize + e2info.TotalSize FunctionSize = e1info.FunctionSize + e2info.FunctionSize HasEffect = flag <> NormalSeq || e1info.HasEffect || e2info.HasEffect @@ -2541,7 +2590,9 @@ and OptimizeLinearExpr cenv env expr contf = Info = UnknownValue })) | Expr.Let (bind, body, m, _) -> + let (bindR, bindingInfo), env = OptimizeBinding cenv false env bind + OptimizeLinearExpr cenv env body (contf << (fun (bodyR, bodyInfo) -> // PERF: This call to ValueIsUsedOrHasEffect/freeInExpr amounts to 9% of all optimization time. // Is it quadratic or quasi-quadratic? @@ -2564,7 +2615,7 @@ and OptimizeLinearExpr cenv env expr contf = MightMakeCriticalTailcall = bodyInfo.MightMakeCriticalTailcall // discard tailcall info from binding - not in tailcall position Info = evalueR } )) - | LinearMatchExpr (spMatch, exprm, dtree, tg1, e2, spTarget2, m, ty) -> + | LinearMatchExpr (spMatch, exprm, dtree, tg1, e2, m, ty) -> let dtreeR, dinfo = OptimizeDecisionTree cenv env m dtree let tg1, tg1info = OptimizeDecisionTreeTarget cenv env m tg1 // tailcall @@ -2572,7 +2623,7 @@ and OptimizeLinearExpr cenv env expr contf = // This ConsiderSplitToMethod is performed because it is present in OptimizeDecisionTreeTarget let e2, e2info = ConsiderSplitToMethod cenv.settings.abstractBigTargets cenv.settings.bigTargetSize cenv env (e2, e2info) let tinfos = [tg1info; e2info] - let targetsR = [tg1; TTarget([], e2, spTarget2, None)] + let targetsR = [tg1; TTarget([], e2, None)] OptimizeMatchPart2 cenv (spMatch, exprm, dtreeR, targetsR, dinfo, tinfos, m, ty))) | LinearOpExpr (op, tyargs, argsHead, argLast, m) -> @@ -2581,6 +2632,10 @@ and OptimizeLinearExpr cenv env expr contf = OptimizeLinearExpr cenv env argLast (contf << (fun (argLastR, argLastInfo) -> OptimizeExprOpReductionsAfter cenv env (op, tyargs, argsHeadR @ [argLastR], argsHeadInfosR @ [argLastInfo], m))) + | Expr.DebugPoint (m, innerExpr) when not (IsDebugPipeRightExpr cenv innerExpr)-> + OptimizeLinearExpr cenv env innerExpr (contf << (fun (innerExprR, einfo) -> + Expr.DebugPoint (m, innerExprR), einfo)) + | _ -> contf (OptimizeExpr cenv env expr) /// Optimize/analyze a try/finally construct. @@ -2595,12 +2650,11 @@ and OptimizeTryFinally cenv env (spTry, spFinally, e1, e2, m, ty) = Info = UnknownValue } // try-finally, so no effect means no exception can be raised, so just sequence the finally if cenv.settings.EliminateTryWithAndTryFinally && not e1info.HasEffect then - let sp = + let e1R2 = match spTry with - | DebugPointAtTry.Yes _ -> DebugPointAtSequential.SuppressNeither - | DebugPointAtTry.Body -> DebugPointAtSequential.SuppressNeither - | DebugPointAtTry.No -> DebugPointAtSequential.SuppressStmt - Expr.Sequential (e1R, e2R, ThenDoSeq, sp, m), info + | DebugPointAtTry.Yes m -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, e1R) + | DebugPointAtTry.No -> e1R + Expr.Sequential (e1R2, e2R, ThenDoSeq, m), info else mkTryFinally cenv.g (e1R, e2R, m, ty, spTry, spFinally), info @@ -2651,14 +2705,12 @@ and OptimizeTraitCall cenv env (traitInfo, args, m) = let argsR, arginfos = OptimizeExprsThenConsiderSplits cenv env args OptimizeExprOpFallback cenv env (TOp.TraitCall traitInfo, [], argsR, m) arginfos UnknownValue -and CopyExprForInlining cenv isInlineIfLambda expr m = +and CopyExprForInlining cenv isInlineIfLambda expr (m: range) = // 'InlineIfLambda' doesn't erase ranges, e.g. if the lambda is user code. if isInlineIfLambda then expr |> copyExpr cenv.g CloneAll else - // Debug points are erased when doing inlining - // Locals are marked compiler generated when doing inlining expr |> copyExpr cenv.g CloneAllAndMarkExprValsAsCompilerGenerated |> remarkExpr m @@ -3109,20 +3161,22 @@ and StripPreComputationsFromComputedFunction g f0 args mkApp = | Expr.Let (bind, bodyExpr, m, _) -> let fs, remake = strip bodyExpr fs, (remake >> mkLetBind m bind) + | Expr.LetRec (binds, bodyExpr, m, _) -> let fs, remake = strip bodyExpr fs, (remake >> mkLetRecBinds m binds) - | Expr.Sequential (x1, bodyExpr, NormalSeq, sp, m) -> + + | Expr.Sequential (x1, bodyExpr, NormalSeq, m) -> let fs, remake = strip bodyExpr - fs, (remake >> (fun bodyExpr2 -> Expr.Sequential (x1, bodyExpr2, NormalSeq, sp, m))) + fs, (remake >> (fun bodyExpr2 -> Expr.Sequential (x1, bodyExpr2, NormalSeq, m))) // Matches which compute a different function on each branch are awkward, see above. | Expr.Match (spMatch, exprm, dtree, targets, dflt, _ty) when targets.Length <= 2 -> let fsl, targetRemakes = targets - |> Array.map (fun (TTarget(vs, bodyExpr, spTarget, flags)) -> + |> Array.map (fun (TTarget(vs, bodyExpr, flags)) -> let fs, remake = strip bodyExpr - fs, (fun holes -> TTarget(vs, remake holes, spTarget, flags))) + fs, (fun holes -> TTarget(vs, remake holes, flags))) |> Array.unzip let fs = List.concat fsl @@ -3138,6 +3192,10 @@ and StripPreComputationsFromComputedFunction g f0 args mkApp = Expr.Match (spMatch, exprm, dtree, targetsR, dflt, tyR) fs, remake + | Expr.DebugPoint (dp, innerExpr) -> + let fs, remake = strip innerExpr + fs, (remake >> (fun innerExprR -> Expr.DebugPoint (dp, innerExprR))) + | _ -> [f], (fun newExprs -> (assert (newExprs.Length = 1)); List.head newExprs) @@ -3254,7 +3312,16 @@ and OptimizeApplication cenv env (f0, f0ty, tyargs, args, m) = /// so we start with the full thing and descend down taking apps off the end first) /// The pipeline begins with a |>, ||> or |||> and getPipes g expr acc = - match expr with + // Note, we strip any outer debug points because we are replacing it with more specific debug points along + // the pipeline. + // + // For example + // let test () = x |> f + // initially has a debug point covering "x |> f", e.g. + // let test () = DP(x |> f) + // This is dreplaced by + // let test () = DP(x) |> DP(f) + match stripDebugPoints expr with | OpPipeRight g (resType, xExpr, fExpr, m) -> getPipes g xExpr (([xExpr.Range], resType, fExpr, m) :: acc) | OpPipeRight2 g (resType, x1Expr, x2Expr, fExpr, m) -> @@ -3289,7 +3356,7 @@ and OptimizeDebugPipeRights cenv env expr = let fType = tyOfExpr g fExpr let fR, finfo = OptimizeExpr cenv env fExpr let app = mkApps g ((fR, fType), [], prevInputs, fRange) - let expr = mkDebugPoint g fRange app + let expr = mkDebugPoint fRange app let info = CombineValueInfosUnknown [finfo; prevInputInfo] expr, info @@ -3556,12 +3623,12 @@ and RebuildOptimizedMatch (spMatch, exprm, m, ty, dtree, tgs, dinfo, tinfos) = expr, einfo /// Optimize/analyze a target of a decision tree -and OptimizeDecisionTreeTarget cenv env _m (TTarget(vs, expr, spTarget, flags)) = +and OptimizeDecisionTreeTarget cenv env _m (TTarget(vs, expr, flags)) = let env = BindInternalValsToUnknown cenv vs env let exprR, einfo = OptimizeExpr cenv env expr let exprR, einfo = ConsiderSplitToMethod cenv.settings.abstractBigTargets cenv.settings.bigTargetSize cenv env (exprR, einfo) let evalueR = AbstractExprInfoByVars (vs, []) einfo.Info - TTarget(vs, exprR, spTarget, flags), + TTarget(vs, exprR, flags), { TotalSize=einfo.TotalSize FunctionSize=einfo.FunctionSize HasEffect=einfo.HasEffect @@ -3891,7 +3958,8 @@ and OptimizeModuleDefs cenv (env, bindInfosColl) defs = let defs, minfos = List.unzip defs (defs, UnionOptimizationInfos minfos), (env, bindInfosColl) -and OptimizeImplFileInternal cenv env isIncrementalFragment hidden (TImplFile (qname, pragmas, mexpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = +and OptimizeImplFileInternal cenv env isIncrementalFragment hidden implFile = + let (TImplFile (qname, pragmas, mexpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = implFile let env, mexprR, minfo = match mexpr with // FSI: FSI compiles everything as if you're typing incrementally into one module @@ -3910,7 +3978,7 @@ and OptimizeImplFileInternal cenv env isIncrementalFragment hidden (TImplFile (q let hidden = ComputeHidingInfoAtAssemblyBoundary mexpr.Type hidden let minfo = AbstractLazyModulInfoByHiding true hidden minfo - env, TImplFile (qname, pragmas, mexprR, hasExplicitEntryPoint, isScript, anonRecdTypes), minfo, hidden + env, TImplFile (qname, pragmas, mexprR, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode), minfo, hidden /// Entry point let OptimizeImplFile (settings, ccu, tcGlobals, tcVal, importMap, optEnv, isIncrementalFragment, emitTailcalls, hidden, mimpls) = diff --git a/src/fsharp/ParseAndCheckInputs.fs b/src/fsharp/ParseAndCheckInputs.fs index 345a2113749..b65bb99d614 100644 --- a/src/fsharp/ParseAndCheckInputs.fs +++ b/src/fsharp/ParseAndCheckInputs.fs @@ -891,7 +891,7 @@ let TypeCheckOneInput(checkForErrors, let typeCheckOne = if skipImplIfSigExists && hadSig then let dummyExpr = ModuleOrNamespaceExprWithSig.ModuleOrNamespaceExprWithSig(rootSigOpt.Value, ModuleOrNamespaceExpr.TMDefs [], range.Zero) - let dummyImplFile = TypedImplFile.TImplFile(qualNameOfFile, [], dummyExpr, false, false, StampMap []) + let dummyImplFile = TypedImplFile.TImplFile(qualNameOfFile, [], dummyExpr, false, false, StampMap [], Map.empty) (EmptyTopAttrs, dummyImplFile, Unchecked.defaultof<_>, tcImplEnv, false) |> Cancellable.ret diff --git a/src/fsharp/PatternMatchCompilation.fs b/src/fsharp/PatternMatchCompilation.fs index bf33354f082..f65a30c87f9 100644 --- a/src/fsharp/PatternMatchCompilation.fs +++ b/src/fsharp/PatternMatchCompilation.fs @@ -79,7 +79,7 @@ and TypedMatchClause = member c.Pattern = let (TClause(p, _, _, _)) = c in p member c.Range = let (TClause(_, _, _, m)) = c in m member c.Target = let (TClause(_, _, tg, _)) = c in tg - member c.BoundVals = let (TClause(_p, _whenOpt, TTarget(vs, _, _, _), _m)) = c in vs + member c.BoundVals = let (TClause(_p, _whenOpt, TTarget(vs, _, _), _m)) = c in vs let debug = false @@ -853,7 +853,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, DebugPointAtTarget.No, None) + let tg = TTarget([], throwExpr, None) let _ = matchBuilder.AddTarget tg let clause = TClause(TPat_wild matchm, None, tg, matchm) incompleteMatchClauseOnce <- Some clause @@ -1406,14 +1406,8 @@ let rec CompilePattern g denv amap tcVal infoReader exprm matchm warnOnUnused a // Make the expression that represents the remaining cases of the pattern match. let expr = mkAndSimplifyMatch DebugPointAtBinding.NoneAtInvisible exprm matchm resultTy decisionTree targets - // 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 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) + let clauseForRestOfMatch = TClause(TPat_wild matchm, None, TTarget(List.empty, expr, None), matchm) CompilePatternBasic g denv amap tcVal infoReader exprm matchm warnOnUnused warnOnIncomplete actionOnFailure (origInputVal, origInputValTypars, origInputExprOpt) (group @ [clauseForRestOfMatch]) inputTy resultTy diff --git a/src/fsharp/PostInferenceChecks.fs b/src/fsharp/PostInferenceChecks.fs index 6fe439b04ef..a2609b70832 100644 --- a/src/fsharp/PostInferenceChecks.fs +++ b/src/fsharp/PostInferenceChecks.fs @@ -49,11 +49,6 @@ open FSharp.Compiler.TypeRelations // 6. All other constructs are assumed to generate IL code sequences. // For correctness, this claim needs to be justified. // -// Q: Do any post check rewrite passes factor expressions out to other functions? -// A1. The optimiser may introduce auxiliary functions, e.g. by splitting out match-branches. -// This should not be done if the refactored body contains an unbound reraise. -// A2. TLR? Are any expression factored out into functions? -// // Informal justification: // If a reraise occurs, then it is minimally contained by either: // a) a try-catch - accepted. @@ -598,7 +593,7 @@ let mkArgsForAppliedVal isBaseCall (vref: ValRef) argsl = /// Work out what byref-values are allowed at input positions to functions let rec mkArgsForAppliedExpr isBaseCall argsl x = - match stripExpr x with + match stripDebugPoints (stripExpr x) with // recognise val | Expr.Val (vref, _, _) -> mkArgsForAppliedVal isBaseCall vref argsl // step through instantiations @@ -681,9 +676,10 @@ let CheckTypeInstNoInnerByrefs cenv env m tyargs = tyargs |> List.iter (CheckTypeNoInnerByrefs cenv env m) /// Applied functions get wrapped in coerce nodes for subsumption coercions -let (|OptionalCoerce|) = function - | Expr.Op (TOp.Coerce _, _, [Expr.App (f, _, _, [], _)], _) -> f - | x -> x +let (|OptionalCoerce|) expr = + match stripDebugPoints expr with + | Expr.Op (TOp.Coerce _, _, [DebugPoints(Expr.App (f, _, _, [], _), _)], _) -> f + | _ -> expr /// Check an expression doesn't contain a 'reraise' let CheckNoReraise cenv freesOpt (body: Expr) = @@ -835,6 +831,7 @@ and CheckValUse (cenv: cenv) (env: env) (vref: ValRef, vFlags, m) (context: Perm and CheckForOverAppliedExceptionRaisingPrimitive (cenv: cenv) expr = let g = cenv.g let expr = stripExpr expr + let expr = stripDebugPoints expr // Some things are more easily checked prior to NormalizeAndAdjustPossibleSubsumptionExprs match expr with @@ -961,7 +958,7 @@ and CheckCallWithReceiver cenv env m returnTy args contexts context = and CheckExprLinear (cenv: cenv) (env: env) expr (context: PermitByRefExpr) (contf : Limit -> Limit) = match expr with - | Expr.Sequential (e1, e2, NormalSeq, _, _) -> + | Expr.Sequential (e1, e2, NormalSeq, _) -> CheckExprNoByrefs cenv env e1 // tailcall CheckExprLinear cenv env e2 context contf @@ -987,13 +984,16 @@ and CheckExprLinear (cenv: cenv) (env: env) expr (context: PermitByRefExpr) (con // tailcall CheckExprLinear cenv env argLast PermitByRefExpr.No (fun _ -> contf NoLimit) - | LinearMatchExpr (_spMatch, _exprm, dtree, tg1, e2, _spTarget2, m, ty) -> + | LinearMatchExpr (_spMatch, _exprm, dtree, tg1, e2, m, ty) -> CheckTypeNoInnerByrefs cenv env m ty CheckDecisionTree cenv env dtree let lim1 = CheckDecisionTreeTarget cenv env context tg1 // tailcall CheckExprLinear cenv env e2 context (fun lim2 -> contf (CombineLimits [ lim1; lim2 ])) + | Expr.DebugPoint (_, innerExpr) -> + CheckExprLinear cenv env innerExpr context contf + | _ -> // not a linear expression contf (CheckExpr cenv env expr context) @@ -1045,7 +1045,7 @@ and TryCheckResumableCodeConstructs cenv env expr : bool = true // Integer for-loops are allowed but their bodies are not currently resumable - | ForLoopExpr (_sp1, _sp2, e1, e2, v, e3, _m) -> + | IntegerForLoopExpr (_sp1, _sp2, _style, e1, e2, v, e3, _m) -> CheckExprNoByrefs cenv { env with resumableCode = Resumable.None } e1 CheckExprNoByrefs cenv { env with resumableCode = Resumable.None } e2 BindVal cenv env v @@ -1064,7 +1064,7 @@ and TryCheckResumableCodeConstructs cenv env expr : bool = true | Expr.Match (_spBind, _exprm, dtree, targets, _m, _ty) -> - targets |> Array.iter(fun (TTarget(vs, targetExpr, _spTarget, _)) -> + targets |> Array.iter(fun (TTarget(vs, targetExpr, _)) -> BindVals cenv env vs CheckExprNoByrefs cenv env targetExpr) CheckDecisionTree cenv { env with resumableCode = Resumable.None } dtree @@ -1088,6 +1088,9 @@ and TryCheckResumableCodeConstructs cenv env expr : bool = | Expr.Const (Const.Zero, _, _) -> true + | Expr.DebugPoint (_, innerExpr) -> + TryCheckResumableCodeConstructs cenv env innerExpr + | _ -> false @@ -1119,10 +1122,11 @@ and CheckExpr (cenv: cenv) (env: env) origExpr (context: PermitByRefExpr) : Limi | LinearOpExpr _ | LinearMatchExpr _ | Expr.Let _ - | Expr.Sequential (_, _, NormalSeq, _, _) -> + | Expr.Sequential (_, _, NormalSeq, _) + | Expr.DebugPoint _ -> CheckExprLinear cenv env expr context id - | Expr.Sequential (e1,e2,ThenDoSeq,_,_) -> + | Expr.Sequential (e1, e2, ThenDoSeq, _) -> CheckExprNoByrefs cenv env e1 CheckExprNoByrefs cenv {env with ctorLimitedZone=false} e2 NoLimit @@ -1430,7 +1434,7 @@ and CheckExprOp cenv env (op, tyargs, args, m) context expr = CheckExprNoByrefs cenv env e2 limit - | TOp.For _, _, [Expr.Lambda (_, _, _, [_], e1, _, _);Expr.Lambda (_, _, _, [_], e2, _, _);Expr.Lambda (_, _, _, [_], e3, _, _)] -> + | TOp.IntegerForLoop _, _, [Expr.Lambda (_, _, _, [_], e1, _, _);Expr.Lambda (_, _, _, [_], e2, _, _);Expr.Lambda (_, _, _, [_], e3, _, _)] -> CheckTypeInstNoByrefs cenv env m tyargs CheckExprsNoByRefLike cenv env [e1;e2;e3] @@ -1538,7 +1542,7 @@ and CheckExprOp cenv env (op, tyargs, args, m) context expr = | TOp.AnonRecdGet _, _, [arg1] | TOp.TupleFieldGet _, _, [arg1] -> CheckTypeInstNoByrefs cenv env m tyargs - CheckExprsPermitByRefLike cenv env [arg1] (* Compiled pattern matches on immutable value structs come through here. *) + CheckExprsPermitByRefLike cenv env [arg1] | TOp.ValFieldGet _rf, _, [arg1] -> CheckTypeInstNoByrefs cenv env m tyargs @@ -1589,7 +1593,7 @@ and CheckExprOp cenv env (op, tyargs, args, m) context expr = // C# applies a rule where the APIs to struct types can't return the addresses of fields in that struct. // There seems no particular reason for this given that other protections in the language, though allowing // it would mean "readonly" on a struct doesn't imply immutability-of-contents - it only implies - if context.PermitOnlyReturnable && (match obj with Expr.Val (vref, _, _) -> vref.IsMemberThisVal | _ -> false) && isByrefTy g (tyOfExpr g obj) then + if context.PermitOnlyReturnable && (match stripDebugPoints obj with Expr.Val (vref, _, _) -> vref.IsMemberThisVal | _ -> false) && isByrefTy g (tyOfExpr g obj) then errorR(Error(FSComp.SR.chkStructsMayNotReturnAddressesOfContents(), m)) if context.Disallow && cenv.reportErrors && isByrefLikeTy g m (tyOfExpr g expr) then @@ -1614,7 +1618,7 @@ and CheckExprOp cenv env (op, tyargs, args, m) context expr = if context.Disallow && cenv.reportErrors && isByrefLikeTy g m (tyOfExpr g expr) then errorR(Error(FSComp.SR.chkNoAddressFieldAtThisPoint(uref.CaseName), m)) - if context.PermitOnlyReturnable && (match obj with Expr.Val (vref, _, _) -> vref.IsMemberThisVal | _ -> false) && isByrefTy g (tyOfExpr g obj) then + if context.PermitOnlyReturnable && (match stripDebugPoints obj with Expr.Val (vref, _, _) -> vref.IsMemberThisVal | _ -> false) && isByrefTy g (tyOfExpr g obj) then errorR(Error(FSComp.SR.chkStructsMayNotReturnAddressesOfContents(), m)) CheckTypeInstNoByrefs cenv env m tyargs @@ -1689,7 +1693,7 @@ and CheckLambdas isTop (memberVal: Val option) cenv env inlined topValInfo alway // The topValInfo here says we are _guaranteeing_ to compile a function value // as a .NET method with precisely the corresponding argument counts. - match expr with + match stripDebugPoints expr with | Expr.TyChoose (tps, e1, m) -> let env = BindTypars g env tps CheckLambdas isTop memberVal cenv env inlined topValInfo alwaysCheckNoReraise e1 m ety context @@ -1822,7 +1826,7 @@ and CheckDecisionTreeTargets cenv env targets context = |> Array.map (CheckDecisionTreeTarget cenv env context) |> (CombineLimits << List.ofArray) -and CheckDecisionTreeTarget cenv env context (TTarget(vs, e, _, _)) = +and CheckDecisionTreeTarget cenv env context (TTarget(vs, e, _)) = BindVals cenv env vs vs |> List.iter (CheckValSpec PermitByRefType.All cenv env) CheckExpr cenv env e context @@ -1991,9 +1995,9 @@ and CheckBinding cenv env alwaysCheckNoReraise context (TBind(v, bindRhs, _) as // Check top-level let-bound values match bind.Var.ValReprInfo with - | Some info when info.HasNoArgs -> - CheckForByrefLikeType cenv env v.Range v.Type (fun () -> errorR(Error(FSComp.SR.chkNoByrefAsTopValue(), v.Range))) - | _ -> () + | Some info when info.HasNoArgs -> + CheckForByrefLikeType cenv env v.Range v.Type (fun () -> errorR(Error(FSComp.SR.chkNoByrefAsTopValue(), v.Range))) + | _ -> () match v.PublicPath with | None -> () diff --git a/src/fsharp/QuotationPickler.fs b/src/fsharp/QuotationPickler.fs index dd0ffda6906..6f7f1658870 100644 --- a/src/fsharp/QuotationPickler.fs +++ b/src/fsharp/QuotationPickler.fs @@ -208,7 +208,7 @@ let mkUInt64 (v, ty) = CombExpr(UInt64Op v, [ty], []) let mkSequential (e1, e2) = CombExpr(SeqOp, [], [e1;e2]) -let mkForLoop (x1, x2, x3) = CombExpr(ForLoopOp, [], [x1;x2;x3]) +let mkIntegerForLoop (x1, x2, x3) = CombExpr(ForLoopOp, [], [x1;x2;x3]) let mkWhileLoop (e1, e2) = CombExpr(WhileLoopOp, [], [e1;e2]) diff --git a/src/fsharp/QuotationPickler.fsi b/src/fsharp/QuotationPickler.fsi index d69e9ce2813..9b7f355a00d 100644 --- a/src/fsharp/QuotationPickler.fsi +++ b/src/fsharp/QuotationPickler.fsi @@ -92,7 +92,7 @@ val mkInt64 : int64 * TypeData -> ExprData val mkUInt64 : uint64 * TypeData -> ExprData val mkAddressOf : ExprData -> ExprData val mkSequential : ExprData * ExprData -> ExprData -val mkForLoop : ExprData * ExprData * ExprData -> ExprData +val mkIntegerForLoop : ExprData * ExprData * ExprData -> ExprData val mkWhileLoop : ExprData * ExprData -> ExprData val mkTryFinally : ExprData * ExprData -> ExprData val mkTryWith : ExprData * VarData * ExprData * VarData * ExprData -> ExprData diff --git a/src/fsharp/QuotationTranslator.fs b/src/fsharp/QuotationTranslator.fs index c383eac6f74..9659a0f6931 100644 --- a/src/fsharp/QuotationTranslator.fs +++ b/src/fsharp/QuotationTranslator.fs @@ -203,7 +203,7 @@ let (|ObjectInitializationCheck|_|) g expr = (_, 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 + [| TTarget([], Expr.App (Expr.Val (failInitRef, _, _), _, _, _, _), _); _ |], _, resultTy ) when IsCompilerGeneratedName name && name.StartsWithOrdinal("init") && @@ -281,7 +281,7 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. let g = cenv.g - let expr = DetectAndOptimizeForExpression g OptimizeIntRangesOnly expr + let expr = DetectAndOptimizeForEachExpression g OptimizeIntRangesOnly expr // Eliminate subsumption coercions for functions. This must be done post-typechecking because we need // complete inference types. @@ -479,10 +479,10 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. let typR = ConvType cenv env m retTy ConvDecisionTree cenv env tgs typR dtree - | Expr.Sequential (ObjectInitializationCheck g, x1, NormalSeq, _, _) -> + | Expr.Sequential (ObjectInitializationCheck g, x1, NormalSeq, _) -> ConvExpr cenv env x1 - | Expr.Sequential (x0, x1, NormalSeq, _, _) -> + | Expr.Sequential (x0, x1, NormalSeq, _) -> QP.mkSequential(ConvExpr cenv env x0, ConvExpr cenv env x1) | Expr.Obj (_, ty, _, _, [TObjExprMethod(TSlotSig(_, ctyp, _, _, _, _), _, tps, [tmvs], e, _) as tmethod], _, m) when isDelegateTy g ty -> @@ -497,7 +497,7 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. | Expr.TyChoose _ -> ConvExpr cenv env (TypeRelations.ChooseTyparSolutionsForFreeChoiceTypars g cenv.amap expr) - | Expr.Sequential (x0, x1, ThenDoSeq, _, _) -> + | Expr.Sequential (x0, x1, ThenDoSeq, _) -> QP.mkSequential(ConvExpr cenv env x0, ConvExpr cenv env x1) | Expr.Obj (_lambdaId, _typ, _basev, _basecall, _overrides, _iimpls, m) -> @@ -657,15 +657,15 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. | TOp.While _, [], [Expr.Lambda (_, _, _, [_], test, _, _);Expr.Lambda (_, _, _, [_], body, _, _)] -> QP.mkWhileLoop(ConvExpr cenv env test, ConvExpr cenv env body) - | TOp.For (_, FSharpForLoopUp), [], [Expr.Lambda (_, _, _, [_], lim0, _, _); Expr.Lambda (_, _, _, [_], SimpleArrayLoopUpperBound, lm, _); SimpleArrayLoopBody g (arr, elemTy, body)] -> + | TOp.IntegerForLoop (_, _, FSharpForLoopUp), [], [Expr.Lambda (_, _, _, [_], lim0, _, _); Expr.Lambda (_, _, _, [_], SimpleArrayLoopUpperBound, lm, _); SimpleArrayLoopBody g (arr, elemTy, body)] -> let lim1 = let len = mkCallArrayLength g lm elemTy arr // Array.length arr mkCallSubtractionOperator g lm g.int32_ty len (Expr.Const (Const.Int32 1, m, g.int32_ty)) // len - 1 - QP.mkForLoop(ConvExpr cenv env lim0, ConvExpr cenv env lim1, ConvExpr cenv env body) + QP.mkIntegerForLoop(ConvExpr cenv env lim0, ConvExpr cenv env lim1, ConvExpr cenv env body) - | TOp.For (_, dir), [], [Expr.Lambda (_, _, _, [_], lim0, _, _);Expr.Lambda (_, _, _, [_], lim1, _, _);body] -> + | TOp.IntegerForLoop (_, _, dir), [], [Expr.Lambda (_, _, _, [_], lim0, _, _);Expr.Lambda (_, _, _, [_], lim1, _, _);body] -> match dir with - | FSharpForLoopUp -> QP.mkForLoop(ConvExpr cenv env lim0, ConvExpr cenv env lim1, ConvExpr cenv env body) + | FSharpForLoopUp -> QP.mkIntegerForLoop(ConvExpr cenv env lim0, ConvExpr cenv env lim1, ConvExpr cenv env body) | _ -> wfail(Error(FSComp.SR.crefQuotationsCantContainDescendingForLoops(), m)) | TOp.ILCall (_, _, _, isCtor, valUseFlag, isProperty, _, ilMethRef, enclTypeInst, methInst, _), [], callArgs -> @@ -750,6 +750,9 @@ and private ConvExprCore cenv (env : QuotationTranslationEnv) (expr: Expr) : QP. | Expr.WitnessArg (traitInfo, m) -> ConvWitnessInfo cenv env m traitInfo + | Expr.DebugPoint (_, innerExpr) -> + ConvExpr cenv env innerExpr + | _ -> wfail(InternalError(sprintf "unhandled construct in AST: %A" expr, expr.Range)) @@ -1104,7 +1107,7 @@ and ConvDecisionTree cenv env tgs typR x = EmitDebugInfoIfNecessary cenv env m converted | TDSuccess (args, n) -> - let (TTarget(vars, rhs, _, _)) = tgs.[n] + let (TTarget(vars, rhs, _)) = tgs.[n] // TAST stores pattern bindings in reverse order for some reason // Reverse them here to give a good presentation to the user let args = List.rev args diff --git a/src/fsharp/SyntaxTree.fs b/src/fsharp/SyntaxTree.fs index 8df8bb8308c..e84314604eb 100644 --- a/src/fsharp/SyntaxTree.fs +++ b/src/fsharp/SyntaxTree.fs @@ -188,9 +188,12 @@ type DebugPointAtSequential = [] type DebugPointAtTry = | Yes of range: range - | Body | No +[] +type DebugPointAtLeafExpr = + | Yes of range + [] type DebugPointAtWith = | Yes of range: range @@ -199,7 +202,6 @@ type DebugPointAtWith = [] type DebugPointAtFinally = | Yes of range: range - | Body | No [] @@ -207,6 +209,11 @@ type DebugPointAtFor = | Yes of range: range | No +[] +type DebugPointAtInOrTo = + | Yes of range: range + | No + [] type DebugPointAtWhile = | Yes of range: range @@ -216,7 +223,7 @@ type DebugPointAtWhile = type DebugPointAtBinding = | Yes of range: range - | NoneAtDo + | ImplicitAtDo | NoneAtLet @@ -520,6 +527,7 @@ type SynExpr = | For of forDebugPoint: DebugPointAtFor * + toDebugPoint: DebugPointAtInOrTo * ident: Ident * equalsRange: range option * identBody: SynExpr * @@ -530,6 +538,7 @@ type SynExpr = | ForEach of forDebugPoint: DebugPointAtFor * + inDebugPoint: DebugPointAtInOrTo * seqExprOnly: SeqExprOnly * isFromSource: bool * pat: SynPat * @@ -848,6 +857,10 @@ type SynExpr = synStringKind :SynStringKind * range: range + | DebugPoint of + debugPoint: (DebugPointAtLeafExpr * bool) option * + innerExpr: SynExpr + member e.Range = match e with | SynExpr.Paren (_, leftParenRange, rightParenRange, r) -> @@ -918,6 +931,7 @@ type SynExpr = | SynExpr.Fixed (range=m) | SynExpr.InterpolatedString (range=m) -> m | SynExpr.Ident id -> id.idRange + | SynExpr.DebugPoint (_, innerExpr) -> innerExpr.Range member e.RangeWithoutAnyExtraDot = match e with @@ -938,7 +952,7 @@ type SynExpr = | SynExpr.SequentialOrImplicitYield (_, e1, _, _, _) | SynExpr.App (_, _, e1, _, _) -> e1.RangeOfFirstPortion - | SynExpr.ForEach (_, _, _, pat, _, _, r) -> + | SynExpr.ForEach (pat=pat; range=r) -> let start = r.Start let e = (pat.Range: range).Start mkRange r.FileName start e diff --git a/src/fsharp/SyntaxTree.fsi b/src/fsharp/SyntaxTree.fsi index 2b66e15c770..75f53a5b4ca 100644 --- a/src/fsharp/SyntaxTree.fsi +++ b/src/fsharp/SyntaxTree.fsi @@ -218,6 +218,11 @@ type DebugPointAtTarget = | Yes | No +/// Represents a debug point at a leaf expression (e.g. an application or constant). +[] +type DebugPointAtLeafExpr = + | Yes of range + /// 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' @@ -231,6 +236,7 @@ type DebugPointAtSwitch = /// construct corresponds to a debug point in the original source. [] type DebugPointAtSequential = + // This means "always put an implicit debug point on each part of the sequential" | SuppressNeither // This means "suppress a in 'a;b'" and "suppress b in 'a before b'" @@ -247,7 +253,6 @@ type DebugPointAtSequential = [] type DebugPointAtTry = | Yes of range: range - | Body | No /// Represents whether a debug point should be present for the 'with' in a 'try .. with', @@ -262,7 +267,6 @@ type DebugPointAtWith = [] type DebugPointAtFinally = | Yes of range: range - | Body | No /// Represents whether a debug point should be present for the 'for' in a 'for...' loop, @@ -272,6 +276,13 @@ type DebugPointAtFor = | Yes of range: range | No +/// Represents whether a debug point should be present for the 'in' or 'to' of a 'for...' loop, +/// that is whether the construct corresponds to a debug point in the original source. +[] +type DebugPointAtInOrTo = + | Yes of range: range + | No + /// Represents whether a debug point should be present for the 'while' in a 'while...' loop, /// that is whether the construct corresponds to a debug point in the original source. [] @@ -287,7 +298,7 @@ type DebugPointAtBinding = | Yes of range: range // Indicates the omission of a debug point for a binding for a 'do expr' - | NoneAtDo + | ImplicitAtDo // Indicates the omission of a debug point for a binding for a 'let e = expr' where // 'expr' has immediate control flow @@ -634,6 +645,7 @@ type SynExpr = /// F# syntax: 'for i = ... to ... do ...' | For of forDebugPoint: DebugPointAtFor * + toDebugPoint: DebugPointAtInOrTo * ident: Ident * equalsRange: range option * identBody: SynExpr * @@ -645,6 +657,7 @@ type SynExpr = /// F# syntax: 'for ... in ... do ...' | ForEach of forDebugPoint: DebugPointAtFor * + inDebugPoint: DebugPointAtInOrTo * seqExprOnly: SeqExprOnly * isFromSource: bool * pat: SynPat * @@ -1050,6 +1063,11 @@ type SynExpr = synStringKind :SynStringKind * range: range + /// Debug points arising from computation expressions + | DebugPoint of + debugPoint: (DebugPointAtLeafExpr * bool) option * + innerExpr: SynExpr + /// Gets the syntax range of this construct member Range: range diff --git a/src/fsharp/SyntaxTreeOps.fs b/src/fsharp/SyntaxTreeOps.fs index 10340e8b374..2759b595483 100644 --- a/src/fsharp/SyntaxTreeOps.fs +++ b/src/fsharp/SyntaxTreeOps.fs @@ -72,8 +72,14 @@ let (|SingleIdent|_|) inp = /// This affects placement of sequence points let rec IsControlFlowExpression e = match e with - | SynExpr.ObjExpr _ + // We do allow breakpoints on the creation of a delegate or object using an object expression + //| SynExpr.ObjExpr _ + + // These expressions create an object, but we do not allow breakpoints on the creation of the lambda, only on the execution + // of its body. + | SynExpr.MatchLambda _ | SynExpr.Lambda _ + | SynExpr.LetOrUse _ | SynExpr.Sequential _ // Treat "ident { ... }" as a control flow expression @@ -89,6 +95,17 @@ let rec IsControlFlowExpression e = | SynExpr.Typed (e, _, _) -> IsControlFlowExpression e | _ -> false +// The debug point for a 'let' extends to include the 'let' if we're not defining a function and the r.h.s. is not a control-flow +// expression +let IsDebugPointBinding synPat synExpr = + not (IsControlFlowExpression synExpr) && + // Don't yield the binding sequence point if there are any arguments, i.e. we're defining a function or a method + let isFunction = + match synPat with + | SynPat.LongIdent (argPats=SynArgPats.Pats args) when not (List.isEmpty args) -> true + | _ -> false + not isFunction + let mkSynAnonField (ty: SynType, xmlDoc) = SynField([], false, None, ty, false, xmlDoc, None, ty.Range) let mkSynNamedField (ident, ty: SynType, xmlDoc, m) = SynField([], false, Some ident, ty, false, xmlDoc, None, m) @@ -667,6 +684,7 @@ let rec synExprContainsError inpExpr = | SynExpr.YieldOrReturnFrom (_, e, _) | SynExpr.DoBang (e, _) | SynExpr.Fixed (e, _) + | SynExpr.DebugPoint (_, e) | SynExpr.Paren (e, _, _, _) -> walkExpr e @@ -694,7 +712,7 @@ let rec synExprContainsError inpExpr = | SynExpr.ObjExpr (bindings=bs; extraImpls=is) -> walkBinds bs || walkBinds [ for SynInterfaceImpl(bindings=bs) in is do yield! bs ] - | SynExpr.ForEach (_, _, _, _, e1, e2, _) + | SynExpr.ForEach (_, _, _, _, _, e1, e2, _) | SynExpr.While (_, e1, e2, _) -> walkExpr e1 || walkExpr e2 diff --git a/src/fsharp/SyntaxTreeOps.fsi b/src/fsharp/SyntaxTreeOps.fsi index faa9725da4d..ecff46167e7 100644 --- a/src/fsharp/SyntaxTreeOps.fsi +++ b/src/fsharp/SyntaxTreeOps.fsi @@ -48,6 +48,10 @@ val (|SingleIdent|_|): inp:SynExpr -> Ident option /// This affects placement of sequence points val IsControlFlowExpression: e:SynExpr -> bool +// The debug point for a 'let' extends to include the 'let' if we're not defining a function and the r.h.s. is not a control-flow +// expression. Otherwise, there is no debug point at the binding. +val IsDebugPointBinding: synPat: SynPat -> synExpr: SynExpr -> bool + val mkSynAnonField: ty:SynType * xmlDoc:PreXmlDoc -> SynField val mkSynNamedField: ident:Ident * ty:SynType * xmlDoc:PreXmlDoc * m:range -> SynField diff --git a/src/fsharp/TcGlobals.fs b/src/fsharp/TcGlobals.fs index 65fdea4b6d6..4cdaf2cc326 100755 --- a/src/fsharp/TcGlobals.fs +++ b/src/fsharp/TcGlobals.fs @@ -181,7 +181,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d mlCompatibility: bool, isInteractive:bool, // The helper to find system types amongst referenced DLLs tryFindSysTypeCcu, - emitDebugInfoInQuotations: bool, noDebugData: bool, + emitDebugInfoInQuotations: bool, noDebugAttributes: bool, pathMap: PathMap, langVersion: LanguageVersion) = let vara = Construct.NewRigidTypar "a" envRange @@ -732,6 +732,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let v_seq_of_functions_info = makeIntrinsicValRef(fslib_MFRuntimeHelpers_nleref, "EnumerateFromFunctions" , None , None , [vara;varb], ([[v_unit_ty --> varaTy]; [varaTy --> v_bool_ty]; [varaTy --> varbTy]], mkSeqTy varbTy)) let v_create_event_info = makeIntrinsicValRef(fslib_MFRuntimeHelpers_nleref, "CreateEvent" , None , None , [vara;varb], ([[varaTy --> v_unit_ty]; [varaTy --> v_unit_ty]; [(v_obj_ty --> (varbTy --> v_unit_ty)) --> varaTy]], TType_app (v_fslib_IEvent2_tcr, [varaTy;varbTy]))) let v_cgh__useResumableCode_info = makeIntrinsicValRef(fslib_MFStateMachineHelpers_nleref, "__useResumableCode" , None , None , [vara], ([[]], v_bool_ty)) + let v_cgh__debugPoint_info = makeIntrinsicValRef(fslib_MFStateMachineHelpers_nleref, "__debugPoint" , None , None , [vara], ([[v_int_ty]; [varaTy]], varaTy)) let v_cgh__resumeAt_info = makeIntrinsicValRef(fslib_MFStateMachineHelpers_nleref, "__resumeAt" , None , None , [vara], ([[v_int_ty]; [varaTy]], varaTy)) let v_cgh__stateMachine_info = makeIntrinsicValRef(fslib_MFStateMachineHelpers_nleref, "__stateMachine" , None , None , [vara; varb], ([[varaTy]], varbTy)) // inaccurate type but it doesn't matter for linking let v_cgh__resumableEntry_info = makeIntrinsicValRef(fslib_MFStateMachineHelpers_nleref, "__resumableEntry" , None , None , [vara], ([[v_int_ty --> varaTy]; [v_unit_ty --> varaTy]], varaTy)) @@ -788,16 +789,31 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let attribs = match generatedAttribsCache with | [] -> - let res = [ if not noDebugData then - yield mkCompilerGeneratedAttribute() - yield mkDebuggerNonUserCodeAttribute()] + let res = + [ if not noDebugAttributes then + mkCompilerGeneratedAttribute() + mkDebuggerNonUserCodeAttribute()] generatedAttribsCache <- res res | res -> res mkILCustomAttrs (attrs.AsList @ attribs) let addMethodGeneratedAttrs (mdef:ILMethodDef) = mdef.With(customAttrs = addGeneratedAttrs mdef.CustomAttrs) + + // If generating debug information, then code that has no debug points apart from OxFEEFEE + // get CompilerGeneratedAttribute and DebuggerNonUserCodeAttribute, e.g. for lambdas + // from computation expressions. + let addMethodGeneratedAttrsIfNoDebugPoints debuginfo (mdef:ILMethodDef) = + if noDebugAttributes || not debuginfo then + mdef + else + match mdef.Body with + | MethodBody.IL ilBody when ilBody.Value.Code.Instrs |> Array.forall (function I_seqpoint sp -> sp.Line = 0xFEEFEE | _ -> true) -> + mdef.With(customAttrs = addGeneratedAttrs mdef.CustomAttrs) + | _ -> mdef + let addPropertyGeneratedAttrs (pdef:ILPropertyDef) = pdef.With(customAttrs = addGeneratedAttrs pdef.CustomAttrs) + let addFieldGeneratedAttrs (fdef:ILFieldDef) = fdef.With(customAttrs = addGeneratedAttrs fdef.CustomAttrs) let tref_DebuggerBrowsableAttribute n = @@ -1528,6 +1544,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member val cgh__stateMachine_vref = ValRefForIntrinsic v_cgh__stateMachine_info member val cgh__useResumableCode_vref = ValRefForIntrinsic v_cgh__useResumableCode_info + member val cgh__debugPoint_vref = ValRefForIntrinsic v_cgh__debugPoint_info member val cgh__resumeAt_vref = ValRefForIntrinsic v_cgh__resumeAt_info member val cgh__resumableEntry_vref = ValRefForIntrinsic v_cgh__resumableEntry_info @@ -1579,7 +1596,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member _.TryFindSysAttrib nm = tryFindSysAttrib nm member val ilxPubCloEnv = - EraseClosures.newIlxPubCloEnv(ilg, addMethodGeneratedAttrs, addFieldGeneratedAttrs, addFieldNeverAttrs) + EraseClosures.newIlxPubCloEnv(ilg, addMethodGeneratedAttrs, addFieldGeneratedAttrs, addFieldNeverAttrs, addMethodGeneratedAttrsIfNoDebugPoints) member _.AddMethodGeneratedAttributes mdef = addMethodGeneratedAttrs mdef @@ -1587,8 +1604,6 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member _.AddFieldNeverAttrs mdef = addFieldNeverAttrs mdef - member _.mkDebuggerHiddenAttribute() = mkILCustomAttribute (findSysILTypeRef tname_DebuggerHiddenAttribute, [], [], []) - member _.mkDebuggerDisplayAttribute s = mkILCustomAttribute (findSysILTypeRef tname_DebuggerDisplayAttribute, [ilg.typ_String], [ILAttribElem.String (Some s)], []) member _.DebuggerBrowsableNeverAttribute = mkDebuggerBrowsableNeverAttribute() diff --git a/src/fsharp/TypeRelations.fs b/src/fsharp/TypeRelations.fs index b52dfac4dda..33fb87ae3fe 100755 --- a/src/fsharp/TypeRelations.fs +++ b/src/fsharp/TypeRelations.fs @@ -210,7 +210,7 @@ let IterativelySubstituteTyparSolutions g tps solutions = loop 0 solutions let ChooseTyparSolutionsForFreeChoiceTypars g amap e = - match e with + match stripDebugPoints e with | Expr.TyChoose (tps, e1, _m) -> /// Only make choices for variables that are actually used in the expression @@ -229,7 +229,7 @@ let ChooseTyparSolutionsForFreeChoiceTypars g amap e = /// PostTypeCheckSemanticChecks before we've eliminated these nodes. let tryDestTopLambda g amap (ValReprInfo (tpNames, _, _) as tvd) (e, ty) = let rec stripLambdaUpto n (e, ty) = - match e with + match stripDebugPoints e with | Expr.Lambda (_, None, None, v, b, _, retTy) when n > 0 -> let vs', b', retTy' = stripLambdaUpto (n-1) (b, retTy) (v :: vs', b', retTy') @@ -237,7 +237,7 @@ let tryDestTopLambda g amap (ValReprInfo (tpNames, _, _) as tvd) (e, ty) = ([], e, ty) let rec startStripLambdaUpto n (e, ty) = - match e with + match stripDebugPoints e with | Expr.Lambda (_, ctorThisValOpt, baseValOpt, v, b, _, retTy) when n > 0 -> let vs', b', retTy' = stripLambdaUpto (n-1) (b, retTy) (ctorThisValOpt, baseValOpt, (v :: vs'), b', retTy') @@ -248,7 +248,7 @@ let tryDestTopLambda g amap (ValReprInfo (tpNames, _, _) as tvd) (e, ty) = let n = tvd.NumCurriedArgs let tps, taue, tauty = - match e with + match stripDebugPoints e with | Expr.TyLambda (_, tps, b, _, retTy) when not (isNil tpNames) -> tps, b, retTy | _ -> [], e, ty let ctorThisValOpt, baseValOpt, vsl, body, retTy = startStripLambdaUpto n (taue, tauty) diff --git a/src/fsharp/TypedTree.fs b/src/fsharp/TypedTree.fs index 75b9073f9a9..cab36954288 100644 --- a/src/fsharp/TypedTree.fs +++ b/src/fsharp/TypedTree.fs @@ -4403,13 +4403,12 @@ type DecisionTreeTarget = | TTarget of boundVals: Val list * targetExpr: Expr * - debugPoint: DebugPointAtTarget * isStateVarFlags: bool list option [] member x.DebugText = x.ToString() - member x.TargetExpression = (let (TTarget(_, expr, _, _)) = x in expr) + member x.TargetExpression = (let (TTarget(_, expr, _)) = x in expr) override x.ToString() = sprintf "DecisionTreeTarget(...)" @@ -4569,7 +4568,6 @@ type Expr = expr1: Expr * expr2: Expr * kind: SequentialOpKind * - debugPoint: DebugPointAtSequential * range: range /// Lambda expressions. @@ -4655,7 +4653,7 @@ type Expr = range: range /// An intrinsic applied to some (strictly evaluated) arguments - /// A few of intrinsics (TOp_try, TOp.While, TOp.For) expect arguments kept in a normal form involving lambdas + /// A few of intrinsics (TOp_try, TOp.While, TOp.IntegerForLoop) expect arguments kept in a normal form involving lambdas | Op of op: TOp * typeArgs: TypeInst * @@ -4706,6 +4704,9 @@ type Expr = /// appropriate type instantiation. These are immediately eliminated on subsequent rewrites. | Link of Expr ref + /// Indicates a debug point should be placed prior to the expression. + | DebugPoint of DebugPointAtLeafExpr * Expr + [] member expr.DebugText = expr.ToDebugString(3) @@ -4717,7 +4718,7 @@ type Expr = match expr with | Const (c, _, _) -> c.ToString() | Val (v, _, _) -> v.LogicalName - | Sequential (e1, e2, _, _, _) -> "Sequential(" + e1.ToDebugString(depth) + ", " + e2.ToDebugString(depth) + ")" + | Sequential (e1, e2, _, _) -> "Sequential(" + e1.ToDebugString(depth) + ", " + e2.ToDebugString(depth) + ")" | Lambda (_, _, _, vs, body, _, _) -> sprintf "Lambda(%+A, " vs + body.ToDebugString(depth) + ")" | TyLambda (_, tps, body, _, _) -> sprintf "TyLambda(%+A, " tps + body.ToDebugString(depth) + ")" | App (f, _, _, args, _) -> "App(" + f.ToDebugString(depth) + ", [" + String.concat ", " (args |> List.map (fun e -> e.ToDebugString(depth))) + "])" @@ -4731,7 +4732,19 @@ type Expr = | WitnessArg _ -> "WitnessArg(..)" | TyChoose _ -> "TyChoose(..)" | Link e -> "Link(" + e.Value.ToDebugString(depth) + ")" - + | DebugPoint (DebugPointAtLeafExpr.Yes m, e) -> sprintf "DebugPoint(%s, " (m.ToShortString()) + e.ToDebugString(depth) + ")" + + /// Get the mark/range/position information from an expression + member expr.Range = + match expr with + | Expr.Val (_, _, m) | Expr.Op (_, _, _, m) | Expr.Const (_, m, _) | Expr.Quote (_, _, _, m, _) + | Expr.Obj (_, _, _, _, _, _, m) | Expr.App (_, _, _, _, m) | Expr.Sequential (_, _, _, m) + | Expr.StaticOptimization (_, _, _, m) | Expr.Lambda (_, _, _, _, _, m, _) + | Expr.WitnessArg (_, m) + | Expr.TyLambda (_, _, _, m, _)| Expr.TyChoose (_, _, m) | Expr.LetRec (_, _, m, _) | Expr.Let (_, _, m, _) | Expr.Match (_, _, _, _, m, _) -> m + | Expr.Link eref -> eref.Value.Range + | Expr.DebugPoint (_, e2) -> e2.Range + [] type TOp = @@ -4760,16 +4773,16 @@ type TOp = | UInt16s of uint16[] /// An operation representing a lambda-encoded while loop. The special while loop marker is used to mark compilations of 'foreach' expressions - | While of DebugPointAtWhile * SpecialWhileLoopMarker + | While of spWhile: DebugPointAtWhile * marker: SpecialWhileLoopMarker - /// An operation representing a lambda-encoded for loop - | For of DebugPointAtFor * ForLoopStyle (* count up or down? *) + /// An operation representing a lambda-encoded integer for-loop + | IntegerForLoop of spFor: DebugPointAtFor * spTo: DebugPointAtInOrTo * style: ForLoopStyle (* count up or down? *) /// An operation representing a lambda-encoded try/with - | TryWith of DebugPointAtTry * DebugPointAtWith + | TryWith of spTry: DebugPointAtTry * spWith: DebugPointAtWith /// An operation representing a lambda-encoded try/finally - | TryFinally of DebugPointAtTry * DebugPointAtFinally + | TryFinally of spTry: DebugPointAtTry * spFinally: DebugPointAtFinally /// Construct a record or object-model value. The ValRef is for self-referential class constructors, otherwise /// it indicates that we're in a constructor and the purpose of the expression is to @@ -4871,7 +4884,7 @@ type TOp = | Bytes _ -> "Bytes(..)" | UInt16s _ -> "UInt16s(..)" | While _ -> "While" - | For _ -> "For" + | IntegerForLoop _ -> "FastIntegerForLoop" | TryWith _ -> "TryWith" | TryFinally _ -> "TryFinally" | Recd (_, tcref) -> "Recd(" + tcref.LogicalName + ")" @@ -5155,18 +5168,37 @@ type ModuleOrNamespaceBinding = override _.ToString() = "ModuleOrNamespaceBinding(...)" +[] +type NamedDebugPointKey = + { Range: range + Name: string } + override x.GetHashCode() = hash x.Name + hash x.Range + override x.Equals(yobj: obj) = + match yobj with + | :? NamedDebugPointKey as y -> Range.equals x.Range y.Range && x.Name = y.Name + | _ -> false + interface IComparable with + member x.CompareTo(yobj: obj) = + match yobj with + | :? NamedDebugPointKey as y -> + let c = Range.rangeOrder.Compare(x.Range, y.Range) + if c <> 0 then c else + compare x.Name y.Name + | _ -> -1 + /// Represents a complete typechecked implementation file, including its typechecked signature if any. /// -/// TImplFile (qualifiedNameOfFile, pragmas, implementationExpressionWithSignature, hasExplicitEntryPoint, isScript, anonRecdTypeInfo) +/// TImplFile (qualifiedNameOfFile, pragmas, implExprWithSig, hasExplicitEntryPoint, isScript, anonRecdTypeInfo) [] type TypedImplFile = | TImplFile of qualifiedNameOfFile: QualifiedNameOfFile * pragmas: ScopedPragma list * - implementationExpressionWithSignature: ModuleOrNamespaceExprWithSig * + implExprWithSig: ModuleOrNamespaceExprWithSig * hasExplicitEntryPoint: bool * isScript: bool * - anonRecdTypeInfo: StampMap + anonRecdTypeInfo: StampMap * + namedDebugPointsForInlinedCode: Map [] member x.DebugText = x.ToString() diff --git a/src/fsharp/TypedTreeBasics.fs b/src/fsharp/TypedTreeBasics.fs index fe730b9aeba..b92bd6ff7bb 100644 --- a/src/fsharp/TypedTreeBasics.fs +++ b/src/fsharp/TypedTreeBasics.fs @@ -78,14 +78,14 @@ let mkRawStructTupleTy tys = TType_tuple (tupInfoStruct, tys) // make up the entire compilation unit //--------------------------------------------------------------------------- -let mapTImplFile f (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = - TImplFile (fragName, pragmas, f moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes) +let mapTImplFile f (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = + TImplFile (fragName, pragmas, f moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode) -let mapAccImplFile f z (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = +let mapAccImplFile f z (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = let moduleExpr, z = f z moduleExpr - TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes), z + TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode), z -let foldTImplFile f z (TImplFile (_, _, moduleExpr, _, _, _)) = f z moduleExpr +let foldTImplFile f z (TImplFile (implExprWithSig= moduleExpr)) = f z moduleExpr //--------------------------------------------------------------------------- // Equality relations on locally defined things diff --git a/src/fsharp/TypedTreeOps.fs b/src/fsharp/TypedTreeOps.fs index 87dfcfdeb37..f07bbb191a8 100644 --- a/src/fsharp/TypedTreeOps.fs +++ b/src/fsharp/TypedTreeOps.fs @@ -1170,26 +1170,24 @@ let rec stripExpr e = | Expr.Link eref -> stripExpr eref.Value | _ -> e +let rec stripDebugPoints expr = + match stripExpr expr with + | Expr.DebugPoint (_, innerExpr) -> stripDebugPoints innerExpr + | expr -> expr + +// Strip debug points and remember how to recrete them +let (|DebugPoints|) expr = + match stripExpr expr with + | Expr.DebugPoint (dp, innerExpr) -> innerExpr, (fun e -> Expr.DebugPoint(dp, e)) + | expr -> expr, id + let mkCase (a, b) = TCase(a, b) let isRefTupleExpr e = match e with Expr.Op (TOp.Tuple tupInfo, _, _, _) -> not (evalTupInfoIsStruct tupInfo) | _ -> false -let tryDestRefTupleExpr e = match e with Expr.Op (TOp.Tuple tupInfo, _, es, _) when not (evalTupInfoIsStruct tupInfo) -> es | _ -> [e] - -//--------------------------------------------------------------------------- -// Range info for expressions -//--------------------------------------------------------------------------- -let rec rangeOfExpr x = - match x with - | Expr.Val (_, _, m) | Expr.Op (_, _, _, m) | Expr.Const (_, m, _) | Expr.Quote (_, _, _, m, _) - | Expr.Obj (_, _, _, _, _, _, m) | Expr.App (_, _, _, _, m) | Expr.Sequential (_, _, _, _, m) - | Expr.StaticOptimization (_, _, _, m) | Expr.Lambda (_, _, _, _, _, m, _) - | Expr.WitnessArg (_, m) - | Expr.TyLambda (_, _, _, m, _)| Expr.TyChoose (_, _, m) | Expr.LetRec (_, _, m, _) | Expr.Let (_, _, m, _) | Expr.Match (_, _, _, _, m, _) -> m - | Expr.Link eref -> rangeOfExpr eref.Value +let tryDestRefTupleExpr e = match e with Expr.Op (TOp.Tuple tupInfo, _, es, _) when not (evalTupInfoIsStruct tupInfo) -> es | _ -> [e] -type Expr with - member x.Range = rangeOfExpr x +let rangeOfExpr (x: Expr) = x.Range //--------------------------------------------------------------------------- // Build nodes in decision graphs @@ -1206,22 +1204,22 @@ type MatchBuilder(spBind, inpRange: range) = targets.Add tg n - member x.AddResultTarget(e, spTarget) = TDSuccess([], x.AddTarget(TTarget([], e, spTarget, None))) + member x.AddResultTarget(e) = TDSuccess([], x.AddTarget(TTarget([], e, None))) - member x.CloseTargets() = targets |> ResizeArray.toList + member _.CloseTargets() = targets |> ResizeArray.toList - member x.Close(dtree, m, ty) = primMkMatch (spBind, inpRange, dtree, targets.ToArray(), m, ty) + member _.Close(dtree, m, ty) = primMkMatch (spBind, inpRange, dtree, targets.ToArray(), m, ty) 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 primMkCond spBind m ty e1 e2 e3 = let mbuilder = MatchBuilder(spBind, m) - let dtree = mkBoolSwitch DebugPointAtSwitch.No m e1 (mbuilder.AddResultTarget(e2, spTarget1)) (mbuilder.AddResultTarget(e3, spTarget2)) + let dtree = mkBoolSwitch DebugPointAtSwitch.No m e1 (mbuilder.AddResultTarget(e2)) (mbuilder.AddResultTarget(e3)) 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 m ty e1 e2 e3 = + primMkCond spBind m ty e1 e2 e3 //--------------------------------------------------------------------------- // Primitive constructors @@ -1352,10 +1350,10 @@ 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 + mkCond DebugPointAtBinding.NoneAtSticky 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) + mkCond DebugPointAtBinding.NoneAtSticky 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) @@ -1417,8 +1415,8 @@ let mkDummyLambda (g: TcGlobals) (e: Expr, ety) = let mkWhile (g: TcGlobals) (spWhile, marker, e1, e2, m) = Expr.Op (TOp.While (spWhile, marker), [], [mkDummyLambda g (e1, g.bool_ty);mkDummyLambda g (e2, g.unit_ty)], m) -let mkFor (g: TcGlobals) (spFor, v, e1, dir, e2, e3: Expr, m) = - Expr.Op (TOp.For (spFor, dir), [], [mkDummyLambda g (e1, g.int_ty) ;mkDummyLambda g (e2, g.int_ty);mkLambda e3.Range v (e3, g.unit_ty)], m) +let mkIntegerForLoop (g: TcGlobals) (spFor, spIn, v, e1, dir, e2, e3: Expr, m) = + Expr.Op (TOp.IntegerForLoop (spFor, spIn, dir), [], [mkDummyLambda g (e1, g.int_ty) ;mkDummyLambda g (e2, g.int_ty);mkLambda e3.Range v (e3, g.unit_ty)], m) let mkTryWith g (e1, vf, ef: Expr, vh, eh: Expr, m, ty, spTry, spWith) = Expr.Op (TOp.TryWith (spTry, spWith), [ty], [mkDummyLambda g (e1, ty);mkLambda ef.Range vf (ef, ty);mkLambda eh.Range vh (eh, ty)], m) @@ -3980,7 +3978,7 @@ module DebugPrint = | VSlotDirectCall -> xL ^^ rightL(tagText "") | NormalValUse -> xL xL - | Expr.Sequential (expr1, expr2, flag, _, _) -> + | Expr.Sequential (expr1, expr2, flag, _) -> let flag = match flag with | NormalSeq -> ";" @@ -4006,6 +4004,8 @@ module DebugPrint = letL g bind (exprL body) |> wrap | Expr.Link rX -> (wordL(tagText "RecLink") --- atomL rX.Value) |> wrap + | Expr.DebugPoint (_, rX) -> + (wordL(tagText "DebugPoint") --- atomL rX) |> wrap | Expr.Match (_, _, dtree, targets, _, _) -> leftL(tagText "[") ^^ (decisionTreeL g dtree @@ aboveListL (List.mapi targetL (targets |> Array.toList)) ^^ rightL(tagText "]")) | Expr.Op (TOp.UnionCase c, _, args, _) -> @@ -4069,7 +4069,7 @@ module DebugPrint = leftL(tagText "[|") ^^ commaListL (List.map exprL xs) ^^ rightL(tagText "|]") | Expr.Op (TOp.While _, [], [Expr.Lambda (_, _, _, [_], x1, _, _);Expr.Lambda (_, _, _, [_], x2, _, _)], _) -> (wordL(tagText "while") ^^ exprL x1 ^^ wordL(tagText "do")) @@-- exprL x2 - | Expr.Op (TOp.For _, [], [Expr.Lambda (_, _, _, [_], x1, _, _);Expr.Lambda (_, _, _, [_], x2, _, _);Expr.Lambda (_, _, _, [_], x3, _, _)], _) -> + | Expr.Op (TOp.IntegerForLoop _, [], [Expr.Lambda (_, _, _, [_], x1, _, _);Expr.Lambda (_, _, _, [_], x2, _, _);Expr.Lambda (_, _, _, [_], x3, _, _)], _) -> wordL(tagText "for") ^^ aboveListL [(exprL x1 ^^ wordL(tagText "to") ^^ exprL x2 ^^ wordL(tagText "do")); exprL x3 ] ^^ rightL(tagText "done") | Expr.Op (TOp.TryWith _, [_], [Expr.Lambda (_, _, _, [_], x1, _, _);Expr.Lambda (_, _, _, [_], xf, _, _);Expr.Lambda (_, _, _, [_], xh, _, _)], _) -> (wordL (tagText "try") @@-- exprL x1) @@ (wordL(tagText "with-filter") @@-- exprL xf) @@ (wordL(tagText "with") @@-- exprL xh) @@ -4120,7 +4120,7 @@ module DebugPrint = let z = if isNil args then z else z --- spaceListL (List.map (atomL g) args) z - and implFileL g (TImplFile (_, _, mexpr, _, _, _)) = + and implFileL g (TImplFile (implExprWithSig=mexpr)) = aboveListL [(wordL(tagText "top implementation ")) @@-- mexprL g mexpr] and mexprL g x = @@ -4183,7 +4183,7 @@ module DebugPrint = | DecisionTreeTest.ActivePatternCase (exp, _, _, _, _, _) -> wordL(tagText "query") ^^ exprL g exp | DecisionTreeTest.Error _ -> wordL (tagText "error recovery") - and targetL g i (TTarget (argvs, body, _, _)) = + and targetL g i (TTarget (argvs, body, _)) = leftL(tagText "T") ^^ intL i ^^ tupleL (flatValsL argvs) ^^ rightL(tagText ":") --- exprL g body and flatValsL vs = vs |> List.map valL @@ -4221,7 +4221,7 @@ let wrapModuleOrNamespaceExprInNamespace (id: Ident) cpath mexpr = TMDefRec (false, [], [], [ModuleOrNamespaceBinding.Module(mspec, mexpr)], id.idRange) // cleanup: make this a property -let SigTypeOfImplFile (TImplFile (_, _, mexpr, _, _, _)) = mexpr.Type +let SigTypeOfImplFile (TImplFile (implExprWithSig=mexpr)) = mexpr.Type //-------------------------------------------------------------------------- // Data structures representing what gets hidden and what gets remapped (i.e. renamed or alpha-converted) @@ -4556,11 +4556,11 @@ let freeTyvarsAllPublic tyvars = let (|LinearMatchExpr|_|) expr = match expr with - | Expr.Match (sp, m, dtree, [|tg1;(TTarget([], e2, sp2, _))|], m2, ty) -> Some(sp, m, dtree, tg1, e2, sp2, m2, ty) + | Expr.Match (sp, m, dtree, [|tg1;(TTarget([], e2, _))|], m2, ty) -> Some(sp, m, dtree, tg1, e2, m2, ty) | _ -> None -let rebuildLinearMatchExpr (sp, m, dtree, tg1, e2, sp2, m2, ty) = - primMkMatch (sp, m, dtree, [|tg1;(TTarget([], e2, sp2, None))|], m2, ty) +let rebuildLinearMatchExpr (sp, m, dtree, tg1, e2, m2, ty) = + primMkMatch (sp, m, dtree, [|tg1;(TTarget([], e2, None))|], m2, ty) /// Detect a subset of 'Expr.Op' expressions we process in a linear way (i.e. using tailcalls, rather than /// unbounded stack). Only covers Cons(args,Cons(args,Cons(args,Cons(args,...._)))). @@ -4820,7 +4820,7 @@ and accFreeInExprNonLinearImpl opts x acc = | Expr.Link eref -> accFreeInExpr opts eref.Value acc - | Expr.Sequential (expr1, expr2, _, _, _) -> + | Expr.Sequential (expr1, expr2, _, _) -> let acc = accFreeInExpr opts expr1 acc // tail-call - linear expression accFreeInExpr opts expr2 acc @@ -4831,7 +4831,7 @@ and accFreeInExprNonLinearImpl opts x acc = | Expr.Match (_, _, dtree, targets, _, _) -> match x with // Handle if-then-else - | LinearMatchExpr(_, _, dtree, target, bodyExpr, _, _, _) -> + | LinearMatchExpr(_, _, dtree, target, bodyExpr, _, _) -> let acc = accFreeInDecisionTree opts dtree acc let acc = accFreeInTarget opts target acc accFreeInExpr opts bodyExpr acc // tailcall @@ -4854,6 +4854,9 @@ and accFreeInExprNonLinearImpl opts x acc = | Expr.WitnessArg (traitInfo, _) -> accFreeVarsInTraitInfo opts traitInfo acc + | Expr.DebugPoint (_, innerExpr) -> + accFreeInExpr opts innerExpr acc + and accFreeInOp opts op acc = match op with @@ -4862,7 +4865,7 @@ and accFreeInOp opts op acc = | TOp.UInt16s _ | TOp.TryWith _ | TOp.TryFinally _ - | TOp.For _ + | TOp.IntegerForLoop _ | TOp.Coerce | TOp.RefAddrGet _ | TOp.Array @@ -4928,7 +4931,7 @@ and accFreeInOp opts op acc = and accFreeInTargets opts targets acc = Array.foldBack (accFreeInTarget opts) targets acc -and accFreeInTarget opts (TTarget(vs, expr, _, flags)) acc = +and accFreeInTarget opts (TTarget(vs, expr, flags)) acc = match flags with | None -> List.foldBack (boundLocalVal opts) vs (accFreeInExpr opts expr acc) | Some xs -> List.foldBack2 (fun v isStateVar acc -> if isStateVar then acc else boundLocalVal opts v acc) vs xs (accFreeInExpr opts expr acc) @@ -5021,15 +5024,19 @@ type AllowTypeDirectedDetupling = Yes | No // i.e. base the chosen arity on the syntactic expression shape and type of arguments let InferArityOfExpr g allowTypeDirectedDetupling ty partialArgAttribsL retAttribs expr = let rec stripLambda_notypes e = - match e with + match stripDebugPoints e with | Expr.Lambda (_, _, _, vs, b, _, _) -> let vs', b' = stripLambda_notypes b (vs :: vs', b') - | Expr.TyChoose (_, b, _) -> stripLambda_notypes b + | Expr.TyChoose (_, b, _) -> + stripLambda_notypes b | _ -> ([], e) let stripTopLambdaNoTypes e = - let tps, taue = match e with Expr.TyLambda (_, tps, b, _, _) -> tps, b | _ -> [], e + let tps, taue = + match stripDebugPoints e with + | Expr.TyLambda (_, tps, b, _, _) -> tps, b + | _ -> [], e let vs, body = stripLambda_notypes taue tps, vs, body @@ -5055,6 +5062,7 @@ let InferArityOfExpr g allowTypeDirectedDetupling ty partialArgAttribsL retAttri if partialAttribs.Length = tys.Length then partialAttribs else tys |> List.map (fun _ -> []) (ids, attribs) ||> List.map2 (fun id attribs -> { Name = id; Attribs = attribs }: ArgReprInfo )) + let retInfo: ArgReprInfo = { Attribs = retAttribs; Name = None } ValReprInfo (ValReprInfo.InferTyparInfo tps, curriedArgInfos, retInfo) @@ -5306,7 +5314,8 @@ and remapExprImpl (ctxt: RemapContext) (compgen: ValCopyFlag) (tmenv: Remap) exp | LinearOpExpr _ | LinearMatchExpr _ | Expr.Sequential _ - | Expr.Let _ -> + | Expr.Let _ + | Expr.DebugPoint _ -> remapLinearExpr ctxt compgen tmenv expr (fun x -> x) // Binding constructs - see also dtrees below @@ -5423,9 +5432,9 @@ and remapAppExpr (ctxt: RemapContext) (compgen: ValCopyFlag) (tmenv: Remap) (e1, if e1 === e1' && e1ty === e1ty' && tyargs === tyargs' && args === args' then origExpr else Expr.App (e1', e1ty', tyargs', args', m) -and remapTarget ctxt compgen tmenv (TTarget(vs, e, spTarget, flags)) = +and remapTarget ctxt compgen tmenv (TTarget(vs, e, flags)) = let vs', tmenvinner = copyAndRemapAndBindVals ctxt compgen tmenv vs - TTarget(vs', remapExprImpl ctxt compgen tmenvinner e, spTarget, flags) + TTarget(vs', remapExprImpl ctxt compgen tmenvinner e, flags) and remapLinearExpr ctxt compgen tmenv expr contf = @@ -5436,20 +5445,20 @@ and remapLinearExpr ctxt compgen tmenv expr contf = // tailcall for the linear position remapLinearExpr ctxt compgen tmenvinner bodyExpr (contf << mkLetBind m bind') - | Expr.Sequential (expr1, expr2, dir, spSeq, m) -> + | Expr.Sequential (expr1, expr2, dir, m) -> let expr1' = remapExprImpl ctxt compgen tmenv expr1 // tailcall for the linear position remapLinearExpr ctxt compgen tmenv expr2 (contf << (fun expr2' -> if expr1 === expr1' && expr2 === expr2' then expr - else Expr.Sequential (expr1', expr2', dir, spSeq, m))) + else Expr.Sequential (expr1', expr2', dir, m))) - | LinearMatchExpr (spBind, exprm, dtree, tg1, expr2, sp2, m2, ty) -> + | LinearMatchExpr (spBind, exprm, dtree, tg1, expr2, m2, ty) -> let dtree' = remapDecisionTree ctxt compgen tmenv dtree let tg1' = remapTarget ctxt compgen tmenv tg1 let ty' = remapType tmenv ty // tailcall for the linear position remapLinearExpr ctxt compgen tmenv expr2 (contf << (fun expr2' -> - rebuildLinearMatchExpr (spBind, exprm, dtree', tg1', expr2', sp2, m2, ty'))) + rebuildLinearMatchExpr (spBind, exprm, dtree', tg1', expr2', m2, ty'))) | LinearOpExpr (op, tyargs, argsFront, argLast, m) -> let op' = remapOp tmenv op @@ -5460,6 +5469,10 @@ and remapLinearExpr ctxt compgen tmenv expr contf = if op === op' && tyargs === tinst' && argsFront === argsFront' && argLast === argLast' then expr else rebuildLinearOpExpr (op', tinst', argsFront', argLast', m))) + | Expr.DebugPoint (dpm, innerExpr) -> + remapLinearExpr ctxt compgen tmenv innerExpr (contf << (fun innerExprR -> + Expr.DebugPoint (dpm, innerExprR))) + | _ -> contf (remapExprImpl ctxt compgen tmenv expr) @@ -5857,7 +5870,7 @@ let instExpr g tpinst e = // eliminated (i.e. an expression gets inlined) //-------------------------------------------------------------------------- -let rec remarkExpr m x = +let rec remarkExpr (m: range) x = match x with | Expr.Lambda (uniq, ctorThisValOpt, baseValOpt, vs, b, _, rty) -> Expr.Lambda (uniq, ctorThisValOpt, baseValOpt, vs, remarkExpr m b, m, rty) @@ -5875,7 +5888,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, DebugPointAtTarget.No, flags)) + let targetsR = targets |> Array.map (fun (TTarget(vs, e, flags)) -> TTarget(vs, remarkExpr m e, flags)) primMkMatch (DebugPointAtBinding.NoneAtInvisible, m, remarkDecisionTree m pt, targetsR, m, ty) | Expr.Val (x, valUseFlags, _) -> @@ -5891,37 +5904,17 @@ let rec remarkExpr m x = | Expr.Op (op, tinst, args, _) -> - // If this is ultimately being inlined as the implementation - // of a 'while'/'for' etc in a computation expression then lay down a - // debug point + // This code allows a feature where if a 'while'/'for' etc in a computation expression is + // implemented using code inlining and is ultimately implemented by a corresponding construct somewhere + // in the remark'd code then aat least one debug point is recovered, based on the noted debug point for the original construct. + // + // However it is imperfect, since only one debug point is recovered let op = match op with - | TOp.For (spFor, style) -> - let spFor2 = - match m.DebugPointKind with - | RangeDebugPointKind.For -> DebugPointAtFor.Yes m - | _ -> spFor - TOp.For(spFor2, style) - | TOp.While (spWhile, marker) -> - let spWhile2 = - match m.DebugPointKind with - | RangeDebugPointKind.While -> DebugPointAtWhile.Yes m - | _ -> spWhile - TOp.While(spWhile2, marker) - | TOp.TryFinally (spTry, _) -> - let spTry2 = - match m.DebugPointKind with - | RangeDebugPointKind.Try -> DebugPointAtTry.Yes m - | _ -> spTry - // The debug point for the 'finally' is not yet recoverable - TOp.TryFinally (spTry2, DebugPointAtFinally.No) - | TOp.TryWith (spTry, _) -> - let spTry2 = - match m.DebugPointKind with - | RangeDebugPointKind.Try -> DebugPointAtTry.Yes m - | _ -> spTry - // The debug point for the 'with' is not yet recoverable - TOp.TryWith (spTry2, DebugPointAtWith.No) + | TOp.IntegerForLoop (_, _, style) -> TOp.IntegerForLoop(DebugPointAtFor.No, DebugPointAtInOrTo.No, style) + | TOp.While (_, marker) -> TOp.While(DebugPointAtWhile.No, marker) + | TOp.TryFinally _ -> TOp.TryFinally (DebugPointAtTry.No, DebugPointAtFinally.No) + | TOp.TryWith _ -> TOp.TryWith (DebugPointAtTry.No, DebugPointAtWith.No) | _ -> op Expr.Op (op, tinst, remarkExprs m args, m) @@ -5933,31 +5926,10 @@ let rec remarkExpr m x = | Expr.App (e1, e1ty, tyargs, args, _) -> Expr.App (remarkExpr m e1, e1ty, tyargs, remarkExprs m args, m) - | Expr.Sequential (e1, e2, dir, sp, _) -> + | Expr.Sequential (e1, e2, dir, _) -> let e1R = remarkExpr m e1 let e2R = remarkExpr m e2 - - // This is to suppress false sequence points when inlining 'ResumableCode.TryWith' - // It is adhoc and may need to be improved if the library implementation changes - // - // For this specific code: - // - // __stack_caught <- true - // __stack_savedExn <- ... - // - // we suppress the sequence points on both the sequentials. - // - // Normally inlining associates all of the inlined code with the expression range of the overall construct, - // which for computation expression calls TryFinally and TryWith is the 'try' keyword. - // However this is broken when inlining sophisticated control flow as the 'with' and 'finally' - // parts of the code get the 'try' keyword as their sequence point range. - let sp = - match sp, e2R with - | DebugPointAtSequential.SuppressBoth, _ -> DebugPointAtSequential.SuppressBoth - | _, Expr.Op(TOp.LValueOp (LSet _, v), _, _, _) when v.DisplayName = "__stack_savedExn" -> DebugPointAtSequential.SuppressBoth - | _ -> DebugPointAtSequential.SuppressStmt - - Expr.Sequential (e1R, e2R, dir, sp, m) + Expr.Sequential (e1R, e2R, dir, m) | Expr.StaticOptimization (eqns, e2, e3, _) -> Expr.StaticOptimization (eqns, remarkExpr m e2, remarkExpr m e3, m) @@ -5968,6 +5940,9 @@ let rec remarkExpr m x = | Expr.WitnessArg (witnessInfo, _) -> Expr.WitnessArg (witnessInfo, m) + | Expr.DebugPoint (_, innerExpr) -> + remarkExpr m innerExpr + and remarkObjExprMethod m (TObjExprMethod(slotsig, attribs, tps, vs, e, _)) = TObjExprMethod(slotsig, attribs, tps, vs, remarkExpr m e, m) @@ -5976,8 +5951,6 @@ and remarkInterfaceImpl m (ty, overrides) = and remarkExprs m es = es |> List.map (remarkExpr m) -and remarkFlatExprs m es = es |> List.map (remarkExpr m) - and remarkDecisionTree m x = match x with | TDSwitch(sp, e1, cases, dflt, _) -> @@ -5986,7 +5959,7 @@ and remarkDecisionTree m x = let dfltR = Option.map (remarkDecisionTree m) dflt TDSwitch(sp, e1R, casesR, dfltR, m) | TDSuccess (es, n) -> - TDSuccess (remarkFlatExprs m es, n) + TDSuccess (remarkExprs m es, n) | TDBind (bind, rest) -> TDBind(remarkBind m bind, remarkDecisionTree m rest) @@ -6100,20 +6073,21 @@ let GenWitnessTys (g: TcGlobals) (cxs: TraitWitnessInfos) = // tyOfExpr //-------------------------------------------------------------------------- -let rec tyOfExpr g e = - match e with +let rec tyOfExpr g expr = + match expr with | Expr.App (_, fty, tyargs, args, _) -> applyTys g fty (tyargs, args) | Expr.Obj (_, ty, _, _, _, _, _) | Expr.Match (_, _, _, _, _, ty) | Expr.Quote (_, _, _, _, ty) | Expr.Const (_, _, ty) -> ty | Expr.Val (vref, _, _) -> vref.Type - | Expr.Sequential (a, b, k, _, _) -> tyOfExpr g (match k with NormalSeq -> b | ThenDoSeq -> a) + | Expr.Sequential (a, b, k, _) -> tyOfExpr g (match k with NormalSeq -> b | ThenDoSeq -> a) | Expr.Lambda (_, _, _, vs, _, _, rty) -> (mkRefTupledVarsTy g vs --> rty) | Expr.TyLambda (_, tyvs, _, _, rty) -> (tyvs +-> rty) | Expr.Let (_, e, _, _) | Expr.TyChoose (_, e, _) | Expr.Link { contents=e} + | Expr.DebugPoint (_, e) | Expr.StaticOptimization (_, _, e, _) | Expr.LetRec (_, e, _, _) -> tyOfExpr g e | Expr.Op (op, tinst, _, _) -> @@ -6130,7 +6104,7 @@ let rec tyOfExpr g e = | TOp.TupleFieldGet (_, i) -> List.item i tinst | TOp.Tuple tupInfo -> mkAnyTupledTy g tupInfo tinst | TOp.AnonRecd anonInfo -> mkAnyAnonRecdTy g anonInfo tinst - | TOp.For _ | TOp.While _ -> g.unit_ty + | TOp.IntegerForLoop _ | TOp.While _ -> g.unit_ty | TOp.Array -> (match tinst with [ty] -> mkArrayType g ty | _ -> failwith "bad TOp.Array node") | TOp.TryWith _ | TOp.TryFinally _ -> (match tinst with [ty] -> ty | _ -> failwith "bad TOp_try node") | TOp.ValFieldGetAddr (fref, readonly) -> mkByrefTyWithFlag g readonly (actualTyOfRecdFieldRef fref tinst) @@ -6331,7 +6305,7 @@ let foldLinearBindingTargetsOfMatch tree (targets: _[]) = /// rebuild the targets, replacing linear targets by ones that include all the 'let' bindings from the source let targets' = - targets |> Array.mapi (fun i (TTarget(vs, exprTarget, spTarget, _) as tg) -> + targets |> Array.mapi (fun i (TTarget(vs, exprTarget, _) as tg) -> if isLinearTgtIdx i then let binds, es = getLinearTgtIdx i // The value bindings are moved to become part of the target. @@ -6339,7 +6313,7 @@ let foldLinearBindingTargetsOfMatch tree (targets: _[]) = let mTarget = exprTarget.Range let es = es |> List.map (remarkExpr mTarget) // These are non-sticky - any sequence point for 'exprTarget' goes on 'exprTarget' _after_ the bindings have been evaluated - TTarget(List.empty, mkLetsBind mTarget binds (mkInvisibleLetsFromBindings mTarget vs es exprTarget), spTarget, None) + TTarget(List.empty, mkLetsBind mTarget binds (mkInvisibleLetsFromBindings mTarget vs es exprTarget), None) else tg ) tree', targets' @@ -6349,11 +6323,18 @@ let rec simplifyTrivialMatch spBind exprm matchm ty tree (targets : _[]) = match tree with | TDSuccess(es, n) -> if n >= targets.Length then failwith "simplifyTrivialMatch: target out of range" - // REVIEW: should we use _spTarget here? - let (TTarget(vs, rhs, _spTarget, _)) = targets.[n] - if vs.Length <> es.Length then failwith ("simplifyTrivialMatch: invalid argument, n = " + string n + ", List.length targets = " + string targets.Length) + let (TTarget(vs, rhs, _)) = targets.[n] + if vs.Length <> es.Length then failwith ("simplifyTrivialMatch: invalid argument, n = " + string n + ", #targets = " + string targets.Length) + // These are non-sticky - any sequence point for 'rhs' goes on 'rhs' _after_ the bindings have been made - mkInvisibleLetsFromBindings rhs.Range vs es rhs + let res = mkInvisibleLetsFromBindings rhs.Range vs es rhs + + // Incorporate spBind as a note if present + let res = + match spBind with + | DebugPointAtBinding.Yes dp -> Expr.DebugPoint(DebugPointAtLeafExpr.Yes dp, res) + | _ -> res + res | _ -> primMkMatch (spBind, exprm, tree, targets, matchm, ty) @@ -6793,7 +6774,7 @@ type ExprFolders<'State> (folders: ExprFolder<'State>) = | Expr.Op (_c, _tyargs, args, _) -> exprsF z args - | Expr.Sequential (x0, x1, _dir, _, _) -> + | Expr.Sequential (x0, x1, _dir, _) -> let z = exprF z x0 exprF z x1 @@ -6820,6 +6801,8 @@ type ExprFolders<'State> (folders: ExprFolder<'State>) = | Expr.Link rX -> exprF z rX.Value + | Expr.DebugPoint (_, innerExpr) -> exprF z innerExpr + | Expr.Match (_spBind, _exprm, dtree, targets, _m, _ty) -> let z = dtreeF z dtree let z = Array.fold targetF z targets.[0..targets.Length - 2] @@ -6875,7 +6858,7 @@ type ExprFolders<'State> (folders: ExprFolder<'State>) = match folders.targetIntercept exprFClosure z x with | Some z -> z // intercepted | None -> // structurally recurse - let (TTarget (_, body, _, _)) = x + let (TTarget (_, body, _)) = x exprF z body and tmethodF z x = @@ -6977,18 +6960,18 @@ let mkIObserverType (g: TcGlobals) ty1 = TType_app (g.tcref_IObserver, [ty1]) let mkRefCellContentsRef (g: TcGlobals) = mkRecdFieldRef g.refcell_tcr_canon "contents" -let mkSequential spSeq m e1 e2 = Expr.Sequential (e1, e2, NormalSeq, spSeq, m) +let mkSequential m e1 e2 = Expr.Sequential (e1, e2, NormalSeq, m) -let mkCompGenSequential m stmt expr = mkSequential DebugPointAtSequential.SuppressStmt m stmt expr +let mkCompGenSequential m stmt expr = mkSequential m stmt expr -let mkThenDoSequential spSeq m expr stmt = Expr.Sequential (expr, stmt, ThenDoSeq, spSeq, m) +let mkThenDoSequential m expr stmt = Expr.Sequential (expr, stmt, ThenDoSeq, m) -let mkCompGenThenDoSequential m expr stmt = mkThenDoSequential DebugPointAtSequential.SuppressStmt m expr stmt +let mkCompGenThenDoSequential m expr stmt = mkThenDoSequential m expr stmt -let rec mkSequentials spSeq g m es = +let rec mkSequentials g m es = match es with | [e] -> e - | e :: es -> mkSequential spSeq m e (mkSequentials spSeq g m es) + | e :: es -> mkSequential m e (mkSequentials g m es) | [] -> mkUnit g m let mkGetArg0 m ty = mkAsmExpr ( [ mkLdarg0 ], [], [], [ty], m) @@ -8228,10 +8211,10 @@ let LinearizeTopMatchAux g parent (spBind, m, tree, targets, m2, ty) = | [] -> failwith "itemsProj: no items?" | [_] -> x (* no projection needed *) | tys -> Expr.Op (TOp.TupleFieldGet (tupInfoRef, i), tys, [x], m) - let isThrowingTarget = function TTarget(_, x, _, _) -> isThrow x + let isThrowingTarget = function TTarget(_, x, _) -> isThrow x if 1 + List.count isThrowingTarget targetsL = targetsL.Length then // Have failing targets and ONE successful one, so linearize - let (TTarget (vs, rhs, spTarget, _)) = List.find (isThrowingTarget >> not) targetsL + let (TTarget (vs, rhs, _)) = List.find (isThrowingTarget >> not) targetsL let fvs = vs |> List.map (fun v -> fst(mkLocal v.Range v.LogicalName v.Type)) (* fresh *) let vtys = vs |> List.map (fun v -> v.Type) let tmpTy = mkRefTupledVarsTy g vs @@ -8239,12 +8222,12 @@ let LinearizeTopMatchAux g parent (spBind, m, tree, targets, m2, ty) = AdjustValToTopVal tmp parent ValReprInfo.emptyValData - let newTg = TTarget (fvs, mkRefTupledVars g m fvs, spTarget, None) - let fixup (TTarget (tvs, tx, spTarget, flags)) = + let newTg = TTarget (fvs, mkRefTupledVars g m fvs, None) + let fixup (TTarget (tvs, tx, flags)) = match destThrow tx with | Some (m, _, e) -> let tx = mkThrow m tmpTy e - TTarget(tvs, tx, spTarget, flags) (* Throwing targets, recast it's "return type" *) + TTarget(tvs, tx, flags) (* Throwing targets, recast it's "return type" *) | None -> newTg (* Non-throwing target, replaced [new/old] *) let targets = Array.map fixup targets @@ -8604,16 +8587,16 @@ let mkIsInstConditional g m tgty vinpe v e2 e3 = if canUseTypeTestFast g tgty then let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m) - let tg2 = mbuilder.AddResultTarget(e2, DebugPointAtTarget.No) - let tg3 = mbuilder.AddResultTarget(e3, DebugPointAtTarget.No) + let tg2 = mbuilder.AddResultTarget(e2) + let tg3 = mbuilder.AddResultTarget(e3) 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, DebugPointAtTarget.No, None))) - let tg3 = mbuilder.AddResultTarget(e3, DebugPointAtTarget.No) + let tg2 = TDSuccess([mkCallUnbox g m tgty vinpe], mbuilder.AddTarget(TTarget([v], e2, None))) + let tg3 = mbuilder.AddResultTarget(e3) 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 @@ -8624,8 +8607,8 @@ let mkIsInstConditional g m tgty vinpe v e2 e3 = // used for compiler-generated code. let mkNullTest g m e1 e2 e3 = let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m) - let tg2 = mbuilder.AddResultTarget(e2, DebugPointAtTarget.No) - let tg3 = mbuilder.AddResultTarget(e3, DebugPointAtTarget.No) + let tg2 = mbuilder.AddResultTarget(e2) + let tg3 = mbuilder.AddResultTarget(e3) let dtree = TDSwitch(DebugPointAtSwitch.No, e1, [TCase(DecisionTreeTest.IsNull, tg3)], Some tg2, m) let expr = mbuilder.Close(dtree, m, tyOfExpr g e2) expr @@ -8636,12 +8619,12 @@ let mkNonNullTest (g: TcGlobals) m e = // 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 + mkCond DebugPointAtBinding.NoneAtInvisible 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) + mkCond DebugPointAtBinding.NoneAtInvisible m g.unit_ty e1 e2 (mkUnit g m) let ModuleNameIsMangled g attrs = match TryFindFSharpInt32Attribute g g.attrib_CompilationRepresentationAttribute attrs with @@ -8833,7 +8816,8 @@ and RewriteExpr env expr = | LinearOpExpr _ | LinearMatchExpr _ | Expr.Let _ - | Expr.Sequential _ -> + | Expr.Sequential _ + | Expr.DebugPoint _ -> rewriteLinearExpr env expr (fun e -> e) | _ -> let expr = @@ -8873,9 +8857,13 @@ and rewriteExprStructure env expr = | Expr.Obj (_, ty, basev, basecall, overrides, iimpls, m) -> mkObjExpr(ty, basev, RewriteExpr env basecall, List.map (rewriteObjExprOverride env) overrides, List.map (rewriteObjExprInterfaceImpl env) iimpls, m) + | Expr.Link eref -> RewriteExpr env eref.Value + | Expr.DebugPoint _ -> + failwith "unreachable - linear debug point" + | Expr.Op (c, tyargs, args, m) -> let args' = rewriteExprs env args if args === args' then expr @@ -8927,12 +8915,12 @@ and rewriteLinearExpr env expr contf = rewriteLinearExpr env bodyExpr (contf << (fun bodyExpr' -> mkLetBind m bind bodyExpr')) - | Expr.Sequential (expr1, expr2, dir, spSeq, m) -> + | Expr.Sequential (expr1, expr2, dir, m) -> let expr1' = RewriteExpr env expr1 // tailcall rewriteLinearExpr env expr2 (contf << (fun expr2' -> if expr1 === expr1' && expr2 === expr2' then expr - else Expr.Sequential (expr1', expr2', dir, spSeq, m))) + else Expr.Sequential (expr1', expr2', dir, m))) | LinearOpExpr (op, tyargs, argsFront, argLast, m) -> let argsFront' = rewriteExprs env argsFront @@ -8941,12 +8929,17 @@ and rewriteLinearExpr env expr contf = if argsFront === argsFront' && argLast === argLast' then expr else rebuildLinearOpExpr (op, tyargs, argsFront', argLast', m))) - | LinearMatchExpr (spBind, exprm, dtree, tg1, expr2, sp2, m2, ty) -> + | LinearMatchExpr (spBind, exprm, dtree, tg1, expr2, m2, ty) -> let dtree = RewriteDecisionTree env dtree let tg1' = rewriteTarget env tg1 // tailcall rewriteLinearExpr env expr2 (contf << (fun expr2' -> - rebuildLinearMatchExpr (spBind, exprm, dtree, tg1', expr2', sp2, m2, ty))) + rebuildLinearMatchExpr (spBind, exprm, dtree, tg1', expr2', m2, ty))) + + | Expr.DebugPoint (dpm, innerExpr) -> + rewriteLinearExpr env innerExpr (contf << (fun innerExprR -> + Expr.DebugPoint (dpm, innerExprR))) + | _ -> // no longer linear, no tailcall contf (RewriteExpr env expr) @@ -8973,9 +8966,9 @@ and RewriteDecisionTree env x = let bodyR = RewriteDecisionTree env body TDBind (bindR, bodyR) -and rewriteTarget env (TTarget(vs, e, spTarget, flags)) = +and rewriteTarget env (TTarget(vs, e, flags)) = let eR = RewriteExpr env e - TTarget(vs, eR, spTarget, flags) + TTarget(vs, eR, flags) and rewriteTargets env targets = List.map (rewriteTarget env) (Array.toList targets) @@ -9143,10 +9136,9 @@ type EntityRef with member tcref.HasOverride g nm argtys = tcref.Deref.HasOverride g nm argtys member tcref.HasMember g nm argtys = tcref.Deref.HasMember g nm argtys -let mkFastForLoop g (spLet, m, idv: Val, start, dir, finish, body) = +let mkFastForLoop g (spFor, spTo, m, idv: Val, start, dir, finish, body) = let dir = if dir then FSharpForLoopUp else FSharpForLoopDown - mkFor g (spLet, idv, start, dir, finish, body, m) - + mkIntegerForLoop g (spFor, spTo, idv, start, dir, finish, body, m) /// Accessing a binding of the form "let x = 1" or "let x = e" for any "e" satisfying the predicate /// below does not cause an initialization trigger, i.e. does not get compiled as a static field. @@ -9186,8 +9178,9 @@ let IsSimpleSyntacticConstantExpr g inputExpr = | Expr.Val (vref, _, _) -> vref.Deref.IsCompiledAsStaticPropertyWithoutField || vrefs.Contains vref.Stamp | Expr.Match (_, _, dtree, targets, _, _) -> checkDecisionTree vrefs dtree && targets |> Array.forall (checkDecisionTreeTarget vrefs) | Expr.Let (b, e, _, _) -> checkExpr vrefs b.Expr && checkExpr (vrefs.Add b.Var.Stamp) e - // Detect standard constants + | Expr.DebugPoint (_, b) -> checkExpr vrefs b | Expr.TyChoose (_, b, _) -> checkExpr vrefs b + // Detect standard constants | Expr.Const _ | Expr.Op (TOp.UnionCase _, _, [], _) // Nullary union cases | UncheckedDefaultOfExpr g _ @@ -9214,7 +9207,7 @@ let IsSimpleSyntacticConstantExpr g inputExpr = | _ -> false) && checkDecisionTree vrefs dtree - and checkDecisionTreeTarget vrefs (TTarget(vs, e, _, _)) = + and checkDecisionTreeTarget vrefs (TTarget(vs, e, _)) = let vrefs = ((vrefs, vs) ||> List.fold (fun s v -> s.Add v.Stamp)) checkExpr vrefs e @@ -9413,7 +9406,8 @@ let (|TryFinally|_|) expr = // detect ONLY the while loops that result from compiling 'for ... in ... do ...' let (|WhileLoopForCompiledForEachExpr|_|) expr = match expr with - | Expr.Op (TOp.While (_, WhileLoopForCompiledForEachExprMarker), _, [Expr.Lambda (_, _, _, [_], e1, _, _); Expr.Lambda (_, _, _, [_], e2, _, _)], m) -> Some(e1, e2, m) + | Expr.Op (TOp.While (spInWhile, WhileLoopForCompiledForEachExprMarker), _, [Expr.Lambda (_, _, _, [_], e1, _, _); Expr.Lambda (_, _, _, [_], e2, _, _)], m) -> + Some(spInWhile, e1, e2, m) | _ -> None let (|Let|_|) expr = @@ -9440,11 +9434,12 @@ let (|GetEnumeratorCall|_|) expr = else None | _ -> None +// This code matches exactly the output of TcForEachExpr let (|CompiledForEachExpr|_|) g expr = match expr with - | Let (enumerableVar, enumerableExpr, _, - Let (enumeratorVar, GetEnumeratorCall enumerableVar2, enumeratorBind, - TryFinally (WhileLoopForCompiledForEachExpr (_, Let (elemVar, _, _, bodyExpr), _), _))) + | Let (enumerableVar, enumerableExpr, spFor, + Let (enumeratorVar, GetEnumeratorCall enumerableVar2, _enumeratorBind, + TryFinally (WhileLoopForCompiledForEachExpr (spInWhile, _, (Let (elemVar, _, _, bodyExpr) as elemLet), _), _))) // Apply correctness conditions to ensure this really is a compiled for-each expression. when valRefEq g (mkLocalValRef enumerableVar) enumerableVar2 && enumerableVar.IsCompilerGenerated && @@ -9454,15 +9449,16 @@ let (|CompiledForEachExpr|_|) g expr = not (Zset.contains enumeratorVar fvs.FreeLocals)) -> // Extract useful ranges - let mEnumExpr = enumerableExpr.Range let mBody = bodyExpr.Range let mWholeExpr = expr.Range + let mIn = elemLet.Range - let spForLoop, mForLoop = match enumeratorBind with DebugPointAtBinding.Yes spStart -> DebugPointAtFor.Yes spStart, spStart | _ -> DebugPointAtFor.No, mEnumExpr - let spWhileLoop = match enumeratorBind with DebugPointAtBinding.Yes spStart -> DebugPointAtWhile.Yes spStart| _ -> DebugPointAtWhile.No + let mFor = match spFor with DebugPointAtBinding.Yes mFor -> mFor | _ -> enumerableExpr.Range + let spIn, mIn = match spInWhile with DebugPointAtWhile.Yes mIn -> DebugPointAtInOrTo.Yes mIn, mIn | _ -> DebugPointAtInOrTo.No, mIn + let spInWhile = match spIn with DebugPointAtInOrTo.Yes m -> DebugPointAtWhile.Yes m | DebugPointAtInOrTo.No -> DebugPointAtWhile.No let enumerableTy = tyOfExpr g enumerableExpr - Some (enumerableTy, enumerableExpr, elemVar, bodyExpr, (mEnumExpr, mBody, spForLoop, mForLoop, spWhileLoop, mWholeExpr)) + Some (enumerableTy, enumerableExpr, elemVar, bodyExpr, (mBody, spFor, spIn, mFor, mIn, spInWhile, mWholeExpr)) | _ -> None @@ -9474,39 +9470,45 @@ let (|CompiledInt32RangeForEachExpr|_|) g expr = | _ -> None -type OptimizeForExpressionOptions = OptimizeIntRangesOnly | OptimizeAllForExpressions +let mkDebugPoint m expr = + Expr.DebugPoint(DebugPointAtLeafExpr.Yes m, expr) + +type OptimizeForExpressionOptions = + | OptimizeIntRangesOnly + | OptimizeAllForExpressions -let DetectAndOptimizeForExpression g option expr = +let DetectAndOptimizeForEachExpression g option expr = match option, expr with | _, CompiledInt32RangeForEachExpr g (startExpr, (1 | -1 as step), finishExpr, elemVar, bodyExpr, ranges) -> - let _mEnumExpr, _mBody, spForLoop, _mForLoop, _spWhileLoop, mWholeExpr = ranges - mkFastForLoop g (spForLoop, mWholeExpr, elemVar, startExpr, (step = 1), finishExpr, bodyExpr) + let _mBody, spFor, spIn, _mFor, _mIn, _spInWhile, mWholeExpr = ranges + let spFor = match spFor with DebugPointAtBinding.Yes mFor -> DebugPointAtFor.Yes mFor | _ -> DebugPointAtFor.No + mkFastForLoop g (spFor, spIn, mWholeExpr, elemVar, startExpr, (step = 1), finishExpr, bodyExpr) | OptimizeAllForExpressions, CompiledForEachExpr g (enumerableTy, enumerableExpr, elemVar, bodyExpr, ranges) -> - let mEnumExpr, mBody, spForLoop, mForLoop, spWhileLoop, mWholeExpr = ranges + let mBody, spFor, spIn, mFor, mIn, spInWhile, mWholeExpr = ranges if isStringTy g enumerableTy then // type is string, optimize for expression as: // let $str = enumerable - // for $idx in 0..(str.Length - 1) do + // for $idx = 0 to str.Length - 1 do // let elem = str.[idx] // body elem - let strVar, strExpr = mkCompGenLocal mEnumExpr "str" enumerableTy + let strVar, strExpr = mkCompGenLocal mFor "str" enumerableTy let idxVar, idxExpr = mkCompGenLocal elemVar.Range "idx" g.int32_ty - let lengthExpr = mkGetStringLength g mForLoop strExpr - let charExpr = mkGetStringChar g mForLoop strExpr idxExpr + let lengthExpr = mkGetStringLength g mFor strExpr + let charExpr = mkGetStringChar g mFor strExpr idxExpr - let startExpr = mkZero g mForLoop - let finishExpr = mkDecr g mForLoop lengthExpr + let startExpr = mkZero g mFor + let finishExpr = mkDecr g mFor lengthExpr // for compat reasons, loop item over string is sometimes object, not char let loopItemExpr = mkCoerceIfNeeded g elemVar.Type g.char_ty charExpr - let bodyExpr = mkCompGenLet mForLoop elemVar loopItemExpr bodyExpr - let forExpr = mkFastForLoop g (spForLoop, mWholeExpr, idxVar, startExpr, true, finishExpr, bodyExpr) - let expr = mkCompGenLet mEnumExpr strVar enumerableExpr forExpr + let bodyExpr = mkInvisibleLet mIn elemVar loopItemExpr bodyExpr + let forExpr = mkFastForLoop g (DebugPointAtFor.No, spIn, mWholeExpr, idxVar, startExpr, true, finishExpr, bodyExpr) + let expr = mkLet spFor mFor strVar enumerableExpr forExpr expr @@ -9523,29 +9525,29 @@ let DetectAndOptimizeForExpression g option expr = let IndexHead = 0 let IndexTail = 1 - let currentVar, currentExpr = mkMutableCompGenLocal mEnumExpr "current" enumerableTy - let nextVar, nextExpr = mkMutableCompGenLocal mEnumExpr "next" enumerableTy + let currentVar, currentExpr = mkMutableCompGenLocal mIn "current" enumerableTy + let nextVar, nextExpr = mkMutableCompGenLocal mIn "next" enumerableTy let elemTy = destListTy g enumerableTy - let guardExpr = mkNonNullTest g mForLoop nextExpr - let headOrDefaultExpr = mkUnionCaseFieldGetUnprovenViaExprAddr (currentExpr, g.cons_ucref, [elemTy], IndexHead, mForLoop) - let tailOrNullExpr = mkUnionCaseFieldGetUnprovenViaExprAddr (currentExpr, g.cons_ucref, [elemTy], IndexTail, mForLoop) + let guardExpr = mkNonNullTest g mFor nextExpr + let headOrDefaultExpr = mkUnionCaseFieldGetUnprovenViaExprAddr (currentExpr, g.cons_ucref, [elemTy], IndexHead, mIn) + let tailOrNullExpr = mkUnionCaseFieldGetUnprovenViaExprAddr (currentExpr, g.cons_ucref, [elemTy], IndexTail, mIn) + let bodyExpr = - mkCompGenLet mForLoop elemVar headOrDefaultExpr - (mkCompGenSequential mForLoop + mkInvisibleLet mIn elemVar headOrDefaultExpr + (mkSequential mIn bodyExpr - (mkCompGenSequential mForLoop - (mkValSet mForLoop (mkLocalValRef currentVar) nextExpr) - (mkValSet mForLoop (mkLocalValRef nextVar) tailOrNullExpr))) + (mkSequential mIn + (mkValSet mIn (mkLocalValRef currentVar) nextExpr) + (mkValSet mIn (mkLocalValRef nextVar) tailOrNullExpr))) let expr = // let mutable current = enumerableExpr - let spBind = (match spForLoop with DebugPointAtFor.Yes spStart -> DebugPointAtBinding.Yes spStart | DebugPointAtFor.No -> DebugPointAtBinding.NoneAtSticky) - mkLet spBind mEnumExpr currentVar enumerableExpr + mkLet spFor mIn currentVar enumerableExpr // let mutable next = current.TailOrNull - (mkCompGenLet mForLoop nextVar tailOrNullExpr - // while nonNull next dp - (mkWhile g (spWhileLoop, WhileLoopForCompiledForEachExprMarker, guardExpr, bodyExpr, mBody))) + (mkInvisibleLet mFor nextVar tailOrNullExpr + // while nonNull next do + (mkWhile g (spInWhile, WhileLoopForCompiledForEachExprMarker, guardExpr, bodyExpr, mBody))) expr @@ -9591,7 +9593,7 @@ let (|UseResumableStateMachinesExpr|_|) g expr = let (|IfThenElseExpr|_|) expr = match expr with | Expr.Match (_spBind, _exprm, TDSwitch(_spSwitch, cond, [ TCase( DecisionTreeTest.Const (Const.Bool true), TDSuccess ([], 0) )], Some (TDSuccess ([], 1)), _), - [| TTarget([], thenExpr, _, _); TTarget([], elseExpr, _, _) |], _m, _ty) -> + [| TTarget([], thenExpr, _); TTarget([], elseExpr, _) |], _m, _ty) -> Some (cond, thenExpr, elseExpr) | _ -> None @@ -9683,10 +9685,10 @@ let (|TryFinallyExpr|_|) expr = Some (sp1, sp2, ty, e1, e2, m) | _ -> None -let (|ForLoopExpr|_|) expr = +let (|IntegerForLoopExpr|_|) expr = match expr with - | Expr.Op (TOp.For (sp1, sp2), _, [Expr.Lambda (_, _, _, [_], e1, _, _);Expr.Lambda (_, _, _, [_], e2, _, _);Expr.Lambda (_, _, _, [v], e3, _, _)], m) -> - Some (sp1, sp2, e1, e2, v, e3, m) + | Expr.Op (TOp.IntegerForLoop (sp1, sp2, style), _, [Expr.Lambda (_, _, _, [_], e1, _, _);Expr.Lambda (_, _, _, [_], e2, _, _);Expr.Lambda (_, _, _, [v], e3, _, _)], m) -> + Some (sp1, sp2, style, e1, e2, v, e3, m) | _ -> None let (|TryWithExpr|_|) expr = @@ -9713,17 +9715,17 @@ let (|MatchOptionExpr|_|) expr = | MatchTwoCasesExpr(cond, ucref, tg1, tg2, tgs, rebuildTwoCases) -> let tgNone, tgSome = if ucref.CaseName = "None" then tg1, tg2 else tg2, tg1 match tgs.[tgNone], tgs.[tgSome] with - | TTarget([], noneBranchExpr, b1, b2), + | TTarget([], noneBranchExpr, b2), TTarget([], Expr.Let(TBind(unionCaseVar, Expr.Op(TOp.UnionCaseProof a1, a2, a3, a4), a5), - Expr.Let(TBind(someVar, Expr.Op(TOp.UnionCaseFieldGet (a6a, a6b), a7, a8, a9), a10), someBranchExpr, a11, a12), a13, a14), a15, a16) + Expr.Let(TBind(someVar, Expr.Op(TOp.UnionCaseFieldGet (a6a, a6b), a7, a8, a9), a10), someBranchExpr, a11, a12), a13, a14), a16) when unionCaseVar.LogicalName = "unionCase" -> // How to rebuild this construct let rebuild (cond, noneBranchExpr, someVar, someBranchExpr) = let tgs = Array.zeroCreate 2 - tgs.[tgNone] <- TTarget([], noneBranchExpr, b1, b2) + tgs.[tgNone] <- TTarget([], noneBranchExpr, b2) tgs.[tgSome] <- TTarget([], Expr.Let(TBind(unionCaseVar, Expr.Op(TOp.UnionCaseProof a1, a2, a3, a4), a5), - Expr.Let(TBind(someVar, Expr.Op(TOp.UnionCaseFieldGet (a6a, a6b), a7, a8, a9), a10), someBranchExpr, a11, a12), a13, a14), a15, a16) + Expr.Let(TBind(someVar, Expr.Op(TOp.UnionCaseFieldGet (a6a, a6b), a7, a8, a9), a10), someBranchExpr, a11, a12), a13, a14), a16) rebuildTwoCases (cond, ucref, tg1, tg2, tgs) Some (cond, noneBranchExpr, someVar, someBranchExpr, rebuild) @@ -9781,13 +9783,18 @@ let (|ResumeAtExpr|_|) g expr = | ValApp g g.cgh__resumeAt_vref (_, [pcExpr], _m) -> Some pcExpr | _ -> None +let (|DebugPointExpr|_|) g expr = + match expr with + | ValApp g g.cgh__debugPoint_vref (_, [StringExpr debugPointName], _m) -> Some debugPointName + | _ -> None + // Detect sequencing constructs in state machine code let (|SequentialResumableCode|_|) (g: TcGlobals) expr = match expr with // e1; e2 - | Expr.Sequential(e1, e2, NormalSeq, sp, m) -> - Some (e1, e2, m, (fun e1 e2 -> Expr.Sequential(e1, e2, NormalSeq, sp, m))) + | Expr.Sequential(e1, e2, NormalSeq, m) -> + Some (e1, e2, m, (fun e1 e2 -> Expr.Sequential(e1, e2, NormalSeq, m))) // let __stack_step = e1 in e2 | Expr.Let(bind, e2, m, _) when bind.Var.CompiledName(g.CompilerGlobalState).StartsWith(stackVarPrefix) -> @@ -9811,6 +9818,3 @@ 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 097d46bed7f..326532497e2 100755 --- a/src/fsharp/TypedTreeOps.fsi +++ b/src/fsharp/TypedTreeOps.fsi @@ -62,6 +62,12 @@ val ensureCcuHasModuleOrNamespaceAtPath: CcuThunk -> Ident list -> CompilationPa /// Ignore 'Expr.Link' in an expression val stripExpr: Expr -> Expr +/// Ignore 'Expr.Link' and 'Expr.DebugPoint' in an expression +val stripDebugPoints: Expr -> Expr + +/// Match any 'Expr.Link' and 'Expr.DebugPoint' in an expression, providing the inner expression and a function to rebuild debug points +val (|DebugPoints|): Expr -> Expr * (Expr -> Expr) + /// Get the values for a set of bindings val valsOfBinds: Bindings -> Vals @@ -78,7 +84,7 @@ type MatchBuilder = member AddTarget: DecisionTreeTarget -> int /// Add a new destination target that is an expression result - member AddResultTarget: Expr * DebugPointAtTarget -> DecisionTree + member AddResultTarget: Expr -> DecisionTree /// Finish the targets member CloseTargets: unit -> DecisionTreeTarget list @@ -90,10 +96,10 @@ type MatchBuilder = val mkBoolSwitch: DebugPointAtSwitch -> range -> Expr -> DecisionTree -> DecisionTree -> DecisionTree /// Build a conditional expression -val primMkCond: DebugPointAtBinding -> DebugPointAtTarget -> DebugPointAtTarget -> range -> TType -> Expr -> Expr -> Expr -> Expr +val primMkCond: DebugPointAtBinding -> range -> TType -> Expr -> Expr -> Expr -> Expr /// Build a conditional expression -val mkCond: DebugPointAtBinding -> DebugPointAtTarget -> range -> TType -> Expr -> Expr -> Expr -> Expr +val mkCond: DebugPointAtBinding -> range -> TType -> Expr -> Expr -> Expr -> Expr /// Build a conditional expression that checks for non-nullness val mkNonNullCond: TcGlobals -> range -> TType -> Expr -> Expr -> Expr -> Expr @@ -155,7 +161,7 @@ val mkMemberLambdas: range -> Typars -> Val option -> Val option -> Val list lis val mkWhile: TcGlobals -> DebugPointAtWhile * SpecialWhileLoopMarker * Expr * Expr * range -> Expr /// Build a 'for' loop expression -val mkFor: TcGlobals -> DebugPointAtFor * Val * Expr * ForLoopStyle * Expr * Expr * range -> Expr +val mkIntegerForLoop: TcGlobals -> DebugPointAtFor * DebugPointAtInOrTo * Val * Expr * ForLoopStyle * Expr * Expr * range -> Expr /// Build a 'try/with' expression val mkTryWith: TcGlobals -> Expr * (* filter val *) Val * (* filter expr *) Expr * (* handler val *) Val * (* handler expr *) Expr * range * TType * DebugPointAtTry * DebugPointAtWith -> Expr @@ -1101,10 +1107,6 @@ val freeTyvarsAllPublic: FreeTyvars -> bool /// Check if a set of free variables are all public val freeVarsAllPublic: FreeVars -> bool -/// Get the mark/range/position information from an expression -type Expr with - member Range: range - /// Compute the type of an expression from the expression itself val tyOfExpr: TcGlobals -> Expr -> TType @@ -1767,9 +1769,9 @@ val mkOptionDefaultValue: TcGlobals -> range -> TType -> Expr -> Expr -> Expr // Make a few more expressions //------------------------------------------------------------------------- -val mkSequential: DebugPointAtSequential -> range -> Expr -> Expr -> Expr +val mkSequential: range -> Expr -> Expr -> Expr -val mkThenDoSequential: DebugPointAtSequential -> range -> expr: Expr -> stmt: Expr -> Expr +val mkThenDoSequential: range -> expr: Expr -> stmt: Expr -> Expr /// This is used for tacking on code _before_ the expression. The SuppressStmt /// setting is used for debug points, suppressing the debug points for the statement if possible. @@ -1779,7 +1781,7 @@ val mkCompGenSequential: range -> stmt: Expr -> expr: Expr -> Expr /// setting is used for debug points, suppressing the debug points for the statement if possible. val mkCompGenThenDoSequential: range -> expr: Expr -> stmt: Expr -> Expr -val mkSequentials: DebugPointAtSequential -> TcGlobals -> range -> Exprs -> Expr +val mkSequentials: TcGlobals -> range -> Exprs -> Expr val mkRecordExpr: TcGlobals -> RecordConstructionInfo * TyconRef * TypeInst * RecdFieldRef list * Exprs * range -> Expr @@ -2304,7 +2306,7 @@ val DecideStaticOptimizations: TcGlobals -> StaticOptimization list -> haveWitne val mkStaticOptimizationExpr: TcGlobals -> StaticOptimization list * Expr * Expr * range -> Expr /// Build for loops -val mkFastForLoop: TcGlobals -> DebugPointAtFor * range * Val * Expr * bool * Expr * Expr -> Expr +val mkFastForLoop: TcGlobals -> DebugPointAtFor * DebugPointAtInOrTo * range * Val * Expr * bool * Expr * Expr -> Expr //--------------------------------------------------------------------------- // Active pattern helpers @@ -2407,7 +2409,7 @@ val (|SpecialNotEquatableHeadType|_|): TcGlobals -> TType -> unit option type OptimizeForExpressionOptions = OptimizeIntRangesOnly | OptimizeAllForExpressions -val DetectAndOptimizeForExpression: TcGlobals -> OptimizeForExpressionOptions -> Expr -> Expr +val DetectAndOptimizeForEachExpression: TcGlobals -> OptimizeForExpressionOptions -> Expr -> Expr val TryEliminateDesugaredConstants: TcGlobals -> range -> Const -> Expr option @@ -2417,9 +2419,9 @@ val ValIsExplicitImpl: TcGlobals -> Val -> bool val ValRefIsExplicitImpl: TcGlobals -> ValRef -> bool -val (|LinearMatchExpr|_|): Expr -> (DebugPointAtBinding * range * DecisionTree * DecisionTreeTarget * Expr * DebugPointAtTarget * range * TType) option +val (|LinearMatchExpr|_|): Expr -> (DebugPointAtBinding * range * DecisionTree * DecisionTreeTarget * Expr * range * TType) option -val rebuildLinearMatchExpr: DebugPointAtBinding * range * DecisionTree * DecisionTreeTarget * Expr * DebugPointAtTarget * range * TType -> Expr +val rebuildLinearMatchExpr: DebugPointAtBinding * range * DecisionTree * DecisionTreeTarget * Expr * range * TType -> Expr val (|LinearOpExpr|_|): Expr -> (TOp * TypeInst * Expr list * Expr * range) option @@ -2481,14 +2483,17 @@ val (|StructStateMachineExpr|_|): /// Recognise a sequential or binding construct in a resumable code val (|SequentialResumableCode|_|): g: TcGlobals -> Expr -> (Expr * Expr * range * (Expr -> Expr -> Expr)) option +/// Recognise a '__debugPoint' expression +val (|DebugPointExpr|_|): g: TcGlobals -> Expr -> string option + /// Recognise a '__resumeAt' expression val (|ResumeAtExpr|_|): g: TcGlobals -> Expr -> Expr option /// Recognise a while expression val (|WhileExpr|_|): Expr -> (DebugPointAtWhile * SpecialWhileLoopMarker * Expr * Expr * range) option -/// Recognise a for-loop expression -val (|ForLoopExpr|_|): Expr -> (DebugPointAtFor * ForLoopStyle * Expr * Expr * Val * Expr * range) option +/// Recognise an integer for-loop expression +val (|IntegerForLoopExpr|_|): Expr -> (DebugPointAtFor * DebugPointAtInOrTo * ForLoopStyle * Expr * Expr * Val * Expr * range) option /// Recognise a try-with expression val (|TryWithExpr|_|): Expr -> (DebugPointAtTry * DebugPointAtWith * TType * Expr * Val * Expr * Val * Expr * range) option @@ -2536,5 +2541,4 @@ 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 +val mkDebugPoint: m: range -> expr: Expr -> Expr diff --git a/src/fsharp/TypedTreePickle.fs b/src/fsharp/TypedTreePickle.fs index 92b658375dc..1e912d1037a 100644 --- a/src/fsharp/TypedTreePickle.fs +++ b/src/fsharp/TypedTreePickle.fs @@ -2394,7 +2394,7 @@ and p_dtree_discrim x st = | DecisionTreeTest.ActivePatternCase _ -> pfailwith st "DecisionTreeTest.ActivePatternCase: only used during pattern match compilation" | DecisionTreeTest.Error _ -> pfailwith st "DecisionTreeTest.Error: only used during pattern match compilation" -and p_target (TTarget(a, b, _, _)) st = p_tup2 p_Vals p_expr (a, b) st +and p_target (TTarget(a, b, _)) st = p_tup2 p_Vals p_expr (a, b) st and p_bind (TBind(a, b, _)) st = p_tup2 p_Val p_expr (a, b) st and p_lval_op_kind x st = @@ -2427,7 +2427,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, DebugPointAtTarget.No, None)) +and u_target st = let a, b = u_tup2 u_Vals u_expr st in (TTarget(a, b, None)) and u_bind st = let a = u_Val st in let b = u_expr st in TBind(a, b, DebugPointAtBinding.NoneAtSticky) @@ -2472,7 +2472,7 @@ and p_op x st = -> p_byte 18 st; p_tup11 p_bool p_bool p_bool p_bool p_vrefFlags p_bool p_bool p_ILMethodRef p_tys p_tys p_tys (a1, a2, a3, a4, a5, a7, a8, a9, b, c, d) st | TOp.Array -> p_byte 19 st | TOp.While _ -> p_byte 20 st - | TOp.For (_, dir) -> p_byte 21 st; p_int (match dir with FSharpForLoopUp -> 0 | CSharpForLoopUp -> 1 | FSharpForLoopDown -> 2) st + | TOp.IntegerForLoop (_, _, dir) -> p_byte 21 st; p_int (match dir with FSharpForLoopUp -> 0 | CSharpForLoopUp -> 1 | FSharpForLoopDown -> 2) st | TOp.Bytes bytes -> p_byte 22 st; p_bytes bytes st | TOp.TryWith _ -> p_byte 23 st | TOp.TryFinally _ -> p_byte 24 st @@ -2538,7 +2538,7 @@ and u_op st = | 19 -> TOp.Array | 20 -> TOp.While (DebugPointAtWhile.No, NoSpecialWhileLoopMarker) | 21 -> let dir = match u_int st with 0 -> FSharpForLoopUp | 1 -> CSharpForLoopUp | 2 -> FSharpForLoopDown | _ -> failwith "unknown for loop" - TOp.For (DebugPointAtFor.No, dir) + TOp.IntegerForLoop (DebugPointAtFor.No, DebugPointAtInOrTo.No, dir) | 22 -> TOp.Bytes (u_bytes st) | 23 -> TOp.TryWith (DebugPointAtTry.No, DebugPointAtWith.No) | 24 -> TOp.TryFinally (DebugPointAtTry.No, DebugPointAtFinally.No) @@ -2565,7 +2565,7 @@ and p_expr expr st = | Expr.Const (x, m, ty) -> p_byte 0 st; p_tup3 p_const p_dummy_range p_ty (x, m, ty) st | Expr.Val (a, b, m) -> p_byte 1 st; p_tup3 (p_vref "val") p_vrefFlags p_dummy_range (a, b, m) st | Expr.Op (a, b, c, d) -> p_byte 2 st; p_tup4 p_op p_tys p_Exprs p_dummy_range (a, b, c, d) st - | Expr.Sequential (a, b, c, _, d) -> p_byte 3 st; p_tup4 p_expr p_expr p_int p_dummy_range (a, b, (match c with NormalSeq -> 0 | ThenDoSeq -> 1), d) st + | Expr.Sequential (a, b, c, d) -> p_byte 3 st; p_tup4 p_expr p_expr p_int p_dummy_range (a, b, (match c with NormalSeq -> 0 | ThenDoSeq -> 1), d) st | Expr.Lambda (_, a1, b0, b1, c, d, e) -> p_byte 4 st; p_tup6 (p_option p_Val) (p_option p_Val) p_Vals p_expr p_dummy_range p_ty (a1, b0, b1, c, d, e) st | Expr.TyLambda (_, b, c, d, e) -> p_byte 5 st; p_tup4 p_tyar_specs p_expr p_dummy_range p_ty (b, c, d, e) st | Expr.App (a1, a2, b, c, d) -> p_byte 6 st; p_tup5 p_expr p_ty p_tys p_Exprs p_dummy_range (a1, a2, b, c, d) st @@ -2577,6 +2577,7 @@ and p_expr expr st = | Expr.TyChoose (a, b, c) -> p_byte 12 st; p_tup3 p_tyar_specs p_expr p_dummy_range (a, b, c) st | Expr.Quote (ast, _, _, m, ty) -> p_byte 13 st; p_tup3 p_expr p_dummy_range p_ty (ast, m, ty) st | Expr.WitnessArg (traitInfo, m) -> p_byte 14 st; p_trait traitInfo st; p_dummy_range m st + | Expr.DebugPoint (_, innerExpr) -> p_expr innerExpr st and u_expr st = let tag = u_byte st @@ -2599,7 +2600,7 @@ and u_expr st = let c = u_int st let d = u_dummy_range st let dir = match c with 0 -> NormalSeq | 1 -> ThenDoSeq | _ -> ufailwith st "specialSeqFlag" - Expr.Sequential (a, b, dir, DebugPointAtSequential.SuppressStmt, d) + Expr.Sequential (a, b, dir, d) | 4 -> let a0 = u_option u_Val st let b0 = u_option u_Val st let b1 = u_Vals st diff --git a/src/fsharp/absil/il.fs b/src/fsharp/absil/il.fs index 11ebf120e15..2401f90c042 100644 --- a/src/fsharp/absil/il.fs +++ b/src/fsharp/absil/il.fs @@ -1287,7 +1287,7 @@ type ILMethodBody = AggressiveInlining: bool Locals: ILLocals Code: ILCode - DebugPoint: ILDebugPoint option + DebugRange: ILDebugPoint option DebugImports: ILDebugImports option } @@ -1700,8 +1700,6 @@ type ILMethodDef (name: string, attributes: MethodAttributes, implAttributes: Me member x.MethodBody = match x.Body with MethodBody.IL il -> il.Value | _ -> failwith "not IL" - member x.DebugPoint = x.MethodBody.DebugPoint - member x.MaxStack = x.MethodBody.MaxStack member x.IsZeroInit = x.MethodBody.IsZeroInit @@ -2986,7 +2984,7 @@ let mkILMethodBody (initlocals, locals, maxstack, code, tag, imports) : ILMethod AggressiveInlining=false Locals= locals Code= code - DebugPoint=tag + DebugRange=tag DebugImports=imports } let mkMethodBody (zeroinit, locals, maxstack, code, tag, imports) = diff --git a/src/fsharp/absil/il.fsi b/src/fsharp/absil/il.fsi index d214323f2b0..d87dd163a27 100644 --- a/src/fsharp/absil/il.fsi +++ b/src/fsharp/absil/il.fsi @@ -781,7 +781,11 @@ type internal ILMethodBody = AggressiveInlining: bool Locals: ILLocals Code: ILCode - DebugPoint: ILDebugPoint option + + /// Indicates the entire range of the method. Emitted for full PDB but not currently for portable PDB. + /// Additionally, if the range is not set, then no debug points are emitted. + DebugRange: ILDebugPoint option + DebugImports: ILDebugImports option } diff --git a/src/fsharp/absil/ilread.fs b/src/fsharp/absil/ilread.fs index 1b8e55dcc23..48781286cd5 100644 --- a/src/fsharp/absil/ilread.fs +++ b/src/fsharp/absil/ilread.fs @@ -2935,7 +2935,7 @@ and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (idx, nm, _int AggressiveInlining=aggressiveinline Locals=List.empty Code=code - DebugPoint=methRangePdbInfo + DebugRange=methRangePdbInfo DebugImports=None } @@ -3061,7 +3061,7 @@ and seekReadMethodRVA (pectxt: PEReader) (ctxt: ILMetadataReader) (idx, nm, _int AggressiveInlining=aggressiveinline Locals = locals Code=code - DebugPoint=methRangePdbInfo + DebugRange=methRangePdbInfo DebugImports = None }) diff --git a/src/fsharp/absil/ilwrite.fs b/src/fsharp/absil/ilwrite.fs index 7ddd68e404c..95435d6ab0f 100644 --- a/src/fsharp/absil/ilwrite.fs +++ b/src/fsharp/absil/ilwrite.fs @@ -2530,8 +2530,8 @@ let GenMethodDefAsRow cenv env midx (md: ILMethodDef) = LocalSignatureToken=localToken Params= [| |] (* REVIEW *) RootScope = Some rootScope - Range= - match ilmbody.DebugPoint with + DebugRange = + match ilmbody.DebugRange with | Some m when cenv.generatePdb -> // table indexes are 1-based, document array indexes are 0-based let doc = (cenv.documents.FindOrAddSharedEntry m.Document) - 1 @@ -2556,7 +2556,7 @@ let GenMethodDefAsRow cenv env midx (md: ILMethodDef) = LocalSignatureToken = 0x0 // No locals it's abstract Params = [| |] RootScope = None - Range = None + DebugRange = None DebugPoints = [| |] } 0x0000 | MethodBody.Native -> diff --git a/src/fsharp/absil/ilwritepdb.fs b/src/fsharp/absil/ilwritepdb.fs index 75cfd3dcacf..a080cd21477 100644 --- a/src/fsharp/absil/ilwritepdb.fs +++ b/src/fsharp/absil/ilwritepdb.fs @@ -103,8 +103,8 @@ type PdbMethodData = LocalSignatureToken: int32 Params: PdbLocalVar array RootScope: PdbMethodScope option - Range: (PdbSourceLoc * PdbSourceLoc) option - DebugPoints: PdbDebugPoint [] + DebugRange: (PdbSourceLoc * PdbSourceLoc) option + DebugPoints: PdbDebugPoint array } module SequencePoint = @@ -572,7 +572,7 @@ type PortablePdbGenerator (embedAllSource: bool, embedSourceList: string list, s match minfo.DebugPoints with | null -> Array.empty | _ -> - match minfo.Range with + match minfo.DebugRange with | None -> Array.empty | Some _ -> minfo.DebugPoints @@ -784,7 +784,7 @@ let writePdbInfo showTimes f fpdb info cvChunk = let sps = Array.sub allSps spOffset spCounts.[i] spOffset <- spOffset + spCounts.[i] - begin match minfo.Range with + begin match minfo.DebugRange with | None -> () | Some (a,b) -> pdbOpenMethod pdbw minfo.MethToken @@ -930,7 +930,7 @@ let writeMdbInfo fmdb f info = // We need this as an argument to 'OpenMethod' below. Using private class is ugly, but since we don't reference // the assembly, the only way to implement 'IMethodDef' interface would be dynamically using Reflection.Emit... let sm = createSourceMethodImpl meth.MethName meth.MethToken 0 - match meth.Range with + match meth.DebugRange with | Some(mstart, _) -> // NOTE: 'meth.Params' is not needed, Mono debugger apparently reads this from meta-data let _, cue = getDocument mstart.Document @@ -985,7 +985,7 @@ let logDebugInfo (outfile: string) (info: PdbData) = for meth in info.Methods do fprintfn sw " %s" meth.MethName fprintfn sw " Params: %A" [ for p in meth.Params -> sprintf "%d: %s" p.Index p.Name ] - fprintfn sw " Range: %A" (meth.Range |> Option.map (fun (f, t) -> + fprintfn sw " Range: %A" (meth.DebugRange |> Option.map (fun (f, t) -> sprintf "[%d,%d:%d] - [%d,%d:%d]" f.Document f.Line f.Column t.Document t.Line t.Column)) fprintfn sw " Points:" diff --git a/src/fsharp/absil/ilwritepdb.fsi b/src/fsharp/absil/ilwritepdb.fsi index f4f1eb86f96..a59d5a971ad 100644 --- a/src/fsharp/absil/ilwritepdb.fsi +++ b/src/fsharp/absil/ilwritepdb.fsi @@ -73,7 +73,7 @@ type PdbMethodData = LocalSignatureToken: int32 Params: PdbLocalVar[] RootScope: PdbMethodScope option - Range: (PdbSourceLoc * PdbSourceLoc) option + DebugRange: (PdbSourceLoc * PdbSourceLoc) option DebugPoints: PdbDebugPoint[] } diff --git a/src/fsharp/autobox.fs b/src/fsharp/autobox.fs index 4c3fd769ccd..e018a8f1ffa 100644 --- a/src/fsharp/autobox.fs +++ b/src/fsharp/autobox.fs @@ -37,7 +37,7 @@ let DecideEscapes syntacticArgs body = /// Find all the mutable locals that escape a lambda expression, ignoring the arguments to the lambda let DecideLambda exprF cenv topValInfo expr ety z = - match expr with + match stripDebugPoints expr with | Expr.Lambda _ | Expr.TyLambda _ -> let _tps, ctorThisValOpt, baseValOpt, vsl, body, _bodyty = destTopLambda cenv.g cenv.amap topValInfo (expr, ety) @@ -62,7 +62,7 @@ let DecideExprOp exprF noInterceptF (z: Zset) (expr: Expr) (op, tyargs, arg | TOp.TryFinally _, [_], [Expr.Lambda (_, _, _, [_], e1, _, _); Expr.Lambda (_, _, _, [_], e2, _, _)] -> exprF (exprF z e1) e2 - | TOp.For _, _, [Expr.Lambda (_, _, _, [_], e1, _, _);Expr.Lambda (_, _, _, [_], e2, _, _);Expr.Lambda (_, _, _, [_], e3, _, _)] -> + | TOp.IntegerForLoop _, _, [Expr.Lambda (_, _, _, [_], e1, _, _);Expr.Lambda (_, _, _, [_], e2, _, _);Expr.Lambda (_, _, _, [_], e3, _, _)] -> exprF (exprF (exprF z e1) e2) e3 | TOp.TryWith _, [_], [Expr.Lambda (_, _, _, [_], e1, _, _); Expr.Lambda (_, _, _, [_], _e2, _, _); Expr.Lambda (_, _, _, [_], e3, _, _)] -> @@ -75,7 +75,7 @@ let DecideExprOp exprF noInterceptF (z: Zset) (expr: Expr) (op, tyargs, arg /// Find all the mutable locals that escape a lambda expression or object expression let DecideExpr cenv exprF noInterceptF z expr = - match expr with + match stripDebugPoints expr with | Expr.Lambda (_, _ctorThisValOpt, _baseValOpt, argvs, _, m, rty) -> let topValInfo = ValReprInfo ([], [argvs |> List.map (fun _ -> ValReprInfo.unnamedTopArg1)], ValReprInfo.unnamedRetVal) let ty = mkMultiLambdaTy m argvs rty diff --git a/src/fsharp/fsc.fs b/src/fsharp/fsc.fs index 26d1b81f71f..917299352b7 100644 --- a/src/fsharp/fsc.fs +++ b/src/fsharp/fsc.fs @@ -315,7 +315,7 @@ module InterfaceFileWriter = let denv = DisplayEnv.InitialForSigFileGeneration tcGlobals let denv = { denv with shrinkOverloads = false; printVerboseSignatures = true } - let writeToFile os (TImplFile (_, _, mexpr, _, _, _)) = + let writeToFile os (TImplFile (implExprWithSig=mexpr)) = writeViaBuffer os (fun os s -> Printf.bprintf os "%s\n\n" s) (NicePrint.layoutInferredSigOfModuleExpr true denv infoReader AccessibleFromSomewhere range0 mexpr |> Display.squashTo 80 |> LayoutRender.showL) @@ -346,7 +346,7 @@ module InterfaceFileWriter = ".fsi" let writeToSeparateFiles (declaredImpls: TypedImplFile list) = - for TImplFile (name, _, _, _, _, _) as impl in declaredImpls do + for TImplFile (qualifiedNameOfFile=name) as impl in declaredImpls do let filename = Path.ChangeExtension(name.Range.FileName, extensionForFile name.Range.FileName) printfn "writing impl file to %s" filename use os = FileSystem.OpenFileForWriteShim(filename, FileMode.Create).GetWriter() @@ -728,7 +728,7 @@ let main2(Args (ctok, tcGlobals, tcImports: TcImports, frameworkTcImports, gener // it as the updated global error logger and never remove it let oldLogger = errorLogger let errorLogger = - let scopedPragmas = [ for TImplFile (_, pragmas, _, _, _, _) in typedImplFiles do yield! pragmas ] + let scopedPragmas = [ for TImplFile (pragmas=pragmas) in typedImplFiles do yield! pragmas ] GetErrorLoggerFilteringByScopedPragmas(true, scopedPragmas, tcConfig.errorSeverityOptions, oldLogger) let _unwindEL_3 = PushErrorLoggerPhaseUntilUnwind(fun _ -> errorLogger) diff --git a/src/fsharp/fsi/fsi.fs b/src/fsharp/fsi/fsi.fs index 19a6bca5ae5..c8535fa96c0 100644 --- a/src/fsharp/fsi/fsi.fs +++ b/src/fsharp/fsi/fsi.fs @@ -1089,7 +1089,7 @@ let internal mkBoundValueTypedImpl tcGlobals m moduleName name ty = let binding = Binding.TBind(v, bindExpr, DebugPointAtBinding.NoneAtLet) let mbinding = ModuleOrNamespaceBinding.Module(moduleOrNamespace, TMDefs([TMDefLet(binding, m)])) let expr = ModuleOrNamespaceExprWithSig(mty, TMDefs([TMDefs[TMDefRec(false, [], [], [mbinding], m)]]), range0) - moduleOrNamespace, v, TypedImplFile.TImplFile(QualifiedNameOfFile.QualifiedNameOfFile(Ident(moduleName, m)), [], expr, false, false, StampMap.Empty) + moduleOrNamespace, v, TypedImplFile.TImplFile(QualifiedNameOfFile.QualifiedNameOfFile(Ident(moduleName, m)), [], expr, false, false, StampMap.Empty, Map.empty) /// Encapsulates the coordination of the typechecking, optimization and code generation /// components of the F# compiler for interactively executed fragments of code. @@ -1223,7 +1223,7 @@ type internal FsiDynamicCompiler // 'Open' the path for the fragment we just compiled for any future printing. let denv = denv.AddOpenPath (pathOfLid prefixPath) - for TImplFile (_qname,_,mexpr,_,_,_) in declaredImpls do + for TImplFile (implExprWithSig=mexpr) in declaredImpls do let responseL = NicePrint.layoutInferredSigOfModuleExpr false denv infoReader AccessibleFromSomewhere rangeStdin mexpr if not (isEmptyL responseL) then let opts = valuePrinter.GetFsiPrintOptions() @@ -1473,7 +1473,7 @@ type internal FsiDynamicCompiler let methCall = SynExpr.LongIdent (false, LongIdentWithDots(List.map (mkSynId m) breakPath, dots), None, m) let args = SynExpr.Const (SynConst.Unit, m) let breakStatement = SynExpr.App (ExprAtomicFlag.Atomic, false, methCall, args, m) - SynModuleDecl.DoExpr(DebugPointAtBinding.NoneAtDo, breakStatement, m) + SynModuleDecl.DoExpr(DebugPointAtBinding.ImplicitAtDo, breakStatement, m) member _.EvalRequireReference (ctok, istate, m, path) = if FileSystem.IsInvalidPathShim(path) then diff --git a/src/fsharp/ilx/EraseClosures.fs b/src/fsharp/ilx/EraseClosures.fs index 8a73f9c860f..4eb1dda7517 100644 --- a/src/fsharp/ilx/EraseClosures.fs +++ b/src/fsharp/ilx/EraseClosures.fs @@ -124,6 +124,8 @@ type cenv = addFieldNeverAttrs: ILFieldDef -> ILFieldDef addMethodGeneratedAttrs: ILMethodDef -> ILMethodDef + + addMethodGeneratedAttrsIfNoDebugPoints: bool -> ILMethodDef -> ILMethodDef } override _.ToString() = "" @@ -132,13 +134,14 @@ type cenv = let addMethodGeneratedAttrsToTypeDef cenv (tdef: ILTypeDef) = tdef.With(methods = (tdef.Methods.AsList |> List.map (fun md -> md |> cenv.addMethodGeneratedAttrs) |> mkILMethods)) -let newIlxPubCloEnv(ilg, addMethodGeneratedAttrs, addFieldGeneratedAttrs, addFieldNeverAttrs) = +let newIlxPubCloEnv(ilg, addMethodGeneratedAttrs, addFieldGeneratedAttrs, addFieldNeverAttrs, addMethodGeneratedAttrsIfNoDebugPoints) = { ilg = ilg tref_Func = Array.init 10 (fun i -> mkFuncTypeRef ilg.fsharpCoreAssemblyScopeRef (i+1)) mkILTyFuncTy = ILType.Boxed (mkILNonGenericTySpec (mkILTyRef (ilg.fsharpCoreAssemblyScopeRef, fsharpCoreNamespace + ".FSharpTypeFunc"))) addMethodGeneratedAttrs = addMethodGeneratedAttrs addFieldGeneratedAttrs = addFieldGeneratedAttrs - addFieldNeverAttrs = addFieldNeverAttrs } + addFieldNeverAttrs = addFieldNeverAttrs + addMethodGeneratedAttrsIfNoDebugPoints = addMethodGeneratedAttrsIfNoDebugPoints } let mkILTyFuncTy cenv = cenv.mkILTyFuncTy let mkILFuncTy cenv dty rty = mkILBoxedTy cenv.tref_Func.[0] [dty;rty] @@ -318,7 +321,7 @@ let convILMethodBody (thisClo, boxReturnTy) (il: ILMethodBody) = let convMethodBody thisClo = function | MethodBody.IL il -> let convil = convILMethodBody (thisClo, None) il.Value - MethodBody.IL (lazy convil) + MethodBody.IL (notlazy convil) | x -> x let convMethodDef thisClo (md: ILMethodDef) = @@ -356,7 +359,7 @@ let mkILCloFldDefs cenv flds = // it's a type abstraction or a term abstraction. // -------------------------------------------------------------------- -let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = +let rec convIlxClosureDef cenv debuginfo encl (td: ILTypeDef) clo = let newTypeDefs = // the following are shared between cases 1 && 2 @@ -367,7 +370,7 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = let nowCloSpec = mkILFormalCloRef td.GenericParams nowCloRef clo.cloUseStaticField let nowMethods = List.map (convMethodDef (Some nowCloSpec)) td.Methods.AsList let ilCloCode = Lazy.force clo.cloCode - let cloTag = ilCloCode.DebugPoint + let cloDebugRange = ilCloCode.DebugRange let cloImports = ilCloCode.DebugImports let tyargsl, tmargsl, laterStruct = stripSupportedAbstraction clo.cloStructure @@ -438,7 +441,7 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = let laterCode = rewriteCodeToAccessArgsFromEnv laterCloSpec [(0, selfFreeVar)] let laterTypeDefs = - convIlxClosureDef cenv encl + convIlxClosureDef cenv debuginfo encl (td.With(genericParams=laterGenericParams, name=laterTypeName, methods=emptyILMethods, fields=emptyILFields)) {clo with cloStructure=laterStruct cloFreeVars=laterFields @@ -456,11 +459,12 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = // This passes the method type params. as class type params. I_newobj (laterCloSpec.Constructor, None) ] - let nowCode = mkILMethodBody (false, [], nowFields.Length + 1, nonBranchingInstrsToCode nowInstrs, cloTag, cloImports) + let nowCode = mkILMethodBody (false, [], nowFields.Length + 1, nonBranchingInstrsToCode nowInstrs, cloDebugRange, cloImports) let nowTypeDefs = - convIlxClosureDef cenv encl td {clo with cloStructure=nowStruct - cloCode=notlazy nowCode} + convIlxClosureDef cenv debuginfo encl td + {clo with cloStructure=nowStruct + cloCode=notlazy nowCode} let nowTypeDefs = nowTypeDefs |> List.map (addMethodGeneratedAttrsToTypeDef cenv) @@ -476,7 +480,9 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = addedGenParams, (* method is generic over added ILGenericParameterDefs *) [], mkILReturn(cenv.ilg.typ_Object), - MethodBody.IL (lazy convil)) + MethodBody.IL (notlazy convil)) + |> cenv.addMethodGeneratedAttrsIfNoDebugPoints debuginfo + let ctorMethodDef = mkILStorageCtor ([ mkLdarg0; mkNormalCall (mkILCtorMethSpecForTy (cenv.mkILTyFuncTy, [])) ], @@ -540,16 +546,17 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = I_newobj (laterCloSpec.Constructor, None) ] // This is the code which will first get called. - let nowCode = mkILMethodBody (false, [], argToFreeVarMap.Length + nowFields.Length, nonBranchingInstrsToCode nowInstrs, cloTag, cloImports) + let nowCode = mkILMethodBody (false, [], argToFreeVarMap.Length + nowFields.Length, nonBranchingInstrsToCode nowInstrs, cloDebugRange, cloImports) let nowTypeDefs = - convIlxClosureDef cenv encl td {clo with cloStructure=nowStruct - cloCode=notlazy nowCode} + convIlxClosureDef cenv debuginfo encl td + {clo with cloStructure=nowStruct + cloCode=notlazy nowCode} let laterCode = rewriteCodeToAccessArgsFromEnv laterCloSpec argToFreeVarMap let laterTypeDefs = - convIlxClosureDef cenv encl + convIlxClosureDef cenv debuginfo encl (td.With(genericParams=laterGenericParams, name=laterTypeName, methods=emptyILMethods, fields=emptyILFields)) {clo with cloStructure=laterStruct cloFreeVars=laterFields @@ -561,8 +568,7 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = nowTypeDefs @ laterTypeDefs else - // CASE 2b - Build an Term Application Apply method - // CASE 2b2. Build a term application as a virtual method. + // CASE 2b - Build an Invoke method let nowEnvParentClass = typ_Func cenv (typesOfILParams nowParams) nowReturnTy @@ -573,7 +579,8 @@ let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = ("Invoke", ILMemberAccess.Public, nowParams, mkILReturn nowReturnTy, - MethodBody.IL (lazy convil)) + MethodBody.IL (notlazy convil)) + |> cenv.addMethodGeneratedAttrsIfNoDebugPoints debuginfo let ctorMethodDef = mkILStorageCtor diff --git a/src/fsharp/ilx/EraseClosures.fsi b/src/fsharp/ilx/EraseClosures.fsi index f7426491da2..779c061bc25 100644 --- a/src/fsharp/ilx/EraseClosures.fsi +++ b/src/fsharp/ilx/EraseClosures.fsi @@ -14,9 +14,15 @@ val mkILFuncTy : cenv -> ILType -> ILType -> ILType val mkILTyFuncTy : cenv -> ILType -val newIlxPubCloEnv : ILGlobals * addMethodGeneratedAttrs: (ILMethodDef -> ILMethodDef) * addFieldGeneratedAttrs: (ILFieldDef -> ILFieldDef) * addFieldNeverAttrs: (ILFieldDef -> ILFieldDef) -> cenv +val newIlxPubCloEnv: + ilg: ILGlobals * + addMethodGeneratedAttrs: (ILMethodDef -> ILMethodDef) * + addFieldGeneratedAttrs: (ILFieldDef -> ILFieldDef) * + addFieldNeverAttrs: (ILFieldDef -> ILFieldDef) * + addMethodGeneratedAttrsIfNoDebugPoints: (bool -> ILMethodDef -> ILMethodDef) + -> cenv val mkTyOfLambdas: cenv -> IlxClosureLambdas -> ILType -val convIlxClosureDef : cenv -> encl: string list -> ILTypeDef -> IlxClosureInfo -> ILTypeDef list +val convIlxClosureDef: cenv -> debuginfo: bool -> encl: string list -> ILTypeDef -> IlxClosureInfo -> ILTypeDef list diff --git a/src/fsharp/infos.fs b/src/fsharp/infos.fs index a1f2b836e2d..eb7f4dc1633 100755 --- a/src/fsharp/infos.fs +++ b/src/fsharp/infos.fs @@ -578,6 +578,7 @@ type OptionalArgInfo = match defaultValueExpr with | Expr.Const _ -> Some defaultValueExpr | _ -> None + static member FieldInitForDefaultParameterValueAttrib attrib = match OptionalArgInfo.ValueOfDefaultParameterValueAttrib attrib with | Some (Expr.Const (ConstToILFieldInit fi, _, _)) -> Some fi diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy index c605094b942..7c1ea76c46a 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -63,11 +63,10 @@ let mkSynDoBinding (vis, strict, expr, m) = (if strict then SynBindingKind.Do else SynBindingKind.StandaloneExpression), false, false, [], PreXmlDoc.Empty, SynInfo.emptySynValData, (if strict then SynPat.Const(SynConst.Unit, m) else SynPat.Wild m), - None, None, expr, m, DebugPointAtBinding.NoneAtDo) + None, None, expr, m, DebugPointAtBinding.ImplicitAtDo) let mkSynDoDecl (e: SynExpr) = - let spExpr = if IsControlFlowExpression e then DebugPointAtBinding.NoneAtDo else DebugPointAtBinding.Yes e.Range - SynModuleDecl.DoExpr(spExpr, e, e.Range) + SynModuleDecl.DoExpr(DebugPointAtBinding.ImplicitAtDo, e, e.Range) let addAttribs attrs p = SynPat.Attrib(p, attrs, p.Range) @@ -1781,12 +1780,12 @@ memberCore: { let mRhs = $5.Range let optReturnType = $3 let mEquals = rhs parseState 4 - let bindingBuilder, mBindLhs = $2 + let bindingPat, mBindLhs = $2 (fun vis memFlagsBuilder attrs rangeStart -> let xmlDoc = grabXmlDocAtRangeStart(parseState, attrs, rangeStart) let memberFlags = Some (memFlagsBuilder SynMemberKind.Member) let mWholeBindLhs = (mBindLhs, attrs) ||> unionRangeWithListBy (fun (a: SynAttributeList) -> a.Range) - let binding = (bindingBuilder xmlDoc) (vis, $1, false, mWholeBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, Some mEquals, $5, mRhs, [], attrs, memberFlags) + let binding = mkSynBinding (xmlDoc, bindingPat) (vis, $1, false, mWholeBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, Some mEquals, $5, mRhs, [], attrs, memberFlags) let memberRange = unionRanges rangeStart mRhs [ SynMemberDefn.Member (binding, memberRange) ]) } @@ -1794,7 +1793,7 @@ memberCore: | opt_inline bindingPattern opt_topReturnTypeWithTypeConstraints classDefnMemberGetSet { let mWith, (classDefnMemberGetSetElements, mAnd) = $4 let mWhole = (rhs parseState 2, classDefnMemberGetSetElements) ||> unionRangeWithListBy (fun (_, _, _, _, _, _, m2) -> m2) - let propertyNameBindingBuilder, _ = $2 + let propertyNameBindingPat, _ = $2 let optPropertyType = $3 let isMutable = false (fun visNoLongerUsed memFlagsBuilder attrs rangeStart -> @@ -1804,7 +1803,7 @@ memberCore: let tryMkSynMemberDefnMember (withPropertyKeyword: PropertyKeyword option) - (optInline, (optAttrs: SynAttributeList list), (bindingBuilder, mBindLhs), optReturnType, mEquals, expr, exprm) + (optInline, (optAttrs: SynAttributeList list), (bindingPat, mBindLhs), optReturnType, mEquals, expr, exprm) = let optInline = $1 || optInline // optional attributes are only applied to getters and setters @@ -1815,7 +1814,7 @@ memberCore: let attrs = attrs @ optAttrs - let binding = (bindingBuilder xmlDoc) (visNoLongerUsed, optInline, isMutable, mBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, None, expr, exprm, [], attrs, Some (memFlagsBuilder SynMemberKind.Member)) + let binding = mkSynBinding (xmlDoc, bindingPat) (visNoLongerUsed, optInline, isMutable, mBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, None, expr, exprm, [], attrs, Some (memFlagsBuilder SynMemberKind.Member)) let (SynBinding (vis, _, isInline, _, attrs, doc, valSynData, pv, _, _, _, mBindLhs, spBind)) = binding let memberKind = let getset = @@ -1864,7 +1863,7 @@ memberCore: | _ -> optReturnType // REDO with the correct member kind - let binding = (bindingBuilder PreXmlDoc.Empty) (vis, isInline, isMutable, mBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, mEquals, expr, exprm, [], attrs, Some(memFlagsBuilder memberKind)) + let binding = mkSynBinding (PreXmlDoc.Empty, bindingPat) (vis, isInline, isMutable, mBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, mEquals, expr, exprm, [], attrs, Some(memFlagsBuilder memberKind)) let (SynBinding (vis, _, isInline, _, attrs, doc, valSynData, pv, rhsRetInfo, mEquals, rhsExpr, mBindLhs, spBind)) = binding let mWholeBindLhs = (mBindLhs, attrs) ||> unionRangeWithListBy (fun (a: SynAttributeList) -> a.Range) @@ -1924,7 +1923,7 @@ memberCore: let bindingPatAdjusted, xmlDocAdjusted = - let bindingOuter = (propertyNameBindingBuilder xmlDoc) (vis, optInline, isMutable, mWholeBindLhs, spBind, optReturnType, mEquals, expr, exprm, [], attrs, Some(memFlagsBuilder SynMemberKind.Member)) + let bindingOuter = mkSynBinding (xmlDoc, propertyNameBindingPat) (vis, optInline, isMutable, mWholeBindLhs, spBind, optReturnType, mEquals, expr, exprm, [], attrs, Some(memFlagsBuilder SynMemberKind.Member)) let (SynBinding (_, _, _, _, _, doc2, _, bindingPatOuter, _, _, _, _, _)) = bindingOuter @@ -2721,7 +2720,7 @@ hardwhiteDoBinding: | ODO typedSequentialExprBlock hardwhiteDefnBindingsTerminator { let mLetKwd = rhs parseState 1 let bindingSetRange = unionRanges mLetKwd $2.Range - let seqPt = DebugPointAtBinding.NoneAtDo + let seqPt = DebugPointAtBinding.ImplicitAtDo // any attributes prior to the 'let' are left free, e.g. become top-level attributes // associated with the module, 'main' function or assembly depending on their target BindingSetPreAttrs(mLetKwd, false, false, (fun attrs vis -> attrs, [mkSynDoBinding (vis, true, $2, bindingSetRange)]), bindingSetRange), $2 } @@ -2772,11 +2771,11 @@ cPrototype: SynExpr.Const (SynConst.String("extern was not given a DllImport attribute", SynStringKind.Regular, rhs parseState 8), rhs parseState 8), mRhs) (fun attrs _ -> - let bindingId = SynPat.LongIdent (LongIdentWithDots([nm], []), None, None, Some noInferredTypars, SynArgPats.Pats [SynPat.Tuple(false, args, argsm)], vis, nmm) + let bindingPat = SynPat.LongIdent (LongIdentWithDots([nm], []), None, None, Some noInferredTypars, SynArgPats.Pats [SynPat.Tuple(false, args, argsm)], vis, nmm) let mWholeBindLhs = (mBindLhs, attrs) ||> unionRangeWithListBy (fun (a: SynAttributeList) -> a.Range) let xmlDoc = grabXmlDoc(parseState, attrs, 1) let binding = mkSynBinding - (xmlDoc, bindingId) + (xmlDoc, bindingPat) (vis, false, false, mWholeBindLhs, DebugPointAtBinding.NoneAtInvisible, Some rty, None, rhsExpr, mRhs, [], attrs, None) [], [binding]) } @@ -2885,31 +2884,32 @@ attr_localBinding: /* A single binding in an expression or definition */ localBinding: | opt_inline opt_mutable bindingPattern opt_topReturnTypeWithTypeConstraints EQUALS typedExprWithStaticOptimizationsBlock - { let (expr:SynExpr), opts = $6 - let eqm = rhs parseState 5 - let mRhs = expr.Range + { let (rhsExpr:SynExpr), opts = $6 + let mEquals = rhs parseState 5 + let mRhs = rhsExpr.Range let optReturnType = $4 - let bindingBuilder, mBindLhs = $3 + let bindingPat, mBindLhs = $3 let localBindingRange = unionRanges (rhs2 parseState 1 5) mRhs let localBindingBuilder = (fun xmlDoc attrs vis mLetKwd -> let mWhole = (unionRanges mLetKwd mRhs, attrs) ||> unionRangeWithListBy (fun (a: SynAttributeList) -> a.Range) - let spBind = if IsControlFlowExpression expr then DebugPointAtBinding.NoneAtLet else DebugPointAtBinding.Yes mWhole + let spBind = if IsDebugPointBinding bindingPat rhsExpr then DebugPointAtBinding.Yes mWhole else DebugPointAtBinding.NoneAtLet let mWholeBindLhs = (mBindLhs, attrs) ||> unionRangeWithListBy (fun (a: SynAttributeList) -> a.Range) - (bindingBuilder xmlDoc) (vis, $1, $2, mWholeBindLhs, spBind, optReturnType, Some eqm, expr, mRhs, opts, attrs, None)) + mkSynBinding (xmlDoc, bindingPat) (vis, $1, $2, mWholeBindLhs, spBind, optReturnType, Some mEquals, rhsExpr, mRhs, opts, attrs, None)) localBindingRange, localBindingBuilder } | opt_inline opt_mutable bindingPattern opt_topReturnTypeWithTypeConstraints EQUALS error { let mWhole = rhs2 parseState 1 5 - let mRhs = rhs parseState 5 + let mEquals = rhs parseState 5 + let mRhs = mEquals let optReturnType = $4 - let bindingBuilder, mBindLhs = $3 + let zeroWidthAtEnd = mEquals.EndRange + let bindingPat, mBindLhs = $3 + let rhsExpr = arbExpr("localBinding1", zeroWidthAtEnd) let localBindingBuilder = (fun xmlDoc attrs vis mLetKwd -> - let spBind = DebugPointAtBinding.Yes (unionRanges mLetKwd mRhs) - let eqm = rhs parseState 5 - let zeroWidthAtEnd = eqm.EndRange - (bindingBuilder xmlDoc) (vis, $1, $2, mBindLhs, spBind, optReturnType, Some eqm, arbExpr("localBinding1", zeroWidthAtEnd), mRhs, [], attrs, None)) + let spBind = if IsDebugPointBinding bindingPat rhsExpr then DebugPointAtBinding.Yes mWhole else DebugPointAtBinding.NoneAtLet + mkSynBinding (xmlDoc, bindingPat) (vis, $1, $2, mBindLhs, spBind, optReturnType, Some mEquals, rhsExpr, mRhs, [], attrs, None)) mWhole, localBindingBuilder } | opt_inline opt_mutable bindingPattern opt_topReturnTypeWithTypeConstraints recover @@ -2917,11 +2917,11 @@ localBinding: let optReturnType = $4 let mWhole = rhs2 parseState 1 (match optReturnType with None -> 3 | _ -> 4) let mRhs = mWhole.EndRange // zero-width range at end of last good token - let bindingBuilder, mBindLhs = $3 + let bindingPat, mBindLhs = $3 let localBindingBuilder = (fun xmlDoc attrs vis mLetKwd -> let spBind = DebugPointAtBinding.Yes (unionRanges mLetKwd mRhs) - (bindingBuilder xmlDoc) (vis, $1, $2, mBindLhs, spBind, optReturnType, None, arbExpr("localBinding2", mRhs), mRhs, [], attrs, None)) + mkSynBinding (xmlDoc, bindingPat) (vis, $1, $2, mBindLhs, spBind, optReturnType, None, arbExpr("localBinding2", mRhs), mRhs, [], attrs, None)) mWhole, localBindingBuilder } @@ -3073,7 +3073,7 @@ constant: bindingPattern: | headBindingPattern - { (fun (xmlDoc: PreXmlDoc) -> mkSynBinding (xmlDoc, $1)), rhs parseState 1 } + { $1, rhs parseState 1 } // Subset of patterns allowed to be used in implicit ctors. // For a better error recovery we could replace these rules with the actual SynPat parsing @@ -3672,96 +3672,102 @@ declExpr: exprFromParseError (SynExpr.While (spWhile, arbExpr("whileGuard1", mWhileHeader), arbExpr("whileBody3", mWhileBodyArb), mWhileAll)) } | FOR forLoopBinder doToken typedSequentialExprBlock doneDeclEnd - { let mForLoopHeader = rhs2 parseState 1 3 - let spBind = DebugPointAtFor.Yes mForLoopHeader - let (a, b, _) = $2 - SynExpr.ForEach (spBind, SeqExprOnly false, true, a, b, $4, unionRanges (rhs parseState 1) $4.Range) } + { let mFor = rhs parseState 1 + let mDo = rhs parseState 3 + let spFor = DebugPointAtFor.Yes mFor + let (a, b, _, spIn) = $2 + SynExpr.ForEach (spFor, spIn, SeqExprOnly false, true, a, b, $4, unionRanges (rhs parseState 1) $4.Range) } | FOR forLoopBinder doToken typedSequentialExprBlock ends_coming_soon_or_recover { if not $5 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileFor()) - let mForLoopHeader = rhs2 parseState 1 3 - let spBind = DebugPointAtFor.Yes mForLoopHeader - let (a, b, _) = $2 + let mFor = rhs parseState 1 + let spFor = DebugPointAtFor.Yes mFor + let (a, b, _, spIn) = $2 let mForLoopAll = unionRanges (rhs parseState 1) $4.Range - SynExpr.ForEach (spBind, SeqExprOnly false, true, a, b, $4, mForLoopAll) } + SynExpr.ForEach (spFor, spIn, SeqExprOnly false, true, a, b, $4, mForLoopAll) } | FOR forLoopBinder doToken error doneDeclEnd { // Silent recovery - let mForLoopHeader = rhs2 parseState 1 3 - let spBind = DebugPointAtFor.Yes mForLoopHeader - let (a, b, _) = $2 + let mFor = rhs parseState 1 + let spFor = DebugPointAtFor.Yes mFor + let (a, b, _, spIn) = $2 let mForLoopBodyArb = rhs parseState 5 let mForLoopAll = rhs2 parseState 1 5 - SynExpr.ForEach (spBind, SeqExprOnly false, true, a, b, arbExpr("forLoopBody2a", mForLoopBodyArb), mForLoopAll) } + SynExpr.ForEach (spFor, spIn, SeqExprOnly false, true, a, b, arbExpr("forLoopBody2a", mForLoopBodyArb), mForLoopAll) } | FOR forLoopBinder doToken ends_coming_soon_or_recover { if not $4 then reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsExpectedExpressionAfterToken()) - let mForLoopHeader = rhs2 parseState 1 3 - let spBind = DebugPointAtFor.Yes mForLoopHeader - let (a, b, _) = $2 + let mFor = rhs parseState 1 + let spFor = DebugPointAtFor.Yes mFor + let (a, b, _, spIn) = $2 let mForLoopBodyArb = rhs parseState 3 let mForLoopAll = rhs2 parseState 1 3 - SynExpr.ForEach (spBind, SeqExprOnly false, true, a, b, arbExpr("forLoopBody2", mForLoopBodyArb), mForLoopAll) } + SynExpr.ForEach (spFor, spIn, SeqExprOnly false, true, a, b, arbExpr("forLoopBody2", mForLoopBodyArb), mForLoopAll) } | FOR forLoopBinder ends_coming_soon_or_recover - { let (a, b, ok) = $2 + { let (a, b, ok, spIn) = $2 if not $3 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsForDoExpected()) - let mForLoopHeader = rhs2 parseState 1 3 - let spBind = DebugPointAtFor.Yes mForLoopHeader + let mFor = rhs parseState 1 + let spFor = DebugPointAtFor.Yes mFor let mForLoopBodyArb = rhs parseState 3 let mForLoopAll = rhs2 parseState 1 3 - SynExpr.ForEach (spBind, SeqExprOnly false, true, a, b, arbExpr("forLoopBody1", mForLoopBodyArb), mForLoopAll) } + SynExpr.ForEach (spFor, spIn, SeqExprOnly false, true, a, b, arbExpr("forLoopBody1", mForLoopBodyArb), mForLoopAll) } + + | FOR forLoopBinder opt_OBLOCKSEP arrowThenExprR %prec expr_let + { let spFor = DebugPointAtFor.Yes (rhs parseState 1) + let (a, b, _, spIn) = $2 + SynExpr.ForEach (spFor, spIn, SeqExprOnly true, true, a, b, $4, unionRanges (rhs parseState 1) $4.Range) } | FOR forLoopRange doToken typedSequentialExprBlock doneDeclEnd - { let mForLoopHeader = rhs2 parseState 1 3 - let spBind = DebugPointAtFor.Yes mForLoopHeader - let (a, b, c, d, e) = $2 + { let mFor = rhs parseState 1 + let spFor = DebugPointAtFor.Yes mFor + let (a, b, c, d, e, spTo) = $2 let mForLoopAll = unionRanges (rhs parseState 1) $4.Range - SynExpr.For (spBind, a, b, c, d, e, $4, mForLoopAll) } + SynExpr.For (spFor, spTo, a, b, c, d, e, $4, mForLoopAll) } | FOR forLoopRange doToken typedSequentialExprBlock recover { if not $5 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileFor()) // Still produce an expression - let mForLoopHeader = rhs2 parseState 1 3 - let spBind = DebugPointAtFor.Yes mForLoopHeader - let (a, b, c, d, e) = $2 + let mFor = rhs parseState 1 + let spFor = DebugPointAtFor.Yes mFor + let (a, b, c, d, e, spTo) = $2 let mForLoopAll = unionRanges (rhs parseState 1) $4.Range - exprFromParseError (SynExpr.For (spBind, a, b, c, d, e, $4, mForLoopAll)) } + exprFromParseError (SynExpr.For (spFor, spTo, a, b, c, d, e, $4, mForLoopAll)) } | FOR forLoopRange doToken error doneDeclEnd { // silent recovery - let mForLoopHeader = rhs2 parseState 1 3 - let spBind = DebugPointAtFor.Yes mForLoopHeader - let (a, b, c, d, e) = $2 + let mFor = rhs parseState 1 + let spFor = DebugPointAtFor.Yes mFor + let (a, b, c, d, e, spTo) = $2 let mForLoopBodyArb = rhs parseState 5 let mForLoopAll = rhs2 parseState 1 5 - SynExpr.For (spBind, a, b, c, d, e, arbExpr("declExpr11", mForLoopBodyArb), mForLoopAll) } + SynExpr.For (spFor, spTo, a, b, c, d, e, arbExpr("declExpr11", mForLoopBodyArb), mForLoopAll) } | FOR forLoopRange doToken recover { if not $4 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileFor()) - let mForLoopHeader = rhs2 parseState 1 3 - let spBind = DebugPointAtFor.Yes mForLoopHeader - let (a, b, c, d, e) = $2 + let mFor = rhs parseState 1 + let spFor = DebugPointAtFor.Yes mFor + let (a, b, c, d, e, spTo) = $2 let mForLoopBodyArb = rhs parseState 3 let mForLoopAll = rhs2 parseState 1 3 - exprFromParseError (SynExpr.For (spBind, a, b, c, d, e, arbExpr("declExpr11", mForLoopBodyArb), mForLoopAll)) } + exprFromParseError (SynExpr.For (spFor, spTo, a, b, c, d, e, arbExpr("declExpr11", mForLoopBodyArb), mForLoopAll)) } | FOR forLoopRange recover { if not $3 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileFor()) - let mForLoopHeader = rhs2 parseState 1 2 - let spBind = DebugPointAtFor.Yes mForLoopHeader - let (a, b, c, d, e) = $2 + let mFor = rhs parseState 1 + let spFor = DebugPointAtFor.Yes mFor + let (a, b, c, d, e, spTo) = $2 let mForLoopBodyArb = (rhs parseState 2).EndRange let mForLoopAll = rhs2 parseState 1 2 - exprFromParseError (SynExpr.For (spBind, a, b, c, d, e, arbExpr("declExpr11", mForLoopBodyArb), mForLoopAll)) } - + exprFromParseError (SynExpr.For (spFor, spTo, a, b, c, d, e, arbExpr("declExpr11", mForLoopBodyArb), mForLoopAll)) } | FOR error doToken typedSequentialExprBlock doneDeclEnd { // silent recovery - let mForLoopHeader = rhs2 parseState 1 2 + let mFor = rhs parseState 1 + let spToFake = DebugPointAtInOrTo.Yes mFor let mForLoopAll = unionRanges (rhs parseState 1) $4.Range - let spBind = DebugPointAtFor.Yes mForLoopHeader - SynExpr.For (spBind, mkSynId mForLoopHeader "_loopVar", None, arbExpr("startLoopRange1", mForLoopHeader), true, arbExpr("endLoopRange1", rhs parseState 3), $4, mForLoopAll) } + let spFor = DebugPointAtFor.Yes mFor + SynExpr.For (spFor, spToFake, mkSynId mFor "_loopVar", None, arbExpr("startLoopRange1", mFor), true, arbExpr("endLoopRange1", rhs parseState 3), $4, mForLoopAll) } | FOR ends_coming_soon_or_recover { reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsIdentifierExpected()) @@ -3769,19 +3775,22 @@ declExpr: | FOR parenPattern error doneDeclEnd { reportParseErrorAt (rhs parseState 3) (FSComp.SR.parsInOrEqualExpected()) - let mForLoopHeader = rhs2 parseState 1 2 - let spBind = DebugPointAtFor.Yes mForLoopHeader + let mFor = rhs parseState 1 + let spFor = DebugPointAtFor.Yes mFor + let spInFake = DebugPointAtInOrTo.Yes mFor let mForLoopBodyArb = rhs parseState 4 let mForLoopAll = rhs2 parseState 1 4 - SynExpr.ForEach (spBind, SeqExprOnly false, true, $2, arbExpr("forLoopCollection", mForLoopHeader), arbExpr("forLoopBody3", mForLoopBodyArb), mForLoopAll) } + SynExpr.ForEach (spFor, spInFake, SeqExprOnly false, true, $2, arbExpr("forLoopCollection", mFor), arbExpr("forLoopBody3", mForLoopBodyArb), mForLoopAll) } | FOR parenPattern recover { if not $3 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsUnexpectedEndOfFileFor()) - let mForLoopHeader = rhs2 parseState 1 2 - let spBind = DebugPointAtFor.Yes mForLoopHeader + let mFor = rhs parseState 1 + let mIn = rhs parseState 1 + let spFor = DebugPointAtFor.Yes mFor + let spIn = DebugPointAtInOrTo.Yes mIn let mForLoopBodyArb = (rhs parseState 2).EndRange let mForLoopAll = rhs2 parseState 1 2 - exprFromParseError (SynExpr.ForEach (spBind, SeqExprOnly false, true, $2, arbExpr("forLoopCollection", mForLoopHeader), arbExpr("forLoopBody3", mForLoopBodyArb), mForLoopAll)) } + exprFromParseError (SynExpr.ForEach (spFor, spIn, SeqExprOnly false, true, $2, arbExpr("forLoopCollection", mFor), arbExpr("forLoopBody3", mForLoopBodyArb), mForLoopAll)) } | YIELD declExpr { SynExpr.YieldOrReturn (($1, not $1), $2, unionRanges (rhs parseState 1) $2.Range) } @@ -3819,16 +3828,12 @@ declExpr: SynExpr.LetOrUseBang(spBind, ($1 = "use"), true, $2, Some mEquals, $4, [], SynExpr.ImplicitZero m, mAll) } | DO_BANG typedSequentialExpr IN opt_OBLOCKSEP typedSequentialExprBlock %prec expr_let - { let spBind = DebugPointAtBinding.NoneAtDo + { let spBind = DebugPointAtBinding.ImplicitAtDo SynExpr.LetOrUseBang(spBind, false, true, SynPat.Const(SynConst.Unit, $2.Range), None, $2, [], $5, unionRanges (rhs parseState 1) $5.Range) } | ODO_BANG typedSequentialExprBlock hardwhiteDefnBindingsTerminator %prec expr_let { SynExpr.DoBang ($2, unionRanges (rhs parseState 1) $2.Range) } - | FOR forLoopBinder opt_OBLOCKSEP arrowThenExprR %prec expr_let - { let spBind = DebugPointAtFor.Yes (rhs2 parseState 1 2) - let (a, b, _) = $2 in SynExpr.ForEach (spBind, SeqExprOnly true, true, a, b, $4, unionRanges (rhs parseState 1) $4.Range) } - | FIXED declExpr { SynExpr.Fixed ($2, (unionRanges (rhs parseState 1) $2.Range)) } @@ -4601,20 +4606,21 @@ arrowThenExprR: forLoopBinder: | parenPattern IN declExpr - { ($1, $3, true) } + { ($1, $3, true, DebugPointAtInOrTo.Yes (rhs parseState 2)) } | parenPattern IN ends_coming_soon_or_recover { if not $3 then reportParseErrorAt (rhs parseState 2) (FSComp.SR.parsExpectedExpressionAfterToken()) - ($1, arbExpr("forLoopBinder", (rhs parseState 2)), false) } + ($1, arbExpr("forLoopBinder", (rhs parseState 2)), false, DebugPointAtInOrTo.Yes (rhs parseState 2)) } | parenPattern ends_coming_soon_or_recover { if not $2 then reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsInOrEqualExpected()) - ($1, arbExpr("forLoopBinder2", (rhs parseState 1).EndRange), false) } + ($1, arbExpr("forLoopBinder2", (rhs parseState 1).EndRange), false, DebugPointAtInOrTo.Yes (rhs parseState 2)) } forLoopRange: | parenPattern EQUALS declExpr forLoopDirection declExpr { let mEquals = rhs parseState 2 - idOfPat parseState (rhs parseState 1) $1, Some mEquals, $3, $4, $5 } + let spTo = DebugPointAtInOrTo.Yes (rhs parseState 4) + idOfPat parseState (rhs parseState 1) $1, Some mEquals, $3, $4, $5, spTo } forLoopDirection: | TO { true } diff --git a/src/fsharp/range.fs b/src/fsharp/range.fs index b9d43ee376b..06add92032e 100755 --- a/src/fsharp/range.fs +++ b/src/fsharp/range.fs @@ -62,13 +62,16 @@ type Position(code:int64) = and pos = Position [] -type RangeDebugPointKind = +type NotedSourceConstruct = | None | While | For + | InOrTo | Try | Binding | Finally + | With + | Combine [] module RangeImpl = @@ -91,7 +94,7 @@ module RangeImpl = let isSyntheticBitCount = 1 [] - let debugPointKindBitCount = 3 + let debugPointKindBitCount = 4 [] let fileIndexShift = 0 @@ -133,7 +136,7 @@ module RangeImpl = let isSyntheticMask = 0b0000010000000000000000000000000000000000000000000000000000000000L [] - let debugPointKindMask= 0b0011100000000000000000000000000000000000000000000000000000000000L + let debugPointKindMask= 0b0111100000000000000000000000000000000000000000000000000000000000L #if DEBUG let _ = assert (posBitCount <= 64) @@ -242,82 +245,98 @@ type Range(code1:int64, code2: int64) = new (fIdx, b:pos, e:pos) = range(fIdx, b.Line, b.Column, e.Line, e.Column) - member r.StartLine = int32((code2 &&& startLineMask) >>> startLineShift) + member _.StartLine = int32((code2 &&& startLineMask) >>> startLineShift) - member r.StartColumn = int32((code1 &&& startColumnMask) >>> startColumnShift) + member _.StartColumn = int32((code1 &&& startColumnMask) >>> startColumnShift) - member r.EndLine = int32((code2 &&& heightMask) >>> heightShift) + r.StartLine + member m.EndLine = int32((code2 &&& heightMask) >>> heightShift) + m.StartLine - member r.EndColumn = int32((code1 &&& endColumnMask) >>> endColumnShift) + member _.EndColumn = int32((code1 &&& endColumnMask) >>> endColumnShift) - member r.IsSynthetic = int32((code2 &&& isSyntheticMask) >>> isSyntheticShift) <> 0 + member _.IsSynthetic = int32((code2 &&& isSyntheticMask) >>> isSyntheticShift) <> 0 - member r.DebugPointKind = + member _.NotedSourceConstruct = match int32((code2 &&& debugPointKindMask) >>> debugPointKindShift) with - | 1 -> RangeDebugPointKind.While - | 2 -> RangeDebugPointKind.For - | 3 -> RangeDebugPointKind.Try - | 4 -> RangeDebugPointKind.Finally - | 5 -> RangeDebugPointKind.Binding - | _ -> RangeDebugPointKind.None + | 1 -> NotedSourceConstruct.While + | 2 -> NotedSourceConstruct.For + | 3 -> NotedSourceConstruct.Try + | 4 -> NotedSourceConstruct.Finally + | 5 -> NotedSourceConstruct.Binding + | 6 -> NotedSourceConstruct.InOrTo + | 7 -> NotedSourceConstruct.With + | 8 -> NotedSourceConstruct.Combine + | _ -> NotedSourceConstruct.None - member r.Start = pos (r.StartLine, r.StartColumn) + member m.Start = pos (m.StartLine, m.StartColumn) - member r.End = pos (r.EndLine, r.EndColumn) + member m.End = pos (m.EndLine, m.EndColumn) - member r.FileIndex = int32(code1 &&& fileIndexMask) + member _.FileIndex = int32(code1 &&& fileIndexMask) member m.StartRange = range (m.FileIndex, m.Start, m.Start) member m.EndRange = range (m.FileIndex, m.End, m.End) - member r.FileName = fileOfFileIndex r.FileIndex + member m.FileName = fileOfFileIndex m.FileIndex - member r.ShortFileName = Path.GetFileName(fileOfFileIndex r.FileIndex) + member m.ShortFileName = Path.GetFileName(fileOfFileIndex m.FileIndex) - member r.MakeSynthetic() = range(code1, code2 ||| isSyntheticMask) + member _.MakeSynthetic() = range(code1, code2 ||| isSyntheticMask) - member r.IsAdjacentTo(otherRange: Range) = - r.FileIndex = otherRange.FileIndex && r.End.Encoding = otherRange.Start.Encoding + member m.IsAdjacentTo(otherRange: Range) = + m.FileIndex = otherRange.FileIndex && m.End.Encoding = otherRange.Start.Encoding - member r.NoteDebugPoint(kind) = + member _.NoteSourceConstruct(kind) = let code = match kind with - | RangeDebugPointKind.None -> 0 - | RangeDebugPointKind.While -> 1 - | RangeDebugPointKind.For -> 2 - | RangeDebugPointKind.Try -> 3 - | RangeDebugPointKind.Finally -> 4 - | RangeDebugPointKind.Binding -> 5 - range(code1, code2 ||| (int64 code <<< debugPointKindShift)) - - member r.Code1 = code1 - - member r.Code2 = code2 - - member r.DebugCode = - let name = r.FileName + | NotedSourceConstruct.None -> 0 + | NotedSourceConstruct.While -> 1 + | NotedSourceConstruct.For -> 2 + | NotedSourceConstruct.Try -> 3 + | NotedSourceConstruct.Finally -> 4 + | NotedSourceConstruct.Binding -> 5 + | NotedSourceConstruct.InOrTo -> 6 + | NotedSourceConstruct.With -> 7 + | NotedSourceConstruct.Combine -> 8 + range(code1, (code2 &&& ~~~debugPointKindMask) ||| (int64 code <<< debugPointKindShift)) + + member _.Code1 = code1 + + member _.Code2 = code2 + + member m.DebugCode = + let name = m.FileName if name = unknownFileName || name = startupFileName || name = commandLineArgsFileName then name else try - let endCol = r.EndColumn - 1 - let startCol = r.StartColumn - 1 - if FileSystem.IsInvalidPathShim r.FileName then "path invalid: " + r.FileName - elif not (FileSystem.FileExistsShim r.FileName) then "non existing file: " + r.FileName + let endCol = m.EndColumn - 1 + let startCol = m.StartColumn - 1 + if FileSystem.IsInvalidPathShim m.FileName then "path invalid: " + m.FileName + elif not (FileSystem.FileExistsShim m.FileName) then "non existing file: " + m.FileName else - FileSystem.OpenFileForReadShim(r.FileName).ReadLines() - |> Seq.skip (r.StartLine - 1) - |> Seq.take (r.EndLine - r.StartLine + 1) + FileSystem.OpenFileForReadShim(m.FileName).ReadLines() + |> Seq.skip (m.StartLine - 1) + |> Seq.take (m.EndLine - m.StartLine + 1) |> String.concat "\n" |> fun s -> s.Substring(startCol + 1, s.LastIndexOf("\n", StringComparison.Ordinal) + 1 - startCol + endCol) with e -> e.ToString() - member r.ToShortString() = sprintf "(%d,%d--%d,%d)" r.StartLine r.StartColumn r.EndLine r.EndColumn + member m.ToShortString() = sprintf "(%d,%d--%d,%d)" m.StartLine m.StartColumn m.EndLine m.EndColumn + + member _.Equals(m2: range) = + let code2 = code2 &&& ~~~(debugPointKindMask ||| isSyntheticMask) + let rcode2 = m2.Code2 &&& ~~~(debugPointKindMask ||| isSyntheticMask) + code1 = m2.Code1 && code2 = rcode2 - override r.Equals(obj) = match obj with :? range as r2 -> code1 = r2.Code1 && code2 = r2.Code2 | _ -> false + override m.Equals(obj) = + match obj with + | :? range as m2 -> m.Equals(m2) + | _ -> false - override r.GetHashCode() = hash code1 + hash code2 + override _.GetHashCode() = + let code2 = code2 &&& ~~~(debugPointKindMask ||| isSyntheticMask) + hash code1 + hash code2 override r.ToString() = sprintf "%s (%d,%d--%d,%d)" r.FileName r.StartLine r.StartColumn r.EndLine r.EndColumn @@ -373,14 +392,13 @@ module Range = let mkRange filePath startPos endPos = range (fileIndexOfFileAux true filePath, startPos, endPos) let equals (r1: range) (r2: range) = - r1.Code1 = r2.Code1 && r1.Code2 = r2.Code2 + r1.Equals(r2) let mkFileIndexRange fileIndex startPos endPos = range (fileIndex, startPos, endPos) let posOrder = Order.orderOn (fun (p:pos) -> p.Line, p.Column) (Pair.order (Int32.order, Int32.order)) - /// rangeOrder: not a total order, but enough to sort on ranges - let rangeOrder = Order.orderOn (fun (r:range) -> r.FileName, r.Start) (Pair.order (String.order, posOrder)) + let rangeOrder = Order.orderOn (fun (r:range) -> r.FileName, (r.Start, r.End)) (Pair.order (String.order, Pair.order(posOrder, posOrder))) let outputRange (os:TextWriter) (m:range) = fprintf os "%s%a-%a" m.FileName outputPos m.Start outputPos m.End @@ -388,7 +406,7 @@ module Range = let unionRanges (m1:range) (m2:range) = if m1.FileIndex <> m2.FileIndex then m2 else - // If all identical then return m1. This preserves DebugPointKind when no merging takes place + // If all identical then return m1. This preserves NotedSourceConstruct when no merging takes place if m1.Code1 = m2.Code1 && m1.Code2 = m2.Code2 then m1 else let b = diff --git a/src/fsharp/range.fsi b/src/fsharp/range.fsi index 8913f498b07..a9715be1ce8 100755 --- a/src/fsharp/range.fsi +++ b/src/fsharp/range.fsi @@ -9,13 +9,27 @@ open System.Collections.Generic type internal FileIndex = int32 [] -type internal RangeDebugPointKind = +type internal NotedSourceConstruct = | None + /// Notes that a range is related to a "while" in "while .. do" in a computation, list, array or sequence expression | While + /// Notes that a range is related to a "for" in "for .. do" in a computation, list, array or sequence expression | For + /// Notes that a range is related to a "in" in a "for .. in ... do" or "to" in "for .. = .. to .. do" in a computation, list, array or sequence expression + | InOrTo + /// Notes that a range is related to a "try" in a "try/with" in a computation, list, array or sequence expression | Try + /// Notes that a range is related to a "let" or other binding range in a computation, list, array or sequence expression | Binding + /// Notes that a range is related to a "finally" in a "try/finally" in a computation, list, array or sequence expression | Finally + /// Notes that a range is related to a "with" in a "try/with" in a computation, list, array or sequence expression + | With + /// Notes that a range is related to a sequential "a; b" translated to a "Combine" call in a computation expression + /// + /// This doesn't include "expr; cexpr" sequentials where the "expr" is a side-effecting simple statement + /// This does include "expr; cexpr" sequentials where the "expr" is interpreted as an implicit yield + Combine call + | Combine /// Represents a position in a file [] @@ -81,15 +95,15 @@ type Range = /// service operations like dot-completion. member IsSynthetic: bool - /// When de-sugaring computation expressions we convert a debug point into a plain range, and then later - /// recover that the range definitely indicates a debug point. - member internal DebugPointKind: RangeDebugPointKind - /// Convert a range to be synthetic member internal MakeSynthetic: unit -> range + /// When de-sugaring computation expressions we convert a debug point into a plain range, and then later + /// recover that the range definitely indicates a debug point. + member internal NotedSourceConstruct: NotedSourceConstruct + /// Note that a range indicates a debug point - member internal NoteDebugPoint: kind: RangeDebugPointKind -> range + member internal NoteSourceConstruct: kind: NotedSourceConstruct -> range /// Check if the range is adjacent to another range member internal IsAdjacentTo: otherRange: Range -> bool @@ -180,7 +194,7 @@ module Range = /// Reduce a range so it only covers a line val trimRangeToLine: range -> range - /// not a total order, but enough to sort on ranges + /// Order ranges (file, then start pos, then end pos) val rangeOrder: IComparer /// Output a range diff --git a/src/fsharp/service/FSharpCheckerResults.fs b/src/fsharp/service/FSharpCheckerResults.fs index 7ce8f5d7e62..e6549c71d9c 100644 --- a/src/fsharp/service/FSharpCheckerResults.fs +++ b/src/fsharp/service/FSharpCheckerResults.fs @@ -2102,7 +2102,7 @@ type FSharpCheckFileResults |> Option.map (fun implFile -> let denv = DisplayEnv.InitialForSigFileGeneration scope.TcGlobals let infoReader = InfoReader(scope.TcGlobals, scope.TcImports.GetImportMap()) - let (TImplFile (_, _, mexpr, _, _, _)) = implFile + let (TImplFile (implExprWithSig=mexpr)) = implFile let ad = match scopeOptX with | Some scope -> scope.AccessRights diff --git a/src/fsharp/service/FSharpParseFileResults.fs b/src/fsharp/service/FSharpParseFileResults.fs index 03a08836d04..7a2d38d69e3 100644 --- a/src/fsharp/service/FSharpParseFileResults.fs +++ b/src/fsharp/service/FSharpParseFileResults.fs @@ -436,22 +436,15 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, 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 walkInOrToSeqPt sp = [ match sp with DebugPointAtInOrTo.Yes m -> yield! checkRange m | _ -> () ] let walkWhileSeqPt sp = [ match sp with DebugPointAtWhile.Yes m -> yield! checkRange m | _ -> () ] let walkTrySeqPt sp = [ match sp with DebugPointAtTry.Yes m -> yield! checkRange m | _ -> () ] let walkWithSeqPt sp = [ match sp with DebugPointAtWith.Yes m -> yield! checkRange m | _ -> () ] let walkFinallySeqPt sp = [ match sp with DebugPointAtFinally.Yes m -> yield! checkRange m | _ -> () ] - let rec walkBind (SynBinding(valData=SynValData(memFlagsOpt, _, _); headPat=synPat; expr=synExpr; debugPoint=spInfo)) = - [ // Don't yield the binding sequence point if there are any arguments, i.e. we're defining a function or a method - let isFunction = - Option.isSome memFlagsOpt || - match synPat with - | SynPat.LongIdent (argPats=SynArgPats.Pats args) when not (List.isEmpty args) -> true - | _ -> false - if not isFunction then - yield! walkBindSeqPt spInfo - - yield! walkExpr (isFunction || (match spInfo with DebugPointAtBinding.Yes _ -> false | _-> true)) synExpr ] + let rec walkBind (SynBinding(expr=synExpr; debugPoint=spInfo)) = + [ yield! walkBindSeqPt spInfo + yield! walkExpr (match spInfo with DebugPointAtBinding.Yes _ -> false | _-> true) synExpr ] and walkExprs es = List.collect (walkExpr false) es @@ -464,24 +457,15 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, | _ -> () yield! walkExpr true tgtExpr ] - and walkExprOpt (spAlways: bool) eOpt = - [ match eOpt with Some e -> yield! walkExpr spAlways e | _ -> () ] + and walkExprOpt (spImplicit: bool) eOpt = + [ match eOpt with Some e -> yield! walkExpr spImplicit e | _ -> () ] - and IsBreakableExpression e = - match e with - | SynExpr.Match _ - | SynExpr.IfThenElse _ - | SynExpr.For _ - | SynExpr.ForEach _ - | SynExpr.While _ -> true - | _ -> not (IsControlFlowExpression e) - - // Determine the breakpoint locations for an expression. spAlways indicates we always + // Determine the breakpoint locations for an expression. spImplicit indicates we always // emit a breakpoint location for the expression unless it is a syntactic control flow construct - and walkExpr (spAlways: bool) expr = + and walkExpr (spImplicit: bool) expr = let m = expr.Range if not (isMatchRange m) then [] else - [ if spAlways && IsBreakableExpression expr then + [ if spImplicit && not (IsControlFlowExpression expr) then yield! checkRange m match expr with @@ -526,9 +510,18 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, | SynInterpolatedStringPart.String _ -> () | SynInterpolatedStringPart.FillExpr (fillExpr, _) -> yield fillExpr ] + | SynExpr.DebugPoint (dpOpt, innerExpr) -> + match dpOpt with + | Some (DebugPointAtLeafExpr.Yes m, isExpr) -> + yield! checkRange m + yield! walkExpr (not isExpr) innerExpr + | None -> + yield! walkExpr true innerExpr + | SynExpr.YieldOrReturn (_, e, m) -> yield! checkRange m yield! walkExpr false e + | SynExpr.YieldOrReturnFrom (_, e, _) | SynExpr.DoBang (e, _) -> yield! checkRange e.Range @@ -604,14 +597,17 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, yield! walkExpr false e1 yield! walkExpr false e2 - | SynExpr.For (forDebugPoint=spFor; identBody=e1; toBody=e2; doBody=e3) -> + | SynExpr.For (forDebugPoint=spFor; toDebugPoint=spTo; identBody=e1; toBody=e2; doBody=e3) -> yield! walkForSeqPt spFor + yield! walkInOrToSeqPt spTo yield! walkExpr false e1 yield! walkExpr true e2 yield! walkExpr true e3 - | SynExpr.ForEach (spFor, _, _, _, e1, e2, _) -> + | SynExpr.ForEach (spFor, spIn, _, _, _, e1, e2, _) -> yield! walkForSeqPt spFor + yield! walkInOrToSeqPt spIn + yield! walkBindSeqPt (DebugPointAtBinding.Yes e1.Range) yield! walkExpr false e1 yield! walkExpr true e2 diff --git a/src/fsharp/service/ServiceInterfaceStubGenerator.fs b/src/fsharp/service/ServiceInterfaceStubGenerator.fs index ddb8f35c791..622dd9ddaf8 100644 --- a/src/fsharp/service/ServiceInterfaceStubGenerator.fs +++ b/src/fsharp/service/ServiceInterfaceStubGenerator.fs @@ -790,9 +790,10 @@ module InterfaceStubGenerator = // Ignore object expressions of normal objects None - | SynExpr.While (_sequencePointInfoForWhileLoop, synExpr1, synExpr2, _range) -> + | SynExpr.While (_spWhile, synExpr1, synExpr2, _range) -> List.tryPick walkExpr [synExpr1; synExpr2] - | SynExpr.ForEach (_sequencePointInfoForForLoop, _seqExprOnly, _isFromSource, _synPat, synExpr1, synExpr2, _range) -> + + | SynExpr.ForEach (_spFor, _spIn, _seqExprOnly, _isFromSource, _synPat, synExpr1, synExpr2, _range) -> List.tryPick walkExpr [synExpr1; synExpr2] | SynExpr.For (identBody=synExpr1; toBody=synExpr2; doBody=synExpr3) -> @@ -800,21 +801,26 @@ module InterfaceStubGenerator = | SynExpr.ArrayOrListComputed (_, synExpr, _range) -> walkExpr synExpr + | SynExpr.ComputationExpr (_, synExpr, _range) -> walkExpr synExpr + | SynExpr.Lambda (_, _, _synSimplePats, _, synExpr, _, _range) -> walkExpr synExpr | SynExpr.MatchLambda (_isExnMatch, _argm, synMatchClauseList, _spBind, _wholem) -> synMatchClauseList |> List.tryPick (fun (SynMatchClause(resultExpr = e)) -> walkExpr e) + | SynExpr.Match (expr=synExpr; clauses=synMatchClauseList) -> walkExpr synExpr |> Option.orElse (synMatchClauseList |> List.tryPick (fun (SynMatchClause(resultExpr = e)) -> walkExpr e)) | SynExpr.Lazy (synExpr, _range) -> walkExpr synExpr + | SynExpr.Do (synExpr, _range) -> walkExpr synExpr + | SynExpr.Assert (synExpr, _range) -> walkExpr synExpr diff --git a/src/fsharp/service/ServiceParseTreeWalk.fs b/src/fsharp/service/ServiceParseTreeWalk.fs index 4058855f654..4028834830e 100755 --- a/src/fsharp/service/ServiceParseTreeWalk.fs +++ b/src/fsharp/service/ServiceParseTreeWalk.fs @@ -406,7 +406,7 @@ module SyntaxTraversal = yield dive b b.RangeOfBindingWithRhs (traverseSynBinding path) ] |> pick expr - | SynExpr.While (_sequencePointInfoForWhileLoop, synExpr, synExpr2, _range) -> + | SynExpr.While (_spWhile, synExpr, synExpr2, _range) -> [dive synExpr synExpr.Range traverseSynExpr dive synExpr2 synExpr2.Range traverseSynExpr] |> pick expr @@ -417,7 +417,7 @@ module SyntaxTraversal = dive synExpr3 synExpr3.Range traverseSynExpr] |> pick expr - | SynExpr.ForEach (_sequencePointInfoForForLoop, _seqExprOnly, _isFromSource, synPat, synExpr, synExpr2, _range) -> + | SynExpr.ForEach (_spFor, _spIn, _seqExprOnly, _isFromSource, synPat, synExpr, synExpr2, _range) -> [dive synPat synPat.Range traversePat dive synExpr synExpr.Range traverseSynExpr dive synExpr2 synExpr2.Range traverseSynExpr] @@ -467,6 +467,8 @@ module SyntaxTraversal = | SynExpr.Fixed (synExpr, _range) -> traverseSynExpr synExpr + | SynExpr.DebugPoint (_, synExpr) -> traverseSynExpr synExpr + | SynExpr.App (_exprAtomicFlag, isInfix, synExpr, synExpr2, _range) -> if isInfix then [dive synExpr2 synExpr2.Range traverseSynExpr diff --git a/src/fsharp/service/ServiceParsedInputOps.fs b/src/fsharp/service/ServiceParsedInputOps.fs index f91b01418f6..fee2aa0cdd4 100644 --- a/src/fsharp/service/ServiceParsedInputOps.fs +++ b/src/fsharp/service/ServiceParsedInputOps.fs @@ -573,7 +573,7 @@ module ParsedInput = |> Option.orElseWith (fun () -> List.tryPick walkInterfaceImpl ifaces) | SynExpr.While (_, e1, e2, _) -> List.tryPick (walkExprWithKind parentKind) [e1; e2] | SynExpr.For (identBody=e1; toBody=e2; doBody=e3) -> List.tryPick (walkExprWithKind parentKind) [e1; e2; e3] - | SynExpr.ForEach (_, _, _, _, e1, e2, _) -> List.tryPick (walkExprWithKind parentKind) [e1; e2] + | SynExpr.ForEach (_, _, _, _, _, e1, e2, _) -> List.tryPick (walkExprWithKind parentKind) [e1; e2] | SynExpr.ArrayOrListComputed (_, e, _) -> walkExprWithKind parentKind e | SynExpr.ComputationExpr (_, e, _) -> walkExprWithKind parentKind e | SynExpr.Lambda (body = e) -> walkExprWithKind parentKind e @@ -1348,7 +1348,7 @@ module ParsedInput = | SynExpr.For (ident=ident; identBody=e1; toBody=e2; doBody=e3) -> addIdent ident List.iter walkExpr [e1; e2; e3] - | SynExpr.ForEach (_, _, _, pat, e1, e2, _) -> + | SynExpr.ForEach (_, _, _, _, pat, e1, e2, _) -> walkPat pat List.iter walkExpr [e1; e2] | SynExpr.MatchLambda (_, _, synMatchClauseList, _, _) -> diff --git a/src/fsharp/service/ServiceStructure.fs b/src/fsharp/service/ServiceStructure.fs index 01e423d2a9c..010d7e834fd 100644 --- a/src/fsharp/service/ServiceStructure.fs +++ b/src/fsharp/service/ServiceStructure.fs @@ -264,7 +264,7 @@ module Structure = ) parseExpr eBody | SynExpr.For (doBody=e; range=r) - | SynExpr.ForEach (_, _, _, _, _, e, r) -> + | SynExpr.ForEach (_, _, _, _, _, _, e, r) -> rcheck Scope.For Collapse.Below r r parseExpr e | SynExpr.LetOrUse (_, _, bindings, body, _) -> diff --git a/src/fsharp/symbols/Exprs.fs b/src/fsharp/symbols/Exprs.fs index 84da9a9be1f..633440ea735 100644 --- a/src/fsharp/symbols/Exprs.fs +++ b/src/fsharp/symbols/Exprs.fs @@ -4,6 +4,7 @@ namespace FSharp.Compiler.Symbols open FSharp.Compiler open Internal.Utilities.Library +open Internal.Utilities.Library.Extras open FSharp.Compiler.AbstractIL.IL open FSharp.Compiler.ErrorLogger open FSharp.Compiler.Infos @@ -96,8 +97,8 @@ type E = | DecisionTreeSuccess of int * FSharpExpr list | Call of FSharpExpr option * FSharpMemberOrFunctionOrValue * FSharpType list * FSharpType list * FSharpExpr list * FSharpExpr list | NewObject of FSharpMemberOrFunctionOrValue * FSharpType list * FSharpExpr list - | LetRec of ( FSharpMemberOrFunctionOrValue * FSharpExpr) list * FSharpExpr - | Let of (FSharpMemberOrFunctionOrValue * FSharpExpr) * FSharpExpr + | LetRec of (FSharpMemberOrFunctionOrValue * FSharpExpr * DebugPointAtBinding) list * FSharpExpr + | Let of (FSharpMemberOrFunctionOrValue * FSharpExpr * DebugPointAtBinding) * FSharpExpr | NewRecord of FSharpType * FSharpExpr list | ObjectExpr of FSharpType * FSharpExpr * FSharpObjectExprOverride list * (FSharpType * FSharpObjectExprOverride list) list | FSharpFieldGet of FSharpExpr option * FSharpType * FSharpField @@ -121,16 +122,17 @@ type E = | DefaultValue of FSharpType | Const of obj * FSharpType | AddressOf of FSharpExpr - | Sequential of FSharpExpr * FSharpExpr - | FastIntegerForLoop of FSharpExpr * FSharpExpr * FSharpExpr * bool - | WhileLoop of FSharpExpr * FSharpExpr - | TryFinally of FSharpExpr * FSharpExpr - | TryWith of FSharpExpr * FSharpMemberOrFunctionOrValue * FSharpExpr * FSharpMemberOrFunctionOrValue * FSharpExpr + | Sequential of FSharpExpr * FSharpExpr + | IntegerForLoop of FSharpExpr * FSharpExpr * FSharpExpr * bool * DebugPointAtFor * DebugPointAtInOrTo + | WhileLoop of FSharpExpr * FSharpExpr * DebugPointAtWhile + | TryFinally of FSharpExpr * FSharpExpr * DebugPointAtTry * DebugPointAtFinally + | TryWith of FSharpExpr * FSharpMemberOrFunctionOrValue * FSharpExpr * FSharpMemberOrFunctionOrValue * FSharpExpr * DebugPointAtTry * DebugPointAtWith | NewDelegate of FSharpType * FSharpExpr | ILFieldGet of FSharpExpr option * FSharpType * string | ILFieldSet of FSharpExpr option * FSharpType * string * FSharpExpr | ILAsm of string * FSharpType list * FSharpExpr list | WitnessArg of int + | DebugPoint of DebugPointAtLeafExpr * FSharpExpr /// Used to represent the information at an object expression member and [] FSharpObjectExprOverride(sgn: FSharpAbstractSignature, gps: FSharpGenericParameter list, args: FSharpMemberOrFunctionOrValue list list, body: FSharpExpr) = @@ -157,8 +159,8 @@ and [] FSharpExpr (cenv, f: (unit -> FSharpExpr) option, e: E, m: range, | E.Lambda (_v, body) -> [body] | E.Application (f, _tyargs, arg) -> f :: arg | E.IfThenElse (e1, e2, e3) -> [e1;e2;e3] - | E.Let ((_bindingVar, bindingExpr), b) -> [bindingExpr;b] - | E.LetRec (ves, b) -> (List.map snd ves) @ [b] + | E.Let ((_bindingVar, bindingExpr, _dp), b) -> [bindingExpr;b] + | E.LetRec (ves, b) -> (List.map p23 ves) @ [b] | E.NewRecord (_recordType, es) -> es | E.NewAnonRecord (_recordType, es) -> es | E.AnonRecordGet (e, _recordType, _n) -> [e] @@ -177,10 +179,10 @@ and [] FSharpExpr (cenv, f: (unit -> FSharpExpr) option, e: E, m: range, | E.Quote a -> [a] | E.TypeTest (_ty, b) -> [b] | E.Sequential (a, b) -> [a;b] - | E.FastIntegerForLoop (a, b, c, _dir) -> [a;b;c] - | E.WhileLoop (guard, body) -> [guard; body] - | E.TryFinally (body, b) -> [body; b] - | E.TryWith (body, _b, _c, _d, handler) -> [body; handler] + | E.IntegerForLoop (a, b, c, _dir, _dp, _dp2) -> [a;b;c] + | E.WhileLoop (guard, body, _dp) -> [guard; body] + | E.TryFinally (body, b, _dp, _dp2) -> [body; b] + | E.TryWith (body, _b, _c, _d, handler, _dp, _dp2) -> [body; handler] | E.NewDelegate (_ty, body) -> [body] | E.DefaultValue _ty -> [] | E.AddressSet (lvalueExpr, rvalueExpr) -> [lvalueExpr; rvalueExpr] @@ -203,6 +205,7 @@ and [] FSharpExpr (cenv, f: (unit -> FSharpExpr) option, e: E, m: range, | E.TraitCall (_sourceTypes, _traitName, _memberFlags, _paramTypes, _retTypes, args) -> args | E.Unused -> [] // unexpected | E.WitnessArg _n -> [] + | E.DebugPoint (_, e) -> [e] /// The implementation of the conversion operation module FSharpExprConvert = @@ -390,18 +393,18 @@ module FSharpExprConvert = // Put in ConvExprPrimLinear because of the overlap with Expr.Sequential below // // TODO: allow clients to see static initialization checks if they want to - | Expr.Sequential (ObjectInitializationCheck cenv.g, x1, NormalSeq, _, _) - | Expr.Sequential (StaticInitializationCount, x1, NormalSeq, _, _) - | Expr.Sequential (StaticInitializationCheck, x1, NormalSeq, _, _) -> + | Expr.Sequential (ObjectInitializationCheck cenv.g, x1, NormalSeq, _) + | Expr.Sequential (StaticInitializationCount, x1, NormalSeq, _) + | Expr.Sequential (StaticInitializationCheck, x1, NormalSeq, _) -> ConvExprPrim cenv env x1 |> contF // Large sequences of sequential code - | Expr.Sequential (e1, e2, NormalSeq, _, _) -> + | Expr.Sequential (e1, e2, NormalSeq, _) -> let e1R = ConvExpr cenv env e1 // tail recursive ConvExprLinear cenv env e2 (contF << (fun e2R -> E.Sequential(e1R, e2R))) - | Expr.Sequential (x0, x1, ThenDoSeq, _, _) -> + | Expr.Sequential (x0, x1, ThenDoSeq, _) -> E.Sequential(ConvExpr cenv env x0, ConvExpr cenv env x1) |> contF | ModuleValueOrMemberUse cenv.g (vref, vFlags, _f, _fty, tyargs, curriedArgs) when (nonNil tyargs || nonNil curriedArgs) && vref.IsMemberOrModuleBinding -> @@ -519,7 +522,7 @@ module FSharpExprConvert = and ConvExprPrim (cenv: SymbolEnv) (env: ExprTranslationEnv) expr = // Eliminate integer 'for' loops - let expr = DetectAndOptimizeForExpression cenv.g OptimizeIntRangesOnly expr + let expr = DetectAndOptimizeForEachExpression cenv.g OptimizeIntRangesOnly expr // Eliminate subsumption coercions for functions. This must be done post-typechecking because we need // complete inference types. @@ -557,11 +560,12 @@ module FSharpExprConvert = ConvConst cenv env m c ty | Expr.LetRec (binds, body, _, _) -> + let dps = binds |> List.map (fun bind -> bind.DebugPoint) let vs = valsOfBinds binds let vsR = vs |> List.map (ConvVal cenv) let env = env.BindVals vs let bodyR = ConvExpr cenv env body - let bindsR = List.zip vsR (binds |> List.map (fun b -> b.Expr |> ConvExpr cenv env)) + let bindsR = List.zip3 vsR (binds |> List.map (fun b -> b.Expr |> ConvExpr cenv env)) dps E.LetRec(bindsR, bodyR) | Expr.Lambda (_, _, _, vs, b, _, _) -> @@ -849,34 +853,34 @@ module FSharpExprConvert = | TOp.Array, [ty], xa -> E.NewArray(ConvType cenv ty, ConvExprs cenv env xa) - | TOp.While _, [], [Expr.Lambda (_, _, _, [_], test, _, _);Expr.Lambda (_, _, _, [_], body, _, _)] -> - E.WhileLoop(ConvExpr cenv env test, ConvExpr cenv env body) + | TOp.While (dp, _), [], [Expr.Lambda (_, _, _, [_], test, _, _);Expr.Lambda (_, _, _, [_], body, _, _)] -> + E.WhileLoop(ConvExpr cenv env test, ConvExpr cenv env body, dp) - | TOp.For (_, dir), [], [Expr.Lambda (_, _, _, [_], lim0, _, _); Expr.Lambda (_, _, _, [_], SimpleArrayLoopUpperBound, lm, _); SimpleArrayLoopBody cenv.g (arr, elemTy, body)] -> + | TOp.IntegerForLoop (dpFor, dpEquals, dir), [], [Expr.Lambda (_, _, _, [_], lim0, _, _); Expr.Lambda (_, _, _, [_], SimpleArrayLoopUpperBound, lm, _); SimpleArrayLoopBody cenv.g (arr, elemTy, body)] -> let lim1 = let len = mkCallArrayLength cenv.g lm elemTy arr // Array.length arr mkCallSubtractionOperator cenv.g lm cenv.g.int32_ty len (mkOne cenv.g lm) // len - 1 - E.FastIntegerForLoop(ConvExpr cenv env lim0, ConvExpr cenv env lim1, ConvExpr cenv env body, dir <> FSharpForLoopDown) + E.IntegerForLoop(ConvExpr cenv env lim0, ConvExpr cenv env lim1, ConvExpr cenv env body, dir <> FSharpForLoopDown, dpFor, dpEquals) - | TOp.For (_, dir), [], [Expr.Lambda (_, _, _, [_], lim0, _, _); Expr.Lambda (_, _, _, [_], lim1, lm, _); body] -> + | TOp.IntegerForLoop (doFor, doEquals, dir), [], [Expr.Lambda (_, _, _, [_], lim0, _, _); Expr.Lambda (_, _, _, [_], lim1, lm, _); body] -> let lim1 = if dir = CSharpForLoopUp then mkCallSubtractionOperator cenv.g lm cenv.g.int32_ty lim1 (mkOne cenv.g lm) // len - 1 else lim1 - E.FastIntegerForLoop(ConvExpr cenv env lim0, ConvExpr cenv env lim1, ConvExpr cenv env body, dir <> FSharpForLoopDown) + E.IntegerForLoop(ConvExpr cenv env lim0, ConvExpr cenv env lim1, ConvExpr cenv env body, dir <> FSharpForLoopDown, doFor, doEquals) | TOp.ILCall (_, _, _, isCtor, valUseFlag, _, _, ilMethRef, enclTypeInst, methInst, _), [], callArgs -> ConvILCall cenv env (isCtor, valUseFlag, ilMethRef, enclTypeInst, methInst, callArgs, m) - | TOp.TryFinally _, [_resty], [Expr.Lambda (_, _, _, [_], e1, _, _); Expr.Lambda (_, _, _, [_], e2, _, _)] -> - E.TryFinally(ConvExpr cenv env e1, ConvExpr cenv env e2) + | TOp.TryFinally (dpTry, dpFinally), [_resty], [Expr.Lambda (_, _, _, [_], e1, _, _); Expr.Lambda (_, _, _, [_], e2, _, _)] -> + E.TryFinally(ConvExpr cenv env e1, ConvExpr cenv env e2, dpTry, dpFinally) - | TOp.TryWith _, [_resty], [Expr.Lambda (_, _, _, [_], e1, _, _); Expr.Lambda (_, _, _, [vf], ef, _, _); Expr.Lambda (_, _, _, [vh], eh, _, _)] -> + | TOp.TryWith (dpTry, dpWith), [_resty], [Expr.Lambda (_, _, _, [_], e1, _, _); Expr.Lambda (_, _, _, [vf], ef, _, _); Expr.Lambda (_, _, _, [vh], eh, _, _)] -> let vfR = ConvVal cenv vf let envf = env.BindVal vf let vhR = ConvVal cenv vh let envh = env.BindVal vh - E.TryWith(ConvExpr cenv env e1, vfR, ConvExpr cenv envf ef, vhR, ConvExpr cenv envh eh) + E.TryWith(ConvExpr cenv env e1, vfR, ConvExpr cenv envf ef, vhR, ConvExpr cenv envh eh, dpTry, dpWith) | TOp.Bytes bytes, [], [] -> E.Const(box bytes, ConvType cenv (tyOfExpr cenv.g expr)) @@ -899,8 +903,13 @@ module FSharpExprConvert = ConvExprPrim cenv env replExpr | _ -> wfail (sprintf "unhandled construct in AST", m) + | Expr.WitnessArg (traitInfo, _m) -> ConvWitnessInfoPrim cenv env traitInfo + + | Expr.DebugPoint (_, innerExpr) -> + ConvExprPrim cenv env innerExpr + | _ -> wfail (sprintf "unhandled construct in AST", expr.Range) @@ -951,7 +960,7 @@ module FSharpExprConvert = let vR = ConvVal cenv v let rhsR = ConvExpr cenv env bind.Expr let envinner = env.BindVal v - Some(vR, rhsR), envinner + Some(vR, rhsR, bind.DebugPoint), envinner and ConvILCall (cenv: SymbolEnv) env (isNewObj, valUseFlags, ilMethRef, enclTypeArgs, methTypeArgs, callArgs, m) = let isNewObj = (isNewObj || (match valUseFlags with CtorValUsedAsSuperInit | CtorValUsedAsSelfInit -> true | _ -> false)) @@ -1187,7 +1196,7 @@ module FSharpExprConvert = and ConvTargetsLinear cenv env tgs contF = match tgs with | [] -> contF [] - | TTarget(vars, rhs, _, _) :: rest -> + | TTarget(vars, rhs, _) :: rest -> let varsR = (List.rev vars) |> List.map (ConvVal cenv) ConvExprLinear cenv env rhs (fun targetR -> ConvTargetsLinear cenv env rest (fun restR -> @@ -1208,7 +1217,7 @@ module FSharpExprConvert = else E.Value(FSharpMemberOrFunctionOrValue(cenv, vref)) - and ConvVal cenv (v: Val) = + and ConvVal cenv (v: Val) : FSharpMemberOrFunctionOrValue = let vref = mkLocalValRef v FSharpMemberOrFunctionOrValue(cenv, vref) @@ -1324,7 +1333,7 @@ and FSharpImplementationFileDeclaration = | InitAction of action: FSharpExpr and FSharpImplementationFileContents(cenv, mimpl) = - let (TImplFile (qname, _pragmas, ModuleOrNamespaceExprWithSig(_, mdef, _), hasExplicitEntryPoint, isScript, _anonRecdTypes)) = mimpl + let (TImplFile (qname, _pragmas, ModuleOrNamespaceExprWithSig(_, mdef, _), hasExplicitEntryPoint, isScript, _anonRecdTypes, _)) = mimpl let rec getDecls2 (ModuleOrNamespaceExprWithSig(_mty, def, _m)) = getDecls def and getBind (bind: Binding) = let v = bind.Var @@ -1383,7 +1392,7 @@ module FSharpExprPatterns = let (|IfThenElse|_|) (e: FSharpExpr) = match e.E with E.IfThenElse (e1, e2, e3) -> Some (e1, e2, e3) | _ -> None - let (|Let|_|) (e: FSharpExpr) = match e.E with E.Let ((v, e), b) -> Some ((v, e), b) | _ -> None + let (|Let|_|) (e: FSharpExpr) = match e.E with E.Let ((dp, v, e), b) -> Some ((dp, v, e), b) | _ -> None let (|LetRec|_|) (e: FSharpExpr) = match e.E with E.LetRec (ves, b) -> Some (ves, b) | _ -> None @@ -1423,15 +1432,17 @@ module FSharpExprPatterns = let (|TypeTest|_|) (e: FSharpExpr) = match e.E with E.TypeTest (a, b) -> Some (a, b) | _ -> None - let (|Sequential|_|) (e: FSharpExpr) = match e.E with E.Sequential (a, b) -> Some (a, b) | _ -> None + let (|Sequential|_|) (e: FSharpExpr) = match e.E with E.Sequential (dp, a) -> Some (dp, a) | _ -> None + + let (|DebugPoint|_|) (e: FSharpExpr) = match e.E with E.DebugPoint (dp, a) -> Some (dp, a) | _ -> None - let (|FastIntegerForLoop|_|) (e: FSharpExpr) = match e.E with E.FastIntegerForLoop (a, b, c, d) -> Some (a, b, c, d) | _ -> None + let (|FastIntegerForLoop|_|) (e: FSharpExpr) = match e.E with E.IntegerForLoop (dpFor, dpEquals, a, b, c, d) -> Some (dpFor, dpEquals, a, b, c, d) | _ -> None - let (|WhileLoop|_|) (e: FSharpExpr) = match e.E with E.WhileLoop (a, b) -> Some (a, b) | _ -> None + let (|WhileLoop|_|) (e: FSharpExpr) = match e.E with E.WhileLoop (dpWhile, a, b) -> Some (dpWhile, a, b) | _ -> None - let (|TryFinally|_|) (e: FSharpExpr) = match e.E with E.TryFinally (a, b) -> Some (a, b) | _ -> None + let (|TryFinally|_|) (e: FSharpExpr) = match e.E with E.TryFinally (dpTry, dpFinally, a, b) -> Some (dpTry, dpFinally, a, b) | _ -> None - let (|TryWith|_|) (e: FSharpExpr) = match e.E with E.TryWith (a, b, c, d, e) -> Some (a, b, c, d, e) | _ -> None + let (|TryWith|_|) (e: FSharpExpr) = match e.E with E.TryWith (dpTry, dpWith, a, b, c, d, e) -> Some (dpTry, dpWith, a, b, c, d, e) | _ -> None let (|NewDelegate|_|) (e: FSharpExpr) = match e.E with E.NewDelegate (ty, e) -> Some (ty, e) | _ -> None diff --git a/src/fsharp/symbols/Exprs.fsi b/src/fsharp/symbols/Exprs.fsi index 30e1ecad8d9..947205ed5ef 100644 --- a/src/fsharp/symbols/Exprs.fsi +++ b/src/fsharp/symbols/Exprs.fsi @@ -105,7 +105,7 @@ module public FSharpExprPatterns = val (|IfThenElse|_|): FSharpExpr -> (FSharpExpr * FSharpExpr * FSharpExpr) option /// Matches expressions which are let definitions - val (|Let|_|): FSharpExpr -> ((FSharpMemberOrFunctionOrValue * FSharpExpr) * FSharpExpr) option + val (|Let|_|): FSharpExpr -> ((FSharpMemberOrFunctionOrValue * FSharpExpr * DebugPointAtBinding) * FSharpExpr) option /// Matches expressions which are calls to members or module-defined functions. When calling curried functions and members the /// arguments are collapsed to a single collection of arguments, as done in the compiled version of these. @@ -127,7 +127,7 @@ module public FSharpExprPatterns = val (|Quote|_|): FSharpExpr -> FSharpExpr option /// Matches expressions which are let-rec definitions - val (|LetRec|_|): FSharpExpr -> ((FSharpMemberOrFunctionOrValue * FSharpExpr) list * FSharpExpr) option + val (|LetRec|_|): FSharpExpr -> ((FSharpMemberOrFunctionOrValue * FSharpExpr * DebugPointAtBinding) list * FSharpExpr) option /// Matches record expressions val (|NewRecord|_|): FSharpExpr -> (FSharpType * FSharpExpr list) option @@ -194,17 +194,20 @@ module public FSharpExprPatterns = /// Matches sequential expressions val (|Sequential|_|): FSharpExpr -> (FSharpExpr * FSharpExpr) option + /// Matches debug points at leaf expressions in control flow + val (|DebugPoint|_|): FSharpExpr -> (DebugPointAtLeafExpr * FSharpExpr) option + /// Matches fast-integer loops (up or down) - val (|FastIntegerForLoop|_|): FSharpExpr -> (FSharpExpr * FSharpExpr * FSharpExpr * bool) option + val (|FastIntegerForLoop|_|): FSharpExpr -> (FSharpExpr * FSharpExpr * FSharpExpr * bool * DebugPointAtFor * DebugPointAtInOrTo) option /// Matches while loops - val (|WhileLoop|_|): FSharpExpr -> (FSharpExpr * FSharpExpr) option + val (|WhileLoop|_|): FSharpExpr -> (FSharpExpr * FSharpExpr * DebugPointAtWhile) option /// Matches try/finally expressions - val (|TryFinally|_|): FSharpExpr -> (FSharpExpr * FSharpExpr) option + val (|TryFinally|_|): FSharpExpr -> (FSharpExpr * FSharpExpr * DebugPointAtTry * DebugPointAtFinally) option /// Matches try/with expressions - val (|TryWith|_|): FSharpExpr -> (FSharpExpr * FSharpMemberOrFunctionOrValue * FSharpExpr * FSharpMemberOrFunctionOrValue * FSharpExpr) option + val (|TryWith|_|): FSharpExpr -> (FSharpExpr * FSharpMemberOrFunctionOrValue * FSharpExpr * FSharpMemberOrFunctionOrValue * FSharpExpr * DebugPointAtTry * DebugPointAtWith) option /// Matches expressions which create an instance of a delegate type val (|NewDelegate|_|): FSharpExpr -> (FSharpType * FSharpExpr) option diff --git a/src/fsharp/xlf/FSComp.txt.cs.xlf b/src/fsharp/xlf/FSComp.txt.cs.xlf index b9ac2d0f977..d0963fe4da8 100644 --- a/src/fsharp/xlf/FSComp.txt.cs.xlf +++ b/src/fsharp/xlf/FSComp.txt.cs.xlf @@ -297,6 +297,11 @@ Neplatná direktiva #{0} {1} + + Unknown debug point '{0}'. The available debug points are '{1}'. + Unknown debug point '{0}'. The available debug points are '{1}'. + + The resumable code construct '{0}' may only be used in inlined code protected by 'if __useResumableCode then ...' and the overall composition must form valid resumable code. Konstruktor obnovitelného kódu {0} se dá použít jenom ve vloženém kódu chráněném příkazem if __useResumableCode then ... a celkové složení musí tvořit platný obnovitelný kód. diff --git a/src/fsharp/xlf/FSComp.txt.de.xlf b/src/fsharp/xlf/FSComp.txt.de.xlf index 9245b9553e1..a6675168357 100644 --- a/src/fsharp/xlf/FSComp.txt.de.xlf +++ b/src/fsharp/xlf/FSComp.txt.de.xlf @@ -297,6 +297,11 @@ Ungültige Direktive "#{0} {1}" + + Unknown debug point '{0}'. The available debug points are '{1}'. + Unknown debug point '{0}'. The available debug points are '{1}'. + + The resumable code construct '{0}' may only be used in inlined code protected by 'if __useResumableCode then ...' and the overall composition must form valid resumable code. Das fortsetzbare Codekonstrukt "{0}" darf nur in Inlinecode verwendet werden, der durch "if __useResumableCode then..." geschützt wird. Die Gesamtkomposition muss einen gültigen fortsetzbaren Code bilden. diff --git a/src/fsharp/xlf/FSComp.txt.es.xlf b/src/fsharp/xlf/FSComp.txt.es.xlf index 99e5691e765..d87b9f89b4a 100644 --- a/src/fsharp/xlf/FSComp.txt.es.xlf +++ b/src/fsharp/xlf/FSComp.txt.es.xlf @@ -297,6 +297,11 @@ Directiva '#{0} {1}' no válida. + + Unknown debug point '{0}'. The available debug points are '{1}'. + Unknown debug point '{0}'. The available debug points are '{1}'. + + The resumable code construct '{0}' may only be used in inlined code protected by 'if __useResumableCode then ...' and the overall composition must form valid resumable code. La construcción de código reanudable "{0}" solo se puede usar en el código insertado protegido por "if __useResumableCode then ..." y la composición general debe formar un código reanudable válido. diff --git a/src/fsharp/xlf/FSComp.txt.fr.xlf b/src/fsharp/xlf/FSComp.txt.fr.xlf index 0753fd29803..e6c7544dc5d 100644 --- a/src/fsharp/xlf/FSComp.txt.fr.xlf +++ b/src/fsharp/xlf/FSComp.txt.fr.xlf @@ -297,6 +297,11 @@ Directive non valide '#{0} {1}' + + Unknown debug point '{0}'. The available debug points are '{1}'. + Unknown debug point '{0}'. The available debug points are '{1}'. + + The resumable code construct '{0}' may only be used in inlined code protected by 'if __useResumableCode then ...' and the overall composition must form valid resumable code. La construction de code pouvant être repris «{0}» ne peut être utilisée que dans du code inlined protégé par «if __useResumableCode then ...» et la composition globale doit former un code pouvant être repris valide. diff --git a/src/fsharp/xlf/FSComp.txt.it.xlf b/src/fsharp/xlf/FSComp.txt.it.xlf index e5a7d1f883f..09876280d62 100644 --- a/src/fsharp/xlf/FSComp.txt.it.xlf +++ b/src/fsharp/xlf/FSComp.txt.it.xlf @@ -297,6 +297,11 @@ Direttiva '#{0} {1}' non valida + + Unknown debug point '{0}'. The available debug points are '{1}'. + Unknown debug point '{0}'. The available debug points are '{1}'. + + The resumable code construct '{0}' may only be used in inlined code protected by 'if __useResumableCode then ...' and the overall composition must form valid resumable code. Il costrutto di codice ripristinabile '{0}' può essere usato solo nel codice impostato come inline e protetto da 'if __useResumableCode then...' e l'intera composizione deve formare codice ripristinabile valido. diff --git a/src/fsharp/xlf/FSComp.txt.ja.xlf b/src/fsharp/xlf/FSComp.txt.ja.xlf index 649f5b531ae..be7e56316e2 100644 --- a/src/fsharp/xlf/FSComp.txt.ja.xlf +++ b/src/fsharp/xlf/FSComp.txt.ja.xlf @@ -297,6 +297,11 @@ 無効なディレクティブ '#{0} {1}' + + Unknown debug point '{0}'. The available debug points are '{1}'. + Unknown debug point '{0}'. The available debug points are '{1}'. + + The resumable code construct '{0}' may only be used in inlined code protected by 'if __useResumableCode then ...' and the overall composition must form valid resumable code. 再開可能なコード コンストラクト '{0}' は、 'if __useResumableCode then ...' によって保護されているインライン コードでのみ使用でき、コンポジション全体は有効な再開可能コードを形成する必要があります。 diff --git a/src/fsharp/xlf/FSComp.txt.ko.xlf b/src/fsharp/xlf/FSComp.txt.ko.xlf index 80187006258..f29ac50ffcc 100644 --- a/src/fsharp/xlf/FSComp.txt.ko.xlf +++ b/src/fsharp/xlf/FSComp.txt.ko.xlf @@ -297,6 +297,11 @@ 잘못된 지시문 '#{0} {1}' + + Unknown debug point '{0}'. The available debug points are '{1}'. + Unknown debug point '{0}'. The available debug points are '{1}'. + + The resumable code construct '{0}' may only be used in inlined code protected by 'if __useResumableCode then ...' and the overall composition must form valid resumable code. 다시 시작 가능한 코드 구문 '{0}'은 'if __useResumableCode then ...'로 보호되는 인라인 코드에서만 사용할 수 있습니다. 전반적인 구성은 유효한 다시 시작 가능한 코드를 형성해야 합니다. diff --git a/src/fsharp/xlf/FSComp.txt.pl.xlf b/src/fsharp/xlf/FSComp.txt.pl.xlf index 67ad68c4ea0..9146242dd9e 100644 --- a/src/fsharp/xlf/FSComp.txt.pl.xlf +++ b/src/fsharp/xlf/FSComp.txt.pl.xlf @@ -297,6 +297,11 @@ Nieprawidłowa dyrektywa „#{0} {1}” + + Unknown debug point '{0}'. The available debug points are '{1}'. + Unknown debug point '{0}'. The available debug points are '{1}'. + + The resumable code construct '{0}' may only be used in inlined code protected by 'if __useResumableCode then ...' and the overall composition must form valid resumable code. Konstrukcja kodu z możliwością wznowienia "{0}" może być używana tylko w nieliniowym kodzie chronionym przez "If __useResumableCode then..." i ogólna kompozycja musi być w formacie prawidłowego kodu z możliwością wznowienia. diff --git a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf index 2d44838340f..4981a252af1 100644 --- a/src/fsharp/xlf/FSComp.txt.pt-BR.xlf +++ b/src/fsharp/xlf/FSComp.txt.pt-BR.xlf @@ -297,6 +297,11 @@ Diretriz inválida '#{0} {1}' + + Unknown debug point '{0}'. The available debug points are '{1}'. + Unknown debug point '{0}'. The available debug points are '{1}'. + + The resumable code construct '{0}' may only be used in inlined code protected by 'if __useResumableCode then ...' and the overall composition must form valid resumable code. A construção de código retomável '{0}' só pode ser usada em código delimitado protegido por 'se __useResumableCode então ...' e a composição geral deve formar um código retomável válido. diff --git a/src/fsharp/xlf/FSComp.txt.ru.xlf b/src/fsharp/xlf/FSComp.txt.ru.xlf index beca822c6cf..a800857014a 100644 --- a/src/fsharp/xlf/FSComp.txt.ru.xlf +++ b/src/fsharp/xlf/FSComp.txt.ru.xlf @@ -297,6 +297,11 @@ Недопустимая директива "#{0} {1}" + + Unknown debug point '{0}'. The available debug points are '{1}'. + Unknown debug point '{0}'. The available debug points are '{1}'. + + The resumable code construct '{0}' may only be used in inlined code protected by 'if __useResumableCode then ...' and the overall composition must form valid resumable code. Конструкцию возобновляемого кода "{0}" можно использовать только во встроенном коде, защищенном с помощью "if __useResumableCode then ...", а общая композиция должна представлять собой допустимый возобновляемый код. diff --git a/src/fsharp/xlf/FSComp.txt.tr.xlf b/src/fsharp/xlf/FSComp.txt.tr.xlf index 241a9ec5efb..c4f8fdd6183 100644 --- a/src/fsharp/xlf/FSComp.txt.tr.xlf +++ b/src/fsharp/xlf/FSComp.txt.tr.xlf @@ -297,6 +297,11 @@ Geçersiz yönerge '#{0} {1}' + + Unknown debug point '{0}'. The available debug points are '{1}'. + Unknown debug point '{0}'. The available debug points are '{1}'. + + The resumable code construct '{0}' may only be used in inlined code protected by 'if __useResumableCode then ...' and the overall composition must form valid resumable code. Sürdürülebilir kod yapısı '{0}' yalnızca 'if__useResumableCode then ...' tarafından korunan satır içine alınmış kodda kullanılabilir ve genel birleştirme geçerli sürdürülebilir kod biçiminde olmalıdır. diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf index 798c1126d99..f7bdbb817d4 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hans.xlf @@ -297,6 +297,11 @@ 无效的指令“#{0} {1}” + + Unknown debug point '{0}'. The available debug points are '{1}'. + Unknown debug point '{0}'. The available debug points are '{1}'. + + The resumable code construct '{0}' may only be used in inlined code protected by 'if __useResumableCode then ...' and the overall composition must form valid resumable code. 可恢复的代码构造 "{0}" 只能用于受 "if __useResumableCode then..." 保护的内联代码,且整体组合必须构成有效的可恢复代码。 diff --git a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf index daace849eec..49fe6a47039 100644 --- a/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf +++ b/src/fsharp/xlf/FSComp.txt.zh-Hant.xlf @@ -297,6 +297,11 @@ 無效的指示詞 '#{0} {1}' + + Unknown debug point '{0}'. The available debug points are '{1}'. + Unknown debug point '{0}'. The available debug points are '{1}'. + + The resumable code construct '{0}' may only be used in inlined code protected by 'if __useResumableCode then ...' and the overall composition must form valid resumable code. 可繼續的程式碼構造 '{0}' 只能用於 'if __useResumableCode then ...' 所保護的內嵌程式碼中,且整體組合必須形成有效的可繼續程式碼。 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 cbdccd61379..d0e2ca8b038 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected @@ -4542,8 +4542,6 @@ FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1 FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Int32] |WitnessArg|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpExpr]] |AddressSet|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpExpr]] |Sequential|_|(FSharp.Compiler.Symbols.FSharpExpr) -FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpExpr]] |TryFinally|_|(FSharp.Compiler.Symbols.FSharpExpr) -FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpExpr]] |WhileLoop|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpType]] |UnionCaseTag|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Symbols.FSharpExpr,Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue],FSharp.Compiler.Symbols.FSharpExpr]]]] |DecisionTree|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue,FSharp.Compiler.Symbols.FSharpExpr]] |Lambda|_|(FSharp.Compiler.Symbols.FSharpExpr) @@ -4555,12 +4553,14 @@ FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1 FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Symbols.FSharpType,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpExpr]]] |NewArray|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Symbols.FSharpType,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpExpr]]] |NewRecord|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Symbols.FSharpType,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpExpr]]] |NewTuple|_|(FSharp.Compiler.Symbols.FSharpExpr) +FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.DebugPointAtLeafExpr,FSharp.Compiler.Symbols.FSharpExpr]] |DebugPoint|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpGenericParameter],FSharp.Compiler.Symbols.FSharpExpr]] |TypeLambda|_|(FSharp.Compiler.Symbols.FSharpExpr) -FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue,FSharp.Compiler.Symbols.FSharpExpr]],FSharp.Compiler.Symbols.FSharpExpr]] |LetRec|_|(FSharp.Compiler.Symbols.FSharpExpr) +FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`3[FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue,FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Syntax.DebugPointAtBinding]],FSharp.Compiler.Symbols.FSharpExpr]] |LetRec|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[System.Int32,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpExpr]]] |DecisionTreeSuccess|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[System.Object,FSharp.Compiler.Symbols.FSharpType]] |Const|_|(FSharp.Compiler.Symbols.FSharpExpr) -FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[System.Tuple`2[FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue,FSharp.Compiler.Symbols.FSharpExpr],FSharp.Compiler.Symbols.FSharpExpr]] |Let|_|(FSharp.Compiler.Symbols.FSharpExpr) +FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[System.Tuple`3[FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue,FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Syntax.DebugPointAtBinding],FSharp.Compiler.Symbols.FSharpExpr]] |Let|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpExpr]] |IfThenElse|_|(FSharp.Compiler.Symbols.FSharpExpr) +FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Syntax.DebugPointAtWhile]] |WhileLoop|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpType,FSharp.Compiler.Symbols.FSharpUnionCase]] |UnionCaseTest|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpType,System.Int32]] |AnonRecordGet|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[FSharp.Compiler.Symbols.FSharpExpr,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpType],Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpExpr]]] |Application|_|(FSharp.Compiler.Symbols.FSharpExpr) @@ -4570,16 +4570,17 @@ FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1 FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpExpr],FSharp.Compiler.Symbols.FSharpType,FSharp.Compiler.Symbols.FSharpField]] |FSharpFieldGet|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpExpr],FSharp.Compiler.Symbols.FSharpType,System.String]] |ILFieldGet|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`3[System.String,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpType],Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpExpr]]] |ILAsm|_|(FSharp.Compiler.Symbols.FSharpExpr) -FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`4[FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpExpr,System.Boolean]] |FastIntegerForLoop|_|(FSharp.Compiler.Symbols.FSharpExpr) +FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`4[FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Syntax.DebugPointAtTry,FSharp.Compiler.Syntax.DebugPointAtFinally]] |TryFinally|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`4[FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpType,FSharp.Compiler.Symbols.FSharpUnionCase,FSharp.Compiler.Symbols.FSharpField]] |UnionCaseGet|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`4[FSharp.Compiler.Symbols.FSharpType,FSharp.Compiler.Symbols.FSharpExpr,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpObjectExprOverride],Microsoft.FSharp.Collections.FSharpList`1[System.Tuple`2[FSharp.Compiler.Symbols.FSharpType,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpObjectExprOverride]]]]] |ObjectExpr|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`4[Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpExpr],FSharp.Compiler.Symbols.FSharpType,FSharp.Compiler.Symbols.FSharpField,FSharp.Compiler.Symbols.FSharpExpr]] |FSharpFieldSet|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`4[Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpExpr],FSharp.Compiler.Symbols.FSharpType,System.String,FSharp.Compiler.Symbols.FSharpExpr]] |ILFieldSet|_|(FSharp.Compiler.Symbols.FSharpExpr) -FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`5[FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue,FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue,FSharp.Compiler.Symbols.FSharpExpr]] |TryWith|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`5[FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpType,FSharp.Compiler.Symbols.FSharpUnionCase,FSharp.Compiler.Symbols.FSharpField,FSharp.Compiler.Symbols.FSharpExpr]] |UnionCaseSet|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`5[Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpExpr],FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpType],Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpType],Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpExpr]]] |Call|_|(FSharp.Compiler.Symbols.FSharpExpr) +FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`6[FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpExpr,System.Boolean,FSharp.Compiler.Syntax.DebugPointAtFor,FSharp.Compiler.Syntax.DebugPointAtInOrTo]] |FastIntegerForLoop|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`6[Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpType],System.String,FSharp.Compiler.Syntax.SynMemberFlags,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpType],Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpType],Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpExpr]]] |TraitCall|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`6[Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Symbols.FSharpExpr],FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue,Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpType],Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpType],Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpExpr],Microsoft.FSharp.Collections.FSharpList`1[FSharp.Compiler.Symbols.FSharpExpr]]] |CallWithWitnesses|_|(FSharp.Compiler.Symbols.FSharpExpr) +FSharp.Compiler.Symbols.FSharpExprPatterns: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`7[FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue,FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Symbols.FSharpMemberOrFunctionOrValue,FSharp.Compiler.Symbols.FSharpExpr,FSharp.Compiler.Syntax.DebugPointAtTry,FSharp.Compiler.Syntax.DebugPointAtWith]] |TryWith|_|(FSharp.Compiler.Symbols.FSharpExpr) FSharp.Compiler.Symbols.FSharpField FSharp.Compiler.Symbols.FSharpField: Boolean Equals(System.Object) FSharp.Compiler.Symbols.FSharpField: Boolean IsAnonRecordField @@ -5141,7 +5142,7 @@ FSharp.Compiler.Symbols.FSharpXmlDoc: Int32 Tag FSharp.Compiler.Symbols.FSharpXmlDoc: Int32 get_Tag() FSharp.Compiler.Symbols.FSharpXmlDoc: System.String ToString() FSharp.Compiler.Syntax.DebugPointAtBinding -FSharp.Compiler.Syntax.DebugPointAtBinding+Tags: Int32 NoneAtDo +FSharp.Compiler.Syntax.DebugPointAtBinding+Tags: Int32 ImplicitAtDo FSharp.Compiler.Syntax.DebugPointAtBinding+Tags: Int32 NoneAtInvisible FSharp.Compiler.Syntax.DebugPointAtBinding+Tags: Int32 NoneAtLet FSharp.Compiler.Syntax.DebugPointAtBinding+Tags: Int32 NoneAtSticky @@ -5151,23 +5152,23 @@ FSharp.Compiler.Syntax.DebugPointAtBinding+Yes: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean Equals(FSharp.Compiler.Syntax.DebugPointAtBinding) FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean Equals(System.Object) FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean IsNoneAtDo +FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean IsImplicitAtDo FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean IsNoneAtInvisible FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean IsNoneAtLet FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean IsNoneAtSticky FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean IsYes -FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean get_IsNoneAtDo() +FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean get_IsImplicitAtDo() FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean get_IsNoneAtInvisible() FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean get_IsNoneAtLet() FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean get_IsNoneAtSticky() FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean get_IsYes() FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding Combine(FSharp.Compiler.Syntax.DebugPointAtBinding) +FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding ImplicitAtDo FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding NewYes(FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding NoneAtDo FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding NoneAtInvisible FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding NoneAtLet FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding NoneAtSticky -FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding get_NoneAtDo() +FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding get_ImplicitAtDo() FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding get_NoneAtInvisible() FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding get_NoneAtLet() FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding get_NoneAtSticky() @@ -5179,7 +5180,6 @@ FSharp.Compiler.Syntax.DebugPointAtBinding: Int32 Tag FSharp.Compiler.Syntax.DebugPointAtBinding: Int32 get_Tag() FSharp.Compiler.Syntax.DebugPointAtBinding: System.String ToString() FSharp.Compiler.Syntax.DebugPointAtFinally -FSharp.Compiler.Syntax.DebugPointAtFinally+Tags: Int32 Body FSharp.Compiler.Syntax.DebugPointAtFinally+Tags: Int32 No FSharp.Compiler.Syntax.DebugPointAtFinally+Tags: Int32 Yes FSharp.Compiler.Syntax.DebugPointAtFinally+Yes: FSharp.Compiler.Text.Range get_range() @@ -5187,16 +5187,12 @@ FSharp.Compiler.Syntax.DebugPointAtFinally+Yes: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.DebugPointAtFinally: Boolean Equals(FSharp.Compiler.Syntax.DebugPointAtFinally) FSharp.Compiler.Syntax.DebugPointAtFinally: Boolean Equals(System.Object) FSharp.Compiler.Syntax.DebugPointAtFinally: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -FSharp.Compiler.Syntax.DebugPointAtFinally: Boolean IsBody FSharp.Compiler.Syntax.DebugPointAtFinally: Boolean IsNo FSharp.Compiler.Syntax.DebugPointAtFinally: Boolean IsYes -FSharp.Compiler.Syntax.DebugPointAtFinally: Boolean get_IsBody() FSharp.Compiler.Syntax.DebugPointAtFinally: Boolean get_IsNo() FSharp.Compiler.Syntax.DebugPointAtFinally: Boolean get_IsYes() -FSharp.Compiler.Syntax.DebugPointAtFinally: FSharp.Compiler.Syntax.DebugPointAtFinally Body FSharp.Compiler.Syntax.DebugPointAtFinally: FSharp.Compiler.Syntax.DebugPointAtFinally NewYes(FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.DebugPointAtFinally: FSharp.Compiler.Syntax.DebugPointAtFinally No -FSharp.Compiler.Syntax.DebugPointAtFinally: FSharp.Compiler.Syntax.DebugPointAtFinally get_Body() FSharp.Compiler.Syntax.DebugPointAtFinally: FSharp.Compiler.Syntax.DebugPointAtFinally get_No() FSharp.Compiler.Syntax.DebugPointAtFinally: FSharp.Compiler.Syntax.DebugPointAtFinally+Tags FSharp.Compiler.Syntax.DebugPointAtFinally: FSharp.Compiler.Syntax.DebugPointAtFinally+Yes @@ -5227,29 +5223,63 @@ FSharp.Compiler.Syntax.DebugPointAtFor: Int32 GetHashCode(System.Collections.IEq FSharp.Compiler.Syntax.DebugPointAtFor: Int32 Tag FSharp.Compiler.Syntax.DebugPointAtFor: Int32 get_Tag() FSharp.Compiler.Syntax.DebugPointAtFor: System.String ToString() +FSharp.Compiler.Syntax.DebugPointAtInOrTo +FSharp.Compiler.Syntax.DebugPointAtInOrTo+Tags: Int32 No +FSharp.Compiler.Syntax.DebugPointAtInOrTo+Tags: Int32 Yes +FSharp.Compiler.Syntax.DebugPointAtInOrTo+Yes: FSharp.Compiler.Text.Range get_range() +FSharp.Compiler.Syntax.DebugPointAtInOrTo+Yes: FSharp.Compiler.Text.Range range +FSharp.Compiler.Syntax.DebugPointAtInOrTo: Boolean Equals(FSharp.Compiler.Syntax.DebugPointAtInOrTo) +FSharp.Compiler.Syntax.DebugPointAtInOrTo: Boolean Equals(System.Object) +FSharp.Compiler.Syntax.DebugPointAtInOrTo: Boolean Equals(System.Object, System.Collections.IEqualityComparer) +FSharp.Compiler.Syntax.DebugPointAtInOrTo: Boolean IsNo +FSharp.Compiler.Syntax.DebugPointAtInOrTo: Boolean IsYes +FSharp.Compiler.Syntax.DebugPointAtInOrTo: Boolean get_IsNo() +FSharp.Compiler.Syntax.DebugPointAtInOrTo: Boolean get_IsYes() +FSharp.Compiler.Syntax.DebugPointAtInOrTo: FSharp.Compiler.Syntax.DebugPointAtInOrTo NewYes(FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.DebugPointAtInOrTo: FSharp.Compiler.Syntax.DebugPointAtInOrTo No +FSharp.Compiler.Syntax.DebugPointAtInOrTo: FSharp.Compiler.Syntax.DebugPointAtInOrTo get_No() +FSharp.Compiler.Syntax.DebugPointAtInOrTo: FSharp.Compiler.Syntax.DebugPointAtInOrTo+Tags +FSharp.Compiler.Syntax.DebugPointAtInOrTo: FSharp.Compiler.Syntax.DebugPointAtInOrTo+Yes +FSharp.Compiler.Syntax.DebugPointAtInOrTo: Int32 GetHashCode() +FSharp.Compiler.Syntax.DebugPointAtInOrTo: Int32 GetHashCode(System.Collections.IEqualityComparer) +FSharp.Compiler.Syntax.DebugPointAtInOrTo: Int32 Tag +FSharp.Compiler.Syntax.DebugPointAtInOrTo: Int32 get_Tag() +FSharp.Compiler.Syntax.DebugPointAtInOrTo: System.String ToString() +FSharp.Compiler.Syntax.DebugPointAtLeafExpr +FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Boolean Equals(FSharp.Compiler.Syntax.DebugPointAtLeafExpr) +FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Boolean Equals(System.Object) +FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Boolean Equals(System.Object, System.Collections.IEqualityComparer) +FSharp.Compiler.Syntax.DebugPointAtLeafExpr: FSharp.Compiler.Syntax.DebugPointAtLeafExpr NewYes(FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.DebugPointAtLeafExpr: FSharp.Compiler.Text.Range Item +FSharp.Compiler.Syntax.DebugPointAtLeafExpr: FSharp.Compiler.Text.Range get_Item() +FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Int32 GetHashCode() +FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Int32 GetHashCode(System.Collections.IEqualityComparer) +FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Int32 Tag +FSharp.Compiler.Syntax.DebugPointAtLeafExpr: Int32 get_Tag() +FSharp.Compiler.Syntax.DebugPointAtLeafExpr: System.String ToString() FSharp.Compiler.Syntax.DebugPointAtSequential +FSharp.Compiler.Syntax.DebugPointAtSequential+Tags: Int32 SuppressNeither FSharp.Compiler.Syntax.DebugPointAtSequential+Tags: Int32 SuppressBoth FSharp.Compiler.Syntax.DebugPointAtSequential+Tags: Int32 SuppressExpr -FSharp.Compiler.Syntax.DebugPointAtSequential+Tags: Int32 SuppressNeither FSharp.Compiler.Syntax.DebugPointAtSequential+Tags: Int32 SuppressStmt FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean Equals(FSharp.Compiler.Syntax.DebugPointAtSequential) FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean Equals(System.Object) FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean Equals(System.Object, System.Collections.IEqualityComparer) +FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean IsSuppressNeither FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean IsSuppressBoth FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean IsSuppressExpr -FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean IsSuppressNeither FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean IsSuppressStmt +FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean get_IsSuppressNeither() FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean get_IsSuppressBoth() FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean get_IsSuppressExpr() -FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean get_IsSuppressNeither() FSharp.Compiler.Syntax.DebugPointAtSequential: Boolean get_IsSuppressStmt() +FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential SuppressNeither FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential SuppressBoth FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential SuppressExpr -FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential SuppressNeither FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential SuppressStmt +FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential get_SuppressNeither() FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential get_SuppressBoth() FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential get_SuppressExpr() -FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential get_SuppressNeither() FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential get_SuppressStmt() FSharp.Compiler.Syntax.DebugPointAtSequential: FSharp.Compiler.Syntax.DebugPointAtSequential+Tags FSharp.Compiler.Syntax.DebugPointAtSequential: Int32 CompareTo(FSharp.Compiler.Syntax.DebugPointAtSequential) @@ -5306,7 +5336,6 @@ FSharp.Compiler.Syntax.DebugPointAtTarget: Int32 Tag FSharp.Compiler.Syntax.DebugPointAtTarget: Int32 get_Tag() FSharp.Compiler.Syntax.DebugPointAtTarget: System.String ToString() FSharp.Compiler.Syntax.DebugPointAtTry -FSharp.Compiler.Syntax.DebugPointAtTry+Tags: Int32 Body FSharp.Compiler.Syntax.DebugPointAtTry+Tags: Int32 No FSharp.Compiler.Syntax.DebugPointAtTry+Tags: Int32 Yes FSharp.Compiler.Syntax.DebugPointAtTry+Yes: FSharp.Compiler.Text.Range get_range() @@ -5314,16 +5343,12 @@ FSharp.Compiler.Syntax.DebugPointAtTry+Yes: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.DebugPointAtTry: Boolean Equals(FSharp.Compiler.Syntax.DebugPointAtTry) FSharp.Compiler.Syntax.DebugPointAtTry: Boolean Equals(System.Object) FSharp.Compiler.Syntax.DebugPointAtTry: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -FSharp.Compiler.Syntax.DebugPointAtTry: Boolean IsBody FSharp.Compiler.Syntax.DebugPointAtTry: Boolean IsNo FSharp.Compiler.Syntax.DebugPointAtTry: Boolean IsYes -FSharp.Compiler.Syntax.DebugPointAtTry: Boolean get_IsBody() FSharp.Compiler.Syntax.DebugPointAtTry: Boolean get_IsNo() FSharp.Compiler.Syntax.DebugPointAtTry: Boolean get_IsYes() -FSharp.Compiler.Syntax.DebugPointAtTry: FSharp.Compiler.Syntax.DebugPointAtTry Body FSharp.Compiler.Syntax.DebugPointAtTry: FSharp.Compiler.Syntax.DebugPointAtTry NewYes(FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.DebugPointAtTry: FSharp.Compiler.Syntax.DebugPointAtTry No -FSharp.Compiler.Syntax.DebugPointAtTry: FSharp.Compiler.Syntax.DebugPointAtTry get_Body() FSharp.Compiler.Syntax.DebugPointAtTry: FSharp.Compiler.Syntax.DebugPointAtTry get_No() FSharp.Compiler.Syntax.DebugPointAtTry: FSharp.Compiler.Syntax.DebugPointAtTry+Tags FSharp.Compiler.Syntax.DebugPointAtTry: FSharp.Compiler.Syntax.DebugPointAtTry+Yes @@ -6238,6 +6263,10 @@ FSharp.Compiler.Syntax.SynExpr+Const: FSharp.Compiler.Syntax.SynConst constant FSharp.Compiler.Syntax.SynExpr+Const: FSharp.Compiler.Syntax.SynConst get_constant() FSharp.Compiler.Syntax.SynExpr+Const: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynExpr+Const: FSharp.Compiler.Text.Range range +FSharp.Compiler.Syntax.SynExpr+DebugPoint: FSharp.Compiler.Syntax.SynExpr get_innerExpr() +FSharp.Compiler.Syntax.SynExpr+DebugPoint: FSharp.Compiler.Syntax.SynExpr innerExpr +FSharp.Compiler.Syntax.SynExpr+DebugPoint: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.DebugPointAtLeafExpr,System.Boolean]] debugPoint +FSharp.Compiler.Syntax.SynExpr+DebugPoint: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.DebugPointAtLeafExpr,System.Boolean]] get_debugPoint() FSharp.Compiler.Syntax.SynExpr+DiscardAfterMissingQualificationAfterDot: FSharp.Compiler.Syntax.SynExpr expr FSharp.Compiler.Syntax.SynExpr+DiscardAfterMissingQualificationAfterDot: FSharp.Compiler.Syntax.SynExpr get_expr() FSharp.Compiler.Syntax.SynExpr+DiscardAfterMissingQualificationAfterDot: FSharp.Compiler.Text.Range get_range() @@ -6310,6 +6339,8 @@ FSharp.Compiler.Syntax.SynExpr+For: Boolean direction FSharp.Compiler.Syntax.SynExpr+For: Boolean get_direction() FSharp.Compiler.Syntax.SynExpr+For: FSharp.Compiler.Syntax.DebugPointAtFor forDebugPoint FSharp.Compiler.Syntax.SynExpr+For: FSharp.Compiler.Syntax.DebugPointAtFor get_forDebugPoint() +FSharp.Compiler.Syntax.SynExpr+For: FSharp.Compiler.Syntax.DebugPointAtInOrTo get_toDebugPoint() +FSharp.Compiler.Syntax.SynExpr+For: FSharp.Compiler.Syntax.DebugPointAtInOrTo toDebugPoint FSharp.Compiler.Syntax.SynExpr+For: FSharp.Compiler.Syntax.Ident get_ident() FSharp.Compiler.Syntax.SynExpr+For: FSharp.Compiler.Syntax.Ident ident FSharp.Compiler.Syntax.SynExpr+For: FSharp.Compiler.Syntax.SynExpr doBody @@ -6326,6 +6357,8 @@ FSharp.Compiler.Syntax.SynExpr+ForEach: Boolean get_isFromSource() FSharp.Compiler.Syntax.SynExpr+ForEach: Boolean isFromSource FSharp.Compiler.Syntax.SynExpr+ForEach: FSharp.Compiler.Syntax.DebugPointAtFor forDebugPoint FSharp.Compiler.Syntax.SynExpr+ForEach: FSharp.Compiler.Syntax.DebugPointAtFor get_forDebugPoint() +FSharp.Compiler.Syntax.SynExpr+ForEach: FSharp.Compiler.Syntax.DebugPointAtInOrTo get_inDebugPoint() +FSharp.Compiler.Syntax.SynExpr+ForEach: FSharp.Compiler.Syntax.DebugPointAtInOrTo inDebugPoint FSharp.Compiler.Syntax.SynExpr+ForEach: FSharp.Compiler.Syntax.SeqExprOnly get_seqExprOnly() FSharp.Compiler.Syntax.SynExpr+ForEach: FSharp.Compiler.Syntax.SeqExprOnly seqExprOnly FSharp.Compiler.Syntax.SynExpr+ForEach: FSharp.Compiler.Syntax.SynExpr bodyExpr @@ -6627,6 +6660,7 @@ FSharp.Compiler.Syntax.SynExpr+Tags: Int32 ArrayOrListComputed FSharp.Compiler.Syntax.SynExpr+Tags: Int32 Assert FSharp.Compiler.Syntax.SynExpr+Tags: Int32 ComputationExpr FSharp.Compiler.Syntax.SynExpr+Tags: Int32 Const +FSharp.Compiler.Syntax.SynExpr+Tags: Int32 DebugPoint FSharp.Compiler.Syntax.SynExpr+Tags: Int32 DiscardAfterMissingQualificationAfterDot FSharp.Compiler.Syntax.SynExpr+Tags: Int32 Do FSharp.Compiler.Syntax.SynExpr+Tags: Int32 DoBang @@ -6789,6 +6823,7 @@ FSharp.Compiler.Syntax.SynExpr: Boolean IsArrayOrListComputed FSharp.Compiler.Syntax.SynExpr: Boolean IsAssert FSharp.Compiler.Syntax.SynExpr: Boolean IsComputationExpr FSharp.Compiler.Syntax.SynExpr: Boolean IsConst +FSharp.Compiler.Syntax.SynExpr: Boolean IsDebugPoint FSharp.Compiler.Syntax.SynExpr: Boolean IsDiscardAfterMissingQualificationAfterDot FSharp.Compiler.Syntax.SynExpr: Boolean IsDo FSharp.Compiler.Syntax.SynExpr: Boolean IsDoBang @@ -6855,6 +6890,7 @@ FSharp.Compiler.Syntax.SynExpr: Boolean get_IsArrayOrListComputed() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsAssert() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsComputationExpr() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsConst() +FSharp.Compiler.Syntax.SynExpr: Boolean get_IsDebugPoint() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsDiscardAfterMissingQualificationAfterDot() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsDo() FSharp.Compiler.Syntax.SynExpr: Boolean get_IsDoBang() @@ -6920,6 +6956,7 @@ FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewArrayOrListCom FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewAssert(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewComputationExpr(Boolean, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewConst(FSharp.Compiler.Syntax.SynConst, FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewDebugPoint(Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.DebugPointAtLeafExpr,System.Boolean]], FSharp.Compiler.Syntax.SynExpr) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewDiscardAfterMissingQualificationAfterDot(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewDo(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewDoBang(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) @@ -6930,8 +6967,8 @@ FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewDotNamedIndexe FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewDotSet(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.LongIdentWithDots, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewDowncast(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynType, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewFixed(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewFor(FSharp.Compiler.Syntax.DebugPointAtFor, FSharp.Compiler.Syntax.Ident, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynExpr, Boolean, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewForEach(FSharp.Compiler.Syntax.DebugPointAtFor, FSharp.Compiler.Syntax.SeqExprOnly, Boolean, FSharp.Compiler.Syntax.SynPat, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewFor(FSharp.Compiler.Syntax.DebugPointAtFor, FSharp.Compiler.Syntax.DebugPointAtInOrTo, FSharp.Compiler.Syntax.Ident, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], FSharp.Compiler.Syntax.SynExpr, Boolean, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) +FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewForEach(FSharp.Compiler.Syntax.DebugPointAtFor, FSharp.Compiler.Syntax.DebugPointAtInOrTo, FSharp.Compiler.Syntax.SeqExprOnly, Boolean, FSharp.Compiler.Syntax.SynPat, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewFromParseError(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewIdent(FSharp.Compiler.Syntax.Ident) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewIfThenElse(FSharp.Compiler.Text.Range, Boolean, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range, FSharp.Compiler.Syntax.SynExpr, Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Text.Range], Microsoft.FSharp.Core.FSharpOption`1[FSharp.Compiler.Syntax.SynExpr], FSharp.Compiler.Syntax.DebugPointAtBinding, Boolean, FSharp.Compiler.Text.Range, FSharp.Compiler.Text.Range) @@ -6985,6 +7022,7 @@ FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+ArrayOrListComput FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+Assert FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+ComputationExpr FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+Const +FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+DebugPoint FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+DiscardAfterMissingQualificationAfterDot FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+Do FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr+DoBang diff --git a/tests/FSharp.Core.UnitTests/SurfaceArea.fs b/tests/FSharp.Core.UnitTests/SurfaceArea.fs index eaef9f3c04c..831d6ab1af7 100644 --- a/tests/FSharp.Core.UnitTests/SurfaceArea.fs +++ b/tests/FSharp.Core.UnitTests/SurfaceArea.fs @@ -2493,6 +2493,9 @@ Microsoft.FSharp.Reflection.UnionCaseInfo: System.String ToString() Microsoft.FSharp.Reflection.UnionCaseInfo: System.String get_Name() Microsoft.FSharp.Reflection.UnionCaseInfo: System.Type DeclaringType Microsoft.FSharp.Reflection.UnionCaseInfo: System.Type get_DeclaringType() +Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] UnitAsync +Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] get_UnitAsync() +Microsoft.FSharp.Core.CompilerServices.StateMachineHelpers: Void __debugPoint(System.String) " #if NETCOREAPP // This is in netstandard 2.1 diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs index ca68e2e9d7a..52fbd3ee618 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs @@ -21,15 +21,15 @@ let ListExpressionSteppingTest1 () = [ yield 1 ] ListExpressionSteppingTest1() cil managed { - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0) - IL_0000: ldloca.s V_0 - IL_0002: ldc.i4.1 - IL_0003: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0008: nop - IL_0009: ldloca.s V_0 - IL_000b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0010: ret + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0) + IL_0000: ldloca.s V_0 + IL_0002: ldc.i4.1 + IL_0003: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0008: nop + IL_0009: ldloca.s V_0 + IL_000b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0010: ret } """ ]) @@ -95,35 +95,35 @@ let ListExpressionSteppingTest3 () = ListExpressionSteppingTest3() cil managed { - .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, - valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1> V_1) - 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.0 - IL_0007: nop - IL_0008: ldloc.0 - IL_0009: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_000e: ldc.i4.4 - IL_000f: bge.s IL_0034 - - IL_0011: ldloc.0 - IL_0012: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0017: nop - IL_0018: ldstr "hello" - IL_001d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0022: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0027: pop - IL_0028: ldloca.s V_1 - IL_002a: ldloc.0 - IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Add(!0) - IL_0030: nop - IL_0031: nop - IL_0032: br.s IL_0007 - - IL_0034: ldloca.s V_1 - IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Close() - IL_003b: ret + .maxstack 4 + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 V_0, + valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1> V_1) + 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.0 + IL_0007: nop + IL_0008: ldloc.0 + IL_0009: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_000e: ldc.i4.4 + IL_000f: bge.s IL_0034 + + IL_0011: ldloc.0 + IL_0012: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0017: nop + IL_0018: ldstr "hello" + IL_001d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0022: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0027: pop + IL_0028: ldloca.s V_1 + IL_002a: ldloc.0 + IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Add(!0) + IL_0030: nop + IL_0031: nop + IL_0032: br.s IL_0008 + + IL_0034: ldloca.s V_1 + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Close() + IL_003b: ret } """ ]) @@ -228,65 +228,64 @@ let ListExpressionSteppingTest5 () = ListExpressionSteppingTest5() 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_0039 + .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: nop + IL_0001: ldc.i4.1 + IL_0002: ldc.i4.1 + IL_0003: ldc.i4.4 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + int32, + int32) + IL_0009: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_000e: stloc.1 + .try + { + IL_000f: ldloc.1 + IL_0010: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0015: brfalse.s IL_003a - IL_0016: ldloc.1 - IL_0017: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() - IL_001c: stloc.3 - IL_001d: ldstr "hello" - IL_0022: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0027: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_002c: pop - IL_002d: ldloca.s V_0 - IL_002f: ldloc.3 - IL_0030: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0035: nop - IL_0036: nop - IL_0037: br.s IL_000e + IL_0017: ldloc.1 + IL_0018: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_001d: stloc.3 + IL_001e: ldstr "hello" + 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: ldloca.s V_0 + IL_0030: ldloc.3 + IL_0031: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0036: nop + IL_0037: nop + IL_0038: br.s IL_000f - IL_0039: ldnull - IL_003a: stloc.2 - IL_003b: leave.s IL_0052 + IL_003a: ldnull + IL_003b: stloc.2 + IL_003c: leave.s IL_0053 - } - finally - { - IL_003d: ldloc.1 - IL_003e: isinst [runtime]System.IDisposable - IL_0043: stloc.s V_4 - IL_0045: ldloc.s V_4 - IL_0047: brfalse.s IL_0051 - - IL_0049: ldloc.s V_4 - IL_004b: callvirt instance void [runtime]System.IDisposable::Dispose() - IL_0050: endfinally - IL_0051: endfinally - } - IL_0052: ldloc.2 - IL_0053: pop - IL_0054: ldloca.s V_0 - IL_0056: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005b: ret - } + } + finally + { + IL_003e: ldloc.1 + IL_003f: isinst [runtime]System.IDisposable + IL_0044: stloc.s V_4 + IL_0046: ldloc.s V_4 + IL_0048: brfalse.s IL_0052 + IL_004a: ldloc.s V_4 + IL_004c: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_0051: endfinally + IL_0052: endfinally + } + IL_0053: ldloc.2 + IL_0054: pop + IL_0055: ldloca.s V_0 + IL_0057: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005c: ret } """ ]) @@ -315,90 +314,91 @@ let ListExpressionSteppingTest6 () = 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 +.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: nop + IL_0001: ldc.i4.1 + IL_0002: ldc.i4.1 + IL_0003: ldc.i4.4 + IL_0004: call class [runtime]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + int32, + int32) + IL_0009: callvirt instance class [runtime]System.Collections.Generic.IEnumerator`1 class [runtime]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_000e: stloc.1 + .try + { + IL_000f: ldloc.1 + IL_0010: callvirt instance bool [runtime]System.Collections.IEnumerator::MoveNext() + IL_0015: brfalse.s IL_0075 + + IL_0017: ldloc.1 + IL_0018: callvirt instance !0 class [runtime]System.Collections.Generic.IEnumerator`1::get_Current() + IL_001d: stloc.3 + IL_001e: nop + IL_001f: ldloc.3 + IL_0020: ldc.i4.1 + IL_0021: sub + IL_0022: switch ( + IL_0031, + IL_004d) + IL_002f: br.s IL_0069 + + IL_0031: ldstr "hello" + IL_0036: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_003b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0040: pop + IL_0041: ldloca.s V_0 + IL_0043: ldloc.3 + IL_0044: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0049: nop + IL_004a: nop + IL_004b: br.s IL_000f + + IL_004d: ldstr "hello" + IL_0052: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0057: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_005c: pop + IL_005d: ldloca.s V_0 + IL_005f: ldloc.3 + IL_0060: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0065: nop + IL_0066: nop + IL_0067: br.s IL_000f + + IL_0069: ldloca.s V_0 + IL_006b: ldloc.3 + IL_006c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0071: nop + IL_0072: nop + IL_0073: br.s IL_000f + + IL_0075: ldnull + IL_0076: stloc.2 + IL_0077: leave.s IL_008e + + } + finally + { + IL_0079: ldloc.1 + IL_007a: isinst [runtime]System.IDisposable + IL_007f: stloc.s V_4 + IL_0081: ldloc.s V_4 + IL_0083: brfalse.s IL_008d + + IL_0085: ldloc.s V_4 + IL_0087: callvirt instance void [runtime]System.IDisposable::Dispose() + IL_008c: endfinally + IL_008d: endfinally + } + IL_008e: ldloc.2 + IL_008f: pop + IL_0090: ldloca.s V_0 + IL_0092: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0097: ret } """ ]) diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/Mutation.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/Mutation.fs index 2546833ff0f..3699cc96e21 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/Mutation.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/Mutation.fs @@ -286,43 +286,45 @@ type StaticC() = get_X() cil managed { - .maxstack 8 - IL_0000: volatile. - IL_0002: ldsfld int32 Mutation05/StaticC::init@10 - IL_0007: ldc.i4.1 - IL_0008: bge.s IL_0013 - - IL_000a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() - IL_000f: nop - IL_0010: nop - IL_0011: br.s IL_0014 - - IL_0013: nop - IL_0014: volatile. - IL_0016: ldsfld int32 Mutation05/StaticC::x - IL_001b: ret + .maxstack 8 + IL_0000: nop + IL_0001: volatile. + IL_0003: ldsfld int32 Mutation05/StaticC::init@10 + IL_0008: ldc.i4.1 + IL_0009: bge.s IL_0014 + + IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() + IL_0010: nop + IL_0011: nop + IL_0012: br.s IL_0015 + + IL_0014: nop + IL_0015: volatile. + IL_0017: ldsfld int32 Mutation05/StaticC::x + IL_001c: ret } .method public specialname static void set_X(int32 v) cil managed { - .maxstack 8 - IL_0000: volatile. - IL_0002: ldsfld int32 Mutation05/StaticC::init@10 - IL_0007: ldc.i4.1 - IL_0008: bge.s IL_0013 - - IL_000a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() - IL_000f: nop - IL_0010: nop - IL_0011: br.s IL_0014 - - IL_0013: nop - IL_0014: ldarg.0 - IL_0015: volatile. - IL_0017: stsfld int32 Mutation05/StaticC::x - IL_001c: ret + .maxstack 8 + IL_0000: nop + IL_0001: volatile. + IL_0003: ldsfld int32 Mutation05/StaticC::init@10 + IL_0008: ldc.i4.1 + IL_0009: bge.s IL_0014 + + IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() + IL_0010: nop + IL_0011: nop + IL_0012: br.s IL_0015 + + IL_0014: nop + IL_0015: ldarg.0 + IL_0016: volatile. + IL_0018: stsfld int32 Mutation05/StaticC::x + IL_001d: ret } .method private specialname rtspecialname static diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs index 446b7ef2101..e80e68891ef 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs @@ -375,111 +375,101 @@ let testTask() = task { try 1+1 finally System.Console.WriteLine("finally") } """ (fun verifier -> verifier.VerifyIL [ """ -.method public strict virtual instance void - MoveNext() cil managed -{ - .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext - - .maxstack 4 - .locals init (int32 V_0, - class [runtime]System.Exception V_1, - bool V_2, - bool V_3, - bool V_4, - class [runtime]System.Exception V_5) - IL_0000: ldarg.0 - IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint - IL_0006: stloc.0 - .try - { - IL_0007: ldc.i4.0 - IL_0008: stloc.3 - IL_0009: ldloc.3 - IL_000a: brfalse.s IL_0010 - - IL_000c: ldc.i4.1 - IL_000d: nop - IL_000e: br.s IL_0012 - - IL_0010: ldloc.3 - IL_0011: nop - IL_0012: stloc.3 - .try - { - IL_0013: nop - IL_0014: ldc.i4.1 - IL_0015: stloc.s V_4 - IL_0017: ldloc.s V_4 - IL_0019: stloc.3 - IL_001a: leave.s IL_003b - - } - catch [runtime]System.Object + .method public strict virtual instance void + MoveNext() cil managed { - IL_001c: castclass [runtime]System.Exception - IL_0021: stloc.s V_5 - IL_0023: ldstr "finally" - IL_0028: call void [runtime]System.Console::WriteLine(string) - IL_002d: ldc.i4.1 - IL_002e: stloc.s V_4 - IL_0030: rethrow - IL_0032: ldnull - IL_0033: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_0038: pop - IL_0039: leave.s IL_003b - - } - IL_003b: ldloc.3 - IL_003c: brfalse.s IL_004e - - IL_003e: ldstr "finally" - IL_0043: call void [runtime]System.Console::WriteLine(string) - IL_0048: ldc.i4.1 - IL_0049: stloc.s V_4 - IL_004b: nop - IL_004c: br.s IL_004f - - IL_004e: nop - IL_004f: ldloc.3 - IL_0050: stloc.2 - IL_0051: ldloc.2 - IL_0052: brfalse.s IL_0071 - - IL_0054: ldarg.0 - IL_0055: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_005a: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_005f: ldarg.0 - IL_0060: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0065: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result - IL_006a: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) - IL_006f: leave.s IL_007f - - IL_0071: leave.s IL_007f - - } - catch [runtime]System.Object - { - IL_0073: castclass [runtime]System.Exception - IL_0078: stloc.s V_5 - IL_007a: ldloc.s V_5 - IL_007c: stloc.1 - IL_007d: leave.s IL_007f - - } - IL_007f: ldloc.1 - IL_0080: stloc.s V_5 - IL_0082: ldloc.s V_5 - IL_0084: brtrue.s IL_0087 - - IL_0086: ret - - IL_0087: ldarg.0 - IL_0088: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_008d: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0092: ldloc.s V_5 - IL_0094: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) - IL_0099: ret -} + .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + bool V_2, + bool V_3, + bool V_4, + class [runtime]System.Exception V_5) + IL_0000: ldarg.0 + IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint + IL_0006: stloc.0 + .try + { + IL_0007: ldc.i4.0 + IL_0008: stloc.3 + .try + { + IL_0009: ldc.i4.1 + IL_000a: stloc.s V_4 + IL_000c: ldloc.s V_4 + IL_000e: stloc.3 + IL_000f: leave.s IL_0030 + + } + catch [runtime]System.Object + { + IL_0011: castclass [runtime]System.Exception + IL_0016: stloc.s V_5 + IL_0018: ldstr "finally" + IL_001d: call void [runtime]System.Console::WriteLine(string) + IL_0022: ldc.i4.1 + IL_0023: stloc.s V_4 + IL_0025: rethrow + IL_0027: ldnull + IL_0028: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_002d: pop + IL_002e: leave.s IL_0030 + + } + IL_0030: ldloc.3 + IL_0031: brfalse.s IL_0043 + + IL_0033: ldstr "finally" + IL_0038: call void [runtime]System.Console::WriteLine(string) + IL_003d: ldc.i4.1 + IL_003e: stloc.s V_4 + IL_0040: nop + IL_0041: br.s IL_0044 + + IL_0043: nop + IL_0044: ldloc.3 + IL_0045: stloc.2 + IL_0046: ldloc.2 + IL_0047: brfalse.s IL_0066 + + IL_0049: ldarg.0 + IL_004a: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_004f: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0054: ldarg.0 + IL_0055: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_005a: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result + IL_005f: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_0064: leave.s IL_0074 + + IL_0066: leave.s IL_0074 + + } + catch [runtime]System.Object + { + IL_0068: castclass [runtime]System.Exception + IL_006d: stloc.s V_5 + IL_006f: ldloc.s V_5 + IL_0071: stloc.1 + IL_0072: leave.s IL_0074 + + } + IL_0074: ldloc.1 + IL_0075: stloc.s V_5 + IL_0077: ldloc.s V_5 + IL_0079: brtrue.s IL_007c + + IL_007b: ret + + IL_007c: ldarg.0 + IL_007d: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0082: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0087: ldloc.s V_5 + IL_0089: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) + IL_008e: ret + } + """ ]) @@ -494,115 +484,107 @@ let testTask() = task { try 1+1 finally System.Console.WriteLine("finally") } """ (fun verifier -> verifier.VerifyIL [ """ -.method public strict virtual instance void - MoveNext() cil managed -{ - .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext - - .maxstack 4 - .locals init (int32 V_0, - class [runtime]System.Exception V_1, - bool V_2, - bool V_3, - bool V_4, - class [runtime]System.Exception V_5, - bool V_6, - bool V_7, - class [runtime]System.Exception V_8, - class [runtime]System.Exception V_9) - IL_0000: ldarg.0 - IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint - IL_0006: stloc.0 - .try - { - IL_0007: ldc.i4.0 - IL_0008: stloc.3 - IL_0009: ldloc.3 - IL_000a: brfalse.s IL_0010 - - IL_000c: ldc.i4.1 - IL_000d: nop - IL_000e: br.s IL_0012 - - IL_0010: ldloc.3 - IL_0011: nop - IL_0012: stloc.3 - .try - { - IL_0013: nop - IL_0014: ldc.i4.1 - IL_0015: stloc.s V_4 - IL_0017: ldloc.s V_4 - IL_0019: stloc.3 - IL_001a: leave.s IL_003b - - } - catch [runtime]System.Object + .method public strict virtual instance void + MoveNext() cil managed { - IL_001c: castclass [runtime]System.Exception - IL_0021: stloc.s V_5 - IL_0023: ldstr "finally" - IL_0028: call void [runtime]System.Console::WriteLine(string) - IL_002d: ldc.i4.1 - IL_002e: stloc.s V_6 - IL_0030: rethrow - IL_0032: ldnull - IL_0033: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_0038: pop - IL_0039: leave.s IL_003b - - } - IL_003b: ldloc.3 - IL_003c: brfalse.s IL_004e - - IL_003e: ldstr "finally" - IL_0043: call void [runtime]System.Console::WriteLine(string) - IL_0048: ldc.i4.1 - IL_0049: stloc.s V_7 - IL_004b: nop - IL_004c: br.s IL_004f - - IL_004e: nop - IL_004f: ldloc.3 - IL_0050: stloc.2 - IL_0051: ldloc.2 - IL_0052: brfalse.s IL_0071 - - IL_0054: ldarg.0 - IL_0055: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_005a: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_005f: ldarg.0 - IL_0060: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0065: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result - IL_006a: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) - IL_006f: leave.s IL_007f - - IL_0071: leave.s IL_007f - - } - catch [runtime]System.Object - { - IL_0073: castclass [runtime]System.Exception - IL_0078: stloc.s V_8 - IL_007a: ldloc.s V_8 - IL_007c: stloc.1 - IL_007d: leave.s IL_007f - - } - IL_007f: ldloc.1 - IL_0080: stloc.s V_9 - IL_0082: ldloc.s V_9 - IL_0084: brtrue.s IL_0087 - - IL_0086: ret - - IL_0087: ldarg.0 - IL_0088: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_008d: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0092: ldloc.s V_9 - IL_0094: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) - IL_0099: ret -} + .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + bool V_2, + bool V_3, + bool V_4, + class [runtime]System.Exception V_5, + bool V_6, + bool V_7, + class [runtime]System.Exception V_8, + class [runtime]System.Exception V_9) + IL_0000: ldarg.0 + IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint + IL_0006: stloc.0 + .try + { + IL_0007: ldc.i4.0 + IL_0008: stloc.3 + .try + { + IL_0009: nop + IL_000a: ldc.i4.1 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: stloc.3 + IL_0010: leave.s IL_0032 + + } + catch [runtime]System.Object + { + IL_0012: castclass [runtime]System.Exception + IL_0017: stloc.s V_5 + IL_0019: nop + IL_001a: ldstr "finally" + IL_001f: call void [runtime]System.Console::WriteLine(string) + IL_0024: ldc.i4.1 + IL_0025: stloc.s V_6 + IL_0027: rethrow + IL_0029: ldnull + IL_002a: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_002f: pop + IL_0030: leave.s IL_0032 + + } + IL_0032: ldloc.3 + IL_0033: brfalse.s IL_0046 + + IL_0035: nop + IL_0036: ldstr "finally" + IL_003b: call void [runtime]System.Console::WriteLine(string) + IL_0040: ldc.i4.1 + IL_0041: stloc.s V_7 + IL_0043: nop + IL_0044: br.s IL_0047 + + IL_0046: nop + IL_0047: ldloc.3 + IL_0048: stloc.2 + IL_0049: ldloc.2 + IL_004a: brfalse.s IL_0069 + + IL_004c: ldarg.0 + IL_004d: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0052: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0057: ldarg.0 + IL_0058: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_005d: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result + IL_0062: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_0067: leave.s IL_0077 + + IL_0069: leave.s IL_0077 + + } + catch [runtime]System.Object + { + IL_006b: castclass [runtime]System.Exception + IL_0070: stloc.s V_8 + IL_0072: ldloc.s V_8 + IL_0074: stloc.1 + IL_0075: leave.s IL_0077 + + } + IL_0077: ldloc.1 + IL_0078: stloc.s V_9 + IL_007a: ldloc.s V_9 + IL_007c: brtrue.s IL_007f + + IL_007e: ret + + IL_007f: ldarg.0 + IL_0080: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0085: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_008a: ldloc.s V_9 + IL_008c: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) + IL_0091: ret + } """ ]) @@ -618,114 +600,103 @@ let testTask() = task { try 1 with e -> System.Console.WriteLine("finally"); 2 } """ (fun verifier -> verifier.VerifyIL [ """ -.method public strict virtual instance void - MoveNext() cil managed -{ - .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext - - .maxstack 4 - .locals init (int32 V_0, - class [runtime]System.Exception V_1, - bool V_2, - bool V_3, - bool V_4, - class [runtime]System.Exception V_5, - bool V_6, - class [runtime]System.Exception V_7) - IL_0000: ldarg.0 - IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint - IL_0006: stloc.0 - .try - { - IL_0007: ldc.i4.0 - IL_0008: stloc.3 - IL_0009: ldc.i4.0 - IL_000a: stloc.s V_4 - IL_000c: ldnull - IL_000d: stloc.s V_5 - IL_000f: ldloc.3 - IL_0010: brfalse.s IL_0016 - - IL_0012: ldc.i4.1 - IL_0013: nop - IL_0014: br.s IL_0018 - - IL_0016: ldloc.3 - IL_0017: nop - IL_0018: stloc.3 - .try - { - IL_0019: nop - IL_001a: ldc.i4.1 - IL_001b: stloc.s V_6 - IL_001d: ldloc.s V_6 - IL_001f: stloc.3 - IL_0020: leave.s IL_0032 - - } - catch [runtime]System.Object + .method public strict virtual instance void + MoveNext() cil managed { - IL_0022: castclass [runtime]System.Exception - IL_0027: stloc.s V_7 - IL_0029: ldc.i4.1 - IL_002a: stloc.s V_4 - IL_002c: ldloc.s V_7 - IL_002e: stloc.s V_5 - IL_0030: leave.s IL_0032 - - } - IL_0032: ldloc.s V_4 - IL_0034: brfalse.s IL_0048 - - IL_0036: ldloc.s V_5 - IL_0038: stloc.s V_7 - IL_003a: ldstr "finally" - IL_003f: call void [runtime]System.Console::WriteLine(string) - IL_0044: ldc.i4.1 - IL_0045: nop - IL_0046: br.s IL_004a - - IL_0048: ldloc.3 - IL_0049: nop - IL_004a: stloc.2 - IL_004b: ldloc.2 - IL_004c: brfalse.s IL_006b - - IL_004e: ldarg.0 - IL_004f: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0054: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0059: ldarg.0 - IL_005a: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_005f: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result - IL_0064: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) - IL_0069: leave.s IL_0079 - - IL_006b: leave.s IL_0079 - - } - catch [runtime]System.Object - { - IL_006d: castclass [runtime]System.Exception - IL_0072: stloc.s V_5 - IL_0074: ldloc.s V_5 - IL_0076: stloc.1 - IL_0077: leave.s IL_0079 - - } - IL_0079: ldloc.1 - IL_007a: stloc.s V_5 - IL_007c: ldloc.s V_5 - IL_007e: brtrue.s IL_0081 - - IL_0080: ret - - IL_0081: ldarg.0 - IL_0082: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0087: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_008c: ldloc.s V_5 - IL_008e: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) - IL_0093: ret -} + .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + bool V_2, + bool V_3, + bool V_4, + class [runtime]System.Exception V_5, + bool V_6, + class [runtime]System.Exception V_7) + IL_0000: ldarg.0 + IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint + IL_0006: stloc.0 + .try + { + IL_0007: ldc.i4.0 + IL_0008: stloc.3 + IL_0009: ldc.i4.0 + IL_000a: stloc.s V_4 + IL_000c: ldnull + IL_000d: stloc.s V_5 + .try + { + IL_000f: ldc.i4.1 + IL_0010: stloc.s V_6 + IL_0012: ldloc.s V_6 + IL_0014: stloc.3 + IL_0015: leave.s IL_0027 + + } + catch [runtime]System.Object + { + IL_0017: castclass [runtime]System.Exception + IL_001c: stloc.s V_7 + IL_001e: ldc.i4.1 + IL_001f: stloc.s V_4 + IL_0021: ldloc.s V_7 + IL_0023: stloc.s V_5 + IL_0025: leave.s IL_0027 + + } + IL_0027: ldloc.s V_4 + IL_0029: brfalse.s IL_003d + + IL_002b: ldloc.s V_5 + IL_002d: stloc.s V_7 + IL_002f: ldstr "finally" + IL_0034: call void [runtime]System.Console::WriteLine(string) + IL_0039: ldc.i4.1 + IL_003a: nop + IL_003b: br.s IL_003f + + IL_003d: ldloc.3 + IL_003e: nop + IL_003f: stloc.2 + IL_0040: ldloc.2 + IL_0041: brfalse.s IL_0060 + + IL_0043: ldarg.0 + IL_0044: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0049: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_004e: ldarg.0 + IL_004f: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0054: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result + IL_0059: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_005e: leave.s IL_006e + + IL_0060: leave.s IL_006e + + } + catch [runtime]System.Object + { + IL_0062: castclass [runtime]System.Exception + IL_0067: stloc.s V_5 + IL_0069: ldloc.s V_5 + IL_006b: stloc.1 + IL_006c: leave.s IL_006e + + } + IL_006e: ldloc.1 + IL_006f: stloc.s V_5 + IL_0071: ldloc.s V_5 + IL_0073: brtrue.s IL_0076 + + IL_0075: ret + + IL_0076: ldarg.0 + IL_0077: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_007c: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0081: ldloc.s V_5 + IL_0083: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) + IL_0088: ret + } """ ]) @@ -740,120 +711,110 @@ let testTask() = task { try 1 with e -> System.Console.WriteLine("with"); 2 } """ (fun verifier -> verifier.VerifyIL [ """ -.method public strict virtual instance void - MoveNext() cil managed -{ - .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext - - .maxstack 4 - .locals init (int32 V_0, - class [runtime]System.Exception V_1, - bool V_2, - bool V_3, - bool V_4, - class [runtime]System.Exception V_5, - bool V_6, - class [runtime]System.Exception V_7, - class [runtime]System.Exception V_8, - class [runtime]System.Exception V_9, - class [runtime]System.Exception V_10, - class [runtime]System.Exception V_11) - IL_0000: ldarg.0 - IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint - IL_0006: stloc.0 - .try - { - IL_0007: ldc.i4.0 - IL_0008: stloc.3 - IL_0009: ldc.i4.0 - IL_000a: stloc.s V_4 - IL_000c: ldnull - IL_000d: stloc.s V_5 - IL_000f: ldloc.3 - IL_0010: brfalse.s IL_0016 - - IL_0012: ldc.i4.1 - IL_0013: nop - IL_0014: br.s IL_0018 - - IL_0016: ldloc.3 - IL_0017: nop - IL_0018: stloc.3 - .try - { - IL_0019: nop - IL_001a: ldc.i4.1 - IL_001b: stloc.s V_6 - IL_001d: ldloc.s V_6 - IL_001f: stloc.3 - IL_0020: leave.s IL_0032 - - } - catch [runtime]System.Object + .method public strict virtual instance void + MoveNext() cil managed { - IL_0022: castclass [runtime]System.Exception - IL_0027: stloc.s V_7 - IL_0029: ldc.i4.1 - IL_002a: stloc.s V_4 - IL_002c: ldloc.s V_7 - IL_002e: stloc.s V_5 - IL_0030: leave.s IL_0032 - - } - IL_0032: ldloc.s V_4 - IL_0034: brfalse.s IL_004c - - IL_0036: ldloc.s V_5 - IL_0038: stloc.s V_8 - IL_003a: ldloc.s V_8 - IL_003c: stloc.s V_9 - IL_003e: ldstr "with" - IL_0043: call void [runtime]System.Console::WriteLine(string) - IL_0048: ldc.i4.1 - IL_0049: nop - IL_004a: br.s IL_004e - - IL_004c: ldloc.3 - IL_004d: nop - IL_004e: stloc.2 - IL_004f: ldloc.2 - IL_0050: brfalse.s IL_006f - - IL_0052: ldarg.0 - IL_0053: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0058: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_005d: ldarg.0 - IL_005e: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0063: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result - IL_0068: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) - IL_006d: leave.s IL_007d - - IL_006f: leave.s IL_007d - - } - catch [runtime]System.Object - { - IL_0071: castclass [runtime]System.Exception - IL_0076: stloc.s V_10 - IL_0078: ldloc.s V_10 - IL_007a: stloc.1 - IL_007b: leave.s IL_007d - - } - IL_007d: ldloc.1 - IL_007e: stloc.s V_11 - IL_0080: ldloc.s V_11 - IL_0082: brtrue.s IL_0085 - - IL_0084: ret - - IL_0085: ldarg.0 - IL_0086: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_008b: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0090: ldloc.s V_11 - IL_0092: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) - IL_0097: ret -} + .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + bool V_2, + bool V_3, + bool V_4, + class [runtime]System.Exception V_5, + bool V_6, + class [runtime]System.Exception V_7, + class [runtime]System.Exception V_8, + class [runtime]System.Exception V_9, + class [runtime]System.Exception V_10, + class [runtime]System.Exception V_11) + IL_0000: ldarg.0 + IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint + IL_0006: stloc.0 + .try + { + IL_0007: ldc.i4.0 + IL_0008: stloc.3 + IL_0009: ldc.i4.0 + IL_000a: stloc.s V_4 + IL_000c: ldnull + IL_000d: stloc.s V_5 + .try + { + IL_000f: nop + IL_0010: ldc.i4.1 + IL_0011: stloc.s V_6 + IL_0013: ldloc.s V_6 + IL_0015: stloc.3 + IL_0016: leave.s IL_0028 + + } + catch [runtime]System.Object + { + IL_0018: castclass [runtime]System.Exception + IL_001d: stloc.s V_7 + IL_001f: ldc.i4.1 + IL_0020: stloc.s V_4 + IL_0022: ldloc.s V_7 + IL_0024: stloc.s V_5 + IL_0026: leave.s IL_0028 + + } + IL_0028: ldloc.s V_4 + IL_002a: brfalse.s IL_0042 + + IL_002c: ldloc.s V_5 + IL_002e: stloc.s V_8 + IL_0030: ldloc.s V_8 + IL_0032: stloc.s V_9 + IL_0034: ldstr "with" + IL_0039: call void [runtime]System.Console::WriteLine(string) + IL_003e: ldc.i4.1 + IL_003f: nop + IL_0040: br.s IL_0044 + + IL_0042: ldloc.3 + IL_0043: nop + IL_0044: stloc.2 + IL_0045: ldloc.2 + IL_0046: brfalse.s IL_0065 + + IL_0048: ldarg.0 + IL_0049: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_004e: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0053: ldarg.0 + IL_0054: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0059: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result + IL_005e: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_0063: leave.s IL_0073 + + IL_0065: leave.s IL_0073 + + } + catch [runtime]System.Object + { + IL_0067: castclass [runtime]System.Exception + IL_006c: stloc.s V_10 + IL_006e: ldloc.s V_10 + IL_0070: stloc.1 + IL_0071: leave.s IL_0073 + + } + IL_0073: ldloc.1 + IL_0074: stloc.s V_11 + IL_0076: ldloc.s V_11 + IL_0078: brtrue.s IL_007b + + IL_007a: ret + + IL_007b: ldarg.0 + IL_007c: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0081: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0086: ldloc.s V_11 + IL_0088: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) + IL_008d: ret + } """ ]) @@ -870,90 +831,89 @@ let testTask() = task { while x > 4 do System.Console.WriteLine("loop") } """ (fun verifier -> verifier.VerifyIL [ """ -.method public strict virtual instance void - MoveNext() cil managed -{ - .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext - - .maxstack 4 - .locals init (int32 V_0, - class [runtime]System.Exception V_1, - bool V_2, - bool V_3, - bool V_4, - class [runtime]System.Exception V_5) - IL_0000: ldarg.0 - IL_0001: ldfld int32 Test/testTask@5::ResumptionPoint - IL_0006: stloc.0 - .try - { - IL_0007: ldc.i4.1 - IL_0008: stloc.3 - 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_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_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 -} + .method public strict virtual instance void + MoveNext() cil managed + { + .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + bool V_2, + bool V_3, + bool V_4, + class [runtime]System.Exception V_5) + IL_0000: ldarg.0 + IL_0001: ldfld int32 Test/testTask@5::ResumptionPoint + IL_0006: stloc.0 + .try + { + 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 + + } + 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_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 + } """ ]) @@ -969,91 +929,91 @@ let testTask() = task { while x > 4 do System.Console.WriteLine("loop") } """ (fun verifier -> verifier.VerifyIL [ """ -.method public strict virtual instance void - MoveNext() cil managed -{ - .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext - - .maxstack 4 - .locals init (int32 V_0, - class [runtime]System.Exception V_1, - bool V_2, - bool V_3, - bool V_4, - class [runtime]System.Exception V_5, - class [runtime]System.Exception V_6) - IL_0000: ldarg.0 - IL_0001: ldfld int32 Test/testTask@5::ResumptionPoint - IL_0006: stloc.0 - .try - { - IL_0007: ldc.i4.1 - IL_0008: stloc.3 - 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_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_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 -} + .method public strict virtual instance void + MoveNext() cil managed + { + .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + bool V_2, + bool V_3, + bool V_4, + class [runtime]System.Exception V_5, + class [runtime]System.Exception V_6) + IL_0000: ldarg.0 + IL_0001: ldfld int32 Test/testTask@5::ResumptionPoint + IL_0006: stloc.0 + .try + { + IL_0007: ldc.i4.1 + IL_0008: stloc.3 + IL_0009: ldloc.3 + IL_000a: brfalse.s IL_0018 + + IL_000c: nop + 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_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_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 + } """ ]) #endif @@ -1128,35 +1088,38 @@ type Generic1InGeneric1<'T>() = """ (fun verifier -> verifier.VerifyIL [ """ - .method assembly hidebysig instance class [runtime]System.Threading.Tasks.Task`1 + .method assembly hidebysig instance class [runtime]System.Threading.Tasks.Task`1 run(class [runtime]System.Threading.Tasks.Task`1 computation) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 4 - .locals init (valuetype Test/clo@7 V_0, - valuetype Test/clo@7& V_1) - IL_0000: ldloca.s V_0 - IL_0002: initobj valuetype Test/clo@7 - IL_0008: ldloca.s V_0 - IL_000a: stloc.1 - IL_000b: ldloc.1 - IL_000c: ldarg.1 - IL_000d: stfld class [runtime]System.Threading.Tasks.Task`1 valuetype Test/clo@7::computation - IL_0012: ldloc.1 - IL_0013: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/clo@7::Data - IL_0018: call valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Create() - IL_001d: stfld valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0022: ldloc.1 - IL_0023: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/clo@7::Data - IL_0028: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_002d: ldloc.1 - IL_002e: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Start>(!!0&) - IL_0033: ldloc.1 - IL_0034: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/clo@7::Data - IL_0039: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_003e: call instance class [netstandard]System.Threading.Tasks.Task`1 valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::get_Task() - IL_0043: ret + .locals init (class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder V_0, + valuetype Test/clo@7 V_1, + valuetype Test/clo@7& V_2) + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderModule::get_task() + IL_0005: stloc.0 + IL_0006: ldloca.s V_1 + IL_0008: initobj valuetype Test/clo@7 + IL_000e: ldloca.s V_1 + IL_0010: stloc.2 + IL_0011: ldloc.2 + IL_0012: ldarg.1 + IL_0013: stfld class [runtime]System.Threading.Tasks.Task`1 valuetype Test/clo@7::computation + IL_0018: ldloc.2 + IL_0019: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/clo@7::Data + IL_001e: call valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Create() + IL_0023: stfld valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0028: ldloc.2 + IL_0029: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/clo@7::Data + IL_002e: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0033: ldloc.2 + IL_0034: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Start>(!!0&) + IL_0039: ldloc.2 + IL_003a: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/clo@7::Data + IL_003f: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0044: call instance class [netstandard]System.Threading.Tasks.Task`1 valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::get_Task() + IL_0049: ret } """ """ diff --git a/tests/fsharp/core/state-machines/neg-resumable-02.bsl b/tests/fsharp/core/state-machines/neg-resumable-02.bsl index 6ca06f293de..3cd31230c93 100644 --- a/tests/fsharp/core/state-machines/neg-resumable-02.bsl +++ b/tests/fsharp/core/state-machines/neg-resumable-02.bsl @@ -1,6 +1,4 @@ neg-resumable-02.fsx(22,9,32,54): ilxgen error FS3512: This state machine is not statically compilable and no alternative is available. A 'let rec' occured in the resumable code specification. Use an 'if __useResumableCode then else ' to give an alternative. -neg-resumable-02.fsx(41,9,54,14): ilxgen error FS3511: This state machine is not statically compilable. A 'let rec' occured in the resumable code specification. An alternative dynamic implementation will be used, which may be slower. Consider adjusting your code to ensure this state machine is statically compilable, or else suppress this warning. - neg-resumable-02.fsx(75,9,75,13): ilxgen error FS3511: This state machine is not statically compilable. A 'let rec' occured in the resumable code specification. An alternative dynamic implementation will be used, which may be slower. Consider adjusting your code to ensure this state machine is statically compilable, or else suppress this warning. diff --git a/tests/fsharp/typecheck/sigs/neg59.bsl b/tests/fsharp/typecheck/sigs/neg59.bsl index fc509efa297..624750b9352 100644 --- a/tests/fsharp/typecheck/sigs/neg59.bsl +++ b/tests/fsharp/typecheck/sigs/neg59.bsl @@ -33,9 +33,9 @@ neg59.fs(89,15,89,18): typecheck error FS3141: 'try/finally' expressions may not neg59.fs(95,15,95,18): typecheck error FS3141: 'try/finally' expressions may not be used in queries -neg59.fs(102,23,102,64): typecheck error FS3142: 'use' expressions may not be used in queries +neg59.fs(102,15,102,64): typecheck error FS3142: 'use' expressions may not be used in queries -neg59.fs(108,23,108,64): typecheck error FS3142: 'use' expressions may not be used in queries +neg59.fs(108,15,108,64): typecheck error FS3142: 'use' expressions may not be used in queries neg59.fs(113,15,113,25): typecheck error FS3140: 'while' expressions may not be used in queries diff --git a/tests/fsharp/typecheck/sigs/neg61.bsl b/tests/fsharp/typecheck/sigs/neg61.bsl index e4657e510b1..1493d479a29 100644 --- a/tests/fsharp/typecheck/sigs/neg61.bsl +++ b/tests/fsharp/typecheck/sigs/neg61.bsl @@ -51,13 +51,13 @@ neg61.fs(64,13,64,20): typecheck error FS3145: This is not a known query operato neg61.fs(69,13,69,23): typecheck error FS3140: 'while' expressions may not be used in queries -neg61.fs(74,13,74,32): typecheck error FS3139: In queries, use the form 'for x in n .. m do ...' for ranging over integers +neg61.fs(74,13,74,16): typecheck error FS3139: In queries, use the form 'for x in n .. m do ...' for ranging over integers neg61.fs(79,13,79,16): typecheck error FS3146: 'try/with' expressions may not be used in queries neg61.fs(86,13,86,16): typecheck error FS3141: 'try/finally' expressions may not be used in queries -neg61.fs(92,21,92,70): typecheck error FS3142: 'use' expressions may not be used in queries +neg61.fs(92,13,92,70): typecheck error FS3142: 'use' expressions may not be used in queries neg61.fs(97,13,97,33): typecheck error FS3143: 'let!', 'use!' and 'do!' expressions may not be used in queries diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl index 821abbd9685..b7deae82822 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.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 AsyncExpressionSteppingTest1 { @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000B1 } .module AsyncExpressionSteppingTest1.dll -// MVID: {611B0EC4-6394-B5D4-A745-0383C40E1B61} +// MVID: {61E07031-6394-B5D4-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06680000 +// Image base: 0x06B60000 // =============== CLASS MEMBERS DECLARATION =================== @@ -116,6 +116,7 @@ .line 6,6 : 9,14 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_0005: stloc.0 + .line 6,6 : 9,14 '' IL_0006: ldloc.0 IL_0007: ldloc.0 IL_0008: newobj instance void AsyncExpressionSteppingTest1/AsyncExpressionSteppingTest1/f1@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl index c5227768562..23484cad54f 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.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 AsyncExpressionSteppingTest2 { @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000B1 } .module AsyncExpressionSteppingTest2.dll -// MVID: {611B0EC4-6394-D499-A745-0383C40E1B61} +// MVID: {61EFEE1F-6394-D499-A745-03831FEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06860000 +// Image base: 0x06A90000 // =============== CLASS MEMBERS DECLARATION =================== @@ -77,16 +77,18 @@ .method public strict virtual instance bool Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 15 (0xf) + // Code size 16 (0x10) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 23,29 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest2.fs' - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-1'::x - IL_0006: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_000b: ldc.i4.4 - IL_000c: clt - IL_000e: ret + .line 6,6 : 17,29 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest2.fs' + IL_0000: nop + .line 6,6 : 23,29 '' + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-1'::x + IL_0007: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_000c: ldc.i4.4 + IL_000d: clt + IL_000f: ret } // end of method 'f2@6-1'::Invoke } // end of class 'f2@6-1' @@ -142,6 +144,110 @@ } // end of class 'f2@7-2' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@6-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 guard + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> whileAsync + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 guard, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> whileAsync) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-3'::guard + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-3'::whileAsync + IL_0014: ret + } // end of method 'f2@6-3'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + // Code size 32 (0x20) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-3'::guard + IL_0006: ldnull + IL_0007: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_000c: brfalse.s IL_001a + + .line 100001,100001 : 0,0 '' + IL_000e: ldarg.0 + IL_000f: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-3'::whileAsync + IL_0014: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::get_contents() + IL_0019: ret + + .line 100001,100001 : 0,0 '' + IL_001a: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::get_UnitAsync() + IL_001f: ret + } // end of method 'f2@6-3'::Invoke + + } // end of class 'f2@6-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@6-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> part2 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> part2) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-4'::computation + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-4'::part2 + IL_0014: ret + } // end of method 'f2@6-4'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-4'::computation + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-4'::part2 + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0014: ret + } // end of method 'f2@6-4'::Invoke + + } // end of class 'f2@6-4' + .class auto ansi serializable sealed nested assembly beforefieldinit f2@6 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -172,27 +278,60 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 53 (0x35) - .maxstack 9 - .line 6,6 : 17,29 '' + // Code size 105 (0x69) + .maxstack 7 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, + [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> V_3, + [4] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_4) + .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::builder@ - IL_0006: ldarg.0 - IL_0007: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::x - IL_000c: newobj instance void AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0011: ldarg.0 - IL_0012: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::builder@ - IL_0017: ldarg.0 - IL_0018: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::x - IL_001d: ldarg.0 - IL_001e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::builder@ - IL_0023: newobj instance void AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@7-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + IL_0006: stloc.0 + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::x + IL_000d: newobj instance void AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0012: stloc.1 + IL_0013: ldarg.0 + IL_0014: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::builder@ + IL_0019: ldarg.0 + IL_001a: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::x + IL_001f: ldarg.0 + IL_0020: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::builder@ + IL_0025: newobj instance void AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@7-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) - IL_0028: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_002d: tail. - IL_002f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::While(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) - IL_0034: ret + IL_002a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_002f: stloc.2 + .line 100001,100001 : 0,0 '' + IL_0030: ldloc.1 + IL_0031: ldnull + IL_0032: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0037: brfalse.s IL_0063 + + .line 100001,100001 : 0,0 '' + IL_0039: ldnull + IL_003a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::.ctor(!0) + IL_003f: stloc.3 + IL_0040: ldloc.3 + IL_0041: ldloc.1 + IL_0042: ldloc.3 + IL_0043: newobj instance void AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>) + IL_0048: stloc.s V_4 + IL_004a: ldloc.2 + IL_004b: ldloc.s V_4 + IL_004d: newobj instance void AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0052: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0057: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::set_contents(!0) + IL_005c: ldloc.3 + IL_005d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::get_contents() + IL_0062: ret + + .line 100001,100001 : 0,0 '' + IL_0063: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::get_UnitAsync() + IL_0068: ret } // end of method f2@6::Invoke } // end of class f2@6 @@ -211,6 +350,7 @@ .line 6,6 : 9,14 '' IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_000c: stloc.1 + .line 6,6 : 9,14 '' IL_000d: ldloc.1 IL_000e: ldloc.0 IL_000f: ldloc.1 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.il.bsl index 71cebc43a5d..468d3191b03 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.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 AsyncExpressionSteppingTest3 { @@ -36,13 +36,13 @@ // Offset: 0x00000270 Length: 0x000000B1 } .module AsyncExpressionSteppingTest3.dll -// MVID: {611C52A3-6394-F35E-A745-0383A3521C61} +// MVID: {61EFEE1F-6394-F35E-A745-03831FEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06660000 +// Image base: 0x07220000 // =============== CLASS MEMBERS DECLARATION =================== @@ -82,8 +82,6 @@ { // Code size 15 (0xf) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 10,10 : 17,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest3.fs' IL_0000: ldarg.1 IL_0001: ldarg.0 IL_0002: ldfld int32 AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/'f3@10-1'::'value' @@ -127,7 +125,8 @@ [2] int32 z, [3] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_3, [4] int32 V_4) - .line 5,5 : 17,30 '' + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 17,30 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest3.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.0 @@ -174,6 +173,7 @@ .line 5,5 : 9,14 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_0005: stloc.0 + .line 5,5 : 9,14 '' IL_0006: ldloc.0 IL_0007: ldloc.0 IL_0008: newobj instance void AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/f3@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl index a411614d6f9..f971f80213c 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.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 AsyncExpressionSteppingTest4 { @@ -36,13 +36,13 @@ // Offset: 0x00000270 Length: 0x000000B1 } .module AsyncExpressionSteppingTest4.dll -// MVID: {611C52A3-6394-6D4B-A745-0383A3521C61} +// MVID: {61EFEE1F-6394-6D4B-A745-03831FEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B50000 +// Image base: 0x06840000 // =============== CLASS MEMBERS DECLARATION =================== @@ -82,8 +82,6 @@ { // Code size 15 (0xf) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 10,10 : 21,29 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest4.fs' IL_0000: ldarg.1 IL_0001: ldarg.0 IL_0002: ldfld int32 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@10-2'::'value' @@ -125,39 +123,42 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 56 (0x38) + // Code size 57 (0x39) .maxstack 6 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 y, [1] int32 z, [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, [3] int32 V_3) + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 6,6 : 17,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest4.fs' + IL_0000: nop .line 7,7 : 21,34 '' - 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.0 + 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.0 .line 8,8 : 21,27 '' - IL_0007: ldloc.0 - 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.0 + IL_0009: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_000e: nop .line 9,9 : 21,36 '' - IL_000e: ldarg.0 - IL_000f: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@7-1'::x - IL_0014: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0019: ldloc.0 - IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_001f: add - IL_0020: stloc.1 + IL_000f: ldarg.0 + IL_0010: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@7-1'::x + IL_0015: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_001a: ldloc.0 + IL_001b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0020: add + IL_0021: stloc.1 .line 10,10 : 21,29 '' - IL_0021: ldarg.0 - IL_0022: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@7-1'::builder@ - IL_0027: stloc.2 - IL_0028: ldloc.1 - IL_0029: stloc.3 - IL_002a: ldloc.3 - IL_002b: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@10-2'::.ctor(int32) - IL_0030: tail. - IL_0032: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0037: ret + IL_0022: ldarg.0 + IL_0023: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@7-1'::builder@ + IL_0028: stloc.2 + IL_0029: ldloc.1 + IL_002a: stloc.3 + IL_002b: ldloc.3 + IL_002c: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@10-2'::.ctor(int32) + IL_0031: tail. + IL_0033: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0038: ret } // end of method 'f4@7-1'::Invoke } // end of class 'f4@7-1' @@ -184,23 +185,62 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 30 (0x1e) + // Code size 31 (0x1f) .maxstack 8 + .line 11,11 : 17,24 '' + IL_0000: nop .line 12,12 : 20,26 '' - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-3'::x - IL_0006: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_000b: nop + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@12-3'::x + IL_0007: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_000c: nop .line 13,13 : 20,34 '' - IL_000c: ldstr "done" - IL_0011: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0016: tail. - IL_0018: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_001d: ret + IL_000d: ldstr "done" + IL_0012: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0017: tail. + IL_0019: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_001e: ret } // end of method 'f4@12-3'::Invoke } // end of class 'f4@12-3' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@6-5' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-5'::compensation + IL_000d: ret + } // end of method 'f4@6-5'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-5'::compensation + IL_0006: ldnull + IL_0007: tail. + IL_0009: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_000e: ret + } // end of method 'f4@6-5'::Invoke + + } // end of class 'f4@6-5' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@6-4' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { @@ -234,19 +274,19 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed { - // Code size 21 (0x15) + // Code size 26 (0x1a) .maxstack 8 - .line 6,6 : 17,20 '' IL_0000: ldarg.1 IL_0001: ldarg.0 IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-4'::computation IL_0007: ldarg.0 IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-4'::compensation - IL_000d: tail. - IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + IL_000d: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-5'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0012: tail. + IL_0014: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0014: ret + IL_0019: ret } // end of method 'f4@6-4'::Invoke } // end of class 'f4@6-4' @@ -286,7 +326,6 @@ 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.0 - .line 6,6 : 17,20 '' IL_0007: ldarg.0 IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/f4@5::builder@ IL_000d: stloc.1 @@ -322,6 +361,7 @@ .line 5,5 : 9,14 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_0005: stloc.0 + .line 5,5 : 9,14 '' IL_0006: ldloc.0 IL_0007: ldloc.0 IL_0008: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/f4@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl index 8ecc211736a..8559ede9e25 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl @@ -13,7 +13,12 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 5:0:0:0 + .ver 6:0:0:0 +} +.assembly extern netstandard +{ + .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q + .ver 2:0:0:0 } .assembly AsyncExpressionSteppingTest5 { @@ -36,13 +41,13 @@ // Offset: 0x000002B0 Length: 0x000000BE } .module AsyncExpressionSteppingTest5.dll -// MVID: {611C52A3-6394-30E8-A745-0383A3521C61} +// MVID: {61EFEE1F-6394-30E8-A745-03831FEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B50000 +// Image base: 0x06880000 // =============== CLASS MEMBERS DECLARATION =================== @@ -84,7 +89,7 @@ .maxstack 5 .locals init ([0] int32 x) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 17,31 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest5.fs' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest5.fs' IL_0000: ldarg.1 IL_0001: stloc.0 .line 7,7 : 20,35 '' @@ -106,137 +111,199 @@ } // end of class 'f7@6-1' - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-3' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-2' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 resource .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 resource) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-3'::builder@ + IL_0008: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-2'::resource IL_000d: ret - } // end of method 'f7@9-3'::.ctor + } // end of method 'f7@6-2'::.ctor - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 - Invoke(int32 _arg2) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed { - // Code size 48 (0x30) - .maxstack 5 - .locals init ([0] int32 x) - .line 9,9 : 17,31 '' - IL_0000: ldarg.1 - IL_0001: stloc.0 - .line 10,10 : 20,37 '' - IL_0002: ldstr "goodbye" - IL_0007: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0011: pop - .line 11,11 : 20,39 '' - IL_0012: ldstr "goodbye 2" - IL_0017: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_001c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0021: pop - IL_0022: ldarg.0 - IL_0023: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-3'::builder@ - IL_0028: tail. - IL_002a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Zero() - IL_002f: ret - } // end of method 'f7@9-3'::Invoke + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-2'::resource + IL_0006: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_000b: nop + IL_000c: ldnull + IL_000d: ret + } // end of method 'f7@6-2'::Invoke - } // end of class 'f7@9-3' + } // end of class 'f7@6-2' - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-2' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-5' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 ie .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body, + class [mscorlib]System.Collections.Generic.IEnumerator`1 ie) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 14 (0xe) + // Code size 21 (0x15) .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-2'::builder@ - IL_000d: ret - } // end of method 'f7@9-2'::.ctor + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::body + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::ie + IL_0014: ret + } // end of method 'f7@6-5'::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed { - // Code size 30 (0x1e) + // Code size 25 (0x19) .maxstack 8 - .line 9,9 : 17,31 '' IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-2'::builder@ - IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5::get_es() - IL_000b: ldarg.0 - IL_000c: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-2'::builder@ - IL_0011: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) - IL_0016: tail. - IL_0018: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::For(class [mscorlib]System.Collections.Generic.IEnumerable`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_001d: ret - } // end of method 'f7@9-2'::Invoke + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::body + IL_0006: ldarg.0 + IL_0007: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::ie + IL_000c: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0011: tail. + IL_0013: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::Invoke(!0) + IL_0018: ret + } // end of method 'f7@6-5'::Invoke - } // end of class 'f7@9-2' + } // end of class 'f7@6-5' - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-4' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-6' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation2 + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> computation .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation2) cil managed + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> computation) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::computation2 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-6'::computation IL_000d: ret - } // end of method 'f7@6-4'::.ctor + } // end of method 'f7@6-6'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 33 (0x21) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarga.s ctxt + IL_0002: call instance bool valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::get_IsCancellationRequested() + IL_0007: brfalse.s IL_0011 + + .line 100001,100001 : 0,0 '' + IL_0009: ldarga.s ctxt + IL_000b: call instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::OnCancellation() + IL_0010: ret + + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.1 + IL_0012: ldnull + IL_0013: ldarg.0 + IL_0014: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-6'::computation + IL_0019: tail. + IL_001b: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::CallThenInvoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !!1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0020: ret + } // end of method 'f7@6-6'::Invoke + + } // end of class 'f7@6-6' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-7' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 ie + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> whileAsync + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 ie, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> whileAsync) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-7'::ie + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-7'::whileAsync + IL_0014: ret + } // end of method 'f7@6-7'::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed { - // Code size 7 (0x7) + // Code size 31 (0x1f) .maxstack 8 - .line 6,6 : 17,31 '' + .line 6,6 : 23,25 '' IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::computation2 - IL_0006: ret - } // end of method 'f7@6-4'::Invoke + IL_0001: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-7'::ie + IL_0006: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() + IL_000b: brfalse.s IL_0019 - } // end of class 'f7@6-4' + .line 100001,100001 : 0,0 '' + IL_000d: ldarg.0 + IL_000e: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-7'::whileAsync + IL_0013: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::get_contents() + IL_0018: ret - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-5' + .line 100001,100001 : 0,0 '' + IL_0019: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::get_UnitAsync() + IL_001e: ret + } // end of method 'f7@6-7'::Invoke + + } // end of class 'f7@6-7' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-8' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation1 + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -245,7 +312,7 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation1, + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> part2) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -256,116 +323,1000 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::computation1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-8'::computation IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::part2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-8'::part2 IL_0014: ret - } // end of method 'f7@6-5'::.ctor + } // end of method 'f7@6-8'::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed { // Code size 21 (0x15) .maxstack 8 - .line 6,6 : 17,31 '' IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::computation1 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-8'::computation IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::part2 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-8'::part2 IL_000d: tail. IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_0014: ret - } // end of method 'f7@6-5'::Invoke + } // end of method 'f7@6-8'::Invoke - } // end of class 'f7@6-5' + } // end of class 'f7@6-8' - .class auto ansi serializable sealed nested assembly beforefieldinit f7@6 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-4' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::body IL_000d: ret - } // end of method f7@6::.ctor + } // end of method 'f7@6-4'::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + Invoke(class [mscorlib]System.Collections.Generic.IEnumerator`1 ie) cil managed { - // Code size 80 (0x50) + // Code size 79 (0x4f) .maxstack 7 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, - [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, - [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, + [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> V_2, [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) - .line 6,6 : 17,31 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ - IL_000d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5::get_es() - IL_0012: ldarg.0 - IL_0013: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ - IL_0018: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) - IL_001d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::For(class [mscorlib]System.Collections.Generic.IEnumerable`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0022: stloc.1 - IL_0023: ldarg.0 - IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ - IL_0029: ldarg.0 - IL_002a: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ - IL_002f: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) - IL_0034: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0039: stloc.2 - IL_003a: ldloc.2 - IL_003b: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) - IL_0040: stloc.3 - IL_0041: ldloc.1 - IL_0042: ldloc.3 - IL_0043: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::body + IL_0006: ldarg.1 + IL_0007: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + class [mscorlib]System.Collections.Generic.IEnumerator`1) + IL_000c: stloc.1 + IL_000d: ldloc.1 + IL_000e: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-6'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0013: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0018: stloc.0 + .line 6,6 : 23,25 '' + IL_0019: ldarg.1 + IL_001a: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() + IL_001f: brfalse.s IL_0049 + + .line 100001,100001 : 0,0 '' + IL_0021: ldnull + IL_0022: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::.ctor(!0) + IL_0027: stloc.2 + IL_0028: ldloc.2 + IL_0029: ldarg.1 + IL_002a: ldloc.2 + IL_002b: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-7'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>) + IL_0030: stloc.3 + IL_0031: ldloc.0 + IL_0032: ldloc.3 + IL_0033: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-8'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0048: tail. - IL_004a: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_004f: ret - } // end of method f7@6::Invoke + IL_0038: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_003d: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::set_contents(!0) + IL_0042: ldloc.2 + IL_0043: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::get_contents() + IL_0048: ret - } // end of class f7@6 + .line 100001,100001 : 0,0 '' + IL_0049: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::get_UnitAsync() + IL_004e: ret + } // end of method 'f7@6-4'::Invoke - .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 - get_es() cil managed + } // end of class 'f7@6-4' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - // Code size 6 (0x6) - .maxstack 8 - IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$AsyncExpressionSteppingTest5::es@4 - IL_0005: ret - } // end of method AsyncExpressionSteppingTest5::get_es + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 resource + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body, + class [mscorlib]System.Collections.Generic.IEnumerator`1 resource) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-3'::body + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-3'::resource + IL_0014: ret + } // end of method 'f7@6-3'::.ctor - .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 - f7() cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 26 (0x1a) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-3'::resource + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-3'::body + IL_000d: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0012: tail. + IL_0014: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::CallThenInvoke>(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !!1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0019: ret + } // end of method 'f7@6-3'::Invoke + + } // end of class 'f7@6-3' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-10' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 { - // Code size 21 (0x15) - .maxstack 4 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) - .line 6,6 : 9,14 '' - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() - IL_0005: stloc.0 + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 disposeFunction + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 disposeFunction) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-10'::disposeFunction + IL_000d: ret + } // end of method 'f7@6-10'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-10'::disposeFunction + IL_0006: ldnull + IL_0007: tail. + IL_0009: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_000e: ret + } // end of method 'f7@6-10'::Invoke + + } // end of class 'f7@6-10' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-9' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 disposeFunction + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 disposeFunction, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-9'::disposeFunction + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-9'::computation + IL_0014: ret + } // end of method 'f7@6-9'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 26 (0x1a) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-9'::computation + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-9'::disposeFunction + IL_000d: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-10'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0012: tail. + IL_0014: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0019: ret + } // end of method 'f7@6-9'::Invoke + + } // end of class 'f7@6-9' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-12' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-12'::builder@ + IL_000d: ret + } // end of method 'f7@9-12'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + Invoke(int32 _arg2) cil managed + { + // Code size 48 (0x30) + .maxstack 5 + .locals init ([0] int32 x) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 10,10 : 20,37 '' + IL_0002: ldstr "goodbye" + IL_0007: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0011: pop + .line 11,11 : 20,39 '' + IL_0012: ldstr "goodbye 2" + IL_0017: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0021: pop + IL_0022: ldarg.0 + IL_0023: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-12'::builder@ + IL_0028: tail. + IL_002a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Zero() + IL_002f: ret + } // end of method 'f7@9-12'::Invoke + + } // end of class 'f7@9-12' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-13' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 resource + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 resource) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-13'::resource + IL_000d: ret + } // end of method 'f7@9-13'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-13'::resource + IL_0006: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_000b: nop + IL_000c: ldnull + IL_000d: ret + } // end of method 'f7@9-13'::Invoke + + } // end of class 'f7@9-13' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-16' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 ie + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body, + class [mscorlib]System.Collections.Generic.IEnumerator`1 ie) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-16'::body + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-16'::ie + IL_0014: ret + } // end of method 'f7@9-16'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + // Code size 25 (0x19) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-16'::body + IL_0006: ldarg.0 + IL_0007: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-16'::ie + IL_000c: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0011: tail. + IL_0013: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::Invoke(!0) + IL_0018: ret + } // end of method 'f7@9-16'::Invoke + + } // end of class 'f7@9-16' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-17' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> computation + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> computation) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-17'::computation + IL_000d: ret + } // end of method 'f7@9-17'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 33 (0x21) + .maxstack 8 + .line 100001,100001 : 0,0 '' + IL_0000: ldarga.s ctxt + IL_0002: call instance bool valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::get_IsCancellationRequested() + IL_0007: brfalse.s IL_0011 + + .line 100001,100001 : 0,0 '' + IL_0009: ldarga.s ctxt + IL_000b: call instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::OnCancellation() + IL_0010: ret + + .line 100001,100001 : 0,0 '' + IL_0011: ldarg.1 + IL_0012: ldnull + IL_0013: ldarg.0 + IL_0014: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-17'::computation + IL_0019: tail. + IL_001b: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::CallThenInvoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !!1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0020: ret + } // end of method 'f7@9-17'::Invoke + + } // end of class 'f7@9-17' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-18' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 ie + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> whileAsync + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 ie, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> whileAsync) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-18'::ie + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-18'::whileAsync + IL_0014: ret + } // end of method 'f7@9-18'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + // Code size 31 (0x1f) + .maxstack 8 + .line 9,9 : 23,25 '' + IL_0000: ldarg.0 + IL_0001: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-18'::ie + IL_0006: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() + IL_000b: brfalse.s IL_0019 + + .line 100001,100001 : 0,0 '' + IL_000d: ldarg.0 + IL_000e: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-18'::whileAsync + IL_0013: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::get_contents() + IL_0018: ret + + .line 100001,100001 : 0,0 '' + IL_0019: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::get_UnitAsync() + IL_001e: ret + } // end of method 'f7@9-18'::Invoke + + } // end of class 'f7@9-18' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-19' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> part2 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> part2) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-19'::computation + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-19'::part2 + IL_0014: ret + } // end of method 'f7@9-19'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-19'::computation + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-19'::part2 + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0014: ret + } // end of method 'f7@9-19'::Invoke + + } // end of class 'f7@9-19' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-15' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-15'::body + IL_000d: ret + } // end of method 'f7@9-15'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + Invoke(class [mscorlib]System.Collections.Generic.IEnumerator`1 ie) cil managed + { + // Code size 79 (0x4f) + .maxstack 7 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, + [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> V_2, + [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-15'::body + IL_0006: ldarg.1 + IL_0007: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-16'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + class [mscorlib]System.Collections.Generic.IEnumerator`1) + IL_000c: stloc.1 + IL_000d: ldloc.1 + IL_000e: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-17'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0013: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0018: stloc.0 + .line 9,9 : 23,25 '' + IL_0019: ldarg.1 + IL_001a: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() + IL_001f: brfalse.s IL_0049 + + .line 100001,100001 : 0,0 '' + IL_0021: ldnull + IL_0022: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::.ctor(!0) + IL_0027: stloc.2 + IL_0028: ldloc.2 + IL_0029: ldarg.1 + IL_002a: ldloc.2 + IL_002b: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-18'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>) + IL_0030: stloc.3 + IL_0031: ldloc.0 + IL_0032: ldloc.3 + IL_0033: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-19'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0038: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_003d: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::set_contents(!0) + IL_0042: ldloc.2 + IL_0043: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::get_contents() + IL_0048: ret + + .line 100001,100001 : 0,0 '' + IL_0049: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::get_UnitAsync() + IL_004e: ret + } // end of method 'f7@9-15'::Invoke + + } // end of class 'f7@9-15' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-14' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 resource + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body, + class [mscorlib]System.Collections.Generic.IEnumerator`1 resource) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-14'::body + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-14'::resource + IL_0014: ret + } // end of method 'f7@9-14'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 26 (0x1a) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-14'::resource + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-14'::body + IL_000d: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-15'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0012: tail. + IL_0014: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::CallThenInvoke>(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + !!1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0019: ret + } // end of method 'f7@9-14'::Invoke + + } // end of class 'f7@9-14' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-21' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 disposeFunction + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 disposeFunction) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-21'::disposeFunction + IL_000d: ret + } // end of method 'f7@9-21'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-21'::disposeFunction + IL_0006: ldnull + IL_0007: tail. + IL_0009: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_000e: ret + } // end of method 'f7@9-21'::Invoke + + } // end of class 'f7@9-21' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-20' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 disposeFunction + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 disposeFunction, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-20'::disposeFunction + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-20'::computation + IL_0014: ret + } // end of method 'f7@9-20'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 26 (0x1a) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-20'::computation + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-20'::disposeFunction + IL_000d: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-21'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0012: tail. + IL_0014: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) + IL_0019: ret + } // end of method 'f7@9-20'::Invoke + + } // end of class 'f7@9-20' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-11' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-11'::builder@ + IL_000d: ret + } // end of method 'f7@9-11'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + // Code size 71 (0x47) + .maxstack 6 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, + [1] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2, + [3] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_3, + [4] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_4, + [5] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_5) + .line 9,9 : 17,20 '' + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-11'::builder@ + IL_0006: stloc.0 + IL_0007: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5::get_es() + IL_000c: stloc.1 + IL_000d: ldarg.0 + IL_000e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-11'::builder@ + IL_0013: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-12'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_0018: stloc.2 + IL_0019: ldloc.1 + IL_001a: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_001f: stloc.3 + IL_0020: ldloc.3 + IL_0021: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-13'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1) + IL_0026: stloc.s V_4 + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-14'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + class [mscorlib]System.Collections.Generic.IEnumerator`1) + IL_002f: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0034: stloc.s V_5 + IL_0036: ldloc.s V_4 + IL_0038: ldloc.s V_5 + IL_003a: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-20'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) + IL_003f: tail. + IL_0041: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0046: ret + } // end of method 'f7@9-11'::Invoke + + } // end of class 'f7@9-11' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-22' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation2 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation2) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-22'::computation2 + IL_000d: ret + } // end of method 'f7@6-22'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-22'::computation2 + IL_0006: ret + } // end of method 'f7@6-22'::Invoke + + } // end of class 'f7@6-22' + + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-23' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation1 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> part2 + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> part2) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-23'::computation1 + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-23'::part2 + IL_0014: ret + } // end of method 'f7@6-23'::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn + Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed + { + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-23'::computation1 + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-23'::part2 + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0014: ret + } // end of method 'f7@6-23'::Invoke + + } // end of class 'f7@6-23' + + .class auto ansi serializable sealed nested assembly beforefieldinit f7@6 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> + { + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + .method assembly specialname rtspecialname + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ + IL_000d: ret + } // end of method f7@6::.ctor + + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed + { + // Code size 130 (0x82) + .maxstack 6 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, + [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, + [3] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_3, + [4] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_4, + [5] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_5, + [6] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_6, + [7] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_7, + [8] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_8, + [9] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_9) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ + IL_0006: stloc.0 + .line 6,6 : 17,20 '' + IL_0007: ldarg.0 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ + IL_000d: stloc.2 + IL_000e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5::get_es() + IL_0013: stloc.3 + IL_0014: ldarg.0 + IL_0015: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ + IL_001a: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_001f: stloc.s V_4 + IL_0021: ldloc.3 + IL_0022: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0027: stloc.s V_5 + IL_0029: ldloc.s V_5 + IL_002b: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-2'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1) + IL_0030: stloc.s V_6 + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + class [mscorlib]System.Collections.Generic.IEnumerator`1) + IL_003b: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0040: stloc.s V_7 + IL_0042: ldloc.s V_6 + IL_0044: ldloc.s V_7 + IL_0046: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-9'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) + IL_004b: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0050: stloc.1 + IL_0051: ldarg.0 + IL_0052: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ + IL_0057: ldarg.0 + IL_0058: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ + IL_005d: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-11'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_0062: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0067: stloc.s V_8 + IL_0069: ldloc.s V_8 + IL_006b: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-22'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) + IL_0070: stloc.s V_9 + IL_0072: ldloc.1 + IL_0073: ldloc.s V_9 + IL_0075: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-23'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_007a: tail. + IL_007c: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_0081: ret + } // end of method f7@6::Invoke + + } // end of class f7@6 + + .method public specialname static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + get_es() cil managed + { + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$AsyncExpressionSteppingTest5::es@4 + IL_0005: ret + } // end of method AsyncExpressionSteppingTest5::get_es + + .method public static class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + f7() cil managed + { + // Code size 21 (0x15) + .maxstack 4 + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0) + .line 6,6 : 9,14 '' + IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() + IL_0005: stloc.0 + .line 6,6 : 9,14 '' IL_0006: ldloc.0 IL_0007: ldloc.0 IL_0008: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.il.bsl index 8fc65940265..1ece0a88b4d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.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 AsyncExpressionSteppingTest6 { @@ -36,13 +36,13 @@ // Offset: 0x000002A0 Length: 0x000000BE } .module AsyncExpressionSteppingTest6.dll -// MVID: {611C52A3-6394-4FAD-A745-0383A3521C61} +// MVID: {61EFEE1F-6394-4FAD-A745-03831FEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B60000 +// Image base: 0x067A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -82,8 +82,6 @@ { // Code size 15 (0xf) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 10,10 : 17,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest6.fs' IL_0000: ldarg.1 IL_0001: ldarg.0 IL_0002: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f2@10-1'::'value' @@ -127,7 +125,8 @@ [2] int32 z, [3] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_3, [4] int32 V_4) - .line 5,5 : 17,30 '' + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 17,30 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest6.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.0 @@ -192,7 +191,6 @@ { // Code size 15 (0xf) .maxstack 8 - .line 20,20 : 17,25 '' IL_0000: ldarg.1 IL_0001: ldarg.0 IL_0002: ldfld int32 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@20-5'::'value' @@ -245,7 +243,7 @@ [1] int32 z, [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, [3] int32 V_3) - .line 18,18 : 17,31 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 19,19 : 17,37 '' @@ -308,7 +306,6 @@ { // Code size 21 (0x15) .maxstack 8 - .line 18,18 : 17,31 '' IL_0000: ldarg.1 IL_0001: ldarg.0 IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@18-6'::computation @@ -360,7 +357,7 @@ [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, [3] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_3, [4] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_4) - .line 15,15 : 17,31 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 16,16 : 17,30 '' @@ -432,7 +429,6 @@ { // Code size 21 (0x15) .maxstack 8 - .line 15,15 : 17,31 '' IL_0000: ldarg.1 IL_0001: ldarg.0 IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@15-7'::computation @@ -483,7 +479,7 @@ [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) - .line 14,14 : 17,31 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 15,15 : 17,31 '' @@ -545,7 +541,6 @@ { // Code size 21 (0x15) .maxstack 8 - .line 14,14 : 17,31 '' IL_0000: ldarg.1 IL_0001: ldarg.0 IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@14-8'::computation @@ -591,7 +586,7 @@ [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_1, [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) - .line 13,13 : 17,31 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 14,14 : 17,31 '' @@ -652,7 +647,6 @@ { // Code size 21 (0x15) .maxstack 8 - .line 13,13 : 17,31 '' IL_0000: ldarg.1 IL_0001: ldarg.0 IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/'f3@13-9'::computation @@ -727,6 +721,7 @@ .line 5,5 : 9,14 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_0005: stloc.0 + .line 5,5 : 9,14 '' IL_0006: ldloc.0 IL_0007: ldloc.0 IL_0008: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/f2@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) @@ -744,6 +739,7 @@ .line 13,13 : 9,14 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_0005: stloc.0 + .line 13,13 : 9,14 '' IL_0006: ldloc.0 IL_0007: ldloc.0 IL_0008: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/f3@13::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Default.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Default.il.bsl index 9584bf6b19d..a1c4da1453b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Default.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Default.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 Default { @@ -36,13 +36,13 @@ // Offset: 0x000003F8 Length: 0x000000BA } .module Default.dll -// MVID: {611C4D7D-AAA9-67BB-A745-03837D4D1C61} +// MVID: {61E07031-AAA9-67BB-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x070A0000 +// Image base: 0x073F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -67,7 +67,6 @@ IL_0001: callvirt instance void [mscorlib]System.Attribute::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 8,8 : 6,21 '' IL_0008: ret } // end of method ExportAttribute::.ctor diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Field.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Field.il.bsl index 4eb09976030..ec3e916229c 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Field.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Field.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 Field { @@ -36,13 +36,13 @@ // Offset: 0x000003F0 Length: 0x000000B8 } .module Field.dll -// MVID: {611C4D7D-96F8-CD6E-A745-03837D4D1C61} +// MVID: {61E07031-96F8-CD6E-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06AD0000 +// Image base: 0x052B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -67,7 +67,6 @@ IL_0001: callvirt instance void [mscorlib]System.Attribute::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 8,8 : 6,21 '' IL_0008: ret } // end of method ExportAttribute::.ctor diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Property.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Property.il.bsl index 1e5bb37b225..a210d3fdb2b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Property.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AttributeTargets/Property.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 Property { @@ -36,13 +36,13 @@ // Offset: 0x000003F8 Length: 0x000000BB } .module Property.dll -// MVID: {611C4D7D-9B5C-7949-A745-03837D4D1C61} +// MVID: {61E07031-9B5C-7949-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06F60000 +// Image base: 0x056F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -67,7 +67,6 @@ IL_0001: callvirt instance void [mscorlib]System.Attribute::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 8,8 : 6,21 '' IL_0008: ret } // end of method ExportAttribute::.ctor diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl index f8f286e007d..39e183f3fff 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember01.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 CCtorDUWithMember01 { @@ -36,13 +36,13 @@ // Offset: 0x00000780 Length: 0x00000227 } .module CCtorDUWithMember01.exe -// MVID: {6124062C-26F1-14EE-A745-03832C062461} +// MVID: {61E07031-26F1-14EE-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x068A0000 +// Image base: 0x058B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -66,14 +66,14 @@ // Code size 53 (0x35) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 2,2 : 1,23 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CCtorDUWithMember\\CCtorDUWithMember01.fs' + .line 2,2 : 1,46 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CCtorDUWithMember\\CCtorDUWithMember01.fs' IL_0000: ldstr "File1.A = %A" IL_0005: 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,class CCtorDUWithMember01a/C>::.ctor(string) IL_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_000f: call class CCtorDUWithMember01a/C CCtorDUWithMember01a/C::get_A() IL_0014: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_0019: pop - .line 3,3 : 1,23 '' + .line 3,3 : 1,47 '' IL_001a: ldstr "Test.e2 = %A" IL_001f: 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,class CCtorDUWithMember01a/C>::.ctor(string) IL_0024: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) @@ -243,63 +243,61 @@ instance int32 CompareTo(class CCtorDUWithMember01a/C obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 49 (0x31) + // Code size 48 (0x30) .maxstack 4 .locals init ([0] int32 V_0, [1] int32 V_1) - .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 '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 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0025 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_001b: ldloc.0 - IL_001c: ldloc.1 - IL_001d: bne.un.s IL_0021 + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: bne.un.s IL_0020 .line 100001,100001 : 0,0 '' - IL_001f: ldc.i4.0 - IL_0020: ret + IL_001e: ldc.i4.0 + IL_001f: ret .line 100001,100001 : 0,0 '' - IL_0021: ldloc.0 - IL_0022: ldloc.1 - IL_0023: sub - IL_0024: ret + IL_0020: ldloc.0 + IL_0021: ldloc.1 + IL_0022: sub + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.1 - IL_0026: ret + IL_0024: ldc.i4.1 + IL_0025: ret .line 100001,100001 : 0,0 '' - IL_0027: ldarg.1 - IL_0028: ldnull - IL_0029: cgt.un - IL_002b: brfalse.s IL_002f + IL_0026: ldarg.1 + IL_0027: ldnull + IL_0028: cgt.un + IL_002a: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_002d: ldc.i4.m1 - IL_002e: ret + IL_002c: ldc.i4.m1 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002e: ldc.i4.0 + IL_002f: ret } // end of method C::CompareTo .method public hidebysig virtual final @@ -308,7 +306,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 3,3 : 6,7 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any CCtorDUWithMember01a/C @@ -326,7 +323,7 @@ .locals init ([0] class CCtorDUWithMember01a/C V_0, [1] int32 V_1, [2] int32 V_2) - .line 3,3 : 6,7 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any CCtorDUWithMember01a/C IL_0006: stloc.0 @@ -389,27 +386,25 @@ 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 18 (0x12) + // Code size 17 (0x11) .maxstack 3 .locals init ([0] int32 V_0) - .line 3,3 : 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_0010 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_000f .line 100001,100001 : 0,0 '' - IL_0007: ldc.i4.0 - IL_0008: stloc.0 - IL_0009: ldarg.0 - IL_000a: ldfld int32 CCtorDUWithMember01a/C::_tag - IL_000f: ret + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + IL_0008: ldarg.0 + IL_0009: ldfld int32 CCtorDUWithMember01a/C::_tag + IL_000e: ret .line 100001,100001 : 0,0 '' - IL_0010: ldc.i4.0 - IL_0011: ret + IL_000f: ldc.i4.0 + IL_0010: ret } // end of method C::GetHashCode .method public hidebysig virtual final @@ -418,7 +413,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 3,3 : 6,7 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 CCtorDUWithMember01a/C::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -430,54 +424,52 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 48 (0x30) + // Code size 47 (0x2f) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0028 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst CCtorDUWithMember01a/C - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst CCtorDUWithMember01a/C + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0026 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0025 .line 100001,100001 : 0,0 '' - 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 + 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 + .line 100001,100001 : 0,0 '' + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: ceq + IL_0024: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0025: ldc.i4.0 + IL_0026: 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 + 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 C::Equals .method public hidebysig specialname @@ -498,48 +490,46 @@ instance bool Equals(class CCtorDUWithMember01a/C obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 42 (0x2a) + // Code size 41 (0x29) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0022 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0021 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0020 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_001f .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_001b: ldloc.0 - IL_001c: ldloc.1 - IL_001d: ceq - IL_001f: ret + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: ceq + IL_001e: ret .line 100001,100001 : 0,0 '' - IL_0020: ldc.i4.0 - IL_0021: ret + IL_001f: ldc.i4.0 + IL_0020: ret .line 100001,100001 : 0,0 '' - IL_0022: ldarg.1 - IL_0023: ldnull - IL_0024: cgt.un - IL_0026: ldc.i4.0 - IL_0027: ceq - IL_0029: ret + IL_0021: ldarg.1 + IL_0022: ldnull + IL_0023: cgt.un + IL_0025: ldc.i4.0 + IL_0026: ceq + IL_0028: ret } // end of method C::Equals .method public hidebysig virtual final @@ -549,7 +539,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class CCtorDUWithMember01a/C V_0) - .line 3,3 : 6,7 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst CCtorDUWithMember01a/C IL_0006: stloc.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02.il.bsl index c9441f898d1..8d2ee1bc997 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember02.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 CCtorDUWithMember02 { @@ -36,13 +36,13 @@ // Offset: 0x00000308 Length: 0x000000E4 } .module CCtorDUWithMember02.exe -// MVID: {608C04FF-D176-C99D-A745-0383FF048C60} +// MVID: {61E07031-D176-C99D-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06EF0000 +// Image base: 0x06750000 // =============== CLASS MEMBERS DECLARATION =================== @@ -66,7 +66,7 @@ // Code size 27 (0x1b) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 2,2 : 1,17 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CCtorDUWithMember\\CCtorDUWithMember02.fs' + .line 2,2 : 1,40 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CCtorDUWithMember\\CCtorDUWithMember02.fs' IL_0000: ldstr "x = %A" IL_0005: 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_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03.il.bsl index 3f429b894ad..540d2b297fd 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember03.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 CCtorDUWithMember03 { @@ -36,13 +36,13 @@ // Offset: 0x00000298 Length: 0x000000B2 } .module CCtorDUWithMember03.exe -// MVID: {608C04FF-C97B-D207-A745-0383FF048C60} +// MVID: {61E07031-C97B-D207-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x072C0000 +// Image base: 0x09130000 // =============== CLASS MEMBERS DECLARATION =================== @@ -66,7 +66,7 @@ // Code size 27 (0x1b) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 2,2 : 1,23 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CCtorDUWithMember\\CCtorDUWithMember03.fs' + .line 2,2 : 1,46 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CCtorDUWithMember\\CCtorDUWithMember03.fs' IL_0000: ldstr "File1.x = %A" IL_0005: 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_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04.il.bsl index 41590465474..ef407e0a161 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/CCtorDUWithMember/CCtorDUWithMember04.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 CCtorDUWithMember04 { @@ -36,13 +36,13 @@ // Offset: 0x00000298 Length: 0x000000B2 } .module CCtorDUWithMember04.exe -// MVID: {608C04FF-CF28-717B-A745-0383FF048C60} +// MVID: {61E07031-CF28-717B-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06780000 +// Image base: 0x06910000 // =============== CLASS MEMBERS DECLARATION =================== @@ -66,7 +66,7 @@ // Code size 27 (0x1b) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 2,2 : 1,23 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CCtorDUWithMember\\CCtorDUWithMember04.fs' + .line 2,2 : 1,46 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CCtorDUWithMember\\CCtorDUWithMember04.fs' IL_0000: ldstr "File1.x = %A" IL_0005: 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_000a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl index 71f865a4cfa..a2f0ef812f8 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.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 6:0:0:0 } .assembly CompiledNameAttribute04 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.CompiledNameAttribute04 { - // Offset: 0x00000000 Length: 0x00000CE9 + // Offset: 0x00000000 Length: 0x00000CD9 } .mresource public FSharpOptimizationData.CompiledNameAttribute04 { - // Offset: 0x00000CF0 Length: 0x000002CB + // Offset: 0x00000CE0 Length: 0x000002CB } .module CompiledNameAttribute04.exe -// MVID: {59B1923F-34DF-584F-A745-03833F92B159} +// MVID: {61E07031-34DF-584F-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x01680000 +// Image base: 0x07310000 // =============== CLASS MEMBERS DECLARATION =================== @@ -73,13 +73,10 @@ { // Code size 9 (0x9) .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\\visualfsharp\\tests\\fsharpqa\\Source\\CodeGen\\EmittedIL\\CompiledNameAttribute\\CompiledNameAttribute04.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 20,20 : 6,7 '' IL_0008: ret } // end of method C::.ctor @@ -88,7 +85,8 @@ { // Code size 2 (0x2) .maxstack 8 - .line 21,21 : 19,20 '' + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 21,21 : 19,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CompiledNameAttribute\\CompiledNameAttribute04.fs' IL_0000: ldc.i4.1 IL_0001: ret } // end of method C::get_P @@ -150,8 +148,7 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 5 (0x5) .maxstack 3 - .locals init ([0] valuetype CompiledNameAttribute04/S& V_0) - .line 37,37 : 6,7 '' + .locals init (valuetype CompiledNameAttribute04/S& V_0) IL_0000: ldarga.s obj IL_0002: stloc.0 IL_0003: ldc.i4.0 @@ -164,7 +161,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 37,37 : 6,7 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any CompiledNameAttribute04/S @@ -179,9 +175,8 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 3 - .locals init ([0] valuetype CompiledNameAttribute04/S V_0, - [1] valuetype CompiledNameAttribute04/S& V_1) - .line 37,37 : 6,7 '' + .locals init (valuetype CompiledNameAttribute04/S V_0, + valuetype CompiledNameAttribute04/S& V_1) IL_0000: ldarg.1 IL_0001: unbox.any CompiledNameAttribute04/S IL_0006: stloc.0 @@ -197,7 +192,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 2 (0x2) .maxstack 8 - .line 37,37 : 6,7 '' IL_0000: ldc.i4.0 IL_0001: ret } // end of method S::GetHashCode @@ -208,7 +202,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 37,37 : 6,7 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: call instance int32 CompiledNameAttribute04/S::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -261,8 +254,7 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 5 (0x5) .maxstack 3 - .locals init ([0] valuetype CompiledNameAttribute04/S& V_0) - .line 37,37 : 6,7 '' + .locals init (valuetype CompiledNameAttribute04/S& V_0) IL_0000: ldarga.s obj IL_0002: stloc.0 IL_0003: ldc.i4.1 @@ -395,7 +387,8 @@ .entrypoint // Code size 13 (0xd) .maxstack 4 - .locals init (class CompiledNameAttribute04/ITestInterface V_0) + .locals init ([0] class CompiledNameAttribute04/ITestInterface a) + .line 49,51 : 1,40 '' IL_0000: newobj instance void CompiledNameAttribute04/a@49::.ctor() IL_0005: dup IL_0006: stsfld class CompiledNameAttribute04/ITestInterface ''.$CompiledNameAttribute04::a@49 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr01.il.bsl index 08899c42c83..e77c2a162b7 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr01.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 extern ComputationExprLibrary { @@ -40,13 +40,13 @@ // Offset: 0x00000218 Length: 0x0000007D } .module ComputationExpr01.exe -// MVID: {611B0EC4-3703-E566-A745-0383C40E1B61} +// MVID: {61E07031-3703-E566-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x071D0000 +// Image base: 0x07390000 // =============== CLASS MEMBERS DECLARATION =================== @@ -128,9 +128,10 @@ .locals init ([0] class [ComputationExprLibrary]Library.Eventually`1 res1, [1] class [ComputationExprLibrary]Library.EventuallyBuilder V_1, [2] class [ComputationExprLibrary]Library.Eventually`1 'Pipe #1 input at line 10') - .line 100001,100001 : 0,0 '' + .line 7,7 : 5,15 '' IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 + .line 7,7 : 5,15 '' IL_0006: ldloc.1 IL_0007: ldloc.1 IL_0008: newobj instance void ComputationExpr01/res1@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr02.il.bsl index c9914148327..89ea4f002d0 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr02.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 extern ComputationExprLibrary { @@ -40,13 +40,13 @@ // Offset: 0x00000218 Length: 0x0000007D } .module ComputationExpr02.exe -// MVID: {611C4D7F-3624-E566-A745-03837F4D1C61} +// MVID: {61E07031-3624-E566-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x071B0000 +// Image base: 0x06F40000 // =============== CLASS MEMBERS DECLARATION =================== @@ -142,9 +142,10 @@ .locals init ([0] class [ComputationExprLibrary]Library.Eventually`1 res2, [1] class [ComputationExprLibrary]Library.EventuallyBuilder V_1, [2] class [ComputationExprLibrary]Library.Eventually`1 'Pipe #1 input at line 10') - .line 100001,100001 : 0,0 '' + .line 7,7 : 5,15 '' IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 + .line 7,7 : 5,15 '' IL_0006: ldloc.1 IL_0007: ldloc.1 IL_0008: newobj instance void ComputationExpr02/res2@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr03.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr03.il.bsl index 2451cc77523..6278a362b58 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr03.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr03.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 extern ComputationExprLibrary { @@ -40,13 +40,13 @@ // Offset: 0x00000240 Length: 0x0000008C } .module ComputationExpr03.exe -// MVID: {611C4D7F-3649-E566-A745-03837F4D1C61} +// MVID: {61E07031-3649-E566-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06EE0000 +// Image base: 0x07350000 // =============== CLASS MEMBERS DECLARATION =================== @@ -186,7 +186,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] int32 x) - .line 15,19 : 9,14 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 20,20 : 9,17 '' @@ -229,7 +229,7 @@ .maxstack 7 .locals init ([0] int32 x, [1] class [ComputationExprLibrary]Library.EventuallyBuilder V_1) - .line 14,14 : 9,23 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 15,19 : 9,14 '' @@ -237,6 +237,7 @@ IL_0003: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/'res3@15-1'::builder@ IL_0008: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_000d: stloc.1 + .line 16,16 : 13,23 '' IL_000e: ldloc.1 IL_000f: ldloc.1 IL_0010: newobj instance void ComputationExpr03/'res3@17-2'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) @@ -348,9 +349,10 @@ [3] class [ComputationExprLibrary]Library.Eventually`1 'Pipe #1 input at line 10', [4] class [ComputationExprLibrary]Library.EventuallyBuilder V_4, [5] class [ComputationExprLibrary]Library.Eventually`1 'Pipe #2 input at line 22') - .line 100001,100001 : 0,0 '' + .line 7,7 : 5,15 '' IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.2 + .line 7,7 : 5,15 '' IL_0006: ldloc.2 IL_0007: ldloc.2 IL_0008: newobj instance void ComputationExpr03/res2@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) @@ -365,8 +367,10 @@ IL_001f: ldloc.3 IL_0020: call !!0 [ComputationExprLibrary]Library.EventuallyModule::force(class [ComputationExprLibrary]Library.Eventually`1) IL_0025: pop + .line 13,13 : 5,15 '' IL_0026: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_002b: stloc.s V_4 + .line 13,13 : 5,15 '' IL_002d: ldloc.s V_4 IL_002f: ldloc.s V_4 IL_0031: newobj instance void ComputationExpr03/res3@14::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr04.il.bsl index fec0b17fa41..c4837548c57 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr04.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr04.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 extern ComputationExprLibrary { @@ -40,13 +40,13 @@ // Offset: 0x00000218 Length: 0x0000007D } .module ComputationExpr04.exe -// MVID: {611C4D7F-366A-E566-A745-03837F4D1C61} +// MVID: {61E07031-366A-E566-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06D30000 +// Image base: 0x07120000 // =============== CLASS MEMBERS DECLARATION =================== @@ -80,44 +80,46 @@ .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 68 (0x44) + // Code size 69 (0x45) .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 : 13,54 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ComputationExpressions\\ComputationExpr04.fs' + .line 6,6 : 9,12 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ComputationExpressions\\ComputationExpr04.fs' IL_0000: nop + .line 7,7 : 13,54 '' + IL_0001: 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 + IL_0002: ldstr "hello" + IL_0007: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0011: pop .line 7,7 : 39,53 '' - IL_0011: ldstr "hello" - IL_0016: callvirt instance int32 [mscorlib]System.String::get_Length() - IL_001b: stloc.0 + IL_0012: ldstr "hello" + IL_0017: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_001c: stloc.0 .line 8,8 : 13,28 '' - IL_001c: ldstr "fail" - IL_0021: stloc.1 - IL_0022: ldc.i4.0 - IL_0023: brfalse.s IL_002d + IL_001d: ldstr "fail" + IL_0022: stloc.1 + IL_0023: ldc.i4.0 + IL_0024: brfalse.s IL_002e - IL_0025: ldnull - IL_0026: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_002b: br.s IL_0034 + IL_0026: ldnull + IL_0027: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_002c: br.s IL_0035 - IL_002d: ldloc.1 - IL_002e: call class [mscorlib]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) - IL_0033: throw + IL_002e: ldloc.1 + IL_002f: call class [mscorlib]System.Exception [FSharp.Core]Microsoft.FSharp.Core.Operators::Failure(string) + IL_0034: throw - IL_0034: pop + IL_0035: pop .line 9,9 : 13,21 '' - 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 + IL_0036: ldarg.0 + IL_0037: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr04/'res4@7-1'::builder@ + IL_003c: ldloc.0 + IL_003d: tail. + IL_003f: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Return(!!0) + IL_0044: ret } // end of method 'res4@7-1'::Invoke } // end of class 'res4@7-1' @@ -151,7 +153,7 @@ .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] int32 x) - .line 6,12 : 9,21 '' + .line 10,10 : 9,13 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 11,11 : 13,54 '' @@ -203,7 +205,6 @@ { // Code size 47 (0x2f) .maxstack 8 - .line 6,6 : 9,12 '' IL_0000: ldarg.0 IL_0001: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr04/res4@6::builder@ IL_0006: ldarg.0 @@ -257,9 +258,10 @@ .locals init ([0] class [ComputationExprLibrary]Library.Eventually`1 res4, [1] class [ComputationExprLibrary]Library.EventuallyBuilder V_1, [2] class [ComputationExprLibrary]Library.Eventually`1 'Pipe #1 input at line 14') - .line 100001,100001 : 0,0 '' + .line 5,5 : 5,15 '' IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 + .line 5,5 : 5,15 '' IL_0006: ldloc.1 IL_0007: ldloc.1 IL_0008: newobj instance void ComputationExpr04/res4@6::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr05.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr05.il.bsl index 8556c5ef694..94076cd37de 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr05.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr05.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 extern ComputationExprLibrary { @@ -40,13 +40,13 @@ // Offset: 0x00000218 Length: 0x0000007D } .module ComputationExpr05.exe -// MVID: {6124062C-3687-E566-A745-03832C062461} +// MVID: {61E07031-3687-E566-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07110000 +// Image base: 0x06E70000 // =============== CLASS MEMBERS DECLARATION =================== @@ -118,7 +118,7 @@ .maxstack 6 .locals init ([0] class [mscorlib]System.IDisposable 'x (shadowed)', [1] int32 x) - .line 10,10 : 9,50 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 10,10 : 9,50 '' @@ -168,31 +168,33 @@ .method public strict virtual instance class [ComputationExprLibrary]Library.Eventually`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 58 (0x3a) + // Code size 59 (0x3b) .maxstack 7 .locals init ([0] int32 x) - .line 8,8 : 9,50 '' + .line 9,9 : 9,72 '' IL_0000: nop + .line 8,8 : 9,50 '' + IL_0001: 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 + IL_0002: ldstr "hello" + IL_0007: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0011: pop .line 8,8 : 35,49 '' - IL_0011: ldstr "hello" - IL_0016: callvirt instance int32 [mscorlib]System.String::get_Length() - IL_001b: stloc.0 - .line 9,9 : 17,72 '' - 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, + IL_0012: ldstr "hello" + IL_0017: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_001c: stloc.0 + .line 9,9 : 9,72 '' + IL_001d: ldarg.0 + IL_001e: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr05/res5@8::builder@ + IL_0023: newobj instance void ComputationExpr05/'res5@9-1'::.ctor() + IL_0028: ldarg.0 + IL_0029: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr05/res5@8::builder@ + IL_002e: newobj instance void ComputationExpr05/'res5@10-2'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) + IL_0033: tail. + IL_0035: callvirt instance class [ComputationExprLibrary]Library.Eventually`1 [ComputationExprLibrary]Library.EventuallyBuilder::Using(class [mscorlib]System.IDisposable, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0039: ret + IL_003a: ret } // end of method res5@8::Invoke } // end of class res5@8 @@ -231,9 +233,10 @@ .locals init ([0] class [ComputationExprLibrary]Library.Eventually`1 res5, [1] class [ComputationExprLibrary]Library.EventuallyBuilder V_1, [2] class [ComputationExprLibrary]Library.Eventually`1 'Pipe #1 input at line 13') - .line 100001,100001 : 0,0 '' + .line 7,7 : 5,15 '' IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 + .line 7,7 : 5,15 '' IL_0006: ldloc.1 IL_0007: ldloc.1 IL_0008: newobj instance void ComputationExpr05/res5@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.il.bsl index 02b98964ca4..44ae6919cdd 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.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 extern ComputationExprLibrary { @@ -40,13 +40,13 @@ // Offset: 0x00000218 Length: 0x0000007D } .module ComputationExpr06.exe -// MVID: {611B0EC4-35A8-E566-A745-0383C40E1B61} +// MVID: {61E07031-35A8-E566-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07080000 +// Image base: 0x06B20000 // =============== CLASS MEMBERS DECLARATION =================== @@ -77,16 +77,18 @@ .method public strict virtual instance bool Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 15 (0xf) + // Code size 16 (0x10) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 9,9 : 15,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ComputationExpressions\\ComputationExpr06.fs' - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ComputationExpr06/'res6@9-1'::x - IL_0006: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_000b: ldc.i4.0 - IL_000c: cgt - IL_000e: ret + .line 9,9 : 9,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ComputationExpressions\\ComputationExpr06.fs' + IL_0000: nop + .line 9,9 : 15,21 '' + IL_0001: ldarg.0 + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ComputationExpr06/'res6@9-1'::x + IL_0007: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_000c: ldc.i4.0 + IL_000d: cgt + IL_000f: ret } // end of method 'res6@9-1'::Invoke } // end of class 'res6@9-1' @@ -232,7 +234,6 @@ IL_0000: ldc.i4.1 IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) IL_0006: stloc.0 - .line 9,9 : 9,21 '' IL_0007: ldarg.0 IL_0008: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr06/res6@8::builder@ IL_000d: ldarg.0 @@ -297,9 +298,10 @@ .locals init ([0] class [ComputationExprLibrary]Library.Eventually`1 res6, [1] class [ComputationExprLibrary]Library.EventuallyBuilder V_1, [2] class [ComputationExprLibrary]Library.Eventually`1 'Pipe #1 input at line 18') - .line 100001,100001 : 0,0 '' + .line 7,7 : 5,15 '' IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 + .line 7,7 : 5,15 '' IL_0006: ldloc.1 IL_0007: ldloc.1 IL_0008: newobj instance void ComputationExpr06/res6@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr07.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr07.il.bsl index a9c352baefe..b5c73a6bddb 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr07.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr07.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 extern ComputationExprLibrary { @@ -40,13 +40,13 @@ // Offset: 0x00000218 Length: 0x0000007D } .module ComputationExpr07.exe -// MVID: {611B0EC4-35BD-E566-A745-0383C40E1B61} +// MVID: {61E07031-35BD-E566-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06E40000 +// Image base: 0x07070000 // =============== CLASS MEMBERS DECLARATION =================== @@ -89,7 +89,7 @@ .maxstack 7 .locals init ([0] int32 v) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 9,9 : 9,29 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ComputationExpressions\\ComputationExpr07.fs' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ComputationExpressions\\ComputationExpr07.fs' IL_0000: ldarg.1 IL_0001: stloc.0 .line 10,10 : 13,24 '' @@ -189,9 +189,9 @@ IL_0000: ldc.i4.1 IL_0001: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) IL_0006: stloc.0 - .line 9,9 : 9,29 '' IL_0007: ldarg.0 IL_0008: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr07/res7@8::builder@ + .line 9,9 : 9,12 '' IL_000d: ldarg.0 IL_000e: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr07/res7@8::builder@ IL_0013: ldc.i4.0 @@ -259,9 +259,10 @@ .locals init ([0] class [ComputationExprLibrary]Library.Eventually`1 res7, [1] class [ComputationExprLibrary]Library.EventuallyBuilder V_1, [2] class [ComputationExprLibrary]Library.Eventually`1 'Pipe #1 input at line 13') - .line 100001,100001 : 0,0 '' + .line 7,7 : 5,15 '' IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 + .line 7,7 : 5,15 '' IL_0006: ldloc.1 IL_0007: ldloc.1 IL_0008: newobj instance void ComputationExpr07/res7@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter01.il.bsl index a3ec1e93096..68e153e96bd 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter01.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 GenIter01 { @@ -36,13 +36,13 @@ // Offset: 0x000001F8 Length: 0x0000007A } .module GenIter01.exe -// MVID: {611C4D7C-F836-DC98-A745-03837C4D1C61} +// MVID: {61E07031-F836-DC98-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06D20000 +// Image base: 0x06CC0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -54,7 +54,7 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 squaresOfOneToTen() cil managed { - // Code size 78 (0x4e) + // Code size 79 (0x4f) .maxstack 5 .locals init ([0] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, [1] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_1, @@ -63,64 +63,64 @@ [4] class [mscorlib]System.IDisposable V_4) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 5,6 : 5,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\GeneratedIterators\\GenIter01.fs' - IL_0000: ldc.i4.0 - IL_0001: ldc.i4.1 - IL_0002: ldc.i4.2 - IL_0003: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + IL_0000: nop + .line 5,5 : 7,10 '' + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.1 + IL_0003: ldc.i4.2 + IL_0004: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, int32, int32) - IL_0008: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_000d: stloc.1 - .line 5,5 : 7,26 '' + IL_0009: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_000e: stloc.1 + .line 5,5 : 13,15 '' .try { - IL_000e: ldloc.1 - IL_000f: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0014: brfalse.s IL_002b - - IL_0016: ldloc.1 - IL_0017: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_001c: stloc.3 + IL_000f: ldloc.1 + IL_0010: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0015: brfalse.s IL_002c + + IL_0017: ldloc.1 + IL_0018: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_001d: stloc.3 + IL_001e: ldloca.s V_0 .line 6,6 : 18,23 '' - IL_001d: ldloca.s V_0 - IL_001f: ldloc.3 IL_0020: ldloc.3 - IL_0021: mul - IL_0022: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0027: nop - .line 100001,100001 : 0,0 '' + IL_0021: ldloc.3 + IL_0022: mul + IL_0023: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0028: nop - IL_0029: br.s IL_000e + .line 100001,100001 : 0,0 '' + IL_0029: nop + IL_002a: br.s IL_000f - IL_002b: ldnull - IL_002c: stloc.2 - IL_002d: leave.s IL_0044 + IL_002c: ldnull + IL_002d: stloc.2 + IL_002e: leave.s IL_0045 - .line 5,6 : 7,23 '' } // end .try finally { - IL_002f: ldloc.1 - IL_0030: isinst [mscorlib]System.IDisposable - IL_0035: stloc.s V_4 + IL_0030: ldloc.1 + IL_0031: isinst [mscorlib]System.IDisposable + IL_0036: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0037: ldloc.s V_4 - IL_0039: brfalse.s IL_0043 + IL_0038: ldloc.s V_4 + IL_003a: brfalse.s IL_0044 .line 100001,100001 : 0,0 '' - IL_003b: ldloc.s V_4 - IL_003d: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_0042: endfinally - .line 100001,100001 : 0,0 '' + IL_003c: ldloc.s V_4 + IL_003e: callvirt instance void [mscorlib]System.IDisposable::Dispose() IL_0043: endfinally .line 100001,100001 : 0,0 '' + IL_0044: endfinally + .line 100001,100001 : 0,0 '' } // end handler - IL_0044: ldloc.2 - IL_0045: pop - .line 5,6 : 5,25 '' - IL_0046: ldloca.s V_0 - IL_0048: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_004d: ret + IL_0045: ldloc.2 + IL_0046: pop + IL_0047: ldloca.s V_0 + IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004e: ret } // end of method GenIter01::squaresOfOneToTen } // end of class GenIter01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter02.il.bsl index 2874e0e1be7..1dd42f31823 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter02.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 GenIter02 { @@ -36,13 +36,13 @@ // Offset: 0x000001F8 Length: 0x0000007B } .module GenIter02.exe -// MVID: {611C4D7C-F857-DC98-A745-03837C4D1C61} +// MVID: {61E07031-F857-DC98-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x070F0000 +// Image base: 0x06D10000 // =============== CLASS MEMBERS DECLARATION =================== @@ -54,7 +54,7 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 squaresOfOneToTenB() cil managed { - // Code size 94 (0x5e) + // Code size 95 (0x5f) .maxstack 5 .locals init ([0] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, [1] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_1, @@ -63,69 +63,69 @@ [4] class [mscorlib]System.IDisposable V_4) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 5,7 : 5,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\GeneratedIterators\\GenIter02.fs' - IL_0000: ldc.i4.0 - IL_0001: ldc.i4.1 - IL_0002: ldc.i4.2 - IL_0003: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + IL_0000: nop + .line 5,5 : 7,10 '' + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.1 + IL_0003: ldc.i4.2 + IL_0004: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, int32, int32) - IL_0008: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_000d: stloc.1 - .line 5,5 : 7,25 '' + IL_0009: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_000e: stloc.1 + .line 5,5 : 13,15 '' .try { - IL_000e: ldloc.1 - IL_000f: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0014: brfalse.s IL_003b + IL_000f: ldloc.1 + IL_0010: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0015: brfalse.s IL_003c - IL_0016: ldloc.1 - IL_0017: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_001c: stloc.3 + IL_0017: ldloc.1 + IL_0018: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_001d: stloc.3 .line 6,6 : 12,27 '' - IL_001d: ldstr "hello" - IL_0022: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0027: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_002c: pop - .line 7,7 : 12,23 '' - IL_002d: ldloca.s V_0 - IL_002f: ldloc.3 + IL_001e: ldstr "hello" + 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: ldloca.s V_0 + .line 7,7 : 18,23 '' IL_0030: ldloc.3 - IL_0031: mul - IL_0032: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0037: nop - .line 100001,100001 : 0,0 '' + IL_0031: ldloc.3 + IL_0032: mul + IL_0033: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0038: nop - IL_0039: br.s IL_000e + .line 100001,100001 : 0,0 '' + IL_0039: nop + IL_003a: br.s IL_000f - IL_003b: ldnull - IL_003c: stloc.2 - IL_003d: leave.s IL_0054 + IL_003c: ldnull + IL_003d: stloc.2 + IL_003e: leave.s IL_0055 - .line 5,7 : 7,23 '' } // end .try finally { - IL_003f: ldloc.1 - IL_0040: isinst [mscorlib]System.IDisposable - IL_0045: stloc.s V_4 + IL_0040: ldloc.1 + IL_0041: isinst [mscorlib]System.IDisposable + IL_0046: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0047: ldloc.s V_4 - IL_0049: brfalse.s IL_0053 + IL_0048: ldloc.s V_4 + IL_004a: brfalse.s IL_0054 .line 100001,100001 : 0,0 '' - IL_004b: ldloc.s V_4 - IL_004d: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_0052: endfinally - .line 100001,100001 : 0,0 '' + IL_004c: ldloc.s V_4 + IL_004e: callvirt instance void [mscorlib]System.IDisposable::Dispose() IL_0053: endfinally .line 100001,100001 : 0,0 '' + IL_0054: endfinally + .line 100001,100001 : 0,0 '' } // end handler - IL_0054: ldloc.2 - IL_0055: pop - .line 5,7 : 5,25 '' - IL_0056: ldloca.s V_0 - IL_0058: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_005d: ret + IL_0055: ldloc.2 + IL_0056: pop + IL_0057: ldloca.s V_0 + IL_0059: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005e: ret } // end of method GenIter02::squaresOfOneToTenB } // end of class GenIter02 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter03.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter03.il.bsl index 6e06141da8b..425c7e292f5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter03.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter03.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 GenIter03 { @@ -36,13 +36,13 @@ // Offset: 0x000001F8 Length: 0x0000007B } .module GenIter03.exe -// MVID: {611C4D7C-F77C-DC98-A745-03837C4D1C61} +// MVID: {61E07031-F77C-DC98-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06DC0000 +// Image base: 0x04FB0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -54,7 +54,7 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 squaresOfOneToTenC() cil managed { - // Code size 79 (0x4f) + // Code size 80 (0x50) .maxstack 5 .locals init ([0] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, [1] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_1, @@ -63,64 +63,64 @@ [4] class [mscorlib]System.IDisposable V_4) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 4,4 : 28,57 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\GeneratedIterators\\GenIter03.fs' - IL_0000: ldc.i4.0 - IL_0001: ldc.i4.1 - IL_0002: ldc.i4.s 10 - IL_0004: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + IL_0000: nop + .line 4,4 : 30,33 '' + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.1 + IL_0003: ldc.i4.s 10 + IL_0005: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, int32, int32) - IL_0009: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_000e: stloc.1 - .line 4,4 : 30,46 '' + IL_000a: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_000f: stloc.1 + .line 4,4 : 36,38 '' .try { - IL_000f: ldloc.1 - IL_0010: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0015: brfalse.s IL_002c - - IL_0017: ldloc.1 - IL_0018: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_001d: stloc.3 + IL_0010: ldloc.1 + IL_0011: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0016: brfalse.s IL_002d + + IL_0018: ldloc.1 + IL_0019: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_001e: stloc.3 + IL_001f: ldloca.s V_0 .line 4,4 : 50,55 '' - IL_001e: ldloca.s V_0 - IL_0020: ldloc.3 IL_0021: ldloc.3 - IL_0022: mul - IL_0023: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0028: nop - .line 100001,100001 : 0,0 '' + IL_0022: ldloc.3 + IL_0023: mul + IL_0024: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0029: nop - IL_002a: br.s IL_000f + .line 100001,100001 : 0,0 '' + IL_002a: nop + IL_002b: br.s IL_0010 - IL_002c: ldnull - IL_002d: stloc.2 - IL_002e: leave.s IL_0045 + IL_002d: ldnull + IL_002e: stloc.2 + IL_002f: leave.s IL_0046 - .line 4,4 : 30,55 '' } // end .try finally { - IL_0030: ldloc.1 - IL_0031: isinst [mscorlib]System.IDisposable - IL_0036: stloc.s V_4 + IL_0031: ldloc.1 + IL_0032: isinst [mscorlib]System.IDisposable + IL_0037: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0038: ldloc.s V_4 - IL_003a: brfalse.s IL_0044 + IL_0039: ldloc.s V_4 + IL_003b: brfalse.s IL_0045 .line 100001,100001 : 0,0 '' - IL_003c: ldloc.s V_4 - IL_003e: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_0043: endfinally - .line 100001,100001 : 0,0 '' + IL_003d: ldloc.s V_4 + IL_003f: callvirt instance void [mscorlib]System.IDisposable::Dispose() IL_0044: endfinally .line 100001,100001 : 0,0 '' + IL_0045: endfinally + .line 100001,100001 : 0,0 '' } // end handler - IL_0045: ldloc.2 - IL_0046: pop - .line 4,4 : 28,57 '' - IL_0047: ldloca.s V_0 - IL_0049: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_004e: ret + IL_0046: ldloc.2 + IL_0047: pop + IL_0048: ldloca.s V_0 + IL_004a: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_004f: ret } // end of method GenIter03::squaresOfOneToTenC } // end of class GenIter03 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter04.il.bsl index ba6e8bc9d3d..c039ad2e336 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter04.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter04.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 GenIter04 { @@ -36,13 +36,13 @@ // Offset: 0x000001E8 Length: 0x0000007B } .module GenIter04.exe -// MVID: {611C4D7C-F79D-DC98-A745-03837C4D1C61} +// MVID: {61E07031-F79D-DC98-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06650000 +// Image base: 0x06BD0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -80,7 +80,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 89 (0x59) + // Code size 90 (0x5a) .maxstack 5 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 squaresOfOneToTenD, [1] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_1, @@ -90,66 +90,67 @@ [5] class [mscorlib]System.IDisposable V_5) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 4,4 : 1,55 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\GeneratedIterators\\GenIter04.fs' - IL_0000: ldc.i4.0 - IL_0001: ldc.i4.1 - IL_0002: ldc.i4.s 10 - IL_0004: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + IL_0000: nop + .line 4,4 : 28,31 '' + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.1 + IL_0003: ldc.i4.s 10 + IL_0005: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, int32, int32) - IL_0009: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_000e: stloc.2 - .line 4,4 : 28,44 '' + IL_000a: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_000f: stloc.2 + .line 4,4 : 34,36 '' .try { - IL_000f: ldloc.2 - IL_0010: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0015: brfalse.s IL_002f - - IL_0017: ldloc.2 - IL_0018: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_001d: stloc.s x + IL_0010: ldloc.2 + IL_0011: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0016: brfalse.s IL_0030 + + IL_0018: ldloc.2 + IL_0019: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_001e: stloc.s x + IL_0020: ldloca.s V_1 .line 4,4 : 48,53 '' - IL_001f: ldloca.s V_1 - IL_0021: ldloc.s x - IL_0023: ldloc.s x - IL_0025: mul - IL_0026: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_002b: nop - .line 100001,100001 : 0,0 '' + IL_0022: ldloc.s x + IL_0024: ldloc.s x + IL_0026: mul + IL_0027: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_002c: nop - IL_002d: br.s IL_000f + .line 100001,100001 : 0,0 '' + IL_002d: nop + IL_002e: br.s IL_0010 - IL_002f: ldnull - IL_0030: stloc.3 - IL_0031: leave.s IL_0048 + IL_0030: ldnull + IL_0031: stloc.3 + IL_0032: leave.s IL_0049 - .line 4,4 : 28,53 '' } // end .try finally { - IL_0033: ldloc.2 - IL_0034: isinst [mscorlib]System.IDisposable - IL_0039: stloc.s V_5 + IL_0034: ldloc.2 + IL_0035: isinst [mscorlib]System.IDisposable + IL_003a: stloc.s V_5 .line 100001,100001 : 0,0 '' - IL_003b: ldloc.s V_5 - IL_003d: brfalse.s IL_0047 + IL_003c: ldloc.s V_5 + IL_003e: brfalse.s IL_0048 .line 100001,100001 : 0,0 '' - IL_003f: ldloc.s V_5 - IL_0041: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_0046: endfinally - .line 100001,100001 : 0,0 '' + IL_0040: ldloc.s V_5 + IL_0042: callvirt instance void [mscorlib]System.IDisposable::Dispose() IL_0047: endfinally .line 100001,100001 : 0,0 '' + IL_0048: endfinally + .line 100001,100001 : 0,0 '' } // end handler - IL_0048: ldloc.3 - IL_0049: pop - IL_004a: ldloca.s V_1 - IL_004c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0051: dup - IL_0052: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$GenIter04::squaresOfOneToTenD@4 - IL_0057: stloc.0 - IL_0058: ret + IL_0049: ldloc.3 + IL_004a: pop + IL_004b: ldloca.s V_1 + IL_004d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0052: dup + IL_0053: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$GenIter04::squaresOfOneToTenD@4 + IL_0058: stloc.0 + IL_0059: ret } // end of method $GenIter04::main@ } // end of class ''.$GenIter04 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.il.bsl index 0ee5384e72f..076d1239779 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.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 ListExpressionSteppingTest1 { @@ -36,13 +36,13 @@ // Offset: 0x00000270 Length: 0x000000AF } .module ListExpressionSteppingTest1.exe -// MVID: {60B78A57-50CF-F6CE-A745-0383578AB760} +// MVID: {61E07031-50CF-F6CE-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07190000 +// Image base: 0x058C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -64,10 +64,10 @@ .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 6,6 : 9,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ListExpressionStepping\\ListExpressionSteppingTest1.fs' IL_0000: ldloca.s V_0 + .line 6,6 : 17,18 '' IL_0002: ldc.i4.1 IL_0003: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0008: nop - .line 6,6 : 9,20 '' IL_0009: ldloca.s V_0 IL_000b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() IL_0010: ret @@ -89,7 +89,6 @@ .entrypoint // Code size 7 (0x7) .maxstack 8 - .line 7,7 : 13,17 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest1/ListExpressionSteppingTest1::f0() IL_0005: pop IL_0006: ret diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.il.bsl index 5676d0a6476..2f1ec2391bf 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.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 ListExpressionSteppingTest2 { @@ -36,13 +36,13 @@ // Offset: 0x000002D0 Length: 0x000000BC } .module ListExpressionSteppingTest2.exe -// MVID: {611C4D7C-D3DE-B780-A745-03837C4D1C61} +// MVID: {61E07031-D3DE-B780-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06F60000 +// Image base: 0x06CB0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -289,8 +289,8 @@ 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_0011: ldloca.s V_0 + .line 7,7 : 17,18 '' IL_0013: ldc.i4.1 IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0019: nop @@ -299,12 +299,11 @@ 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_002a: ldloca.s V_0 + .line 9,9 : 17,18 '' 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_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 @@ -446,10 +445,8 @@ .entrypoint // Code size 14 (0xe) .maxstack 8 - .line 11,11 : 13,17 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest2/ListExpressionSteppingTest2::f1() IL_0005: pop - .line 29,29 : 13,17 '' IL_0006: ldc.i4.5 IL_0007: call class [mscorlib]System.Tuple`2>,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> ListExpressionSteppingTest2/ListExpressionSteppingTest2::f2(!!0) IL_000c: pop diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.il.bsl index 92f1f9b3632..b105290c596 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.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 ListExpressionSteppingTest3 { @@ -36,13 +36,13 @@ // Offset: 0x00000280 Length: 0x000000AF } .module ListExpressionSteppingTest3.exe -// MVID: {60B78A57-AE45-39B4-A745-0383578AB760} +// MVID: {61E07031-AE45-39B4-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06EB0000 +// Image base: 0x04F70000 // =============== CLASS MEMBERS DECLARATION =================== @@ -84,16 +84,15 @@ IL_001d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_0022: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0027: pop - .line 10,10 : 14,21 '' IL_0028: ldloca.s V_1 + .line 10,10 : 20,21 '' IL_002a: ldloc.0 IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Add(!0) IL_0030: nop .line 100001,100001 : 0,0 '' IL_0031: nop - IL_0032: br.s IL_0007 + IL_0032: br.s IL_0008 - .line 7,10 : 9,23 '' IL_0034: ldloca.s V_1 IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Close() IL_003b: ret @@ -115,7 +114,6 @@ .entrypoint // Code size 7 (0x7) .maxstack 8 - .line 12,12 : 13,17 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ListExpressionSteppingTest3/ListExpressionSteppingTest3::f2() IL_0005: pop IL_0006: ret diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl index 26509649fd5..e893788ea36 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.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 ListExpressionSteppingTest4 { @@ -36,13 +36,13 @@ // Offset: 0x00000270 Length: 0x000000AF } .module ListExpressionSteppingTest4.exe -// MVID: {611C4D7C-3154-FA67-A745-03837C4D1C61} +// MVID: {61E07031-3154-FA67-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06AA0000 +// Image base: 0x068C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -83,8 +83,8 @@ 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_001d: ldloca.s V_0 + .line 10,10 : 17,19 '' 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) @@ -96,12 +96,11 @@ 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_0039: ldloca.s V_0 + .line 12,12 : 17,18 '' 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_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 @@ -123,7 +122,6 @@ .entrypoint // Code size 7 (0x7) .maxstack 8 - .line 14,14 : 13,17 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4::f3() IL_0005: pop IL_0006: ret diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl index fce50680f94..eea6dc07154 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.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 ListExpressionSteppingTest5 { @@ -36,13 +36,13 @@ // Offset: 0x00000270 Length: 0x000000AF } .module ListExpressionSteppingTest5.exe -// MVID: {611C4D7C-CBE3-BFEA-A745-03837C4D1C61} +// MVID: {61E07031-CBE3-BFEA-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B30000 +// Image base: 0x059E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -84,8 +84,8 @@ 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_0017: ldloca.s V_0 + .line 10,10 : 21,23 '' 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) @@ -97,8 +97,8 @@ 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_0034: ldloca.s V_0 + .line 12,12 : 21,22 '' IL_0036: ldloc.s z IL_0038: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_003d: nop @@ -125,7 +125,6 @@ } // end handler IL_005b: ldloc.2 IL_005c: pop - .line 6,15 : 9,30 '' 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 @@ -147,7 +146,6 @@ .entrypoint // Code size 7 (0x7) .maxstack 8 - .line 17,17 : 13,17 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest5/ListExpressionSteppingTest5::f4() IL_0005: pop IL_0006: ret diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl index 78f4860f029..02ab01f10a6 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.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 ListExpressionSteppingTest6 { @@ -36,13 +36,13 @@ // Offset: 0x00000298 Length: 0x000000BC } .module ListExpressionSteppingTest6.exe -// MVID: {611C4D7C-98A2-AB14-A745-03837C4D1C61} +// MVID: {61E07031-98A2-AB14-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06930000 +// Image base: 0x07170000 // =============== CLASS MEMBERS DECLARATION =================== @@ -67,7 +67,7 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f7() cil managed { - // Code size 178 (0xb2) + // Code size 181 (0xb5) .maxstack 4 .locals init ([0] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, [1] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_1, @@ -80,114 +80,118 @@ [8] class [mscorlib]System.IDisposable V_8) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 7,12 : 9,23 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ListExpressionStepping\\ListExpressionSteppingTest6.fs' - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::get_es() - IL_0005: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_000a: stloc.1 - .line 7,7 : 11,25 '' + IL_0000: nop + .line 7,7 : 11,14 '' + IL_0001: nop + .line 7,7 : 20,22 '' + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::get_es() + IL_0007: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_000c: stloc.1 + .line 7,7 : 17,19 '' .try { - IL_000b: ldloc.1 - IL_000c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0011: brfalse.s IL_0036 + IL_000d: ldloc.1 + IL_000e: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0013: brfalse.s IL_0038 - IL_0013: ldloc.1 - IL_0014: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0019: stloc.3 + IL_0015: ldloc.1 + IL_0016: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_001b: stloc.3 .line 8,8 : 14,29 '' - IL_001a: ldstr "hello" - 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 : 14,21 '' - IL_002a: ldloca.s V_0 - IL_002c: ldloc.3 - IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0032: nop + IL_001c: ldstr "hello" + IL_0021: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0026: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_002b: pop + IL_002c: ldloca.s V_0 + .line 9,9 : 20,21 '' + IL_002e: ldloc.3 + IL_002f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0034: nop .line 100001,100001 : 0,0 '' - IL_0033: nop - IL_0034: br.s IL_000b + IL_0035: nop + IL_0036: br.s IL_000d - IL_0036: ldnull - IL_0037: stloc.2 - IL_0038: leave.s IL_004f + IL_0038: ldnull + IL_0039: stloc.2 + IL_003a: leave.s IL_0051 - .line 7,9 : 11,21 '' } // end .try finally { - IL_003a: ldloc.1 - IL_003b: isinst [mscorlib]System.IDisposable - IL_0040: stloc.s V_4 + IL_003c: ldloc.1 + IL_003d: isinst [mscorlib]System.IDisposable + IL_0042: stloc.s V_4 .line 100001,100001 : 0,0 '' - IL_0042: ldloc.s V_4 - IL_0044: brfalse.s IL_004e + IL_0044: ldloc.s V_4 + IL_0046: brfalse.s IL_0050 .line 100001,100001 : 0,0 '' - IL_0046: ldloc.s V_4 - IL_0048: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_004d: endfinally + IL_0048: ldloc.s V_4 + IL_004a: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_004f: endfinally .line 100001,100001 : 0,0 '' - IL_004e: endfinally + IL_0050: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_004f: ldloc.2 - IL_0050: pop - IL_0051: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::get_es() - IL_0056: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_005b: stloc.s V_5 - .line 10,10 : 11,25 '' + IL_0051: ldloc.2 + IL_0052: pop + .line 10,10 : 11,14 '' + IL_0053: nop + .line 10,10 : 20,22 '' + IL_0054: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::get_es() + IL_0059: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_005e: stloc.s V_5 + .line 10,10 : 17,19 '' .try { - IL_005d: ldloc.s V_5 - IL_005f: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0064: brfalse.s IL_008c + IL_0060: ldloc.s V_5 + IL_0062: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0067: brfalse.s IL_008f - IL_0066: ldloc.s V_5 - IL_0068: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_006d: stloc.s V_7 + IL_0069: ldloc.s V_5 + IL_006b: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0070: stloc.s V_7 .line 11,11 : 14,31 '' - IL_006f: ldstr "goodbye" - IL_0074: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_0079: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_007e: pop - .line 12,12 : 14,21 '' - IL_007f: ldloca.s V_0 - IL_0081: ldloc.s V_7 - IL_0083: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0088: nop + IL_0072: ldstr "goodbye" + IL_0077: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_007c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0081: pop + IL_0082: ldloca.s V_0 + .line 12,12 : 20,21 '' + IL_0084: ldloc.s V_7 + IL_0086: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_008b: nop .line 100001,100001 : 0,0 '' - IL_0089: nop - IL_008a: br.s IL_005d + IL_008c: nop + IL_008d: br.s IL_0060 - IL_008c: ldnull - IL_008d: stloc.s V_6 - IL_008f: leave.s IL_00a7 + IL_008f: ldnull + IL_0090: stloc.s V_6 + IL_0092: leave.s IL_00aa - .line 10,12 : 11,21 '' } // end .try finally { - IL_0091: ldloc.s V_5 - IL_0093: isinst [mscorlib]System.IDisposable - IL_0098: stloc.s V_8 + IL_0094: ldloc.s V_5 + IL_0096: isinst [mscorlib]System.IDisposable + IL_009b: stloc.s V_8 .line 100001,100001 : 0,0 '' - IL_009a: ldloc.s V_8 - IL_009c: brfalse.s IL_00a6 + IL_009d: ldloc.s V_8 + IL_009f: brfalse.s IL_00a9 .line 100001,100001 : 0,0 '' - IL_009e: ldloc.s V_8 - IL_00a0: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_00a5: endfinally + IL_00a1: ldloc.s V_8 + IL_00a3: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_00a8: endfinally .line 100001,100001 : 0,0 '' - IL_00a6: endfinally + IL_00a9: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_00a7: ldloc.s V_6 - IL_00a9: pop - .line 7,12 : 9,23 '' - IL_00aa: ldloca.s V_0 - IL_00ac: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_00b1: ret + IL_00aa: ldloc.s V_6 + IL_00ac: pop + IL_00ad: ldloca.s V_0 + IL_00af: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_00b4: ret } // end of method ListExpressionSteppingTest6::f7 .property class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 @@ -229,7 +233,6 @@ IL_0017: dup IL_0018: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$ListExpressionSteppingTest6::es@5 IL_001d: stloc.0 - .line 14,14 : 13,17 '' IL_001e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::f7() IL_0023: pop IL_0024: ret diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AbstractClass.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AbstractClass.il.bsl index 4c8bea58a08..035e4385fe1 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AbstractClass.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AbstractClass.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 AbstractClass { @@ -36,13 +36,13 @@ // Offset: 0x00000308 Length: 0x000000B1 } .module AbstractClass.exe -// MVID: {60B68B7F-333C-8BAF-A745-03837F8BB660} +// MVID: {61E07031-333C-8BAF-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07500000 +// Image base: 0x04E00000 // =============== CLASS MEMBERS DECLARATION =================== @@ -61,13 +61,10 @@ { // Code size 9 (0x9) .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\\AbstractClass.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 4,4 : 6,7 '' IL_0008: ret } // end of method X::.ctor @@ -76,7 +73,8 @@ { // Code size 8 (0x8) .maxstack 8 - .line 5,5 : 22,26 '' + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 22,26 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\AbstractClass.fs' IL_0000: ldarg.0 IL_0001: ldc.i4.1 IL_0002: callvirt instance void AbstractClass/X::.ctor(int32) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AnonRecd.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AnonRecd.il.bsl index bfe21b6f486..a752dfe4d88 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AnonRecd.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AnonRecd.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 AnonRecd { @@ -36,13 +36,13 @@ // Offset: 0x000001C8 Length: 0x0000006B } .module AnonRecd.exe -// MVID: {611C4D7C-C42F-5208-A745-03837C4D1C61} +// MVID: {61E07031-C42F-5208-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07240000 +// Image base: 0x07100000 // =============== CLASS MEMBERS DECLARATION =================== @@ -161,80 +161,78 @@ 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 85 (0x55) + // Code size 84 (0x54) .maxstack 5 .locals init ([0] int32 V_0) - .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 '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 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0049 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0048 .line 100001,100001 : 0,0 '' - 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, + 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, !!0, !!0) - IL_0023: stloc.0 + IL_0022: stloc.0 .line 100001,100001 : 0,0 '' - IL_0024: ldloc.0 - IL_0025: ldc.i4.0 - IL_0026: bge.s IL_002a + IL_0023: ldloc.0 + IL_0024: ldc.i4.0 + IL_0025: bge.s IL_0029 .line 100001,100001 : 0,0 '' - IL_0028: ldloc.0 - IL_0029: ret + IL_0027: ldloc.0 + IL_0028: ret .line 100001,100001 : 0,0 '' - IL_002a: ldloc.0 - IL_002b: ldc.i4.0 - IL_002c: ble.s IL_0030 + IL_0029: ldloc.0 + IL_002a: ldc.i4.0 + IL_002b: ble.s IL_002f .line 100001,100001 : 0,0 '' - IL_002e: ldloc.0 - IL_002f: ret + IL_002d: ldloc.0 + IL_002e: ret .line 100001,100001 : 0,0 '' - 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, + 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, !!0, !!0) - IL_0048: ret + IL_0047: ret .line 100001,100001 : 0,0 '' - IL_0049: ldc.i4.1 - IL_004a: ret + IL_0048: ldc.i4.1 + IL_0049: ret .line 100001,100001 : 0,0 '' - IL_004b: ldarg.1 - IL_004c: ldnull - IL_004d: cgt.un - IL_004f: brfalse.s IL_0053 + IL_004a: ldarg.1 + IL_004b: ldnull + IL_004c: cgt.un + IL_004e: brfalse.s IL_0052 .line 100001,100001 : 0,0 '' - IL_0051: ldc.i4.m1 - IL_0052: ret + IL_0050: ldc.i4.m1 + IL_0051: ret .line 100001,100001 : 0,0 '' - IL_0053: ldc.i4.0 - IL_0054: ret + IL_0052: ldc.i4.0 + IL_0053: ret } // end of method '<>f__AnonymousType1912756633`2'::CompareTo .method public hidebysig virtual final @@ -243,7 +241,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 15 (0xf) .maxstack 8 - .line 1,1 : 1,1 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> @@ -262,7 +259,7 @@ .locals init ([0] class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> V_0, [1] class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> V_1, [2] int32 V_2) - .line 1,1 : 1,1 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> IL_0006: stloc.0 @@ -345,58 +342,56 @@ 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 66 (0x42) .maxstack 7 .locals init ([0] int32 V_0) - .line 1,1 : 1,1 '' - IL_0000: nop .line 100001,100001 : 0,0 '' - 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, + 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, !!0) - 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_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: 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, + 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, !!0) - 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_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: add - IL_003e: stloc.0 - IL_003f: ldloc.0 - IL_0040: ret + IL_003d: stloc.0 + IL_003e: ldloc.0 + IL_003f: ret .line 100001,100001 : 0,0 '' - IL_0041: ldc.i4.0 - IL_0042: ret + IL_0040: ldc.i4.0 + IL_0041: ret } // end of method '<>f__AnonymousType1912756633`2'::GetHashCode .method public hidebysig virtual final @@ -405,7 +400,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 14 (0xe) .maxstack 8 - .line 1,1 : 1,1 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: tail. @@ -418,123 +412,119 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 72 (0x48) + // Code size 71 (0x47) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0040 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003f .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_003e + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_003d .line 100001,100001 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: stloc.1 + IL_0010: ldloc.0 + IL_0011: 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, + 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, !!0, !!0) - IL_0025: brfalse.s IL_003c + IL_0024: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - 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, + 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, !!0, !!0) - IL_003b: ret + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003c: ldc.i4.0 - IL_003d: ret + IL_003b: ldc.i4.0 + IL_003c: ret .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_003d: ldc.i4.0 + IL_003e: ret .line 100001,100001 : 0,0 '' - IL_0040: ldarg.1 - IL_0041: ldnull - IL_0042: cgt.un - IL_0044: ldc.i4.0 - IL_0045: ceq - IL_0047: 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 '<>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 64 (0x40) - .maxstack 4 - .line 1,1 : 1,1 '' - IL_0000: nop + // Code size 63 (0x3f) + .maxstack 8 .line 100001,100001 : 0,0 '' - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0038 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0036 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0035 .line 100001,100001 : 0,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, + 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, !!0) - IL_001e: brfalse.s IL_0034 + IL_001d: brfalse.s IL_0033 .line 100001,100001 : 0,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, + 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, !!0) - IL_0033: ret + IL_0032: ret .line 100001,100001 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_0033: ldc.i4.0 + IL_0034: ret .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.0 - IL_0037: ret + IL_0035: ldc.i4.0 + IL_0036: ret .line 100001,100001 : 0,0 '' - IL_0038: ldarg.1 - IL_0039: ldnull - IL_003a: cgt.un - IL_003c: ldc.i4.0 - IL_003d: ceq - IL_003f: 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 '<>f__AnonymousType1912756633`2'::Equals .method public hidebysig virtual final @@ -544,7 +534,7 @@ // Code size 22 (0x16) .maxstack 4 .locals init ([0] class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> V_0) - .line 1,1 : 1,1 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst class '<>f__AnonymousType1912756633`2'j__TPar',!'j__TPar'> IL_0006: stloc.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ArgumentNamesInClosures01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ArgumentNamesInClosures01.il.bsl index 3065bbcf302..341656266c5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ArgumentNamesInClosures01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ArgumentNamesInClosures01.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 ArgumentNamesInClosures01 { @@ -36,13 +36,13 @@ // Offset: 0x000003A0 Length: 0x0000010D } .module ArgumentNamesInClosures01.dll -// MVID: {6124062D-39CA-41B5-A745-03832D062461} +// MVID: {61E07031-39CA-41B5-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06BD0000 +// Image base: 0x07340000 // =============== CLASS MEMBERS DECLARATION =================== @@ -83,12 +83,10 @@ { // Code size 9 (0x9) .maxstack 8 - .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 40,40 : 10,11 '' IL_0008: ret } // end of method T::.ctor @@ -135,7 +133,6 @@ { // Code size 9 (0x9) .maxstack 8 - .line 41,41 : 22,23 '' IL_0000: ldarg.1 IL_0001: tail. IL_0003: call int32 M::I(class M/C) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/CodeGenRenamings01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/CodeGenRenamings01.il.bsl index 63fa4df14a2..5ac6e6194c5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/CodeGenRenamings01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/CodeGenRenamings01.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 CodeGenRenamings01 { @@ -36,13 +36,13 @@ // Offset: 0x000003D0 Length: 0x0000011B } .module CodeGenRenamings01.exe -// MVID: {611B0EC4-8173-986B-A745-0383C40E1B61} +// MVID: {61E07031-8173-986B-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06620000 +// Image base: 0x07570000 // =============== CLASS MEMBERS DECLARATION =================== @@ -111,11 +111,11 @@ .line 100001,100001 : 0,0 '' IL_0024: nop - .line 9,9 : 18,30 '' IL_0025: ldarg.0 IL_0026: ldc.i4.1 IL_0027: stfld int32 CodeGenRenamings01/seq1@9::pc IL_002c: ldarg.0 + .line 9,9 : 25,29 '' IL_002d: ldc.i4.1 IL_002e: ldc.i4.1 IL_002f: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, @@ -124,11 +124,11 @@ IL_0039: ldc.i4.1 IL_003a: ret - .line 9,9 : 32,44 '' IL_003b: ldarg.0 IL_003c: ldc.i4.2 IL_003d: stfld int32 CodeGenRenamings01/seq1@9::pc IL_0042: ldarg.0 + .line 9,9 : 39,43 '' IL_0043: ldc.i4.2 IL_0044: ldc.i4.2 IL_0045: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, @@ -475,6 +475,7 @@ IL_0038: dup IL_0039: stsfld int32[] ''.$CodeGenRenamings01::array@6 IL_003e: stloc.1 + .line 7,7 : 12,27 '' IL_003f: ldc.i4.1 IL_0040: ldc.i4.1 IL_0041: ldc.i4.s 10 @@ -502,6 +503,7 @@ IL_0071: dup IL_0072: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$CodeGenRenamings01::list1@8 IL_0077: stloc.3 + .line 9,9 : 12,46 '' IL_0078: ldc.i4.0 IL_0079: ldnull IL_007a: newobj instance void CodeGenRenamings01/seq1@9::.ctor(int32, @@ -565,23 +567,18 @@ IL_00dc: dup IL_00dd: stsfld int32[0...,0...,0...,0...] ''.$CodeGenRenamings01::array4D@13 IL_00e2: stloc.s array4D - .line 16,16 : 9,27 '' IL_00e4: call int32[] CodeGenRenamings01::get_array() IL_00e9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::OfArray(!!0[]) IL_00ee: pop - .line 17,17 : 9,24 '' IL_00ef: call class [mscorlib]System.Collections.Generic.IEnumerable`1 CodeGenRenamings01::get_aseq() IL_00f4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::OfSeq(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_00f9: pop - .line 20,20 : 9,27 '' IL_00fa: call class [mscorlib]System.Tuple`2[] CodeGenRenamings01::get_array1() IL_00ff: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpMap`2 [FSharp.Core]Microsoft.FSharp.Collections.MapModule::OfArray(class [mscorlib]System.Tuple`2[]) IL_0104: pop - .line 21,21 : 9,25 '' IL_0105: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> CodeGenRenamings01::get_list1() IL_010a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpMap`2 [FSharp.Core]Microsoft.FSharp.Collections.MapModule::OfList(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>) IL_010f: pop - .line 22,22 : 9,23 '' IL_0110: call class [mscorlib]System.Collections.Generic.IEnumerable`1> CodeGenRenamings01::get_seq1() IL_0115: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpMap`2 [FSharp.Core]Microsoft.FSharp.Collections.MapModule::OfSeq(class [mscorlib]System.Collections.Generic.IEnumerable`1>) IL_011a: pop diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Decimal01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Decimal01.il.bsl index b0c34bdda4a..08891aa017e 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Decimal01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Decimal01.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 extern netstandard { @@ -41,13 +41,13 @@ // Offset: 0x00000140 Length: 0x00000050 } .module Decimal01.exe -// MVID: {60B68B7F-F150-FA46-A745-03837F8BB660} +// MVID: {61E07031-F150-FA46-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05600000 +// Image base: 0x06AE0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -70,8 +70,6 @@ .entrypoint // Code size 13 (0xd) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 9,13 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\Decimal01.fs' IL_0000: ldc.i4.s 12 IL_0002: ldc.i4.0 IL_0003: ldc.i4.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EqualsOnUnions01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EqualsOnUnions01.il.bsl index ba4e9d4b2d6..e54889aaaf5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EqualsOnUnions01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/EqualsOnUnions01.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 EqualsOnUnions01 { @@ -36,13 +36,13 @@ // Offset: 0x00000640 Length: 0x000001C7 } .module EqualsOnUnions01.exe -// MVID: {611C52A3-BBFB-14A0-A745-0383A3521C61} +// MVID: {61EFEE1F-BBFB-14A0-A745-03831FEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04FE0000 +// Image base: 0x06940000 // =============== 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 132 (0x84) + // Code size 131 (0x83) .maxstack 4 .locals init ([0] int32 V_0, [1] class EqualsOnUnions01/U V_1, @@ -351,110 +351,108 @@ [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 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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse IL_007a + .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 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: ldnull - IL_000c: cgt.un - IL_000e: brfalse.s IL_0078 + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: cgt.un + IL_000d: brfalse.s IL_0077 .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_000f: ldarg.0 + IL_0010: stloc.1 + IL_0011: ldloc.1 + IL_0012: isinst EqualsOnUnions01/U/B + IL_0017: brfalse.s IL_001c - IL_001a: ldc.i4.1 - IL_001b: br.s IL_001e + IL_0019: ldc.i4.1 + IL_001a: br.s IL_001d - 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_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_0029: ldc.i4.1 - IL_002a: br.s IL_002d + IL_0028: ldc.i4.1 + IL_0029: br.s IL_002c - IL_002c: ldc.i4.0 - IL_002d: stloc.2 + IL_002b: ldc.i4.0 + IL_002c: stloc.2 .line 100001,100001 : 0,0 '' - IL_002e: ldloc.0 - IL_002f: ldloc.2 - IL_0030: bne.un.s IL_0074 + IL_002d: ldloc.0 + IL_002e: ldloc.2 + IL_002f: bne.un.s IL_0073 .line 100001,100001 : 0,0 '' - 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 + IL_0031: ldarg.0 + IL_0032: isinst EqualsOnUnions01/U/B + IL_0037: brfalse.s IL_0071 + + .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_0063: ldloc.s V_7 - IL_0065: ldloc.s V_8 - IL_0067: bge.s IL_006b + IL_0062: ldloc.s V_7 + IL_0064: ldloc.s V_8 + IL_0066: bge.s IL_006a .line 100001,100001 : 0,0 '' - IL_0069: ldc.i4.m1 - IL_006a: ret + IL_0068: ldc.i4.m1 + IL_0069: ret .line 100001,100001 : 0,0 '' - IL_006b: ldloc.s V_7 - IL_006d: ldloc.s V_8 - IL_006f: cgt - IL_0071: ret + IL_006a: ldloc.s V_7 + IL_006c: ldloc.s V_8 + IL_006e: cgt + IL_0070: ret .line 100001,100001 : 0,0 '' - IL_0072: ldc.i4.0 - IL_0073: ret + IL_0071: ldc.i4.0 + IL_0072: ret .line 100001,100001 : 0,0 '' - IL_0074: ldloc.0 - IL_0075: ldloc.2 - IL_0076: sub - IL_0077: ret + IL_0073: ldloc.0 + IL_0074: ldloc.2 + IL_0075: sub + IL_0076: ret .line 100001,100001 : 0,0 '' - IL_0078: ldc.i4.1 - IL_0079: ret + IL_0077: ldc.i4.1 + IL_0078: ret .line 100001,100001 : 0,0 '' - IL_007a: ldarg.1 - IL_007b: ldnull - IL_007c: cgt.un - IL_007e: brfalse.s IL_0082 + IL_0079: ldarg.1 + IL_007a: ldnull + IL_007b: cgt.un + IL_007d: brfalse.s IL_0081 .line 100001,100001 : 0,0 '' - IL_0080: ldc.i4.m1 - IL_0081: ret + IL_007f: ldc.i4.m1 + IL_0080: ret .line 100001,100001 : 0,0 '' - IL_0082: ldc.i4.0 - IL_0083: ret + IL_0081: ldc.i4.0 + IL_0082: ret } // end of method U::CompareTo .method public hidebysig virtual final @@ -463,7 +461,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 6,6 : 6,7 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any EqualsOnUnions01/U @@ -488,7 +485,7 @@ [7] class [mscorlib]System.Collections.IComparer V_7, [8] int32 V_8, [9] int32 V_9) - .line 6,6 : 6,7 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any EqualsOnUnions01/U IL_0006: stloc.0 @@ -602,68 +599,66 @@ 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 68 (0x44) + // Code size 67 (0x43) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0042 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0041 .line 100001,100001 : 0,0 '' - IL_0007: ldc.i4.0 - IL_0008: stloc.0 + IL_0006: ldc.i4.0 + IL_0007: stloc.0 .line 100001,100001 : 0,0 '' - IL_0009: ldarg.0 - IL_000a: isinst EqualsOnUnions01/U/B - IL_000f: brfalse.s IL_0033 + IL_0008: ldarg.0 + IL_0009: isinst EqualsOnUnions01/U/B + IL_000e: brfalse.s IL_0032 .line 100001,100001 : 0,0 '' - 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_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_002d: add IL_002e: add - IL_002f: add - IL_0030: stloc.0 - IL_0031: ldloc.0 - IL_0032: ret + IL_002f: stloc.0 + IL_0030: ldloc.0 + IL_0031: ret .line 100001,100001 : 0,0 '' - 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_0032: ldarg.0 + IL_0033: stloc.3 + IL_0034: ldloc.3 + IL_0035: isinst EqualsOnUnions01/U/B + IL_003a: brfalse.s IL_003f - IL_003d: ldc.i4.1 - IL_003e: br.s IL_0041 + IL_003c: ldc.i4.1 + IL_003d: br.s IL_0040 - IL_0040: ldc.i4.0 - IL_0041: ret + IL_003f: ldc.i4.0 + IL_0040: ret .line 100001,100001 : 0,0 '' - IL_0042: ldc.i4.0 - IL_0043: ret + IL_0041: ldc.i4.0 + IL_0042: ret } // end of method U::GetHashCode .method public hidebysig virtual final @@ -672,7 +667,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 6,6 : 6,7 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 EqualsOnUnions01/U::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -684,7 +678,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 115 (0x73) + // Code size 114 (0x72) .maxstack 4 .locals init ([0] class EqualsOnUnions01/U V_0, [1] class EqualsOnUnions01/U V_1, @@ -695,99 +689,97 @@ [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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_006b + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_006a .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 - + IL_0006: ldarg.1 + IL_0007: isinst EqualsOnUnions01/U + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - 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_000d: ldloc.0 + IL_000e: brfalse.s IL_0068 - 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_0034: ldloc.2 - IL_0035: ldloc.s V_4 - IL_0037: bne.un.s IL_0067 + 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 - .line 100001,100001 : 0,0 '' - IL_0039: ldarg.0 - IL_003a: isinst EqualsOnUnions01/U/B - IL_003f: brfalse.s IL_0065 + IL_001c: ldc.i4.1 + IL_001d: br.s IL_0020 - .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 + 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 + + .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_0065: ldc.i4.1 - IL_0066: ret + IL_0064: ldc.i4.1 + IL_0065: ret .line 100001,100001 : 0,0 '' - IL_0067: ldc.i4.0 - IL_0068: ret + IL_0066: ldc.i4.0 + IL_0067: ret .line 100001,100001 : 0,0 '' - IL_0069: ldc.i4.0 - IL_006a: ret + IL_0068: ldc.i4.0 + IL_0069: ret .line 100001,100001 : 0,0 '' - IL_006b: ldarg.1 - IL_006c: ldnull - IL_006d: cgt.un - IL_006f: ldc.i4.0 - IL_0070: ceq - IL_0072: ret + IL_006a: ldarg.1 + IL_006b: ldnull + IL_006c: cgt.un + IL_006e: ldc.i4.0 + IL_006f: ceq + IL_0071: 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 102 (0x66) + // Code size 101 (0x65) .maxstack 4 .locals init ([0] int32 V_0, [1] class EqualsOnUnions01/U V_1, @@ -795,86 +787,84 @@ [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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_005e + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_005d .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_005c + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_005b .line 100001,100001 : 0,0 '' - 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_000c: ldarg.0 + IL_000d: stloc.1 + IL_000e: ldloc.1 + IL_000f: isinst EqualsOnUnions01/U/B + IL_0014: brfalse.s IL_0019 - IL_0017: ldc.i4.1 - IL_0018: br.s IL_001b + IL_0016: ldc.i4.1 + IL_0017: br.s IL_001a - 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_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_0026: ldc.i4.1 - IL_0027: br.s IL_002a + IL_0025: ldc.i4.1 + IL_0026: br.s IL_0029 - IL_0029: ldc.i4.0 - IL_002a: stloc.2 + IL_0028: ldc.i4.0 + IL_0029: stloc.2 .line 100001,100001 : 0,0 '' - IL_002b: ldloc.0 - IL_002c: ldloc.2 - IL_002d: bne.un.s IL_005a + IL_002a: ldloc.0 + IL_002b: ldloc.2 + IL_002c: bne.un.s IL_0059 .line 100001,100001 : 0,0 '' - IL_002f: ldarg.0 - IL_0030: isinst EqualsOnUnions01/U/B - IL_0035: brfalse.s IL_0058 + IL_002e: ldarg.0 + IL_002f: isinst EqualsOnUnions01/U/B + IL_0034: brfalse.s IL_0057 .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_0058: ldc.i4.1 - IL_0059: ret + IL_0057: ldc.i4.1 + IL_0058: ret .line 100001,100001 : 0,0 '' - IL_005a: ldc.i4.0 - IL_005b: ret + IL_0059: ldc.i4.0 + IL_005a: ret .line 100001,100001 : 0,0 '' - IL_005c: ldc.i4.0 - IL_005d: ret + IL_005b: ldc.i4.0 + IL_005c: ret .line 100001,100001 : 0,0 '' - IL_005e: ldarg.1 - IL_005f: ldnull - IL_0060: cgt.un - IL_0062: ldc.i4.0 - IL_0063: ceq - IL_0065: ret + IL_005d: ldarg.1 + IL_005e: ldnull + IL_005f: cgt.un + IL_0061: ldc.i4.0 + IL_0062: ceq + IL_0064: ret } // end of method U::Equals .method public hidebysig virtual final @@ -884,7 +874,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class EqualsOnUnions01/U V_0) - .line 6,6 : 6,7 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst EqualsOnUnions01/U IL_0006: stloc.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop01.il.bsl index c748c706949..e8e857034c9 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop01.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 ForLoop01 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x00000050 } .module ForLoop01.exe -// MVID: {60BCDCE8-1795-791C-A745-0383E8DCBC60} +// MVID: {61EFEC5E-1795-791C-A745-03835EECEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x070C0000 +// Image base: 0x06810000 // =============== CLASS MEMBERS DECLARATION =================== @@ -69,7 +69,7 @@ [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, [2] int32 wi) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 1,24 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\ForLoop01.fs' + .line 5,5 : 1,4 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\ForLoop01.fs' IL_0000: ldc.i4.1 IL_0001: ldc.i4.1 IL_0002: ldc.i4.3 @@ -79,20 +79,19 @@ IL_0008: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_000d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_0012: stloc.0 - .line 5,5 : 1,24 '' IL_0013: ldloc.0 IL_0014: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0019: stloc.1 - .line 5,5 : 1,24 '' + .line 5,5 : 8,10 '' IL_001a: ldloc.1 IL_001b: ldnull IL_001c: cgt.un IL_001e: brfalse.s IL_0049 - .line 5,5 : 1,24 '' IL_0020: ldloc.0 IL_0021: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0026: 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) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop02.il.bsl index aa69d91fe75..5756a522230 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop02.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 ForLoop02 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x00000050 } .module ForLoop02.exe -// MVID: {60BCDCE8-1736-791C-A745-0383E8DCBC60} +// MVID: {61E07031-1736-791C-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x068C0000 +// Image base: 0x07170000 // =============== CLASS MEMBERS DECLARATION =================== @@ -67,12 +67,12 @@ .maxstack 5 .locals init ([0] int32 wi) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 1,19 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\ForLoop02.fs' + .line 5,5 : 1,4 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\ForLoop02.fs' IL_0000: ldc.i4.1 IL_0001: stloc.0 IL_0002: br.s IL_001e - .line 6,6 : 5,17 '' + .line 6,6 : 5,20 '' IL_0004: ldstr "%A" IL_0009: 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_000e: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) @@ -83,7 +83,7 @@ IL_001b: ldc.i4.1 IL_001c: add IL_001d: stloc.0 - .line 5,5 : 1,19 '' + .line 5,5 : 12,14 '' IL_001e: ldloc.0 IL_001f: ldc.i4.1 IL_0020: ldc.i4.3 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop03.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop03.il.bsl index d1f71df8ed2..d3e9c40ae8e 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop03.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ForLoop03.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 ForLoop03 { @@ -36,13 +36,13 @@ // Offset: 0x00000200 Length: 0x0000007B } .module ForLoop03.exe -// MVID: {60BCDCE8-1757-791C-A745-0383E8DCBC60} +// MVID: {61EFEC5E-1757-791C-A745-03835EECEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x066B0000 +// Image base: 0x06A30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -73,28 +73,29 @@ .line 10,10 : 4,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\ForLoop03.fs' IL_0000: ldc.i4.0 IL_0001: stloc.0 - .line 11,11 : 4,28 '' + .line 11,11 : 4,7 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_0040 - .line 12,12 : 6,20 '' + .line 12,12 : 6,9 '' IL_0006: call class [mscorlib]System.Collections.Generic.List`1 ForLoop03::get_ra() IL_000b: stloc.2 - .line 12,12 : 6,20 '' + .line 12,12 : 15,17 '' IL_000c: ldloc.2 IL_000d: callvirt instance valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator class [mscorlib]System.Collections.Generic.List`1::GetEnumerator() IL_0012: stloc.3 + .line 12,12 : 12,14 '' .try { IL_0013: ldloca.s V_3 IL_0015: call instance bool valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator::MoveNext() IL_001a: brfalse.s IL_002c - .line 12,12 : 6,20 '' IL_001c: ldloca.s V_3 IL_001e: call instance !0 valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator::get_Current() IL_0023: stloc.s x + .line 13,13 : 10,20 '' IL_0025: ldloc.0 IL_0026: ldc.i4.1 IL_0027: add @@ -118,14 +119,14 @@ IL_003d: ldc.i4.1 IL_003e: add IL_003f: stloc.1 - .line 11,11 : 4,28 '' + .line 11,11 : 14,16 '' IL_0040: ldloc.1 IL_0041: ldc.i4.1 IL_0042: ldc.i4 0x989680 IL_0047: add IL_0048: blt.s IL_0006 - .line 14,14 : 4,20 '' + .line 14,14 : 4,22 '' IL_004a: ldstr "z = %d" IL_004f: 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_0054: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) @@ -165,7 +166,7 @@ IL_0007: dup IL_0008: stsfld class [mscorlib]System.Collections.Generic.List`1 ''.$ForLoop03::ra@5 IL_000d: stloc.0 - .line 6,6 : 1,20 '' + .line 6,6 : 1,4 '' IL_000e: ldc.i4.0 IL_000f: stloc.1 IL_0010: br.s IL_0021 @@ -178,7 +179,7 @@ IL_001e: ldc.i4.1 IL_001f: add IL_0020: stloc.1 - .line 6,6 : 1,20 '' + .line 6,6 : 11,13 '' IL_0021: ldloc.1 IL_0022: ldc.i4.1 IL_0023: ldc.i4.s 100 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl index 5ef897b2169..35320fbb8c0 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GeneralizationOnUnions01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GeneralizationOnUnions01.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 GeneralizationOnUnions01 { @@ -36,13 +36,13 @@ // Offset: 0x00000690 Length: 0x000001F4 } .module GeneralizationOnUnions01.exe -// MVID: {611C4D7C-4CA2-8CD1-A745-03837C4D1C61} +// MVID: {61E07031-4CA2-8CD1-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A80000 +// Image base: 0x070E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -145,44 +145,42 @@ instance int32 CompareTo(class GeneralizationOnUnions01/Weirdo obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 27 (0x1b) + // Code size 26 (0x1a) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .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 '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 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_000f + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_000e .line 100001,100001 : 0,0 '' - IL_000d: ldc.i4.0 - IL_000e: ret + IL_000c: ldc.i4.0 + IL_000d: ret .line 100001,100001 : 0,0 '' - IL_000f: ldc.i4.1 - IL_0010: ret + IL_000e: ldc.i4.1 + IL_000f: ret .line 100001,100001 : 0,0 '' - IL_0011: ldarg.1 - IL_0012: ldnull - IL_0013: cgt.un - IL_0015: brfalse.s IL_0019 + IL_0010: ldarg.1 + IL_0011: ldnull + IL_0012: cgt.un + IL_0014: brfalse.s IL_0018 .line 100001,100001 : 0,0 '' - IL_0017: ldc.i4.m1 - IL_0018: ret + IL_0016: ldc.i4.m1 + IL_0017: ret .line 100001,100001 : 0,0 '' - IL_0019: ldc.i4.0 - IL_001a: ret + IL_0018: ldc.i4.0 + IL_0019: ret } // end of method Weirdo::CompareTo .method public hidebysig virtual final @@ -191,7 +189,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 4,4 : 6,12 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any GeneralizationOnUnions01/Weirdo @@ -207,7 +204,7 @@ // Code size 43 (0x2b) .maxstack 3 .locals init ([0] class GeneralizationOnUnions01/Weirdo V_0) - .line 4,4 : 6,12 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any GeneralizationOnUnions01/Weirdo IL_0006: stloc.0 @@ -252,28 +249,26 @@ 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 15 (0xf) + // Code size 14 (0xe) .maxstack 3 .locals init ([0] int32 V_0) - .line 4,4 : 6,12 '' - IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_000d + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_000c .line 100001,100001 : 0,0 '' - IL_0007: ldc.i4.0 - IL_0008: stloc.0 - IL_0009: ldarg.0 - IL_000a: pop - IL_000b: ldc.i4.0 - IL_000c: ret + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + IL_0008: ldarg.0 + IL_0009: pop + IL_000a: ldc.i4.0 + IL_000b: ret .line 100001,100001 : 0,0 '' - IL_000d: ldc.i4.0 - IL_000e: ret + IL_000c: ldc.i4.0 + IL_000d: ret } // end of method Weirdo::GetHashCode .method public hidebysig virtual final @@ -282,7 +277,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 6,12 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 GeneralizationOnUnions01/Weirdo::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -294,72 +288,68 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 31 (0x1f) + // Code size 30 (0x1e) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0017 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0016 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst GeneralizationOnUnions01/Weirdo - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst GeneralizationOnUnions01/Weirdo + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0015 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0014 .line 100001,100001 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: stloc.1 - IL_0013: ldc.i4.1 - IL_0014: ret + IL_0010: ldloc.0 + IL_0011: stloc.1 + IL_0012: ldc.i4.1 + IL_0013: ret .line 100001,100001 : 0,0 '' - IL_0015: ldc.i4.0 - IL_0016: ret + IL_0014: ldc.i4.0 + IL_0015: ret .line 100001,100001 : 0,0 '' - IL_0017: ldarg.1 - IL_0018: ldnull - IL_0019: cgt.un - IL_001b: ldc.i4.0 - IL_001c: ceq - IL_001e: ret + IL_0016: ldarg.1 + IL_0017: ldnull + IL_0018: cgt.un + IL_001a: ldc.i4.0 + IL_001b: ceq + IL_001d: 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 20 (0x14) + // Code size 19 (0x13) .maxstack 8 - .line 4,4 : 6,12 '' - IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_000c + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_000b .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: ret + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: ret .line 100001,100001 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: ldnull - IL_000e: cgt.un - IL_0010: ldc.i4.0 - IL_0011: ceq - IL_0013: ret + IL_000b: ldarg.1 + IL_000c: ldnull + IL_000d: cgt.un + IL_000f: ldc.i4.0 + IL_0010: ceq + IL_0012: ret } // end of method Weirdo::Equals .method public hidebysig virtual final @@ -369,7 +359,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class GeneralizationOnUnions01/Weirdo V_0) - .line 4,4 : 6,12 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst GeneralizationOnUnions01/Weirdo IL_0006: stloc.0 @@ -463,7 +453,6 @@ .line 7,7 : 4,13 '' IL_0000: ldc.i4.1 IL_0001: stloc.0 - .line 100001,100001 : 0,0 '' IL_0002: ldloc.0 IL_0003: newobj instance void GeneralizationOnUnions01/f@8::.ctor(int32) IL_0008: stloc.1 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GenericTypeStaticField01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GenericTypeStaticField01.il.bsl index 928e00e3cfd..30a3cf15112 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GenericTypeStaticField01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GenericTypeStaticField01.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 GenericTypeStaticField01 { @@ -36,13 +36,13 @@ // Offset: 0x00000608 Length: 0x000001E1 } .module GenericTypeStaticField01.exe -// MVID: {60B68B7F-1E75-7E6B-A745-03837F8BB660} +// MVID: {61E07031-1E75-7E6B-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00F10000 +// Image base: 0x07590000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,13 +62,10 @@ { // Code size 9 (0x9) .maxstack 8 - .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\\Misc\\GenericTypeStaticField01.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 2,2 : 6,9 '' IL_0008: ret } // end of method Foo`1::.ctor @@ -77,39 +74,39 @@ { // Code size 19 (0x13) .maxstack 8 - .line 3,3 : 10,41 '' IL_0000: newobj instance void class GenericTypeStaticField01/Foo`1::.ctor() IL_0005: stsfld class GenericTypeStaticField01/Foo`1 class GenericTypeStaticField01/Foo`1::theInstance IL_000a: ldc.i4.1 IL_000b: volatile. IL_000d: stsfld int32 class GenericTypeStaticField01/Foo`1::init@2 - .line 2,2 : 6,9 '' IL_0012: ret } // end of method Foo`1::.cctor .method public specialname static class GenericTypeStaticField01/Foo`1 get_Instance() cil managed { - // 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 4,4 : 28,39 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\GenericTypeStaticField01.fs' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: volatile. - IL_0002: ldsfld int32 class GenericTypeStaticField01/Foo`1::init@2 - IL_0007: ldc.i4.1 - IL_0008: bge.s IL_0013 + IL_0001: volatile. + IL_0003: ldsfld int32 class GenericTypeStaticField01/Foo`1::init@2 + IL_0008: ldc.i4.1 + IL_0009: bge.s IL_0014 .line 16707566,16707566 : 0,0 '' - IL_000a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() - IL_000f: nop - .line 16707566,16707566 : 0,0 '' + IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() IL_0010: nop - IL_0011: br.s IL_0014 + .line 16707566,16707566 : 0,0 '' + IL_0011: nop + IL_0012: br.s IL_0015 .line 16707566,16707566 : 0,0 '' - IL_0013: nop - .line 4,4 : 28,39 '' - IL_0014: ldsfld class GenericTypeStaticField01/Foo`1 class GenericTypeStaticField01/Foo`1::theInstance - IL_0019: ret + IL_0014: nop + IL_0015: ldsfld class GenericTypeStaticField01/Foo`1 class GenericTypeStaticField01/Foo`1::theInstance + IL_001a: ret } // end of method Foo`1::get_Instance .property class GenericTypeStaticField01/Foo`1 @@ -130,12 +127,10 @@ { // Code size 9 (0x9) .maxstack 8 - .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 6,6 : 6,9 '' IL_0008: ret } // end of method Bar`2::.ctor @@ -144,39 +139,38 @@ { // Code size 19 (0x13) .maxstack 8 - .line 7,7 : 10,44 '' IL_0000: newobj instance void class GenericTypeStaticField01/Bar`2::.ctor() IL_0005: stsfld class GenericTypeStaticField01/Bar`2 class GenericTypeStaticField01/Bar`2::theInstance IL_000a: ldc.i4.1 IL_000b: volatile. IL_000d: stsfld int32 class GenericTypeStaticField01/Bar`2::'init@6-1' - .line 6,6 : 6,9 '' IL_0012: ret } // end of method Bar`2::.cctor .method public specialname static class GenericTypeStaticField01/Bar`2 get_Instance() cil managed { - // Code size 26 (0x1a) + // Code size 27 (0x1b) .maxstack 8 + .line 8,8 : 28,39 '' + IL_0000: nop .line 16707566,16707566 : 0,0 '' - IL_0000: volatile. - IL_0002: ldsfld int32 class GenericTypeStaticField01/Bar`2::'init@6-1' - IL_0007: ldc.i4.1 - IL_0008: bge.s IL_0013 + IL_0001: volatile. + IL_0003: ldsfld int32 class GenericTypeStaticField01/Bar`2::'init@6-1' + IL_0008: ldc.i4.1 + IL_0009: bge.s IL_0014 .line 16707566,16707566 : 0,0 '' - IL_000a: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() - IL_000f: nop - .line 16707566,16707566 : 0,0 '' + IL_000b: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::FailStaticInit() IL_0010: nop - IL_0011: br.s IL_0014 + .line 16707566,16707566 : 0,0 '' + IL_0011: nop + IL_0012: br.s IL_0015 .line 16707566,16707566 : 0,0 '' - IL_0013: nop - .line 8,8 : 28,39 '' - IL_0014: ldsfld class GenericTypeStaticField01/Bar`2 class GenericTypeStaticField01/Bar`2::theInstance - IL_0019: ret + IL_0014: nop + IL_0015: ldsfld class GenericTypeStaticField01/Bar`2 class GenericTypeStaticField01/Bar`2::theInstance + IL_001a: ret } // end of method Bar`2::get_Instance .property class GenericTypeStaticField01/Bar`2 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/IfThenElse01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/IfThenElse01.il.bsl index da3619e275e..33dd9dc55d9 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/IfThenElse01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/IfThenElse01.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 IfThenElse01 { @@ -36,13 +36,13 @@ // Offset: 0x00000208 Length: 0x00000092 } .module IfThenElse01.dll -// MVID: {611C4D7C-2D6C-0B5D-A745-03837C4D1C61} +// MVID: {61E07031-2D6C-0B5D-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B70000 +// Image base: 0x07680000 // =============== CLASS MEMBERS DECLARATION =================== @@ -76,6 +76,8 @@ .method public strict virtual instance object Specialize() cil managed { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NoBoxingOnDispose01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NoBoxingOnDispose01.il.bsl index 570d4feb14e..5e703f24b53 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NoBoxingOnDispose01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NoBoxingOnDispose01.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 NoBoxingOnDispose01 { @@ -36,13 +36,13 @@ // Offset: 0x00000220 Length: 0x0000007F } .module NoBoxingOnDispose01.exe -// MVID: {60BCDCE8-4EA9-C934-A745-0383E8DCBC60} +// MVID: {61EFEC5E-4EA9-C934-A745-03835EECEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07070000 +// Image base: 0x06BA0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -53,45 +53,47 @@ .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 f1(class [mscorlib]System.Collections.Generic.List`1 x) cil managed { - // Code size 46 (0x2e) + // Code size 47 (0x2f) .maxstack 3 .locals init ([0] class [mscorlib]System.Collections.Generic.List`1 V_0, [1] valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator V_1, [2] !!T a) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 3,16 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\NoBoxingOnDispose01.fs' + .line 6,6 : 3,6 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\NoBoxingOnDispose01.fs' IL_0000: ldarg.0 IL_0001: stloc.0 - .line 6,6 : 3,16 '' + .line 6,6 : 12,13 '' IL_0002: ldloc.0 IL_0003: callvirt instance valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator class [mscorlib]System.Collections.Generic.List`1::GetEnumerator() IL_0008: stloc.1 + .line 6,6 : 9,11 '' .try { IL_0009: ldloca.s V_1 IL_000b: call instance bool valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator::MoveNext() - IL_0010: brfalse.s IL_001d + IL_0010: brfalse.s IL_001e - .line 6,6 : 3,16 '' IL_0012: ldloca.s V_1 IL_0014: call instance !0 valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator::get_Current() IL_0019: stloc.2 - .line 100001,100001 : 0,0 '' + .line 7,7 : 3,5 '' IL_001a: nop - IL_001b: br.s IL_0009 + .line 100001,100001 : 0,0 '' + IL_001b: nop + IL_001c: br.s IL_0009 - IL_001d: leave.s IL_002d + IL_001e: leave.s IL_002e } // end .try finally { - IL_001f: ldloca.s V_1 - IL_0021: constrained. valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator - IL_0027: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_002c: endfinally + IL_0020: ldloca.s V_1 + IL_0022: constrained. valuetype [mscorlib]System.Collections.Generic.List`1/Enumerator + IL_0028: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_002d: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_002d: ret + IL_002e: ret } // end of method NoBoxingOnDispose01::f1 } // end of class NoBoxingOnDispose01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NonEscapingArguments02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NonEscapingArguments02.il.bsl index a20d0205daa..e7d9474e35b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NonEscapingArguments02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NonEscapingArguments02.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 NonEscapingArguments02 { @@ -36,13 +36,13 @@ // Offset: 0x00000360 Length: 0x0000019E } .module NonEscapingArguments02.dll -// MVID: {60B68B7F-BB56-6582-A745-03837F8BB660} +// MVID: {61E07031-BB56-6582-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B40000 +// Image base: 0x05190000 // =============== CLASS MEMBERS DECLARATION =================== @@ -61,18 +61,14 @@ { // Code size 21 (0x15) .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\\NonEscapingArguments02.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 6,6 : 5,36 '' IL_0008: ldarg.0 IL_0009: ldarg.1 IL_000a: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Length(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_000f: stfld int32 class NonEscapingArguments02/ListSizeCounter`1::size - .line 5,5 : 6,21 '' IL_0014: ret } // end of method ListSizeCounter`1::.ctor @@ -81,7 +77,8 @@ { // Code size 7 (0x7) .maxstack 8 - .line 7,7 : 24,28 '' + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 7,7 : 24,28 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\NonEscapingArguments02.fs' IL_0000: ldarg.0 IL_0001: ldfld int32 class NonEscapingArguments02/ListSizeCounter`1::size IL_0006: ret diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl index b03d9a51166..e110fbaec2c 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs01.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 Structs01 { @@ -36,13 +36,13 @@ // Offset: 0x00000748 Length: 0x00000231 } .module Structs01.exe -// MVID: {611C52A3-701F-5E27-A745-0383A3521C61} +// MVID: {61EFEE1F-701F-5E27-A745-03831FEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06680000 +// Image base: 0x06E70000 // =============== CLASS MEMBERS DECLARATION =================== @@ -72,7 +72,7 @@ [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 7,7 : 6,10 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\Structs01.fs' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\Structs01.fs' IL_0000: ldarga.s obj IL_0002: stloc.0 IL_0003: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() @@ -105,7 +105,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 7,7 : 6,10 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any Experiment.Test/Test @@ -125,7 +124,7 @@ [2] class [mscorlib]System.Collections.IComparer V_2, [3] int32 V_3, [4] int32 V_4) - .line 7,7 : 6,10 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any Experiment.Test/Test IL_0006: stloc.0 @@ -161,9 +160,8 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 27 (0x1b) .maxstack 7 - .locals init ([0] int32 V_0, - [1] class [mscorlib]System.Collections.IEqualityComparer V_1) - .line 7,7 : 6,10 '' + .locals init (int32 V_0, + class [mscorlib]System.Collections.IEqualityComparer V_1) IL_0000: ldc.i4.0 IL_0001: stloc.0 IL_0002: ldc.i4 0x9e3779b9 @@ -191,7 +189,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 7,7 : 6,10 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: call instance int32 Experiment.Test/Test::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -253,8 +250,7 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 18 (0x12) .maxstack 4 - .locals init ([0] valuetype Experiment.Test/Test& V_0) - .line 7,7 : 6,10 '' + .locals init (valuetype Experiment.Test/Test& V_0) IL_0000: ldarga.s obj IL_0002: stloc.0 IL_0003: ldarg.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl index 15115f5ba6f..78cbccb0b56 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Structs02.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 Structs02 { @@ -36,13 +36,13 @@ // Offset: 0x00000780 Length: 0x00000237 } .module Structs02.exe -// MVID: {611C52A3-7040-5E27-A745-0383A3521C61} +// MVID: {61EFEE1F-7040-5E27-A745-03831FEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x051F0000 +// Image base: 0x07400000 // =============== CLASS MEMBERS DECLARATION =================== @@ -83,7 +83,7 @@ [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 6,6 : 6,11 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\Structs02.fs' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\Structs02.fs' IL_0000: ldarga.s obj IL_0002: stloc.0 IL_0003: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() @@ -116,7 +116,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 6,6 : 6,11 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any Experiment.Test/Repro @@ -136,7 +135,7 @@ [2] class [mscorlib]System.Collections.IComparer V_2, [3] int32 V_3, [4] int32 V_4) - .line 6,6 : 6,11 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any Experiment.Test/Repro IL_0006: stloc.0 @@ -172,9 +171,8 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 27 (0x1b) .maxstack 7 - .locals init ([0] int32 V_0, - [1] class [mscorlib]System.Collections.IEqualityComparer V_1) - .line 6,6 : 6,11 '' + .locals init (int32 V_0, + class [mscorlib]System.Collections.IEqualityComparer V_1) IL_0000: ldc.i4.0 IL_0001: stloc.0 IL_0002: ldc.i4 0x9e3779b9 @@ -202,7 +200,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 6,6 : 6,11 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: call instance int32 Experiment.Test/Repro::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -261,7 +258,7 @@ IL_0001: ldc.i4.0 IL_0002: stloc.0 IL_0003: stloc.1 - .line 11,11 : 9,31 '' + .line 11,11 : 9,12 '' IL_0004: ldc.i4.0 IL_0005: stloc.3 IL_0006: ldarg.1 @@ -281,7 +278,7 @@ IL_0014: ldc.i4.1 IL_0015: add IL_0016: stloc.3 - .line 11,11 : 9,31 '' + .line 11,11 : 17,19 '' IL_0017: ldloc.3 IL_0018: ldloc.2 IL_0019: ldc.i4.1 @@ -301,8 +298,7 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 18 (0x12) .maxstack 4 - .locals init ([0] valuetype Experiment.Test/Repro& V_0) - .line 6,6 : 6,11 '' + .locals init (valuetype Experiment.Test/Repro& V_0) IL_0000: ldarga.s obj IL_0002: stloc.0 IL_0003: ldarg.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl index 0e812538db2..305e6e79e47 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/StructsAsArrayElements01.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 StructsAsArrayElements01 { @@ -36,13 +36,13 @@ // Offset: 0x00000758 Length: 0x0000022C } .module StructsAsArrayElements01.dll -// MVID: {611C52A3-29F3-6E68-A745-0383A3521C61} +// MVID: {61EFEE1F-29F3-6E68-A745-03831FEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06670000 +// Image base: 0x06EF0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -73,7 +73,7 @@ [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 7,7 : 6,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\StructsAsArrayElements01.fs' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\StructsAsArrayElements01.fs' IL_0000: ldarga.s obj IL_0002: stloc.0 IL_0003: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() @@ -106,7 +106,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 7,7 : 6,7 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any StructsAsArrayElements01/T @@ -126,7 +125,7 @@ [2] class [mscorlib]System.Collections.IComparer V_2, [3] int32 V_3, [4] int32 V_4) - .line 7,7 : 6,7 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any StructsAsArrayElements01/T IL_0006: stloc.0 @@ -162,9 +161,8 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 27 (0x1b) .maxstack 7 - .locals init ([0] int32 V_0, - [1] class [mscorlib]System.Collections.IEqualityComparer V_1) - .line 7,7 : 6,7 '' + .locals init (int32 V_0, + class [mscorlib]System.Collections.IEqualityComparer V_1) IL_0000: ldc.i4.0 IL_0001: stloc.0 IL_0002: ldc.i4 0x9e3779b9 @@ -192,7 +190,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 7,7 : 6,7 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: call instance int32 StructsAsArrayElements01/T::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -254,8 +251,7 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 18 (0x12) .maxstack 4 - .locals init ([0] valuetype StructsAsArrayElements01/T& V_0) - .line 7,7 : 6,7 '' + .locals init (valuetype StructsAsArrayElements01/T& V_0) IL_0000: ldarga.s obj IL_0002: stloc.0 IL_0003: ldarg.0 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 7e3a902de5b..a582377e853 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/TryWith_NoFilterBlocks01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/TryWith_NoFilterBlocks01.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 TryWith_NoFilterBlocks01 { @@ -36,13 +36,13 @@ // Offset: 0x00000160 Length: 0x0000005F } .module TryWith_NoFilterBlocks01.exe -// MVID: {611C4D7C-3DEF-9A40-A745-03837C4D1C61} +// MVID: {61E07031-3DEF-9A40-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x066A0000 +// Image base: 0x067E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -87,6 +87,7 @@ .line 100001,100001 : 0,0 '' IL_000a: ldloc.0 IL_000b: stloc.1 + .line 6,6 : 12,31 '' IL_000c: ldloc.1 IL_000d: callvirt instance int32 [mscorlib]System.Object::GetHashCode() IL_0012: ldc.i4.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/cas.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/cas.il.bsl index e5496eb0016..4e002592f66 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/cas.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/cas.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 extern cas { @@ -43,13 +43,13 @@ // Offset: 0x00000620 Length: 0x000000F3 } .module cas.exe -// MVID: {6124062D-35EA-18E3-A745-03832D062461} +// MVID: {61E07031-35EA-18E3-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05010000 +// Image base: 0x07440000 // =============== CLASS MEMBERS DECLARATION =================== @@ -75,13 +75,10 @@ { // Code size 9 (0x9) .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\\cas.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 11,11 : 10,13 '' IL_0008: ret } // end of method Foo::.ctor @@ -95,7 +92,8 @@ // Code size 8 (0x8) .maxstack 3 .locals init ([0] class Cas/AttrTest/Foo x) - .line 100001,100001 : 0,0 '' + .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\\cas.fs' IL_0000: ldarg.0 IL_0001: stloc.0 .line 14,14 : 33,37 '' diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.il.bsl index fefd5e583ba..a7c461486a4 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.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 extern netstandard { @@ -34,20 +34,20 @@ } .mresource public FSharpSignatureData.comparison_decimal01 { - // Offset: 0x00000000 Length: 0x00000170 + // Offset: 0x00000000 Length: 0x00000172 } .mresource public FSharpOptimizationData.comparison_decimal01 { // Offset: 0x00000178 Length: 0x0000005B } .module comparison_decimal01.exe -// MVID: {5F1FA087-76D8-7EE3-A745-038387A01F5F} +// MVID: {61E07031-76D8-7EE3-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06BE0000 +// Image base: 0x07480000 // =============== CLASS MEMBERS DECLARATION =================== @@ -70,8 +70,6 @@ .entrypoint // Code size 228 (0xe4) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 4,4 : 9,20 'C:\\kevinransom\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Operators\\comparison_decimal01.fs' IL_0000: ldc.i4.s 10 IL_0002: ldc.i4.0 IL_0003: ldc.i4.0 @@ -95,7 +93,6 @@ IL_0016: call bool [netstandard]System.Decimal::op_LessThan(valuetype [netstandard]System.Decimal, valuetype [netstandard]System.Decimal) IL_001b: pop - .line 5,5 : 9,21 '' IL_001c: ldc.i4.s 10 IL_001e: ldc.i4.0 IL_001f: ldc.i4.0 @@ -119,7 +116,6 @@ IL_0032: call bool [netstandard]System.Decimal::op_LessThanOrEqual(valuetype [netstandard]System.Decimal, valuetype [netstandard]System.Decimal) IL_0037: pop - .line 6,6 : 9,20 '' IL_0038: ldc.i4.s 10 IL_003a: ldc.i4.0 IL_003b: ldc.i4.0 @@ -143,7 +139,6 @@ IL_004e: call bool [netstandard]System.Decimal::op_GreaterThan(valuetype [netstandard]System.Decimal, valuetype [netstandard]System.Decimal) IL_0053: pop - .line 7,7 : 9,21 '' IL_0054: ldc.i4.s 10 IL_0056: ldc.i4.0 IL_0057: ldc.i4.0 @@ -167,7 +162,6 @@ IL_006a: call bool [netstandard]System.Decimal::op_GreaterThanOrEqual(valuetype [netstandard]System.Decimal, valuetype [netstandard]System.Decimal) IL_006f: pop - .line 8,8 : 9,20 '' IL_0070: ldc.i4.s 10 IL_0072: ldc.i4.0 IL_0073: ldc.i4.0 @@ -191,7 +185,6 @@ IL_0086: call bool [netstandard]System.Decimal::op_Equality(valuetype [netstandard]System.Decimal, valuetype [netstandard]System.Decimal) IL_008b: pop - .line 9,9 : 9,21 '' IL_008c: ldc.i4.s 10 IL_008e: ldc.i4.0 IL_008f: ldc.i4.0 @@ -217,7 +210,6 @@ IL_00a7: ldc.i4.0 IL_00a8: ceq IL_00aa: pop - .line 10,10 : 9,20 '' IL_00ab: ldc.i4.s 10 IL_00ad: ldc.i4.0 IL_00ae: ldc.i4.0 @@ -241,7 +233,6 @@ IL_00c1: call bool [netstandard]System.Decimal::op_Equality(valuetype [netstandard]System.Decimal, valuetype [netstandard]System.Decimal) IL_00c6: pop - .line 11,11 : 9,26 '' IL_00c7: ldc.i4.s 10 IL_00c9: ldc.i4.0 IL_00ca: ldc.i4.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl index 6dafc94cb80..875958cb5a7 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.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 extern Utils { @@ -50,13 +50,13 @@ // Offset: 0x000005F0 Length: 0x00000211 } .module Linq101Aggregates01.exe -// MVID: {611C52A3-D281-4783-A745-0383A3521C61} +// MVID: {61EFEE20-D281-4783-A745-038320EEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06ED0000 +// Image base: 0x06B00000 // =============== CLASS MEMBERS DECLARATION =================== @@ -105,7 +105,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] int32 V_0, [1] int32 n) @@ -123,78 +123,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 12,12 : 9,33 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_factorsOf300() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/'Pipe #1 input at line 11@12'::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::pc - .line 12,12 : 9,33 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/'Pipe #1 input at line 11@12'::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/'Pipe #1 input at line 11@12'::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 12,12 : 9,33 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 12,12 : 9,12 '' + IL_0025: nop + .line 12,12 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_factorsOf300() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/'Pipe #1 input at line 11@12'::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/'Pipe #1 input at line 11@12'::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/'Pipe #1 input at line 11@12'::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 13,13 : 9,17 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::pc - .line 12,12 : 9,33 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/'Pipe #1 input at line 11@12'::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/'Pipe #1 input at line 11@12'::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::pc - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/'Pipe #1 input at line 11@12'::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/'Pipe #1 input at line 11@12'::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::pc + IL_008c: ldarg.0 + IL_008d: ldc.i4.0 + IL_008e: stfld int32 Linq101Aggregates01/'Pipe #1 input at line 11@12'::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method 'Pipe #1 input at line 11@12'::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -267,7 +266,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 12,12 : 9,33 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -277,20 +275,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method 'Pipe #1 input at line 11@12'::Close .method public strict virtual instance bool @@ -406,7 +402,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] int32 V_0, [1] int32 n) @@ -423,78 +419,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 21,21 : 9,28 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Aggregates01/numSum@21::pc - .line 21,21 : 9,28 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 21,21 : 9,28 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 21,21 : 9,12 '' + IL_0025: nop + .line 21,21 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Aggregates01/numSum@21::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 22,22 : 9,16 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Aggregates01/numSum@21::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld int32 Linq101Aggregates01/numSum@21::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Aggregates01/numSum@21::pc - .line 21,21 : 9,28 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Aggregates01/numSum@21::pc - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Aggregates01/numSum@21::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Aggregates01/numSum@21::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld int32 Linq101Aggregates01/numSum@21::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Aggregates01/numSum@21::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/numSum@21::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Aggregates01/numSum@21::pc + IL_008c: ldarg.0 + IL_008d: ldc.i4.0 + IL_008e: stfld int32 Linq101Aggregates01/numSum@21::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method numSum@21::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -567,7 +562,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 21,21 : 9,28 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -577,20 +571,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method numSum@21::Close .method public strict virtual instance bool @@ -744,7 +736,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] string V_0, [1] string w) @@ -761,78 +753,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 30,30 : 9,26 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Aggregates01/totalChars@30::pc - .line 30,30 : 9,26 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 30,30 : 9,26 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 30,30 : 9,12 '' + IL_0025: nop + .line 30,30 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Aggregates01/totalChars@30::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 31,31 : 9,25 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Aggregates01/totalChars@30::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld string Linq101Aggregates01/totalChars@30::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Aggregates01/totalChars@30::pc - .line 30,30 : 9,26 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Aggregates01/totalChars@30::pc - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld string Linq101Aggregates01/totalChars@30::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Aggregates01/totalChars@30::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld string Linq101Aggregates01/totalChars@30::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Aggregates01/totalChars@30::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/totalChars@30::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Aggregates01/totalChars@30::pc + IL_008c: ldarg.0 + IL_008d: ldnull + IL_008e: stfld string Linq101Aggregates01/totalChars@30::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method totalChars@30::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -905,7 +896,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 30,30 : 9,26 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -915,20 +905,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method totalChars@30::Close .method public strict virtual instance bool @@ -1071,7 +1059,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [Utils]Utils/Product p) - .line 39,39 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 40,40 : 9,32 '' @@ -1208,7 +1196,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 149 (0x95) + // Code size 150 (0x96) .maxstack 6 .locals init ([0] class [Utils]Utils/Product V_0, [1] class [Utils]Utils/Product x) @@ -1225,79 +1213,78 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006b + IL_001c: br.s IL_006c .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0068 + IL_001f: br.s IL_0069 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008c + IL_0022: br.s IL_008d .line 100001,100001 : 0,0 '' IL_0024: nop - .line 42,42 : 13,26 '' - IL_0025: ldarg.0 + .line 42,42 : 13,16 '' + IL_0025: nop + .line 42,42 : 13,16 '' IL_0026: ldarg.0 - IL_0027: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/sum@42::g - IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' - IL_0036: ldarg.0 - IL_0037: ldc.i4.1 - IL_0038: stfld int32 Linq101Aggregates01/sum@42::pc - .line 42,42 : 13,26 '' - IL_003d: ldarg.0 - IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' - IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0048: brfalse.s IL_006b - - IL_004a: ldarg.0 - IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' - IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0055: stloc.0 - .line 42,42 : 13,26 '' - IL_0056: ldloc.0 - IL_0057: stloc.1 + IL_0027: ldarg.0 + IL_0028: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/sum@42::g + IL_002d: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0032: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' + IL_0037: ldarg.0 + IL_0038: ldc.i4.1 + IL_0039: stfld int32 Linq101Aggregates01/sum@42::pc + IL_003e: ldarg.0 + IL_003f: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' + IL_0044: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0049: brfalse.s IL_006c + + IL_004b: ldarg.0 + IL_004c: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' + IL_0051: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0056: stloc.0 + IL_0057: ldloc.0 + IL_0058: stloc.1 .line 43,43 : 13,33 '' - IL_0058: ldarg.0 - IL_0059: ldc.i4.2 - IL_005a: stfld int32 Linq101Aggregates01/sum@42::pc - IL_005f: ldarg.0 - IL_0060: ldloc.1 - IL_0061: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::current - IL_0066: ldc.i4.1 - IL_0067: ret - - .line 100001,100001 : 0,0 '' - IL_0068: nop - IL_0069: br.s IL_003d - - IL_006b: ldarg.0 - IL_006c: ldc.i4.3 - IL_006d: stfld int32 Linq101Aggregates01/sum@42::pc - .line 42,42 : 13,26 '' - IL_0072: ldarg.0 - IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' - IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007d: nop - IL_007e: ldarg.0 - IL_007f: ldnull - IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' - IL_0085: ldarg.0 - IL_0086: ldc.i4.3 - IL_0087: stfld int32 Linq101Aggregates01/sum@42::pc - IL_008c: ldarg.0 - IL_008d: ldnull - IL_008e: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::current - IL_0093: ldc.i4.0 - IL_0094: ret + IL_0059: ldarg.0 + IL_005a: ldc.i4.2 + IL_005b: stfld int32 Linq101Aggregates01/sum@42::pc + IL_0060: ldarg.0 + IL_0061: ldloc.1 + IL_0062: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::current + IL_0067: ldc.i4.1 + IL_0068: ret + + .line 100001,100001 : 0,0 '' + IL_0069: nop + IL_006a: br.s IL_003e + + IL_006c: ldarg.0 + IL_006d: ldc.i4.3 + IL_006e: stfld int32 Linq101Aggregates01/sum@42::pc + IL_0073: ldarg.0 + IL_0074: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' + IL_0079: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007e: nop + IL_007f: ldarg.0 + IL_0080: ldnull + IL_0081: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/sum@42::'enum' + IL_0086: ldarg.0 + IL_0087: ldc.i4.3 + IL_0088: stfld int32 Linq101Aggregates01/sum@42::pc + IL_008d: ldarg.0 + IL_008e: ldnull + IL_008f: stfld class [Utils]Utils/Product Linq101Aggregates01/sum@42::current + IL_0094: ldc.i4.0 + IL_0095: ret } // end of method sum@42::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1370,7 +1357,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 42,42 : 13,26 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -1380,20 +1366,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method sum@42::Close .method public strict virtual instance bool @@ -1550,11 +1534,13 @@ [8] int32 V_8, [9] int32 V_9, [10] class [mscorlib]System.IDisposable V_10) - .line 40,40 : 38,39 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 + .line 41,41 : 19,24 '' IL_0002: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0007: stloc.2 + .line 41,41 : 19,24 '' IL_0008: ldloc.2 IL_0009: stloc.3 IL_000a: ldloc.0 @@ -1583,7 +1569,6 @@ IL_0038: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() IL_003d: brfalse.s IL_0055 - .line 43,43 : 13,33 '' IL_003f: ldloc.s V_9 IL_0041: ldloc.s V_5 IL_0043: ldloc.s V_7 @@ -1724,7 +1709,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] int32 V_0, [1] int32 n) @@ -1741,78 +1726,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 49,49 : 22,41 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Aggregates01/minNum@49::pc - .line 49,49 : 22,41 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 49,49 : 22,41 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 49,49 : 22,25 '' + IL_0025: nop + .line 49,49 : 22,25 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Aggregates01/minNum@49::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 49,49 : 42,49 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Aggregates01/minNum@49::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld int32 Linq101Aggregates01/minNum@49::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Aggregates01/minNum@49::pc - .line 49,49 : 22,41 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Aggregates01/minNum@49::pc - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Aggregates01/minNum@49::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Aggregates01/minNum@49::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld int32 Linq101Aggregates01/minNum@49::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Aggregates01/minNum@49::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/minNum@49::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Aggregates01/minNum@49::pc + IL_008c: ldarg.0 + IL_008d: ldc.i4.0 + IL_008e: stfld int32 Linq101Aggregates01/minNum@49::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method minNum@49::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1885,7 +1869,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 49,49 : 22,41 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -1895,20 +1878,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method minNum@49::Close .method public strict virtual instance bool @@ -2062,7 +2043,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] string V_0, [1] string w) @@ -2079,78 +2060,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 52,52 : 28,45 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Aggregates01/shortestWord@52::pc - .line 52,52 : 28,45 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 52,52 : 28,45 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 52,52 : 28,31 '' + IL_0025: nop + .line 52,52 : 28,31 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 52,52 : 46,60 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Aggregates01/shortestWord@52::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld string Linq101Aggregates01/shortestWord@52::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Aggregates01/shortestWord@52::pc - .line 52,52 : 28,45 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Aggregates01/shortestWord@52::pc - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld string Linq101Aggregates01/shortestWord@52::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld string Linq101Aggregates01/shortestWord@52::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/shortestWord@52::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Aggregates01/shortestWord@52::pc + IL_008c: ldarg.0 + IL_008d: ldnull + IL_008e: stfld string Linq101Aggregates01/shortestWord@52::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method shortestWord@52::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -2223,7 +2203,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 52,52 : 28,45 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -2233,20 +2212,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method shortestWord@52::Close .method public strict virtual instance bool @@ -2389,7 +2366,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [Utils]Utils/Product p) - .line 57,57 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 58,58 : 9,32 '' @@ -2526,7 +2503,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 149 (0x95) + // Code size 150 (0x96) .maxstack 6 .locals init ([0] class [Utils]Utils/Product V_0, [1] class [Utils]Utils/Product x) @@ -2543,79 +2520,78 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006b + IL_001c: br.s IL_006c .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0068 + IL_001f: br.s IL_0069 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008c + IL_0022: br.s IL_008d .line 100001,100001 : 0,0 '' IL_0024: nop - .line 59,59 : 27,40 '' - IL_0025: ldarg.0 + .line 59,59 : 27,30 '' + IL_0025: nop + .line 59,59 : 27,30 '' IL_0026: ldarg.0 - IL_0027: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/min@59::g - IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' - IL_0036: ldarg.0 - IL_0037: ldc.i4.1 - IL_0038: stfld int32 Linq101Aggregates01/min@59::pc - .line 59,59 : 27,40 '' - IL_003d: ldarg.0 - IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' - IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0048: brfalse.s IL_006b - - IL_004a: ldarg.0 - IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' - IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0055: stloc.0 - .line 59,59 : 27,40 '' - IL_0056: ldloc.0 - IL_0057: stloc.1 + IL_0027: ldarg.0 + IL_0028: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/min@59::g + IL_002d: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0032: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' + IL_0037: ldarg.0 + IL_0038: ldc.i4.1 + IL_0039: stfld int32 Linq101Aggregates01/min@59::pc + IL_003e: ldarg.0 + IL_003f: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' + IL_0044: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0049: brfalse.s IL_006c + + IL_004b: ldarg.0 + IL_004c: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' + IL_0051: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0056: stloc.0 + IL_0057: ldloc.0 + IL_0058: stloc.1 .line 59,59 : 41,58 '' - IL_0058: ldarg.0 - IL_0059: ldc.i4.2 - IL_005a: stfld int32 Linq101Aggregates01/min@59::pc - IL_005f: ldarg.0 - IL_0060: ldloc.1 - IL_0061: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::current - IL_0066: ldc.i4.1 - IL_0067: ret - - .line 100001,100001 : 0,0 '' - IL_0068: nop - IL_0069: br.s IL_003d - - IL_006b: ldarg.0 - IL_006c: ldc.i4.3 - IL_006d: stfld int32 Linq101Aggregates01/min@59::pc - .line 59,59 : 27,40 '' - IL_0072: ldarg.0 - IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' - IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007d: nop - IL_007e: ldarg.0 - IL_007f: ldnull - IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' - IL_0085: ldarg.0 - IL_0086: ldc.i4.3 - IL_0087: stfld int32 Linq101Aggregates01/min@59::pc - IL_008c: ldarg.0 - IL_008d: ldnull - IL_008e: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::current - IL_0093: ldc.i4.0 - IL_0094: ret + IL_0059: ldarg.0 + IL_005a: ldc.i4.2 + IL_005b: stfld int32 Linq101Aggregates01/min@59::pc + IL_0060: ldarg.0 + IL_0061: ldloc.1 + IL_0062: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::current + IL_0067: ldc.i4.1 + IL_0068: ret + + .line 100001,100001 : 0,0 '' + IL_0069: nop + IL_006a: br.s IL_003e + + IL_006c: ldarg.0 + IL_006d: ldc.i4.3 + IL_006e: stfld int32 Linq101Aggregates01/min@59::pc + IL_0073: ldarg.0 + IL_0074: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' + IL_0079: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007e: nop + IL_007f: ldarg.0 + IL_0080: ldnull + IL_0081: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/min@59::'enum' + IL_0086: ldarg.0 + IL_0087: ldc.i4.3 + IL_0088: stfld int32 Linq101Aggregates01/min@59::pc + IL_008d: ldarg.0 + IL_008e: ldnull + IL_008f: stfld class [Utils]Utils/Product Linq101Aggregates01/min@59::current + IL_0094: ldc.i4.0 + IL_0095: ret } // end of method min@59::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -2688,7 +2664,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 59,59 : 27,40 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -2698,20 +2673,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method min@59::Close .method public strict virtual instance bool @@ -2855,37 +2828,40 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal>,object> Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed { - // Code size 53 (0x35) + // Code size 54 (0x36) .maxstack 9 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, [1] valuetype [mscorlib]System.Decimal min) - .line 58,58 : 38,39 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 - IL_0002: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0007: ldloc.0 - IL_0008: ldnull - IL_0009: ldc.i4.0 - IL_000a: ldnull - IL_000b: newobj instance void Linq101Aggregates01/min@59::.ctor(class [System.Core]System.Linq.IGrouping`2, + .line 59,59 : 19,24 '' + IL_0002: nop + .line 59,59 : 19,24 '' + IL_0003: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0008: ldloc.0 + IL_0009: ldnull + IL_000a: ldc.i4.0 + IL_000b: ldnull + IL_000c: newobj instance void Linq101Aggregates01/min@59::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0010: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0015: ldsfld class Linq101Aggregates01/'min@59-1' Linq101Aggregates01/'min@59-1'::@_instance - IL_001a: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0011: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0016: ldsfld class Linq101Aggregates01/'min@59-1' Linq101Aggregates01/'min@59-1'::@_instance + IL_001b: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_001f: stloc.1 + IL_0020: stloc.1 .line 60,60 : 9,28 '' - IL_0020: ldarg.0 - IL_0021: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #3 input at line 56@58-3'::builder@ - IL_0026: ldloc.0 - IL_0027: ldloc.1 - IL_0028: newobj instance void class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::.ctor(!0, + IL_0021: ldarg.0 + IL_0022: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #3 input at line 56@58-3'::builder@ + IL_0027: ldloc.0 + IL_0028: ldloc.1 + IL_0029: newobj instance void class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::.ctor(!0, !1) - IL_002d: tail. - IL_002f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal>,object>(!!0) - IL_0034: ret + IL_002e: tail. + IL_0030: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal>,object>(!!0) + IL_0035: ret } // end of method 'Pipe #3 input at line 56@58-3'::Invoke } // end of class 'Pipe #3 input at line 56@58-3' @@ -2969,7 +2945,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [Utils]Utils/Product p) - .line 66,66 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 67,67 : 9,32 '' @@ -3124,7 +3100,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 149 (0x95) + // Code size 150 (0x96) .maxstack 6 .locals init ([0] class [Utils]Utils/Product V_0, [1] class [Utils]Utils/Product x) @@ -3141,79 +3117,78 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006b + IL_001c: br.s IL_006c .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0068 + IL_001f: br.s IL_0069 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008c + IL_0022: br.s IL_008d .line 100001,100001 : 0,0 '' IL_0024: nop - .line 69,69 : 40,53 '' - IL_0025: ldarg.0 + .line 69,69 : 40,43 '' + IL_0025: nop + .line 69,69 : 40,43 '' IL_0026: ldarg.0 - IL_0027: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/cheapestProducts@69::g - IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' - IL_0036: ldarg.0 - IL_0037: ldc.i4.1 - IL_0038: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc - .line 69,69 : 40,53 '' - IL_003d: ldarg.0 - IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' - IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0048: brfalse.s IL_006b - - IL_004a: ldarg.0 - IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' - IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0055: stloc.0 - .line 69,69 : 40,53 '' - IL_0056: ldloc.0 - IL_0057: stloc.1 + IL_0027: ldarg.0 + IL_0028: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/cheapestProducts@69::g + IL_002d: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0032: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' + IL_0037: ldarg.0 + IL_0038: ldc.i4.1 + IL_0039: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_003e: ldarg.0 + IL_003f: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' + IL_0044: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0049: brfalse.s IL_006c + + IL_004b: ldarg.0 + IL_004c: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' + IL_0051: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0056: stloc.0 + IL_0057: ldloc.0 + IL_0058: stloc.1 .line 69,69 : 54,79 '' - IL_0058: ldarg.0 - IL_0059: ldc.i4.2 - IL_005a: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc - IL_005f: ldarg.0 - IL_0060: ldloc.1 - IL_0061: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::current - IL_0066: ldc.i4.1 - IL_0067: ret - - .line 100001,100001 : 0,0 '' - IL_0068: nop - IL_0069: br.s IL_003d - - IL_006b: ldarg.0 - IL_006c: ldc.i4.3 - IL_006d: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc - .line 69,69 : 40,53 '' - IL_0072: ldarg.0 - IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' - IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007d: nop - IL_007e: ldarg.0 - IL_007f: ldnull - IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' - IL_0085: ldarg.0 - IL_0086: ldc.i4.3 - IL_0087: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc - IL_008c: ldarg.0 - IL_008d: ldnull - IL_008e: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::current - IL_0093: ldc.i4.0 - IL_0094: ret + IL_0059: ldarg.0 + IL_005a: ldc.i4.2 + IL_005b: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_0060: ldarg.0 + IL_0061: ldloc.1 + IL_0062: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::current + IL_0067: ldc.i4.1 + IL_0068: ret + + .line 100001,100001 : 0,0 '' + IL_0069: nop + IL_006a: br.s IL_003e + + IL_006c: ldarg.0 + IL_006d: ldc.i4.3 + IL_006e: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_0073: ldarg.0 + IL_0074: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' + IL_0079: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007e: nop + IL_007f: ldarg.0 + IL_0080: ldnull + IL_0081: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/cheapestProducts@69::'enum' + IL_0086: ldarg.0 + IL_0087: ldc.i4.3 + IL_0088: stfld int32 Linq101Aggregates01/cheapestProducts@69::pc + IL_008d: ldarg.0 + IL_008e: ldnull + IL_008f: stfld class [Utils]Utils/Product Linq101Aggregates01/cheapestProducts@69::current + IL_0094: ldc.i4.0 + IL_0095: ret } // end of method cheapestProducts@69::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -3286,7 +3261,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 69,69 : 40,53 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -3296,20 +3270,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method cheapestProducts@69::Close .method public strict virtual instance bool @@ -3455,7 +3427,7 @@ [1] valuetype [mscorlib]System.Decimal min, [2] class [mscorlib]System.Collections.Generic.IEnumerable`1 cheapestProducts, [3] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_3) - .line 67,67 : 38,39 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 68,68 : 9,58 '' @@ -3467,9 +3439,10 @@ IL_000f: call valuetype [mscorlib]System.Decimal [System.Core]System.Linq.Enumerable::Min(class [mscorlib]System.Collections.Generic.IEnumerable`1, class [mscorlib]System.Func`2) IL_0014: stloc.1 - .line 70,70 : 9,41 '' + .line 69,69 : 32,37 '' IL_0015: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_001a: stloc.3 + .line 69,69 : 32,37 '' IL_001b: ldloc.3 IL_001c: ldloc.0 IL_001d: ldnull @@ -3597,7 +3570,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] int32 V_0, [1] int32 n) @@ -3614,78 +3587,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 74,74 : 22,41 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Aggregates01/maxNum@74::pc - .line 74,74 : 22,41 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 74,74 : 22,41 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 74,74 : 22,25 '' + IL_0025: nop + .line 74,74 : 22,25 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Aggregates01/maxNum@74::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 74,74 : 42,49 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Aggregates01/maxNum@74::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld int32 Linq101Aggregates01/maxNum@74::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Aggregates01/maxNum@74::pc - .line 74,74 : 22,41 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Aggregates01/maxNum@74::pc - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Aggregates01/maxNum@74::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Aggregates01/maxNum@74::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld int32 Linq101Aggregates01/maxNum@74::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Aggregates01/maxNum@74::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxNum@74::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Aggregates01/maxNum@74::pc + IL_008c: ldarg.0 + IL_008d: ldc.i4.0 + IL_008e: stfld int32 Linq101Aggregates01/maxNum@74::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method maxNum@74::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -3758,7 +3730,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 74,74 : 22,41 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -3768,20 +3739,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method maxNum@74::Close .method public strict virtual instance bool @@ -3935,7 +3904,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] string V_0, [1] string w) @@ -3952,78 +3921,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 77,77 : 29,46 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Aggregates01/longestLength@77::pc - .line 77,77 : 29,46 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 77,77 : 29,46 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 77,77 : 29,32 '' + IL_0025: nop + .line 77,77 : 29,32 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Aggregates01/longestLength@77::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 77,77 : 47,61 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Aggregates01/longestLength@77::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld string Linq101Aggregates01/longestLength@77::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Aggregates01/longestLength@77::pc - .line 77,77 : 29,46 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Aggregates01/longestLength@77::pc - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld string Linq101Aggregates01/longestLength@77::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Aggregates01/longestLength@77::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld string Linq101Aggregates01/longestLength@77::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Aggregates01/longestLength@77::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/longestLength@77::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Aggregates01/longestLength@77::pc + IL_008c: ldarg.0 + IL_008d: ldnull + IL_008e: stfld string Linq101Aggregates01/longestLength@77::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method longestLength@77::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -4096,7 +4064,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 77,77 : 29,46 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -4106,20 +4073,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method longestLength@77::Close .method public strict virtual instance bool @@ -4262,7 +4227,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [Utils]Utils/Product p) - .line 82,82 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 83,83 : 9,32 '' @@ -4399,7 +4364,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 149 (0x95) + // Code size 150 (0x96) .maxstack 6 .locals init ([0] class [Utils]Utils/Product V_0, [1] class [Utils]Utils/Product x) @@ -4416,79 +4381,78 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006b + IL_001c: br.s IL_006c .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0068 + IL_001f: br.s IL_0069 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008c + IL_0022: br.s IL_008d .line 100001,100001 : 0,0 '' IL_0024: nop - .line 84,84 : 42,55 '' - IL_0025: ldarg.0 + .line 84,84 : 42,45 '' + IL_0025: nop + .line 84,84 : 42,45 '' IL_0026: ldarg.0 - IL_0027: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/mostExpensivePrice@84::g - IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' - IL_0036: ldarg.0 - IL_0037: ldc.i4.1 - IL_0038: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc - .line 84,84 : 42,55 '' - IL_003d: ldarg.0 - IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' - IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0048: brfalse.s IL_006b - - IL_004a: ldarg.0 - IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' - IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0055: stloc.0 - .line 84,84 : 42,55 '' - IL_0056: ldloc.0 - IL_0057: stloc.1 + IL_0027: ldarg.0 + IL_0028: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/mostExpensivePrice@84::g + IL_002d: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0032: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' + IL_0037: ldarg.0 + IL_0038: ldc.i4.1 + IL_0039: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_003e: ldarg.0 + IL_003f: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' + IL_0044: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0049: brfalse.s IL_006c + + IL_004b: ldarg.0 + IL_004c: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' + IL_0051: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0056: stloc.0 + IL_0057: ldloc.0 + IL_0058: stloc.1 .line 84,84 : 56,73 '' - IL_0058: ldarg.0 - IL_0059: ldc.i4.2 - IL_005a: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc - IL_005f: ldarg.0 - IL_0060: ldloc.1 - IL_0061: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::current - IL_0066: ldc.i4.1 - IL_0067: ret - - .line 100001,100001 : 0,0 '' - IL_0068: nop - IL_0069: br.s IL_003d - - IL_006b: ldarg.0 - IL_006c: ldc.i4.3 - IL_006d: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc - .line 84,84 : 42,55 '' - IL_0072: ldarg.0 - IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' - IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007d: nop - IL_007e: ldarg.0 - IL_007f: ldnull - IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' - IL_0085: ldarg.0 - IL_0086: ldc.i4.3 - IL_0087: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc - IL_008c: ldarg.0 - IL_008d: ldnull - IL_008e: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::current - IL_0093: ldc.i4.0 - IL_0094: ret + IL_0059: ldarg.0 + IL_005a: ldc.i4.2 + IL_005b: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_0060: ldarg.0 + IL_0061: ldloc.1 + IL_0062: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::current + IL_0067: ldc.i4.1 + IL_0068: ret + + .line 100001,100001 : 0,0 '' + IL_0069: nop + IL_006a: br.s IL_003e + + IL_006c: ldarg.0 + IL_006d: ldc.i4.3 + IL_006e: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_0073: ldarg.0 + IL_0074: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' + IL_0079: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007e: nop + IL_007f: ldarg.0 + IL_0080: ldnull + IL_0081: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensivePrice@84::'enum' + IL_0086: ldarg.0 + IL_0087: ldc.i4.3 + IL_0088: stfld int32 Linq101Aggregates01/mostExpensivePrice@84::pc + IL_008d: ldarg.0 + IL_008e: ldnull + IL_008f: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensivePrice@84::current + IL_0094: ldc.i4.0 + IL_0095: ret } // end of method mostExpensivePrice@84::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -4561,7 +4525,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 84,84 : 42,55 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -4571,20 +4534,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method mostExpensivePrice@84::Close .method public strict virtual instance bool @@ -4728,37 +4689,40 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal>,object> Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed { - // Code size 53 (0x35) + // Code size 54 (0x36) .maxstack 9 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, [1] valuetype [mscorlib]System.Decimal mostExpensivePrice) - .line 83,83 : 38,39 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 - IL_0002: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0007: ldloc.0 - IL_0008: ldnull - IL_0009: ldc.i4.0 - IL_000a: ldnull - IL_000b: newobj instance void Linq101Aggregates01/mostExpensivePrice@84::.ctor(class [System.Core]System.Linq.IGrouping`2, + .line 84,84 : 34,39 '' + IL_0002: nop + .line 84,84 : 34,39 '' + IL_0003: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0008: ldloc.0 + IL_0009: ldnull + IL_000a: ldc.i4.0 + IL_000b: ldnull + IL_000c: newobj instance void Linq101Aggregates01/mostExpensivePrice@84::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0010: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0015: ldsfld class Linq101Aggregates01/'mostExpensivePrice@84-1' Linq101Aggregates01/'mostExpensivePrice@84-1'::@_instance - IL_001a: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0011: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0016: ldsfld class Linq101Aggregates01/'mostExpensivePrice@84-1' Linq101Aggregates01/'mostExpensivePrice@84-1'::@_instance + IL_001b: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_001f: stloc.1 + IL_0020: stloc.1 .line 85,85 : 9,43 '' - IL_0020: ldarg.0 - IL_0021: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #5 input at line 81@83-3'::builder@ - IL_0026: ldloc.0 - IL_0027: ldloc.1 - IL_0028: newobj instance void class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::.ctor(!0, + IL_0021: ldarg.0 + IL_0022: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #5 input at line 81@83-3'::builder@ + IL_0027: ldloc.0 + IL_0028: ldloc.1 + IL_0029: newobj instance void class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::.ctor(!0, !1) - IL_002d: tail. - IL_002f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal>,object>(!!0) - IL_0034: ret + IL_002e: tail. + IL_0030: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal>,object>(!!0) + IL_0035: ret } // end of method 'Pipe #5 input at line 81@83-3'::Invoke } // end of class 'Pipe #5 input at line 81@83-3' @@ -4842,7 +4806,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [Utils]Utils/Product p) - .line 91,91 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 92,92 : 9,32 '' @@ -4979,7 +4943,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 149 (0x95) + // Code size 150 (0x96) .maxstack 6 .locals init ([0] class [Utils]Utils/Product V_0, [1] class [Utils]Utils/Product x) @@ -4996,79 +4960,78 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006b + IL_001c: br.s IL_006c .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0068 + IL_001f: br.s IL_0069 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008c + IL_0022: br.s IL_008d .line 100001,100001 : 0,0 '' IL_0024: nop - .line 93,93 : 32,45 '' - IL_0025: ldarg.0 + .line 93,93 : 32,35 '' + IL_0025: nop + .line 93,93 : 32,35 '' IL_0026: ldarg.0 - IL_0027: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/maxPrice@93::g - IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' - IL_0036: ldarg.0 - IL_0037: ldc.i4.1 - IL_0038: stfld int32 Linq101Aggregates01/maxPrice@93::pc - .line 93,93 : 32,45 '' - IL_003d: ldarg.0 - IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' - IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0048: brfalse.s IL_006b - - IL_004a: ldarg.0 - IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' - IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0055: stloc.0 - .line 93,93 : 32,45 '' - IL_0056: ldloc.0 - IL_0057: stloc.1 + IL_0027: ldarg.0 + IL_0028: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/maxPrice@93::g + IL_002d: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0032: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' + IL_0037: ldarg.0 + IL_0038: ldc.i4.1 + IL_0039: stfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_003e: ldarg.0 + IL_003f: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' + IL_0044: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0049: brfalse.s IL_006c + + IL_004b: ldarg.0 + IL_004c: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' + IL_0051: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0056: stloc.0 + IL_0057: ldloc.0 + IL_0058: stloc.1 .line 93,93 : 46,63 '' - IL_0058: ldarg.0 - IL_0059: ldc.i4.2 - IL_005a: stfld int32 Linq101Aggregates01/maxPrice@93::pc - IL_005f: ldarg.0 - IL_0060: ldloc.1 - IL_0061: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::current - IL_0066: ldc.i4.1 - IL_0067: ret - - .line 100001,100001 : 0,0 '' - IL_0068: nop - IL_0069: br.s IL_003d - - IL_006b: ldarg.0 - IL_006c: ldc.i4.3 - IL_006d: stfld int32 Linq101Aggregates01/maxPrice@93::pc - .line 93,93 : 32,45 '' - IL_0072: ldarg.0 - IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' - IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007d: nop - IL_007e: ldarg.0 - IL_007f: ldnull - IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' - IL_0085: ldarg.0 - IL_0086: ldc.i4.3 - IL_0087: stfld int32 Linq101Aggregates01/maxPrice@93::pc - IL_008c: ldarg.0 - IL_008d: ldnull - IL_008e: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::current - IL_0093: ldc.i4.0 - IL_0094: ret + IL_0059: ldarg.0 + IL_005a: ldc.i4.2 + IL_005b: stfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_0060: ldarg.0 + IL_0061: ldloc.1 + IL_0062: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::current + IL_0067: ldc.i4.1 + IL_0068: ret + + .line 100001,100001 : 0,0 '' + IL_0069: nop + IL_006a: br.s IL_003e + + IL_006c: ldarg.0 + IL_006d: ldc.i4.3 + IL_006e: stfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_0073: ldarg.0 + IL_0074: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' + IL_0079: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007e: nop + IL_007f: ldarg.0 + IL_0080: ldnull + IL_0081: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/maxPrice@93::'enum' + IL_0086: ldarg.0 + IL_0087: ldc.i4.3 + IL_0088: stfld int32 Linq101Aggregates01/maxPrice@93::pc + IL_008d: ldarg.0 + IL_008e: ldnull + IL_008f: stfld class [Utils]Utils/Product Linq101Aggregates01/maxPrice@93::current + IL_0094: ldc.i4.0 + IL_0095: ret } // end of method maxPrice@93::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -5141,7 +5104,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 93,93 : 32,45 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -5151,20 +5113,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method maxPrice@93::Close .method public strict virtual instance bool @@ -5328,7 +5288,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 149 (0x95) + // Code size 150 (0x96) .maxstack 6 .locals init ([0] class [Utils]Utils/Product V_0, [1] class [Utils]Utils/Product x) @@ -5345,79 +5305,78 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006b + IL_001c: br.s IL_006c .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0068 + IL_001f: br.s IL_0069 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008c + IL_0022: br.s IL_008d .line 100001,100001 : 0,0 '' IL_0024: nop - .line 94,94 : 45,58 '' - IL_0025: ldarg.0 + .line 94,94 : 45,48 '' + IL_0025: nop + .line 94,94 : 45,48 '' IL_0026: ldarg.0 - IL_0027: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/mostExpensiveProducts@94::g - IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' - IL_0036: ldarg.0 - IL_0037: ldc.i4.1 - IL_0038: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc - .line 94,94 : 45,58 '' - IL_003d: ldarg.0 - IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' - IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0048: brfalse.s IL_006b - - IL_004a: ldarg.0 - IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' - IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0055: stloc.0 - .line 94,94 : 45,58 '' - IL_0056: ldloc.0 - IL_0057: stloc.1 + IL_0027: ldarg.0 + IL_0028: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/mostExpensiveProducts@94::g + IL_002d: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0032: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' + IL_0037: ldarg.0 + IL_0038: ldc.i4.1 + IL_0039: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_003e: ldarg.0 + IL_003f: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' + IL_0044: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0049: brfalse.s IL_006c + + IL_004b: ldarg.0 + IL_004c: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' + IL_0051: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0056: stloc.0 + IL_0057: ldloc.0 + IL_0058: stloc.1 .line 94,94 : 59,89 '' - IL_0058: ldarg.0 - IL_0059: ldc.i4.2 - IL_005a: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc - IL_005f: ldarg.0 - IL_0060: ldloc.1 - IL_0061: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::current - IL_0066: ldc.i4.1 - IL_0067: ret - - .line 100001,100001 : 0,0 '' - IL_0068: nop - IL_0069: br.s IL_003d - - IL_006b: ldarg.0 - IL_006c: ldc.i4.3 - IL_006d: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc - .line 94,94 : 45,58 '' - IL_0072: ldarg.0 - IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' - IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007d: nop - IL_007e: ldarg.0 - IL_007f: ldnull - IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' - IL_0085: ldarg.0 - IL_0086: ldc.i4.3 - IL_0087: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc - IL_008c: ldarg.0 - IL_008d: ldnull - IL_008e: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::current - IL_0093: ldc.i4.0 - IL_0094: ret + IL_0059: ldarg.0 + IL_005a: ldc.i4.2 + IL_005b: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_0060: ldarg.0 + IL_0061: ldloc.1 + IL_0062: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::current + IL_0067: ldc.i4.1 + IL_0068: ret + + .line 100001,100001 : 0,0 '' + IL_0069: nop + IL_006a: br.s IL_003e + + IL_006c: ldarg.0 + IL_006d: ldc.i4.3 + IL_006e: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_0073: ldarg.0 + IL_0074: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' + IL_0079: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007e: nop + IL_007f: ldarg.0 + IL_0080: ldnull + IL_0081: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/mostExpensiveProducts@94::'enum' + IL_0086: ldarg.0 + IL_0087: ldc.i4.3 + IL_0088: stfld int32 Linq101Aggregates01/mostExpensiveProducts@94::pc + IL_008d: ldarg.0 + IL_008e: ldnull + IL_008f: stfld class [Utils]Utils/Product Linq101Aggregates01/mostExpensiveProducts@94::current + IL_0094: ldc.i4.0 + IL_0095: ret } // end of method mostExpensiveProducts@94::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -5490,7 +5449,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 94,94 : 45,58 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -5500,20 +5458,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method mostExpensiveProducts@94::Close .method public strict virtual instance bool @@ -5653,60 +5609,64 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object> Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed { - // Code size 92 (0x5c) + // Code size 93 (0x5d) .maxstack 9 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, [1] valuetype [mscorlib]System.Decimal maxPrice, [2] class [mscorlib]System.Collections.Generic.IEnumerable`1 mostExpensiveProducts, [3] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_3) - .line 92,92 : 38,39 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 - IL_0002: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0007: ldloc.0 - IL_0008: ldnull - IL_0009: ldc.i4.0 - IL_000a: ldnull - IL_000b: newobj instance void Linq101Aggregates01/maxPrice@93::.ctor(class [System.Core]System.Linq.IGrouping`2, + .line 93,93 : 24,29 '' + IL_0002: nop + .line 93,93 : 24,29 '' + IL_0003: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0008: ldloc.0 + IL_0009: ldnull + IL_000a: ldc.i4.0 + IL_000b: ldnull + IL_000c: newobj instance void Linq101Aggregates01/maxPrice@93::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0010: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0015: ldsfld class Linq101Aggregates01/'maxPrice@93-1' Linq101Aggregates01/'maxPrice@93-1'::@_instance - IL_001a: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0011: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0016: ldsfld class Linq101Aggregates01/'maxPrice@93-1' Linq101Aggregates01/'maxPrice@93-1'::@_instance + IL_001b: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_001f: stloc.1 - .line 95,95 : 9,46 '' - IL_0020: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0025: stloc.3 - IL_0026: ldloc.3 - IL_0027: ldloc.0 - IL_0028: ldnull - IL_0029: ldc.i4.0 - IL_002a: ldnull - IL_002b: newobj instance void Linq101Aggregates01/mostExpensiveProducts@94::.ctor(class [System.Core]System.Linq.IGrouping`2, + IL_0020: stloc.1 + .line 94,94 : 37,42 '' + IL_0021: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0026: stloc.3 + .line 94,94 : 37,42 '' + IL_0027: ldloc.3 + IL_0028: ldloc.0 + IL_0029: ldnull + IL_002a: ldc.i4.0 + IL_002b: ldnull + IL_002c: newobj instance void Linq101Aggregates01/mostExpensiveProducts@94::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0030: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0035: ldloc.1 - IL_0036: newobj instance void Linq101Aggregates01/'mostExpensiveProducts@94-1'::.ctor(valuetype [mscorlib]System.Decimal) - IL_003b: 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_0031: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0036: ldloc.1 + IL_0037: newobj instance void Linq101Aggregates01/'mostExpensiveProducts@94-1'::.ctor(valuetype [mscorlib]System.Decimal) + IL_003c: 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_0040: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0045: stloc.2 + IL_0041: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0046: stloc.2 .line 95,95 : 9,46 '' - IL_0046: ldarg.0 - IL_0047: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #6 input at line 90@92-3'::builder@ - IL_004c: ldloc.0 - IL_004d: ldloc.1 - IL_004e: ldloc.2 - IL_004f: newobj instance void class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>::.ctor(!0, + IL_0047: ldarg.0 + IL_0048: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #6 input at line 90@92-3'::builder@ + IL_004d: ldloc.0 + IL_004e: ldloc.1 + IL_004f: ldloc.2 + IL_0050: newobj instance void class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>::.ctor(!0, !1, !2) - IL_0054: tail. - IL_0056: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(!!0) - IL_005b: ret + IL_0055: tail. + IL_0057: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(!!0) + IL_005c: ret } // end of method 'Pipe #6 input at line 90@92-3'::Invoke } // end of class 'Pipe #6 input at line 90@92-3' @@ -5806,7 +5766,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 156 (0x9c) + // Code size 157 (0x9d) .maxstack 6 .locals init ([0] float64 V_0, [1] float64 n) @@ -5823,78 +5783,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 100,100 : 26,46 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers2() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Aggregates01/averageNum@100::pc - .line 100,100 : 26,46 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 100,100 : 26,46 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 100,100 : 26,29 '' + IL_0025: nop + .line 100,100 : 26,29 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_numbers2() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Aggregates01/averageNum@100::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 100,100 : 47,58 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Aggregates01/averageNum@100::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld float64 Linq101Aggregates01/averageNum@100::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Aggregates01/averageNum@100::pc - .line 100,100 : 26,46 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Aggregates01/averageNum@100::pc - IL_008b: ldarg.0 - IL_008c: ldc.r8 0.0 - IL_0095: stfld float64 Linq101Aggregates01/averageNum@100::current - IL_009a: ldc.i4.0 - IL_009b: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Aggregates01/averageNum@100::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld float64 Linq101Aggregates01/averageNum@100::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Aggregates01/averageNum@100::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averageNum@100::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Aggregates01/averageNum@100::pc + IL_008c: ldarg.0 + IL_008d: ldc.r8 0.0 + IL_0096: stfld float64 Linq101Aggregates01/averageNum@100::current + IL_009b: ldc.i4.0 + IL_009c: ret } // end of method averageNum@100::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 136 (0x88) + // Code size 135 (0x87) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -5967,7 +5926,6 @@ { IL_006e: castclass [mscorlib]System.Exception IL_0073: stloc.1 - .line 100,100 : 26,46 '' IL_0074: ldloc.1 IL_0075: stloc.0 IL_0076: leave.s IL_0078 @@ -5977,20 +5935,18 @@ IL_0078: nop IL_0079: br IL_0000 - .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 + IL_007e: ldloc.0 + IL_007f: ldnull + IL_0080: cgt.un + IL_0082: brfalse.s IL_0086 .line 100001,100001 : 0,0 '' - IL_0085: ldloc.0 - IL_0086: throw + IL_0084: ldloc.0 + IL_0085: throw .line 100001,100001 : 0,0 '' - IL_0087: ret + IL_0086: ret } // end of method averageNum@100::Close .method public strict virtual instance bool @@ -6134,7 +6090,7 @@ .locals init ([0] string w, [1] float64 wl, [2] int32 'Pipe #1 input at line 106') - .line 105,105 : 9,26 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 106,106 : 9,35 '' @@ -6236,7 +6192,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [Utils]Utils/Product p) - .line 113,113 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 114,114 : 9,32 '' @@ -6373,7 +6329,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 149 (0x95) + // Code size 150 (0x96) .maxstack 6 .locals init ([0] class [Utils]Utils/Product V_0, [1] class [Utils]Utils/Product x) @@ -6390,79 +6346,78 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006b + IL_001c: br.s IL_006c .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0068 + IL_001f: br.s IL_0069 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008c + IL_0022: br.s IL_008d .line 100001,100001 : 0,0 '' IL_0024: nop - .line 115,115 : 36,49 '' - IL_0025: ldarg.0 + .line 115,115 : 36,39 '' + IL_0025: nop + .line 115,115 : 36,39 '' IL_0026: ldarg.0 - IL_0027: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/averagePrice@115::g - IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' - IL_0036: ldarg.0 - IL_0037: ldc.i4.1 - IL_0038: stfld int32 Linq101Aggregates01/averagePrice@115::pc - .line 115,115 : 36,49 '' - IL_003d: ldarg.0 - IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' - IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0048: brfalse.s IL_006b - - IL_004a: ldarg.0 - IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' - IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0055: stloc.0 - .line 115,115 : 36,49 '' - IL_0056: ldloc.0 - IL_0057: stloc.1 + IL_0027: ldarg.0 + IL_0028: ldfld class [System.Core]System.Linq.IGrouping`2 Linq101Aggregates01/averagePrice@115::g + IL_002d: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0032: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' + IL_0037: ldarg.0 + IL_0038: ldc.i4.1 + IL_0039: stfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_003e: ldarg.0 + IL_003f: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' + IL_0044: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0049: brfalse.s IL_006c + + IL_004b: ldarg.0 + IL_004c: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' + IL_0051: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0056: stloc.0 + IL_0057: ldloc.0 + IL_0058: stloc.1 .line 115,115 : 50,71 '' - IL_0058: ldarg.0 - IL_0059: ldc.i4.2 - IL_005a: stfld int32 Linq101Aggregates01/averagePrice@115::pc - IL_005f: ldarg.0 - IL_0060: ldloc.1 - IL_0061: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::current - IL_0066: ldc.i4.1 - IL_0067: ret - - .line 100001,100001 : 0,0 '' - IL_0068: nop - IL_0069: br.s IL_003d - - IL_006b: ldarg.0 - IL_006c: ldc.i4.3 - IL_006d: stfld int32 Linq101Aggregates01/averagePrice@115::pc - .line 115,115 : 36,49 '' - IL_0072: ldarg.0 - IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' - IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007d: nop - IL_007e: ldarg.0 - IL_007f: ldnull - IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' - IL_0085: ldarg.0 - IL_0086: ldc.i4.3 - IL_0087: stfld int32 Linq101Aggregates01/averagePrice@115::pc - IL_008c: ldarg.0 - IL_008d: ldnull - IL_008e: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::current - IL_0093: ldc.i4.0 - IL_0094: ret + IL_0059: ldarg.0 + IL_005a: ldc.i4.2 + IL_005b: stfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_0060: ldarg.0 + IL_0061: ldloc.1 + IL_0062: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::current + IL_0067: ldc.i4.1 + IL_0068: ret + + .line 100001,100001 : 0,0 '' + IL_0069: nop + IL_006a: br.s IL_003e + + IL_006c: ldarg.0 + IL_006d: ldc.i4.3 + IL_006e: stfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_0073: ldarg.0 + IL_0074: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' + IL_0079: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007e: nop + IL_007f: ldarg.0 + IL_0080: ldnull + IL_0081: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Aggregates01/averagePrice@115::'enum' + IL_0086: ldarg.0 + IL_0087: ldc.i4.3 + IL_0088: stfld int32 Linq101Aggregates01/averagePrice@115::pc + IL_008d: ldarg.0 + IL_008e: ldnull + IL_008f: stfld class [Utils]Utils/Product Linq101Aggregates01/averagePrice@115::current + IL_0094: ldc.i4.0 + IL_0095: ret } // end of method averagePrice@115::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -6535,7 +6490,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 115,115 : 36,49 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -6545,20 +6499,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method averagePrice@115::Close .method public strict virtual instance bool @@ -6718,11 +6670,13 @@ [11] valuetype [mscorlib]System.Decimal V_11, [12] int32 V_12, [13] class [mscorlib]System.IDisposable V_13) - .line 114,114 : 38,39 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 + .line 115,115 : 28,33 '' IL_0002: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0007: stloc.2 + .line 115,115 : 28,33 '' IL_0008: ldloc.2 IL_0009: stloc.3 IL_000a: ldloc.0 @@ -6782,7 +6736,6 @@ IL_0070: call valuetype [netstandard]System.Decimal [netstandard]System.Decimal::op_Addition(valuetype [netstandard]System.Decimal, valuetype [netstandard]System.Decimal) IL_0075: stloc.s V_9 - .line 115,115 : 50,71 '' IL_0077: ldloc.s V_10 IL_0079: ldc.i4.1 IL_007a: add @@ -7242,7 +7195,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 1756 (0x6dc) + // Code size 1760 (0x6e0) .maxstack 13 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 factorsOf300, [1] int32 uniqueFactors, @@ -7345,6 +7298,7 @@ .line 11,11 : 5,10 '' IL_002b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0030: stloc.s V_21 + .line 11,11 : 5,10 '' IL_0032: ldloc.s V_21 IL_0034: ldnull IL_0035: ldc.i4.0 @@ -7397,8 +7351,10 @@ IL_009d: dup IL_009e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::numbers@17 IL_00a3: stloc.2 + .line 20,20 : 5,10 '' IL_00a4: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00a9: stloc.s V_22 + .line 20,20 : 5,10 '' IL_00ab: ldloc.s V_22 IL_00ad: stloc.s V_23 IL_00af: ldnull @@ -7425,7 +7381,6 @@ IL_00dc: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() IL_00e1: brfalse.s IL_00f9 - .line 22,22 : 9,16 '' IL_00e3: ldloc.s V_29 IL_00e5: ldloc.s V_25 IL_00e7: ldloc.s V_27 @@ -7477,8 +7432,10 @@ IL_0141: dup IL_0142: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::words@26 IL_0147: stloc.s words + .line 29,29 : 5,10 '' IL_0149: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_014e: stloc.s V_31 + .line 29,29 : 5,10 '' IL_0150: ldloc.s V_31 IL_0152: stloc.s V_32 IL_0154: ldnull @@ -7505,7 +7462,6 @@ IL_0181: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() IL_0186: brfalse.s IL_019e - .line 31,31 : 9,25 '' IL_0188: ldloc.s V_38 IL_018a: ldloc.s V_34 IL_018c: ldloc.s V_36 @@ -7553,9 +7509,11 @@ .line 38,38 : 5,10 '' IL_01d2: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_01d7: stloc.s V_41 + .line 38,38 : 5,10 '' IL_01d9: ldloc.s V_41 IL_01db: ldloc.s V_41 IL_01dd: ldloc.s V_41 + .line 39,39 : 9,12 '' IL_01df: ldloc.s V_41 IL_01e1: ldloc.s V_41 IL_01e3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() @@ -7584,483 +7542,508 @@ IL_022c: dup IL_022d: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories@37 IL_0232: stloc.s categories - IL_0234: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0239: ldnull - IL_023a: ldc.i4.0 + .line 49,49 : 14,19 '' + IL_0234: nop + .line 49,49 : 14,19 '' + IL_0235: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_023a: ldnull IL_023b: ldc.i4.0 - IL_023c: newobj instance void Linq101Aggregates01/minNum@49::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_023c: ldc.i4.0 + IL_023d: newobj instance void Linq101Aggregates01/minNum@49::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0241: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0246: ldsfld class Linq101Aggregates01/'minNum@49-1' Linq101Aggregates01/'minNum@49-1'::@_instance - IL_024b: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0242: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0247: ldsfld class Linq101Aggregates01/'minNum@49-1' Linq101Aggregates01/'minNum@49-1'::@_instance + IL_024c: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0250: dup - IL_0251: stsfld int32 ''.$Linq101Aggregates01::minNum@49 - IL_0256: stloc.s minNum - IL_0258: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_025d: ldnull - IL_025e: ldc.i4.0 + IL_0251: dup + IL_0252: stsfld int32 ''.$Linq101Aggregates01::minNum@49 + IL_0257: stloc.s minNum + .line 52,52 : 20,25 '' + IL_0259: nop + .line 52,52 : 20,25 '' + IL_025a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_025f: ldnull - IL_0260: newobj instance void Linq101Aggregates01/shortestWord@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0260: ldc.i4.0 + IL_0261: ldnull + IL_0262: newobj instance void Linq101Aggregates01/shortestWord@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0265: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_026a: ldsfld class Linq101Aggregates01/'shortestWord@52-1' Linq101Aggregates01/'shortestWord@52-1'::@_instance - IL_026f: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0267: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_026c: ldsfld class Linq101Aggregates01/'shortestWord@52-1' Linq101Aggregates01/'shortestWord@52-1'::@_instance + IL_0271: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0274: dup - IL_0275: stsfld int32 ''.$Linq101Aggregates01::shortestWord@52 - IL_027a: stloc.s shortestWord + IL_0276: dup + IL_0277: stsfld int32 ''.$Linq101Aggregates01::shortestWord@52 + IL_027c: stloc.s shortestWord .line 55,61 : 1,21 '' - IL_027c: nop + IL_027e: nop + .line 56,56 : 5,10 '' + IL_027f: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0284: stloc.s V_43 .line 56,56 : 5,10 '' - IL_027d: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0282: stloc.s V_43 - IL_0284: ldloc.s V_43 IL_0286: ldloc.s V_43 IL_0288: ldloc.s V_43 IL_028a: ldloc.s V_43 + .line 57,57 : 9,12 '' IL_028c: ldloc.s V_43 - IL_028e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_0293: 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_0298: ldloc.s V_43 - IL_029a: newobj instance void Linq101Aggregates01/'Pipe #3 input at line 56@57'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_029f: 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_028e: ldloc.s V_43 + IL_0290: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_0295: 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_029a: ldloc.s V_43 + IL_029c: newobj instance void Linq101Aggregates01/'Pipe #3 input at line 56@57'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_02a1: 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_02a4: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@58-1' Linq101Aggregates01/'Pipe #3 input at line 56@58-1'::@_instance - IL_02a9: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@58-2' Linq101Aggregates01/'Pipe #3 input at line 56@58-2'::@_instance - IL_02ae: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_02a6: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@58-1' Linq101Aggregates01/'Pipe #3 input at line 56@58-1'::@_instance + IL_02ab: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@58-2' Linq101Aggregates01/'Pipe #3 input at line 56@58-2'::@_instance + IL_02b0: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_02b3: ldloc.s V_43 - IL_02b5: newobj instance void Linq101Aggregates01/'Pipe #3 input at line 56@58-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_02ba: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_02b5: ldloc.s V_43 + IL_02b7: newobj instance void Linq101Aggregates01/'Pipe #3 input at line 56@58-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_02bc: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_02bf: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@60-4' Linq101Aggregates01/'Pipe #3 input at line 56@60-4'::@_instance - IL_02c4: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_02c1: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@60-4' Linq101Aggregates01/'Pipe #3 input at line 56@60-4'::@_instance + IL_02c6: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,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_02c9: 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_02ce: stloc.s 'Pipe #3 input at line 56' + IL_02cb: 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_02d0: stloc.s 'Pipe #3 input at line 56' .line 61,61 : 10,21 '' - IL_02d0: ldloc.s 'Pipe #3 input at line 56' - IL_02d2: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_02d7: dup - IL_02d8: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories2@55 - IL_02dd: stloc.s categories2 + IL_02d2: ldloc.s 'Pipe #3 input at line 56' + IL_02d4: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_02d9: dup + IL_02da: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories2@55 + IL_02df: stloc.s categories2 .line 64,71 : 1,21 '' - IL_02df: nop + IL_02e1: nop + .line 65,65 : 5,10 '' + IL_02e2: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_02e7: stloc.s V_45 .line 65,65 : 5,10 '' - IL_02e0: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_02e5: stloc.s V_45 - IL_02e7: ldloc.s V_45 IL_02e9: ldloc.s V_45 IL_02eb: ldloc.s V_45 IL_02ed: ldloc.s V_45 + .line 66,66 : 9,12 '' IL_02ef: ldloc.s V_45 - IL_02f1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_02f6: 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_02fb: ldloc.s V_45 - IL_02fd: newobj instance void Linq101Aggregates01/'Pipe #4 input at line 65@66'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0302: 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_02f1: ldloc.s V_45 + IL_02f3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_02f8: 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_02fd: ldloc.s V_45 + IL_02ff: newobj instance void Linq101Aggregates01/'Pipe #4 input at line 65@66'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0304: 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_0307: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@67-1' Linq101Aggregates01/'Pipe #4 input at line 65@67-1'::@_instance - IL_030c: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@67-2' Linq101Aggregates01/'Pipe #4 input at line 65@67-2'::@_instance - IL_0311: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0309: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@67-1' Linq101Aggregates01/'Pipe #4 input at line 65@67-1'::@_instance + IL_030e: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@67-2' Linq101Aggregates01/'Pipe #4 input at line 65@67-2'::@_instance + IL_0313: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0316: ldloc.s V_45 - IL_0318: newobj instance void Linq101Aggregates01/'Pipe #4 input at line 65@67-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_031d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0318: ldloc.s V_45 + IL_031a: newobj instance void Linq101Aggregates01/'Pipe #4 input at line 65@67-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_031f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0322: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@70-4' Linq101Aggregates01/'Pipe #4 input at line 65@70-4'::@_instance - IL_0327: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0324: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@70-4' Linq101Aggregates01/'Pipe #4 input at line 65@70-4'::@_instance + IL_0329: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,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_032c: 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_0331: stloc.s 'Pipe #4 input at line 65' + IL_032e: 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_0333: stloc.s 'Pipe #4 input at line 65' .line 71,71 : 10,21 '' - IL_0333: ldloc.s 'Pipe #4 input at line 65' - IL_0335: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_033a: dup - IL_033b: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories3@64 - IL_0340: stloc.s categories3 - IL_0342: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0347: ldnull - IL_0348: ldc.i4.0 - IL_0349: ldc.i4.0 - IL_034a: newobj instance void Linq101Aggregates01/maxNum@74::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0335: ldloc.s 'Pipe #4 input at line 65' + IL_0337: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_033c: dup + IL_033d: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories3@64 + IL_0342: stloc.s categories3 + .line 74,74 : 14,19 '' + IL_0344: nop + .line 74,74 : 14,19 '' + IL_0345: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_034a: ldnull + IL_034b: ldc.i4.0 + IL_034c: ldc.i4.0 + IL_034d: newobj instance void Linq101Aggregates01/maxNum@74::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_034f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0354: ldsfld class Linq101Aggregates01/'maxNum@74-1' Linq101Aggregates01/'maxNum@74-1'::@_instance - IL_0359: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0352: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0357: ldsfld class Linq101Aggregates01/'maxNum@74-1' Linq101Aggregates01/'maxNum@74-1'::@_instance + IL_035c: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_035e: dup - IL_035f: stsfld int32 ''.$Linq101Aggregates01::maxNum@74 - IL_0364: stloc.s maxNum - IL_0366: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_036b: ldnull - IL_036c: ldc.i4.0 - IL_036d: ldnull - IL_036e: newobj instance void Linq101Aggregates01/longestLength@77::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0361: dup + IL_0362: stsfld int32 ''.$Linq101Aggregates01::maxNum@74 + IL_0367: stloc.s maxNum + .line 77,77 : 21,26 '' + IL_0369: nop + .line 77,77 : 21,26 '' + IL_036a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_036f: ldnull + IL_0370: ldc.i4.0 + IL_0371: ldnull + IL_0372: newobj instance void Linq101Aggregates01/longestLength@77::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0373: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0378: ldsfld class Linq101Aggregates01/'longestLength@77-1' Linq101Aggregates01/'longestLength@77-1'::@_instance - IL_037d: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0377: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_037c: ldsfld class Linq101Aggregates01/'longestLength@77-1' Linq101Aggregates01/'longestLength@77-1'::@_instance + IL_0381: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0382: dup - IL_0383: stsfld int32 ''.$Linq101Aggregates01::longestLength@77 - IL_0388: stloc.s longestLength + IL_0386: dup + IL_0387: stsfld int32 ''.$Linq101Aggregates01::longestLength@77 + IL_038c: stloc.s longestLength .line 80,86 : 1,21 '' - IL_038a: nop + IL_038e: nop + .line 81,81 : 5,10 '' + IL_038f: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0394: stloc.s V_47 .line 81,81 : 5,10 '' - IL_038b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0390: stloc.s V_47 - IL_0392: ldloc.s V_47 - IL_0394: ldloc.s V_47 IL_0396: ldloc.s V_47 IL_0398: ldloc.s V_47 IL_039a: ldloc.s V_47 - IL_039c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_03a1: 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_03a6: ldloc.s V_47 - IL_03a8: newobj instance void Linq101Aggregates01/'Pipe #5 input at line 81@82'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_03ad: 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, + .line 82,82 : 9,12 '' + IL_039c: ldloc.s V_47 + IL_039e: ldloc.s V_47 + IL_03a0: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_03a5: 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_03aa: ldloc.s V_47 + IL_03ac: newobj instance void Linq101Aggregates01/'Pipe #5 input at line 81@82'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_03b1: 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_03b2: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@83-1' Linq101Aggregates01/'Pipe #5 input at line 81@83-1'::@_instance - IL_03b7: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@83-2' Linq101Aggregates01/'Pipe #5 input at line 81@83-2'::@_instance - IL_03bc: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03b6: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@83-1' Linq101Aggregates01/'Pipe #5 input at line 81@83-1'::@_instance + IL_03bb: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@83-2' Linq101Aggregates01/'Pipe #5 input at line 81@83-2'::@_instance + IL_03c0: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_03c1: ldloc.s V_47 - IL_03c3: newobj instance void Linq101Aggregates01/'Pipe #5 input at line 81@83-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_03c8: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03c5: ldloc.s V_47 + IL_03c7: newobj instance void Linq101Aggregates01/'Pipe #5 input at line 81@83-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_03cc: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_03cd: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@85-4' Linq101Aggregates01/'Pipe #5 input at line 81@85-4'::@_instance - IL_03d2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03d1: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@85-4' Linq101Aggregates01/'Pipe #5 input at line 81@85-4'::@_instance + IL_03d6: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,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_03d7: 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_03dc: stloc.s 'Pipe #5 input at line 81' + IL_03db: 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_03e0: stloc.s 'Pipe #5 input at line 81' .line 86,86 : 10,21 '' - IL_03de: ldloc.s 'Pipe #5 input at line 81' - IL_03e0: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_03e5: dup - IL_03e6: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories4@80 - IL_03eb: stloc.s categories4 + IL_03e2: ldloc.s 'Pipe #5 input at line 81' + IL_03e4: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_03e9: dup + IL_03ea: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories4@80 + IL_03ef: stloc.s categories4 .line 89,96 : 1,21 '' - IL_03ed: nop + IL_03f1: nop + .line 90,90 : 5,10 '' + IL_03f2: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_03f7: stloc.s V_49 .line 90,90 : 5,10 '' - IL_03ee: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_03f3: stloc.s V_49 - IL_03f5: ldloc.s V_49 - IL_03f7: ldloc.s V_49 IL_03f9: ldloc.s V_49 IL_03fb: ldloc.s V_49 IL_03fd: ldloc.s V_49 - IL_03ff: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_0404: 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_0409: ldloc.s V_49 - IL_040b: newobj instance void Linq101Aggregates01/'Pipe #6 input at line 90@91'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0410: 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, + .line 91,91 : 9,12 '' + IL_03ff: ldloc.s V_49 + IL_0401: ldloc.s V_49 + IL_0403: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_0408: 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_040d: ldloc.s V_49 + IL_040f: newobj instance void Linq101Aggregates01/'Pipe #6 input at line 90@91'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0414: 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_0415: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@92-1' Linq101Aggregates01/'Pipe #6 input at line 90@92-1'::@_instance - IL_041a: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@92-2' Linq101Aggregates01/'Pipe #6 input at line 90@92-2'::@_instance - IL_041f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0419: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@92-1' Linq101Aggregates01/'Pipe #6 input at line 90@92-1'::@_instance + IL_041e: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@92-2' Linq101Aggregates01/'Pipe #6 input at line 90@92-2'::@_instance + IL_0423: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0424: ldloc.s V_49 - IL_0426: newobj instance void Linq101Aggregates01/'Pipe #6 input at line 90@92-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_042b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0428: ldloc.s V_49 + IL_042a: newobj instance void Linq101Aggregates01/'Pipe #6 input at line 90@92-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_042f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0430: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@95-4' Linq101Aggregates01/'Pipe #6 input at line 90@95-4'::@_instance - IL_0435: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0434: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@95-4' Linq101Aggregates01/'Pipe #6 input at line 90@95-4'::@_instance + IL_0439: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,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_043a: 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_043f: stloc.s 'Pipe #6 input at line 90' + IL_043e: 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_0443: stloc.s 'Pipe #6 input at line 90' .line 96,96 : 10,21 '' - IL_0441: ldloc.s 'Pipe #6 input at line 90' - IL_0443: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0448: dup - IL_0449: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories5@89 - IL_044e: stloc.s categories5 + IL_0445: ldloc.s 'Pipe #6 input at line 90' + IL_0447: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_044c: dup + IL_044d: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories5@89 + IL_0452: stloc.s categories5 .line 99,99 : 1,66 '' - IL_0450: ldc.r8 5. - IL_0459: ldc.r8 4. - IL_0462: ldc.r8 1. - IL_046b: ldc.r8 3. - IL_0474: ldc.r8 9. - IL_047d: ldc.r8 8. - IL_0486: ldc.r8 6. - IL_048f: ldc.r8 7. - IL_0498: ldc.r8 2. - IL_04a1: ldc.r8 0.0 - IL_04aa: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_04af: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0454: ldc.r8 5. + IL_045d: ldc.r8 4. + IL_0466: ldc.r8 1. + IL_046f: ldc.r8 3. + IL_0478: ldc.r8 9. + IL_0481: ldc.r8 8. + IL_048a: ldc.r8 6. + IL_0493: ldc.r8 7. + IL_049c: ldc.r8 2. + IL_04a5: ldc.r8 0.0 + IL_04ae: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_04b3: 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_04b4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04b8: 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_04b9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04bd: 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_04be: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04c2: 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_04c3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04c7: 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_04c8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04cc: 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_04cd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04d1: 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_04d2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04d6: 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_04d7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04db: 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_04dc: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04e0: 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_04e1: dup - IL_04e2: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::numbers2@99 - IL_04e7: stloc.s numbers2 - IL_04e9: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_04ee: stloc.s V_50 - IL_04f0: ldloc.s V_50 - IL_04f2: stloc.s V_51 - IL_04f4: ldnull - IL_04f5: ldc.i4.0 - IL_04f6: ldc.r8 0.0 - IL_04ff: newobj instance void Linq101Aggregates01/averageNum@100::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_04e5: dup + IL_04e6: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::numbers2@99 + IL_04eb: stloc.s numbers2 + .line 100,100 : 18,23 '' + IL_04ed: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_04f2: stloc.s V_50 + .line 100,100 : 18,23 '' + IL_04f4: ldloc.s V_50 + IL_04f6: stloc.s V_51 + IL_04f8: ldnull + IL_04f9: ldc.i4.0 + IL_04fa: ldc.r8 0.0 + IL_0503: newobj instance void Linq101Aggregates01/averageNum@100::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, float64) - IL_0504: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0509: stloc.s V_52 - IL_050b: ldsfld class Linq101Aggregates01/'averageNum@100-1' Linq101Aggregates01/'averageNum@100-1'::@_instance - IL_0510: stloc.s V_53 - 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 + IL_0508: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_050d: stloc.s V_52 + IL_050f: ldsfld class Linq101Aggregates01/'averageNum@100-1' Linq101Aggregates01/'averageNum@100-1'::@_instance + IL_0514: stloc.s V_53 + IL_0516: ldloc.s V_52 + IL_0518: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_051d: 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 + IL_051f: ldloc.s V_54 + IL_0521: box class [mscorlib]System.Collections.Generic.IEnumerable`1 + IL_0526: brtrue.s IL_0533 .line 100001,100001 : 0,0 '' - IL_0524: ldstr "source" - IL_0529: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) - IL_052e: throw + IL_0528: ldstr "source" + IL_052d: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) + IL_0532: throw .line 100001,100001 : 0,0 '' - IL_052f: nop - IL_0530: ldloc.s V_54 - IL_0532: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0537: stloc.s V_55 + IL_0533: nop + IL_0534: ldloc.s V_54 + IL_0536: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_053b: stloc.s V_55 .try { - IL_0539: ldc.r8 0.0 - IL_0542: stloc.s V_57 - IL_0544: ldc.i4.0 - IL_0545: stloc.s V_58 - IL_0547: ldloc.s V_55 - IL_0549: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() - IL_054e: brfalse.s IL_056c - - IL_0550: ldloc.s V_57 - IL_0552: ldloc.s V_53 - IL_0554: ldloc.s V_55 - IL_0556: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() - IL_055b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0560: add - IL_0561: stloc.s V_57 - .line 100,100 : 47,58 '' - IL_0563: ldloc.s V_58 - IL_0565: ldc.i4.1 - IL_0566: add - IL_0567: stloc.s V_58 - .line 100001,100001 : 0,0 '' - 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 - - .line 100001,100001 : 0,0 '' - IL_0570: ldstr "source" - IL_0575: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) - IL_057a: throw - - .line 100001,100001 : 0,0 '' - IL_057b: nop - IL_057c: ldloc.s V_57 - IL_057e: stloc.s V_59 - IL_0580: ldloc.s V_58 - IL_0582: stloc.s V_60 - IL_0584: ldloc.s V_59 - IL_0586: ldloc.s V_60 - IL_0588: conv.r8 - IL_0589: div - IL_058a: stloc.s V_56 - IL_058c: leave.s IL_05a4 + IL_053d: ldc.r8 0.0 + IL_0546: stloc.s V_57 + IL_0548: ldc.i4.0 + IL_0549: stloc.s V_58 + IL_054b: ldloc.s V_55 + IL_054d: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() + IL_0552: brfalse.s IL_0570 + + IL_0554: ldloc.s V_57 + IL_0556: ldloc.s V_53 + IL_0558: ldloc.s V_55 + IL_055a: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() + IL_055f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0564: add + IL_0565: stloc.s V_57 + IL_0567: ldloc.s V_58 + IL_0569: ldc.i4.1 + IL_056a: add + IL_056b: stloc.s V_58 + .line 100001,100001 : 0,0 '' + IL_056d: nop + IL_056e: br.s IL_054b + + .line 100001,100001 : 0,0 '' + IL_0570: ldloc.s V_58 + IL_0572: brtrue.s IL_057f + + .line 100001,100001 : 0,0 '' + IL_0574: ldstr "source" + IL_0579: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) + IL_057e: throw + + .line 100001,100001 : 0,0 '' + IL_057f: nop + IL_0580: ldloc.s V_57 + IL_0582: stloc.s V_59 + IL_0584: ldloc.s V_58 + IL_0586: stloc.s V_60 + IL_0588: ldloc.s V_59 + IL_058a: ldloc.s V_60 + IL_058c: conv.r8 + IL_058d: div + IL_058e: stloc.s V_56 + IL_0590: leave.s IL_05a8 } // end .try finally { - IL_058e: ldloc.s V_55 - IL_0590: isinst [mscorlib]System.IDisposable - IL_0595: stloc.s V_61 + IL_0592: ldloc.s V_55 + IL_0594: isinst [mscorlib]System.IDisposable + IL_0599: stloc.s V_61 .line 100001,100001 : 0,0 '' - IL_0597: ldloc.s V_61 - IL_0599: brfalse.s IL_05a3 + IL_059b: ldloc.s V_61 + IL_059d: brfalse.s IL_05a7 .line 100001,100001 : 0,0 '' - IL_059b: ldloc.s V_61 - IL_059d: callvirt instance void [netstandard]System.IDisposable::Dispose() - IL_05a2: endfinally + IL_059f: ldloc.s V_61 + IL_05a1: callvirt instance void [netstandard]System.IDisposable::Dispose() + IL_05a6: endfinally .line 100001,100001 : 0,0 '' - IL_05a3: endfinally + IL_05a7: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_05a4: ldloc.s V_56 - IL_05a6: dup - IL_05a7: stsfld float64 ''.$Linq101Aggregates01::averageNum@100 - IL_05ac: stloc.s averageNum - IL_05ae: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_05b3: stloc.s V_62 - IL_05b5: ldloc.s V_62 - IL_05b7: stloc.s V_63 + IL_05a8: ldloc.s V_56 + IL_05aa: dup + IL_05ab: stsfld float64 ''.$Linq101Aggregates01::averageNum@100 + IL_05b0: stloc.s averageNum + .line 104,104 : 5,10 '' + IL_05b2: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_05b7: stloc.s V_62 + .line 104,104 : 5,10 '' IL_05b9: ldloc.s V_62 - IL_05bb: ldloc.s V_62 - IL_05bd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() - IL_05c2: 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_05c7: ldloc.s V_62 - IL_05c9: newobj instance void Linq101Aggregates01/averageLength@105::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_05ce: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_05bb: stloc.s V_63 + .line 105,105 : 9,12 '' + IL_05bd: ldloc.s V_62 + IL_05bf: ldloc.s V_62 + IL_05c1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() + IL_05c6: 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_05cb: ldloc.s V_62 + IL_05cd: newobj instance void Linq101Aggregates01/averageLength@105::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_05d2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_05d3: stloc.s V_64 - IL_05d5: ldsfld class Linq101Aggregates01/'averageLength@107-1' Linq101Aggregates01/'averageLength@107-1'::@_instance - IL_05da: stloc.s V_65 - 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 + IL_05d7: stloc.s V_64 + IL_05d9: ldsfld class Linq101Aggregates01/'averageLength@107-1' Linq101Aggregates01/'averageLength@107-1'::@_instance + IL_05de: stloc.s V_65 + IL_05e0: ldloc.s V_64 + IL_05e2: 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_05e7: 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 + IL_05e9: ldloc.s V_66 + IL_05eb: box class [mscorlib]System.Collections.Generic.IEnumerable`1> + IL_05f0: brtrue.s IL_05fd .line 100001,100001 : 0,0 '' - IL_05ee: ldstr "source" - IL_05f3: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) - IL_05f8: throw + IL_05f2: ldstr "source" + IL_05f7: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) + IL_05fc: throw .line 100001,100001 : 0,0 '' - IL_05f9: nop - IL_05fa: ldloc.s V_66 - IL_05fc: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1>::GetEnumerator() - IL_0601: stloc.s V_67 + IL_05fd: nop + IL_05fe: ldloc.s V_66 + IL_0600: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1>::GetEnumerator() + IL_0605: stloc.s V_67 .try { - IL_0603: ldc.r8 0.0 - IL_060c: stloc.s V_69 - IL_060e: ldc.i4.0 - IL_060f: stloc.s V_70 - IL_0611: ldloc.s V_67 - IL_0613: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() - IL_0618: brfalse.s IL_0636 - - IL_061a: ldloc.s V_69 - IL_061c: ldloc.s V_65 - IL_061e: ldloc.s V_67 - IL_0620: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1>::get_Current() - IL_0625: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,float64>::Invoke(!0) - IL_062a: add - IL_062b: stloc.s V_69 - .line 107,107 : 9,21 '' - IL_062d: ldloc.s V_70 - IL_062f: ldc.i4.1 - IL_0630: add - IL_0631: stloc.s V_70 - .line 100001,100001 : 0,0 '' - 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 - - .line 100001,100001 : 0,0 '' - IL_063a: ldstr "source" - IL_063f: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) - IL_0644: throw - - .line 100001,100001 : 0,0 '' - IL_0645: nop - IL_0646: ldloc.s V_69 - IL_0648: stloc.s V_71 - IL_064a: ldloc.s V_70 - IL_064c: stloc.s V_72 - IL_064e: ldloc.s V_71 - IL_0650: ldloc.s V_72 - IL_0652: conv.r8 - IL_0653: div - IL_0654: stloc.s V_68 - IL_0656: leave.s IL_066e + IL_0607: ldc.r8 0.0 + IL_0610: stloc.s V_69 + IL_0612: ldc.i4.0 + IL_0613: stloc.s V_70 + IL_0615: ldloc.s V_67 + IL_0617: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() + IL_061c: brfalse.s IL_063a + + IL_061e: ldloc.s V_69 + IL_0620: ldloc.s V_65 + IL_0622: ldloc.s V_67 + IL_0624: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1>::get_Current() + IL_0629: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,float64>::Invoke(!0) + IL_062e: add + IL_062f: stloc.s V_69 + IL_0631: ldloc.s V_70 + IL_0633: ldc.i4.1 + IL_0634: add + IL_0635: stloc.s V_70 + .line 100001,100001 : 0,0 '' + IL_0637: nop + IL_0638: br.s IL_0615 + + .line 100001,100001 : 0,0 '' + IL_063a: ldloc.s V_70 + IL_063c: brtrue.s IL_0649 + + .line 100001,100001 : 0,0 '' + IL_063e: ldstr "source" + IL_0643: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) + IL_0648: throw + + .line 100001,100001 : 0,0 '' + IL_0649: nop + IL_064a: ldloc.s V_69 + IL_064c: stloc.s V_71 + IL_064e: ldloc.s V_70 + IL_0650: stloc.s V_72 + IL_0652: ldloc.s V_71 + IL_0654: ldloc.s V_72 + IL_0656: conv.r8 + IL_0657: div + IL_0658: stloc.s V_68 + IL_065a: leave.s IL_0672 } // end .try finally { - IL_0658: ldloc.s V_67 - IL_065a: isinst [mscorlib]System.IDisposable - IL_065f: stloc.s V_73 + IL_065c: ldloc.s V_67 + IL_065e: isinst [mscorlib]System.IDisposable + IL_0663: stloc.s V_73 .line 100001,100001 : 0,0 '' - IL_0661: ldloc.s V_73 - IL_0663: brfalse.s IL_066d + IL_0665: ldloc.s V_73 + IL_0667: brfalse.s IL_0671 .line 100001,100001 : 0,0 '' - IL_0665: ldloc.s V_73 - IL_0667: callvirt instance void [netstandard]System.IDisposable::Dispose() - IL_066c: endfinally + IL_0669: ldloc.s V_73 + IL_066b: callvirt instance void [netstandard]System.IDisposable::Dispose() + IL_0670: endfinally .line 100001,100001 : 0,0 '' - IL_066d: endfinally + IL_0671: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_066e: ldloc.s V_68 - IL_0670: dup - IL_0671: stsfld float64 ''.$Linq101Aggregates01::averageLength@103 - IL_0676: stloc.s averageLength + IL_0672: ldloc.s V_68 + IL_0674: dup + IL_0675: stsfld float64 ''.$Linq101Aggregates01::averageLength@103 + IL_067a: stloc.s averageLength .line 111,117 : 1,21 '' - IL_0678: nop + IL_067c: nop + .line 112,112 : 5,10 '' + IL_067d: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0682: stloc.s V_75 .line 112,112 : 5,10 '' - IL_0679: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_067e: stloc.s V_75 - IL_0680: ldloc.s V_75 - IL_0682: ldloc.s V_75 IL_0684: ldloc.s V_75 IL_0686: ldloc.s V_75 IL_0688: ldloc.s V_75 - IL_068a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_068f: 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_0694: ldloc.s V_75 - IL_0696: newobj instance void Linq101Aggregates01/'Pipe #7 input at line 112@113'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_069b: 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, + .line 113,113 : 9,12 '' + IL_068a: ldloc.s V_75 + IL_068c: ldloc.s V_75 + IL_068e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_0693: 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_0698: ldloc.s V_75 + IL_069a: newobj instance void Linq101Aggregates01/'Pipe #7 input at line 112@113'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_069f: 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_06a0: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@114-1' Linq101Aggregates01/'Pipe #7 input at line 112@114-1'::@_instance - IL_06a5: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@114-2' Linq101Aggregates01/'Pipe #7 input at line 112@114-2'::@_instance - IL_06aa: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_06a4: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@114-1' Linq101Aggregates01/'Pipe #7 input at line 112@114-1'::@_instance + IL_06a9: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@114-2' Linq101Aggregates01/'Pipe #7 input at line 112@114-2'::@_instance + IL_06ae: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_06af: ldloc.s V_75 - IL_06b1: newobj instance void Linq101Aggregates01/'Pipe #7 input at line 112@114-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_06b6: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_06b3: ldloc.s V_75 + IL_06b5: newobj instance void Linq101Aggregates01/'Pipe #7 input at line 112@114-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_06ba: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_06bb: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@116-4' Linq101Aggregates01/'Pipe #7 input at line 112@116-4'::@_instance - IL_06c0: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_06bf: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@116-4' Linq101Aggregates01/'Pipe #7 input at line 112@116-4'::@_instance + IL_06c4: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,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_06c5: 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_06ca: stloc.s 'Pipe #7 input at line 112' + IL_06c9: 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_06ce: stloc.s 'Pipe #7 input at line 112' .line 117,117 : 10,21 '' - IL_06cc: ldloc.s 'Pipe #7 input at line 112' - IL_06ce: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_06d3: dup - IL_06d4: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories6@111 - IL_06d9: stloc.s categories6 - IL_06db: ret + IL_06d0: ldloc.s 'Pipe #7 input at line 112' + IL_06d2: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_06d7: dup + IL_06d8: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories6@111 + IL_06dd: stloc.s categories6 + IL_06df: ret } // end of method $Linq101Aggregates01::main@ } // end of class ''.$Linq101Aggregates01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl index d64da39d4e5..5c8ac8df53a 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.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 extern Utils { @@ -45,13 +45,13 @@ // Offset: 0x00000388 Length: 0x00000127 } .module Linq101ElementOperators01.exe -// MVID: {611C4D82-19D7-C20D-A745-0383824D1C61} +// MVID: {61E07032-19D7-C20D-A745-03833270E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A90000 +// Image base: 0x069E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -100,7 +100,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] class [Utils]Utils/Product V_0, [1] class [Utils]Utils/Product p) @@ -118,78 +118,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 12,12 : 9,29 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_products() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101ElementOperators01/products12@12::pc - .line 12,12 : 9,29 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 12,12 : 9,29 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 12,12 : 9,12 '' + IL_0025: nop + .line 12,12 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_products() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101ElementOperators01/products12@12::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 13,13 : 9,33 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101ElementOperators01/products12@12::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101ElementOperators01/products12@12::pc - .line 12,12 : 9,29 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101ElementOperators01/products12@12::pc - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101ElementOperators01/products12@12::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101ElementOperators01/products12@12::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/products12@12::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101ElementOperators01/products12@12::pc + IL_008c: ldarg.0 + IL_008d: ldnull + IL_008e: stfld class [Utils]Utils/Product Linq101ElementOperators01/products12@12::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method products12@12::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -262,7 +261,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 12,12 : 9,29 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -272,20 +270,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method products12@12::Close .method public strict virtual instance bool @@ -442,7 +438,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] string V_0, [1] string s) @@ -459,78 +455,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 22,22 : 9,28 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_strings() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101ElementOperators01/startsWithO@22::pc - .line 22,22 : 9,28 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 22,22 : 9,28 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 22,22 : 9,12 '' + IL_0025: nop + .line 22,22 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_strings() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 23,23 : 9,28 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101ElementOperators01/startsWithO@22::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld string Linq101ElementOperators01/startsWithO@22::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101ElementOperators01/startsWithO@22::pc - .line 22,22 : 9,28 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101ElementOperators01/startsWithO@22::pc - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld string Linq101ElementOperators01/startsWithO@22::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld string Linq101ElementOperators01/startsWithO@22::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/startsWithO@22::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101ElementOperators01/startsWithO@22::pc + IL_008c: ldarg.0 + IL_008d: ldnull + IL_008e: stfld string Linq101ElementOperators01/startsWithO@22::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method startsWithO@22::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -603,7 +598,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 22,22 : 9,28 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -613,20 +607,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method startsWithO@22::Close .method public strict virtual instance bool @@ -784,7 +776,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] int32 V_0, [1] int32 n) @@ -801,78 +793,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 31,31 : 9,28 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_numbers() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc - .line 31,31 : 9,28 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 31,31 : 9,28 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 31,31 : 9,12 '' + IL_0025: nop + .line 31,31 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_numbers() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 32,32 : 9,22 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc - .line 31,31 : 9,28 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/firstNumOrDefault@31::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::pc + IL_008c: ldarg.0 + IL_008d: ldc.i4.0 + IL_008e: stfld int32 Linq101ElementOperators01/firstNumOrDefault@31::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method firstNumOrDefault@31::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -945,7 +936,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 31,31 : 9,28 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -955,20 +945,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method firstNumOrDefault@31::Close .method public strict virtual instance bool @@ -1084,7 +1072,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] int32 V_0, [1] int32 n) @@ -1101,78 +1089,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 52,52 : 9,29 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_numbers2() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc - .line 52,52 : 9,29 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 52,52 : 9,29 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 52,52 : 9,12 '' + IL_0025: nop + .line 52,52 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_numbers2() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 53,53 : 9,22 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld int32 Linq101ElementOperators01/fourthLowNum@52::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc - .line 52,52 : 9,29 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101ElementOperators01/fourthLowNum@52::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld int32 Linq101ElementOperators01/fourthLowNum@52::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101ElementOperators01/fourthLowNum@52::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101ElementOperators01/fourthLowNum@52::pc + IL_008c: ldarg.0 + IL_008d: ldc.i4.0 + IL_008e: stfld int32 Linq101ElementOperators01/fourthLowNum@52::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method fourthLowNum@52::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1245,7 +1232,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 52,52 : 9,29 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -1255,20 +1241,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method fourthLowNum@52::Close .method public strict virtual instance bool @@ -1527,7 +1511,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 377 (0x179) + // Code size 378 (0x17a) .maxstack 13 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products, [1] class [Utils]Utils/Product products12, @@ -1545,8 +1529,10 @@ IL_0005: dup IL_0006: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::products@8 IL_000b: stloc.0 + .line 11,11 : 5,10 '' IL_000c: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0011: stloc.s V_8 + .line 11,11 : 5,10 '' IL_0013: ldloc.s V_8 IL_0015: ldloc.s V_8 IL_0017: ldnull @@ -1598,8 +1584,10 @@ IL_00a3: dup IL_00a4: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::strings@18 IL_00a9: stloc.2 + .line 21,21 : 5,10 '' IL_00aa: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00af: stloc.s V_9 + .line 21,21 : 5,10 '' IL_00b1: ldloc.s V_9 IL_00b3: ldloc.s V_9 IL_00b5: ldnull @@ -1619,74 +1607,79 @@ .line 28,28 : 1,28 '' IL_00d8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_numbers() IL_00dd: stloc.s numbers - IL_00df: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00e4: ldnull - IL_00e5: ldc.i4.0 + .line 30,30 : 5,10 '' + IL_00df: nop + .line 30,30 : 5,10 '' + IL_00e0: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00e5: ldnull IL_00e6: ldc.i4.0 - IL_00e7: newobj instance void Linq101ElementOperators01/firstNumOrDefault@31::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_00e7: ldc.i4.0 + IL_00e8: newobj instance void Linq101ElementOperators01/firstNumOrDefault@31::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_00ec: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00f1: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::HeadOrDefault(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) - IL_00f6: dup - IL_00f7: stsfld int32 ''.$Linq101ElementOperators01::firstNumOrDefault@29 - IL_00fc: stloc.s firstNumOrDefault + IL_00ed: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00f2: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::HeadOrDefault(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) + IL_00f7: dup + IL_00f8: stsfld int32 ''.$Linq101ElementOperators01::firstNumOrDefault@29 + IL_00fd: stloc.s firstNumOrDefault .line 48,48 : 1,48 '' - IL_00fe: ldc.i4.5 - IL_00ff: ldc.i4.4 - IL_0100: ldc.i4.1 - IL_0101: ldc.i4.3 - IL_0102: ldc.i4.s 9 - IL_0104: ldc.i4.8 - IL_0105: ldc.i4.6 - IL_0106: ldc.i4.7 - IL_0107: ldc.i4.2 - IL_0108: ldc.i4.0 - IL_0109: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_010e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00ff: ldc.i4.5 + IL_0100: ldc.i4.4 + IL_0101: ldc.i4.1 + IL_0102: ldc.i4.3 + IL_0103: ldc.i4.s 9 + IL_0105: ldc.i4.8 + IL_0106: ldc.i4.6 + IL_0107: ldc.i4.7 + IL_0108: ldc.i4.2 + IL_0109: ldc.i4.0 + IL_010a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_010f: 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_0113: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0114: 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_0118: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0119: 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_011d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_011e: 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_0122: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0123: 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_0127: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0128: 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_012c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_012d: 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_0131: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0132: 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_0136: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0137: 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_013b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_013c: 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_0140: dup - IL_0141: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::numbers2@48 - IL_0146: stloc.s numbers2 - IL_0148: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_014d: stloc.s V_10 - IL_014f: ldloc.s V_10 - IL_0151: ldloc.s V_10 - IL_0153: ldnull - IL_0154: ldc.i4.0 + IL_0141: dup + IL_0142: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::numbers2@48 + IL_0147: stloc.s numbers2 + .line 51,51 : 5,10 '' + IL_0149: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_014e: stloc.s V_10 + .line 51,51 : 5,10 '' + IL_0150: ldloc.s V_10 + IL_0152: ldloc.s V_10 + IL_0154: ldnull IL_0155: ldc.i4.0 - IL_0156: newobj instance void Linq101ElementOperators01/fourthLowNum@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0156: ldc.i4.0 + IL_0157: newobj instance void Linq101ElementOperators01/fourthLowNum@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_015b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0160: ldsfld class Linq101ElementOperators01/'fourthLowNum@53-1' Linq101ElementOperators01/'fourthLowNum@53-1'::@_instance - IL_0165: 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_015c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0161: ldsfld class Linq101ElementOperators01/'fourthLowNum@53-1' Linq101ElementOperators01/'fourthLowNum@53-1'::@_instance + IL_0166: 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_016a: ldc.i4.1 - IL_016b: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Nth(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_016b: ldc.i4.1 + IL_016c: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Nth(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, int32) - IL_0170: dup - IL_0171: stsfld int32 ''.$Linq101ElementOperators01::fourthLowNum@50 - IL_0176: stloc.s fourthLowNum - IL_0178: ret + IL_0171: dup + IL_0172: stsfld int32 ''.$Linq101ElementOperators01::fourthLowNum@50 + IL_0177: stloc.s fourthLowNum + IL_0179: ret } // end of method $Linq101ElementOperators01::main@ } // end of class ''.$Linq101ElementOperators01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl index 2ca5a307b26..08ab827279e 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.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 extern System.Core { @@ -50,13 +50,13 @@ // Offset: 0x00000408 Length: 0x00000129 } .module Linq101Grouping01.exe -// MVID: {611B0EC5-FB79-E5BF-A745-0383C50E1B61} +// MVID: {61E07032-FB79-E5BF-A745-03833270E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x053C0000 +// Image base: 0x07050000 // =============== CLASS MEMBERS DECLARATION =================== @@ -94,7 +94,7 @@ .maxstack 6 .locals init ([0] int32 n) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 14,14 : 9,28 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Grouping01.fs' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Grouping01.fs' IL_0000: ldarg.1 IL_0001: stloc.0 .line 15,15 : 9,29 '' @@ -214,9 +214,10 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g) - .line 15,15 : 35,36 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 + .line 16,16 : 9,36 '' IL_0002: ldarg.0 IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Grouping01/'Pipe #1 input at line 13@15-3'::builder@ IL_0008: ldloc.0 @@ -298,7 +299,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] string w) - .line 24,24 : 9,26 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 25,25 : 9,29 '' @@ -418,9 +419,10 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g) - .line 25,25 : 35,36 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 + .line 26,26 : 9,36 '' IL_0002: ldarg.0 IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Grouping01/'Pipe #2 input at line 23@25-3'::builder@ IL_0008: ldloc.0 @@ -502,7 +504,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [Utils]Utils/Product p) - .line 34,34 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 35,35 : 9,32 '' @@ -622,9 +624,10 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g) - .line 35,35 : 38,39 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 + .line 36,36 : 9,36 '' IL_0002: ldarg.0 IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Grouping01/'Pipe #3 input at line 33@35-3'::builder@ IL_0008: ldloc.0 @@ -706,7 +709,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [Utils]Utils/Order o) - .line 47,47 : 17,37 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 48,48 : 17,48 '' @@ -829,7 +832,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [Utils]Utils/Order o) - .line 51,51 : 25,39 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 52,52 : 25,57 '' @@ -952,9 +955,10 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 mg) - .line 52,52 : 63,65 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 + .line 53,53 : 25,54 '' IL_0002: ldarg.0 IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Grouping01/'monthGroups@52-3'::builder@ IL_0008: ldloc.0 @@ -1038,14 +1042,17 @@ .locals init ([0] class [System.Core]System.Linq.IGrouping`2 yg, [1] class [mscorlib]System.Collections.Generic.IEnumerable`1> monthGroups, [2] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_2) - .line 48,48 : 54,56 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 + .line 50,50 : 21,26 '' IL_0002: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0007: stloc.2 + .line 50,50 : 21,26 '' IL_0008: ldloc.2 IL_0009: ldloc.2 IL_000a: ldloc.2 + .line 51,51 : 25,28 '' IL_000b: ldloc.2 IL_000c: ldloc.2 IL_000d: ldloc.0 @@ -1164,15 +1171,17 @@ .locals init ([0] class [Utils]Utils/Customer c, [1] class [mscorlib]System.Collections.Generic.IEnumerable`1[]>> yearGroups, [2] class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder V_2) - .line 44,44 : 9,30 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 - .line 57,57 : 9,53 '' + .line 46,46 : 13,18 '' IL_0002: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0007: stloc.2 + .line 46,46 : 13,18 '' IL_0008: ldloc.2 IL_0009: ldloc.2 IL_000a: ldloc.2 + .line 47,47 : 17,20 '' IL_000b: ldloc.2 IL_000c: ldloc.2 IL_000d: ldloc.0 @@ -1521,9 +1530,11 @@ .line 13,13 : 5,10 '' IL_00ba: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00bf: stloc.s V_10 + .line 13,13 : 5,10 '' IL_00c1: ldloc.s V_10 IL_00c3: ldloc.s V_10 IL_00c5: ldloc.s V_10 + .line 14,14 : 9,12 '' IL_00c7: ldloc.s V_10 IL_00c9: ldloc.s V_10 IL_00cb: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Grouping01::get_numbers() @@ -1580,9 +1591,11 @@ .line 23,23 : 5,10 '' IL_0164: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0169: stloc.s V_12 + .line 23,23 : 5,10 '' IL_016b: ldloc.s V_12 IL_016d: ldloc.s V_12 IL_016f: ldloc.s V_12 + .line 24,24 : 9,12 '' IL_0171: ldloc.s V_12 IL_0173: ldloc.s V_12 IL_0175: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Grouping01::get_words() @@ -1621,9 +1634,11 @@ .line 33,33 : 5,10 '' IL_01d4: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_01d9: stloc.s V_14 + .line 33,33 : 5,10 '' IL_01db: ldloc.s V_14 IL_01dd: ldloc.s V_14 IL_01df: ldloc.s V_14 + .line 34,34 : 9,12 '' IL_01e1: ldloc.s V_14 IL_01e3: ldloc.s V_14 IL_01e5: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Grouping01::get_products() @@ -1662,7 +1677,9 @@ .line 43,43 : 5,10 '' IL_0244: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0249: stloc.s V_16 + .line 43,43 : 5,10 '' IL_024b: ldloc.s V_16 + .line 44,44 : 9,12 '' IL_024d: ldloc.s V_16 IL_024f: ldloc.s V_16 IL_0251: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Grouping01::get_customers() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl index 20da6d9ded5..93738326ab1 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Joins01.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 extern Utils { @@ -45,13 +45,13 @@ // Offset: 0x00000310 Length: 0x000000C3 } .module Linq101Joins01.exe -// MVID: {611C4D82-151B-685E-A745-0383824D1C61} +// MVID: {61E07032-151B-685E-A745-03833270E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06C40000 +// Image base: 0x06FE0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -211,7 +211,7 @@ .locals init ([0] class [mscorlib]System.Tuple`2 V_0, [1] class [Utils]Utils/Product p, [2] string c) - .line 14,14 : 9,47 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -220,6 +220,7 @@ IL_0009: ldloc.0 IL_000a: call instance !0 class [mscorlib]System.Tuple`2::get_Item1() IL_000f: stloc.2 + .line 15,15 : 9,34 '' IL_0010: ldarg.0 IL_0011: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #1 input at line 12@14-3'::builder@ IL_0016: ldloc.2 @@ -434,7 +435,7 @@ .locals init ([0] class [mscorlib]System.Tuple`2> V_0, [1] class [mscorlib]System.Collections.Generic.IEnumerable`1 ps, [2] string c) - .line 22,22 : 9,60 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -443,6 +444,7 @@ IL_0009: ldloc.0 IL_000a: call instance !0 class [mscorlib]System.Tuple`2>::get_Item1() IL_000f: stloc.2 + .line 23,23 : 9,23 '' IL_0010: ldarg.0 IL_0011: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #2 input at line 20@22-3'::builder@ IL_0016: ldloc.2 @@ -664,7 +666,7 @@ // Code size 34 (0x22) .maxstack 8 .locals init ([0] class [Utils]Utils/Product p) - .line 31,31 : 9,23 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 32,32 : 9,34 '' @@ -715,7 +717,7 @@ .locals init ([0] class [mscorlib]System.Tuple`2> V_0, [1] class [mscorlib]System.Collections.Generic.IEnumerable`1 ps, [2] string c) - .line 30,30 : 9,60 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -724,6 +726,7 @@ IL_0009: ldloc.0 IL_000a: call instance !0 class [mscorlib]System.Tuple`2>::get_Item1() IL_000f: stloc.2 + .line 31,31 : 9,12 '' IL_0010: ldarg.0 IL_0011: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #3 input at line 28@30-3'::builder@ IL_0016: ldarg.0 @@ -959,7 +962,7 @@ .maxstack 9 .locals init ([0] class [Utils]Utils/Product p, [1] string t) - .line 40,40 : 9,40 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 41,41 : 17,39 '' @@ -1035,7 +1038,7 @@ .locals init ([0] class [mscorlib]System.Tuple`2> V_0, [1] class [mscorlib]System.Collections.Generic.IEnumerable`1 ps, [2] string c) - .line 39,39 : 9,60 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 IL_0002: ldloc.0 @@ -1044,6 +1047,7 @@ IL_0009: ldloc.0 IL_000a: call instance !0 class [mscorlib]System.Tuple`2>::get_Item1() IL_000f: stloc.2 + .line 40,40 : 9,12 '' IL_0010: ldarg.0 IL_0011: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Joins01/'Pipe #4 input at line 37@39-3'::builder@ IL_0016: ldarg.0 @@ -1284,6 +1288,7 @@ .line 12,12 : 5,10 '' IL_004b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0050: stloc.s V_7 + .line 12,12 : 5,10 '' IL_0052: ldloc.s V_7 IL_0054: ldloc.s V_7 IL_0056: ldloc.s V_7 @@ -1321,6 +1326,7 @@ .line 20,20 : 5,10 '' IL_00b0: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00b5: stloc.s V_9 + .line 20,20 : 5,10 '' IL_00b7: ldloc.s V_9 IL_00b9: ldloc.s V_9 IL_00bb: ldloc.s V_9 @@ -1358,6 +1364,7 @@ .line 28,28 : 5,10 '' IL_0115: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_011a: stloc.s V_11 + .line 28,28 : 5,10 '' IL_011c: ldloc.s V_11 IL_011e: ldloc.s V_11 IL_0120: ldloc.s V_11 @@ -1395,6 +1402,7 @@ .line 37,37 : 5,10 '' IL_017b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0180: stloc.s V_13 + .line 37,37 : 5,10 '' IL_0182: ldloc.s V_13 IL_0184: ldloc.s V_13 IL_0186: ldloc.s V_13 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl index e20407700d3..a9a8038f588 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.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 extern Utils { @@ -40,13 +40,13 @@ // Offset: 0x000003B8 Length: 0x00000134 } .module Linq101Ordering01.exe -// MVID: {611C4D82-649A-6956-A745-0383824D1C61} +// MVID: {61E07032-649A-6956-A745-03833270E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x071E0000 +// Image base: 0x069D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -95,7 +95,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] string V_0, [1] string w) @@ -113,78 +113,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 11,11 : 9,26 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_words() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #1 input at line 10@11'::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Ordering01/'Pipe #1 input at line 10@11'::pc - .line 11,11 : 9,26 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #1 input at line 10@11'::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #1 input at line 10@11'::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 11,11 : 9,26 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 11,11 : 9,12 '' + IL_0025: nop + .line 11,11 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_words() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #1 input at line 10@11'::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Ordering01/'Pipe #1 input at line 10@11'::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #1 input at line 10@11'::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #1 input at line 10@11'::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 12,12 : 9,17 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Ordering01/'Pipe #1 input at line 10@11'::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld string Linq101Ordering01/'Pipe #1 input at line 10@11'::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Ordering01/'Pipe #1 input at line 10@11'::pc - .line 11,11 : 9,26 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #1 input at line 10@11'::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #1 input at line 10@11'::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Ordering01/'Pipe #1 input at line 10@11'::pc - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld string Linq101Ordering01/'Pipe #1 input at line 10@11'::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Ordering01/'Pipe #1 input at line 10@11'::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld string Linq101Ordering01/'Pipe #1 input at line 10@11'::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Ordering01/'Pipe #1 input at line 10@11'::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #1 input at line 10@11'::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #1 input at line 10@11'::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Ordering01/'Pipe #1 input at line 10@11'::pc + IL_008c: ldarg.0 + IL_008d: ldnull + IL_008e: stfld string Linq101Ordering01/'Pipe #1 input at line 10@11'::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method 'Pipe #1 input at line 10@11'::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -257,7 +256,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 11,11 : 9,26 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -267,20 +265,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method 'Pipe #1 input at line 10@11'::Close .method public strict virtual instance bool @@ -434,7 +430,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] string V_0, [1] string w) @@ -451,78 +447,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 18,18 : 9,26 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_words() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #2 input at line 17@18'::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Ordering01/'Pipe #2 input at line 17@18'::pc - .line 18,18 : 9,26 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #2 input at line 17@18'::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #2 input at line 17@18'::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 18,18 : 9,26 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 18,18 : 9,12 '' + IL_0025: nop + .line 18,18 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_words() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #2 input at line 17@18'::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Ordering01/'Pipe #2 input at line 17@18'::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #2 input at line 17@18'::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #2 input at line 17@18'::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 19,19 : 9,26 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Ordering01/'Pipe #2 input at line 17@18'::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld string Linq101Ordering01/'Pipe #2 input at line 17@18'::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Ordering01/'Pipe #2 input at line 17@18'::pc - .line 18,18 : 9,26 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #2 input at line 17@18'::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #2 input at line 17@18'::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Ordering01/'Pipe #2 input at line 17@18'::pc - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld string Linq101Ordering01/'Pipe #2 input at line 17@18'::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Ordering01/'Pipe #2 input at line 17@18'::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld string Linq101Ordering01/'Pipe #2 input at line 17@18'::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Ordering01/'Pipe #2 input at line 17@18'::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #2 input at line 17@18'::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #2 input at line 17@18'::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Ordering01/'Pipe #2 input at line 17@18'::pc + IL_008c: ldarg.0 + IL_008d: ldnull + IL_008e: stfld string Linq101Ordering01/'Pipe #2 input at line 17@18'::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method 'Pipe #2 input at line 17@18'::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -595,7 +590,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 18,18 : 9,26 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -605,20 +599,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method 'Pipe #2 input at line 17@18'::Close .method public strict virtual instance bool @@ -761,7 +753,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [Utils]Utils/Product p) - .line 26,26 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 27,27 : 9,29 '' @@ -893,7 +885,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] class [Utils]Utils/Product V_0, [1] class [Utils]Utils/Product p) @@ -910,78 +902,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 44,44 : 9,29 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_products() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #4 input at line 43@44'::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Ordering01/'Pipe #4 input at line 43@44'::pc - .line 44,44 : 9,29 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #4 input at line 43@44'::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #4 input at line 43@44'::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 44,44 : 9,29 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 44,44 : 9,12 '' + IL_0025: nop + .line 44,44 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_products() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #4 input at line 43@44'::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Ordering01/'Pipe #4 input at line 43@44'::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #4 input at line 43@44'::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #4 input at line 43@44'::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 45,45 : 9,40 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Ordering01/'Pipe #4 input at line 43@44'::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld class [Utils]Utils/Product Linq101Ordering01/'Pipe #4 input at line 43@44'::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Ordering01/'Pipe #4 input at line 43@44'::pc - .line 44,44 : 9,29 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #4 input at line 43@44'::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #4 input at line 43@44'::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Ordering01/'Pipe #4 input at line 43@44'::pc - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld class [Utils]Utils/Product Linq101Ordering01/'Pipe #4 input at line 43@44'::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Ordering01/'Pipe #4 input at line 43@44'::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld class [Utils]Utils/Product Linq101Ordering01/'Pipe #4 input at line 43@44'::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Ordering01/'Pipe #4 input at line 43@44'::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #4 input at line 43@44'::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #4 input at line 43@44'::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Ordering01/'Pipe #4 input at line 43@44'::pc + IL_008c: ldarg.0 + IL_008d: ldnull + IL_008e: stfld class [Utils]Utils/Product Linq101Ordering01/'Pipe #4 input at line 43@44'::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method 'Pipe #4 input at line 43@44'::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1054,7 +1045,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 44,44 : 9,29 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -1064,20 +1054,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method 'Pipe #4 input at line 43@44'::Close .method public strict virtual instance bool @@ -1233,7 +1221,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] string V_0, [1] string d) @@ -1250,78 +1238,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 52,52 : 9,27 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_digits() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #5 input at line 51@52'::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Ordering01/'Pipe #5 input at line 51@52'::pc - .line 52,52 : 9,27 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #5 input at line 51@52'::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #5 input at line 51@52'::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 52,52 : 9,27 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 52,52 : 9,12 '' + IL_0025: nop + .line 52,52 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_digits() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #5 input at line 51@52'::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Ordering01/'Pipe #5 input at line 51@52'::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #5 input at line 51@52'::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #5 input at line 51@52'::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 53,53 : 9,24 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Ordering01/'Pipe #5 input at line 51@52'::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld string Linq101Ordering01/'Pipe #5 input at line 51@52'::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Ordering01/'Pipe #5 input at line 51@52'::pc - .line 52,52 : 9,27 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #5 input at line 51@52'::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #5 input at line 51@52'::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Ordering01/'Pipe #5 input at line 51@52'::pc - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld string Linq101Ordering01/'Pipe #5 input at line 51@52'::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Ordering01/'Pipe #5 input at line 51@52'::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld string Linq101Ordering01/'Pipe #5 input at line 51@52'::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Ordering01/'Pipe #5 input at line 51@52'::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #5 input at line 51@52'::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Ordering01/'Pipe #5 input at line 51@52'::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Ordering01/'Pipe #5 input at line 51@52'::pc + IL_008c: ldarg.0 + IL_008d: ldnull + IL_008e: stfld string Linq101Ordering01/'Pipe #5 input at line 51@52'::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method 'Pipe #5 input at line 51@52'::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1394,7 +1381,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 52,52 : 9,27 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -1404,20 +1390,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method 'Pipe #5 input at line 51@52'::Close .method public strict virtual instance bool @@ -1598,7 +1582,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [Utils]Utils/Product p) - .line 60,60 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 61,61 : 9,26 '' @@ -1934,6 +1918,7 @@ .line 10,10 : 5,10 '' IL_002b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0030: stloc.s V_10 + .line 10,10 : 5,10 '' IL_0032: ldloc.s V_10 IL_0034: ldnull IL_0035: ldc.i4.0 @@ -1958,6 +1943,7 @@ .line 17,17 : 5,10 '' IL_0061: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0066: stloc.s V_12 + .line 17,17 : 5,10 '' IL_0068: ldloc.s V_12 IL_006a: ldnull IL_006b: ldc.i4.0 @@ -1987,8 +1973,10 @@ .line 25,25 : 5,10 '' IL_00a3: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00a8: stloc.s V_14 + .line 25,25 : 5,10 '' IL_00aa: ldloc.s V_14 IL_00ac: ldloc.s V_14 + .line 26,26 : 9,12 '' IL_00ae: ldloc.s V_14 IL_00b0: ldloc.s V_14 IL_00b2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_products() @@ -2016,6 +2004,7 @@ .line 43,43 : 5,10 '' IL_00f3: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00f8: stloc.s V_16 + .line 43,43 : 5,10 '' IL_00fa: ldloc.s V_16 IL_00fc: ldnull IL_00fd: ldc.i4.0 @@ -2075,6 +2064,7 @@ .line 51,51 : 5,10 '' IL_019b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_01a0: stloc.s V_18 + .line 51,51 : 5,10 '' IL_01a2: ldloc.s V_18 IL_01a4: ldloc.s V_18 IL_01a6: ldnull @@ -2103,9 +2093,11 @@ .line 59,59 : 5,10 '' IL_01de: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_01e3: stloc.s V_20 + .line 59,59 : 5,10 '' IL_01e5: ldloc.s V_20 IL_01e7: ldloc.s V_20 IL_01e9: ldloc.s V_20 + .line 60,60 : 9,12 '' IL_01eb: ldloc.s V_20 IL_01ed: ldloc.s V_20 IL_01ef: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_products() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl index 365fa72d873..9e588bcbda2 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.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 extern Utils { @@ -45,13 +45,13 @@ // Offset: 0x000003D8 Length: 0x00000138 } .module Linq101Partitioning01.exe -// MVID: {611C4D82-B280-A6A2-A745-0383824D1C61} +// MVID: {61E07032-B280-A6A2-A745-03833270E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06570000 +// Image base: 0x05270000 // =============== CLASS MEMBERS DECLARATION =================== @@ -100,7 +100,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] int32 V_0, [1] int32 n) @@ -118,78 +118,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 12,12 : 9,28 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_numbers() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #1 input at line 11@12'::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::pc - .line 12,12 : 9,28 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #1 input at line 11@12'::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #1 input at line 11@12'::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 12,12 : 9,28 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 12,12 : 9,12 '' + IL_0025: nop + .line 12,12 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_numbers() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #1 input at line 11@12'::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #1 input at line 11@12'::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #1 input at line 11@12'::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 13,13 : 9,15 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::pc - .line 12,12 : 9,28 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #1 input at line 11@12'::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #1 input at line 11@12'::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::pc - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #1 input at line 11@12'::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #1 input at line 11@12'::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::pc + IL_008c: ldarg.0 + IL_008d: ldc.i4.0 + IL_008e: stfld int32 Linq101Partitioning01/'Pipe #1 input at line 11@12'::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method 'Pipe #1 input at line 11@12'::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -262,7 +261,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 12,12 : 9,28 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -272,20 +270,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method 'Pipe #1 input at line 11@12'::Close .method public strict virtual instance bool @@ -394,7 +390,7 @@ // Code size 28 (0x1c) .maxstack 7 .locals init ([0] class [Utils]Utils/Order o) - .line 21,21 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 22,22 : 9,32 '' @@ -440,10 +436,10 @@ // Code size 45 (0x2d) .maxstack 8 .locals init ([0] class [Utils]Utils/Customer c) - .line 20,20 : 9,30 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 - .line 21,21 : 9,29 '' + .line 21,21 : 9,12 '' IL_0002: ldarg.0 IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Partitioning01/'Pipe #2 input at line 19@20'::builder@ IL_0008: ldarg.0 @@ -610,7 +606,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] int32 V_0, [1] int32 n) @@ -627,78 +623,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 29,29 : 9,28 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_numbers() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #3 input at line 28@29'::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::pc - .line 29,29 : 9,28 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #3 input at line 28@29'::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #3 input at line 28@29'::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 29,29 : 9,28 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 29,29 : 9,12 '' + IL_0025: nop + .line 29,29 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_numbers() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #3 input at line 28@29'::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #3 input at line 28@29'::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #3 input at line 28@29'::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 30,30 : 9,15 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::pc - .line 29,29 : 9,28 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #3 input at line 28@29'::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #3 input at line 28@29'::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::pc - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #3 input at line 28@29'::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #3 input at line 28@29'::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::pc + IL_008c: ldarg.0 + IL_008d: ldc.i4.0 + IL_008e: stfld int32 Linq101Partitioning01/'Pipe #3 input at line 28@29'::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method 'Pipe #3 input at line 28@29'::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -771,7 +766,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 29,29 : 9,28 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -781,20 +775,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method 'Pipe #3 input at line 28@29'::Close .method public strict virtual instance bool @@ -903,7 +895,7 @@ // Code size 28 (0x1c) .maxstack 7 .locals init ([0] class [Utils]Utils/Order o) - .line 37,37 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 38,38 : 9,32 '' @@ -949,10 +941,10 @@ // Code size 45 (0x2d) .maxstack 8 .locals init ([0] class [Utils]Utils/Customer c) - .line 36,36 : 9,30 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 - .line 37,37 : 9,29 '' + .line 37,37 : 9,12 '' IL_0002: ldarg.0 IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Partitioning01/'Pipe #4 input at line 35@36'::builder@ IL_0008: ldarg.0 @@ -1119,7 +1111,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] int32 V_0, [1] int32 n) @@ -1136,78 +1128,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 45,45 : 9,28 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_numbers() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #5 input at line 44@45'::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::pc - .line 45,45 : 9,28 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #5 input at line 44@45'::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #5 input at line 44@45'::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 45,45 : 9,28 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 45,45 : 9,12 '' + IL_0025: nop + .line 45,45 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_numbers() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #5 input at line 44@45'::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #5 input at line 44@45'::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #5 input at line 44@45'::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 46,46 : 9,26 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::pc - .line 45,45 : 9,28 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #5 input at line 44@45'::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #5 input at line 44@45'::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::pc - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #5 input at line 44@45'::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #5 input at line 44@45'::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::pc + IL_008c: ldarg.0 + IL_008d: ldc.i4.0 + IL_008e: stfld int32 Linq101Partitioning01/'Pipe #5 input at line 44@45'::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method 'Pipe #5 input at line 44@45'::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1280,7 +1271,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 45,45 : 9,28 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -1290,20 +1280,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method 'Pipe #5 input at line 44@45'::Close .method public strict virtual instance bool @@ -1459,7 +1447,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] int32 V_0, [1] int32 n) @@ -1476,78 +1464,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 52,52 : 9,28 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_numbers() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #6 input at line 51@52'::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::pc - .line 52,52 : 9,28 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #6 input at line 51@52'::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #6 input at line 51@52'::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 52,52 : 9,28 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 52,52 : 9,12 '' + IL_0025: nop + .line 52,52 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_numbers() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #6 input at line 51@52'::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #6 input at line 51@52'::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #6 input at line 51@52'::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 53,53 : 9,31 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::pc - .line 52,52 : 9,28 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #6 input at line 51@52'::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #6 input at line 51@52'::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::pc - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #6 input at line 51@52'::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Partitioning01/'Pipe #6 input at line 51@52'::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::pc + IL_008c: ldarg.0 + IL_008d: ldc.i4.0 + IL_008e: stfld int32 Linq101Partitioning01/'Pipe #6 input at line 51@52'::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method 'Pipe #6 input at line 51@52'::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1620,7 +1607,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 52,52 : 9,28 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -1630,20 +1616,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method 'Pipe #6 input at line 51@52'::Close .method public strict virtual instance bool @@ -1974,6 +1958,7 @@ .line 11,11 : 5,10 '' IL_004a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_004f: stloc.s V_9 + .line 11,11 : 5,10 '' IL_0051: ldloc.s V_9 IL_0053: ldnull IL_0054: ldc.i4.0 @@ -2003,8 +1988,10 @@ .line 19,19 : 5,10 '' IL_0088: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_008d: stloc.s V_11 + .line 19,19 : 5,10 '' IL_008f: ldloc.s V_11 IL_0091: ldloc.s V_11 + .line 20,20 : 9,12 '' IL_0093: ldloc.s V_11 IL_0095: ldloc.s V_11 IL_0097: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_customers() @@ -2032,6 +2019,7 @@ .line 28,28 : 5,10 '' IL_00d7: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00dc: stloc.s V_13 + .line 28,28 : 5,10 '' IL_00de: ldloc.s V_13 IL_00e0: ldnull IL_00e1: ldc.i4.0 @@ -2056,8 +2044,10 @@ .line 35,35 : 5,10 '' IL_010a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_010f: stloc.s V_15 + .line 35,35 : 5,10 '' IL_0111: ldloc.s V_15 IL_0113: ldloc.s V_15 + .line 36,36 : 9,12 '' IL_0115: ldloc.s V_15 IL_0117: ldloc.s V_15 IL_0119: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_customers() @@ -2091,6 +2081,7 @@ .line 44,44 : 5,10 '' IL_0164: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0169: stloc.s V_18 + .line 44,44 : 5,10 '' IL_016b: ldloc.s V_18 IL_016d: ldnull IL_016e: ldc.i4.0 @@ -2115,6 +2106,7 @@ .line 51,51 : 5,10 '' IL_019b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_01a0: stloc.s V_20 + .line 51,51 : 5,10 '' IL_01a2: ldloc.s V_20 IL_01a4: ldnull IL_01a5: ldc.i4.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl index d0dcf614bd4..8aaf191bd35 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.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 extern Utils { @@ -45,13 +45,13 @@ // Offset: 0x00000398 Length: 0x000000FF } .module Linq101Quantifiers01.exe -// MVID: {611C4D82-76DD-E373-A745-0383824D1C61} +// MVID: {61E07032-76DD-E373-A745-03833270E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x071A0000 +// Image base: 0x06950000 // =============== CLASS MEMBERS DECLARATION =================== @@ -100,7 +100,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] string V_0, [1] string w) @@ -118,78 +118,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 12,12 : 9,26 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_words() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Quantifiers01/iAfterE@12::pc - .line 12,12 : 9,26 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 12,12 : 9,26 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 12,12 : 9,12 '' + IL_0025: nop + .line 12,12 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_words() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 13,13 : 9,34 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Quantifiers01/iAfterE@12::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld string Linq101Quantifiers01/iAfterE@12::current - IL_0065: ldc.i4.1 - IL_0066: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld string Linq101Quantifiers01/iAfterE@12::current + IL_0066: ldc.i4.1 + IL_0067: ret .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Quantifiers01/iAfterE@12::pc - .line 12,12 : 9,26 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Quantifiers01/iAfterE@12::pc - IL_008b: ldarg.0 - IL_008c: ldnull - IL_008d: stfld string Linq101Quantifiers01/iAfterE@12::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/iAfterE@12::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Quantifiers01/iAfterE@12::pc + IL_008c: ldarg.0 + IL_008d: ldnull + IL_008e: stfld string Linq101Quantifiers01/iAfterE@12::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method iAfterE@12::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -262,7 +261,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 12,12 : 9,26 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -272,20 +270,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method iAfterE@12::Close .method public strict virtual instance bool @@ -429,7 +425,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [Utils]Utils/Product p) - .line 21,21 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 22,22 : 9,32 '' @@ -549,9 +545,10 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g) - .line 22,22 : 38,39 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 + .line 23,23 : 9,51 '' IL_0002: ldarg.0 IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Quantifiers01/'Pipe #1 input at line 20@22-3'::builder@ IL_0008: ldloc.0 @@ -706,7 +703,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] int32 V_0, [1] int32 n) @@ -723,78 +720,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 32,32 : 9,28 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_numbers() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc - .line 32,32 : 9,28 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 32,32 : 9,28 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 32,32 : 9,12 '' + IL_0025: nop + .line 32,32 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_numbers() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 33,33 : 9,24 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld int32 Linq101Quantifiers01/onlyOdd@32::current - IL_0065: ldc.i4.1 - IL_0066: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld int32 Linq101Quantifiers01/onlyOdd@32::current + IL_0066: ldc.i4.1 + IL_0067: ret .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc - .line 32,32 : 9,28 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101Quantifiers01/onlyOdd@32::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Quantifiers01/onlyOdd@32::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101Quantifiers01/onlyOdd@32::pc + IL_008c: ldarg.0 + IL_008d: ldc.i4.0 + IL_008e: stfld int32 Linq101Quantifiers01/onlyOdd@32::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method onlyOdd@32::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -867,7 +863,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 32,32 : 9,28 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -877,20 +872,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method onlyOdd@32::Close .method public strict virtual instance bool @@ -1036,7 +1029,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [Utils]Utils/Product p) - .line 39,39 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 40,40 : 9,32 '' @@ -1156,9 +1149,10 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g) - .line 40,40 : 38,39 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 + .line 41,41 : 9,51 '' IL_0002: ldarg.0 IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Quantifiers01/'Pipe #2 input at line 38@40-3'::builder@ IL_0008: ldloc.0 @@ -1402,7 +1396,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 417 (0x1a1) + // Code size 419 (0x1a3) .maxstack 10 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 words, [1] bool iAfterE, @@ -1432,146 +1426,156 @@ IL_002d: dup IL_002e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::words@8 IL_0033: stloc.0 - IL_0034: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0039: ldnull - IL_003a: ldc.i4.0 - IL_003b: ldnull - IL_003c: newobj instance void Linq101Quantifiers01/iAfterE@12::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + .line 11,11 : 5,10 '' + IL_0034: nop + .line 11,11 : 5,10 '' + IL_0035: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_003a: ldnull + IL_003b: ldc.i4.0 + IL_003c: ldnull + IL_003d: newobj instance void Linq101Quantifiers01/iAfterE@12::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0041: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0046: ldsfld class Linq101Quantifiers01/'iAfterE@13-1' Linq101Quantifiers01/'iAfterE@13-1'::@_instance - IL_004b: callvirt instance bool [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Exists(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0042: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0047: ldsfld class Linq101Quantifiers01/'iAfterE@13-1' Linq101Quantifiers01/'iAfterE@13-1'::@_instance + IL_004c: callvirt instance bool [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Exists(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0050: dup - IL_0051: stsfld bool ''.$Linq101Quantifiers01::iAfterE@10 - IL_0056: stloc.1 + IL_0051: dup + IL_0052: stsfld bool ''.$Linq101Quantifiers01::iAfterE@10 + IL_0057: stloc.1 .line 17,17 : 1,32 '' - IL_0057: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() - IL_005c: dup - IL_005d: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::products@17 - IL_0062: stloc.2 + IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() + IL_005d: dup + IL_005e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::products@17 + IL_0063: stloc.2 .line 19,25 : 1,21 '' - IL_0063: nop + IL_0064: nop + .line 20,20 : 5,10 '' + IL_0065: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_006a: stloc.s V_8 .line 20,20 : 5,10 '' - IL_0064: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0069: stloc.s V_8 - IL_006b: ldloc.s V_8 - IL_006d: ldloc.s V_8 - IL_006f: ldloc.s V_8 - IL_0071: ldloc.s V_8 - IL_0073: ldloc.s V_8 - IL_0075: ldloc.s V_8 - IL_0077: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_products() - IL_007c: 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_0081: ldloc.s V_8 - IL_0083: newobj instance void Linq101Quantifiers01/'Pipe #1 input at line 20@21'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0088: 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_006c: ldloc.s V_8 + IL_006e: ldloc.s V_8 + IL_0070: ldloc.s V_8 + IL_0072: ldloc.s V_8 + .line 21,21 : 9,12 '' + IL_0074: ldloc.s V_8 + IL_0076: ldloc.s V_8 + IL_0078: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_products() + IL_007d: 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_0082: ldloc.s V_8 + IL_0084: newobj instance void Linq101Quantifiers01/'Pipe #1 input at line 20@21'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0089: 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_008d: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@22-1' Linq101Quantifiers01/'Pipe #1 input at line 20@22-1'::@_instance - IL_0092: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@22-2' Linq101Quantifiers01/'Pipe #1 input at line 20@22-2'::@_instance - IL_0097: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_008e: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@22-1' Linq101Quantifiers01/'Pipe #1 input at line 20@22-1'::@_instance + IL_0093: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@22-2' Linq101Quantifiers01/'Pipe #1 input at line 20@22-2'::@_instance + IL_0098: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_009c: ldloc.s V_8 - IL_009e: newobj instance void Linq101Quantifiers01/'Pipe #1 input at line 20@22-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_00a3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_009d: ldloc.s V_8 + IL_009f: newobj instance void Linq101Quantifiers01/'Pipe #1 input at line 20@22-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_00a4: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_00a8: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@23-4' Linq101Quantifiers01/'Pipe #1 input at line 20@23-4'::@_instance - IL_00ad: 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_00a9: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@23-4' Linq101Quantifiers01/'Pipe #1 input at line 20@23-4'::@_instance + IL_00ae: 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_00b2: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@24-6' Linq101Quantifiers01/'Pipe #1 input at line 20@24-6'::@_instance - IL_00b7: 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_00b3: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@24-6' Linq101Quantifiers01/'Pipe #1 input at line 20@24-6'::@_instance + IL_00b8: 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_00bc: 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_00c1: stloc.s 'Pipe #1 input at line 20' + IL_00bd: 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_00c2: stloc.s 'Pipe #1 input at line 20' .line 25,25 : 10,21 '' - IL_00c3: ldloc.s 'Pipe #1 input at line 20' - IL_00c5: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00ca: dup - IL_00cb: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups@19 - IL_00d0: stloc.3 + IL_00c4: ldloc.s 'Pipe #1 input at line 20' + IL_00c6: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00cb: dup + IL_00cc: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups@19 + IL_00d1: stloc.3 .line 28,28 : 1,35 '' - IL_00d1: ldc.i4.1 - IL_00d2: ldc.i4.s 11 - IL_00d4: ldc.i4.3 - IL_00d5: ldc.i4.s 19 - IL_00d7: ldc.i4.s 41 - IL_00d9: ldc.i4.s 65 - IL_00db: ldc.i4.s 19 - IL_00dd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_00e2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00d2: ldc.i4.1 + IL_00d3: ldc.i4.s 11 + IL_00d5: ldc.i4.3 + IL_00d6: ldc.i4.s 19 + IL_00d8: ldc.i4.s 41 + IL_00da: ldc.i4.s 65 + IL_00dc: ldc.i4.s 19 + IL_00de: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_00e3: 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_00e7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00e8: 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_00ec: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00ed: 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_00f1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00f2: 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_00f6: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00f7: 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_00fb: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00fc: 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_0100: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0101: 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_0105: dup - IL_0106: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::numbers@28 - IL_010b: stloc.s numbers - IL_010d: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0112: ldnull - IL_0113: ldc.i4.0 - IL_0114: ldc.i4.0 - IL_0115: newobj instance void Linq101Quantifiers01/onlyOdd@32::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0106: dup + IL_0107: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::numbers@28 + IL_010c: stloc.s numbers + .line 31,31 : 5,10 '' + IL_010e: nop + .line 31,31 : 5,10 '' + IL_010f: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0114: ldnull + IL_0115: ldc.i4.0 + IL_0116: ldc.i4.0 + IL_0117: newobj instance void Linq101Quantifiers01/onlyOdd@32::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_011a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_011f: ldsfld class Linq101Quantifiers01/'onlyOdd@33-1' Linq101Quantifiers01/'onlyOdd@33-1'::@_instance - IL_0124: callvirt instance bool [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::All(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_011c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0121: ldsfld class Linq101Quantifiers01/'onlyOdd@33-1' Linq101Quantifiers01/'onlyOdd@33-1'::@_instance + IL_0126: callvirt instance bool [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::All(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0129: dup - IL_012a: stsfld bool ''.$Linq101Quantifiers01::onlyOdd@30 - IL_012f: stloc.s onlyOdd + IL_012b: dup + IL_012c: stsfld bool ''.$Linq101Quantifiers01::onlyOdd@30 + IL_0131: stloc.s onlyOdd .line 37,43 : 1,21 '' - IL_0131: nop + IL_0133: nop + .line 38,38 : 5,10 '' + IL_0134: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0139: stloc.s V_10 .line 38,38 : 5,10 '' - IL_0132: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0137: stloc.s V_10 - IL_0139: ldloc.s V_10 IL_013b: ldloc.s V_10 IL_013d: ldloc.s V_10 IL_013f: ldloc.s V_10 IL_0141: ldloc.s V_10 + .line 39,39 : 9,12 '' IL_0143: ldloc.s V_10 - IL_0145: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_products() - IL_014a: 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_014f: ldloc.s V_10 - IL_0151: newobj instance void Linq101Quantifiers01/'Pipe #2 input at line 38@39'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0156: 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_0145: ldloc.s V_10 + IL_0147: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_products() + IL_014c: 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_0151: ldloc.s V_10 + IL_0153: newobj instance void Linq101Quantifiers01/'Pipe #2 input at line 38@39'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0158: 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_015b: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@40-1' Linq101Quantifiers01/'Pipe #2 input at line 38@40-1'::@_instance - IL_0160: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@40-2' Linq101Quantifiers01/'Pipe #2 input at line 38@40-2'::@_instance - IL_0165: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_015d: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@40-1' Linq101Quantifiers01/'Pipe #2 input at line 38@40-1'::@_instance + IL_0162: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@40-2' Linq101Quantifiers01/'Pipe #2 input at line 38@40-2'::@_instance + IL_0167: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_016a: ldloc.s V_10 - IL_016c: newobj instance void Linq101Quantifiers01/'Pipe #2 input at line 38@40-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0171: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_016c: ldloc.s V_10 + IL_016e: newobj instance void Linq101Quantifiers01/'Pipe #2 input at line 38@40-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0173: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0176: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@41-4' Linq101Quantifiers01/'Pipe #2 input at line 38@41-4'::@_instance - IL_017b: 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_0178: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@41-4' Linq101Quantifiers01/'Pipe #2 input at line 38@41-4'::@_instance + IL_017d: 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_0180: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@42-6' Linq101Quantifiers01/'Pipe #2 input at line 38@42-6'::@_instance - IL_0185: 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_0182: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@42-6' Linq101Quantifiers01/'Pipe #2 input at line 38@42-6'::@_instance + IL_0187: 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_018a: 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_018f: stloc.s 'Pipe #2 input at line 38' + IL_018c: 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_0191: stloc.s 'Pipe #2 input at line 38' .line 43,43 : 10,21 '' - IL_0191: ldloc.s 'Pipe #2 input at line 38' - IL_0193: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0198: dup - IL_0199: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups2@37 - IL_019e: stloc.s productGroups2 - IL_01a0: ret + IL_0193: ldloc.s 'Pipe #2 input at line 38' + IL_0195: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_019a: dup + IL_019b: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups2@37 + IL_01a0: stloc.s productGroups2 + IL_01a2: ret } // end of method $Linq101Quantifiers01::main@ } // end of class ''.$Linq101Quantifiers01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl index cfcb02aa149..cba88c3ee1b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.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 extern Utils { @@ -45,13 +45,13 @@ // Offset: 0x00000648 Length: 0x00000204 } .module Linq101Select01.exe -// MVID: {611C5DB0-6057-8F80-A745-0383B05D1C61} +// MVID: {61EFEE20-6057-8F80-A745-038320EEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05540000 +// Image base: 0x05190000 // =============== CLASS MEMBERS DECLARATION =================== @@ -83,7 +83,7 @@ .maxstack 5 .locals init ([0] int32 n) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 12,12 : 9,28 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Select01.fs' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Select01.fs' IL_0000: ldarg.1 IL_0001: stloc.0 .line 13,13 : 9,23 '' @@ -175,6 +175,7 @@ IL_0024: nop .line 13,13 : 9,23 '' IL_0025: ldarg.0 + .line 12,12 : 9,12 '' IL_0026: ldsfld class Linq101Select01/'Pipe #1 input at line 11@12-1' Linq101Select01/'Pipe #1 input at line 11@12-1'::@_instance IL_002b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbers() IL_0030: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, @@ -184,7 +185,6 @@ IL_003f: ldarg.0 IL_0040: ldc.i4.1 IL_0041: stfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::pc - .line 13,13 : 9,23 '' IL_0046: ldarg.0 IL_0047: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #1 input at line 11@13'::'enum' IL_004c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() @@ -194,11 +194,11 @@ IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #1 input at line 11@13'::'enum' IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() IL_005e: stloc.0 - .line 13,13 : 17,22 '' IL_005f: ldarg.0 IL_0060: ldc.i4.2 IL_0061: stfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::pc IL_0066: ldarg.0 + .line 13,13 : 17,22 '' IL_0067: ldloc.0 IL_0068: ldc.i4.1 IL_0069: add @@ -213,7 +213,6 @@ IL_0074: ldarg.0 IL_0075: ldc.i4.3 IL_0076: stfld int32 Linq101Select01/'Pipe #1 input at line 11@13'::pc - .line 13,13 : 9,23 '' IL_007b: ldarg.0 IL_007c: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #1 input at line 11@13'::'enum' IL_0081: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) @@ -234,7 +233,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -307,7 +306,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 13,13 : 9,23 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -317,20 +315,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method 'Pipe #1 input at line 11@13'::Close .method public strict virtual instance bool @@ -428,7 +424,7 @@ // Code size 11 (0xb) .maxstack 5 .locals init ([0] class [Utils]Utils/Product p) - .line 21,21 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 22,22 : 9,31 '' @@ -520,6 +516,7 @@ IL_0024: nop .line 22,22 : 9,31 '' IL_0025: ldarg.0 + .line 21,21 : 9,12 '' IL_0026: ldsfld class Linq101Select01/'productNames@21-1' Linq101Select01/'productNames@21-1'::@_instance IL_002b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_products() IL_0030: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,class [Utils]Utils/Product>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, @@ -529,7 +526,6 @@ IL_003f: ldarg.0 IL_0040: ldc.i4.1 IL_0041: stfld int32 Linq101Select01/productNames@22::pc - .line 22,22 : 9,31 '' IL_0046: ldarg.0 IL_0047: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' IL_004c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() @@ -539,11 +535,11 @@ IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() IL_005e: stloc.0 - .line 22,22 : 17,30 '' IL_005f: ldarg.0 IL_0060: ldc.i4.2 IL_0061: stfld int32 Linq101Select01/productNames@22::pc IL_0066: ldarg.0 + .line 22,22 : 17,30 '' IL_0067: ldloc.0 IL_0068: callvirt instance string [Utils]Utils/Product::get_ProductName() IL_006d: stfld string Linq101Select01/productNames@22::current @@ -557,7 +553,6 @@ IL_0077: ldarg.0 IL_0078: ldc.i4.3 IL_0079: stfld int32 Linq101Select01/productNames@22::pc - .line 22,22 : 9,31 '' IL_007e: ldarg.0 IL_007f: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/productNames@22::'enum' IL_0084: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) @@ -578,7 +573,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -651,7 +646,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 22,22 : 9,31 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -661,20 +655,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method productNames@22::Close .method public strict virtual instance bool @@ -772,7 +764,7 @@ // Code size 11 (0xb) .maxstack 5 .locals init ([0] int32 n) - .line 29,29 : 9,28 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 30,30 : 9,29 '' @@ -864,6 +856,7 @@ IL_0024: nop .line 30,30 : 9,29 '' IL_0025: ldarg.0 + .line 29,29 : 9,12 '' IL_0026: ldsfld class Linq101Select01/'Pipe #2 input at line 28@29-1' Linq101Select01/'Pipe #2 input at line 28@29-1'::@_instance IL_002b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbers() IL_0030: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, @@ -873,7 +866,6 @@ IL_003f: ldarg.0 IL_0040: ldc.i4.1 IL_0041: stfld int32 Linq101Select01/'Pipe #2 input at line 28@30'::pc - .line 30,30 : 9,29 '' IL_0046: ldarg.0 IL_0047: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #2 input at line 28@30'::'enum' IL_004c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() @@ -883,11 +875,11 @@ IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #2 input at line 28@30'::'enum' IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() IL_005e: stloc.0 - .line 30,30 : 17,28 '' IL_005f: ldarg.0 IL_0060: ldc.i4.2 IL_0061: stfld int32 Linq101Select01/'Pipe #2 input at line 28@30'::pc IL_0066: ldarg.0 + .line 30,30 : 17,28 '' IL_0067: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_strings() IL_006c: ldloc.0 IL_006d: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Item(int32) @@ -902,7 +894,6 @@ IL_007c: ldarg.0 IL_007d: ldc.i4.3 IL_007e: stfld int32 Linq101Select01/'Pipe #2 input at line 28@30'::pc - .line 30,30 : 9,29 '' IL_0083: ldarg.0 IL_0084: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #2 input at line 28@30'::'enum' IL_0089: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) @@ -923,7 +914,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -996,7 +987,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 30,30 : 9,29 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -1006,20 +996,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method 'Pipe #2 input at line 28@30'::Close .method public strict virtual instance bool @@ -1117,7 +1105,7 @@ // Code size 11 (0xb) .maxstack 5 .locals init ([0] string w) - .line 38,38 : 8,25 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 39,39 : 8,41 '' @@ -1209,6 +1197,7 @@ IL_0027: nop .line 39,39 : 8,41 '' IL_0028: ldarg.0 + .line 38,38 : 8,11 '' IL_0029: ldsfld class Linq101Select01/'Pipe #3 input at line 37@38-1' Linq101Select01/'Pipe #3 input at line 37@38-1'::@_instance IL_002e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_words() IL_0033: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,string>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, @@ -1218,7 +1207,6 @@ IL_0042: ldarg.0 IL_0043: ldc.i4.1 IL_0044: stfld int32 Linq101Select01/'Pipe #3 input at line 37@39'::pc - .line 39,39 : 8,41 '' IL_0049: ldarg.0 IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #3 input at line 37@39'::'enum' IL_004f: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() @@ -1228,11 +1216,11 @@ IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #3 input at line 37@39'::'enum' IL_005c: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() IL_0061: stloc.0 - .line 39,39 : 16,40 '' IL_0062: ldarg.0 IL_0063: ldc.i4.2 IL_0064: stfld int32 Linq101Select01/'Pipe #3 input at line 37@39'::pc IL_0069: ldarg.0 + .line 39,39 : 16,40 '' IL_006a: ldloc.0 IL_006b: callvirt instance string [mscorlib]System.String::ToUpper() IL_0070: ldloc.0 @@ -1250,7 +1238,6 @@ IL_0085: ldarg.0 IL_0086: ldc.i4.3 IL_0087: stfld int32 Linq101Select01/'Pipe #3 input at line 37@39'::pc - .line 39,39 : 8,41 '' IL_008c: ldarg.0 IL_008d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #3 input at line 37@39'::'enum' IL_0092: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) @@ -1271,7 +1258,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1344,7 +1331,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 39,39 : 8,41 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -1354,20 +1340,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method 'Pipe #3 input at line 37@39'::Close .method public strict virtual instance bool @@ -1465,7 +1449,7 @@ // Code size 11 (0xb) .maxstack 5 .locals init ([0] int32 n) - .line 45,45 : 9,28 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 46,46 : 9,42 '' @@ -1557,6 +1541,7 @@ IL_0027: nop .line 46,46 : 9,42 '' IL_0028: ldarg.0 + .line 45,45 : 9,12 '' IL_0029: ldsfld class Linq101Select01/'Pipe #4 input at line 44@45-1' Linq101Select01/'Pipe #4 input at line 44@45-1'::@_instance IL_002e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbers() IL_0033: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,int32>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, @@ -1566,7 +1551,6 @@ IL_0042: ldarg.0 IL_0043: ldc.i4.1 IL_0044: stfld int32 Linq101Select01/'Pipe #4 input at line 44@46'::pc - .line 46,46 : 9,42 '' IL_0049: ldarg.0 IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #4 input at line 44@46'::'enum' IL_004f: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() @@ -1576,11 +1560,11 @@ IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #4 input at line 44@46'::'enum' IL_005c: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() IL_0061: stloc.0 - .line 46,46 : 17,41 '' IL_0062: ldarg.0 IL_0063: ldc.i4.2 IL_0064: stfld int32 Linq101Select01/'Pipe #4 input at line 44@46'::pc IL_0069: ldarg.0 + .line 46,46 : 17,41 '' IL_006a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_strings() IL_006f: ldloc.0 IL_0070: callvirt instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Item(int32) @@ -1602,7 +1586,6 @@ IL_008a: ldarg.0 IL_008b: ldc.i4.3 IL_008c: stfld int32 Linq101Select01/'Pipe #4 input at line 44@46'::pc - .line 46,46 : 9,42 '' IL_0091: ldarg.0 IL_0092: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #4 input at line 44@46'::'enum' IL_0097: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) @@ -1623,7 +1606,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1696,7 +1679,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 46,46 : 9,42 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -1706,20 +1688,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method 'Pipe #4 input at line 44@46'::Close .method public strict virtual instance bool @@ -1817,7 +1797,7 @@ // Code size 11 (0xb) .maxstack 5 .locals init ([0] class [Utils]Utils/Product p) - .line 52,52 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 53,53 : 9,56 '' @@ -1909,6 +1889,7 @@ IL_0027: nop .line 53,53 : 9,56 '' IL_0028: ldarg.0 + .line 52,52 : 9,12 '' IL_0029: ldsfld class Linq101Select01/'Pipe #5 input at line 51@52-1' Linq101Select01/'Pipe #5 input at line 51@52-1'::@_instance IL_002e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_products() IL_0033: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,class [Utils]Utils/Product>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, @@ -1918,7 +1899,6 @@ IL_0042: ldarg.0 IL_0043: ldc.i4.1 IL_0044: stfld int32 Linq101Select01/'Pipe #5 input at line 51@53'::pc - .line 53,53 : 9,56 '' IL_0049: ldarg.0 IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #5 input at line 51@53'::'enum' IL_004f: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() @@ -1928,11 +1908,11 @@ IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #5 input at line 51@53'::'enum' IL_005c: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() IL_0061: stloc.0 - .line 53,53 : 17,55 '' IL_0062: ldarg.0 IL_0063: ldc.i4.2 IL_0064: stfld int32 Linq101Select01/'Pipe #5 input at line 51@53'::pc IL_0069: ldarg.0 + .line 53,53 : 17,55 '' IL_006a: ldloc.0 IL_006b: callvirt instance string [Utils]Utils/Product::get_ProductName() IL_0070: ldloc.0 @@ -1953,7 +1933,6 @@ IL_008b: ldarg.0 IL_008c: ldc.i4.3 IL_008d: stfld int32 Linq101Select01/'Pipe #5 input at line 51@53'::pc - .line 53,53 : 9,56 '' IL_0092: ldarg.0 IL_0093: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Select01/'Pipe #5 input at line 51@53'::'enum' IL_0098: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) @@ -1974,7 +1953,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -2047,7 +2026,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 53,53 : 9,56 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -2057,20 +2035,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method 'Pipe #5 input at line 51@53'::Close .method public strict virtual instance bool @@ -2174,7 +2150,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] int32 n) - .line 60,60 : 9,28 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 61,61 : 9,22 '' @@ -2302,7 +2278,7 @@ // Code size 28 (0x1c) .maxstack 7 .locals init ([0] int32 b) - .line 73,73 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 74,74 : 9,22 '' @@ -2348,10 +2324,10 @@ // Code size 44 (0x2c) .maxstack 8 .locals init ([0] int32 a) - .line 72,72 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 - .line 73,73 : 9,29 '' + .line 73,73 : 9,12 '' IL_0002: ldarg.0 IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #7 input at line 71@72'::builder@ IL_0008: ldarg.0 @@ -2503,7 +2479,7 @@ // Code size 28 (0x1c) .maxstack 7 .locals init ([0] class [Utils]Utils/Order o) - .line 83,83 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 84,84 : 9,34 '' @@ -2549,10 +2525,10 @@ // Code size 45 (0x2d) .maxstack 8 .locals init ([0] class [Utils]Utils/Customer c) - .line 82,82 : 9,30 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 - .line 83,83 : 9,29 '' + .line 83,83 : 9,12 '' IL_0002: ldarg.0 IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #8 input at line 81@82'::builder@ IL_0008: ldarg.0 @@ -2721,7 +2697,7 @@ // Code size 28 (0x1c) .maxstack 7 .locals init ([0] class [Utils]Utils/Order o) - .line 92,92 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 93,93 : 9,51 '' @@ -2767,10 +2743,10 @@ // Code size 45 (0x2d) .maxstack 8 .locals init ([0] class [Utils]Utils/Customer c) - .line 91,91 : 9,30 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 - .line 92,92 : 9,29 '' + .line 92,92 : 9,12 '' IL_0002: ldarg.0 IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'Pipe #9 input at line 90@91'::builder@ IL_0008: ldarg.0 @@ -2945,7 +2921,7 @@ // Code size 28 (0x1c) .maxstack 7 .locals init ([0] class [Utils]Utils/Order o) - .line 101,101 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 102,102 : 9,35 '' @@ -2991,10 +2967,10 @@ // Code size 45 (0x2d) .maxstack 8 .locals init ([0] class [Utils]Utils/Customer c) - .line 100,100 : 9,30 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 - .line 101,101 : 9,29 '' + .line 101,101 : 9,12 '' IL_0002: ldarg.0 IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/orders3@100::builder@ IL_0008: ldarg.0 @@ -3158,7 +3134,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [Utils]Utils/Customer c) - .line 111,111 : 9,30 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 112,112 : 9,32 '' @@ -3247,7 +3223,7 @@ // Code size 28 (0x1c) .maxstack 7 .locals init ([0] class [Utils]Utils/Order o) - .line 113,113 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 114,114 : 9,42 '' @@ -3293,9 +3269,10 @@ // Code size 45 (0x2d) .maxstack 8 .locals init ([0] class [Utils]Utils/Customer c) - .line 111,111 : 13,14 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 + .line 113,113 : 9,12 '' IL_0002: ldarg.0 IL_0003: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Select01/'orders4@111-2'::builder@ IL_0008: ldarg.0 @@ -3884,6 +3861,7 @@ .line 11,11 : 5,10 '' IL_004a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_004f: stloc.s V_22 + .line 11,11 : 5,10 '' IL_0051: ldnull IL_0052: ldc.i4.0 IL_0053: ldc.i4.0 @@ -3902,8 +3880,10 @@ IL_006e: dup IL_006f: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::products@17 IL_0074: stloc.2 + .line 20,20 : 5,10 '' IL_0075: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_007a: stloc.s V_23 + .line 20,20 : 5,10 '' IL_007c: ldnull IL_007d: ldc.i4.0 IL_007e: ldnull @@ -3953,6 +3933,7 @@ .line 28,28 : 5,10 '' IL_00fd: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0102: stloc.s V_25 + .line 28,28 : 5,10 '' IL_0104: ldnull IL_0105: ldc.i4.0 IL_0106: ldnull @@ -3985,6 +3966,7 @@ .line 37,37 : 4,9 '' IL_0149: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_014e: stloc.s V_27 + .line 37,37 : 4,9 '' IL_0150: ldnull IL_0151: ldc.i4.0 IL_0152: ldnull @@ -4003,6 +3985,7 @@ .line 44,44 : 5,10 '' IL_016a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_016f: stloc.s V_29 + .line 44,44 : 5,10 '' IL_0171: ldnull IL_0172: ldc.i4.0 IL_0173: ldnull @@ -4021,6 +4004,7 @@ .line 51,51 : 5,10 '' IL_018b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0190: stloc.s V_31 + .line 51,51 : 5,10 '' IL_0192: ldnull IL_0193: ldc.i4.0 IL_0194: ldnull @@ -4044,8 +4028,10 @@ .line 59,59 : 5,10 '' IL_01b9: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_01be: stloc.s V_33 + .line 59,59 : 5,10 '' IL_01c0: ldloc.s V_33 IL_01c2: ldloc.s V_33 + .line 60,60 : 9,12 '' IL_01c4: ldloc.s V_33 IL_01c6: ldloc.s V_33 IL_01c8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbers() @@ -4165,8 +4151,10 @@ .line 71,71 : 5,10 '' IL_02db: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_02e0: stloc.s V_37 + .line 71,71 : 5,10 '' IL_02e2: ldloc.s V_37 IL_02e4: ldloc.s V_37 + .line 72,72 : 9,12 '' 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() @@ -4199,8 +4187,10 @@ .line 81,81 : 5,10 '' IL_0338: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_033d: stloc.s V_39 + .line 81,81 : 5,10 '' IL_033f: ldloc.s V_39 IL_0341: ldloc.s V_39 + .line 82,82 : 9,12 '' 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() @@ -4228,8 +4218,10 @@ .line 90,90 : 5,10 '' IL_0388: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_038d: stloc.s V_41 + .line 90,90 : 5,10 '' IL_038f: ldloc.s V_41 IL_0391: ldloc.s V_41 + .line 91,91 : 9,12 '' 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() @@ -4252,10 +4244,13 @@ IL_03cf: dup IL_03d0: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::orders2@89 IL_03d5: stloc.s orders2 + .line 99,99 : 5,10 '' IL_03d7: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_03dc: stloc.s V_42 + .line 99,99 : 5,10 '' IL_03de: ldloc.s V_42 IL_03e0: ldloc.s V_42 + .line 100,100 : 9,12 '' 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() @@ -4284,12 +4279,15 @@ IL_0429: dup IL_042a: stsfld valuetype [mscorlib]System.DateTime ''.$Linq101Select01::cutOffDate@107 IL_042f: stloc.s cutOffDate + .line 110,110 : 5,10 '' IL_0431: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0436: stloc.s V_43 + .line 110,110 : 5,10 '' IL_0438: ldloc.s V_43 IL_043a: ldloc.s V_43 IL_043c: ldloc.s V_43 IL_043e: ldloc.s V_43 + .line 111,111 : 9,12 '' 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() diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl index a87b2b30b88..dca9f90cc1f 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.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 extern Utils { @@ -45,13 +45,13 @@ // Offset: 0x00000390 Length: 0x0000011E } .module Linq101SetOperators01.exe -// MVID: {611C4D82-4EE5-349F-A745-0383824D1C61} +// MVID: {61E07032-4EE5-349F-A745-03833270E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06410000 +// Image base: 0x07380000 // =============== CLASS MEMBERS DECLARATION =================== @@ -100,7 +100,7 @@ .method public strict virtual instance int32 GenerateNext(class [mscorlib]System.Collections.Generic.IEnumerable`1& next) cil managed { - // Code size 148 (0x94) + // Code size 149 (0x95) .maxstack 6 .locals init ([0] int32 V_0, [1] int32 n) @@ -118,78 +118,77 @@ .line 100001,100001 : 0,0 '' IL_001b: nop - IL_001c: br.s IL_006a + IL_001c: br.s IL_006b .line 100001,100001 : 0,0 '' IL_001e: nop - IL_001f: br.s IL_0067 + IL_001f: br.s IL_0068 .line 100001,100001 : 0,0 '' IL_0021: nop - IL_0022: br.s IL_008b + IL_0022: br.s IL_008c .line 100001,100001 : 0,0 '' IL_0024: nop - .line 13,13 : 9,33 '' - IL_0025: ldarg.0 - IL_0026: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101SetOperators01::get_factorsOf300() - IL_002b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0030: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #1 input at line 12@13'::'enum' - IL_0035: ldarg.0 - IL_0036: ldc.i4.1 - IL_0037: stfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::pc - .line 13,13 : 9,33 '' - IL_003c: ldarg.0 - IL_003d: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #1 input at line 12@13'::'enum' - IL_0042: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0047: brfalse.s IL_006a - - IL_0049: ldarg.0 - IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #1 input at line 12@13'::'enum' - IL_004f: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0054: stloc.0 - .line 13,13 : 9,33 '' - IL_0055: ldloc.0 - IL_0056: stloc.1 + .line 13,13 : 9,12 '' + IL_0025: nop + .line 13,13 : 9,12 '' + IL_0026: ldarg.0 + IL_0027: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101SetOperators01::get_factorsOf300() + IL_002c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0031: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #1 input at line 12@13'::'enum' + IL_0036: ldarg.0 + IL_0037: ldc.i4.1 + IL_0038: stfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::pc + IL_003d: ldarg.0 + IL_003e: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #1 input at line 12@13'::'enum' + IL_0043: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0048: brfalse.s IL_006b + + IL_004a: ldarg.0 + IL_004b: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #1 input at line 12@13'::'enum' + IL_0050: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0055: stloc.0 + IL_0056: ldloc.0 + IL_0057: stloc.1 .line 14,14 : 9,17 '' - IL_0057: ldarg.0 - IL_0058: ldc.i4.2 - IL_0059: stfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::pc - IL_005e: ldarg.0 - IL_005f: ldloc.1 - IL_0060: stfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::current - IL_0065: ldc.i4.1 - IL_0066: ret - - .line 100001,100001 : 0,0 '' - IL_0067: nop - IL_0068: br.s IL_003c - - IL_006a: ldarg.0 - IL_006b: ldc.i4.3 - IL_006c: stfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::pc - .line 13,13 : 9,33 '' - IL_0071: ldarg.0 - IL_0072: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #1 input at line 12@13'::'enum' - IL_0077: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_007c: nop - IL_007d: ldarg.0 - IL_007e: ldnull - IL_007f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #1 input at line 12@13'::'enum' - IL_0084: ldarg.0 - IL_0085: ldc.i4.3 - IL_0086: stfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::pc - IL_008b: ldarg.0 - IL_008c: ldc.i4.0 - IL_008d: stfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::current - IL_0092: ldc.i4.0 - IL_0093: ret + IL_0058: ldarg.0 + IL_0059: ldc.i4.2 + IL_005a: stfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::pc + IL_005f: ldarg.0 + IL_0060: ldloc.1 + IL_0061: stfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::current + IL_0066: ldc.i4.1 + IL_0067: ret + + .line 100001,100001 : 0,0 '' + IL_0068: nop + IL_0069: br.s IL_003d + + IL_006b: ldarg.0 + IL_006c: ldc.i4.3 + IL_006d: stfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::pc + IL_0072: ldarg.0 + IL_0073: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #1 input at line 12@13'::'enum' + IL_0078: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) + IL_007d: nop + IL_007e: ldarg.0 + IL_007f: ldnull + IL_0080: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #1 input at line 12@13'::'enum' + IL_0085: ldarg.0 + IL_0086: ldc.i4.3 + IL_0087: stfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::pc + IL_008c: ldarg.0 + IL_008d: ldc.i4.0 + IL_008e: stfld int32 Linq101SetOperators01/'Pipe #1 input at line 12@13'::current + IL_0093: ldc.i4.0 + IL_0094: ret } // end of method 'Pipe #1 input at line 12@13'::GenerateNext .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -262,7 +261,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 13,13 : 9,33 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -272,20 +270,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method 'Pipe #1 input at line 12@13'::Close .method public strict virtual instance bool @@ -383,7 +379,7 @@ // Code size 11 (0xb) .maxstack 5 .locals init ([0] class [Utils]Utils/Product p) - .line 22,22 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 23,23 : 9,26 '' @@ -475,6 +471,7 @@ IL_0024: nop .line 23,23 : 9,26 '' IL_0025: ldarg.0 + .line 22,22 : 9,12 '' IL_0026: ldsfld class Linq101SetOperators01/'Pipe #2 input at line 21@22-1' Linq101SetOperators01/'Pipe #2 input at line 21@22-1'::@_instance IL_002b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101SetOperators01::get_products() IL_0030: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,class [Utils]Utils/Product>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, @@ -484,7 +481,6 @@ IL_003f: ldarg.0 IL_0040: ldc.i4.1 IL_0041: stfld int32 Linq101SetOperators01/'Pipe #2 input at line 21@23'::pc - .line 23,23 : 9,26 '' IL_0046: ldarg.0 IL_0047: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #2 input at line 21@23'::'enum' IL_004c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() @@ -494,11 +490,11 @@ IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #2 input at line 21@23'::'enum' IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() IL_005e: stloc.0 - .line 23,23 : 16,26 '' IL_005f: ldarg.0 IL_0060: ldc.i4.2 IL_0061: stfld int32 Linq101SetOperators01/'Pipe #2 input at line 21@23'::pc IL_0066: ldarg.0 + .line 23,23 : 16,26 '' IL_0067: ldloc.0 IL_0068: callvirt instance string [Utils]Utils/Product::get_Category() IL_006d: stfld string Linq101SetOperators01/'Pipe #2 input at line 21@23'::current @@ -512,7 +508,6 @@ IL_0077: ldarg.0 IL_0078: ldc.i4.3 IL_0079: stfld int32 Linq101SetOperators01/'Pipe #2 input at line 21@23'::pc - .line 23,23 : 9,26 '' IL_007e: ldarg.0 IL_007f: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/'Pipe #2 input at line 21@23'::'enum' IL_0084: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) @@ -533,7 +528,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -606,7 +601,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 23,23 : 9,26 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -616,20 +610,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method 'Pipe #2 input at line 21@23'::Close .method public strict virtual instance bool @@ -727,7 +719,7 @@ // Code size 11 (0xb) .maxstack 5 .locals init ([0] class [Utils]Utils/Product p) - .line 32,32 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 33,33 : 9,33 '' @@ -819,6 +811,7 @@ IL_0027: nop .line 33,33 : 9,33 '' IL_0028: ldarg.0 + .line 32,32 : 9,12 '' IL_0029: ldsfld class Linq101SetOperators01/'productFirstChars@32-1' Linq101SetOperators01/'productFirstChars@32-1'::@_instance IL_002e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101SetOperators01::get_products() IL_0033: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,class [Utils]Utils/Product>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, @@ -828,7 +821,6 @@ IL_0042: ldarg.0 IL_0043: ldc.i4.1 IL_0044: stfld int32 Linq101SetOperators01/productFirstChars@33::pc - .line 33,33 : 9,33 '' IL_0049: ldarg.0 IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' IL_004f: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() @@ -838,11 +830,11 @@ IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' IL_005c: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() IL_0061: stloc.0 - .line 33,33 : 16,33 '' IL_0062: ldarg.0 IL_0063: ldc.i4.2 IL_0064: stfld int32 Linq101SetOperators01/productFirstChars@33::pc IL_0069: ldarg.0 + .line 33,33 : 16,33 '' IL_006a: ldloc.0 IL_006b: callvirt instance string [Utils]Utils/Product::get_ProductName() IL_0070: ldc.i4.0 @@ -858,7 +850,6 @@ IL_0080: ldarg.0 IL_0081: ldc.i4.3 IL_0082: stfld int32 Linq101SetOperators01/productFirstChars@33::pc - .line 33,33 : 9,33 '' IL_0087: ldarg.0 IL_0088: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/productFirstChars@33::'enum' IL_008d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) @@ -879,7 +870,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -952,7 +943,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 33,33 : 9,33 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -962,20 +952,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method productFirstChars@33::Close .method public strict virtual instance bool @@ -1073,7 +1061,7 @@ // Code size 11 (0xb) .maxstack 5 .locals init ([0] class [Utils]Utils/Customer c) - .line 38,38 : 9,30 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 39,39 : 9,33 '' @@ -1165,6 +1153,7 @@ IL_0027: nop .line 39,39 : 9,33 '' IL_0028: ldarg.0 + .line 38,38 : 9,12 '' IL_0029: ldsfld class Linq101SetOperators01/'customerFirstChars@38-1' Linq101SetOperators01/'customerFirstChars@38-1'::@_instance IL_002e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101SetOperators01::get_customers() IL_0033: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,class [Utils]Utils/Customer>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, @@ -1174,7 +1163,6 @@ IL_0042: ldarg.0 IL_0043: ldc.i4.1 IL_0044: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc - .line 39,39 : 9,33 '' IL_0049: ldarg.0 IL_004a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' IL_004f: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() @@ -1184,11 +1172,11 @@ IL_0057: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' IL_005c: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() IL_0061: stloc.0 - .line 39,39 : 16,33 '' IL_0062: ldarg.0 IL_0063: ldc.i4.2 IL_0064: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc IL_0069: ldarg.0 + .line 39,39 : 16,33 '' IL_006a: ldloc.0 IL_006b: callvirt instance string [Utils]Utils/Customer::get_CompanyName() IL_0070: ldc.i4.0 @@ -1204,7 +1192,6 @@ IL_0080: ldarg.0 IL_0081: ldc.i4.3 IL_0082: stfld int32 Linq101SetOperators01/customerFirstChars@39::pc - .line 39,39 : 9,33 '' IL_0087: ldarg.0 IL_0088: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101SetOperators01/customerFirstChars@39::'enum' IL_008d: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) @@ -1225,7 +1212,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -1298,7 +1285,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 39,39 : 9,33 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -1308,20 +1294,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method customerFirstChars@39::Close .method public strict virtual instance bool @@ -1568,6 +1552,7 @@ .line 12,12 : 5,10 '' IL_002b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0030: stloc.s V_8 + .line 12,12 : 5,10 '' IL_0032: ldloc.s V_8 IL_0034: ldnull IL_0035: ldc.i4.0 @@ -1595,6 +1580,7 @@ .line 21,21 : 5,10 '' IL_0068: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_006d: stloc.s V_10 + .line 21,21 : 5,10 '' IL_006f: ldloc.s V_10 IL_0071: ldnull IL_0072: ldc.i4.0 @@ -1617,8 +1603,10 @@ IL_009d: dup IL_009e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::customers@28 IL_00a3: stloc.s customers + .line 31,31 : 5,10 '' IL_00a5: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00aa: stloc.s V_11 + .line 31,31 : 5,10 '' IL_00ac: ldnull IL_00ad: ldc.i4.0 IL_00ae: ldc.i4.0 @@ -1628,8 +1616,10 @@ IL_00b4: dup IL_00b5: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101SetOperators01::productFirstChars@30 IL_00ba: stloc.s productFirstChars + .line 37,37 : 5,10 '' IL_00bc: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00c1: stloc.s V_12 + .line 37,37 : 5,10 '' IL_00c3: ldnull IL_00c4: ldc.i4.0 IL_00c5: ldc.i4.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl index 3f92cd859e8..0150bd6d17c 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.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 extern Utils { @@ -45,13 +45,13 @@ // Offset: 0x000003D0 Length: 0x0000012E } .module Linq101Where01.exe -// MVID: {611C4D82-FF23-CD21-A745-0383824D1C61} +// MVID: {61E07032-FF23-CD21-A745-03833270E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A30000 +// Image base: 0x071D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -89,7 +89,7 @@ .maxstack 6 .locals init ([0] int32 n) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 14,14 : 9,28 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Where01.fs' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\QueryExpressionStepping\\Linq101Where01.fs' IL_0000: ldarg.1 IL_0001: stloc.0 .line 15,15 : 9,22 '' @@ -209,7 +209,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [Utils]Utils/Product p) - .line 24,24 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 25,25 : 9,35 '' @@ -330,7 +330,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [Utils]Utils/Product p) - .line 32,32 : 9,29 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 33,33 : 9,58 '' @@ -473,7 +473,7 @@ // Code size 17 (0x11) .maxstack 6 .locals init ([0] class [Utils]Utils/Customer c) - .line 42,42 : 9,30 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 43,43 : 9,32 '' @@ -589,7 +589,7 @@ // Code size 11 (0xb) .maxstack 5 .locals init ([0] string d) - .line 51,51 : 9,27 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 .line 52,52 : 9,17 '' @@ -681,6 +681,7 @@ IL_0024: nop .line 52,52 : 9,17 '' IL_0025: ldarg.0 + .line 51,51 : 9,12 '' IL_0026: ldsfld class Linq101Where01/'Pipe #3 input at line 50@51-1' Linq101Where01/'Pipe #3 input at line 50@51-1'::@_instance IL_002b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_digits() IL_0030: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Collect,string>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, @@ -690,7 +691,6 @@ IL_003f: ldarg.0 IL_0040: ldc.i4.1 IL_0041: stfld int32 Linq101Where01/'Pipe #3 input at line 50@52'::pc - .line 52,52 : 9,17 '' IL_0046: ldarg.0 IL_0047: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'Pipe #3 input at line 50@52'::'enum' IL_004c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() @@ -700,11 +700,11 @@ IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'Pipe #3 input at line 50@52'::'enum' IL_0059: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() IL_005e: stloc.0 - .line 52,52 : 16,17 '' IL_005f: ldarg.0 IL_0060: ldc.i4.2 IL_0061: stfld int32 Linq101Where01/'Pipe #3 input at line 50@52'::pc IL_0066: ldarg.0 + .line 52,52 : 16,17 '' IL_0067: ldloc.0 IL_0068: stfld string Linq101Where01/'Pipe #3 input at line 50@52'::current IL_006d: ldc.i4.1 @@ -717,7 +717,6 @@ IL_0072: ldarg.0 IL_0073: ldc.i4.3 IL_0074: stfld int32 Linq101Where01/'Pipe #3 input at line 50@52'::pc - .line 52,52 : 9,17 '' IL_0079: ldarg.0 IL_007a: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 Linq101Where01/'Pipe #3 input at line 50@52'::'enum' IL_007f: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) @@ -738,7 +737,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 128 (0x80) + // Code size 127 (0x7f) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -811,7 +810,6 @@ { IL_0066: castclass [mscorlib]System.Exception IL_006b: stloc.1 - .line 52,52 : 9,17 '' IL_006c: ldloc.1 IL_006d: stloc.0 IL_006e: leave.s IL_0070 @@ -821,20 +819,18 @@ IL_0070: nop IL_0071: br IL_0000 - .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 + IL_0076: ldloc.0 + IL_0077: ldnull + IL_0078: cgt.un + IL_007a: brfalse.s IL_007e .line 100001,100001 : 0,0 '' - IL_007d: ldloc.0 - IL_007e: throw + IL_007c: ldloc.0 + IL_007d: throw .line 100001,100001 : 0,0 '' - IL_007f: ret + IL_007e: ret } // end of method 'Pipe #3 input at line 50@52'::Close .method public strict virtual instance bool @@ -983,7 +979,6 @@ { // Code size 9 (0x9) .maxstack 8 - .line 55,55 : 19,21 '' IL_0000: ldarg.1 IL_0001: tail. IL_0003: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Identity>(!!0) @@ -1227,8 +1222,10 @@ .line 13,13 : 5,10 '' IL_004a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_004f: stloc.s V_10 + .line 13,13 : 5,10 '' IL_0051: ldloc.s V_10 IL_0053: ldloc.s V_10 + .line 14,14 : 9,12 '' IL_0055: ldloc.s V_10 IL_0057: ldloc.s V_10 IL_0059: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_numbers() @@ -1256,10 +1253,13 @@ IL_009d: dup IL_009e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::products@20 IL_00a3: stloc.2 + .line 23,23 : 5,10 '' IL_00a4: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00a9: stloc.s V_11 + .line 23,23 : 5,10 '' IL_00ab: ldloc.s V_11 IL_00ad: ldloc.s V_11 + .line 24,24 : 9,12 '' IL_00af: ldloc.s V_11 IL_00b1: ldloc.s V_11 IL_00b3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_products() @@ -1278,10 +1278,13 @@ IL_00e2: dup IL_00e3: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101Where01::soldOutProducts@22 IL_00e8: stloc.3 + .line 31,31 : 5,10 '' IL_00e9: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00ee: stloc.s V_12 + .line 31,31 : 5,10 '' IL_00f0: ldloc.s V_12 IL_00f2: ldloc.s V_12 + .line 32,32 : 9,12 '' IL_00f4: ldloc.s V_12 IL_00f6: ldloc.s V_12 IL_00f8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_products() @@ -1310,8 +1313,10 @@ .line 41,41 : 5,10 '' IL_013d: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0142: stloc.s V_14 + .line 41,41 : 5,10 '' IL_0144: ldloc.s V_14 IL_0146: ldloc.s V_14 + .line 42,42 : 9,12 '' IL_0148: ldloc.s V_14 IL_014a: ldloc.s V_14 IL_014c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_customers() @@ -1374,6 +1379,7 @@ .line 50,50 : 5,10 '' IL_01fe: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0203: stloc.s V_16 + .line 50,50 : 5,10 '' IL_0205: ldnull IL_0206: ldc.i4.0 IL_0207: ldnull diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.il.bsl index 4b4e0c5bf76..2a1f442bc0a 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.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 SeqExpressionSteppingTest1 { @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000AD } .module SeqExpressionSteppingTest1.exe -// MVID: {611B0EC5-2432-947D-A745-0383C50E1B61} +// MVID: {61E07032-2432-947D-A745-03833270E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06CF0000 +// Image base: 0x071A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -110,11 +110,11 @@ .line 100001,100001 : 0,0 '' IL_001d: nop - .line 6,6 : 15,22 '' IL_001e: ldarg.0 IL_001f: ldc.i4.1 IL_0020: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc IL_0025: ldarg.0 + .line 6,6 : 21,22 '' IL_0026: ldc.i4.1 IL_0027: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current IL_002c: ldc.i4.1 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.il.bsl index 91422d1148b..da2e3ee60db 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.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 SeqExpressionSteppingTest2 { @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000AD } .module SeqExpressionSteppingTest2.exe -// MVID: {611B0EC5-2432-951E-A745-0383C50E1B61} +// MVID: {61E07032-2432-951E-A745-03833270E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06940000 +// Image base: 0x06BB0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -120,11 +120,11 @@ IL_002a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_002f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0034: pop - .line 6,6 : 15,22 '' IL_0035: ldarg.0 IL_0036: ldc.i4.1 IL_0037: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc IL_003c: ldarg.0 + .line 6,6 : 21,22 '' IL_003d: ldc.i4.1 IL_003e: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current IL_0043: ldc.i4.1 @@ -135,11 +135,11 @@ IL_004a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_004f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0054: pop - .line 8,8 : 15,22 '' IL_0055: ldarg.0 IL_0056: ldc.i4.2 IL_0057: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc IL_005c: ldarg.0 + .line 8,8 : 21,22 '' IL_005d: ldc.i4.2 IL_005e: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current IL_0063: ldc.i4.1 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.il.bsl index 5dfb9d70895..e6365e1bbb0 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.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 SeqExpressionSteppingTest3 { @@ -36,13 +36,13 @@ // Offset: 0x00000278 Length: 0x000000AD } .module SeqExpressionSteppingTest3.exe -// MVID: {611B0EC5-2432-943F-A745-0383C50E1B61} +// MVID: {61E07032-2432-943F-A745-03833270E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06440000 +// Image base: 0x06C40000 // =============== CLASS MEMBERS DECLARATION =================== @@ -132,11 +132,11 @@ IL_003d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_0042: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0047: pop - .line 9,9 : 18,25 '' IL_0048: ldarg.0 IL_0049: ldc.i4.1 IL_004a: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::pc IL_004f: ldarg.0 + .line 9,9 : 24,25 '' IL_0050: ldarg.0 IL_0051: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::x IL_0056: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::current diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.il.bsl index 0838e192a8b..73efbe49712 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.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 SeqExpressionSteppingTest4 { @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000AD } .module SeqExpressionSteppingTest4.exe -// MVID: {611B0EC5-2432-93E0-A745-0383C50E1B61} +// MVID: {61E07032-2432-93E0-A745-03833270E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06F50000 +// Image base: 0x06DD0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -146,11 +146,11 @@ IL_004d: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::y IL_0052: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) IL_0057: nop - .line 9,9 : 15,23 '' IL_0058: ldarg.0 IL_0059: ldc.i4.1 IL_005a: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::pc IL_005f: ldarg.0 + .line 9,9 : 21,23 '' IL_0060: ldarg.0 IL_0061: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::x IL_0066: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) @@ -167,17 +167,16 @@ IL_0083: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) IL_0088: add IL_0089: stloc.0 - .line 11,11 : 15,22 '' IL_008a: ldarg.0 IL_008b: ldc.i4.2 IL_008c: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::pc IL_0091: ldarg.0 + .line 11,11 : 21,22 '' IL_0092: ldloc.0 IL_0093: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::current IL_0098: ldc.i4.1 IL_0099: ret - .line 7,7 : 19,20 '' IL_009a: ldarg.0 IL_009b: ldnull IL_009c: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::y diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl index 665db6c83ac..084e329f3c5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.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 SeqExpressionSteppingTest5 { @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000AD } .module SeqExpressionSteppingTest5.exe -// MVID: {611C4D82-2432-9401-A745-0383824D1C61} +// MVID: {61E07032-2432-9401-A745-03833270E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04AD0000 +// Image base: 0x06A60000 // =============== CLASS MEMBERS DECLARATION =================== @@ -136,6 +136,7 @@ IL_0033: ldc.i4.0 IL_0034: call class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::Ref(!!0) IL_0039: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::x + .line 6,6 : 15,18 '' IL_003e: ldarg.0 IL_003f: ldc.i4.1 IL_0040: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc @@ -149,11 +150,11 @@ IL_0052: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::y IL_0057: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) IL_005c: nop - .line 9,9 : 19,27 '' IL_005d: ldarg.0 IL_005e: ldc.i4.2 IL_005f: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc IL_0064: ldarg.0 + .line 9,9 : 25,27 '' IL_0065: ldarg.0 IL_0066: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::x IL_006b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) @@ -170,11 +171,11 @@ IL_0088: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) IL_008d: add IL_008e: stloc.0 - .line 11,11 : 19,26 '' IL_008f: ldarg.0 IL_0090: ldc.i4.3 IL_0091: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc IL_0096: ldarg.0 + .line 11,11 : 25,26 '' IL_0097: ldloc.0 IL_0098: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::current IL_009d: ldc.i4.1 @@ -212,7 +213,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 157 (0x9d) + // Code size 156 (0x9c) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -272,6 +273,7 @@ .line 100001,100001 : 0,0 '' IL_004e: nop + .line 12,12 : 15,22 '' IL_004f: ldarg.0 IL_0050: ldc.i4.4 IL_0051: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc @@ -300,7 +302,6 @@ { IL_0083: castclass [mscorlib]System.Exception IL_0088: stloc.1 - .line 5,5 : 19,20 '' IL_0089: ldloc.1 IL_008a: stloc.0 IL_008b: leave.s IL_008d @@ -310,20 +311,18 @@ IL_008d: nop IL_008e: br IL_0000 - .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 + IL_0093: ldloc.0 + IL_0094: ldnull + IL_0095: cgt.un + IL_0097: brfalse.s IL_009b .line 100001,100001 : 0,0 '' - IL_009a: ldloc.0 - IL_009b: throw + IL_0099: ldloc.0 + IL_009a: throw .line 100001,100001 : 0,0 '' - IL_009c: ret + IL_009b: 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 c50b09633d3..7d23cdf1ff3 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.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 SeqExpressionSteppingTest6 { @@ -36,13 +36,13 @@ // Offset: 0x000002A0 Length: 0x000000BA } .module SeqExpressionSteppingTest6.exe -// MVID: {611C4D82-2432-94A2-A745-0383824D1C61} +// MVID: {61E07032-2432-94A2-A745-03833270E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07260000 +// Image base: 0x068B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -143,15 +143,16 @@ .line 100001,100001 : 0,0 '' IL_003b: nop - .line 6,8 : 15,25 '' + .line 6,6 : 15,18 '' IL_003c: ldarg.0 + .line 6,6 : 24,26 '' IL_003d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() IL_0042: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_0047: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' IL_004c: ldarg.0 IL_004d: ldc.i4.1 IL_004e: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - .line 6,8 : 15,25 '' + .line 6,6 : 21,23 '' IL_0053: ldarg.0 IL_0054: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' IL_0059: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() @@ -166,11 +167,11 @@ IL_0071: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_0076: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_007b: pop - .line 8,8 : 18,25 '' IL_007c: ldarg.0 IL_007d: ldc.i4.2 IL_007e: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc IL_0083: ldarg.0 + .line 8,8 : 24,25 '' IL_0084: ldloc.0 IL_0085: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current IL_008a: ldc.i4.1 @@ -183,24 +184,23 @@ IL_008f: ldarg.0 IL_0090: ldc.i4.5 IL_0091: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - .line 6,8 : 15,25 '' IL_0096: ldarg.0 IL_0097: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' IL_009c: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) IL_00a1: nop - .line 6,8 : 15,25 '' IL_00a2: ldarg.0 IL_00a3: ldnull IL_00a4: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::'enum' - .line 9,11 : 15,25 '' + .line 9,9 : 15,18 '' IL_00a9: ldarg.0 + .line 9,9 : 24,26 '' IL_00aa: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6::get_es() IL_00af: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() IL_00b4: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 IL_00b9: ldarg.0 IL_00ba: ldc.i4.3 IL_00bb: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - .line 9,11 : 15,25 '' + .line 9,9 : 21,23 '' IL_00c0: ldarg.0 IL_00c1: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 IL_00c6: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() @@ -215,11 +215,11 @@ IL_00de: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_00e3: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_00e8: pop - .line 11,11 : 18,25 '' IL_00e9: ldarg.0 IL_00ea: ldc.i4.4 IL_00eb: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc IL_00f0: ldarg.0 + .line 11,11 : 24,25 '' IL_00f1: ldloc.1 IL_00f2: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current IL_00f7: ldc.i4.1 @@ -232,12 +232,10 @@ IL_00fc: ldarg.0 IL_00fd: ldc.i4.5 IL_00fe: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc - .line 9,11 : 15,25 '' IL_0103: ldarg.0 IL_0104: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 IL_0109: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) IL_010e: nop - .line 9,11 : 15,25 '' IL_010f: ldarg.0 IL_0110: ldnull IL_0111: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::enum0 @@ -254,7 +252,7 @@ .method public strict virtual instance void Close() cil managed { - // Code size 168 (0xa8) + // Code size 167 (0xa7) .maxstack 6 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e) @@ -350,7 +348,6 @@ { IL_008e: castclass [mscorlib]System.Exception IL_0093: stloc.1 - .line 6,8 : 15,25 '' IL_0094: ldloc.1 IL_0095: stloc.0 IL_0096: leave.s IL_0098 @@ -360,20 +357,18 @@ IL_0098: nop IL_0099: br IL_0000 - .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 + IL_009e: ldloc.0 + IL_009f: ldnull + IL_00a0: cgt.un + IL_00a2: brfalse.s IL_00a6 .line 100001,100001 : 0,0 '' - IL_00a5: ldloc.0 - IL_00a6: throw + IL_00a4: ldloc.0 + IL_00a5: throw .line 100001,100001 : 0,0 '' - IL_00a7: ret + IL_00a6: ret } // end of method f7@6::Close .method public strict virtual instance bool diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.fs b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.fs index 89291d69458..6eed0b6dd45 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.fs +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.fs @@ -4,3 +4,72 @@ module SeqExpressionSteppingTest7 // Regression test for FSHARP1.0:4454 let r = ref 0 let f () = [ if (incr r; true) then yield! failwith "" ] printfn "res = %A" (try f () with Failure _ -> [!r]) + + +let testSimpleForEachSeqLoopWithOneStatement inp = + for x in inp do + System.Console.WriteLine("{0}", x) + +let testSimpleForEachSeqLoopWithTwoStatements inp = + for x in inp do + System.Console.WriteLine("{0}", x) + System.Console.WriteLine("{0}", x) + +let testSimpleForEachArrayLoopWithOneStatement (inp:int array) = + for x in inp do + System.Console.WriteLine("{0}", x) + +let testSimpleForEachArrayLoopWithTwoStatements (inp:int array) = + for x in inp do + System.Console.WriteLine("{0}", x) + System.Console.WriteLine("{0}", x) + +let testSimpleForEachListLoopWithOneStatement (inp:int list) = + for x in inp do + System.Console.WriteLine("{0}", x) + +let testSimpleForEachListLoopWithTwoStatements (inp:int list) = + for x in inp do + System.Console.WriteLine("{0}", x) + System.Console.WriteLine("{0}", x) + +let testSimpleForEachIntRangeLoopWithOneStatement (start, stop) = + for x in start .. stop do + System.Console.WriteLine("{0}", x) + +let testSimpleForEachIntRangeLoopWithTwoStatements (start, stop) = + for x in start .. stop do + System.Console.WriteLine("{0}", x) + System.Console.WriteLine("{0}", x) + +let testSimpleForEachIntRangeLoopDownWithOneStatement (start, stop) = + for x in start .. -1 .. stop do + System.Console.WriteLine("{0}", x) + +let testSimpleForEachIntRangeLoopDownWithTwoStatements (start, stop) = + for x in start .. -1 .. stop do + System.Console.WriteLine("{0}", x) + System.Console.WriteLine("{0}", x) + +let testSimpleForEachIntLoopWithOneStatement (start, stop) = + for x = start to stop do + System.Console.WriteLine("{0}", x) + +let testSimpleForEachIntLoopWithTwoStatements (start, stop) = + for x = start to stop do + System.Console.WriteLine("{0}", x) + System.Console.WriteLine("{0}", x) + +let testSimpleForEachIntLoopDownWithOneStatement (start, stop) = + for x = stop downto start do + System.Console.WriteLine("{0}", x) + +let testSimpleForEachIntLoopDownWithTwoStatements (start, stop) = + for x = stop downto start do + System.Console.WriteLine("{0}", x) + System.Console.WriteLine("{0}", x) + +let ListExpressionSteppingTest7 () = + [ for x in 1..4 do + printfn "hello" + yield x ] diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl index 7965bb568e8..a68df290837 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.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 SeqExpressionSteppingTest7 { @@ -29,20 +29,20 @@ } .mresource public FSharpSignatureData.SeqExpressionSteppingTest7 { - // Offset: 0x00000000 Length: 0x00000266 + // Offset: 0x00000000 Length: 0x0000084F } .mresource public FSharpOptimizationData.SeqExpressionSteppingTest7 { - // Offset: 0x00000270 Length: 0x00000098 + // Offset: 0x00000858 Length: 0x000003BA } .module SeqExpressionSteppingTest7.exe -// MVID: {611C5DB0-2432-93C3-A745-0383B05D1C61} +// MVID: {61EFEC61-2432-93C3-A745-038361ECEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06AC0000 +// Image base: 0x06830000 // =============== CLASS MEMBERS DECLARATION =================== @@ -63,7 +63,7 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f() cil managed { - // Code size 61 (0x3d) + // Code size 60 (0x3c) .maxstack 5 .locals init ([0] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, [1] string V_1) @@ -99,18 +99,746 @@ IL_002f: nop .line 100001,100001 : 0,0 '' IL_0030: nop - IL_0031: br.s IL_0035 + IL_0031: br.s IL_0034 - .line 5,5 : 14,36 '' - IL_0033: nop .line 100001,100001 : 0,0 '' - IL_0034: nop - .line 5,5 : 12,57 '' - 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 + IL_0033: nop + IL_0034: ldloca.s V_0 + IL_0036: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_003b: ret } // end of method SeqExpressionSteppingTest7::f + .method public static void testSimpleForEachSeqLoopWithOneStatement(class [mscorlib]System.Collections.Generic.IEnumerable`1 inp) cil managed + { + // Code size 59 (0x3b) + .maxstack 4 + .locals init ([0] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_0, + [1] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_1, + [2] object[] x, + [3] class [mscorlib]System.IDisposable V_3) + .line 10,10 : 5,8 '' + IL_0000: ldarg.0 + IL_0001: stloc.0 + .line 10,10 : 14,17 '' + IL_0002: ldloc.0 + IL_0003: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0008: stloc.1 + .line 10,10 : 11,13 '' + .try + { + IL_0009: ldloc.1 + IL_000a: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_000f: brfalse.s IL_0026 + + IL_0011: ldloc.1 + IL_0012: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0017: stloc.2 + .line 11,11 : 8,42 '' + IL_0018: ldstr "{0}" + IL_001d: ldloc.2 + IL_001e: call void [mscorlib]System.Console::WriteLine(string, + object[]) + .line 100001,100001 : 0,0 '' + IL_0023: nop + IL_0024: br.s IL_0009 + + IL_0026: leave.s IL_003a + + } // end .try + finally + { + IL_0028: ldloc.1 + IL_0029: isinst [mscorlib]System.IDisposable + IL_002e: stloc.3 + .line 100001,100001 : 0,0 '' + IL_002f: ldloc.3 + IL_0030: brfalse.s IL_0039 + + .line 100001,100001 : 0,0 '' + IL_0032: ldloc.3 + IL_0033: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_0038: endfinally + .line 100001,100001 : 0,0 '' + IL_0039: endfinally + .line 100001,100001 : 0,0 '' + } // end handler + IL_003a: ret + } // end of method SeqExpressionSteppingTest7::testSimpleForEachSeqLoopWithOneStatement + + .method public static void testSimpleForEachSeqLoopWithTwoStatements(class [mscorlib]System.Collections.Generic.IEnumerable`1 inp) cil managed + { + // Code size 70 (0x46) + .maxstack 4 + .locals init ([0] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_0, + [1] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_1, + [2] object[] x, + [3] class [mscorlib]System.IDisposable V_3) + .line 14,14 : 5,8 '' + IL_0000: ldarg.0 + IL_0001: stloc.0 + .line 14,14 : 14,17 '' + IL_0002: ldloc.0 + IL_0003: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0008: stloc.1 + .line 14,14 : 11,13 '' + .try + { + IL_0009: ldloc.1 + IL_000a: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_000f: brfalse.s IL_0031 + + IL_0011: ldloc.1 + IL_0012: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0017: stloc.2 + .line 15,15 : 8,42 '' + IL_0018: ldstr "{0}" + IL_001d: ldloc.2 + IL_001e: call void [mscorlib]System.Console::WriteLine(string, + object[]) + .line 16,16 : 8,42 '' + IL_0023: ldstr "{0}" + IL_0028: ldloc.2 + IL_0029: call void [mscorlib]System.Console::WriteLine(string, + object[]) + .line 100001,100001 : 0,0 '' + IL_002e: nop + IL_002f: br.s IL_0009 + + IL_0031: leave.s IL_0045 + + } // end .try + finally + { + IL_0033: ldloc.1 + IL_0034: isinst [mscorlib]System.IDisposable + IL_0039: stloc.3 + .line 100001,100001 : 0,0 '' + IL_003a: ldloc.3 + IL_003b: brfalse.s IL_0044 + + .line 100001,100001 : 0,0 '' + IL_003d: ldloc.3 + IL_003e: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_0043: endfinally + .line 100001,100001 : 0,0 '' + IL_0044: endfinally + .line 100001,100001 : 0,0 '' + } // end handler + IL_0045: ret + } // end of method SeqExpressionSteppingTest7::testSimpleForEachSeqLoopWithTwoStatements + + .method public static void testSimpleForEachArrayLoopWithOneStatement(int32[] inp) cil managed + { + // Code size 41 (0x29) + .maxstack 4 + .locals init ([0] int32[] V_0, + [1] int32 V_1, + [2] int32 x) + .line 19,19 : 5,8 '' + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: stloc.1 + IL_0004: br.s IL_0022 + + .line 100001,100001 : 0,0 '' + IL_0006: ldloc.0 + IL_0007: ldloc.1 + IL_0008: ldelem [mscorlib]System.Int32 + IL_000d: stloc.2 + .line 20,20 : 8,42 '' + IL_000e: ldstr "{0}" + IL_0013: ldloc.2 + IL_0014: box [mscorlib]System.Int32 + IL_0019: call void [mscorlib]System.Console::WriteLine(string, + object) + IL_001e: ldloc.1 + IL_001f: ldc.i4.1 + IL_0020: add + IL_0021: stloc.1 + .line 19,19 : 11,13 '' + IL_0022: ldloc.1 + IL_0023: ldloc.0 + IL_0024: ldlen + IL_0025: conv.i4 + IL_0026: blt.s IL_0006 + + IL_0028: ret + } // end of method SeqExpressionSteppingTest7::testSimpleForEachArrayLoopWithOneStatement + + .method public static void testSimpleForEachArrayLoopWithTwoStatements(int32[] inp) cil managed + { + // Code size 57 (0x39) + .maxstack 4 + .locals init ([0] int32[] V_0, + [1] int32 V_1, + [2] int32 x) + .line 23,23 : 5,8 '' + IL_0000: ldarg.0 + IL_0001: stloc.0 + IL_0002: ldc.i4.0 + IL_0003: stloc.1 + IL_0004: br.s IL_0032 + + .line 100001,100001 : 0,0 '' + IL_0006: ldloc.0 + IL_0007: ldloc.1 + IL_0008: ldelem [mscorlib]System.Int32 + IL_000d: stloc.2 + .line 24,24 : 8,42 '' + IL_000e: ldstr "{0}" + IL_0013: ldloc.2 + IL_0014: box [mscorlib]System.Int32 + IL_0019: call void [mscorlib]System.Console::WriteLine(string, + object) + .line 25,25 : 8,42 '' + IL_001e: ldstr "{0}" + IL_0023: ldloc.2 + IL_0024: box [mscorlib]System.Int32 + IL_0029: call void [mscorlib]System.Console::WriteLine(string, + object) + IL_002e: ldloc.1 + IL_002f: ldc.i4.1 + IL_0030: add + IL_0031: stloc.1 + .line 23,23 : 11,13 '' + IL_0032: ldloc.1 + IL_0033: ldloc.0 + IL_0034: ldlen + IL_0035: conv.i4 + IL_0036: blt.s IL_0006 + + IL_0038: ret + } // end of method SeqExpressionSteppingTest7::testSimpleForEachArrayLoopWithTwoStatements + + .method public static void testSimpleForEachListLoopWithOneStatement(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 inp) cil managed + { + // Code size 51 (0x33) + .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, + [2] int32 x) + .line 28,28 : 5,8 '' + IL_0000: ldarg.0 + IL_0001: stloc.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: 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_000f: ldloc.0 + IL_0010: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0015: 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, + 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 + .line 100001,100001 : 0,0 '' + IL_002f: nop + IL_0030: br.s IL_0009 + + IL_0032: 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) + .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, + [2] int32 x) + .line 32,32 : 5,8 '' + IL_0000: ldarg.0 + IL_0001: stloc.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: 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_000f: ldloc.0 + IL_0010: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() + IL_0015: 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, + 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, + 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 + .line 100001,100001 : 0,0 '' + IL_003f: nop + IL_0040: br.s IL_0009 + + IL_0042: ret + } // end of method SeqExpressionSteppingTest7::testSimpleForEachListLoopWithTwoStatements + + .method public static void testSimpleForEachIntRangeLoopWithOneStatement(int32 start, + int32 stop) cil managed + { + // Code size 35 (0x23) + .maxstack 5 + .locals init ([0] int32 V_0, + [1] int32 x) + .line 37,37 : 5,8 '' + IL_0000: ldarg.0 + IL_0001: stloc.1 + IL_0002: ldarg.1 + IL_0003: stloc.0 + IL_0004: ldloc.0 + IL_0005: ldloc.1 + IL_0006: blt.s IL_0022 + + .line 38,38 : 8,42 '' + IL_0008: ldstr "{0}" + IL_000d: ldloc.1 + IL_000e: box [mscorlib]System.Int32 + IL_0013: call void [mscorlib]System.Console::WriteLine(string, + object) + IL_0018: ldloc.1 + IL_0019: ldc.i4.1 + IL_001a: add + IL_001b: stloc.1 + .line 37,37 : 11,13 '' + IL_001c: ldloc.1 + IL_001d: ldloc.0 + IL_001e: ldc.i4.1 + IL_001f: add + IL_0020: bne.un.s IL_0008 + + IL_0022: ret + } // end of method SeqExpressionSteppingTest7::testSimpleForEachIntRangeLoopWithOneStatement + + .method public static void testSimpleForEachIntRangeLoopWithTwoStatements(int32 start, + int32 stop) cil managed + { + // Code size 51 (0x33) + .maxstack 5 + .locals init ([0] int32 V_0, + [1] int32 x) + .line 41,41 : 5,8 '' + IL_0000: ldarg.0 + IL_0001: stloc.1 + IL_0002: ldarg.1 + IL_0003: stloc.0 + IL_0004: ldloc.0 + IL_0005: ldloc.1 + IL_0006: blt.s IL_0032 + + .line 42,42 : 8,42 '' + IL_0008: ldstr "{0}" + IL_000d: ldloc.1 + IL_000e: box [mscorlib]System.Int32 + IL_0013: call void [mscorlib]System.Console::WriteLine(string, + object) + .line 43,43 : 8,42 '' + IL_0018: ldstr "{0}" + IL_001d: ldloc.1 + IL_001e: box [mscorlib]System.Int32 + IL_0023: call void [mscorlib]System.Console::WriteLine(string, + object) + IL_0028: ldloc.1 + IL_0029: ldc.i4.1 + IL_002a: add + IL_002b: stloc.1 + .line 41,41 : 11,13 '' + IL_002c: ldloc.1 + IL_002d: ldloc.0 + IL_002e: ldc.i4.1 + IL_002f: add + IL_0030: bne.un.s IL_0008 + + IL_0032: ret + } // end of method SeqExpressionSteppingTest7::testSimpleForEachIntRangeLoopWithTwoStatements + + .method public static void testSimpleForEachIntRangeLoopDownWithOneStatement(int32 start, + int32 stop) cil managed + { + // Code size 71 (0x47) + .maxstack 5 + .locals init ([0] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_0, + [1] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_1, + [2] int32 x, + [3] class [mscorlib]System.IDisposable V_3) + .line 46,46 : 5,8 '' + IL_0000: ldarg.0 + IL_0001: ldc.i4.m1 + IL_0002: ldarg.1 + IL_0003: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + int32, + int32) + IL_0008: stloc.0 + .line 46,46 : 14,33 '' + IL_0009: ldloc.0 + IL_000a: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_000f: stloc.1 + .line 46,46 : 11,13 '' + .try + { + IL_0010: ldloc.1 + IL_0011: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0016: brfalse.s IL_0032 + + IL_0018: ldloc.1 + IL_0019: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_001e: stloc.2 + .line 47,47 : 8,42 '' + IL_001f: ldstr "{0}" + IL_0024: ldloc.2 + IL_0025: box [mscorlib]System.Int32 + IL_002a: call void [mscorlib]System.Console::WriteLine(string, + object) + .line 100001,100001 : 0,0 '' + IL_002f: nop + IL_0030: br.s IL_0010 + + IL_0032: leave.s IL_0046 + + } // end .try + finally + { + IL_0034: ldloc.1 + IL_0035: isinst [mscorlib]System.IDisposable + IL_003a: stloc.3 + .line 100001,100001 : 0,0 '' + IL_003b: ldloc.3 + IL_003c: brfalse.s IL_0045 + + .line 100001,100001 : 0,0 '' + IL_003e: ldloc.3 + IL_003f: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_0044: endfinally + .line 100001,100001 : 0,0 '' + IL_0045: endfinally + .line 100001,100001 : 0,0 '' + } // end handler + IL_0046: ret + } // end of method SeqExpressionSteppingTest7::testSimpleForEachIntRangeLoopDownWithOneStatement + + .method public static void testSimpleForEachIntRangeLoopDownWithTwoStatements(int32 start, + int32 stop) cil managed + { + // Code size 87 (0x57) + .maxstack 5 + .locals init ([0] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_0, + [1] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_1, + [2] int32 x, + [3] class [mscorlib]System.IDisposable V_3) + .line 50,50 : 5,8 '' + IL_0000: ldarg.0 + IL_0001: ldc.i4.m1 + IL_0002: ldarg.1 + IL_0003: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + int32, + int32) + IL_0008: stloc.0 + .line 50,50 : 14,33 '' + IL_0009: ldloc.0 + IL_000a: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_000f: stloc.1 + .line 50,50 : 11,13 '' + .try + { + IL_0010: ldloc.1 + IL_0011: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0016: brfalse.s IL_0042 + + IL_0018: ldloc.1 + IL_0019: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_001e: stloc.2 + .line 51,51 : 8,42 '' + IL_001f: ldstr "{0}" + IL_0024: ldloc.2 + IL_0025: box [mscorlib]System.Int32 + IL_002a: call void [mscorlib]System.Console::WriteLine(string, + object) + .line 52,52 : 8,42 '' + IL_002f: ldstr "{0}" + IL_0034: ldloc.2 + IL_0035: box [mscorlib]System.Int32 + IL_003a: call void [mscorlib]System.Console::WriteLine(string, + object) + .line 100001,100001 : 0,0 '' + IL_003f: nop + IL_0040: br.s IL_0010 + + IL_0042: leave.s IL_0056 + + } // end .try + finally + { + IL_0044: ldloc.1 + IL_0045: isinst [mscorlib]System.IDisposable + IL_004a: stloc.3 + .line 100001,100001 : 0,0 '' + IL_004b: ldloc.3 + IL_004c: brfalse.s IL_0055 + + .line 100001,100001 : 0,0 '' + IL_004e: ldloc.3 + IL_004f: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_0054: endfinally + .line 100001,100001 : 0,0 '' + IL_0055: endfinally + .line 100001,100001 : 0,0 '' + } // end handler + IL_0056: ret + } // end of method SeqExpressionSteppingTest7::testSimpleForEachIntRangeLoopDownWithTwoStatements + + .method public static void testSimpleForEachIntLoopWithOneStatement(int32 start, + int32 stop) cil managed + { + // Code size 35 (0x23) + .maxstack 5 + .locals init ([0] int32 V_0, + [1] int32 x) + .line 55,55 : 5,8 '' + IL_0000: ldarg.0 + IL_0001: stloc.1 + IL_0002: ldarg.1 + IL_0003: stloc.0 + IL_0004: ldloc.0 + IL_0005: ldloc.1 + IL_0006: blt.s IL_0022 + + .line 56,56 : 8,42 '' + IL_0008: ldstr "{0}" + IL_000d: ldloc.1 + IL_000e: box [mscorlib]System.Int32 + IL_0013: call void [mscorlib]System.Console::WriteLine(string, + object) + IL_0018: ldloc.1 + IL_0019: ldc.i4.1 + IL_001a: add + IL_001b: stloc.1 + .line 55,55 : 19,21 '' + IL_001c: ldloc.1 + IL_001d: ldloc.0 + IL_001e: ldc.i4.1 + IL_001f: add + IL_0020: bne.un.s IL_0008 + + IL_0022: ret + } // end of method SeqExpressionSteppingTest7::testSimpleForEachIntLoopWithOneStatement + + .method public static void testSimpleForEachIntLoopWithTwoStatements(int32 start, + int32 stop) cil managed + { + // Code size 51 (0x33) + .maxstack 5 + .locals init ([0] int32 V_0, + [1] int32 x) + .line 59,59 : 5,8 '' + IL_0000: ldarg.0 + IL_0001: stloc.1 + IL_0002: ldarg.1 + IL_0003: stloc.0 + IL_0004: ldloc.0 + IL_0005: ldloc.1 + IL_0006: blt.s IL_0032 + + .line 60,60 : 8,42 '' + IL_0008: ldstr "{0}" + IL_000d: ldloc.1 + IL_000e: box [mscorlib]System.Int32 + IL_0013: call void [mscorlib]System.Console::WriteLine(string, + object) + .line 61,61 : 8,42 '' + IL_0018: ldstr "{0}" + IL_001d: ldloc.1 + IL_001e: box [mscorlib]System.Int32 + IL_0023: call void [mscorlib]System.Console::WriteLine(string, + object) + IL_0028: ldloc.1 + IL_0029: ldc.i4.1 + IL_002a: add + IL_002b: stloc.1 + .line 59,59 : 19,21 '' + IL_002c: ldloc.1 + IL_002d: ldloc.0 + IL_002e: ldc.i4.1 + IL_002f: add + IL_0030: bne.un.s IL_0008 + + IL_0032: ret + } // end of method SeqExpressionSteppingTest7::testSimpleForEachIntLoopWithTwoStatements + + .method public static void testSimpleForEachIntLoopDownWithOneStatement(int32 start, + int32 stop) cil managed + { + // Code size 35 (0x23) + .maxstack 5 + .locals init ([0] int32 V_0, + [1] int32 x) + .line 64,64 : 5,8 '' + IL_0000: ldarg.1 + IL_0001: stloc.1 + IL_0002: ldarg.0 + IL_0003: stloc.0 + IL_0004: ldloc.0 + IL_0005: ldloc.1 + IL_0006: bgt.s IL_0022 + + .line 65,65 : 8,42 '' + IL_0008: ldstr "{0}" + IL_000d: ldloc.1 + IL_000e: box [mscorlib]System.Int32 + IL_0013: call void [mscorlib]System.Console::WriteLine(string, + object) + IL_0018: ldloc.1 + IL_0019: ldc.i4.1 + IL_001a: sub + IL_001b: stloc.1 + .line 64,64 : 18,24 '' + IL_001c: ldloc.1 + IL_001d: ldloc.0 + IL_001e: ldc.i4.1 + IL_001f: sub + IL_0020: bne.un.s IL_0008 + + IL_0022: ret + } // end of method SeqExpressionSteppingTest7::testSimpleForEachIntLoopDownWithOneStatement + + .method public static void testSimpleForEachIntLoopDownWithTwoStatements(int32 start, + int32 stop) cil managed + { + // Code size 51 (0x33) + .maxstack 5 + .locals init ([0] int32 V_0, + [1] int32 x) + .line 68,68 : 5,8 '' + IL_0000: ldarg.1 + IL_0001: stloc.1 + IL_0002: ldarg.0 + IL_0003: stloc.0 + IL_0004: ldloc.0 + IL_0005: ldloc.1 + IL_0006: bgt.s IL_0032 + + .line 69,69 : 8,42 '' + IL_0008: ldstr "{0}" + IL_000d: ldloc.1 + IL_000e: box [mscorlib]System.Int32 + IL_0013: call void [mscorlib]System.Console::WriteLine(string, + object) + .line 70,70 : 8,42 '' + IL_0018: ldstr "{0}" + IL_001d: ldloc.1 + IL_001e: box [mscorlib]System.Int32 + IL_0023: call void [mscorlib]System.Console::WriteLine(string, + object) + IL_0028: ldloc.1 + IL_0029: ldc.i4.1 + IL_002a: sub + IL_002b: stloc.1 + .line 68,68 : 18,24 '' + IL_002c: ldloc.1 + IL_002d: ldloc.0 + IL_002e: ldc.i4.1 + IL_002f: sub + IL_0030: bne.un.s IL_0008 + + IL_0032: ret + } // end of method SeqExpressionSteppingTest7::testSimpleForEachIntLoopDownWithTwoStatements + + .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 + ListExpressionSteppingTest7() cil managed + { + // Code size 93 (0x5d) + .maxstack 5 + .locals init ([0] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0, + [1] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_1, + [2] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_2, + [3] int32 x, + [4] class [mscorlib]System.IDisposable V_4) + .line 73,75 : 5,22 '' + IL_0000: nop + .line 73,73 : 7,10 '' + IL_0001: ldc.i4.1 + IL_0002: ldc.i4.1 + IL_0003: ldc.i4.4 + IL_0004: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + int32, + int32) + IL_0009: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_000e: stloc.1 + .line 73,73 : 13,15 '' + .try + { + IL_000f: ldloc.1 + IL_0010: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + IL_0015: brfalse.s IL_003a + + IL_0017: ldloc.1 + IL_0018: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() + IL_001d: stloc.3 + .line 74,74 : 13,28 '' + IL_001e: ldstr "hello" + 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: ldloca.s V_0 + .line 75,75 : 19,20 '' + IL_0030: ldloc.3 + IL_0031: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0036: nop + .line 100001,100001 : 0,0 '' + IL_0037: nop + IL_0038: br.s IL_000f + + IL_003a: ldnull + IL_003b: stloc.2 + IL_003c: leave.s IL_0053 + + } // end .try + finally + { + IL_003e: ldloc.1 + IL_003f: isinst [mscorlib]System.IDisposable + IL_0044: stloc.s V_4 + .line 100001,100001 : 0,0 '' + IL_0046: ldloc.s V_4 + IL_0048: brfalse.s IL_0052 + + .line 100001,100001 : 0,0 '' + IL_004a: ldloc.s V_4 + IL_004c: callvirt instance void [mscorlib]System.IDisposable::Dispose() + IL_0051: endfinally + .line 100001,100001 : 0,0 '' + IL_0052: endfinally + .line 100001,100001 : 0,0 '' + } // end handler + IL_0053: ldloc.2 + IL_0054: pop + IL_0055: ldloca.s V_0 + IL_0057: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_005c: ret + } // end of method SeqExpressionSteppingTest7::ListExpressionSteppingTest7 + .property class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 r() { @@ -144,7 +872,7 @@ IL_0006: dup IL_0007: stsfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ''.$SeqExpressionSteppingTest7::r@4 IL_000c: stloc.0 - .line 6,6 : 1,19 '' + .line 6,6 : 1,53 '' IL_000d: ldstr "res = %A" IL_0012: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>::.ctor(string) IL_0017: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.il.bsl index 94df7654a1d..4859d49167e 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.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 SeqExpressionTailCalls01 { @@ -36,13 +36,13 @@ // Offset: 0x00000220 Length: 0x0000008C } .module SeqExpressionTailCalls01.exe -// MVID: {60BD414B-093A-A6BE-A745-03834B41BD60} +// MVID: {61E07031-093A-A6BE-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06CE0000 +// Image base: 0x06830000 // =============== CLASS MEMBERS DECLARATION =================== @@ -116,17 +116,18 @@ .line 100001,100001 : 0,0 '' IL_0024: nop - .line 3,3 : 25,32 '' IL_0025: ldarg.0 IL_0026: ldc.i4.1 IL_0027: stfld int32 SeqExpressionTailCalls01/rwalk@3::pc IL_002c: ldarg.0 + .line 3,3 : 31,32 '' IL_002d: ldarg.0 IL_002e: ldfld int32 SeqExpressionTailCalls01/rwalk@3::x IL_0033: stfld int32 SeqExpressionTailCalls01/rwalk@3::current IL_0038: ldc.i4.1 IL_0039: ret + .line 3,3 : 41,52 '' IL_003a: ldarg.0 IL_003b: ldc.i4.2 IL_003c: stfld int32 SeqExpressionTailCalls01/rwalk@3::pc diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.il.bsl index bd032aa6f46..e640d6921bb 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.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 SeqExpressionTailCalls02 { @@ -36,13 +36,13 @@ // Offset: 0x00000258 Length: 0x0000009E } .module SeqExpressionTailCalls02.exe -// MVID: {60BD414B-093A-EC43-A745-03834B41BD60} +// MVID: {61E07031-093A-EC43-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06760000 +// Image base: 0x05230000 // =============== CLASS MEMBERS DECLARATION =================== @@ -116,17 +116,18 @@ .line 100001,100001 : 0,0 '' IL_0024: nop - .line 5,5 : 26,33 '' IL_0025: ldarg.0 IL_0026: ldc.i4.1 IL_0027: stfld int32 SeqExpressionTailCalls02/rwalk1@5::pc IL_002c: ldarg.0 + .line 5,5 : 32,33 '' IL_002d: ldarg.0 IL_002e: ldfld int32 SeqExpressionTailCalls02/rwalk1@5::x IL_0033: stfld int32 SeqExpressionTailCalls02/rwalk1@5::current IL_0038: ldc.i4.1 IL_0039: ret + .line 5,5 : 42,54 '' IL_003a: ldarg.0 IL_003b: ldc.i4.2 IL_003c: stfld int32 SeqExpressionTailCalls02/rwalk1@5::pc @@ -299,17 +300,18 @@ .line 100001,100001 : 0,0 '' IL_0024: nop - .line 6,6 : 26,33 '' IL_0025: ldarg.0 IL_0026: ldc.i4.1 IL_0027: stfld int32 SeqExpressionTailCalls02/rwalk2@6::pc IL_002c: ldarg.0 + .line 6,6 : 32,33 '' IL_002d: ldarg.0 IL_002e: ldfld int32 SeqExpressionTailCalls02/rwalk2@6::x IL_0033: stfld int32 SeqExpressionTailCalls02/rwalk2@6::current IL_0038: ldc.i4.1 IL_0039: ret + .line 6,6 : 42,54 '' IL_003a: ldarg.0 IL_003b: ldc.i4.2 IL_003c: stfld int32 SeqExpressionTailCalls02/rwalk2@6::pc diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl index 27497d9c2c1..9cab640c02b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.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 TopLevelModule { @@ -36,13 +36,13 @@ // Offset: 0x00001148 Length: 0x000003FD } .module TopLevelModule.dll -// MVID: {6125903C-37F5-C118-A745-03833C902561} +// MVID: {61EFEE22-37F5-C118-A745-038322EEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x009E0000 +// Image base: 0x07240000 // =============== 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 65 (0x41) + // Code size 64 (0x40) .maxstack 4 .locals init ([0] class ABC/Expr V_0, [1] class ABC/Expr V_1, @@ -159,68 +159,66 @@ [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 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 '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 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0035 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: 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 + 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 .line 100001,100001 : 0,0 '' - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: bge.s IL_002f + IL_0027: ldloc.3 + IL_0028: ldloc.s V_4 + IL_002a: bge.s IL_002e .line 100001,100001 : 0,0 '' - IL_002d: ldc.i4.m1 - IL_002e: ret + IL_002c: ldc.i4.m1 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_002f: ldloc.3 - IL_0030: ldloc.s V_4 - IL_0032: cgt - IL_0034: ret + IL_002e: ldloc.3 + IL_002f: ldloc.s V_4 + IL_0031: cgt + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0035: ldc.i4.1 - IL_0036: ret + IL_0034: ldc.i4.1 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: brfalse.s IL_003f + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: brfalse.s IL_003e .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.m1 - IL_003e: ret + IL_003c: ldc.i4.m1 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_003e: ldc.i4.0 + IL_003f: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -229,7 +227,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 6,6 : 14,18 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any ABC/Expr @@ -250,7 +247,7 @@ [3] class [mscorlib]System.Collections.IComparer V_3, [4] int32 V_4, [5] int32 V_5) - .line 6,6 : 14,18 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any ABC/Expr IL_0006: stloc.0 @@ -322,51 +319,49 @@ 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 42 (0x2a) + // Code size 41 (0x29) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0028 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0007: ldc.i4.0 - IL_0008: stloc.0 + IL_0006: ldc.i4.0 + IL_0007: stloc.0 .line 100001,100001 : 0,0 '' - IL_0009: ldarg.0 - IL_000a: pop + IL_0008: ldarg.0 + IL_0009: 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_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_0022: add IL_0023: add - IL_0024: add - IL_0025: stloc.0 - IL_0026: ldloc.0 - IL_0027: ret + IL_0024: stloc.0 + IL_0025: ldloc.0 + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_0028: ldc.i4.0 - IL_0029: ret + IL_0027: ldc.i4.0 + IL_0028: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -375,7 +370,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 6,6 : 14,18 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 ABC/Expr::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -387,110 +381,106 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 52 (0x34) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_002d + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst ABC/Expr - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst ABC/Expr + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_002b + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_002a .line 100001,100001 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: stloc.1 + IL_0010: ldloc.0 + IL_0011: stloc.1 .line 100001,100001 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0012: ldarg.0 + IL_0013: 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 + 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 .line 100001,100001 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_002a: ldc.i4.0 + IL_002b: 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_002c: ldarg.1 + IL_002d: ldnull + IL_002e: cgt.un + IL_0030: ldc.i4.0 + IL_0031: ceq + IL_0033: 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 44 (0x2c) + // Code size 43 (0x2b) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0024 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0022 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0021 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: pop .line 100001,100001 : 0,0 '' - 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_0022: ldc.i4.0 - IL_0023: ret - - .line 100001,100001 : 0,0 '' - IL_0024: ldarg.1 - IL_0025: ldnull - IL_0026: cgt.un - IL_0028: ldc.i4.0 - IL_0029: ceq - IL_002b: ret + 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 + + .line 100001,100001 : 0,0 '' + IL_0021: ldc.i4.0 + IL_0022: 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 } // end of method Expr::Equals .method public hidebysig virtual final @@ -500,7 +490,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class ABC/Expr V_0) - .line 6,6 : 14,18 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst ABC/Expr IL_0006: stloc.0 @@ -594,43 +584,41 @@ 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 40 (0x28) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0027 - - .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: 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 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0026 + + .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_0021: add IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0026: ldc.i4.0 + IL_0027: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -639,7 +627,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 7,7 : 19,24 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 ABC/MyExn::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -651,118 +638,114 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 68 (0x44) + // Code size 67 (0x43) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_003c + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst [mscorlib]System.Exception - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst [mscorlib]System.Exception + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_003a + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: stloc.1 + IL_0010: ldloc.0 + IL_0011: 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_0012: ldloc.0 + IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0018: brtrue.s IL_001c - IL_001b: br.s IL_0038 + IL_001a: br.s IL_0037 .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_0038: ldc.i4.0 - IL_0039: ret + IL_0037: ldc.i4.0 + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003c: ldarg.1 - IL_003d: ldnull - IL_003e: cgt.un - IL_0040: ldc.i4.0 - IL_0041: ceq - IL_0043: 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 60 (0x3c) + // Code size 59 (0x3b) .maxstack 8 - .line 7,7 : 19,24 '' - IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0034 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0013: brtrue.s IL_0017 + IL_000c: ldarg.1 + IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0012: brtrue.s IL_0016 - IL_0015: br.s IL_0030 + IL_0014: br.s IL_002f .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_0030: ldc.i4.0 - IL_0031: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_0031: ldc.i4.0 + IL_0032: ret .line 100001,100001 : 0,0 '' - IL_0034: ldarg.1 - IL_0035: ldnull - IL_0036: cgt.un - IL_0038: ldc.i4.0 - IL_0039: ceq - IL_003b: ret + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -772,7 +755,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0) - .line 7,7 : 19,24 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst [mscorlib]System.Exception IL_0006: stloc.0 @@ -809,16 +792,13 @@ { // Code size 16 (0x10) .maxstack 8 - .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 8,8 : 16,17 '' IL_0008: ldarg.0 IL_0009: ldarg.1 IL_000a: stfld string ABC/A::x - .line 8,8 : 14,15 '' IL_000f: ret } // end of method A::.ctor @@ -943,75 +923,73 @@ 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 65 (0x41) + // Code size 64 (0x40) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0037 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0035 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: 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 + 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 .line 100001,100001 : 0,0 '' - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: bge.s IL_002f + IL_0027: ldloc.3 + IL_0028: ldloc.s V_4 + IL_002a: bge.s IL_002e .line 100001,100001 : 0,0 '' - IL_002d: ldc.i4.m1 - IL_002e: ret + IL_002c: ldc.i4.m1 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_002f: ldloc.3 - IL_0030: ldloc.s V_4 - IL_0032: cgt - IL_0034: ret + IL_002e: ldloc.3 + IL_002f: ldloc.s V_4 + IL_0031: cgt + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0035: ldc.i4.1 - IL_0036: ret + IL_0034: ldc.i4.1 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: brfalse.s IL_003f + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: brfalse.s IL_003e .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.m1 - IL_003e: ret + IL_003c: ldc.i4.m1 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_003e: ldc.i4.0 + IL_003f: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1020,7 +998,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 16,16 : 18,22 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any ABC/ABC/Expr @@ -1041,7 +1018,7 @@ [3] class [mscorlib]System.Collections.IComparer V_3, [4] int32 V_4, [5] int32 V_5) - .line 16,16 : 18,22 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any ABC/ABC/Expr IL_0006: stloc.0 @@ -1113,51 +1090,49 @@ 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 42 (0x2a) + // Code size 41 (0x29) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0028 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0007: ldc.i4.0 - IL_0008: stloc.0 + IL_0006: ldc.i4.0 + IL_0007: stloc.0 .line 100001,100001 : 0,0 '' - IL_0009: ldarg.0 - IL_000a: pop + IL_0008: ldarg.0 + IL_0009: 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_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_0022: add IL_0023: add - IL_0024: add - IL_0025: stloc.0 - IL_0026: ldloc.0 - IL_0027: ret + IL_0024: stloc.0 + IL_0025: ldloc.0 + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_0028: ldc.i4.0 - IL_0029: ret + IL_0027: ldc.i4.0 + IL_0028: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1166,7 +1141,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 16,16 : 18,22 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 ABC/ABC/Expr::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -1178,110 +1152,106 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 52 (0x34) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_002d + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst ABC/ABC/Expr - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst ABC/ABC/Expr + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_002b + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_002a .line 100001,100001 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: stloc.1 + IL_0010: ldloc.0 + IL_0011: stloc.1 .line 100001,100001 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0012: ldarg.0 + IL_0013: 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 + 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 .line 100001,100001 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_002a: ldc.i4.0 + IL_002b: 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_002c: ldarg.1 + IL_002d: ldnull + IL_002e: cgt.un + IL_0030: ldc.i4.0 + IL_0031: ceq + IL_0033: 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 44 (0x2c) + // Code size 43 (0x2b) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0024 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0022 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0021 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: pop .line 100001,100001 : 0,0 '' - 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_0022: ldc.i4.0 - IL_0023: ret - - .line 100001,100001 : 0,0 '' - IL_0024: ldarg.1 - IL_0025: ldnull - IL_0026: cgt.un - IL_0028: ldc.i4.0 - IL_0029: ceq - IL_002b: ret + 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 + + .line 100001,100001 : 0,0 '' + IL_0021: ldc.i4.0 + IL_0022: 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 } // end of method Expr::Equals .method public hidebysig virtual final @@ -1291,7 +1261,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class ABC/ABC/Expr V_0) - .line 16,16 : 18,22 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst ABC/ABC/Expr IL_0006: stloc.0 @@ -1385,43 +1355,41 @@ 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 40 (0x28) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0027 - - .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: 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 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0026 + + .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_0021: add IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0026: ldc.i4.0 + IL_0027: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -1430,7 +1398,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 17,17 : 23,28 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 ABC/ABC/MyExn::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -1442,118 +1409,114 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 68 (0x44) + // Code size 67 (0x43) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_003c + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst [mscorlib]System.Exception - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst [mscorlib]System.Exception + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_003a + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: stloc.1 + IL_0010: ldloc.0 + IL_0011: 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_0012: ldloc.0 + IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0018: brtrue.s IL_001c - IL_001b: br.s IL_0038 + IL_001a: br.s IL_0037 .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_0038: ldc.i4.0 - IL_0039: ret + IL_0037: ldc.i4.0 + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003c: ldarg.1 - IL_003d: ldnull - IL_003e: cgt.un - IL_0040: ldc.i4.0 - IL_0041: ceq - IL_0043: 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 60 (0x3c) + // Code size 59 (0x3b) .maxstack 8 - .line 17,17 : 23,28 '' - IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0034 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0013: brtrue.s IL_0017 + IL_000c: ldarg.1 + IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0012: brtrue.s IL_0016 - IL_0015: br.s IL_0030 + IL_0014: br.s IL_002f .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_0030: ldc.i4.0 - IL_0031: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_0031: ldc.i4.0 + IL_0032: ret .line 100001,100001 : 0,0 '' - IL_0034: ldarg.1 - IL_0035: ldnull - IL_0036: cgt.un - IL_0038: ldc.i4.0 - IL_0039: ceq - IL_003b: ret + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -1563,7 +1526,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0) - .line 17,17 : 23,28 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst [mscorlib]System.Exception IL_0006: stloc.0 @@ -1600,16 +1563,13 @@ { // Code size 16 (0x10) .maxstack 8 - .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 18,18 : 20,21 '' IL_0008: ldarg.0 IL_0009: ldarg.1 IL_000a: stfld string ABC/ABC/A::x - .line 18,18 : 18,19 '' IL_000f: ret } // end of method A::.ctor diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl index 5979b8d1850..ae55993ea70 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.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 ToplevelNamespace { @@ -36,13 +36,13 @@ // Offset: 0x00001850 Length: 0x0000055C } .module ToplevelNamespace.dll -// MVID: {61259040-218B-729A-A745-038340902561} +// MVID: {61EFEE23-218B-729A-A745-038323EEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x073B0000 +// Image base: 0x07150000 // =============== 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 65 (0x41) + // Code size 64 (0x40) .maxstack 4 .locals init ([0] class XYZ.Expr V_0, [1] class XYZ.Expr V_1, @@ -154,68 +154,66 @@ [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 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 '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 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0035 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: 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 + 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 .line 100001,100001 : 0,0 '' - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: bge.s IL_002f + IL_0027: ldloc.3 + IL_0028: ldloc.s V_4 + IL_002a: bge.s IL_002e .line 100001,100001 : 0,0 '' - IL_002d: ldc.i4.m1 - IL_002e: ret + IL_002c: ldc.i4.m1 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_002f: ldloc.3 - IL_0030: ldloc.s V_4 - IL_0032: cgt - IL_0034: ret + IL_002e: ldloc.3 + IL_002f: ldloc.s V_4 + IL_0031: cgt + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0035: ldc.i4.1 - IL_0036: ret + IL_0034: ldc.i4.1 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: brfalse.s IL_003f + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: brfalse.s IL_003e .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.m1 - IL_003e: ret + IL_003c: ldc.i4.m1 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_003e: ldc.i4.0 + IL_003f: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -224,7 +222,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 7,7 : 10,14 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any XYZ.Expr @@ -245,7 +242,7 @@ [3] class [mscorlib]System.Collections.IComparer V_3, [4] int32 V_4, [5] int32 V_5) - .line 7,7 : 10,14 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any XYZ.Expr IL_0006: stloc.0 @@ -317,51 +314,49 @@ 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 42 (0x2a) + // Code size 41 (0x29) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0028 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0007: ldc.i4.0 - IL_0008: stloc.0 + IL_0006: ldc.i4.0 + IL_0007: stloc.0 .line 100001,100001 : 0,0 '' - IL_0009: ldarg.0 - IL_000a: pop + IL_0008: ldarg.0 + IL_0009: 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_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_0022: add IL_0023: add - IL_0024: add - IL_0025: stloc.0 - IL_0026: ldloc.0 - IL_0027: ret + IL_0024: stloc.0 + IL_0025: ldloc.0 + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_0028: ldc.i4.0 - IL_0029: ret + IL_0027: ldc.i4.0 + IL_0028: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -370,7 +365,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 7,7 : 10,14 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 XYZ.Expr::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -382,110 +376,106 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 52 (0x34) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_002d + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst XYZ.Expr - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst XYZ.Expr + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_002b + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_002a .line 100001,100001 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: stloc.1 + IL_0010: ldloc.0 + IL_0011: stloc.1 .line 100001,100001 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0012: ldarg.0 + IL_0013: 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 + 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 .line 100001,100001 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_002a: ldc.i4.0 + IL_002b: 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_002c: ldarg.1 + IL_002d: ldnull + IL_002e: cgt.un + IL_0030: ldc.i4.0 + IL_0031: ceq + IL_0033: 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 44 (0x2c) + // Code size 43 (0x2b) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0024 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0022 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0021 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: pop .line 100001,100001 : 0,0 '' - 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_0022: ldc.i4.0 - IL_0023: ret - - .line 100001,100001 : 0,0 '' - IL_0024: ldarg.1 - IL_0025: ldnull - IL_0026: cgt.un - IL_0028: ldc.i4.0 - IL_0029: ceq - IL_002b: ret + 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 + + .line 100001,100001 : 0,0 '' + IL_0021: ldc.i4.0 + IL_0022: 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 } // end of method Expr::Equals .method public hidebysig virtual final @@ -495,7 +485,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class XYZ.Expr V_0) - .line 7,7 : 10,14 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst XYZ.Expr IL_0006: stloc.0 @@ -589,43 +579,41 @@ 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 40 (0x28) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0027 - - .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: 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 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0026 + + .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_0021: add IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0026: ldc.i4.0 + IL_0027: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -634,7 +622,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 8,8 : 15,20 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 XYZ.MyExn::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -646,118 +633,114 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 68 (0x44) + // Code size 67 (0x43) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_003c + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst [mscorlib]System.Exception - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst [mscorlib]System.Exception + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_003a + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: stloc.1 + IL_0010: ldloc.0 + IL_0011: 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_0012: ldloc.0 + IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0018: brtrue.s IL_001c - IL_001b: br.s IL_0038 + IL_001a: br.s IL_0037 .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_0038: ldc.i4.0 - IL_0039: ret + IL_0037: ldc.i4.0 + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003c: ldarg.1 - IL_003d: ldnull - IL_003e: cgt.un - IL_0040: ldc.i4.0 - IL_0041: ceq - IL_0043: 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 60 (0x3c) + // Code size 59 (0x3b) .maxstack 8 - .line 8,8 : 15,20 '' - IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0034 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0013: brtrue.s IL_0017 + IL_000c: ldarg.1 + IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0012: brtrue.s IL_0016 - IL_0015: br.s IL_0030 + IL_0014: br.s IL_002f .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_0030: ldc.i4.0 - IL_0031: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_0031: ldc.i4.0 + IL_0032: ret .line 100001,100001 : 0,0 '' - IL_0034: ldarg.1 - IL_0035: ldnull - IL_0036: cgt.un - IL_0038: ldc.i4.0 - IL_0039: ceq - IL_003b: ret + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -767,7 +750,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0) - .line 8,8 : 15,20 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst [mscorlib]System.Exception IL_0006: stloc.0 @@ -804,16 +787,13 @@ { // Code size 16 (0x10) .maxstack 8 - .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 9,9 : 12,13 '' IL_0008: ldarg.0 IL_0009: ldarg.1 IL_000a: stfld string XYZ.A::x - .line 9,9 : 10,11 '' IL_000f: ret } // end of method A::.ctor @@ -938,75 +918,73 @@ 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 65 (0x41) + // Code size 64 (0x40) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0037 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0035 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: 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 + 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 .line 100001,100001 : 0,0 '' - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: bge.s IL_002f + IL_0027: ldloc.3 + IL_0028: ldloc.s V_4 + IL_002a: bge.s IL_002e .line 100001,100001 : 0,0 '' - IL_002d: ldc.i4.m1 - IL_002e: ret + IL_002c: ldc.i4.m1 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_002f: ldloc.3 - IL_0030: ldloc.s V_4 - IL_0032: cgt - IL_0034: ret + IL_002e: ldloc.3 + IL_002f: ldloc.s V_4 + IL_0031: cgt + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0035: ldc.i4.1 - IL_0036: ret + IL_0034: ldc.i4.1 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: brfalse.s IL_003f + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: brfalse.s IL_003e .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.m1 - IL_003e: ret + IL_003c: ldc.i4.m1 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_003e: ldc.i4.0 + IL_003f: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1015,7 +993,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 13,13 : 14,18 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any XYZ.ABC/Expr @@ -1036,7 +1013,7 @@ [3] class [mscorlib]System.Collections.IComparer V_3, [4] int32 V_4, [5] int32 V_5) - .line 13,13 : 14,18 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any XYZ.ABC/Expr IL_0006: stloc.0 @@ -1108,51 +1085,49 @@ 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 42 (0x2a) + // Code size 41 (0x29) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0028 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0007: ldc.i4.0 - IL_0008: stloc.0 + IL_0006: ldc.i4.0 + IL_0007: stloc.0 .line 100001,100001 : 0,0 '' - IL_0009: ldarg.0 - IL_000a: pop + IL_0008: ldarg.0 + IL_0009: 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_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_0022: add IL_0023: add - IL_0024: add - IL_0025: stloc.0 - IL_0026: ldloc.0 - IL_0027: ret + IL_0024: stloc.0 + IL_0025: ldloc.0 + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_0028: ldc.i4.0 - IL_0029: ret + IL_0027: ldc.i4.0 + IL_0028: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1161,7 +1136,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 13,13 : 14,18 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 XYZ.ABC/Expr::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -1173,110 +1147,106 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 52 (0x34) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_002d + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst XYZ.ABC/Expr - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst XYZ.ABC/Expr + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_002b + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_002a .line 100001,100001 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: stloc.1 + IL_0010: ldloc.0 + IL_0011: stloc.1 .line 100001,100001 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0012: ldarg.0 + IL_0013: 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 + 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 .line 100001,100001 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_002a: ldc.i4.0 + IL_002b: 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_002c: ldarg.1 + IL_002d: ldnull + IL_002e: cgt.un + IL_0030: ldc.i4.0 + IL_0031: ceq + IL_0033: 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 44 (0x2c) + // Code size 43 (0x2b) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0024 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0022 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0021 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: pop .line 100001,100001 : 0,0 '' - 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_0022: ldc.i4.0 - IL_0023: ret - - .line 100001,100001 : 0,0 '' - IL_0024: ldarg.1 - IL_0025: ldnull - IL_0026: cgt.un - IL_0028: ldc.i4.0 - IL_0029: ceq - IL_002b: ret + 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 + + .line 100001,100001 : 0,0 '' + IL_0021: ldc.i4.0 + IL_0022: 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 } // end of method Expr::Equals .method public hidebysig virtual final @@ -1286,7 +1256,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class XYZ.ABC/Expr V_0) - .line 13,13 : 14,18 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst XYZ.ABC/Expr IL_0006: stloc.0 @@ -1380,43 +1350,41 @@ 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 40 (0x28) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0027 - - .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: 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 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0026 + + .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_0021: add IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0026: ldc.i4.0 + IL_0027: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -1425,7 +1393,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 14,14 : 19,24 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 XYZ.ABC/MyExn::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -1437,118 +1404,114 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 68 (0x44) + // Code size 67 (0x43) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_003c + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst [mscorlib]System.Exception - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst [mscorlib]System.Exception + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_003a + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: stloc.1 + IL_0010: ldloc.0 + IL_0011: 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_0012: ldloc.0 + IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0018: brtrue.s IL_001c - IL_001b: br.s IL_0038 + IL_001a: br.s IL_0037 .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_0038: ldc.i4.0 - IL_0039: ret + IL_0037: ldc.i4.0 + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003c: ldarg.1 - IL_003d: ldnull - IL_003e: cgt.un - IL_0040: ldc.i4.0 - IL_0041: ceq - IL_0043: 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 60 (0x3c) + // Code size 59 (0x3b) .maxstack 8 - .line 14,14 : 19,24 '' - IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0034 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0013: brtrue.s IL_0017 + IL_000c: ldarg.1 + IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0012: brtrue.s IL_0016 - IL_0015: br.s IL_0030 + IL_0014: br.s IL_002f .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_0030: ldc.i4.0 - IL_0031: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_0031: ldc.i4.0 + IL_0032: ret .line 100001,100001 : 0,0 '' - IL_0034: ldarg.1 - IL_0035: ldnull - IL_0036: cgt.un - IL_0038: ldc.i4.0 - IL_0039: ceq - IL_003b: ret + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -1558,7 +1521,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0) - .line 14,14 : 19,24 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst [mscorlib]System.Exception IL_0006: stloc.0 @@ -1595,16 +1558,13 @@ { // Code size 16 (0x10) .maxstack 8 - .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 15,15 : 16,17 '' IL_0008: ldarg.0 IL_0009: ldarg.1 IL_000a: stfld string XYZ.ABC/A::x - .line 15,15 : 14,15 '' IL_000f: ret } // end of method A::.ctor @@ -1729,75 +1689,73 @@ 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 65 (0x41) + // Code size 64 (0x40) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0037 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0036 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0035 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0034 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: 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/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 + 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 .line 100001,100001 : 0,0 '' - IL_0028: ldloc.3 - IL_0029: ldloc.s V_4 - IL_002b: bge.s IL_002f + IL_0027: ldloc.3 + IL_0028: ldloc.s V_4 + IL_002a: bge.s IL_002e .line 100001,100001 : 0,0 '' - IL_002d: ldc.i4.m1 - IL_002e: ret + IL_002c: ldc.i4.m1 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_002f: ldloc.3 - IL_0030: ldloc.s V_4 - IL_0032: cgt - IL_0034: ret + IL_002e: ldloc.3 + IL_002f: ldloc.s V_4 + IL_0031: cgt + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0035: ldc.i4.1 - IL_0036: ret + IL_0034: ldc.i4.1 + IL_0035: ret .line 100001,100001 : 0,0 '' - IL_0037: ldarg.1 - IL_0038: ldnull - IL_0039: cgt.un - IL_003b: brfalse.s IL_003f + IL_0036: ldarg.1 + IL_0037: ldnull + IL_0038: cgt.un + IL_003a: brfalse.s IL_003e .line 100001,100001 : 0,0 '' - IL_003d: ldc.i4.m1 - IL_003e: ret + IL_003c: ldc.i4.m1 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_003e: ldc.i4.0 + IL_003f: ret } // end of method Expr::CompareTo .method public hidebysig virtual final @@ -1806,7 +1764,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 23,23 : 18,22 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any XYZ.ABC/ABC/Expr @@ -1827,7 +1784,7 @@ [3] class [mscorlib]System.Collections.IComparer V_3, [4] int32 V_4, [5] int32 V_5) - .line 23,23 : 18,22 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any XYZ.ABC/ABC/Expr IL_0006: stloc.0 @@ -1899,51 +1856,49 @@ 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 42 (0x2a) + // Code size 41 (0x29) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0028 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0007: ldc.i4.0 - IL_0008: stloc.0 + IL_0006: ldc.i4.0 + IL_0007: stloc.0 .line 100001,100001 : 0,0 '' - IL_0009: ldarg.0 - IL_000a: pop + IL_0008: ldarg.0 + IL_0009: 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_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_0022: add IL_0023: add - IL_0024: add - IL_0025: stloc.0 - IL_0026: ldloc.0 - IL_0027: ret + IL_0024: stloc.0 + IL_0025: ldloc.0 + IL_0026: ret .line 100001,100001 : 0,0 '' - IL_0028: ldc.i4.0 - IL_0029: ret + IL_0027: ldc.i4.0 + IL_0028: ret } // end of method Expr::GetHashCode .method public hidebysig virtual final @@ -1952,7 +1907,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 23,23 : 18,22 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 XYZ.ABC/ABC/Expr::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -1964,110 +1918,106 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 53 (0x35) + // Code size 52 (0x34) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_002d + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_002c .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst XYZ.ABC/ABC/Expr - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst XYZ.ABC/ABC/Expr + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_002b + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_002a .line 100001,100001 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: stloc.1 + IL_0010: ldloc.0 + IL_0011: stloc.1 .line 100001,100001 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0012: ldarg.0 + IL_0013: 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 + 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 .line 100001,100001 : 0,0 '' - IL_002b: ldc.i4.0 - IL_002c: ret + IL_002a: ldc.i4.0 + IL_002b: 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_002c: ldarg.1 + IL_002d: ldnull + IL_002e: cgt.un + IL_0030: ldc.i4.0 + IL_0031: ceq + IL_0033: 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 44 (0x2c) + // Code size 43 (0x2b) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0024 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0023 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0022 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0021 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: pop .line 100001,100001 : 0,0 '' - 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_0022: ldc.i4.0 - IL_0023: ret - - .line 100001,100001 : 0,0 '' - IL_0024: ldarg.1 - IL_0025: ldnull - IL_0026: cgt.un - IL_0028: ldc.i4.0 - IL_0029: ceq - IL_002b: ret + 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 + + .line 100001,100001 : 0,0 '' + IL_0021: ldc.i4.0 + IL_0022: 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 } // end of method Expr::Equals .method public hidebysig virtual final @@ -2077,7 +2027,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class XYZ.ABC/ABC/Expr V_0) - .line 23,23 : 18,22 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst XYZ.ABC/ABC/Expr IL_0006: stloc.0 @@ -2171,43 +2121,41 @@ 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 40 (0x28) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0027 - - .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: 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 + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0026 + + .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_0021: add IL_0022: add - IL_0023: add - IL_0024: stloc.0 - IL_0025: ldloc.0 - IL_0026: ret + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ret .line 100001,100001 : 0,0 '' - IL_0027: ldc.i4.0 - IL_0028: ret + IL_0026: ldc.i4.0 + IL_0027: ret } // end of method MyExn::GetHashCode .method public hidebysig virtual instance int32 @@ -2216,7 +2164,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 24,24 : 23,28 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 XYZ.ABC/ABC/MyExn::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -2228,118 +2175,114 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 68 (0x44) + // Code size 67 (0x43) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_003c + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003b .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst [mscorlib]System.Exception - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst [mscorlib]System.Exception + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_003a + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: stloc.1 + IL_0010: ldloc.0 + IL_0011: 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_0012: ldloc.0 + IL_0013: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0018: brtrue.s IL_001c - IL_001b: br.s IL_0038 + IL_001a: br.s IL_0037 .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_0038: ldc.i4.0 - IL_0039: ret + IL_0037: ldc.i4.0 + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 100001,100001 : 0,0 '' - IL_003c: ldarg.1 - IL_003d: ldnull - IL_003e: cgt.un - IL_0040: ldc.i4.0 - IL_0041: ceq - IL_0043: 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 60 (0x3c) + // Code size 59 (0x3b) .maxstack 8 - .line 24,24 : 23,28 '' - IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0034 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.1 - IL_000e: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) - IL_0013: brtrue.s IL_0017 + IL_000c: ldarg.1 + IL_000d: call bool [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::TypeTestGeneric(object) + IL_0012: brtrue.s IL_0016 - IL_0015: br.s IL_0030 + IL_0014: br.s IL_002f .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_0030: ldc.i4.0 - IL_0031: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_0031: ldc.i4.0 + IL_0032: ret .line 100001,100001 : 0,0 '' - IL_0034: ldarg.1 - IL_0035: ldnull - IL_0036: cgt.un - IL_0038: ldc.i4.0 - IL_0039: ceq - IL_003b: ret + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret } // end of method MyExn::Equals .method public hidebysig virtual instance bool @@ -2349,7 +2292,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0) - .line 24,24 : 23,28 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst [mscorlib]System.Exception IL_0006: stloc.0 @@ -2386,16 +2329,13 @@ { // Code size 16 (0x10) .maxstack 8 - .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 25,25 : 20,21 '' IL_0008: ldarg.0 IL_0009: ldarg.1 IL_000a: stfld string XYZ.ABC/ABC/A::x - .line 25,25 : 18,19 '' IL_000f: ret } // end of method A::.ctor diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/LetBinding01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/LetBinding01.il.bsl index 849857520b5..8dc585e0a8a 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/LetBinding01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/LetBinding01.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 LetBinding01 { @@ -36,13 +36,13 @@ // Offset: 0x000001B8 Length: 0x00000070 } .module LetBinding01.exe -// MVID: {608C050A-269D-BEEF-A745-03830A058C60} +// MVID: {61E07031-269D-BEEF-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x066B0000 +// Image base: 0x051E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -85,7 +85,7 @@ .line 5,5 : 1,11 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\StaticInit\\LetBinding01.fs' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Core.Unit LetBinding01::get_x() IL_0005: pop - .line 6,6 : 1,17 '' + .line 6,6 : 1,19 '' IL_0006: ldstr "x = %A" IL_000b: 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,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::.ctor(string) IL_0010: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) 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 d65cdab3db2..a203c207a38 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Class01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Class01.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 StaticInit_Class01 { @@ -36,13 +36,13 @@ // Offset: 0x00000338 Length: 0x000000AD } .module StaticInit_Class01.dll -// MVID: {611C4D99-EC34-E66E-A745-0383994D1C61} +// MVID: {61E07031-EC34-E66E-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06F20000 +// Image base: 0x071A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,13 +62,10 @@ { // Code size 9 (0x9) .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\\StaticInit\\StaticInit_Class01.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 4,4 : 6,7 '' IL_0008: ret } // end of method C::.ctor @@ -77,7 +74,8 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 38 (0x26) .maxstack 8 - .line 7,7 : 23,37 '' + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 7,7 : 23,37 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\StaticInit\\StaticInit_Class01.fs' IL_0000: nop .line 100001,100001 : 0,0 '' IL_0001: volatile. @@ -130,14 +128,12 @@ { // Code size 24 (0x18) .maxstack 8 - .line 6,6 : 12,30 '' IL_0000: ldstr "1" IL_0005: callvirt instance int32 [mscorlib]System.String::get_Length() IL_000a: stsfld int32 StaticInit_ClassS01/C::x IL_000f: ldc.i4.1 IL_0010: volatile. IL_0012: stsfld int32 StaticInit_ClassS01/C::init@4 - .line 4,4 : 6,7 '' IL_0017: ret } // end of method $StaticInit_ClassS01::.cctor 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 589b435e0d9..412169b9868 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.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 extern netstandard { @@ -41,13 +41,13 @@ // Offset: 0x000007A8 Length: 0x0000021F } .module StaticInit_Struct01.dll -// MVID: {611C52B1-05F6-D6CB-A745-0383B1521C61} +// MVID: {61EFEE1F-05F6-D6CB-A745-03831FEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06550000 +// Image base: 0x07310000 // =============== CLASS MEMBERS DECLARATION =================== @@ -74,10 +74,8 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 27 (0x1b) .maxstack 4 - .locals init ([0] valuetype StaticInit_Struct01/C& V_0, - [1] class [mscorlib]System.Collections.IComparer V_1) - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 4,4 : 6,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\StaticInit\\StaticInit_Struct01.fs' + .locals init (valuetype StaticInit_Struct01/C& V_0, + class [mscorlib]System.Collections.IComparer V_1) IL_0000: ldarga.s obj IL_0002: stloc.0 IL_0003: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() @@ -97,7 +95,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 4,4 : 6,7 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any StaticInit_Struct01/C @@ -112,10 +109,9 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 30 (0x1e) .maxstack 4 - .locals init ([0] valuetype StaticInit_Struct01/C V_0, - [1] valuetype StaticInit_Struct01/C& V_1, - [2] class [mscorlib]System.Collections.IComparer V_2) - .line 4,4 : 6,7 '' + .locals init (valuetype StaticInit_Struct01/C V_0, + valuetype StaticInit_Struct01/C& V_1, + class [mscorlib]System.Collections.IComparer V_2) IL_0000: ldarg.1 IL_0001: unbox.any StaticInit_Struct01/C IL_0006: stloc.0 @@ -138,8 +134,7 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 31 (0x1f) .maxstack 7 - .locals init ([0] int32 V_0) - .line 4,4 : 6,7 '' + .locals init (int32 V_0) IL_0000: ldc.i4.0 IL_0001: stloc.0 IL_0002: ldc.i4 0x9e3779b9 @@ -168,7 +163,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 6,7 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: call instance int32 StaticInit_Struct01/C::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -185,7 +179,8 @@ .locals init ([0] valuetype StaticInit_Struct01/C V_0, [1] valuetype StaticInit_Struct01/C& V_1, [2] class [mscorlib]System.Collections.IEqualityComparer V_2) - .line 100001,100001 : 0,0 '' + .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 @@ -218,11 +213,9 @@ { // Code size 8 (0x8) .maxstack 8 - .line 4,4 : 8,9 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: stfld valuetype [mscorlib]System.DateTime StaticInit_Struct01/C::s - .line 4,4 : 6,7 '' IL_0007: ret } // end of method C::.ctor @@ -261,8 +254,7 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 21 (0x15) .maxstack 4 - .locals init ([0] valuetype StaticInit_Struct01/C& V_0) - .line 4,4 : 6,7 '' + .locals init (valuetype StaticInit_Struct01/C& V_0) IL_0000: ldarga.s obj IL_0002: stloc.0 IL_0003: ldarg.0 @@ -331,14 +323,12 @@ { // Code size 24 (0x18) .maxstack 8 - .line 6,6 : 12,30 '' IL_0000: ldstr "1" IL_0005: callvirt instance int32 [mscorlib]System.String::get_Length() IL_000a: stsfld int32 StaticInit_Struct01/C::x IL_000f: ldc.i4.1 IL_0010: volatile. IL_0012: stsfld int32 StaticInit_Struct01/C::init@4 - .line 4,4 : 6,7 '' IL_0017: ret } // end of method $StaticInit_Struct01::.cctor diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl index 9a549b41ea9..9a57805b166 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch06.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch06.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 SteppingMatch06 { @@ -36,13 +36,13 @@ // Offset: 0x00000680 Length: 0x000001D9 } .module SteppingMatch06.dll -// MVID: {611C4D99-4FAE-FD21-A745-0383994D1C61} +// MVID: {61E07031-4FAE-FD21-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05850000 +// Image base: 0x06D40000 // =============== CLASS MEMBERS DECLARATION =================== @@ -205,64 +205,62 @@ instance int32 CompareTo(class SteppingMatch06/Discr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 49 (0x31) + // Code size 48 (0x30) .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 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 '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 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0025 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_001b: ldloc.0 - IL_001c: ldloc.1 - IL_001d: bne.un.s IL_0021 + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: bne.un.s IL_0020 .line 100001,100001 : 0,0 '' - IL_001f: ldc.i4.0 - IL_0020: ret + IL_001e: ldc.i4.0 + IL_001f: ret .line 100001,100001 : 0,0 '' - IL_0021: ldloc.0 - IL_0022: ldloc.1 - IL_0023: sub - IL_0024: ret + IL_0020: ldloc.0 + IL_0021: ldloc.1 + IL_0022: sub + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.1 - IL_0026: ret + IL_0024: ldc.i4.1 + IL_0025: ret .line 100001,100001 : 0,0 '' - IL_0027: ldarg.1 - IL_0028: ldnull - IL_0029: cgt.un - IL_002b: brfalse.s IL_002f + IL_0026: ldarg.1 + IL_0027: ldnull + IL_0028: cgt.un + IL_002a: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_002d: ldc.i4.m1 - IL_002e: ret + IL_002c: ldc.i4.m1 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002e: ldc.i4.0 + IL_002f: ret } // end of method Discr::CompareTo .method public hidebysig virtual final @@ -271,7 +269,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 4,4 : 6,11 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any SteppingMatch06/Discr @@ -289,7 +286,7 @@ .locals init ([0] class SteppingMatch06/Discr V_0, [1] int32 V_1, [2] int32 V_2) - .line 4,4 : 6,11 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any SteppingMatch06/Discr IL_0006: stloc.0 @@ -352,27 +349,25 @@ 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 18 (0x12) + // Code size 17 (0x11) .maxstack 3 .locals init ([0] int32 V_0) - .line 4,4 : 6,11 '' - IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0010 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_000f .line 100001,100001 : 0,0 '' - IL_0007: ldc.i4.0 - IL_0008: stloc.0 - IL_0009: ldarg.0 - IL_000a: ldfld int32 SteppingMatch06/Discr::_tag - IL_000f: ret + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + IL_0008: ldarg.0 + IL_0009: ldfld int32 SteppingMatch06/Discr::_tag + IL_000e: ret .line 100001,100001 : 0,0 '' - IL_0010: ldc.i4.0 - IL_0011: ret + IL_000f: ldc.i4.0 + IL_0010: ret } // end of method Discr::GetHashCode .method public hidebysig virtual final @@ -381,7 +376,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 6,11 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 SteppingMatch06/Discr::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -393,102 +387,98 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 48 (0x30) + // Code size 47 (0x2f) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0028 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst SteppingMatch06/Discr - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst SteppingMatch06/Discr + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0026 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0025 .line 100001,100001 : 0,0 '' - 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 + 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 + .line 100001,100001 : 0,0 '' + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: ceq + IL_0024: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0025: ldc.i4.0 + IL_0026: 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 + 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 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 42 (0x2a) + // Code size 41 (0x29) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0022 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0021 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0020 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_001f .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_001b: ldloc.0 - IL_001c: ldloc.1 - IL_001d: ceq - IL_001f: ret + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: ceq + IL_001e: ret .line 100001,100001 : 0,0 '' - IL_0020: ldc.i4.0 - IL_0021: ret + IL_001f: ldc.i4.0 + IL_0020: ret .line 100001,100001 : 0,0 '' - IL_0022: ldarg.1 - IL_0023: ldnull - IL_0024: cgt.un - IL_0026: ldc.i4.0 - IL_0027: ceq - IL_0029: ret + IL_0021: ldarg.1 + IL_0022: ldnull + IL_0023: cgt.un + IL_0025: ldc.i4.0 + IL_0026: ceq + IL_0028: ret } // end of method Discr::Equals .method public hidebysig virtual final @@ -498,7 +488,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class SteppingMatch06/Discr V_0) - .line 4,4 : 6,11 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst SteppingMatch06/Discr IL_0006: stloc.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl index 76a3997425f..733e90f336d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch07.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch07.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 SteppingMatch07 { @@ -36,13 +36,13 @@ // Offset: 0x00000680 Length: 0x000001D9 } .module SteppingMatch07.dll -// MVID: {611C4D99-D373-07F3-A745-0383994D1C61} +// MVID: {61E07031-D373-07F3-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06780000 +// Image base: 0x073B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -205,64 +205,62 @@ instance int32 CompareTo(class SteppingMatch07/Discr obj) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 49 (0x31) + // Code size 48 (0x30) .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 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 '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 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0025 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0024 .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_001b: ldloc.0 - IL_001c: ldloc.1 - IL_001d: bne.un.s IL_0021 + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: bne.un.s IL_0020 .line 100001,100001 : 0,0 '' - IL_001f: ldc.i4.0 - IL_0020: ret + IL_001e: ldc.i4.0 + IL_001f: ret .line 100001,100001 : 0,0 '' - IL_0021: ldloc.0 - IL_0022: ldloc.1 - IL_0023: sub - IL_0024: ret + IL_0020: ldloc.0 + IL_0021: ldloc.1 + IL_0022: sub + IL_0023: ret .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.1 - IL_0026: ret + IL_0024: ldc.i4.1 + IL_0025: ret .line 100001,100001 : 0,0 '' - IL_0027: ldarg.1 - IL_0028: ldnull - IL_0029: cgt.un - IL_002b: brfalse.s IL_002f + IL_0026: ldarg.1 + IL_0027: ldnull + IL_0028: cgt.un + IL_002a: brfalse.s IL_002e .line 100001,100001 : 0,0 '' - IL_002d: ldc.i4.m1 - IL_002e: ret + IL_002c: ldc.i4.m1 + IL_002d: ret .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.0 - IL_0030: ret + IL_002e: ldc.i4.0 + IL_002f: ret } // end of method Discr::CompareTo .method public hidebysig virtual final @@ -271,7 +269,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 4,4 : 6,11 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any SteppingMatch07/Discr @@ -289,7 +286,7 @@ .locals init ([0] class SteppingMatch07/Discr V_0, [1] int32 V_1, [2] int32 V_2) - .line 4,4 : 6,11 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any SteppingMatch07/Discr IL_0006: stloc.0 @@ -352,27 +349,25 @@ 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 18 (0x12) + // Code size 17 (0x11) .maxstack 3 .locals init ([0] int32 V_0) - .line 4,4 : 6,11 '' - IL_0000: nop .line 100001,100001 : 0,0 '' - IL_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0010 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_000f .line 100001,100001 : 0,0 '' - IL_0007: ldc.i4.0 - IL_0008: stloc.0 - IL_0009: ldarg.0 - IL_000a: ldfld int32 SteppingMatch07/Discr::_tag - IL_000f: ret + IL_0006: ldc.i4.0 + IL_0007: stloc.0 + IL_0008: ldarg.0 + IL_0009: ldfld int32 SteppingMatch07/Discr::_tag + IL_000e: ret .line 100001,100001 : 0,0 '' - IL_0010: ldc.i4.0 - IL_0011: ret + IL_000f: ldc.i4.0 + IL_0010: ret } // end of method Discr::GetHashCode .method public hidebysig virtual final @@ -381,7 +376,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 6,11 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 SteppingMatch07/Discr::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -393,102 +387,98 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 48 (0x30) + // Code size 47 (0x2f) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0028 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0027 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst SteppingMatch07/Discr - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst SteppingMatch07/Discr + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0026 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0025 .line 100001,100001 : 0,0 '' - 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 + 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 + .line 100001,100001 : 0,0 '' + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: ceq + IL_0024: ret .line 100001,100001 : 0,0 '' - IL_0026: ldc.i4.0 - IL_0027: ret + IL_0025: ldc.i4.0 + IL_0026: 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 + 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 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 42 (0x2a) + // Code size 41 (0x29) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0022 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0021 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0020 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_001f .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_001b: ldloc.0 - IL_001c: ldloc.1 - IL_001d: ceq - IL_001f: ret + IL_001a: ldloc.0 + IL_001b: ldloc.1 + IL_001c: ceq + IL_001e: ret .line 100001,100001 : 0,0 '' - IL_0020: ldc.i4.0 - IL_0021: ret + IL_001f: ldc.i4.0 + IL_0020: ret .line 100001,100001 : 0,0 '' - IL_0022: ldarg.1 - IL_0023: ldnull - IL_0024: cgt.un - IL_0026: ldc.i4.0 - IL_0027: ceq - IL_0029: ret + IL_0021: ldarg.1 + IL_0022: ldnull + IL_0023: cgt.un + IL_0025: ldc.i4.0 + IL_0026: ceq + IL_0028: ret } // end of method Discr::Equals .method public hidebysig virtual final @@ -498,7 +488,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class SteppingMatch07/Discr V_0) - .line 4,4 : 6,11 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst SteppingMatch07/Discr IL_0006: stloc.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl index 0a66e664385..900e4276fbd 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch09.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 SteppingMatch09 { @@ -36,13 +36,13 @@ // Offset: 0x00000310 Length: 0x000000EB } .module SteppingMatch09.dll -// MVID: {611C4D99-4935-D6AC-A745-0383994D1C61} +// MVID: {61E07031-4935-D6AC-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07080000 +// Image base: 0x05B50000 // =============== CLASS MEMBERS DECLARATION =================== @@ -72,6 +72,8 @@ .method public strict virtual instance object Specialize() cil managed { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction16.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction16.il.bsl index 053da8e2bc1..92e53fdc94f 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction16.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction16.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 TestFunction16 { @@ -36,13 +36,13 @@ // Offset: 0x00000688 Length: 0x000001CD } .module TestFunction16.exe -// MVID: {611C52B3-A624-45C5-A745-0383B3521C61} +// MVID: {61EFEE1F-A624-45C5-A745-03831FEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07120000 +// Image base: 0x069E0000 // =============== 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 121 (0x79) + // Code size 120 (0x78) .maxstack 4 .locals init ([0] class TestFunction16/U V_0, [1] class TestFunction16/U V_1, @@ -186,114 +186,112 @@ [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 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 '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 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006d + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_006c .line 100001,100001 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: 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 + 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 .line 100001,100001 : 0,0 '' - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: bge.s IL_0033 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_0030: nop - IL_0031: br.s IL_003a + IL_002f: nop + IL_0030: br.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0033: ldloc.s V_4 - IL_0035: ldloc.s V_5 - IL_0037: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 100001,100001 : 0,0 '' - IL_0039: nop + IL_0038: nop .line 100001,100001 : 0,0 '' - IL_003a: stloc.2 + IL_0039: stloc.2 .line 100001,100001 : 0,0 '' - IL_003b: ldloc.2 - IL_003c: ldc.i4.0 - IL_003d: bge.s IL_0041 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 100001,100001 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ret + IL_003e: ldloc.2 + IL_003f: ret .line 100001,100001 : 0,0 '' - IL_0041: ldloc.2 - IL_0042: ldc.i4.0 - IL_0043: ble.s IL_0047 + IL_0040: ldloc.2 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 100001,100001 : 0,0 '' - IL_0045: ldloc.2 - IL_0046: ret + IL_0044: ldloc.2 + IL_0045: ret .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_005e: ldloc.s V_7 - IL_0060: ldloc.s V_8 - IL_0062: bge.s IL_0066 + IL_005d: ldloc.s V_7 + IL_005f: ldloc.s V_8 + IL_0061: bge.s IL_0065 .line 100001,100001 : 0,0 '' - IL_0064: ldc.i4.m1 - IL_0065: ret + IL_0063: ldc.i4.m1 + IL_0064: ret .line 100001,100001 : 0,0 '' - IL_0066: ldloc.s V_7 - IL_0068: ldloc.s V_8 - IL_006a: cgt - IL_006c: ret + IL_0065: ldloc.s V_7 + IL_0067: ldloc.s V_8 + IL_0069: cgt + IL_006b: ret .line 100001,100001 : 0,0 '' - IL_006d: ldc.i4.1 - IL_006e: ret + IL_006c: ldc.i4.1 + IL_006d: ret .line 100001,100001 : 0,0 '' - IL_006f: ldarg.1 - IL_0070: ldnull - IL_0071: cgt.un - IL_0073: brfalse.s IL_0077 + IL_006e: ldarg.1 + IL_006f: ldnull + IL_0070: cgt.un + IL_0072: brfalse.s IL_0076 .line 100001,100001 : 0,0 '' - IL_0075: ldc.i4.m1 - IL_0076: ret + IL_0074: ldc.i4.m1 + IL_0075: ret .line 100001,100001 : 0,0 '' - IL_0077: ldc.i4.0 - IL_0078: ret + IL_0076: ldc.i4.0 + IL_0077: ret } // end of method U::CompareTo .method public hidebysig virtual final @@ -302,7 +300,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 4,4 : 6,7 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any TestFunction16/U @@ -327,7 +324,7 @@ [7] class [mscorlib]System.Collections.IComparer V_7, [8] int32 V_8, [9] int32 V_9) - .line 4,4 : 6,7 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any TestFunction16/U IL_0006: stloc.0 @@ -445,67 +442,65 @@ 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 65 (0x41) + // Code size 64 (0x40) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_003f + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003e .line 100001,100001 : 0,0 '' - IL_0007: ldc.i4.0 - IL_0008: stloc.0 + IL_0006: ldc.i4.0 + IL_0007: stloc.0 .line 100001,100001 : 0,0 '' - IL_0009: ldarg.0 - IL_000a: pop + IL_0008: ldarg.0 + IL_0009: 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_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_0022: add IL_0023: 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_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_0039: add IL_003a: add - IL_003b: add - IL_003c: stloc.0 - IL_003d: ldloc.0 - IL_003e: ret + IL_003b: stloc.0 + IL_003c: ldloc.0 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_003e: ldc.i4.0 + IL_003f: ret } // end of method U::GetHashCode .method public hidebysig virtual final @@ -514,7 +509,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 6,7 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 TestFunction16/U::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -526,7 +520,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 74 (0x4a) + // Code size 73 (0x49) .maxstack 4 .locals init ([0] class TestFunction16/U V_0, [1] class TestFunction16/U V_1, @@ -534,130 +528,126 @@ [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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0042 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0041 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst TestFunction16/U - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst TestFunction16/U + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0040 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_003f .line 100001,100001 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: stloc.1 + IL_0010: ldloc.0 + IL_0011: stloc.1 .line 100001,100001 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_0015: ldarg.0 - IL_0016: stloc.2 - IL_0017: ldloc.1 - IL_0018: stloc.3 + IL_0014: ldarg.0 + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: 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 + 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_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 + 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 .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_003d: ldc.i4.0 + IL_003e: ret .line 100001,100001 : 0,0 '' - IL_0040: ldc.i4.0 - IL_0041: ret + IL_003f: ldc.i4.0 + IL_0040: ret .line 100001,100001 : 0,0 '' - IL_0042: ldarg.1 - IL_0043: ldnull - IL_0044: cgt.un - IL_0046: ldc.i4.0 - IL_0047: ceq - IL_0049: ret + IL_0041: ldarg.1 + IL_0042: ldnull + IL_0043: cgt.un + IL_0045: ldc.i4.0 + IL_0046: ceq + IL_0048: 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 60 (0x3c) + // Code size 59 (0x3b) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0034 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: pop .line 100001,100001 : 0,0 '' - IL_000f: ldarg.0 - IL_0010: stloc.0 - IL_0011: ldarg.1 - IL_0012: stloc.1 + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: 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 + 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 .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_0030: ldc.i4.0 - IL_0031: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_0031: ldc.i4.0 + IL_0032: ret .line 100001,100001 : 0,0 '' - IL_0034: ldarg.1 - IL_0035: ldnull - IL_0036: cgt.un - IL_0038: ldc.i4.0 - IL_0039: ceq - IL_003b: ret + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret } // end of method U::Equals .method public hidebysig virtual final @@ -667,7 +657,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class TestFunction16/U V_0) - .line 4,4 : 6,7 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst TestFunction16/U IL_0006: stloc.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction17.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction17.il.bsl index 5b097b711ff..cadb6fe4694 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction17.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction17.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 TestFunction17 { @@ -36,13 +36,13 @@ // Offset: 0x00000678 Length: 0x000001CD } .module TestFunction17.exe -// MVID: {611C52B3-A624-45A8-A745-0383B3521C61} +// MVID: {61EFEE1F-A624-45A8-A745-03831FEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B30000 +// Image base: 0x06AF0000 // =============== 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 109 (0x6d) + // Code size 108 (0x6c) .maxstack 4 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IComparer V_1, @@ -129,107 +129,105 @@ [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 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 '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 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0061 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0060 .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_0021: ldloc.2 - IL_0022: ldloc.3 - IL_0023: bge.s IL_0029 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: bge.s IL_0028 .line 100001,100001 : 0,0 '' - IL_0025: ldc.i4.m1 + IL_0024: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_0026: nop - IL_0027: br.s IL_002e + IL_0025: nop + IL_0026: br.s IL_002d .line 100001,100001 : 0,0 '' - IL_0029: ldloc.2 - IL_002a: ldloc.3 - IL_002b: cgt + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: cgt .line 100001,100001 : 0,0 '' - IL_002d: nop + IL_002c: nop .line 100001,100001 : 0,0 '' - IL_002e: stloc.0 + IL_002d: stloc.0 .line 100001,100001 : 0,0 '' - IL_002f: ldloc.0 - IL_0030: ldc.i4.0 - IL_0031: bge.s IL_0035 + IL_002e: ldloc.0 + IL_002f: ldc.i4.0 + IL_0030: bge.s IL_0034 .line 100001,100001 : 0,0 '' - IL_0033: ldloc.0 - IL_0034: ret + IL_0032: ldloc.0 + IL_0033: ret .line 100001,100001 : 0,0 '' - IL_0035: ldloc.0 - IL_0036: ldc.i4.0 - IL_0037: ble.s IL_003b + IL_0034: ldloc.0 + IL_0035: ldc.i4.0 + IL_0036: ble.s IL_003a .line 100001,100001 : 0,0 '' - IL_0039: ldloc.0 - IL_003a: ret + IL_0038: ldloc.0 + IL_0039: ret .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_0052: ldloc.s V_5 - IL_0054: ldloc.s V_6 - IL_0056: bge.s IL_005a + IL_0051: ldloc.s V_5 + IL_0053: ldloc.s V_6 + IL_0055: bge.s IL_0059 .line 100001,100001 : 0,0 '' - IL_0058: ldc.i4.m1 - IL_0059: ret + IL_0057: ldc.i4.m1 + IL_0058: ret .line 100001,100001 : 0,0 '' - IL_005a: ldloc.s V_5 - IL_005c: ldloc.s V_6 - IL_005e: cgt - IL_0060: ret + IL_0059: ldloc.s V_5 + IL_005b: ldloc.s V_6 + IL_005d: cgt + IL_005f: ret .line 100001,100001 : 0,0 '' - IL_0061: ldc.i4.1 - IL_0062: ret + IL_0060: ldc.i4.1 + IL_0061: ret .line 100001,100001 : 0,0 '' - IL_0063: ldarg.1 - IL_0064: ldnull - IL_0065: cgt.un - IL_0067: brfalse.s IL_006b + IL_0062: ldarg.1 + IL_0063: ldnull + IL_0064: cgt.un + IL_0066: brfalse.s IL_006a .line 100001,100001 : 0,0 '' - IL_0069: ldc.i4.m1 - IL_006a: ret + IL_0068: ldc.i4.m1 + IL_0069: ret .line 100001,100001 : 0,0 '' - IL_006b: ldc.i4.0 - IL_006c: ret + IL_006a: ldc.i4.0 + IL_006b: ret } // end of method R::CompareTo .method public hidebysig virtual final @@ -238,7 +236,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 4,4 : 6,7 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any TestFunction17/R @@ -262,7 +259,7 @@ [6] class [mscorlib]System.Collections.IComparer V_6, [7] int32 V_7, [8] int32 V_8) - .line 4,4 : 6,7 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any TestFunction17/R IL_0006: stloc.0 @@ -375,58 +372,56 @@ 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 59 (0x3b) + // Code size 58 (0x3a) .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 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 + .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 IL_001c: add IL_001d: 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_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_0033: add IL_0034: add - IL_0035: add - IL_0036: stloc.0 - IL_0037: ldloc.0 - IL_0038: ret + IL_0035: stloc.0 + IL_0036: ldloc.0 + IL_0037: ret .line 100001,100001 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_0038: ldc.i4.0 + IL_0039: ret } // end of method R::GetHashCode .method public hidebysig virtual final @@ -435,7 +430,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 6,7 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 TestFunction17/R::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -447,118 +441,114 @@ 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 65 (0x41) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_003a + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst TestFunction17/R - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst TestFunction17/R + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0038 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0037 .line 100001,100001 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: stloc.1 + IL_0010: ldloc.0 + IL_0011: 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 + 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 .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_0036: ldc.i4.0 - IL_0037: ret + IL_0035: ldc.i4.0 + IL_0036: ret .line 100001,100001 : 0,0 '' - IL_0038: ldc.i4.0 - IL_0039: ret + IL_0037: ldc.i4.0 + IL_0038: ret .line 100001,100001 : 0,0 '' - IL_003a: ldarg.1 - IL_003b: ldnull - IL_003c: cgt.un - IL_003e: ldc.i4.0 - IL_003f: ceq - IL_0041: ret + IL_0039: ldarg.1 + IL_003a: ldnull + IL_003b: cgt.un + IL_003d: ldc.i4.0 + IL_003e: ceq + IL_0040: 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 54 (0x36) + // Code size 53 (0x35) .maxstack 8 - .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_002e + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_002d .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_002c + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_002b .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 100001,100001 : 0,0 '' - IL_002c: ldc.i4.0 - IL_002d: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 100001,100001 : 0,0 '' - IL_002e: ldarg.1 - IL_002f: ldnull - IL_0030: cgt.un - IL_0032: ldc.i4.0 - IL_0033: ceq - IL_0035: 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 R::Equals .method public hidebysig virtual final @@ -568,7 +558,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class TestFunction17/R V_0) - .line 4,4 : 6,7 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst TestFunction17/R IL_0006: stloc.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction19.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction19.il.bsl index a6b8e845ea4..b8c9dfb4aed 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction19.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction19.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 TestFunction19 { @@ -36,13 +36,13 @@ // Offset: 0x00000358 Length: 0x00000100 } .module TestFunction19.exe -// MVID: {60B68B97-A624-46AE-A745-0383978BB660} +// MVID: {61E07031-A624-46AE-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00E60000 +// Image base: 0x07110000 // =============== CLASS MEMBERS DECLARATION =================== @@ -63,21 +63,16 @@ { // Code size 23 (0x17) .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\\TestFunctions\\TestFunction19.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 4,4 : 8,9 '' IL_0008: ldarg.0 IL_0009: ldarg.1 IL_000a: stfld int32 TestFunction19/C::x - .line 4,4 : 14,15 '' IL_000f: ldarg.0 IL_0010: ldarg.2 IL_0011: stfld int32 TestFunction19/C::y - .line 4,4 : 6,7 '' IL_0016: ret } // end of method C::.ctor @@ -86,7 +81,8 @@ { // Code size 7 (0x7) .maxstack 8 - .line 5,5 : 21,22 '' + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 21,22 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction19.fs' IL_0000: ldarg.0 IL_0001: ldfld int32 TestFunction19/C::x IL_0006: ret @@ -140,7 +136,6 @@ { // Code size 15 (0xf) .maxstack 8 - .line 11,11 : 5,31 '' IL_0000: ldarg.0 IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 TestFunction19/'TestFunction19@11-1'::clo2 IL_0006: ldarg.1 @@ -178,8 +173,7 @@ { // Code size 20 (0x14) .maxstack 6 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) - .line 11,11 : 5,31 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) IL_0000: ldarg.0 IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> TestFunction19/TestFunction19@11::clo1 IL_0006: ldarg.1 @@ -211,7 +205,7 @@ IL_000a: newobj instance void TestFunction19/C::.ctor(int32, int32) IL_000f: stloc.1 - .line 11,11 : 5,31 '' + .line 11,11 : 5,37 '' IL_0010: ldstr "c1 = %A, c2 = %A" IL_0015: 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,class [mscorlib]System.Tuple`2>::.ctor(string) IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction20.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction20.il.bsl index 4126263a239..5ef2076721e 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction20.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction20.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 TestFunction20 { @@ -36,13 +36,13 @@ // Offset: 0x00000398 Length: 0x00000100 } .module TestFunction20.exe -// MVID: {60B68B97-A643-44FB-A745-0383978BB660} +// MVID: {61E07031-A643-44FB-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B80000 +// Image base: 0x06880000 // =============== CLASS MEMBERS DECLARATION =================== @@ -71,11 +71,9 @@ IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 4,4 : 8,9 '' IL_0008: ldarg.0 IL_0009: ldarg.1 IL_000a: stfld int32 TestFunction20/D::x - .line 4,4 : 14,15 '' IL_000f: ldarg.0 IL_0010: ldarg.2 IL_0011: stfld int32 TestFunction20/D::y @@ -93,7 +91,6 @@ IL_002b: ldloc.0 IL_002c: add IL_002d: stloc.1 - .line 4,4 : 6,7 '' IL_002e: ret } // end of method D::.ctor @@ -170,7 +167,6 @@ { // Code size 15 (0xf) .maxstack 8 - .line 14,14 : 5,31 '' IL_0000: ldarg.0 IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 TestFunction20/'TestFunction20@14-1'::clo2 IL_0006: ldarg.1 @@ -208,8 +204,7 @@ { // Code size 20 (0x14) .maxstack 6 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) - .line 14,14 : 5,31 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) IL_0000: ldarg.0 IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> TestFunction20/TestFunction20@14::clo1 IL_0006: ldarg.1 @@ -241,7 +236,7 @@ IL_000a: newobj instance void TestFunction20/D::.ctor(int32, int32) IL_000f: stloc.1 - .line 14,14 : 5,31 '' + .line 14,14 : 5,37 '' IL_0010: ldstr "d1 = %A, d2 = %A" IL_0015: 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,class [mscorlib]System.Tuple`2>::.ctor(string) IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction21.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction21.il.bsl index 3b768e614ef..26fad449662 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction21.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction21.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 TestFunction21 { @@ -36,13 +36,13 @@ // Offset: 0x00000680 Length: 0x000001CD } .module TestFunction21.exe -// MVID: {611C52B3-A643-45E6-A745-0383B3521C61} +// MVID: {61EFEE1F-A643-45E6-A745-03831FEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06DD0000 +// Image base: 0x069B0000 // =============== 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 121 (0x79) + // Code size 120 (0x78) .maxstack 4 .locals init ([0] class TestFunction21/U V_0, [1] class TestFunction21/U V_1, @@ -186,114 +186,112 @@ [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 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 '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 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006d + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_006c .line 100001,100001 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: 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 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 + 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 .line 100001,100001 : 0,0 '' - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: bge.s IL_0033 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 100001,100001 : 0,0 '' - IL_002f: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 100001,100001 : 0,0 '' - IL_0030: nop - IL_0031: br.s IL_003a + IL_002f: nop + IL_0030: br.s IL_0039 .line 100001,100001 : 0,0 '' - IL_0033: ldloc.s V_4 - IL_0035: ldloc.s V_5 - IL_0037: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 100001,100001 : 0,0 '' - IL_0039: nop + IL_0038: nop .line 100001,100001 : 0,0 '' - IL_003a: stloc.2 + IL_0039: stloc.2 .line 100001,100001 : 0,0 '' - IL_003b: ldloc.2 - IL_003c: ldc.i4.0 - IL_003d: bge.s IL_0041 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 100001,100001 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ret + IL_003e: ldloc.2 + IL_003f: ret .line 100001,100001 : 0,0 '' - IL_0041: ldloc.2 - IL_0042: ldc.i4.0 - IL_0043: ble.s IL_0047 + IL_0040: ldloc.2 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 100001,100001 : 0,0 '' - IL_0045: ldloc.2 - IL_0046: ret + IL_0044: ldloc.2 + IL_0045: ret .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_005e: ldloc.s V_7 - IL_0060: ldloc.s V_8 - IL_0062: bge.s IL_0066 + IL_005d: ldloc.s V_7 + IL_005f: ldloc.s V_8 + IL_0061: bge.s IL_0065 .line 100001,100001 : 0,0 '' - IL_0064: ldc.i4.m1 - IL_0065: ret + IL_0063: ldc.i4.m1 + IL_0064: ret .line 100001,100001 : 0,0 '' - IL_0066: ldloc.s V_7 - IL_0068: ldloc.s V_8 - IL_006a: cgt - IL_006c: ret + IL_0065: ldloc.s V_7 + IL_0067: ldloc.s V_8 + IL_0069: cgt + IL_006b: ret .line 100001,100001 : 0,0 '' - IL_006d: ldc.i4.1 - IL_006e: ret + IL_006c: ldc.i4.1 + IL_006d: ret .line 100001,100001 : 0,0 '' - IL_006f: ldarg.1 - IL_0070: ldnull - IL_0071: cgt.un - IL_0073: brfalse.s IL_0077 + IL_006e: ldarg.1 + IL_006f: ldnull + IL_0070: cgt.un + IL_0072: brfalse.s IL_0076 .line 100001,100001 : 0,0 '' - IL_0075: ldc.i4.m1 - IL_0076: ret + IL_0074: ldc.i4.m1 + IL_0075: ret .line 100001,100001 : 0,0 '' - IL_0077: ldc.i4.0 - IL_0078: ret + IL_0076: ldc.i4.0 + IL_0077: ret } // end of method U::CompareTo .method public hidebysig virtual final @@ -302,7 +300,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 4,4 : 6,7 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any TestFunction21/U @@ -327,7 +324,7 @@ [7] class [mscorlib]System.Collections.IComparer V_7, [8] int32 V_8, [9] int32 V_9) - .line 4,4 : 6,7 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any TestFunction21/U IL_0006: stloc.0 @@ -445,67 +442,65 @@ 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 65 (0x41) + // Code size 64 (0x40) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_003f + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003e .line 100001,100001 : 0,0 '' - IL_0007: ldc.i4.0 - IL_0008: stloc.0 + IL_0006: ldc.i4.0 + IL_0007: stloc.0 .line 100001,100001 : 0,0 '' - IL_0009: ldarg.0 - IL_000a: pop + IL_0008: ldarg.0 + IL_0009: 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_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_0022: add IL_0023: 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_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_0039: add IL_003a: add - IL_003b: add - IL_003c: stloc.0 - IL_003d: ldloc.0 - IL_003e: ret + IL_003b: stloc.0 + IL_003c: ldloc.0 + IL_003d: ret .line 100001,100001 : 0,0 '' - IL_003f: ldc.i4.0 - IL_0040: ret + IL_003e: ldc.i4.0 + IL_003f: ret } // end of method U::GetHashCode .method public hidebysig virtual final @@ -514,7 +509,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 6,7 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 TestFunction21/U::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -526,7 +520,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 74 (0x4a) + // Code size 73 (0x49) .maxstack 4 .locals init ([0] class TestFunction21/U V_0, [1] class TestFunction21/U V_1, @@ -534,130 +528,126 @@ [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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0042 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0041 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst TestFunction21/U - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst TestFunction21/U + IL_000c: stloc.0 .line 100001,100001 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0040 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_003f .line 100001,100001 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: stloc.1 + IL_0010: ldloc.0 + IL_0011: stloc.1 .line 100001,100001 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0012: ldarg.0 + IL_0013: pop .line 100001,100001 : 0,0 '' - IL_0015: ldarg.0 - IL_0016: stloc.2 - IL_0017: ldloc.1 - IL_0018: stloc.3 + IL_0014: ldarg.0 + IL_0015: stloc.2 + IL_0016: ldloc.1 + IL_0017: 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 + 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_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 + 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 .line 100001,100001 : 0,0 '' - IL_003e: ldc.i4.0 - IL_003f: ret + IL_003d: ldc.i4.0 + IL_003e: ret .line 100001,100001 : 0,0 '' - IL_0040: ldc.i4.0 - IL_0041: ret + IL_003f: ldc.i4.0 + IL_0040: ret .line 100001,100001 : 0,0 '' - IL_0042: ldarg.1 - IL_0043: ldnull - IL_0044: cgt.un - IL_0046: ldc.i4.0 - IL_0047: ceq - IL_0049: ret + IL_0041: ldarg.1 + IL_0042: ldnull + IL_0043: cgt.un + IL_0045: ldc.i4.0 + IL_0046: ceq + IL_0048: 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 60 (0x3c) + // Code size 59 (0x3b) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0034 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 .line 100001,100001 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 .line 100001,100001 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: pop .line 100001,100001 : 0,0 '' - IL_000f: ldarg.0 - IL_0010: stloc.0 - IL_0011: ldarg.1 - IL_0012: stloc.1 + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - 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 + 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 .line 100001,100001 : 0,0 '' - IL_0030: ldc.i4.0 - IL_0031: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 100001,100001 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_0031: ldc.i4.0 + IL_0032: ret .line 100001,100001 : 0,0 '' - IL_0034: ldarg.1 - IL_0035: ldnull - IL_0036: cgt.un - IL_0038: ldc.i4.0 - IL_0039: ceq - IL_003b: ret + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret } // end of method U::Equals .method public hidebysig virtual final @@ -667,7 +657,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class TestFunction21/U V_0) - .line 4,4 : 6,7 '' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst TestFunction21/U IL_0006: stloc.0 @@ -740,7 +730,6 @@ { // Code size 15 (0xf) .maxstack 8 - .line 7,7 : 5,29 '' IL_0000: ldarg.0 IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 TestFunction21/'TestFunction21@7-1'::clo2 IL_0006: ldarg.1 @@ -778,8 +767,7 @@ { // Code size 20 (0x14) .maxstack 6 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) - .line 7,7 : 5,29 '' + .locals init (class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_0) IL_0000: ldarg.0 IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> TestFunction21/TestFunction21@7::clo1 IL_0006: ldarg.1 @@ -809,7 +797,7 @@ IL_0009: ldloc.0 IL_000a: ldfld int32 TestFunction21/U::item1 IL_000f: stloc.2 - .line 7,7 : 5,29 '' + .line 7,7 : 5,33 '' IL_0010: ldstr "a = %A, a = %A" IL_0015: 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,class [mscorlib]System.Tuple`2>::.ctor(string) IL_001a: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine>>(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction23.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction23.il.bsl index 53cfd72c55c..3a966628ad7 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction23.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction23.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 TestFunction23 { @@ -36,13 +36,13 @@ // Offset: 0x00000340 Length: 0x000000E3 } .module TestFunction23.exe -// MVID: {6124063B-A643-451C-A745-03833B062461} +// MVID: {61E07031-A643-451C-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05750000 +// Image base: 0x06E80000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,21 +62,16 @@ { // Code size 31 (0x1f) .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\\TestFunctions\\TestFunction23.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 6,6 : 5,38 '' IL_0008: ldarg.0 IL_0009: call string [mscorlib]System.Console::ReadLine() IL_000e: stfld string TestFunction23/C::x - .line 8,8 : 5,38 '' IL_0013: ldarg.0 IL_0014: call string [mscorlib]System.Console::ReadLine() IL_0019: stfld string TestFunction23/C::x@8 - .line 5,5 : 6,7 '' IL_001e: ret } // end of method C::.ctor @@ -86,7 +81,8 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class TestFunction23/C self) - .line 100001,100001 : 0,0 '' + .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\\TestFunction23.fs' IL_0000: ldarg.0 IL_0001: stloc.0 .line 9,9 : 23,30 '' diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction24.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction24.il.bsl index d946a530d89..ba28389fd7d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction24.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction24.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 TestFunction24 { @@ -36,7 +36,7 @@ // Offset: 0x00000748 Length: 0x00000228 } .module TestFunction24.exe -// MVID: {611C52B3-A643-4587-A745-0383B3521C61} +// MVID: {61EFEE1F-A643-4587-A745-03831FEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 @@ -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 109 (0x6d) + // Code size 108 (0x6c) .maxstack 4 .locals init ([0] int32 V_0, [1] class [mscorlib]System.Collections.IComparer V_1, @@ -151,107 +151,105 @@ [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 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 '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 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0061 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0060 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0021: ldloc.2 - IL_0022: ldloc.3 - IL_0023: bge.s IL_0029 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: bge.s IL_0028 .line 16707566,16707566 : 0,0 '' - IL_0025: ldc.i4.m1 + IL_0024: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0026: nop - IL_0027: br.s IL_002e + IL_0025: nop + IL_0026: br.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.2 - IL_002a: ldloc.3 - IL_002b: cgt + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: cgt .line 16707566,16707566 : 0,0 '' - IL_002d: nop + IL_002c: nop .line 16707566,16707566 : 0,0 '' - IL_002e: stloc.0 + IL_002d: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_002f: ldloc.0 - IL_0030: ldc.i4.0 - IL_0031: bge.s IL_0035 + IL_002e: ldloc.0 + IL_002f: ldc.i4.0 + IL_0030: bge.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.0 - IL_0034: ret + IL_0032: ldloc.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldloc.0 - IL_0036: ldc.i4.0 - IL_0037: ble.s IL_003b + IL_0034: ldloc.0 + IL_0035: ldc.i4.0 + IL_0036: ble.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.0 - IL_003a: ret + IL_0038: ldloc.0 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0052: ldloc.s V_5 - IL_0054: ldloc.s V_6 - IL_0056: bge.s IL_005a + IL_0051: ldloc.s V_5 + IL_0053: ldloc.s V_6 + IL_0055: bge.s IL_0059 .line 16707566,16707566 : 0,0 '' - IL_0058: ldc.i4.m1 - IL_0059: ret + IL_0057: ldc.i4.m1 + IL_0058: ret .line 16707566,16707566 : 0,0 '' - IL_005a: ldloc.s V_5 - IL_005c: ldloc.s V_6 - IL_005e: cgt - IL_0060: ret + IL_0059: ldloc.s V_5 + IL_005b: ldloc.s V_6 + IL_005d: cgt + IL_005f: ret .line 16707566,16707566 : 0,0 '' - IL_0061: ldc.i4.1 - IL_0062: ret + IL_0060: ldc.i4.1 + IL_0061: ret .line 16707566,16707566 : 0,0 '' - IL_0063: ldarg.1 - IL_0064: ldnull - IL_0065: cgt.un - IL_0067: brfalse.s IL_006b + IL_0062: ldarg.1 + IL_0063: ldnull + IL_0064: cgt.un + IL_0066: brfalse.s IL_006a .line 16707566,16707566 : 0,0 '' - IL_0069: ldc.i4.m1 - IL_006a: ret + IL_0068: ldc.i4.m1 + IL_0069: ret .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.0 - IL_006c: ret + IL_006a: ldc.i4.0 + IL_006b: ret } // end of method Point::CompareTo .method public hidebysig virtual final @@ -260,7 +258,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 4,4 : 6,11 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any TestFunction24/Point @@ -284,7 +281,7 @@ [6] class [mscorlib]System.Collections.IComparer V_6, [7] int32 V_7, [8] int32 V_8) - .line 4,4 : 6,11 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any TestFunction24/Point IL_0006: stloc.0 @@ -397,58 +394,56 @@ 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 59 (0x3b) + // Code size 58 (0x3a) .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 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 + .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 IL_001c: add IL_001d: 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_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_0033: add IL_0034: add - IL_0035: add - IL_0036: stloc.0 - IL_0037: ldloc.0 - IL_0038: ret + IL_0035: stloc.0 + IL_0036: ldloc.0 + IL_0037: ret .line 16707566,16707566 : 0,0 '' - IL_0039: ldc.i4.0 - IL_003a: ret + IL_0038: ldc.i4.0 + IL_0039: ret } // end of method Point::GetHashCode .method public hidebysig virtual final @@ -457,7 +452,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 6,11 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 TestFunction24/Point::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -469,118 +463,114 @@ 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 65 (0x41) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_003a + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst TestFunction24/Point - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst TestFunction24/Point + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0038 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: stloc.1 + IL_0010: ldloc.0 + IL_0011: 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0036: ldc.i4.0 - IL_0037: ret + IL_0035: ldc.i4.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_0038: ldc.i4.0 - IL_0039: ret + IL_0037: ldc.i4.0 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldarg.1 - IL_003b: ldnull - IL_003c: cgt.un - IL_003e: ldc.i4.0 - IL_003f: ceq - IL_0041: ret + IL_0039: ldarg.1 + IL_003a: ldnull + IL_003b: cgt.un + IL_003d: ldc.i4.0 + IL_003e: ceq + IL_0040: 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 54 (0x36) + // Code size 53 (0x35) .maxstack 8 - .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_002e + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_002c + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_002c: ldc.i4.0 - IL_002d: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_002e: ldarg.1 - IL_002f: ldnull - IL_0030: cgt.un - IL_0032: ldc.i4.0 - IL_0033: ceq - IL_0035: 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 Point::Equals .method public hidebysig virtual final @@ -590,7 +580,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class TestFunction24/Point V_0) - .line 4,4 : 6,11 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst TestFunction24/Point IL_0006: stloc.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3b.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3b.il.bsl index 605bb5ca37b..fdab908b9ce 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3b.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3b.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 TestFunction3b { @@ -36,13 +36,13 @@ // Offset: 0x00000200 Length: 0x0000008A } .module TestFunction3b.exe -// MVID: {611C4D9E-A662-4FC9-A745-03839E4D1C61} +// MVID: {61E07031-A662-4FC9-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x053D0000 +// Image base: 0x07430000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3c.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3c.il.bsl index 66623938655..e95cb9d1dbd 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3c.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3c.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 extern netstandard { @@ -41,13 +41,13 @@ // Offset: 0x00000200 Length: 0x0000008A } .module TestFunction3c.exe -// MVID: {611C4D9E-A662-4FAC-A745-03839E4D1C61} +// MVID: {61E07031-A662-4FAC-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06740000 +// Image base: 0x06DA0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -121,6 +121,7 @@ IL_0025: ldloc.3 IL_0026: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() IL_002b: stloc.s msg + .line 13,13 : 27,40 '' IL_002d: ldloc.s msg IL_002f: ldstr "hello" IL_0034: call bool [netstandard]System.String::Equals(string, diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction9b4.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction9b4.il.bsl index 1aede1f2c26..0a73ff703ff 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction9b4.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction9b4.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 TestFunction9b4 { @@ -36,13 +36,13 @@ // Offset: 0x00000248 Length: 0x00000085 } .module TestFunction9b4.exe -// MVID: {611C4D9E-A091-56C1-A745-03839E4D1C61} +// MVID: {61E07031-A091-56C1-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07100000 +// Image base: 0x068D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -56,9 +56,7 @@ .custom instance void [FSharp.Core]Microsoft.FSharp.Core.LiteralAttribute::.ctor() = ( 01 00 00 00 ) // Code size 2 (0x2) .maxstack 3 - .locals init ([0] !!a V_0) - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 8,8 : 12,16 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction9b4.fs' + .locals init (!!a V_0) IL_0000: ldloc.0 IL_0001: ret } // end of method TestFunction9b4::Null @@ -93,7 +91,8 @@ // Code size 43 (0x2b) .maxstack 3 .locals init ([0] int32 x) - .line 10,10 : 1,10 '' + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 10,10 : 1,10 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction9b4.fs' IL_0000: call int32 TestFunction9b4::get_x() IL_0005: stloc.0 .line 12,12 : 1,17 '' diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22b.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22b.il.bsl index aea4e753718..736680623cb 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22b.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22b.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 Testfunction22b { @@ -36,13 +36,13 @@ // Offset: 0x00000160 Length: 0x00000056 } .module Testfunction22b.exe -// MVID: {60B68B97-8504-18B7-A745-0383978BB660} +// MVID: {61E07031-8504-18B7-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00AF0000 +// Image base: 0x07440000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,8 +65,6 @@ .entrypoint // Code size 6 (0x6) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 3,3 : 9,35 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\Testfunction22b.fs' IL_0000: call void [mscorlib]System.Console::WriteLine() IL_0005: ret } // end of method $Testfunction22b::main@ diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22c.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22c.il.bsl index 19f08efe5bf..c2d31276a7d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22c.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22c.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 Testfunction22c { @@ -36,13 +36,13 @@ // Offset: 0x00000160 Length: 0x00000056 } .module Testfunction22c.exe -// MVID: {60B68B97-459D-3DF8-A745-0383978BB660} +// MVID: {61E07031-459D-3DF8-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00F10000 +// Image base: 0x053B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,8 +65,6 @@ .entrypoint // Code size 6 (0x6) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 3,3 : 10,36 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\Testfunction22c.fs' IL_0000: call void [mscorlib]System.Console::WriteLine() IL_0005: ret } // end of method $Testfunction22c::main@ diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b.il.bsl index f9085d417db..ab3658ea0ee 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b.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 TestFunction9b { @@ -36,13 +36,13 @@ // Offset: 0x000001F8 Length: 0x00000072 } .module TestFunction9b.exe -// MVID: {611C4D9E-A52C-4FC9-A745-03839E4D1C61} +// MVID: {61E07031-A52C-4FC9-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06EC0000 +// Image base: 0x08E50000 // =============== CLASS MEMBERS DECLARATION =================== @@ -117,6 +117,7 @@ IL_0060: ldloc.1 IL_0061: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0066: stloc.s a + .line 8,8 : 18,25 '' IL_0068: ldloc.s a IL_006a: ldloc.3 IL_006b: add @@ -157,6 +158,7 @@ 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 + .line 8,8 : 18,25 '' IL_00c6: ldloc.s V_9 IL_00c8: ldloc.s V_8 IL_00ca: add @@ -212,6 +214,7 @@ 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 + .line 8,8 : 18,25 '' IL_0149: ldloc.s V_12 IL_014b: ldloc.s V_11 IL_014d: add diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b1.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b1.il.bsl index 1c6f085474a..70a39e712ec 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b1.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b1.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 TestFunction9b1 { @@ -36,13 +36,13 @@ // Offset: 0x00000208 Length: 0x00000083 } .module TestFunction9b1.exe -// MVID: {611C4D9E-A406-DAF4-A745-03839E4D1C61} +// MVID: {61E07031-A406-DAF4-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x052D0000 +// Image base: 0x06CD0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -117,6 +117,7 @@ IL_0060: ldloc.1 IL_0061: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0066: stloc.s a + .line 8,8 : 18,25 '' IL_0068: ldloc.s a IL_006a: ldloc.3 IL_006b: add @@ -157,6 +158,7 @@ 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 + .line 8,8 : 18,25 '' IL_00c6: ldloc.s V_9 IL_00c8: ldloc.s V_8 IL_00ca: add @@ -212,6 +214,7 @@ 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 + .line 8,8 : 18,25 '' IL_0149: ldloc.s V_12 IL_014b: ldloc.s V_11 IL_014d: add diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b2.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b2.il.bsl index 2552f87ab2d..83b6129c16e 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b2.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b2.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 TestFunction9b2 { @@ -36,13 +36,13 @@ // Offset: 0x00000208 Length: 0x00000083 } .module TestFunction9b2.exe -// MVID: {611C4D9E-9C0B-E35E-A745-03839E4D1C61} +// MVID: {61E07031-9C0B-E35E-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06C20000 +// Image base: 0x07130000 // =============== CLASS MEMBERS DECLARATION =================== @@ -117,6 +117,7 @@ IL_0060: ldloc.1 IL_0061: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0066: stloc.s a + .line 8,8 : 18,25 '' IL_0068: ldloc.s a IL_006a: ldloc.3 IL_006b: add @@ -157,6 +158,7 @@ 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 + .line 8,8 : 18,25 '' IL_00c6: ldloc.s V_9 IL_00c8: ldloc.s V_8 IL_00ca: add @@ -212,6 +214,7 @@ 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 + .line 8,8 : 18,25 '' IL_0149: ldloc.s V_12 IL_014b: ldloc.s V_11 IL_014d: add diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b3.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b3.il.bsl index 27c44babf31..24abf24e465 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b3.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b3.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 TestFunction9b3 { @@ -36,13 +36,13 @@ // Offset: 0x00000208 Length: 0x00000083 } .module TestFunction9b3.exe -// MVID: {611C4D9E-C1A4-612A-A745-03839E4D1C61} +// MVID: {61E07031-C1A4-612A-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06690000 +// Image base: 0x07320000 // =============== CLASS MEMBERS DECLARATION =================== @@ -117,6 +117,7 @@ IL_0060: ldloc.1 IL_0061: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0066: stloc.s a + .line 8,8 : 18,25 '' IL_0068: ldloc.s a IL_006a: ldloc.3 IL_006b: add @@ -157,6 +158,7 @@ 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 + .line 8,8 : 18,25 '' IL_00c6: ldloc.s V_9 IL_00c8: ldloc.s V_8 IL_00ca: add @@ -212,6 +214,7 @@ 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 + .line 8,8 : 18,25 '' IL_0149: ldloc.s V_12 IL_014b: ldloc.s V_11 IL_014d: add diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/OptionalArg01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/OptionalArg01.il.bsl index 6db863794d5..5e89cf4f53f 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/OptionalArg01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/OptionalArg01.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 OptionalArg01 { @@ -36,13 +36,13 @@ // Offset: 0x00000460 Length: 0x00000445 } .module OptionalArg01.exe -// MVID: {6124063B-4F48-B5AF-A745-03833B062461} +// MVID: {61E07031-4F48-B5AF-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04EE0000 +// Image base: 0x07450000 // =============== CLASS MEMBERS DECLARATION =================== @@ -60,13 +60,10 @@ { // Code size 9 (0x9) .maxstack 8 - .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\\Tuples\\OptionalArg01.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 2,2 : 6,7 '' IL_0008: ret } // end of method A::.ctor @@ -81,12 +78,10 @@ { // Code size 9 (0x9) .maxstack 8 - .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop - .line 5,5 : 6,7 '' IL_0008: ret } // end of method C::.ctor @@ -98,110 +93,107 @@ .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 93 (0x5d) + // Code size 91 (0x5b) .maxstack 4 .locals init ([0] int32 'count (shadowed)', [1] int32 count, [2] class [mscorlib]System.Collections.Generic.List`1 attribs, [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_3, [4] class OptionalArg01/A v2) - .line 10,10 : 9,44 '' - IL_0000: nop - .line 16707566,16707566 : 0,0 '' - IL_0001: ldarg.0 - IL_0002: brfalse.s IL_0006 + .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\\Tuples\\OptionalArg01.fs' + IL_0000: ldarg.0 + IL_0001: brfalse.s IL_0005 - IL_0004: br.s IL_000a + IL_0003: br.s IL_0009 .line 8,8 : 43,48 '' - IL_0006: ldc.i4.0 + IL_0005: ldc.i4.0 .line 16707566,16707566 : 0,0 '' - IL_0007: nop - IL_0008: br.s IL_000c + IL_0006: nop + IL_0007: br.s IL_000b .line 8,8 : 61,70 '' - IL_000a: ldc.i4.1 + IL_0009: ldc.i4.1 .line 16707566,16707566 : 0,0 '' - IL_000b: nop + IL_000a: nop .line 16707566,16707566 : 0,0 '' - IL_000c: stloc.0 - .line 10,10 : 9,44 '' - IL_000d: nop + IL_000b: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000e: ldarg.1 - IL_000f: brfalse.s IL_0013 + IL_000c: ldarg.1 + IL_000d: brfalse.s IL_0011 - IL_0011: br.s IL_0017 + IL_000f: br.s IL_0015 .line 9,9 : 43,48 '' - IL_0013: ldloc.0 + IL_0011: ldloc.0 .line 16707566,16707566 : 0,0 '' - IL_0014: nop - IL_0015: br.s IL_001b + IL_0012: nop + IL_0013: br.s IL_0019 .line 9,9 : 61,70 '' - IL_0017: ldloc.0 - IL_0018: ldc.i4.1 - IL_0019: add + IL_0015: ldloc.0 + IL_0016: ldc.i4.1 + IL_0017: add .line 16707566,16707566 : 0,0 '' - IL_001a: nop + IL_0018: nop .line 16707566,16707566 : 0,0 '' - IL_001b: stloc.1 + IL_0019: stloc.1 .line 10,10 : 9,44 '' - IL_001c: ldloc.1 - IL_001d: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor(int32) - IL_0022: stloc.2 + IL_001a: ldloc.1 + IL_001b: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor(int32) + IL_0020: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0023: ldarg.0 - IL_0024: brfalse.s IL_0028 + IL_0021: ldarg.0 + IL_0022: brfalse.s IL_0026 - IL_0026: br.s IL_002c + IL_0024: br.s IL_002a .line 11,11 : 31,33 '' - IL_0028: nop + IL_0026: nop .line 16707566,16707566 : 0,0 '' - IL_0029: nop - IL_002a: br.s IL_003f + IL_0027: nop + IL_0028: br.s IL_003d .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 + 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 11,11 : 47,62 '' - IL_0036: ldloc.2 - IL_0037: ldloc.s v2 - IL_0039: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0034: ldloc.2 + IL_0035: ldloc.s v2 + IL_0037: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) .line 16707566,16707566 : 0,0 '' - IL_003e: nop + IL_003c: nop .line 16707566,16707566 : 0,0 '' - IL_003f: ldarg.1 - IL_0040: brfalse.s IL_0044 + IL_003d: ldarg.1 + IL_003e: brfalse.s IL_0042 - IL_0042: br.s IL_0048 + IL_0040: br.s IL_0046 .line 12,12 : 31,33 '' - IL_0044: nop + IL_0042: nop .line 16707566,16707566 : 0,0 '' - IL_0045: nop - IL_0046: br.s IL_005b + IL_0043: nop + IL_0044: br.s IL_0059 .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 + 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 12,12 : 47,62 '' - IL_0052: ldloc.2 - IL_0053: ldloc.s v2 - IL_0055: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) + IL_0050: ldloc.2 + IL_0051: ldloc.s v2 + IL_0053: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) .line 16707566,16707566 : 0,0 '' - IL_005a: nop + IL_0058: nop .line 13,13 : 9,16 '' - IL_005b: ldloc.2 - IL_005c: ret + IL_0059: ldloc.2 + IL_005a: ret } // end of method C::F } // end of class C diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple01.il.bsl index 6b7cc9c8d49..64cca9debc3 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple01.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 Tuple01 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple01.exe -// MVID: {60B68B97-6FDB-3E0B-A745-0383978BB660} +// MVID: {61E07031-6FDB-3E0B-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07270000 +// Image base: 0x06F10000 // =============== CLASS MEMBERS DECLARATION =================== @@ -61,8 +61,6 @@ .entrypoint // Code size 1 (0x1) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 3,3 : 9,10 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\Tuple01.fs' IL_0000: ret } // end of method $Tuple01::main@ diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple02.il.bsl index 3f0835a20bc..2b360b44b9d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple02.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 Tuple02 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple02.exe -// MVID: {60B68B97-ECCC-7D58-A745-0383978BB660} +// MVID: {61E07031-ECCC-7D58-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x070F0000 +// Image base: 0x07400000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,8 +65,6 @@ .entrypoint // 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 : 9,12 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\Tuple02.fs' IL_0000: ldc.i4.1 IL_0001: ldc.i4.2 IL_0002: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple03.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple03.il.bsl index 694e959cf21..c4cc370f6f8 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple03.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple03.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 Tuple03 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple03.exe -// MVID: {60B68B97-AD65-A299-A745-0383978BB660} +// MVID: {61E07031-AD65-A299-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05690000 +// Image base: 0x06F30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,8 +65,6 @@ .entrypoint // Code size 10 (0xa) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 3,3 : 9,14 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\Tuple03.fs' IL_0000: ldc.i4.1 IL_0001: ldc.i4.2 IL_0002: ldc.i4.3 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple04.il.bsl index 67ffcf00724..cfac5f7b4be 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple04.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple04.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 Tuple04 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple04.exe -// MVID: {60B68B97-6A2E-9E97-A745-0383978BB660} +// MVID: {61E07031-6A2E-9E97-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06E90000 +// Image base: 0x06760000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,8 +65,6 @@ .entrypoint // Code size 11 (0xb) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 3,3 : 9,16 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\Tuple04.fs' IL_0000: ldc.i4.1 IL_0001: ldc.i4.2 IL_0002: ldc.i4.3 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple05.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple05.il.bsl index 0626f63d7be..4bebcd2f81d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple05.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple05.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 Tuple05 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple05.exe -// MVID: {60B68B97-349F-319F-A745-0383978BB660} +// MVID: {61E07031-349F-319F-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06BA0000 +// Image base: 0x099F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,8 +65,6 @@ .entrypoint // Code size 12 (0xc) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 3,3 : 9,18 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\Tuple05.fs' IL_0000: ldc.i4.1 IL_0001: ldc.i4.2 IL_0002: ldc.i4.3 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple06.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple06.il.bsl index 26e99d88dca..523975aa8f5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple06.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple06.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 Tuple06 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple06.exe -// MVID: {60B68B97-67E0-4675-A745-0383978BB660} +// MVID: {61E07031-67E0-4675-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A80000 +// Image base: 0x076E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,8 +65,6 @@ .entrypoint // Code size 13 (0xd) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 3,3 : 9,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\Tuple06.fs' IL_0000: ldc.i4.1 IL_0001: ldc.i4.2 IL_0002: ldc.i4.3 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple07.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple07.il.bsl index c4d97daf2ef..ff966990b5e 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple07.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple07.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 Tuple07 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple07.exe -// MVID: {60B68B97-7229-962D-A745-0383978BB660} +// MVID: {61E07031-7229-962D-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00F10000 +// Image base: 0x06CF0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,8 +65,6 @@ .entrypoint // Code size 14 (0xe) .maxstack 9 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 3,3 : 9,22 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\Tuple07.fs' IL_0000: ldc.i4.1 IL_0001: ldc.i4.2 IL_0002: ldc.i4.3 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple08.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple08.il.bsl index 72e7d3feed7..6ae92a14123 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple08.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple08.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 Tuple08 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple08.exe -// MVID: {60B68B97-E542-67B3-A745-0383978BB660} +// MVID: {61E07031-E542-67B3-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00E80000 +// Image base: 0x05240000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,8 +65,6 @@ .entrypoint // Code size 20 (0x14) .maxstack 10 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 3,3 : 9,24 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\Tuple08.fs' IL_0000: ldc.i4.1 IL_0001: ldc.i4.2 IL_0002: ldc.i4.3 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.il.bsl index f04b9c743b8..1c65ef67d04 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.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 extern netstandard { @@ -41,13 +41,13 @@ // Offset: 0x00000230 Length: 0x0000007B } .module TupleElimination.exe -// MVID: {6124063B-DFDD-92DF-A745-03833B062461} +// MVID: {61EFEE1F-DFDD-92DF-A745-03831FEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06D10000 +// Image base: 0x07030000 // =============== CLASS MEMBERS DECLARATION =================== @@ -78,7 +78,6 @@ .line 7,7 : 5,64 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\TupleElimination.fs' IL_0000: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() IL_0005: stloc.0 - .line 9,9 : 31,48 '' IL_0006: ldloc.0 IL_0007: ldc.i4.1 IL_0008: ldloca.s i @@ -109,7 +108,6 @@ IL_0048: ldloc.s V_4 IL_004a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_004f: pop - .line 14,14 : 38,65 '' IL_0050: ldstr "123" IL_0055: ldloca.s l IL_0057: call bool [mscorlib]System.Int64::TryParse(string, diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleMonster.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleMonster.il.bsl index 0a2af12cc38..4a303010020 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleMonster.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleMonster.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 TupleMonster { @@ -36,13 +36,13 @@ // Offset: 0x00000150 Length: 0x00000053 } .module TupleMonster.exe -// MVID: {60B68B97-1552-41D8-A745-0383978BB660} +// MVID: {61E07031-1552-41D8-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07110000 +// Image base: 0x068B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,8 +65,6 @@ .entrypoint // Code size 74 (0x4a) .maxstack 28 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 3,3 : 9,137 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\TupleMonster.fs' IL_0000: ldc.i4.s 97 IL_0002: ldc.i4.s 98 IL_0004: ldc.i4.s 99 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/ValueTupleAliasConstructor.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/ValueTupleAliasConstructor.il.bsl index 7682c8bfd4f..2aa9c8decd8 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/ValueTupleAliasConstructor.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/ValueTupleAliasConstructor.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 ValueTupleAliasConstructor { @@ -36,13 +36,13 @@ // Offset: 0x000001E8 Length: 0x00000061 } .module ValueTupleAliasConstructor.exe -// MVID: {60B68B97-A8CF-BB34-A745-0383978BB660} +// MVID: {61E07031-A8CF-BB34-A745-03833170E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00B60000 +// Image base: 0x05930000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,8 +65,6 @@ .entrypoint // 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 : 9,22 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\ValueTupleAliasConstructor.fs' IL_0000: ldc.i4.2 IL_0001: ldc.i4.2 IL_0002: newobj instance void valuetype [mscorlib]System.ValueTuple`2::.ctor(!0, diff --git a/tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/ComputationExpressions/E_MissingFor.fs b/tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/ComputationExpressions/E_MissingFor.fs index 8ab05096b70..3beeff93e94 100644 --- a/tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/ComputationExpressions/E_MissingFor.fs +++ b/tests/fsharpqa/Source/Conformance/Expressions/DataExpressions/ComputationExpressions/E_MissingFor.fs @@ -1,6 +1,6 @@ // #Regression #Conformance #DataExpressions #ComputationExpressions // Regression test for FSHARP1.0:6149 -//This control construct may only be used if the computation expression builder defines a 'For' method$ +//This control construct may only be used if the computation expression builder defines a 'For' method$ type R = S of string diff --git a/tests/fsharpqa/Source/Diagnostics/General/E_ObjectConstructorAndTry01.fs b/tests/fsharpqa/Source/Diagnostics/General/E_ObjectConstructorAndTry01.fs index 320443ac115..d78d7ba06da 100644 --- a/tests/fsharpqa/Source/Diagnostics/General/E_ObjectConstructorAndTry01.fs +++ b/tests/fsharpqa/Source/Diagnostics/General/E_ObjectConstructorAndTry01.fs @@ -1,6 +1,6 @@ // #Regression #Diagnostics // Regression test for FSHARP1.0:1980 -//Object constructors cannot directly use try/with and try/finally prior to the initialization of the object\. This includes constructs such as 'for x in \.\.\.' that may elaborate to uses of these constructs\. This is a limitation imposed by Common IL\.$ +//Object constructors cannot directly use try/with and try/finally prior to the initialization of the object\. This includes constructs such as 'for x in \.\.\.' that may elaborate to uses of these constructs\. This is a limitation imposed by Common IL\.$ #light type X = class diff --git a/tests/fsharpqa/Source/Diagnostics/General/E_ObjectConstructorAndTry02.fs b/tests/fsharpqa/Source/Diagnostics/General/E_ObjectConstructorAndTry02.fs index 5ceda234e90..1baff095c07 100644 --- a/tests/fsharpqa/Source/Diagnostics/General/E_ObjectConstructorAndTry02.fs +++ b/tests/fsharpqa/Source/Diagnostics/General/E_ObjectConstructorAndTry02.fs @@ -1,6 +1,6 @@ // #Regression #Diagnostics // Regression test for FSHARP1.0:1980 -//Object constructors cannot directly use try/with and try/finally prior to the initialization of the object\. This includes constructs such as 'for x in \.\.\.' that may elaborate to uses of these constructs\. This is a limitation imposed by Common IL\.$ +//Object constructors cannot directly use try/with and try/finally prior to the initialization of the object\. This includes constructs such as 'for x in \.\.\.' that may elaborate to uses of these constructs\. This is a limitation imposed by Common IL\.$ #light type X = struct diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnArray01.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnArray01.il.bsl index 46d1b653558..53f88568bb0 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnArray01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnArray01.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 ForEachOnArray01 { @@ -36,13 +36,13 @@ // Offset: 0x000001E0 Length: 0x0000007C } .module ForEachOnArray01.dll -// MVID: {60BE1F17-7E2E-D3AE-A745-0383171FBE60} +// MVID: {61EFED17-7E2E-D3AE-A745-038317EDEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06F50000 +// Image base: 0x074C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,16 +62,16 @@ .line 6,6 : 6,23 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\ForLoop\\ForEachOnArray01.fs' IL_0000: ldc.i4.0 IL_0001: stloc.0 - .line 7,7 : 6,21 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_0016 - .line 7,7 : 6,21 '' + .line 16707566,16707566 : 0,0 '' IL_0006: ldarg.0 IL_0007: ldloc.1 IL_0008: ldelem [mscorlib]System.Int32 IL_000d: stloc.2 + .line 8,8 : 10,20 '' IL_000e: ldloc.0 IL_000f: ldloc.2 IL_0010: add @@ -80,7 +80,7 @@ IL_0013: ldc.i4.1 IL_0014: add IL_0015: stloc.1 - .line 7,7 : 6,21 '' + .line 7,7 : 12,14 '' IL_0016: ldloc.1 IL_0017: ldarg.0 IL_0018: ldlen diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnList01.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnList01.il.bsl index 3621bd1889e..aaa09da6b40 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnList01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnList01.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 extern netstandard { @@ -41,13 +41,13 @@ // Offset: 0x000002F0 Length: 0x000000DB } .module ForEachOnList01.dll -// MVID: {60BE1F17-56DF-F74F-A745-0383171FBE60} +// MVID: {61EFEE9C-56DF-F74F-A745-03839CEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06EA0000 +// Image base: 0x05180000 // =============== CLASS MEMBERS DECLARATION =================== @@ -148,23 +148,22 @@ .line 8,8 : 6,23 '' IL_0000: ldc.i4.0 IL_0001: stloc.0 - .line 9,9 : 6,21 '' + .line 9,9 : 6,9 '' IL_0002: ldarg.0 IL_0003: stloc.1 - .line 9,9 : 6,21 '' IL_0004: ldloc.1 IL_0005: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_000a: stloc.2 - .line 9,9 : 6,21 '' + .line 9,9 : 12,14 '' IL_000b: ldloc.2 IL_000c: ldnull IL_000d: cgt.un IL_000f: brfalse.s IL_0028 - .line 9,9 : 6,21 '' IL_0011: ldloc.1 IL_0012: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_0017: stloc.3 + .line 10,10 : 10,20 '' IL_0018: ldloc.0 IL_0019: ldloc.3 IL_001a: add @@ -192,7 +191,7 @@ .line 13,13 : 6,23 '' IL_0000: ldc.i4.0 IL_0001: stloc.0 - .line 14,14 : 6,25 '' + .line 14,14 : 6,9 '' IL_0002: ldc.i4.1 IL_0003: ldc.i4.2 IL_0004: ldc.i4.3 @@ -204,20 +203,19 @@ IL_0014: 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_0019: stloc.1 - .line 14,14 : 6,25 '' IL_001a: ldloc.1 IL_001b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0020: stloc.2 - .line 14,14 : 6,25 '' + .line 14,14 : 12,14 '' IL_0021: ldloc.2 IL_0022: ldnull IL_0023: cgt.un IL_0025: brfalse.s IL_003e - .line 14,14 : 6,25 '' IL_0027: ldloc.1 IL_0028: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_002d: stloc.3 + .line 15,15 : 10,20 '' IL_002e: ldloc.0 IL_002f: ldloc.3 IL_0030: add @@ -258,23 +256,22 @@ .line 19,19 : 6,23 '' IL_0018: ldc.i4.0 IL_0019: stloc.1 - .line 20,20 : 6,20 '' + .line 20,20 : 6,9 '' IL_001a: ldloc.0 IL_001b: stloc.2 - .line 20,20 : 6,20 '' IL_001c: ldloc.2 IL_001d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0022: stloc.3 - .line 20,20 : 6,20 '' + .line 20,20 : 12,14 '' IL_0023: ldloc.3 IL_0024: ldnull IL_0025: cgt.un IL_0027: brfalse.s IL_0042 - .line 20,20 : 6,20 '' IL_0029: ldloc.2 IL_002a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_002f: stloc.s x + .line 21,21 : 10,20 '' IL_0031: ldloc.1 IL_0032: ldloc.s x IL_0034: add @@ -315,23 +312,22 @@ IL_0014: 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_0019: stloc.1 - .line 26,26 : 6,20 '' + .line 26,26 : 6,9 '' IL_001a: ldloc.1 IL_001b: stloc.2 - .line 26,26 : 6,20 '' IL_001c: ldloc.2 IL_001d: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0022: stloc.3 - .line 26,26 : 6,20 '' + .line 26,26 : 12,14 '' IL_0023: ldloc.3 IL_0024: ldnull IL_0025: cgt.un IL_0027: brfalse.s IL_0042 - .line 26,26 : 6,20 '' IL_0029: ldloc.2 IL_002a: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_002f: stloc.s x + .line 27,27 : 10,20 '' IL_0031: ldloc.0 IL_0032: ldloc.s x IL_0034: add @@ -369,23 +365,22 @@ IL_0012: 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.0 - .line 31,31 : 6,20 '' + .line 31,31 : 6,9 '' IL_0018: ldloc.0 IL_0019: stloc.1 - .line 31,31 : 6,20 '' IL_001a: ldloc.1 IL_001b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_TailOrNull() IL_0020: stloc.2 - .line 31,31 : 6,20 '' + .line 31,31 : 12,14 '' IL_0021: ldloc.2 IL_0022: ldnull IL_0023: cgt.un IL_0025: brfalse.s IL_0059 - .line 31,31 : 6,20 '' IL_0027: ldloc.1 IL_0028: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_002d: 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 @@ -416,7 +411,7 @@ [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 V_1, [2] int32 i, [3] class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_3) - .line 36,40 : 5,21 '' + .line 36,36 : 5,8 '' IL_0000: ldsfld class ForEachOnList01/test6@38 ForEachOnList01/test6@38::@_instance IL_0005: ldc.i4.1 IL_0006: ldc.i4.2 @@ -434,20 +429,19 @@ IL_0022: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0027: stloc.0 - .line 36,40 : 5,21 '' 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 - .line 36,40 : 5,21 '' + .line 36,36 : 11,13 '' IL_002f: ldloc.1 IL_0030: ldnull IL_0031: cgt.un IL_0033: brfalse.s IL_0065 - .line 36,40 : 5,21 '' IL_0035: ldloc.0 IL_0036: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_003b: 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 @@ -479,7 +473,7 @@ [2] int32 i, [3] int32 tmp, [4] class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_4) - .line 45,49 : 5,21 '' + .line 45,45 : 5,8 '' IL_0000: ldsfld class ForEachOnList01/test7@47 ForEachOnList01/test7@47::@_instance IL_0005: ldc.i4.1 IL_0006: ldc.i4.2 @@ -497,17 +491,15 @@ IL_0022: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Map(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) IL_0027: stloc.0 - .line 45,49 : 5,21 '' 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 - .line 45,49 : 5,21 '' + .line 45,45 : 11,13 '' IL_002f: ldloc.1 IL_0030: ldnull IL_0031: cgt.un IL_0033: brfalse.s IL_006b - .line 45,49 : 5,21 '' IL_0035: ldloc.0 IL_0036: call instance !0 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_HeadOrDefault() IL_003b: stloc.2 @@ -516,7 +508,7 @@ IL_003d: ldc.i4.1 IL_003e: add IL_003f: stloc.3 - .line 51,51 : 9,21 '' + .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 diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnString01.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnString01.il.bsl index 0724c4fc823..47e29ec8d51 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnString01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnString01.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 extern netstandard { @@ -41,13 +41,13 @@ // Offset: 0x00000358 Length: 0x000000FF } .module ForEachOnString01.dll -// MVID: {60BE1F17-105C-852B-A745-0383171FBE60} +// MVID: {61EFEE9C-105C-852B-A745-03839CEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x057C0000 +// Image base: 0x07570000 // =============== CLASS MEMBERS DECLARATION =================== @@ -152,7 +152,6 @@ .line 8,8 : 6,23 '' IL_0000: ldc.i4.0 IL_0001: stloc.0 - .line 9,9 : 6,21 '' IL_0002: ldc.i4.0 IL_0003: stloc.2 IL_0004: ldarg.0 @@ -164,11 +163,12 @@ IL_000e: ldloc.2 IL_000f: blt.s IL_0028 - .line 9,9 : 6,21 '' + .line 16707566,16707566 : 0,0 '' IL_0011: ldarg.0 IL_0012: ldloc.2 IL_0013: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_0018: stloc.3 + .line 10,10 : 10,26 '' IL_0019: ldloc.0 IL_001a: ldloc.3 IL_001b: conv.i4 @@ -178,7 +178,7 @@ IL_001f: ldc.i4.1 IL_0020: add IL_0021: stloc.2 - .line 9,9 : 6,21 '' + .line 9,9 : 12,14 '' IL_0022: ldloc.2 IL_0023: ldloc.1 IL_0024: ldc.i4.1 @@ -199,7 +199,6 @@ .line 13,13 : 6,23 '' IL_0000: ldc.i4.0 IL_0001: stloc.0 - .line 14,14 : 6,23 '' IL_0002: ldc.i4.0 IL_0003: stloc.2 IL_0004: ldstr "123" @@ -211,11 +210,12 @@ IL_0012: ldloc.2 IL_0013: blt.s IL_0030 - .line 14,14 : 6,23 '' + .line 16707566,16707566 : 0,0 '' IL_0015: ldstr "123" IL_001a: ldloc.2 IL_001b: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_0020: stloc.3 + .line 15,15 : 10,26 '' IL_0021: ldloc.0 IL_0022: ldloc.3 IL_0023: conv.i4 @@ -225,7 +225,7 @@ IL_0027: ldc.i4.1 IL_0028: add IL_0029: stloc.2 - .line 14,14 : 6,23 '' + .line 14,14 : 12,14 '' IL_002a: ldloc.2 IL_002b: ldloc.1 IL_002c: ldc.i4.1 @@ -246,7 +246,6 @@ .line 19,19 : 6,23 '' IL_0000: ldc.i4.0 IL_0001: stloc.0 - .line 20,20 : 6,20 '' IL_0002: ldc.i4.0 IL_0003: stloc.2 IL_0004: ldstr "123" @@ -258,11 +257,12 @@ IL_0012: ldloc.2 IL_0013: blt.s IL_0030 - .line 20,20 : 6,20 '' + .line 16707566,16707566 : 0,0 '' IL_0015: ldstr "123" IL_001a: ldloc.2 IL_001b: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_0020: stloc.3 + .line 21,21 : 10,26 '' IL_0021: ldloc.0 IL_0022: ldloc.3 IL_0023: conv.i4 @@ -272,7 +272,7 @@ IL_0027: ldc.i4.1 IL_0028: add IL_0029: stloc.2 - .line 20,20 : 6,20 '' + .line 20,20 : 12,14 '' IL_002a: ldloc.2 IL_002b: ldloc.1 IL_002c: ldc.i4.1 @@ -293,7 +293,6 @@ .line 24,24 : 6,23 '' IL_0000: ldc.i4.0 IL_0001: stloc.0 - .line 26,26 : 6,20 '' IL_0002: ldc.i4.0 IL_0003: stloc.2 IL_0004: ldstr "123" @@ -305,11 +304,12 @@ IL_0012: ldloc.2 IL_0013: blt.s IL_0030 - .line 26,26 : 6,20 '' + .line 16707566,16707566 : 0,0 '' IL_0015: ldstr "123" IL_001a: ldloc.2 IL_001b: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_0020: stloc.3 + .line 27,27 : 10,26 '' IL_0021: ldloc.0 IL_0022: ldloc.3 IL_0023: conv.i4 @@ -319,7 +319,7 @@ IL_0027: ldc.i4.1 IL_0028: add IL_0029: stloc.2 - .line 26,26 : 6,20 '' + .line 26,26 : 12,14 '' IL_002a: ldloc.2 IL_002b: ldloc.1 IL_002c: ldc.i4.1 @@ -337,7 +337,7 @@ [1] int32 V_1, [2] char x, [3] class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_3) - .line 31,31 : 6,20 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldc.i4.0 IL_0001: stloc.1 IL_0002: ldstr "123" @@ -349,11 +349,12 @@ IL_0010: ldloc.1 IL_0011: blt.s IL_0046 - .line 31,31 : 6,20 '' + .line 16707566,16707566 : 0,0 '' IL_0013: ldstr "123" IL_0018: ldloc.1 IL_0019: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_001e: stloc.2 + .line 32,32 : 10,24 '' IL_001f: ldstr "%A" IL_0024: 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,char>::.ctor(string) IL_0029: stloc.3 @@ -368,7 +369,7 @@ IL_003d: ldc.i4.1 IL_003e: add IL_003f: stloc.1 - .line 31,31 : 6,20 '' + .line 31,31 : 12,14 '' IL_0040: ldloc.1 IL_0041: ldloc.0 IL_0042: ldc.i4.1 @@ -389,7 +390,6 @@ .line 40,40 : 6,23 '' IL_0000: ldc.i4.0 IL_0001: stloc.0 - .line 41,41 : 6,21 '' IL_0002: ldc.i4.0 IL_0003: stloc.2 IL_0004: ldarg.0 @@ -401,11 +401,12 @@ IL_000e: ldloc.2 IL_000f: blt.s IL_0028 - .line 41,41 : 6,21 '' + .line 16707566,16707566 : 0,0 '' IL_0011: ldarg.0 IL_0012: ldloc.2 IL_0013: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_0018: stloc.3 + .line 42,42 : 10,26 '' IL_0019: ldloc.0 IL_001a: ldloc.3 IL_001b: conv.i4 @@ -415,7 +416,7 @@ IL_001f: ldc.i4.1 IL_0020: add IL_0021: stloc.2 - .line 41,41 : 6,21 '' + .line 41,41 : 12,14 '' IL_0022: ldloc.2 IL_0023: ldloc.1 IL_0024: ldc.i4.1 @@ -436,7 +437,6 @@ .line 46,46 : 6,23 '' IL_0000: ldc.i4.0 IL_0001: stloc.0 - .line 47,47 : 6,20 '' IL_0002: ldc.i4.0 IL_0003: stloc.2 IL_0004: ldstr "123" @@ -448,11 +448,12 @@ IL_0012: ldloc.2 IL_0013: blt.s IL_0030 - .line 47,47 : 6,20 '' + .line 16707566,16707566 : 0,0 '' IL_0015: ldstr "123" IL_001a: ldloc.2 IL_001b: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_0020: stloc.3 + .line 48,48 : 10,26 '' IL_0021: ldloc.0 IL_0022: ldloc.3 IL_0023: conv.i4 @@ -462,7 +463,7 @@ IL_0027: ldc.i4.1 IL_0028: add IL_0029: stloc.2 - .line 47,47 : 6,20 '' + .line 47,47 : 12,14 '' IL_002a: ldloc.2 IL_002b: ldloc.1 IL_002c: ldc.i4.1 @@ -481,13 +482,12 @@ [2] int32 V_2, [3] char i, [4] class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_4) - .line 53,55 : 17,40 '' + .line 52,52 : 5,8 '' IL_0000: ldsfld class ForEachOnString01/test8@54 ForEachOnString01/test8@54::@_instance IL_0005: ldstr "1234" IL_000a: call string [FSharp.Core]Microsoft.FSharp.Core.StringModule::Map(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, string) IL_000f: stloc.0 - .line 52,56 : 5,21 '' IL_0010: ldc.i4.0 IL_0011: stloc.2 IL_0012: ldloc.0 @@ -499,11 +499,12 @@ IL_001c: ldloc.2 IL_001d: blt.s IL_0050 - .line 52,56 : 5,21 '' + .line 16707566,16707566 : 0,0 '' IL_001f: ldloc.0 IL_0020: ldloc.2 IL_0021: callvirt instance char [netstandard]System.String::get_Chars(int32) IL_0026: stloc.3 + .line 57,57 : 9,23 '' IL_0027: ldstr "%O" 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,char>::.ctor(string) IL_0031: stloc.s V_4 @@ -518,7 +519,7 @@ IL_0047: ldc.i4.1 IL_0048: add IL_0049: stloc.2 - .line 52,56 : 5,21 '' + .line 52,52 : 11,13 '' IL_004a: ldloc.2 IL_004b: ldloc.1 IL_004c: ldc.i4.1 @@ -538,13 +539,12 @@ [3] char i, [4] string tmp, [5] class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_5) - .line 62,64 : 17,40 '' + .line 61,61 : 5,8 '' IL_0000: ldsfld class ForEachOnString01/test9@63 ForEachOnString01/test9@63::@_instance IL_0005: ldstr "1234" IL_000a: call string [FSharp.Core]Microsoft.FSharp.Core.StringModule::Map(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, string) IL_000f: stloc.0 - .line 61,65 : 5,21 '' IL_0010: ldc.i4.0 IL_0011: stloc.2 IL_0012: ldloc.0 @@ -556,7 +556,7 @@ IL_001c: ldloc.2 IL_001d: blt.s IL_0063 - .line 61,65 : 5,21 '' + .line 16707566,16707566 : 0,0 '' IL_001f: ldloc.0 IL_0020: ldloc.2 IL_0021: callvirt instance char [netstandard]System.String::get_Chars(int32) @@ -568,7 +568,7 @@ IL_0032: call string [mscorlib]System.String::Format(string, object) IL_0037: stloc.s tmp - .line 67,67 : 9,21 '' + .line 67,67 : 9,25 '' 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,string>::.ctor(string) IL_0043: stloc.s V_5 @@ -583,7 +583,7 @@ IL_005a: ldc.i4.1 IL_005b: add IL_005c: stloc.2 - .line 61,65 : 5,21 '' + .line 61,61 : 11,13 '' IL_005d: ldloc.2 IL_005e: ldloc.1 IL_005f: ldc.i4.1 diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/NoAllocationOfTuple01.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/NoAllocationOfTuple01.il.bsl index 86b17c9f28d..9432272f162 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/NoAllocationOfTuple01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/NoAllocationOfTuple01.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 NoAllocationOfTuple01 { @@ -36,13 +36,13 @@ // Offset: 0x000001E0 Length: 0x00000085 } .module NoAllocationOfTuple01.dll -// MVID: {60BE1F17-13B5-F699-A745-0383171FBE60} +// MVID: {619833D0-13B5-F699-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x08DC0000 +// Image base: 0x067C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -67,7 +67,7 @@ .line 7,7 : 5,23 '' IL_0007: ldc.i4.m1 IL_0008: stloc.1 - .line 8,8 : 5,22 '' + .line 8,8 : 5,8 '' IL_0009: ldc.i4.1 IL_000a: stloc.3 IL_000b: ldarg.0 @@ -90,7 +90,7 @@ IL_001e: ldc.i4.1 IL_001f: add IL_0020: stloc.3 - .line 8,8 : 5,22 '' + .line 8,8 : 15,17 '' IL_0021: ldloc.3 IL_0022: ldloc.2 IL_0023: ldc.i4.1 diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable01.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable01.il.bsl index f3218f9ca6a..a10778e7468 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable01.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 extern netstandard { @@ -41,13 +41,13 @@ // Offset: 0x000001D8 Length: 0x0000006C } .module NoIEnumerable01.dll -// MVID: {60BE1F17-31A1-8DCB-A745-0383171FBE60} +// MVID: {61EFEE9C-31A1-8DCB-A745-03839CEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B80000 +// Image base: 0x07320000 // =============== CLASS MEMBERS DECLARATION =================== @@ -64,7 +64,7 @@ [1] int32 i, [2] class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_2) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 7,7 : 4,22 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\ForLoop\\NoIEnumerable01.fsx' + .line 7,7 : 4,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\ForLoop\\NoIEnumerable01.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.1 IL_0002: ldarg.0 @@ -86,7 +86,7 @@ IL_0020: ldc.i4.1 IL_0021: add IL_0022: stloc.1 - .line 7,7 : 4,22 '' + .line 7,7 : 10,12 '' IL_0023: ldloc.1 IL_0024: ldloc.0 IL_0025: ldc.i4.1 diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable02.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable02.il.bsl index 1076cf2598b..f9b6c56f75c 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable02.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable02.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 extern netstandard { @@ -41,13 +41,13 @@ // Offset: 0x000001D8 Length: 0x0000006C } .module NoIEnumerable02.dll -// MVID: {60BE1F17-5066-4012-A745-0383171FBE60} +// MVID: {61EFEE9C-5066-4012-A745-03839CEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05170000 +// Image base: 0x06F50000 // =============== CLASS MEMBERS DECLARATION =================== @@ -64,7 +64,7 @@ [1] int32 i, [2] class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_2) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 7,7 : 4,24 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\ForLoop\\NoIEnumerable02.fsx' + .line 7,7 : 4,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\ForLoop\\NoIEnumerable02.fsx' IL_0000: ldc.i4.s 100 IL_0002: stloc.1 IL_0003: ldarg.0 @@ -86,7 +86,7 @@ IL_0021: ldc.i4.1 IL_0022: add IL_0023: stloc.1 - .line 7,7 : 4,24 '' + .line 7,7 : 10,12 '' IL_0024: ldloc.1 IL_0025: ldloc.0 IL_0026: ldc.i4.1 diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable03.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable03.il.bsl index dc81a5ebb66..4b4f74552a7 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable03.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/NoIEnumerable03.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 extern netstandard { @@ -41,13 +41,13 @@ // Offset: 0x000001E0 Length: 0x0000006C } .module NoIEnumerable03.dll -// MVID: {60BE1F17-7903-6020-A745-0383171FBE60} +// MVID: {61EFEE9C-7903-6020-A745-03839CEEEF61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x069A0000 +// Image base: 0x068D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -66,7 +66,7 @@ [1] int32 i, [2] class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4 V_2) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 7,7 : 4,22 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\ForLoop\\NoIEnumerable03.fsx' + .line 7,7 : 4,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\ForLoop\\NoIEnumerable03.fsx' IL_0000: ldarg.0 IL_0001: stloc.1 IL_0002: ldarg.1 @@ -88,7 +88,7 @@ IL_0020: ldc.i4.1 IL_0021: add IL_0022: stloc.1 - .line 7,7 : 4,22 '' + .line 7,7 : 10,12 '' IL_0023: ldloc.1 IL_0024: ldloc.0 IL_0025: ldc.i4.1 diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/ZeroToArrLength01.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/ZeroToArrLength01.il.bsl index c8029558865..c8b5eb8fe1f 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/ZeroToArrLength01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/ZeroToArrLength01.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 ZeroToArrLength01 { @@ -36,13 +36,13 @@ // Offset: 0x000001E0 Length: 0x0000007B } .module ZeroToArrLength01.dll -// MVID: {60BE1F17-A3D0-03A7-A745-0383171FBE60} +// MVID: {619833D0-A3D0-03A7-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B20000 +// Image base: 0x072F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -57,7 +57,7 @@ .maxstack 5 .locals init ([0] int32 i) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 5,35 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\ForLoop\\ZeroToArrLength01.fs' + .line 6,6 : 5,8 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\ForLoop\\ZeroToArrLength01.fs' IL_0000: ldc.i4.0 IL_0001: stloc.0 IL_0002: br.s IL_0010 @@ -71,7 +71,7 @@ IL_000d: ldc.i4.1 IL_000e: add IL_000f: stloc.0 - .line 6,6 : 5,35 '' + .line 6,6 : 15,17 '' IL_0010: ldloc.0 IL_0011: ldarg.0 IL_0012: ldlen diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/ZeroToArrLength02.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/ZeroToArrLength02.il.bsl index 2d3d3f44e26..8bad75722a4 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/ZeroToArrLength02.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/ZeroToArrLength02.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 ZeroToArrLength02 { @@ -36,13 +36,13 @@ // Offset: 0x000001E0 Length: 0x0000007B } .module ZeroToArrLength02.dll -// MVID: {60BE1F17-A36B-03A7-A745-0383171FBE60} +// MVID: {619833D0-A36B-03A7-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05860000 +// Image base: 0x051B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -58,7 +58,7 @@ .locals init ([0] int32 V_0, [1] int32 i) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 5,41 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\ForLoop\\ZeroToArrLength02.fs' + .line 6,6 : 5,8 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\ForLoop\\ZeroToArrLength02.fs' IL_0000: ldc.i4.0 IL_0001: stloc.1 IL_0002: ldarg.0 @@ -79,7 +79,7 @@ IL_0018: ldc.i4.1 IL_0019: add IL_001a: stloc.1 - .line 6,6 : 5,41 '' + .line 6,6 : 15,17 '' IL_001b: ldloc.1 IL_001c: ldloc.0 IL_001d: ldc.i4.1 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare01.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare01.il.bsl index 3b7ce524486..7bcf6acd5e6 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare01.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 Compare01 { @@ -36,13 +36,13 @@ // Offset: 0x00000228 Length: 0x000000B2 } .module Compare01.dll -// MVID: {611C550D-04A0-F88E-A745-03830D551C61} +// MVID: {619833D0-04A0-F88E-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x09070000 +// Image base: 0x07510000 // =============== CLASS MEMBERS DECLARATION =================== @@ -66,7 +66,7 @@ .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare01.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 - .line 9,9 : 8,32 '' + .line 9,9 : 8,11 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_0019 @@ -96,7 +96,7 @@ IL_0016: ldc.i4.1 IL_0017: add IL_0018: stloc.1 - .line 9,9 : 8,32 '' + .line 9,9 : 18,20 '' IL_0019: ldloc.1 IL_001a: ldc.i4 0x989681 IL_001f: blt.s IL_0006 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare02.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare02.il.bsl index f9763f7b1b8..ee2bcc65859 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare02.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare02.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 Compare02 { @@ -36,13 +36,13 @@ // Offset: 0x00000230 Length: 0x000000B9 } .module Compare02.dll -// MVID: {611C550D-0481-F88E-A745-03830D551C61} +// MVID: {619833D0-0481-F88E-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05530000 +// Image base: 0x06CF0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -67,7 +67,7 @@ .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare02.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 - .line 8,8 : 8,32 '' + .line 8,8 : 8,11 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_0025 @@ -112,7 +112,7 @@ IL_0022: ldc.i4.1 IL_0023: add IL_0024: stloc.1 - .line 8,8 : 8,32 '' + .line 8,8 : 18,20 '' IL_0025: ldloc.1 IL_0026: ldc.i4 0x989681 IL_002b: blt.s IL_0006 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare03.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare03.il.bsl index 2c32497fb46..bab4efa1164 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare03.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare03.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 extern netstandard { @@ -41,13 +41,13 @@ // Offset: 0x00000238 Length: 0x000000B9 } .module Compare03.dll -// MVID: {611C550D-0562-F88E-A745-03830D551C61} +// MVID: {619833D0-0562-F88E-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05000000 +// Image base: 0x07040000 // =============== CLASS MEMBERS DECLARATION =================== @@ -73,7 +73,7 @@ .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare03.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 - .line 8,8 : 8,32 '' + .line 8,8 : 8,11 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_0042 @@ -136,7 +136,7 @@ IL_003f: ldc.i4.1 IL_0040: add IL_0041: stloc.1 - .line 8,8 : 8,32 '' + .line 8,8 : 18,20 '' IL_0042: ldloc.1 IL_0043: ldc.i4 0x989681 IL_0048: blt.s IL_0006 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare04.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare04.il.bsl index 81438746bfa..d8e8b1cc7f6 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare04.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare04.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 extern netstandard { @@ -41,13 +41,13 @@ // Offset: 0x00000238 Length: 0x000000B9 } .module Compare04.dll -// MVID: {611C550D-053B-F88E-A745-03830D551C61} +// MVID: {619833D0-053B-F88E-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x071C0000 +// Image base: 0x06AD0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -74,7 +74,7 @@ .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare04.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 - .line 8,8 : 8,32 '' + .line 8,8 : 8,11 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br IL_00c3 @@ -191,7 +191,7 @@ IL_00c0: ldc.i4.1 IL_00c1: add IL_00c2: stloc.1 - .line 8,8 : 8,32 '' + .line 8,8 : 18,20 '' IL_00c3: ldloc.1 IL_00c4: ldc.i4 0x989681 IL_00c9: blt IL_0009 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare05.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare05.il.bsl index 7920cf478b6..ec8dc44767d 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare05.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare05.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 Compare05 { @@ -36,13 +36,13 @@ // Offset: 0x000006E0 Length: 0x000003BA } .module Compare05.dll -// MVID: {611C550D-051C-F88E-A745-03830D551C61} +// MVID: {61E0712B-051C-F88E-A745-03832B71E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x070E0000 +// Image base: 0x05910000 // =============== 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 120 (0x78) + // Code size 119 (0x77) .maxstack 4 .locals init ([0] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_1, @@ -187,114 +187,112 @@ [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 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 '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 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006c + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_006b .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: bge.s IL_0033 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0030: nop - IL_0031: br.s IL_003a + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.s V_4 - IL_0035: ldloc.s V_5 - IL_0037: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_0039: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003a: stloc.2 + IL_0039: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003b: ldloc.2 - IL_003c: ldc.i4.0 - IL_003d: bge.s IL_0041 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0041: ldloc.2 - IL_0042: ldc.i4.0 - IL_0043: ble.s IL_0047 + IL_0040: ldloc.2 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.2 - IL_0046: ret + IL_0044: ldloc.2 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_005d: ldloc.s V_4 - IL_005f: ldloc.s V_5 - IL_0061: bge.s IL_0065 + IL_005c: ldloc.s V_4 + IL_005e: ldloc.s V_5 + IL_0060: bge.s IL_0064 .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.m1 - IL_0064: ret + IL_0062: ldc.i4.m1 + IL_0063: ret .line 16707566,16707566 : 0,0 '' - IL_0065: ldloc.s V_4 - IL_0067: ldloc.s V_5 - IL_0069: cgt - IL_006b: ret + IL_0064: ldloc.s V_4 + IL_0066: ldloc.s V_5 + IL_0068: cgt + IL_006a: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.1 - IL_006d: ret + IL_006b: ldc.i4.1 + IL_006c: ret .line 16707566,16707566 : 0,0 '' - IL_006e: ldarg.1 - IL_006f: ldnull - IL_0070: cgt.un - IL_0072: brfalse.s IL_0076 + IL_006d: ldarg.1 + IL_006e: ldnull + IL_006f: cgt.un + IL_0071: brfalse.s IL_0075 .line 16707566,16707566 : 0,0 '' - IL_0074: ldc.i4.m1 - IL_0075: ret + IL_0073: ldc.i4.m1 + IL_0074: ret .line 16707566,16707566 : 0,0 '' - IL_0076: ldc.i4.0 - IL_0077: ret + IL_0075: ldc.i4.0 + IL_0076: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -303,7 +301,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 4,4 : 10,13 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any Compare05/CompareMicroPerfAndCodeGenerationTests/Key @@ -324,7 +321,7 @@ [3] int32 V_3, [4] int32 V_4, [5] int32 V_5) - .line 4,4 : 10,13 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any Compare05/CompareMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 @@ -438,61 +435,59 @@ 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 61 (0x3d) + // Code size 60 (0x3c) .maxstack 7 .locals init ([0] int32 V_0, [1] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_1) - .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 + .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 + .line 16707566,16707566 : 0,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 IL_0020: add IL_0021: 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_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_0035: add IL_0036: add - IL_0037: add - IL_0038: stloc.0 - IL_0039: ldloc.0 - IL_003a: ret + IL_0037: stloc.0 + IL_0038: ldloc.0 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_003a: ldc.i4.0 + IL_003b: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -501,7 +496,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 10,13 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 Compare05/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -513,127 +507,123 @@ 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 63 (0x3f) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0038 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst Compare05/CompareMicroPerfAndCodeGenerationTests/Key - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst Compare05/CompareMicroPerfAndCodeGenerationTests/Key + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0036 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_0011: ldarg.0 - IL_0012: pop + IL_0010: ldarg.0 + IL_0011: pop .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: stloc.1 - IL_0015: ldloc.0 - IL_0016: stloc.2 + IL_0012: ldarg.0 + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: stloc.2 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_0033: ldc.i4.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_0036: ldc.i4.0 - IL_0037: ret + IL_0035: ldc.i4.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_0038: ldarg.1 - IL_0039: ldnull - IL_003a: cgt.un - IL_003c: ldc.i4.0 - IL_003d: ceq - IL_003f: 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 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 60 (0x3c) + // Code size 59 (0x3b) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0034 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: pop .line 16707566,16707566 : 0,0 '' - IL_000f: ldarg.0 - IL_0010: stloc.0 - IL_0011: ldarg.1 - IL_0012: stloc.1 + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0030: ldc.i4.0 - IL_0031: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 16707566,16707566 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_0031: ldc.i4.0 + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldarg.1 - IL_0035: ldnull - IL_0036: cgt.un - IL_0038: ldc.i4.0 - IL_0039: ceq - IL_003b: ret + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -643,7 +633,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class Compare05/CompareMicroPerfAndCodeGenerationTests/Key V_0) - .line 4,4 : 10,13 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst Compare05/CompareMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 @@ -712,7 +702,7 @@ IL_000c: call class Compare05/CompareMicroPerfAndCodeGenerationTests/Key Compare05/CompareMicroPerfAndCodeGenerationTests/Key::NewKey(int32, int32) IL_0011: stloc.2 - .line 9,9 : 8,32 '' + .line 9,9 : 8,11 '' IL_0012: ldc.i4.0 IL_0013: stloc.3 IL_0014: br.s IL_0022 @@ -726,7 +716,7 @@ IL_001f: ldc.i4.1 IL_0020: add IL_0021: stloc.3 - .line 9,9 : 8,32 '' + .line 9,9 : 18,20 '' IL_0022: ldloc.3 IL_0023: ldc.i4 0x989681 IL_0028: blt.s IL_0016 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare06.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare06.il.bsl index 0e4e347ea04..3b8f86e9aae 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare06.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare06.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 Compare06 { @@ -36,13 +36,13 @@ // Offset: 0x000006D8 Length: 0x000003BC } .module Compare06.dll -// MVID: {611C550D-04FD-F88E-A745-03830D551C61} +// MVID: {61E0712B-04FD-F88E-A745-03832B71E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04F30000 +// Image base: 0x04EF0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -123,114 +123,112 @@ 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 102 (0x66) + // Code size 101 (0x65) .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 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 '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 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_005a + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0059 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0021: ldloc.2 - IL_0022: ldloc.3 - IL_0023: bge.s IL_0029 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: bge.s IL_0028 .line 16707566,16707566 : 0,0 '' - IL_0025: ldc.i4.m1 + IL_0024: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0026: nop - IL_0027: br.s IL_002e + IL_0025: nop + IL_0026: br.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.2 - IL_002a: ldloc.3 - IL_002b: cgt + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: cgt .line 16707566,16707566 : 0,0 '' - IL_002d: nop + IL_002c: nop .line 16707566,16707566 : 0,0 '' - IL_002e: stloc.0 + IL_002d: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_002f: ldloc.0 - IL_0030: ldc.i4.0 - IL_0031: bge.s IL_0035 + IL_002e: ldloc.0 + IL_002f: ldc.i4.0 + IL_0030: bge.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.0 - IL_0034: ret + IL_0032: ldloc.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldloc.0 - IL_0036: ldc.i4.0 - IL_0037: ble.s IL_003b + IL_0034: ldloc.0 + IL_0035: ldc.i4.0 + IL_0036: ble.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.0 - IL_003a: ret + IL_0038: ldloc.0 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_004f: ldloc.2 - IL_0050: ldloc.3 - IL_0051: bge.s IL_0055 + IL_004e: ldloc.2 + IL_004f: ldloc.3 + IL_0050: bge.s IL_0054 .line 16707566,16707566 : 0,0 '' - IL_0053: ldc.i4.m1 - IL_0054: ret + IL_0052: ldc.i4.m1 + IL_0053: ret .line 16707566,16707566 : 0,0 '' - IL_0055: ldloc.2 - IL_0056: ldloc.3 - IL_0057: cgt - IL_0059: ret + IL_0054: ldloc.2 + IL_0055: ldloc.3 + IL_0056: cgt + IL_0058: ret .line 16707566,16707566 : 0,0 '' - IL_005a: ldc.i4.1 - IL_005b: ret + IL_0059: ldc.i4.1 + IL_005a: ret .line 16707566,16707566 : 0,0 '' - IL_005c: ldarg.1 - IL_005d: ldnull - IL_005e: cgt.un - IL_0060: brfalse.s IL_0064 + IL_005b: ldarg.1 + IL_005c: ldnull + IL_005d: cgt.un + IL_005f: brfalse.s IL_0063 .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_0061: ldc.i4.m1 + IL_0062: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldc.i4.0 - IL_0065: ret + IL_0063: ldc.i4.0 + IL_0064: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final @@ -239,7 +237,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 4,4 : 10,14 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR @@ -258,7 +255,7 @@ [1] int32 V_1, [2] int32 V_2, [3] int32 V_3) - .line 4,4 : 10,14 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR IL_0006: stloc.0 @@ -365,52 +362,50 @@ 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 55 (0x37) + // Code size 54 (0x36) .maxstack 7 .locals init ([0] int32 V_0) - .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 + .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 IL_001a: add IL_001b: 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_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_002f: add IL_0030: add - IL_0031: add - IL_0032: stloc.0 - IL_0033: ldloc.0 - IL_0034: ret + IL_0031: stloc.0 + IL_0032: ldloc.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0034: ldc.i4.0 + IL_0035: ret } // end of method KeyR::GetHashCode .method public hidebysig virtual final @@ -419,7 +414,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 10,14 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -431,107 +425,103 @@ 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 57 (0x39) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0032 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0030 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_002f .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.0 - IL_002f: ret + IL_002d: ldc.i4.0 + IL_002e: ret .line 16707566,16707566 : 0,0 '' - IL_0030: ldc.i4.0 - IL_0031: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 16707566,16707566 : 0,0 '' - IL_0032: ldarg.1 - IL_0033: ldnull - IL_0034: cgt.un - IL_0036: ldc.i4.0 - IL_0037: ceq - IL_0039: 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 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 54 (0x36) + // Code size 53 (0x35) .maxstack 8 - .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_002e + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_002c + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_002c: ldc.i4.0 - IL_002d: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_002e: ldarg.1 - IL_002f: ldnull - IL_0030: cgt.un - IL_0032: ldc.i4.0 - IL_0033: ceq - IL_0035: 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 KeyR::Equals .method public hidebysig virtual final @@ -541,7 +531,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR V_0) - .line 4,4 : 10,14 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR IL_0006: stloc.0 @@ -597,7 +587,7 @@ IL_000c: newobj instance void Compare06/CompareMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, int32) IL_0011: stloc.2 - .line 9,9 : 8,32 '' + .line 9,9 : 8,11 '' IL_0012: ldc.i4.0 IL_0013: stloc.3 IL_0014: br.s IL_0022 @@ -611,7 +601,7 @@ IL_001f: ldc.i4.1 IL_0020: add IL_0021: stloc.3 - .line 9,9 : 8,32 '' + .line 9,9 : 18,20 '' IL_0022: ldloc.3 IL_0023: ldc.i4 0x989681 IL_0028: blt.s IL_0016 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare07.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare07.il.bsl index 400de5cfc7b..58e70310db2 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare07.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare07.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 Compare07 { @@ -36,13 +36,13 @@ // Offset: 0x00000890 Length: 0x0000068C } .module Compare07.dll -// MVID: {611C550D-05DE-F88E-A745-03830D551C61} +// MVID: {61E0712B-05DE-F88E-A745-03832B71E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x058A0000 +// Image base: 0x07590000 // =============== 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 111 (0x6f) + // Code size 110 (0x6e) .maxstack 5 .locals init ([0] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -187,96 +187,94 @@ [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 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, + .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, !!0, !!0) - IL_0033: stloc.2 + IL_0032: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0034: ldloc.2 - IL_0035: ldc.i4.0 - IL_0036: bge.s IL_003a + IL_0033: ldloc.2 + IL_0034: ldc.i4.0 + IL_0035: bge.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.2 - IL_0039: ret + IL_0037: ldloc.2 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: ble.s IL_0040 + IL_0039: ldloc.2 + IL_003a: ldc.i4.0 + IL_003b: ble.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_003d: ldloc.2 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - 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, + 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, !!0, !!0) - IL_0062: ret + IL_0061: ret .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.1 - IL_0064: ret + IL_0062: ldc.i4.1 + IL_0063: ret .line 16707566,16707566 : 0,0 '' - IL_0065: ldarg.1 - IL_0066: ldnull - IL_0067: cgt.un - IL_0069: brfalse.s IL_006d + IL_0064: ldarg.1 + IL_0065: ldnull + IL_0066: cgt.un + IL_0068: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.m1 - IL_006c: ret + IL_006a: ldc.i4.m1 + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldc.i4.0 - IL_006e: ret + IL_006c: ldc.i4.0 + IL_006d: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final @@ -285,7 +283,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 15 (0xf) .maxstack 8 - .line 4,4 : 10,20 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 @@ -307,7 +304,7 @@ [3] int32 V_3, [4] !a V_4, [5] !a V_5) - .line 4,4 : 10,20 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 IL_0006: stloc.0 @@ -403,72 +400,70 @@ 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 77 (0x4d) + // Code size 76 (0x4c) .maxstack 7 .locals init ([0] int32 V_0, [1] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] !a V_2) - .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, + .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 + .line 16707566,16707566 : 0,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, !!0) - 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_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: 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, + 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, !!0) - 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_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: add - IL_0048: stloc.0 - IL_0049: ldloc.0 - IL_004a: ret + IL_0047: stloc.0 + IL_0048: ldloc.0 + IL_0049: ret .line 16707566,16707566 : 0,0 '' - IL_004b: ldc.i4.0 - IL_004c: ret + IL_004a: ldc.i4.0 + IL_004b: ret } // end of method GenericKey`1::GetHashCode .method public hidebysig virtual final @@ -477,7 +472,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 10,20 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -489,159 +483,155 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 88 (0x58) + // Code size 87 (0x57) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0050 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_004f .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_004e + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_004d .line 16707566,16707566 : 0,0 '' - IL_0011: ldarg.0 - IL_0012: pop + IL_0010: ldarg.0 + IL_0011: pop .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: stloc.1 - IL_0015: ldloc.0 - IL_0016: stloc.2 + IL_0012: ldarg.0 + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: 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, + 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, !!0, !!0) - 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, + 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, !!0, !!0) - IL_004b: ret + IL_004a: ret .line 16707566,16707566 : 0,0 '' - IL_004c: ldc.i4.0 - IL_004d: ret + IL_004b: ldc.i4.0 + IL_004c: ret .line 16707566,16707566 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_004d: ldc.i4.0 + IL_004e: ret .line 16707566,16707566 : 0,0 '' - IL_0050: ldarg.1 - IL_0051: ldnull - IL_0052: cgt.un - IL_0054: ldc.i4.0 - IL_0055: ceq - IL_0057: ret + IL_004f: ldarg.1 + IL_0050: ldnull + IL_0051: cgt.un + IL_0053: ldc.i4.0 + IL_0054: ceq + IL_0056: 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 78 (0x4e) + // Code size 77 (0x4d) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0046 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0045 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0044 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0043 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: pop .line 16707566,16707566 : 0,0 '' - IL_000f: ldarg.0 - IL_0010: stloc.0 - IL_0011: ldarg.1 - IL_0012: stloc.1 + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: 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, + 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, !!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, + 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, !!0) - IL_0041: ret + IL_0040: ret .line 16707566,16707566 : 0,0 '' - IL_0042: ldc.i4.0 - IL_0043: ret + IL_0041: ldc.i4.0 + IL_0042: ret .line 16707566,16707566 : 0,0 '' - IL_0044: ldc.i4.0 - IL_0045: ret + IL_0043: ldc.i4.0 + IL_0044: ret .line 16707566,16707566 : 0,0 '' - IL_0046: ldarg.1 - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: ldc.i4.0 - IL_004b: ceq - IL_004d: ret + IL_0045: ldarg.1 + IL_0046: ldnull + IL_0047: cgt.un + IL_0049: ldc.i4.0 + IL_004a: ceq + IL_004c: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final @@ -651,7 +641,7 @@ // Code size 22 (0x16) .maxstack 4 .locals init ([0] class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 V_0) - .line 4,4 : 10,20 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 IL_0006: stloc.0 @@ -721,7 +711,7 @@ IL_000c: call class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1 class Compare07/CompareMicroPerfAndCodeGenerationTests/GenericKey`1::NewGenericKey(!0, !0) IL_0011: stloc.2 - .line 9,9 : 8,32 '' + .line 9,9 : 8,11 '' IL_0012: ldc.i4.0 IL_0013: stloc.3 IL_0014: br.s IL_0022 @@ -735,7 +725,7 @@ IL_001f: ldc.i4.1 IL_0020: add IL_0021: stloc.3 - .line 9,9 : 8,32 '' + .line 9,9 : 18,20 '' IL_0022: ldloc.3 IL_0023: ldc.i4 0x989681 IL_0028: blt.s IL_0016 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare08.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare08.il.bsl index 008f1eb52b1..df7ade55b1f 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare08.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare08.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 Compare08 { @@ -36,13 +36,13 @@ // Offset: 0x00000230 Length: 0x000000B2 } .module Compare08.dll -// MVID: {60BE1F16-03E7-F88E-A745-0383161FBE60} +// MVID: {619833D0-03E7-F88E-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06D10000 +// Image base: 0x07130000 // =============== CLASS MEMBERS DECLARATION =================== @@ -87,7 +87,7 @@ IL_001f: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_0024: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_0029: stloc.2 - .line 8,8 : 8,32 '' + .line 8,8 : 8,11 '' IL_002a: ldc.i4.0 IL_002b: stloc.3 IL_002c: br.s IL_003a @@ -102,7 +102,7 @@ IL_0037: ldc.i4.1 IL_0038: add IL_0039: stloc.3 - .line 8,8 : 8,32 '' + .line 8,8 : 18,20 '' IL_003a: ldloc.3 IL_003b: ldc.i4 0x989681 IL_0040: blt.s IL_002e diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare09.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare09.il.bsl index f8a93849b92..6cd0b1e64cd 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare09.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare09.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 Compare09 { @@ -36,13 +36,13 @@ // Offset: 0x00000230 Length: 0x000000B2 } .module Compare09.dll -// MVID: {60BE1F16-03C8-F88E-A745-0383161FBE60} +// MVID: {619833D0-03C8-F88E-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06710000 +// Image base: 0x07540000 // =============== CLASS MEMBERS DECLARATION =================== @@ -87,7 +87,7 @@ IL_001f: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_0024: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_0029: stloc.2 - .line 8,8 : 8,30 '' + .line 8,8 : 8,11 '' IL_002a: ldc.i4.0 IL_002b: stloc.3 IL_002c: br.s IL_003a @@ -102,7 +102,7 @@ IL_0037: ldc.i4.1 IL_0038: add IL_0039: stloc.3 - .line 8,8 : 8,30 '' + .line 8,8 : 18,20 '' IL_003a: ldloc.3 IL_003b: ldc.i4 0x186a1 IL_0040: blt.s IL_002e diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare10.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare10.il.bsl index 8184984ccad..8da7724afcf 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare10.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare10.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 Compare10 { @@ -36,13 +36,13 @@ // Offset: 0x00000A98 Length: 0x0000058E } .module Compare10.dll -// MVID: {611C550D-04BF-1753-A745-03830D551C61} +// MVID: {61E0712B-04BF-1753-A745-03832B71E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07060000 +// Image base: 0x06F10000 // =============== 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 120 (0x78) + // Code size 119 (0x77) .maxstack 4 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_1, @@ -187,114 +187,112 @@ [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 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 '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 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006c + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_006b .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: 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 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: bge.s IL_0033 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0030: nop - IL_0031: br.s IL_003a + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.s V_4 - IL_0035: ldloc.s V_5 - IL_0037: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_0039: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003a: stloc.2 + IL_0039: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003b: ldloc.2 - IL_003c: ldc.i4.0 - IL_003d: bge.s IL_0041 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0041: ldloc.2 - IL_0042: ldc.i4.0 - IL_0043: ble.s IL_0047 + IL_0040: ldloc.2 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.2 - IL_0046: ret + IL_0044: ldloc.2 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_005d: ldloc.s V_4 - IL_005f: ldloc.s V_5 - IL_0061: bge.s IL_0065 + IL_005c: ldloc.s V_4 + IL_005e: ldloc.s V_5 + IL_0060: bge.s IL_0064 .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.m1 - IL_0064: ret + IL_0062: ldc.i4.m1 + IL_0063: ret .line 16707566,16707566 : 0,0 '' - IL_0065: ldloc.s V_4 - IL_0067: ldloc.s V_5 - IL_0069: cgt - IL_006b: ret + IL_0064: ldloc.s V_4 + IL_0066: ldloc.s V_5 + IL_0068: cgt + IL_006a: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.1 - IL_006d: ret + IL_006b: ldc.i4.1 + IL_006c: ret .line 16707566,16707566 : 0,0 '' - IL_006e: ldarg.1 - IL_006f: ldnull - IL_0070: cgt.un - IL_0072: brfalse.s IL_0076 + IL_006d: ldarg.1 + IL_006e: ldnull + IL_006f: cgt.un + IL_0071: brfalse.s IL_0075 .line 16707566,16707566 : 0,0 '' - IL_0074: ldc.i4.m1 - IL_0075: ret + IL_0073: ldc.i4.m1 + IL_0074: ret .line 16707566,16707566 : 0,0 '' - IL_0076: ldc.i4.0 - IL_0077: ret + IL_0075: ldc.i4.0 + IL_0076: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -303,7 +301,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 4,4 : 10,13 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/Key @@ -324,7 +321,7 @@ [3] int32 V_3, [4] int32 V_4, [5] int32 V_5) - .line 4,4 : 10,13 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 @@ -438,61 +435,59 @@ 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 61 (0x3d) + // Code size 60 (0x3c) .maxstack 7 .locals init ([0] int32 V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_1) - .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 + .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 + .line 16707566,16707566 : 0,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 IL_0020: add IL_0021: 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_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_0035: add IL_0036: add - IL_0037: add - IL_0038: stloc.0 - IL_0039: ldloc.0 - IL_003a: ret + IL_0037: stloc.0 + IL_0038: ldloc.0 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_003a: ldc.i4.0 + IL_003b: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -501,7 +496,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 10,13 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -513,127 +507,123 @@ 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 63 (0x3f) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0038 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/Key - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/Key + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0036 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_0011: ldarg.0 - IL_0012: pop + IL_0010: ldarg.0 + IL_0011: pop .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: stloc.1 - IL_0015: ldloc.0 - IL_0016: stloc.2 + IL_0012: ldarg.0 + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_0033: ldc.i4.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_0036: ldc.i4.0 - IL_0037: ret + IL_0035: ldc.i4.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_0038: ldarg.1 - IL_0039: ldnull - IL_003a: cgt.un - IL_003c: ldc.i4.0 - IL_003d: ceq - IL_003f: 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 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 60 (0x3c) + // Code size 59 (0x3b) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0034 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: pop .line 16707566,16707566 : 0,0 '' - IL_000f: ldarg.0 - IL_0010: stloc.0 - IL_0011: ldarg.1 - IL_0012: stloc.1 + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0030: ldc.i4.0 - IL_0031: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 16707566,16707566 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_0031: ldc.i4.0 + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldarg.1 - IL_0035: ldnull - IL_0036: cgt.un - IL_0038: ldc.i4.0 - IL_0039: ceq - IL_003b: ret + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -643,7 +633,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_0) - .line 4,4 : 10,13 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 @@ -812,7 +802,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 170 (0xaa) + // Code size 169 (0xa9) .maxstack 5 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -825,120 +815,118 @@ [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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse IL_00a0 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse IL_009f .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: ldnull - IL_000c: cgt.un - IL_000e: brfalse IL_009e + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: cgt.un + IL_000d: brfalse IL_009d .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0012: ldarg.0 + IL_0013: pop .line 16707566,16707566 : 0,0 '' - 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, + 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, class [mscorlib]System.Collections.IComparer) - IL_0039: stloc.2 + IL_0038: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0039: ldloc.2 + IL_003a: ldc.i4.0 + IL_003b: bge.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_003d: ldloc.2 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003f: ldloc.2 + IL_0040: ldc.i4.0 + IL_0041: ble.s IL_0045 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_0043: ldloc.2 + IL_0044: 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 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, + 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, class [mscorlib]System.Collections.IComparer) - IL_008a: stloc.s V_10 + IL_0089: stloc.s V_10 .line 16707566,16707566 : 0,0 '' - IL_008c: ldloc.s V_10 - IL_008e: brfalse.s IL_0093 + IL_008b: ldloc.s V_10 + IL_008d: brfalse.s IL_0092 .line 16707566,16707566 : 0,0 '' - IL_0090: ldloc.s V_10 - IL_0092: ret + IL_008f: ldloc.s V_10 + IL_0091: ret .line 16707566,16707566 : 0,0 '' - 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, + 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, class [mscorlib]System.Collections.IComparer) - IL_009d: ret + IL_009c: ret .line 16707566,16707566 : 0,0 '' - IL_009e: ldc.i4.1 - IL_009f: ret + IL_009d: ldc.i4.1 + IL_009e: ret .line 16707566,16707566 : 0,0 '' - IL_00a0: ldarg.1 - IL_00a1: ldnull - IL_00a2: cgt.un - IL_00a4: brfalse.s IL_00a8 + IL_009f: ldarg.1 + IL_00a0: ldnull + IL_00a1: cgt.un + IL_00a3: brfalse.s IL_00a7 .line 16707566,16707566 : 0,0 '' - IL_00a6: ldc.i4.m1 - IL_00a7: ret + IL_00a5: ldc.i4.m1 + IL_00a6: ret .line 16707566,16707566 : 0,0 '' - IL_00a8: ldc.i4.0 - IL_00a9: ret + IL_00a7: ldc.i4.0 + IL_00a8: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final @@ -947,7 +935,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 5,5 : 10,26 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys @@ -973,7 +960,7 @@ [8] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_8, [9] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_9, [10] int32 V_10) - .line 5,5 : 10,26 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys IL_0006: stloc.0 @@ -1093,7 +1080,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 108 (0x6c) + // Code size 107 (0x6b) .maxstack 7 .locals init ([0] int32 V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1101,79 +1088,77 @@ [3] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_3, [4] class Compare10/CompareMicroPerfAndCodeGenerationTests/Key V_4, [5] int32 V_5) - .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 + .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 + .line 16707566,16707566 : 0,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 IL_0049: add IL_004a: 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_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_0064: add IL_0065: add - IL_0066: add - IL_0067: stloc.0 - IL_0068: ldloc.0 - IL_0069: ret + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ret .line 16707566,16707566 : 0,0 '' - IL_006a: ldc.i4.0 - IL_006b: ret + IL_0069: ldc.i4.0 + IL_006a: ret } // end of method KeyWithInnerKeys::GetHashCode .method public hidebysig virtual final @@ -1182,7 +1167,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 5,5 : 10,26 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -1194,7 +1178,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 139 (0x8b) + // Code size 138 (0x8a) .maxstack 5 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1205,163 +1189,159 @@ [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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse IL_0083 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse IL_0082 .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_0010: stloc.0 + IL_0009: ldarg.1 + IL_000a: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_000f: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: brfalse.s IL_0081 + IL_0010: ldloc.0 + IL_0011: brfalse.s IL_0080 .line 16707566,16707566 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: pop + IL_0013: ldarg.0 + IL_0014: pop .line 16707566,16707566 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: stloc.1 - IL_0018: ldloc.0 - IL_0019: stloc.2 + IL_0015: ldarg.0 + IL_0016: stloc.1 + IL_0017: ldloc.0 + IL_0018: 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, + 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, class [mscorlib]System.Collections.IEqualityComparer) - IL_0032: brfalse.s IL_007f + IL_0031: brfalse.s IL_007e .line 16707566,16707566 : 0,0 '' - 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, + 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, class [mscorlib]System.Collections.IEqualityComparer) - IL_0070: brfalse.s IL_007d + IL_006f: brfalse.s IL_007c .line 16707566,16707566 : 0,0 '' - 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, + 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, class [mscorlib]System.Collections.IEqualityComparer) - IL_007c: ret + IL_007b: ret .line 16707566,16707566 : 0,0 '' - IL_007d: ldc.i4.0 - IL_007e: ret + IL_007c: ldc.i4.0 + IL_007d: ret .line 16707566,16707566 : 0,0 '' - IL_007f: ldc.i4.0 - IL_0080: ret + IL_007e: ldc.i4.0 + IL_007f: ret .line 16707566,16707566 : 0,0 '' - IL_0081: ldc.i4.0 - IL_0082: ret + IL_0080: ldc.i4.0 + IL_0081: ret .line 16707566,16707566 : 0,0 '' - IL_0083: ldarg.1 - IL_0084: ldnull - IL_0085: cgt.un - IL_0087: ldc.i4.0 - IL_0088: ceq - IL_008a: ret + IL_0082: ldarg.1 + IL_0083: ldnull + IL_0084: cgt.un + IL_0086: ldc.i4.0 + IL_0087: ceq + IL_0089: 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 70 (0x46) + // Code size 69 (0x45) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_003e + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003d .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_003c + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_003b .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 - .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 - + IL_000c: ldarg.0 + IL_000d: pop .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, + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + .line 16707566,16707566 : 0,0 '' + 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, !!0) - IL_0039: ret + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_003c: ldc.i4.0 - IL_003d: ret + IL_003b: ldc.i4.0 + IL_003c: ret .line 16707566,16707566 : 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_003d: ldarg.1 + IL_003e: ldnull + IL_003f: cgt.un + IL_0041: ldc.i4.0 + IL_0042: ceq + IL_0044: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final @@ -1371,7 +1351,7 @@ // Code size 22 (0x16) .maxstack 4 .locals init ([0] class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0) - .line 5,5 : 10,26 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys IL_0006: stloc.0 @@ -1467,7 +1447,7 @@ IL_003c: call class Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys Compare10/CompareMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::NewKeyWithInnerKeys(class Compare10/CompareMicroPerfAndCodeGenerationTests/Key, class [mscorlib]System.Tuple`2) IL_0041: stloc.2 - .line 10,10 : 8,32 '' + .line 10,10 : 8,11 '' IL_0042: ldc.i4.0 IL_0043: stloc.3 IL_0044: br.s IL_0052 @@ -1481,7 +1461,7 @@ IL_004f: ldc.i4.1 IL_0050: add IL_0051: stloc.3 - .line 10,10 : 8,32 '' + .line 10,10 : 18,20 '' IL_0052: ldloc.3 IL_0053: ldc.i4 0x989681 IL_0058: blt.s IL_0046 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare11.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare11.il.bsl index 4293dce0c19..29f5a76c13e 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare11.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare11.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 Compare11 { @@ -36,13 +36,13 @@ // Offset: 0x00000230 Length: 0x000000B1 } .module Compare11.dll -// MVID: {60BE1F16-04A0-1753-A745-0383161FBE60} +// MVID: {619833D0-04A0-1753-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x068D0000 +// Image base: 0x075A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,7 +65,7 @@ .line 5,5 : 8,29 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare11.fsx' IL_0000: ldc.i4.0 IL_0001: stloc.0 - .line 9,9 : 8,32 '' + .line 9,9 : 8,11 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_000c @@ -77,7 +77,7 @@ IL_0009: ldc.i4.1 IL_000a: add IL_000b: stloc.1 - .line 9,9 : 8,32 '' + .line 9,9 : 18,20 '' IL_000c: ldloc.1 IL_000d: ldc.i4 0x989681 IL_0012: blt.s IL_0006 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals01.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals01.il.bsl index 6cd820bc0f7..0c489996485 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals01.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 Equals01 { @@ -36,13 +36,13 @@ // Offset: 0x00000238 Length: 0x000000B6 } .module Equals01.dll -// MVID: {60BE1F16-0759-50B1-A745-0383161FBE60} +// MVID: {619833D0-0759-50B1-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A90000 +// Image base: 0x06740000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,7 +65,7 @@ .line 5,5 : 8,29 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals01.fsx' IL_0000: ldc.i4.0 IL_0001: stloc.0 - .line 8,8 : 8,32 '' + .line 8,8 : 8,11 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_000c @@ -77,7 +77,7 @@ IL_0009: ldc.i4.1 IL_000a: add IL_000b: stloc.1 - .line 8,8 : 8,32 '' + .line 8,8 : 18,20 '' IL_000c: ldloc.1 IL_000d: ldc.i4 0x989681 IL_0012: blt.s IL_0006 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals02.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals02.il.bsl index 10efc022f68..610d890d892 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals02.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals02.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 extern netstandard { @@ -41,13 +41,13 @@ // Offset: 0x00000238 Length: 0x000000B6 } .module Equals02.dll -// MVID: {60BE1F16-0759-B6D8-A745-0383161FBE60} +// MVID: {619833D0-0759-B6D8-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05340000 +// Image base: 0x07360000 // =============== CLASS MEMBERS DECLARATION =================== @@ -70,7 +70,7 @@ .line 5,5 : 8,29 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals02.fsx' IL_0000: ldc.i4.0 IL_0001: stloc.0 - .line 8,8 : 8,32 '' + .line 8,8 : 8,11 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_001a @@ -85,7 +85,7 @@ IL_0017: ldc.i4.1 IL_0018: add IL_0019: stloc.1 - .line 8,8 : 8,32 '' + .line 8,8 : 18,20 '' IL_001a: ldloc.1 IL_001b: ldc.i4 0x989681 IL_0020: blt.s IL_0006 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.il.bsl index cc4f7494b64..92858f58607 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.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 extern netstandard { @@ -41,13 +41,13 @@ // Offset: 0x00000238 Length: 0x000000B6 } .module Equals03.dll -// MVID: {611C550D-0759-3313-A745-03830D551C61} +// MVID: {619833D0-0759-3313-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07160000 +// Image base: 0x05790000 // =============== CLASS MEMBERS DECLARATION =================== @@ -70,7 +70,7 @@ .line 5,5 : 8,29 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals03.fsx' IL_0000: ldc.i4.0 IL_0001: stloc.0 - .line 8,8 : 8,32 '' + .line 8,8 : 8,11 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_0036 @@ -102,7 +102,7 @@ IL_0033: ldc.i4.1 IL_0034: add IL_0035: stloc.1 - .line 8,8 : 8,32 '' + .line 8,8 : 18,20 '' IL_0036: ldloc.1 IL_0037: ldc.i4 0x989681 IL_003c: blt.s IL_0006 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals04.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals04.il.bsl index b2b49483a4b..233ebf4b5d6 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals04.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals04.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 Equals04 { @@ -36,13 +36,13 @@ // Offset: 0x000006E0 Length: 0x000003B7 } .module Equals04.dll -// MVID: {611C550D-0759-EA8A-A745-03830D551C61} +// MVID: {61E0712B-0759-EA8A-A745-03832B71E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x071F0000 +// Image base: 0x05A30000 // =============== 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 120 (0x78) + // Code size 119 (0x77) .maxstack 4 .locals init ([0] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_1, @@ -187,114 +187,112 @@ [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 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 '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 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006c + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_006b .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: bge.s IL_0033 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0030: nop - IL_0031: br.s IL_003a + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.s V_4 - IL_0035: ldloc.s V_5 - IL_0037: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_0039: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003a: stloc.2 + IL_0039: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003b: ldloc.2 - IL_003c: ldc.i4.0 - IL_003d: bge.s IL_0041 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0041: ldloc.2 - IL_0042: ldc.i4.0 - IL_0043: ble.s IL_0047 + IL_0040: ldloc.2 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.2 - IL_0046: ret + IL_0044: ldloc.2 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_005d: ldloc.s V_4 - IL_005f: ldloc.s V_5 - IL_0061: bge.s IL_0065 + IL_005c: ldloc.s V_4 + IL_005e: ldloc.s V_5 + IL_0060: bge.s IL_0064 .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.m1 - IL_0064: ret + IL_0062: ldc.i4.m1 + IL_0063: ret .line 16707566,16707566 : 0,0 '' - IL_0065: ldloc.s V_4 - IL_0067: ldloc.s V_5 - IL_0069: cgt - IL_006b: ret + IL_0064: ldloc.s V_4 + IL_0066: ldloc.s V_5 + IL_0068: cgt + IL_006a: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.1 - IL_006d: ret + IL_006b: ldc.i4.1 + IL_006c: ret .line 16707566,16707566 : 0,0 '' - IL_006e: ldarg.1 - IL_006f: ldnull - IL_0070: cgt.un - IL_0072: brfalse.s IL_0076 + IL_006d: ldarg.1 + IL_006e: ldnull + IL_006f: cgt.un + IL_0071: brfalse.s IL_0075 .line 16707566,16707566 : 0,0 '' - IL_0074: ldc.i4.m1 - IL_0075: ret + IL_0073: ldc.i4.m1 + IL_0074: ret .line 16707566,16707566 : 0,0 '' - IL_0076: ldc.i4.0 - IL_0077: ret + IL_0075: ldc.i4.0 + IL_0076: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -303,7 +301,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 4,4 : 10,13 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any Equals04/EqualsMicroPerfAndCodeGenerationTests/Key @@ -324,7 +321,7 @@ [3] int32 V_3, [4] int32 V_4, [5] int32 V_5) - .line 4,4 : 10,13 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any Equals04/EqualsMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 @@ -438,61 +435,59 @@ 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 61 (0x3d) + // Code size 60 (0x3c) .maxstack 7 .locals init ([0] int32 V_0, [1] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_1) - .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 + .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 + .line 16707566,16707566 : 0,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 IL_0020: add IL_0021: 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_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_0035: add IL_0036: add - IL_0037: add - IL_0038: stloc.0 - IL_0039: ldloc.0 - IL_003a: ret + IL_0037: stloc.0 + IL_0038: ldloc.0 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_003a: ldc.i4.0 + IL_003b: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -501,7 +496,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 10,13 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -513,127 +507,123 @@ 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 63 (0x3f) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0038 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst Equals04/EqualsMicroPerfAndCodeGenerationTests/Key - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst Equals04/EqualsMicroPerfAndCodeGenerationTests/Key + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0036 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_0011: ldarg.0 - IL_0012: pop + IL_0010: ldarg.0 + IL_0011: pop .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: stloc.1 - IL_0015: ldloc.0 - IL_0016: stloc.2 + IL_0012: ldarg.0 + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: stloc.2 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_0033: ldc.i4.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_0036: ldc.i4.0 - IL_0037: ret + IL_0035: ldc.i4.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_0038: ldarg.1 - IL_0039: ldnull - IL_003a: cgt.un - IL_003c: ldc.i4.0 - IL_003d: ceq - IL_003f: 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 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 60 (0x3c) + // Code size 59 (0x3b) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0034 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: pop .line 16707566,16707566 : 0,0 '' - IL_000f: ldarg.0 - IL_0010: stloc.0 - IL_0011: ldarg.1 - IL_0012: stloc.1 + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0030: ldc.i4.0 - IL_0031: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 16707566,16707566 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_0031: ldc.i4.0 + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldarg.1 - IL_0035: ldnull - IL_0036: cgt.un - IL_0038: ldc.i4.0 - IL_0039: ceq - IL_003b: ret + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -643,7 +633,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key V_0) - .line 4,4 : 10,13 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst Equals04/EqualsMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 @@ -712,7 +702,7 @@ IL_000c: call class Equals04/EqualsMicroPerfAndCodeGenerationTests/Key Equals04/EqualsMicroPerfAndCodeGenerationTests/Key::NewKey(int32, int32) IL_0011: stloc.2 - .line 9,9 : 8,32 '' + .line 9,9 : 8,11 '' IL_0012: ldc.i4.0 IL_0013: stloc.3 IL_0014: br.s IL_0027 @@ -728,7 +718,7 @@ IL_0024: ldc.i4.1 IL_0025: add IL_0026: stloc.3 - .line 9,9 : 8,32 '' + .line 9,9 : 18,20 '' IL_0027: ldloc.3 IL_0028: ldc.i4 0x989681 IL_002d: blt.s IL_0016 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals05.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals05.il.bsl index 6bdcdf1022c..5a5cbc04fa0 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals05.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals05.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 Equals05 { @@ -36,13 +36,13 @@ // Offset: 0x000006D0 Length: 0x000003B9 } .module Equals05.dll -// MVID: {611C550D-0759-CBC5-A745-03830D551C61} +// MVID: {61E0712B-0759-CBC5-A745-03832B71E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x053D0000 +// Image base: 0x05A70000 // =============== CLASS MEMBERS DECLARATION =================== @@ -123,114 +123,112 @@ 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 102 (0x66) + // Code size 101 (0x65) .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 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 '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 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_005a + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0059 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0021: ldloc.2 - IL_0022: ldloc.3 - IL_0023: bge.s IL_0029 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: bge.s IL_0028 .line 16707566,16707566 : 0,0 '' - IL_0025: ldc.i4.m1 + IL_0024: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0026: nop - IL_0027: br.s IL_002e + IL_0025: nop + IL_0026: br.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.2 - IL_002a: ldloc.3 - IL_002b: cgt + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: cgt .line 16707566,16707566 : 0,0 '' - IL_002d: nop + IL_002c: nop .line 16707566,16707566 : 0,0 '' - IL_002e: stloc.0 + IL_002d: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_002f: ldloc.0 - IL_0030: ldc.i4.0 - IL_0031: bge.s IL_0035 + IL_002e: ldloc.0 + IL_002f: ldc.i4.0 + IL_0030: bge.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.0 - IL_0034: ret + IL_0032: ldloc.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldloc.0 - IL_0036: ldc.i4.0 - IL_0037: ble.s IL_003b + IL_0034: ldloc.0 + IL_0035: ldc.i4.0 + IL_0036: ble.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.0 - IL_003a: ret + IL_0038: ldloc.0 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_004f: ldloc.2 - IL_0050: ldloc.3 - IL_0051: bge.s IL_0055 + IL_004e: ldloc.2 + IL_004f: ldloc.3 + IL_0050: bge.s IL_0054 .line 16707566,16707566 : 0,0 '' - IL_0053: ldc.i4.m1 - IL_0054: ret + IL_0052: ldc.i4.m1 + IL_0053: ret .line 16707566,16707566 : 0,0 '' - IL_0055: ldloc.2 - IL_0056: ldloc.3 - IL_0057: cgt - IL_0059: ret + IL_0054: ldloc.2 + IL_0055: ldloc.3 + IL_0056: cgt + IL_0058: ret .line 16707566,16707566 : 0,0 '' - IL_005a: ldc.i4.1 - IL_005b: ret + IL_0059: ldc.i4.1 + IL_005a: ret .line 16707566,16707566 : 0,0 '' - IL_005c: ldarg.1 - IL_005d: ldnull - IL_005e: cgt.un - IL_0060: brfalse.s IL_0064 + IL_005b: ldarg.1 + IL_005c: ldnull + IL_005d: cgt.un + IL_005f: brfalse.s IL_0063 .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_0061: ldc.i4.m1 + IL_0062: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldc.i4.0 - IL_0065: ret + IL_0063: ldc.i4.0 + IL_0064: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final @@ -239,7 +237,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 4,4 : 10,14 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR @@ -258,7 +255,7 @@ [1] int32 V_1, [2] int32 V_2, [3] int32 V_3) - .line 4,4 : 10,14 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR IL_0006: stloc.0 @@ -365,52 +362,50 @@ 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 55 (0x37) + // Code size 54 (0x36) .maxstack 7 .locals init ([0] int32 V_0) - .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 + .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 IL_001a: add IL_001b: 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_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_002f: add IL_0030: add - IL_0031: add - IL_0032: stloc.0 - IL_0033: ldloc.0 - IL_0034: ret + IL_0031: stloc.0 + IL_0032: ldloc.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0034: ldc.i4.0 + IL_0035: ret } // end of method KeyR::GetHashCode .method public hidebysig virtual final @@ -419,7 +414,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 10,14 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -431,107 +425,103 @@ 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 57 (0x39) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0032 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0030 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_002f .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.0 - IL_002f: ret + IL_002d: ldc.i4.0 + IL_002e: ret .line 16707566,16707566 : 0,0 '' - IL_0030: ldc.i4.0 - IL_0031: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 16707566,16707566 : 0,0 '' - IL_0032: ldarg.1 - IL_0033: ldnull - IL_0034: cgt.un - IL_0036: ldc.i4.0 - IL_0037: ceq - IL_0039: 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 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 54 (0x36) + // Code size 53 (0x35) .maxstack 8 - .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_002e + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_002c + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_002c: ldc.i4.0 - IL_002d: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_002e: ldarg.1 - IL_002f: ldnull - IL_0030: cgt.un - IL_0032: ldc.i4.0 - IL_0033: ceq - IL_0035: 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 KeyR::Equals .method public hidebysig virtual final @@ -541,7 +531,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR V_0) - .line 4,4 : 10,14 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR IL_0006: stloc.0 @@ -597,7 +587,7 @@ IL_000c: newobj instance void Equals05/EqualsMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, int32) IL_0011: stloc.2 - .line 9,9 : 8,32 '' + .line 9,9 : 8,11 '' IL_0012: ldc.i4.0 IL_0013: stloc.3 IL_0014: br.s IL_0027 @@ -613,7 +603,7 @@ IL_0024: ldc.i4.1 IL_0025: add IL_0026: stloc.3 - .line 9,9 : 8,32 '' + .line 9,9 : 18,20 '' IL_0027: ldloc.3 IL_0028: ldc.i4 0x989681 IL_002d: blt.s IL_0016 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals06.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals06.il.bsl index 1aa09e5000a..e468f464a09 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals06.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals06.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 Equals06 { @@ -36,13 +36,13 @@ // Offset: 0x00000890 Length: 0x00000688 } .module Equals06.dll -// MVID: {611C550D-0759-31EC-A745-03830D551C61} +// MVID: {61E0712B-0759-31EC-A745-03832B71E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x056C0000 +// Image base: 0x07210000 // =============== 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 111 (0x6f) + // Code size 110 (0x6e) .maxstack 5 .locals init ([0] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -187,96 +187,94 @@ [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 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, + .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, !!0, !!0) - IL_0033: stloc.2 + IL_0032: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0034: ldloc.2 - IL_0035: ldc.i4.0 - IL_0036: bge.s IL_003a + IL_0033: ldloc.2 + IL_0034: ldc.i4.0 + IL_0035: bge.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.2 - IL_0039: ret + IL_0037: ldloc.2 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: ble.s IL_0040 + IL_0039: ldloc.2 + IL_003a: ldc.i4.0 + IL_003b: ble.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_003d: ldloc.2 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - 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, + 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, !!0, !!0) - IL_0062: ret + IL_0061: ret .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.1 - IL_0064: ret + IL_0062: ldc.i4.1 + IL_0063: ret .line 16707566,16707566 : 0,0 '' - IL_0065: ldarg.1 - IL_0066: ldnull - IL_0067: cgt.un - IL_0069: brfalse.s IL_006d + IL_0064: ldarg.1 + IL_0065: ldnull + IL_0066: cgt.un + IL_0068: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.m1 - IL_006c: ret + IL_006a: ldc.i4.m1 + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldc.i4.0 - IL_006e: ret + IL_006c: ldc.i4.0 + IL_006d: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final @@ -285,7 +283,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 15 (0xf) .maxstack 8 - .line 4,4 : 10,20 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 @@ -307,7 +304,7 @@ [3] int32 V_3, [4] !a V_4, [5] !a V_5) - .line 4,4 : 10,20 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 IL_0006: stloc.0 @@ -403,72 +400,70 @@ 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 77 (0x4d) + // Code size 76 (0x4c) .maxstack 7 .locals init ([0] int32 V_0, [1] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] !a V_2) - .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, + .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 + .line 16707566,16707566 : 0,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, !!0) - 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_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: 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, + 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, !!0) - 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_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: add - IL_0048: stloc.0 - IL_0049: ldloc.0 - IL_004a: ret + IL_0047: stloc.0 + IL_0048: ldloc.0 + IL_0049: ret .line 16707566,16707566 : 0,0 '' - IL_004b: ldc.i4.0 - IL_004c: ret + IL_004a: ldc.i4.0 + IL_004b: ret } // end of method GenericKey`1::GetHashCode .method public hidebysig virtual final @@ -477,7 +472,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 10,20 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -489,159 +483,155 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 88 (0x58) + // Code size 87 (0x57) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0050 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_004f .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_004e + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_004d .line 16707566,16707566 : 0,0 '' - IL_0011: ldarg.0 - IL_0012: pop + IL_0010: ldarg.0 + IL_0011: pop .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: stloc.1 - IL_0015: ldloc.0 - IL_0016: stloc.2 + IL_0012: ldarg.0 + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: 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, + 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, !!0, !!0) - 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, + 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, !!0, !!0) - IL_004b: ret + IL_004a: ret .line 16707566,16707566 : 0,0 '' - IL_004c: ldc.i4.0 - IL_004d: ret + IL_004b: ldc.i4.0 + IL_004c: ret .line 16707566,16707566 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_004d: ldc.i4.0 + IL_004e: ret .line 16707566,16707566 : 0,0 '' - IL_0050: ldarg.1 - IL_0051: ldnull - IL_0052: cgt.un - IL_0054: ldc.i4.0 - IL_0055: ceq - IL_0057: ret + IL_004f: ldarg.1 + IL_0050: ldnull + IL_0051: cgt.un + IL_0053: ldc.i4.0 + IL_0054: ceq + IL_0056: 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 78 (0x4e) + // Code size 77 (0x4d) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0046 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0045 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0044 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0043 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: pop .line 16707566,16707566 : 0,0 '' - IL_000f: ldarg.0 - IL_0010: stloc.0 - IL_0011: ldarg.1 - IL_0012: stloc.1 + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: 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, + 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, !!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, + 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, !!0) - IL_0041: ret + IL_0040: ret .line 16707566,16707566 : 0,0 '' - IL_0042: ldc.i4.0 - IL_0043: ret + IL_0041: ldc.i4.0 + IL_0042: ret .line 16707566,16707566 : 0,0 '' - IL_0044: ldc.i4.0 - IL_0045: ret + IL_0043: ldc.i4.0 + IL_0044: ret .line 16707566,16707566 : 0,0 '' - IL_0046: ldarg.1 - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: ldc.i4.0 - IL_004b: ceq - IL_004d: ret + IL_0045: ldarg.1 + IL_0046: ldnull + IL_0047: cgt.un + IL_0049: ldc.i4.0 + IL_004a: ceq + IL_004c: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final @@ -651,7 +641,7 @@ // Code size 22 (0x16) .maxstack 4 .locals init ([0] class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 V_0) - .line 4,4 : 10,20 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 IL_0006: stloc.0 @@ -721,7 +711,7 @@ IL_000c: call class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1 class Equals06/EqualsMicroPerfAndCodeGenerationTests/GenericKey`1::NewGenericKey(!0, !0) IL_0011: stloc.2 - .line 9,9 : 8,32 '' + .line 9,9 : 8,11 '' IL_0012: ldc.i4.0 IL_0013: stloc.3 IL_0014: br.s IL_0027 @@ -737,7 +727,7 @@ IL_0024: ldc.i4.1 IL_0025: add IL_0026: stloc.3 - .line 9,9 : 8,32 '' + .line 9,9 : 18,20 '' IL_0027: ldloc.3 IL_0028: ldc.i4 0x989681 IL_002d: blt.s IL_0016 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals07.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals07.il.bsl index e652f362b84..8d60d7e7dbb 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals07.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals07.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 Equals07 { @@ -36,13 +36,13 @@ // Offset: 0x00000230 Length: 0x000000AF } .module Equals07.dll -// MVID: {60BE1F16-0759-AE27-A745-0383161FBE60} +// MVID: {619833D0-0759-AE27-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B40000 +// Image base: 0x09840000 // =============== CLASS MEMBERS DECLARATION =================== @@ -87,7 +87,7 @@ IL_001f: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_0024: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_0029: stloc.2 - .line 8,8 : 8,32 '' + .line 8,8 : 8,11 '' IL_002a: ldc.i4.0 IL_002b: stloc.3 IL_002c: br.s IL_003a @@ -102,7 +102,7 @@ IL_0037: ldc.i4.1 IL_0038: add IL_0039: stloc.3 - .line 8,8 : 8,32 '' + .line 8,8 : 18,20 '' IL_003a: ldloc.3 IL_003b: ldc.i4 0x989681 IL_0040: blt.s IL_002e diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals08.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals08.il.bsl index 2a51fe48508..30c5b36d20a 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals08.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals08.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 Equals08 { @@ -36,13 +36,13 @@ // Offset: 0x00000230 Length: 0x000000AF } .module Equals08.dll -// MVID: {60BE1F16-0759-659E-A745-0383161FBE60} +// MVID: {619833D0-0759-659E-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05730000 +// Image base: 0x05AD0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -87,7 +87,7 @@ IL_001f: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_0024: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_0029: stloc.2 - .line 8,8 : 8,32 '' + .line 8,8 : 8,11 '' IL_002a: ldc.i4.0 IL_002b: stloc.3 IL_002c: br.s IL_003a @@ -102,7 +102,7 @@ IL_0037: ldc.i4.1 IL_0038: add IL_0039: stloc.3 - .line 8,8 : 8,32 '' + .line 8,8 : 18,20 '' IL_003a: ldloc.3 IL_003b: ldc.i4 0x989681 IL_0040: blt.s IL_002e diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals09.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals09.il.bsl index bf09abc529f..b20d3357b04 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals09.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals09.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 Equals09 { @@ -36,13 +36,13 @@ // Offset: 0x00000A98 Length: 0x0000058B } .module Equals09.dll -// MVID: {611C550D-0759-46D9-A745-03830D551C61} +// MVID: {61E0712B-0759-46D9-A745-03832B71E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06950000 +// Image base: 0x06B60000 // =============== 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 120 (0x78) + // Code size 119 (0x77) .maxstack 4 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_1, @@ -187,114 +187,112 @@ [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 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 '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 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006c + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_006b .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: 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 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: bge.s IL_0033 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0030: nop - IL_0031: br.s IL_003a + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.s V_4 - IL_0035: ldloc.s V_5 - IL_0037: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_0039: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003a: stloc.2 + IL_0039: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003b: ldloc.2 - IL_003c: ldc.i4.0 - IL_003d: bge.s IL_0041 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0041: ldloc.2 - IL_0042: ldc.i4.0 - IL_0043: ble.s IL_0047 + IL_0040: ldloc.2 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.2 - IL_0046: ret + IL_0044: ldloc.2 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_005d: ldloc.s V_4 - IL_005f: ldloc.s V_5 - IL_0061: bge.s IL_0065 + IL_005c: ldloc.s V_4 + IL_005e: ldloc.s V_5 + IL_0060: bge.s IL_0064 .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.m1 - IL_0064: ret + IL_0062: ldc.i4.m1 + IL_0063: ret .line 16707566,16707566 : 0,0 '' - IL_0065: ldloc.s V_4 - IL_0067: ldloc.s V_5 - IL_0069: cgt - IL_006b: ret + IL_0064: ldloc.s V_4 + IL_0066: ldloc.s V_5 + IL_0068: cgt + IL_006a: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.1 - IL_006d: ret + IL_006b: ldc.i4.1 + IL_006c: ret .line 16707566,16707566 : 0,0 '' - IL_006e: ldarg.1 - IL_006f: ldnull - IL_0070: cgt.un - IL_0072: brfalse.s IL_0076 + IL_006d: ldarg.1 + IL_006e: ldnull + IL_006f: cgt.un + IL_0071: brfalse.s IL_0075 .line 16707566,16707566 : 0,0 '' - IL_0074: ldc.i4.m1 - IL_0075: ret + IL_0073: ldc.i4.m1 + IL_0074: ret .line 16707566,16707566 : 0,0 '' - IL_0076: ldc.i4.0 - IL_0077: ret + IL_0075: ldc.i4.0 + IL_0076: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -303,7 +301,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 4,4 : 10,13 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/Key @@ -324,7 +321,7 @@ [3] int32 V_3, [4] int32 V_4, [5] int32 V_5) - .line 4,4 : 10,13 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 @@ -438,61 +435,59 @@ 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 61 (0x3d) + // Code size 60 (0x3c) .maxstack 7 .locals init ([0] int32 V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_1) - .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 + .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 + .line 16707566,16707566 : 0,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 IL_0020: add IL_0021: 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_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_0035: add IL_0036: add - IL_0037: add - IL_0038: stloc.0 - IL_0039: ldloc.0 - IL_003a: ret + IL_0037: stloc.0 + IL_0038: ldloc.0 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_003a: ldc.i4.0 + IL_003b: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -501,7 +496,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 10,13 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -513,127 +507,123 @@ 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 63 (0x3f) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0038 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/Key - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/Key + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0036 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_0011: ldarg.0 - IL_0012: pop + IL_0010: ldarg.0 + IL_0011: pop .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: stloc.1 - IL_0015: ldloc.0 - IL_0016: stloc.2 + IL_0012: ldarg.0 + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_0033: ldc.i4.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_0036: ldc.i4.0 - IL_0037: ret + IL_0035: ldc.i4.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_0038: ldarg.1 - IL_0039: ldnull - IL_003a: cgt.un - IL_003c: ldc.i4.0 - IL_003d: ceq - IL_003f: 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 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 60 (0x3c) + // Code size 59 (0x3b) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0034 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: pop .line 16707566,16707566 : 0,0 '' - IL_000f: ldarg.0 - IL_0010: stloc.0 - IL_0011: ldarg.1 - IL_0012: stloc.1 + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0030: ldc.i4.0 - IL_0031: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 16707566,16707566 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_0031: ldc.i4.0 + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldarg.1 - IL_0035: ldnull - IL_0036: cgt.un - IL_0038: ldc.i4.0 - IL_0039: ceq - IL_003b: ret + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -643,7 +633,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_0) - .line 4,4 : 10,13 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 @@ -812,7 +802,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 170 (0xaa) + // Code size 169 (0xa9) .maxstack 5 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -825,120 +815,118 @@ [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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse IL_00a0 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse IL_009f .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: ldnull - IL_000c: cgt.un - IL_000e: brfalse IL_009e + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: cgt.un + IL_000d: brfalse IL_009d .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0012: ldarg.0 + IL_0013: pop .line 16707566,16707566 : 0,0 '' - 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, + 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, class [mscorlib]System.Collections.IComparer) - IL_0039: stloc.2 + IL_0038: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0039: ldloc.2 + IL_003a: ldc.i4.0 + IL_003b: bge.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_003d: ldloc.2 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003f: ldloc.2 + IL_0040: ldc.i4.0 + IL_0041: ble.s IL_0045 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_0043: ldloc.2 + IL_0044: 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 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, + 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, class [mscorlib]System.Collections.IComparer) - IL_008a: stloc.s V_10 + IL_0089: stloc.s V_10 .line 16707566,16707566 : 0,0 '' - IL_008c: ldloc.s V_10 - IL_008e: brfalse.s IL_0093 + IL_008b: ldloc.s V_10 + IL_008d: brfalse.s IL_0092 .line 16707566,16707566 : 0,0 '' - IL_0090: ldloc.s V_10 - IL_0092: ret + IL_008f: ldloc.s V_10 + IL_0091: ret .line 16707566,16707566 : 0,0 '' - 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, + 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, class [mscorlib]System.Collections.IComparer) - IL_009d: ret + IL_009c: ret .line 16707566,16707566 : 0,0 '' - IL_009e: ldc.i4.1 - IL_009f: ret + IL_009d: ldc.i4.1 + IL_009e: ret .line 16707566,16707566 : 0,0 '' - IL_00a0: ldarg.1 - IL_00a1: ldnull - IL_00a2: cgt.un - IL_00a4: brfalse.s IL_00a8 + IL_009f: ldarg.1 + IL_00a0: ldnull + IL_00a1: cgt.un + IL_00a3: brfalse.s IL_00a7 .line 16707566,16707566 : 0,0 '' - IL_00a6: ldc.i4.m1 - IL_00a7: ret + IL_00a5: ldc.i4.m1 + IL_00a6: ret .line 16707566,16707566 : 0,0 '' - IL_00a8: ldc.i4.0 - IL_00a9: ret + IL_00a7: ldc.i4.0 + IL_00a8: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final @@ -947,7 +935,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 5,5 : 10,26 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys @@ -973,7 +960,7 @@ [8] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_8, [9] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_9, [10] int32 V_10) - .line 5,5 : 10,26 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys IL_0006: stloc.0 @@ -1093,7 +1080,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 108 (0x6c) + // Code size 107 (0x6b) .maxstack 7 .locals init ([0] int32 V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1101,79 +1088,77 @@ [3] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_3, [4] class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key V_4, [5] int32 V_5) - .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 + .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 + .line 16707566,16707566 : 0,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 IL_0049: add IL_004a: 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_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_0064: add IL_0065: add - IL_0066: add - IL_0067: stloc.0 - IL_0068: ldloc.0 - IL_0069: ret + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ret .line 16707566,16707566 : 0,0 '' - IL_006a: ldc.i4.0 - IL_006b: ret + IL_0069: ldc.i4.0 + IL_006a: ret } // end of method KeyWithInnerKeys::GetHashCode .method public hidebysig virtual final @@ -1182,7 +1167,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 5,5 : 10,26 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -1194,7 +1178,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 139 (0x8b) + // Code size 138 (0x8a) .maxstack 5 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1205,163 +1189,159 @@ [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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse IL_0083 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse IL_0082 .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_0010: stloc.0 + IL_0009: ldarg.1 + IL_000a: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_000f: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: brfalse.s IL_0081 + IL_0010: ldloc.0 + IL_0011: brfalse.s IL_0080 .line 16707566,16707566 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: pop + IL_0013: ldarg.0 + IL_0014: pop .line 16707566,16707566 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: stloc.1 - IL_0018: ldloc.0 - IL_0019: stloc.2 + IL_0015: ldarg.0 + IL_0016: stloc.1 + IL_0017: ldloc.0 + IL_0018: 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, + 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, class [mscorlib]System.Collections.IEqualityComparer) - IL_0032: brfalse.s IL_007f + IL_0031: brfalse.s IL_007e .line 16707566,16707566 : 0,0 '' - 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, + 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, class [mscorlib]System.Collections.IEqualityComparer) - IL_0070: brfalse.s IL_007d + IL_006f: brfalse.s IL_007c .line 16707566,16707566 : 0,0 '' - 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, + 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, class [mscorlib]System.Collections.IEqualityComparer) - IL_007c: ret + IL_007b: ret .line 16707566,16707566 : 0,0 '' - IL_007d: ldc.i4.0 - IL_007e: ret + IL_007c: ldc.i4.0 + IL_007d: ret .line 16707566,16707566 : 0,0 '' - IL_007f: ldc.i4.0 - IL_0080: ret + IL_007e: ldc.i4.0 + IL_007f: ret .line 16707566,16707566 : 0,0 '' - IL_0081: ldc.i4.0 - IL_0082: ret + IL_0080: ldc.i4.0 + IL_0081: ret .line 16707566,16707566 : 0,0 '' - IL_0083: ldarg.1 - IL_0084: ldnull - IL_0085: cgt.un - IL_0087: ldc.i4.0 - IL_0088: ceq - IL_008a: ret + IL_0082: ldarg.1 + IL_0083: ldnull + IL_0084: cgt.un + IL_0086: ldc.i4.0 + IL_0087: ceq + IL_0089: 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 70 (0x46) + // Code size 69 (0x45) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_003e + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003d .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_003c + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_003b .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 - .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 - + IL_000c: ldarg.0 + IL_000d: pop .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, + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + .line 16707566,16707566 : 0,0 '' + 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, !!0) - IL_0039: ret + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_003c: ldc.i4.0 - IL_003d: ret + IL_003b: ldc.i4.0 + IL_003c: ret .line 16707566,16707566 : 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_003d: ldarg.1 + IL_003e: ldnull + IL_003f: cgt.un + IL_0041: ldc.i4.0 + IL_0042: ceq + IL_0044: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final @@ -1371,7 +1351,7 @@ // Code size 22 (0x16) .maxstack 4 .locals init ([0] class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0) - .line 5,5 : 10,26 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys IL_0006: stloc.0 @@ -1467,7 +1447,7 @@ IL_003c: call class Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys Equals09/EqualsMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::NewKeyWithInnerKeys(class Equals09/EqualsMicroPerfAndCodeGenerationTests/Key, class [mscorlib]System.Tuple`2) IL_0041: stloc.2 - .line 10,10 : 8,32 '' + .line 10,10 : 8,11 '' IL_0042: ldc.i4.0 IL_0043: stloc.3 IL_0044: br.s IL_0057 @@ -1483,7 +1463,7 @@ IL_0054: ldc.i4.1 IL_0055: add IL_0056: stloc.3 - .line 10,10 : 8,32 '' + .line 10,10 : 18,20 '' IL_0057: ldloc.3 IL_0058: ldc.i4 0x989681 IL_005d: blt.s IL_0046 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash01.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash01.il.bsl index 5d4ed72b3e4..bd8888b525f 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash01.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 Hash01 { @@ -36,13 +36,13 @@ // Offset: 0x00000220 Length: 0x000000A9 } .module Hash01.dll -// MVID: {60BE1F16-9642-78D3-A745-0383161FBE60} +// MVID: {619833D0-9642-78D3-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B70000 +// Image base: 0x069C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,7 +65,7 @@ .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash01.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 - .line 6,6 : 8,32 '' + .line 6,6 : 8,11 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_000d @@ -77,7 +77,7 @@ IL_000a: ldc.i4.1 IL_000b: add IL_000c: stloc.1 - .line 6,6 : 8,32 '' + .line 6,6 : 18,20 '' IL_000d: ldloc.1 IL_000e: ldc.i4 0x989681 IL_0013: blt.s IL_0006 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash02.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash02.il.bsl index 48f1c42fb76..15aeb3de27a 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash02.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash02.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 Hash02 { @@ -36,13 +36,13 @@ // Offset: 0x00000220 Length: 0x0000010B } .module Hash02.dll -// MVID: {60BE1F16-9642-796E-A745-0383161FBE60} +// MVID: {61E0712B-9642-796E-A745-03832B71E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05400000 +// Image base: 0x071D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -59,8 +59,6 @@ { // Code size 1 (0x1) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 7,8 : 8,29 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash02.fsx' IL_0000: ret } // end of method HashMicroPerfAndCodeGenerationTests::f4_triple diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash03.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash03.il.bsl index 08951863dfe..6b887484fe2 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash03.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash03.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 extern netstandard { @@ -41,13 +41,13 @@ // Offset: 0x00000220 Length: 0x000000B0 } .module Hash03.dll -// MVID: {60BE1F16-9642-788D-A745-0383161FBE60} +// MVID: {619833D0-9642-788D-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A60000 +// Image base: 0x05400000 // =============== CLASS MEMBERS DECLARATION =================== @@ -70,7 +70,7 @@ .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash03.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 - .line 7,7 : 8,32 '' + .line 7,7 : 8,11 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_001e @@ -87,7 +87,7 @@ IL_001b: ldc.i4.1 IL_001c: add IL_001d: stloc.1 - .line 7,7 : 8,32 '' + .line 7,7 : 18,20 '' IL_001e: ldloc.1 IL_001f: ldc.i4 0x989681 IL_0024: blt.s IL_0006 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash04.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash04.il.bsl index e48efdc6f7a..d2b8f447e49 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash04.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash04.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 extern netstandard { @@ -41,13 +41,13 @@ // Offset: 0x00000220 Length: 0x000000B0 } .module Hash04.dll -// MVID: {60BE1F16-9642-7838-A745-0383161FBE60} +// MVID: {619833D0-9642-7838-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05A90000 +// Image base: 0x05390000 // =============== CLASS MEMBERS DECLARATION =================== @@ -70,7 +70,7 @@ .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash04.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 - .line 7,7 : 8,32 '' + .line 7,7 : 8,11 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_001e @@ -87,7 +87,7 @@ IL_001b: ldc.i4.1 IL_001c: add IL_001d: stloc.1 - .line 7,7 : 8,32 '' + .line 7,7 : 18,20 '' IL_001e: ldloc.1 IL_001f: ldc.i4 0x989681 IL_0024: blt.s IL_0006 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.il.bsl index aa19d121fe8..0734ff15608 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.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 Hash05 { @@ -36,13 +36,13 @@ // Offset: 0x000006D8 Length: 0x000003B1 } .module Hash05.dll -// MVID: {611C550D-9642-7857-A745-03830D551C61} +// MVID: {61E0712B-9642-7857-A745-03832B71E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06960000 +// Image base: 0x06A00000 // =============== 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 120 (0x78) + // Code size 119 (0x77) .maxstack 4 .locals init ([0] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -187,114 +187,112 @@ [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 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 '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 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006c + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_006b .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: bge.s IL_0033 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0030: nop - IL_0031: br.s IL_003a + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.s V_4 - IL_0035: ldloc.s V_5 - IL_0037: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_0039: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003a: stloc.2 + IL_0039: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003b: ldloc.2 - IL_003c: ldc.i4.0 - IL_003d: bge.s IL_0041 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0041: ldloc.2 - IL_0042: ldc.i4.0 - IL_0043: ble.s IL_0047 + IL_0040: ldloc.2 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.2 - IL_0046: ret + IL_0044: ldloc.2 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_005d: ldloc.s V_4 - IL_005f: ldloc.s V_5 - IL_0061: bge.s IL_0065 + IL_005c: ldloc.s V_4 + IL_005e: ldloc.s V_5 + IL_0060: bge.s IL_0064 .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.m1 - IL_0064: ret + IL_0062: ldc.i4.m1 + IL_0063: ret .line 16707566,16707566 : 0,0 '' - IL_0065: ldloc.s V_4 - IL_0067: ldloc.s V_5 - IL_0069: cgt - IL_006b: ret + IL_0064: ldloc.s V_4 + IL_0066: ldloc.s V_5 + IL_0068: cgt + IL_006a: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.1 - IL_006d: ret + IL_006b: ldc.i4.1 + IL_006c: ret .line 16707566,16707566 : 0,0 '' - IL_006e: ldarg.1 - IL_006f: ldnull - IL_0070: cgt.un - IL_0072: brfalse.s IL_0076 + IL_006d: ldarg.1 + IL_006e: ldnull + IL_006f: cgt.un + IL_0071: brfalse.s IL_0075 .line 16707566,16707566 : 0,0 '' - IL_0074: ldc.i4.m1 - IL_0075: ret + IL_0073: ldc.i4.m1 + IL_0074: ret .line 16707566,16707566 : 0,0 '' - IL_0076: ldc.i4.0 - IL_0077: ret + IL_0075: ldc.i4.0 + IL_0076: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -303,7 +301,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 5,5 : 10,13 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any Hash05/HashMicroPerfAndCodeGenerationTests/Key @@ -324,7 +321,7 @@ [3] int32 V_3, [4] int32 V_4, [5] int32 V_5) - .line 5,5 : 10,13 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any Hash05/HashMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 @@ -438,61 +435,59 @@ 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 61 (0x3d) + // Code size 60 (0x3c) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_1) - .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 + .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 + .line 16707566,16707566 : 0,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 IL_0020: add IL_0021: 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_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_0035: add IL_0036: add - IL_0037: add - IL_0038: stloc.0 - IL_0039: ldloc.0 - IL_003a: ret + IL_0037: stloc.0 + IL_0038: ldloc.0 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_003a: ldc.i4.0 + IL_003b: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -501,7 +496,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 5,5 : 10,13 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -513,127 +507,123 @@ 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 63 (0x3f) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0038 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst Hash05/HashMicroPerfAndCodeGenerationTests/Key - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst Hash05/HashMicroPerfAndCodeGenerationTests/Key + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0036 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_0011: ldarg.0 - IL_0012: pop + IL_0010: ldarg.0 + IL_0011: pop .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: stloc.1 - IL_0015: ldloc.0 - IL_0016: stloc.2 + IL_0012: ldarg.0 + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: stloc.2 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_0033: ldc.i4.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_0036: ldc.i4.0 - IL_0037: ret + IL_0035: ldc.i4.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_0038: ldarg.1 - IL_0039: ldnull - IL_003a: cgt.un - IL_003c: ldc.i4.0 - IL_003d: ceq - IL_003f: 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 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 60 (0x3c) + // Code size 59 (0x3b) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0034 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: pop .line 16707566,16707566 : 0,0 '' - IL_000f: ldarg.0 - IL_0010: stloc.0 - IL_0011: ldarg.1 - IL_0012: stloc.1 + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0030: ldc.i4.0 - IL_0031: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 16707566,16707566 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_0031: ldc.i4.0 + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldarg.1 - IL_0035: ldnull - IL_0036: cgt.un - IL_0038: ldc.i4.0 - IL_0039: ceq - IL_003b: ret + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -643,7 +633,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class Hash05/HashMicroPerfAndCodeGenerationTests/Key V_0) - .line 5,5 : 10,13 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst Hash05/HashMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 @@ -695,7 +685,7 @@ .maxstack 4 .locals init ([0] int32 i, [1] int32 V_1) - .line 8,8 : 8,32 '' + .line 8,8 : 8,11 '' IL_0000: ldc.i4.0 IL_0001: stloc.0 IL_0002: br.s IL_001a @@ -712,7 +702,7 @@ IL_0017: ldc.i4.1 IL_0018: add IL_0019: stloc.0 - .line 8,8 : 8,32 '' + .line 8,8 : 18,20 '' IL_001a: ldloc.0 IL_001b: ldc.i4 0x989681 IL_0020: blt.s IL_0004 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.il.bsl index bad5e3f191b..04dde3f372e 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.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 Hash06 { @@ -36,13 +36,13 @@ // Offset: 0x000006D8 Length: 0x000003B2 } .module Hash06.dll -// MVID: {611C550D-9642-78F2-A745-03830D551C61} +// MVID: {61E0712B-9642-78F2-A745-03832B71E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06F60000 +// Image base: 0x06D20000 // =============== 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 120 (0x78) + // Code size 119 (0x77) .maxstack 4 .locals init ([0] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -187,114 +187,112 @@ [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 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 '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 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006c + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_006b .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: bge.s IL_0033 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0030: nop - IL_0031: br.s IL_003a + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.s V_4 - IL_0035: ldloc.s V_5 - IL_0037: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_0039: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003a: stloc.2 + IL_0039: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003b: ldloc.2 - IL_003c: ldc.i4.0 - IL_003d: bge.s IL_0041 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0041: ldloc.2 - IL_0042: ldc.i4.0 - IL_0043: ble.s IL_0047 + IL_0040: ldloc.2 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.2 - IL_0046: ret + IL_0044: ldloc.2 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_005d: ldloc.s V_4 - IL_005f: ldloc.s V_5 - IL_0061: bge.s IL_0065 + IL_005c: ldloc.s V_4 + IL_005e: ldloc.s V_5 + IL_0060: bge.s IL_0064 .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.m1 - IL_0064: ret + IL_0062: ldc.i4.m1 + IL_0063: ret .line 16707566,16707566 : 0,0 '' - IL_0065: ldloc.s V_4 - IL_0067: ldloc.s V_5 - IL_0069: cgt - IL_006b: ret + IL_0064: ldloc.s V_4 + IL_0066: ldloc.s V_5 + IL_0068: cgt + IL_006a: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.1 - IL_006d: ret + IL_006b: ldc.i4.1 + IL_006c: ret .line 16707566,16707566 : 0,0 '' - IL_006e: ldarg.1 - IL_006f: ldnull - IL_0070: cgt.un - IL_0072: brfalse.s IL_0076 + IL_006d: ldarg.1 + IL_006e: ldnull + IL_006f: cgt.un + IL_0071: brfalse.s IL_0075 .line 16707566,16707566 : 0,0 '' - IL_0074: ldc.i4.m1 - IL_0075: ret + IL_0073: ldc.i4.m1 + IL_0074: ret .line 16707566,16707566 : 0,0 '' - IL_0076: ldc.i4.0 - IL_0077: ret + IL_0075: ldc.i4.0 + IL_0076: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -303,7 +301,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 4,4 : 10,13 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any Hash06/HashMicroPerfAndCodeGenerationTests/Key @@ -324,7 +321,7 @@ [3] int32 V_3, [4] int32 V_4, [5] int32 V_5) - .line 4,4 : 10,13 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any Hash06/HashMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 @@ -438,61 +435,59 @@ 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 61 (0x3d) + // Code size 60 (0x3c) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_1) - .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 + .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 + .line 16707566,16707566 : 0,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 IL_0020: add IL_0021: 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_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_0035: add IL_0036: add - IL_0037: add - IL_0038: stloc.0 - IL_0039: ldloc.0 - IL_003a: ret + IL_0037: stloc.0 + IL_0038: ldloc.0 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_003a: ldc.i4.0 + IL_003b: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -501,7 +496,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 10,13 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 Hash06/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -513,127 +507,123 @@ 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 63 (0x3f) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0038 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst Hash06/HashMicroPerfAndCodeGenerationTests/Key - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst Hash06/HashMicroPerfAndCodeGenerationTests/Key + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0036 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_0011: ldarg.0 - IL_0012: pop + IL_0010: ldarg.0 + IL_0011: pop .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: stloc.1 - IL_0015: ldloc.0 - IL_0016: stloc.2 + IL_0012: ldarg.0 + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: stloc.2 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_0033: ldc.i4.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_0036: ldc.i4.0 - IL_0037: ret + IL_0035: ldc.i4.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_0038: ldarg.1 - IL_0039: ldnull - IL_003a: cgt.un - IL_003c: ldc.i4.0 - IL_003d: ceq - IL_003f: 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 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 60 (0x3c) + // Code size 59 (0x3b) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0034 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: pop .line 16707566,16707566 : 0,0 '' - IL_000f: ldarg.0 - IL_0010: stloc.0 - IL_0011: ldarg.1 - IL_0012: stloc.1 + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0030: ldc.i4.0 - IL_0031: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 16707566,16707566 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_0031: ldc.i4.0 + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldarg.1 - IL_0035: ldnull - IL_0036: cgt.un - IL_0038: ldc.i4.0 - IL_0039: ceq - IL_003b: ret + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -643,7 +633,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class Hash06/HashMicroPerfAndCodeGenerationTests/Key V_0) - .line 4,4 : 10,13 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst Hash06/HashMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 @@ -695,7 +685,7 @@ .maxstack 4 .locals init ([0] int32 i, [1] int32 V_1) - .line 7,7 : 8,32 '' + .line 7,7 : 8,11 '' IL_0000: ldc.i4.0 IL_0001: stloc.0 IL_0002: br.s IL_0015 @@ -711,7 +701,7 @@ IL_0012: ldc.i4.1 IL_0013: add IL_0014: stloc.0 - .line 7,7 : 8,32 '' + .line 7,7 : 18,20 '' IL_0015: ldloc.0 IL_0016: ldc.i4 0x989681 IL_001b: blt.s IL_0004 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash07.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash07.il.bsl index ab4e803086f..e0dbe36fbc9 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash07.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash07.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 Hash07 { @@ -36,13 +36,13 @@ // Offset: 0x00000220 Length: 0x000000AA } .module Hash07.dll -// MVID: {60BE1F16-9642-7811-A745-0383161FBE60} +// MVID: {619833D0-9642-7811-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06740000 +// Image base: 0x06B80000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,7 +65,7 @@ .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash07.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 - .line 6,6 : 8,32 '' + .line 6,6 : 8,11 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_0010 @@ -81,7 +81,7 @@ IL_000d: ldc.i4.1 IL_000e: add IL_000f: stloc.1 - .line 6,6 : 8,32 '' + .line 6,6 : 18,20 '' IL_0010: ldloc.1 IL_0011: ldc.i4 0x989681 IL_0016: blt.s IL_0006 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.il.bsl index b8dedc27dc9..378545f8882 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.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 Hash08 { @@ -36,13 +36,13 @@ // Offset: 0x000006C8 Length: 0x000003B3 } .module Hash08.dll -// MVID: {611C550D-9642-77BC-A745-03830D551C61} +// MVID: {61E0712B-9642-77BC-A745-03832B71E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06580000 +// Image base: 0x06FA0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -123,114 +123,112 @@ 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 102 (0x66) + // Code size 101 (0x65) .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 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 '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 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_005a + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0059 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0021: ldloc.2 - IL_0022: ldloc.3 - IL_0023: bge.s IL_0029 + IL_0020: ldloc.2 + IL_0021: ldloc.3 + IL_0022: bge.s IL_0028 .line 16707566,16707566 : 0,0 '' - IL_0025: ldc.i4.m1 + IL_0024: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0026: nop - IL_0027: br.s IL_002e + IL_0025: nop + IL_0026: br.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.2 - IL_002a: ldloc.3 - IL_002b: cgt + IL_0028: ldloc.2 + IL_0029: ldloc.3 + IL_002a: cgt .line 16707566,16707566 : 0,0 '' - IL_002d: nop + IL_002c: nop .line 16707566,16707566 : 0,0 '' - IL_002e: stloc.0 + IL_002d: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_002f: ldloc.0 - IL_0030: ldc.i4.0 - IL_0031: bge.s IL_0035 + IL_002e: ldloc.0 + IL_002f: ldc.i4.0 + IL_0030: bge.s IL_0034 .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.0 - IL_0034: ret + IL_0032: ldloc.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldloc.0 - IL_0036: ldc.i4.0 - IL_0037: ble.s IL_003b + IL_0034: ldloc.0 + IL_0035: ldc.i4.0 + IL_0036: ble.s IL_003a .line 16707566,16707566 : 0,0 '' - IL_0039: ldloc.0 - IL_003a: ret + IL_0038: ldloc.0 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_004f: ldloc.2 - IL_0050: ldloc.3 - IL_0051: bge.s IL_0055 + IL_004e: ldloc.2 + IL_004f: ldloc.3 + IL_0050: bge.s IL_0054 .line 16707566,16707566 : 0,0 '' - IL_0053: ldc.i4.m1 - IL_0054: ret + IL_0052: ldc.i4.m1 + IL_0053: ret .line 16707566,16707566 : 0,0 '' - IL_0055: ldloc.2 - IL_0056: ldloc.3 - IL_0057: cgt - IL_0059: ret + IL_0054: ldloc.2 + IL_0055: ldloc.3 + IL_0056: cgt + IL_0058: ret .line 16707566,16707566 : 0,0 '' - IL_005a: ldc.i4.1 - IL_005b: ret + IL_0059: ldc.i4.1 + IL_005a: ret .line 16707566,16707566 : 0,0 '' - IL_005c: ldarg.1 - IL_005d: ldnull - IL_005e: cgt.un - IL_0060: brfalse.s IL_0064 + IL_005b: ldarg.1 + IL_005c: ldnull + IL_005d: cgt.un + IL_005f: brfalse.s IL_0063 .line 16707566,16707566 : 0,0 '' - IL_0062: ldc.i4.m1 - IL_0063: ret + IL_0061: ldc.i4.m1 + IL_0062: ret .line 16707566,16707566 : 0,0 '' - IL_0064: ldc.i4.0 - IL_0065: ret + IL_0063: ldc.i4.0 + IL_0064: ret } // end of method KeyR::CompareTo .method public hidebysig virtual final @@ -239,7 +237,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 4,4 : 10,14 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any Hash08/HashMicroPerfAndCodeGenerationTests/KeyR @@ -258,7 +255,7 @@ [1] int32 V_1, [2] int32 V_2, [3] int32 V_3) - .line 4,4 : 10,14 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any Hash08/HashMicroPerfAndCodeGenerationTests/KeyR IL_0006: stloc.0 @@ -365,52 +362,50 @@ 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 55 (0x37) + // Code size 54 (0x36) .maxstack 7 .locals init ([0] int32 V_0) - .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 + .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 IL_001a: add IL_001b: 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_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_002f: add IL_0030: add - IL_0031: add - IL_0032: stloc.0 - IL_0033: ldloc.0 - IL_0034: ret + IL_0031: stloc.0 + IL_0032: ldloc.0 + IL_0033: ret .line 16707566,16707566 : 0,0 '' - IL_0035: ldc.i4.0 - IL_0036: ret + IL_0034: ldc.i4.0 + IL_0035: ret } // end of method KeyR::GetHashCode .method public hidebysig virtual final @@ -419,7 +414,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 10,14 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -431,107 +425,103 @@ 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 57 (0x39) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0032 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst Hash08/HashMicroPerfAndCodeGenerationTests/KeyR - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst Hash08/HashMicroPerfAndCodeGenerationTests/KeyR + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0030 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_002f .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_002e: ldc.i4.0 - IL_002f: ret + IL_002d: ldc.i4.0 + IL_002e: ret .line 16707566,16707566 : 0,0 '' - IL_0030: ldc.i4.0 - IL_0031: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 16707566,16707566 : 0,0 '' - IL_0032: ldarg.1 - IL_0033: ldnull - IL_0034: cgt.un - IL_0036: ldc.i4.0 - IL_0037: ceq - IL_0039: 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 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 54 (0x36) + // Code size 53 (0x35) .maxstack 8 - .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_002e + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_002d .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_002c + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_002b .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_002a: ldc.i4.0 - IL_002b: ret + IL_0029: ldc.i4.0 + IL_002a: ret .line 16707566,16707566 : 0,0 '' - IL_002c: ldc.i4.0 - IL_002d: ret + IL_002b: ldc.i4.0 + IL_002c: ret .line 16707566,16707566 : 0,0 '' - IL_002e: ldarg.1 - IL_002f: ldnull - IL_0030: cgt.un - IL_0032: ldc.i4.0 - IL_0033: ceq - IL_0035: 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 KeyR::Equals .method public hidebysig virtual final @@ -541,7 +531,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class Hash08/HashMicroPerfAndCodeGenerationTests/KeyR V_0) - .line 4,4 : 10,14 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst Hash08/HashMicroPerfAndCodeGenerationTests/KeyR IL_0006: stloc.0 @@ -580,7 +570,7 @@ .maxstack 4 .locals init ([0] int32 i, [1] int32 V_1) - .line 7,7 : 8,32 '' + .line 7,7 : 8,11 '' IL_0000: ldc.i4.0 IL_0001: stloc.0 IL_0002: br.s IL_001a @@ -597,7 +587,7 @@ IL_0017: ldc.i4.1 IL_0018: add IL_0019: stloc.0 - .line 7,7 : 8,32 '' + .line 7,7 : 18,20 '' IL_001a: ldloc.0 IL_001b: ldc.i4 0x989681 IL_0020: blt.s IL_0004 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.il.bsl index 1de6d054801..0ec932e83b8 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.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 Hash09 { @@ -36,13 +36,13 @@ // Offset: 0x00000888 Length: 0x00000680 } .module Hash09.dll -// MVID: {611C550D-9642-77DB-A745-03830D551C61} +// MVID: {61E0712B-9642-77DB-A745-03832B71E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07230000 +// Image base: 0x07130000 // =============== 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 111 (0x6f) + // Code size 110 (0x6e) .maxstack 5 .locals init ([0] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_0, [1] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, @@ -187,96 +187,94 @@ [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 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, + .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, !!0, !!0) - IL_0033: stloc.2 + IL_0032: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_0034: ldloc.2 - IL_0035: ldc.i4.0 - IL_0036: bge.s IL_003a + IL_0033: ldloc.2 + IL_0034: ldc.i4.0 + IL_0035: bge.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0038: ldloc.2 - IL_0039: ret + IL_0037: ldloc.2 + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: ble.s IL_0040 + IL_0039: ldloc.2 + IL_003a: ldc.i4.0 + IL_003b: ble.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_003d: ldloc.2 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - 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, + 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, !!0, !!0) - IL_0062: ret + IL_0061: ret .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.1 - IL_0064: ret + IL_0062: ldc.i4.1 + IL_0063: ret .line 16707566,16707566 : 0,0 '' - IL_0065: ldarg.1 - IL_0066: ldnull - IL_0067: cgt.un - IL_0069: brfalse.s IL_006d + IL_0064: ldarg.1 + IL_0065: ldnull + IL_0066: cgt.un + IL_0068: brfalse.s IL_006c .line 16707566,16707566 : 0,0 '' - IL_006b: ldc.i4.m1 - IL_006c: ret + IL_006a: ldc.i4.m1 + IL_006b: ret .line 16707566,16707566 : 0,0 '' - IL_006d: ldc.i4.0 - IL_006e: ret + IL_006c: ldc.i4.0 + IL_006d: ret } // end of method GenericKey`1::CompareTo .method public hidebysig virtual final @@ -285,7 +283,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 15 (0xf) .maxstack 8 - .line 4,4 : 10,20 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 @@ -307,7 +304,7 @@ [3] int32 V_3, [4] !a V_4, [5] !a V_5) - .line 4,4 : 10,20 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 IL_0006: stloc.0 @@ -403,72 +400,70 @@ 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 77 (0x4d) + // Code size 76 (0x4c) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_1, [2] !a V_2) - .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, + .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 + .line 16707566,16707566 : 0,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, !!0) - 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_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: 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, + 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, !!0) - 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_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: add - IL_0048: stloc.0 - IL_0049: ldloc.0 - IL_004a: ret + IL_0047: stloc.0 + IL_0048: ldloc.0 + IL_0049: ret .line 16707566,16707566 : 0,0 '' - IL_004b: ldc.i4.0 - IL_004c: ret + IL_004a: ldc.i4.0 + IL_004b: ret } // end of method GenericKey`1::GetHashCode .method public hidebysig virtual final @@ -477,7 +472,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 10,20 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -489,159 +483,155 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 88 (0x58) + // Code size 87 (0x57) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0050 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_004f .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_004e + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_004d .line 16707566,16707566 : 0,0 '' - IL_0011: ldarg.0 - IL_0012: pop + IL_0010: ldarg.0 + IL_0011: pop .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: stloc.1 - IL_0015: ldloc.0 - IL_0016: stloc.2 + IL_0012: ldarg.0 + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: 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, + 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, !!0, !!0) - 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, + 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, !!0, !!0) - IL_004b: ret + IL_004a: ret .line 16707566,16707566 : 0,0 '' - IL_004c: ldc.i4.0 - IL_004d: ret + IL_004b: ldc.i4.0 + IL_004c: ret .line 16707566,16707566 : 0,0 '' - IL_004e: ldc.i4.0 - IL_004f: ret + IL_004d: ldc.i4.0 + IL_004e: ret .line 16707566,16707566 : 0,0 '' - IL_0050: ldarg.1 - IL_0051: ldnull - IL_0052: cgt.un - IL_0054: ldc.i4.0 - IL_0055: ceq - IL_0057: ret + IL_004f: ldarg.1 + IL_0050: ldnull + IL_0051: cgt.un + IL_0053: ldc.i4.0 + IL_0054: ceq + IL_0056: 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 78 (0x4e) + // Code size 77 (0x4d) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0046 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0045 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0044 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0043 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: pop .line 16707566,16707566 : 0,0 '' - IL_000f: ldarg.0 - IL_0010: stloc.0 - IL_0011: ldarg.1 - IL_0012: stloc.1 + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: 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, + 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, !!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, + 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, !!0) - IL_0041: ret + IL_0040: ret .line 16707566,16707566 : 0,0 '' - IL_0042: ldc.i4.0 - IL_0043: ret + IL_0041: ldc.i4.0 + IL_0042: ret .line 16707566,16707566 : 0,0 '' - IL_0044: ldc.i4.0 - IL_0045: ret + IL_0043: ldc.i4.0 + IL_0044: ret .line 16707566,16707566 : 0,0 '' - IL_0046: ldarg.1 - IL_0047: ldnull - IL_0048: cgt.un - IL_004a: ldc.i4.0 - IL_004b: ceq - IL_004d: ret + IL_0045: ldarg.1 + IL_0046: ldnull + IL_0047: cgt.un + IL_0049: ldc.i4.0 + IL_004a: ceq + IL_004c: ret } // end of method GenericKey`1::Equals .method public hidebysig virtual final @@ -651,7 +641,7 @@ // Code size 22 (0x16) .maxstack 4 .locals init ([0] class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 V_0) - .line 4,4 : 10,20 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 IL_0006: stloc.0 @@ -704,7 +694,7 @@ .maxstack 4 .locals init ([0] int32 i, [1] int32 V_1) - .line 7,7 : 8,32 '' + .line 7,7 : 8,11 '' IL_0000: ldc.i4.0 IL_0001: stloc.0 IL_0002: br.s IL_001a @@ -721,7 +711,7 @@ IL_0017: ldc.i4.1 IL_0018: add IL_0019: stloc.0 - .line 7,7 : 8,32 '' + .line 7,7 : 18,20 '' IL_001a: ldloc.0 IL_001b: ldc.i4 0x989681 IL_0020: blt.s IL_0004 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash10.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash10.il.bsl index a592e836742..be4ef0dafc1 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash10.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash10.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 Hash10 { @@ -36,13 +36,13 @@ // Offset: 0x00000220 Length: 0x000000A9 } .module Hash10.dll -// MVID: {60BE1F16-9661-78B4-A745-0383161FBE60} +// MVID: {619833D0-9661-78B4-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00BB0000 +// Image base: 0x069E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -73,7 +73,7 @@ IL_0009: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_0013: stloc.0 - .line 7,7 : 8,32 '' + .line 7,7 : 8,11 '' IL_0014: ldc.i4.0 IL_0015: stloc.1 IL_0016: br.s IL_0023 @@ -86,7 +86,7 @@ IL_0020: ldc.i4.1 IL_0021: add IL_0022: stloc.1 - .line 7,7 : 8,32 '' + .line 7,7 : 18,20 '' IL_0023: ldloc.1 IL_0024: ldc.i4 0x989681 IL_0029: blt.s IL_0018 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash11.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash11.il.bsl index e01d5bc6aad..a2e58759c45 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash11.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash11.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 Hash11 { @@ -36,13 +36,13 @@ // Offset: 0x00000220 Length: 0x000000A9 } .module Hash11.dll -// MVID: {60BE1F16-9661-78D3-A745-0383161FBE60} +// MVID: {619833D0-9661-78D3-A745-0383D0339861} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06C60000 +// Image base: 0x05A40000 // =============== CLASS MEMBERS DECLARATION =================== @@ -73,7 +73,7 @@ IL_0009: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_0013: stloc.0 - .line 7,7 : 8,32 '' + .line 7,7 : 8,11 '' IL_0014: ldc.i4.0 IL_0015: stloc.1 IL_0016: br.s IL_0023 @@ -86,7 +86,7 @@ IL_0020: ldc.i4.1 IL_0021: add IL_0022: stloc.1 - .line 7,7 : 8,32 '' + .line 7,7 : 18,20 '' IL_0023: ldloc.1 IL_0024: ldc.i4 0x989681 IL_0029: blt.s IL_0018 diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.il.bsl index dd4511bb604..60c760d10d4 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.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 Hash12 { @@ -36,13 +36,13 @@ // Offset: 0x00000A90 Length: 0x00000585 } .module Hash12.dll -// MVID: {611C550D-9661-796E-A745-03830D551C61} +// MVID: {61E0712B-9661-796E-A745-03832B71E061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05130000 +// Image base: 0x066C0000 // =============== 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 120 (0x78) + // Code size 119 (0x77) .maxstack 4 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_1, @@ -187,114 +187,112 @@ [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 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 '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 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_006c + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_006b .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: 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 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0029: ldloc.s V_4 - IL_002b: ldloc.s V_5 - IL_002d: bge.s IL_0033 + IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_5 + IL_002c: bge.s IL_0032 .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.m1 + IL_002e: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0030: nop - IL_0031: br.s IL_003a + IL_002f: nop + IL_0030: br.s IL_0039 .line 16707566,16707566 : 0,0 '' - IL_0033: ldloc.s V_4 - IL_0035: ldloc.s V_5 - IL_0037: cgt + IL_0032: ldloc.s V_4 + IL_0034: ldloc.s V_5 + IL_0036: cgt .line 16707566,16707566 : 0,0 '' - IL_0039: nop + IL_0038: nop .line 16707566,16707566 : 0,0 '' - IL_003a: stloc.2 + IL_0039: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003b: ldloc.2 - IL_003c: ldc.i4.0 - IL_003d: bge.s IL_0041 + IL_003a: ldloc.2 + IL_003b: ldc.i4.0 + IL_003c: bge.s IL_0040 .line 16707566,16707566 : 0,0 '' - IL_003f: ldloc.2 - IL_0040: ret + IL_003e: ldloc.2 + IL_003f: ret .line 16707566,16707566 : 0,0 '' - IL_0041: ldloc.2 - IL_0042: ldc.i4.0 - IL_0043: ble.s IL_0047 + IL_0040: ldloc.2 + IL_0041: ldc.i4.0 + IL_0042: ble.s IL_0046 .line 16707566,16707566 : 0,0 '' - IL_0045: ldloc.2 - IL_0046: ret + IL_0044: ldloc.2 + IL_0045: ret .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_005d: ldloc.s V_4 - IL_005f: ldloc.s V_5 - IL_0061: bge.s IL_0065 + IL_005c: ldloc.s V_4 + IL_005e: ldloc.s V_5 + IL_0060: bge.s IL_0064 .line 16707566,16707566 : 0,0 '' - IL_0063: ldc.i4.m1 - IL_0064: ret + IL_0062: ldc.i4.m1 + IL_0063: ret .line 16707566,16707566 : 0,0 '' - IL_0065: ldloc.s V_4 - IL_0067: ldloc.s V_5 - IL_0069: cgt - IL_006b: ret + IL_0064: ldloc.s V_4 + IL_0066: ldloc.s V_5 + IL_0068: cgt + IL_006a: ret .line 16707566,16707566 : 0,0 '' - IL_006c: ldc.i4.1 - IL_006d: ret + IL_006b: ldc.i4.1 + IL_006c: ret .line 16707566,16707566 : 0,0 '' - IL_006e: ldarg.1 - IL_006f: ldnull - IL_0070: cgt.un - IL_0072: brfalse.s IL_0076 + IL_006d: ldarg.1 + IL_006e: ldnull + IL_006f: cgt.un + IL_0071: brfalse.s IL_0075 .line 16707566,16707566 : 0,0 '' - IL_0074: ldc.i4.m1 - IL_0075: ret + IL_0073: ldc.i4.m1 + IL_0074: ret .line 16707566,16707566 : 0,0 '' - IL_0076: ldc.i4.0 - IL_0077: ret + IL_0075: ldc.i4.0 + IL_0076: ret } // end of method Key::CompareTo .method public hidebysig virtual final @@ -303,7 +301,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 4,4 : 10,13 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/Key @@ -324,7 +321,7 @@ [3] int32 V_3, [4] int32 V_4, [5] int32 V_5) - .line 4,4 : 10,13 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 @@ -438,61 +435,59 @@ 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 61 (0x3d) + // Code size 60 (0x3c) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_1) - .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 + .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 + .line 16707566,16707566 : 0,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 IL_0020: add IL_0021: 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_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_0035: add IL_0036: add - IL_0037: add - IL_0038: stloc.0 - IL_0039: ldloc.0 - IL_003a: ret + IL_0037: stloc.0 + IL_0038: ldloc.0 + IL_0039: ret .line 16707566,16707566 : 0,0 '' - IL_003b: ldc.i4.0 - IL_003c: ret + IL_003a: ldc.i4.0 + IL_003b: ret } // end of method Key::GetHashCode .method public hidebysig virtual final @@ -501,7 +496,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 4,4 : 10,13 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -513,127 +507,123 @@ 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 63 (0x3f) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0038 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0037 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: isinst Hash12/HashMicroPerfAndCodeGenerationTests/Key - IL_000d: stloc.0 + IL_0006: ldarg.1 + IL_0007: isinst Hash12/HashMicroPerfAndCodeGenerationTests/Key + IL_000c: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.0 - IL_000f: brfalse.s IL_0036 + IL_000d: ldloc.0 + IL_000e: brfalse.s IL_0035 .line 16707566,16707566 : 0,0 '' - IL_0011: ldarg.0 - IL_0012: pop + IL_0010: ldarg.0 + IL_0011: pop .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: stloc.1 - IL_0015: ldloc.0 - IL_0016: stloc.2 + IL_0012: ldarg.0 + IL_0013: stloc.1 + IL_0014: ldloc.0 + IL_0015: 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0034: ldc.i4.0 - IL_0035: ret + IL_0033: ldc.i4.0 + IL_0034: ret .line 16707566,16707566 : 0,0 '' - IL_0036: ldc.i4.0 - IL_0037: ret + IL_0035: ldc.i4.0 + IL_0036: ret .line 16707566,16707566 : 0,0 '' - IL_0038: ldarg.1 - IL_0039: ldnull - IL_003a: cgt.un - IL_003c: ldc.i4.0 - IL_003d: ceq - IL_003f: 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 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 60 (0x3c) + // Code size 59 (0x3b) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_0034 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_0032 + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: pop + IL_000c: ldarg.0 + IL_000d: pop .line 16707566,16707566 : 0,0 '' - IL_000f: ldarg.0 - IL_0010: stloc.0 - IL_0011: ldarg.1 - IL_0012: stloc.1 + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: 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 + 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 .line 16707566,16707566 : 0,0 '' - 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 + 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 .line 16707566,16707566 : 0,0 '' - IL_0030: ldc.i4.0 - IL_0031: ret + IL_002f: ldc.i4.0 + IL_0030: ret .line 16707566,16707566 : 0,0 '' - IL_0032: ldc.i4.0 - IL_0033: ret + IL_0031: ldc.i4.0 + IL_0032: ret .line 16707566,16707566 : 0,0 '' - IL_0034: ldarg.1 - IL_0035: ldnull - IL_0036: cgt.un - IL_0038: ldc.i4.0 - IL_0039: ceq - IL_003b: ret + IL_0033: ldarg.1 + IL_0034: ldnull + IL_0035: cgt.un + IL_0037: ldc.i4.0 + IL_0038: ceq + IL_003a: ret } // end of method Key::Equals .method public hidebysig virtual final @@ -643,7 +633,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_0) - .line 4,4 : 10,13 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst Hash12/HashMicroPerfAndCodeGenerationTests/Key IL_0006: stloc.0 @@ -812,7 +802,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 170 (0xaa) + // Code size 169 (0xa9) .maxstack 5 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -825,120 +815,118 @@ [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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse IL_00a0 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse IL_009f .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: ldnull - IL_000c: cgt.un - IL_000e: brfalse IL_009e + IL_0009: ldarg.1 + IL_000a: ldnull + IL_000b: cgt.un + IL_000d: brfalse IL_009d .line 16707566,16707566 : 0,0 '' - IL_0013: ldarg.0 - IL_0014: pop + IL_0012: ldarg.0 + IL_0013: pop .line 16707566,16707566 : 0,0 '' - 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, + 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, class [mscorlib]System.Collections.IComparer) - IL_0039: stloc.2 + IL_0038: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_003a: ldloc.2 - IL_003b: ldc.i4.0 - IL_003c: bge.s IL_0040 + IL_0039: ldloc.2 + IL_003a: ldc.i4.0 + IL_003b: bge.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_003e: ldloc.2 - IL_003f: ret + IL_003d: ldloc.2 + IL_003e: ret .line 16707566,16707566 : 0,0 '' - IL_0040: ldloc.2 - IL_0041: ldc.i4.0 - IL_0042: ble.s IL_0046 + IL_003f: ldloc.2 + IL_0040: ldc.i4.0 + IL_0041: ble.s IL_0045 .line 16707566,16707566 : 0,0 '' - IL_0044: ldloc.2 - IL_0045: ret + IL_0043: ldloc.2 + IL_0044: 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 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, + 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, class [mscorlib]System.Collections.IComparer) - IL_008a: stloc.s V_10 + IL_0089: stloc.s V_10 .line 16707566,16707566 : 0,0 '' - IL_008c: ldloc.s V_10 - IL_008e: brfalse.s IL_0093 + IL_008b: ldloc.s V_10 + IL_008d: brfalse.s IL_0092 .line 16707566,16707566 : 0,0 '' - IL_0090: ldloc.s V_10 - IL_0092: ret + IL_008f: ldloc.s V_10 + IL_0091: ret .line 16707566,16707566 : 0,0 '' - 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, + 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, class [mscorlib]System.Collections.IComparer) - IL_009d: ret + IL_009c: ret .line 16707566,16707566 : 0,0 '' - IL_009e: ldc.i4.1 - IL_009f: ret + IL_009d: ldc.i4.1 + IL_009e: ret .line 16707566,16707566 : 0,0 '' - IL_00a0: ldarg.1 - IL_00a1: ldnull - IL_00a2: cgt.un - IL_00a4: brfalse.s IL_00a8 + IL_009f: ldarg.1 + IL_00a0: ldnull + IL_00a1: cgt.un + IL_00a3: brfalse.s IL_00a7 .line 16707566,16707566 : 0,0 '' - IL_00a6: ldc.i4.m1 - IL_00a7: ret + IL_00a5: ldc.i4.m1 + IL_00a6: ret .line 16707566,16707566 : 0,0 '' - IL_00a8: ldc.i4.0 - IL_00a9: ret + IL_00a7: ldc.i4.0 + IL_00a8: ret } // end of method KeyWithInnerKeys::CompareTo .method public hidebysig virtual final @@ -947,7 +935,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 13 (0xd) .maxstack 8 - .line 5,5 : 10,26 '' IL_0000: ldarg.0 IL_0001: ldarg.1 IL_0002: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys @@ -973,7 +960,7 @@ [8] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_8, [9] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_9, [10] int32 V_10) - .line 5,5 : 10,26 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: unbox.any Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys IL_0006: stloc.0 @@ -1093,7 +1080,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 108 (0x6c) + // Code size 107 (0x6b) .maxstack 7 .locals init ([0] int32 V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1101,79 +1088,77 @@ [3] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_3, [4] class Hash12/HashMicroPerfAndCodeGenerationTests/Key V_4, [5] int32 V_5) - .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 + .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 + .line 16707566,16707566 : 0,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 IL_0049: add IL_004a: 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_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_0064: add IL_0065: add - IL_0066: add - IL_0067: stloc.0 - IL_0068: ldloc.0 - IL_0069: ret + IL_0066: stloc.0 + IL_0067: ldloc.0 + IL_0068: ret .line 16707566,16707566 : 0,0 '' - IL_006a: ldc.i4.0 - IL_006b: ret + IL_0069: ldc.i4.0 + IL_006a: ret } // end of method KeyWithInnerKeys::GetHashCode .method public hidebysig virtual final @@ -1182,7 +1167,6 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) .maxstack 8 - .line 5,5 : 10,26 '' IL_0000: ldarg.0 IL_0001: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() IL_0006: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) @@ -1194,7 +1178,7 @@ class [mscorlib]System.Collections.IEqualityComparer comp) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 139 (0x8b) + // Code size 138 (0x8a) .maxstack 5 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0, [1] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_1, @@ -1205,163 +1189,159 @@ [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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse IL_0083 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse IL_0082 .line 16707566,16707566 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: isinst Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys - IL_0010: stloc.0 + IL_0009: ldarg.1 + IL_000a: isinst Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys + IL_000f: stloc.0 .line 16707566,16707566 : 0,0 '' - IL_0011: ldloc.0 - IL_0012: brfalse.s IL_0081 + IL_0010: ldloc.0 + IL_0011: brfalse.s IL_0080 .line 16707566,16707566 : 0,0 '' - IL_0014: ldarg.0 - IL_0015: pop + IL_0013: ldarg.0 + IL_0014: pop .line 16707566,16707566 : 0,0 '' - IL_0016: ldarg.0 - IL_0017: stloc.1 - IL_0018: ldloc.0 - IL_0019: stloc.2 + IL_0015: ldarg.0 + IL_0016: stloc.1 + IL_0017: ldloc.0 + IL_0018: 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, + 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, class [mscorlib]System.Collections.IEqualityComparer) - IL_0032: brfalse.s IL_007f + IL_0031: brfalse.s IL_007e .line 16707566,16707566 : 0,0 '' - 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, + 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, class [mscorlib]System.Collections.IEqualityComparer) - IL_0070: brfalse.s IL_007d + IL_006f: brfalse.s IL_007c .line 16707566,16707566 : 0,0 '' - 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, + 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, class [mscorlib]System.Collections.IEqualityComparer) - IL_007c: ret + IL_007b: ret .line 16707566,16707566 : 0,0 '' - IL_007d: ldc.i4.0 - IL_007e: ret + IL_007c: ldc.i4.0 + IL_007d: ret .line 16707566,16707566 : 0,0 '' - IL_007f: ldc.i4.0 - IL_0080: ret + IL_007e: ldc.i4.0 + IL_007f: ret .line 16707566,16707566 : 0,0 '' - IL_0081: ldc.i4.0 - IL_0082: ret + IL_0080: ldc.i4.0 + IL_0081: ret .line 16707566,16707566 : 0,0 '' - IL_0083: ldarg.1 - IL_0084: ldnull - IL_0085: cgt.un - IL_0087: ldc.i4.0 - IL_0088: ceq - IL_008a: ret + IL_0082: ldarg.1 + IL_0083: ldnull + IL_0084: cgt.un + IL_0086: ldc.i4.0 + IL_0087: ceq + IL_0089: 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 70 (0x46) + // Code size 69 (0x45) .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_0001: ldarg.0 - IL_0002: ldnull - IL_0003: cgt.un - IL_0005: brfalse.s IL_003e + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: cgt.un + IL_0004: brfalse.s IL_003d .line 16707566,16707566 : 0,0 '' - IL_0007: ldarg.1 - IL_0008: ldnull - IL_0009: cgt.un - IL_000b: brfalse.s IL_003c + IL_0006: ldarg.1 + IL_0007: ldnull + IL_0008: cgt.un + IL_000a: brfalse.s IL_003b .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 - .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 - + IL_000c: ldarg.0 + IL_000d: pop .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, + IL_000e: ldarg.0 + IL_000f: stloc.0 + IL_0010: ldarg.1 + IL_0011: stloc.1 + .line 16707566,16707566 : 0,0 '' + 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, !!0) - IL_0039: ret + IL_0038: ret .line 16707566,16707566 : 0,0 '' - IL_003a: ldc.i4.0 - IL_003b: ret + IL_0039: ldc.i4.0 + IL_003a: ret .line 16707566,16707566 : 0,0 '' - IL_003c: ldc.i4.0 - IL_003d: ret + IL_003b: ldc.i4.0 + IL_003c: ret .line 16707566,16707566 : 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_003d: ldarg.1 + IL_003e: ldnull + IL_003f: cgt.un + IL_0041: ldc.i4.0 + IL_0042: ceq + IL_0044: ret } // end of method KeyWithInnerKeys::Equals .method public hidebysig virtual final @@ -1371,7 +1351,7 @@ // Code size 22 (0x16) .maxstack 4 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys V_0) - .line 5,5 : 10,26 '' + .line 16707566,16707566 : 0,0 '' IL_0000: ldarg.1 IL_0001: isinst Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys IL_0006: stloc.0 @@ -1445,7 +1425,7 @@ IL_001a: call class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::NewKeyWithInnerKeys(class Hash12/HashMicroPerfAndCodeGenerationTests/Key, class [mscorlib]System.Tuple`2) IL_001f: stloc.0 - .line 9,9 : 8,32 '' + .line 9,9 : 8,11 '' IL_0020: ldc.i4.0 IL_0021: stloc.1 IL_0022: br.s IL_0034 @@ -1459,7 +1439,7 @@ IL_0031: ldc.i4.1 IL_0032: add IL_0033: stloc.1 - .line 9,9 : 8,32 '' + .line 9,9 : 18,20 '' IL_0034: ldloc.1 IL_0035: ldc.i4 0x989681 IL_003a: blt.s IL_0024 diff --git a/tests/service/ExprTests.fs b/tests/service/ExprTests.fs index 8713bb41e96..44635252a15 100644 --- a/tests/service/ExprTests.fs +++ b/tests/service/ExprTests.fs @@ -114,7 +114,7 @@ module internal Utils = | ILFieldSet _ -> "ILFieldSet" | IfThenElse (a,b,c) -> "(if " + printExpr 0 a + " then " + printExpr 0 b + " else " + printExpr 0 c + ")" | Lambda(v,e1) -> "fun " + v.CompiledName + " -> " + printExpr 0 e1 - | Let((v,e1),b) -> "let " + (if v.IsMutable then "mutable " else "") + v.CompiledName + ": " + printTy v.FullType + " = " + printExpr 0 e1 + " in " + printExpr 0 b + | Let((v,e1, _dp),b) -> "let " + (if v.IsMutable then "mutable " else "") + v.CompiledName + ": " + printTy v.FullType + " = " + printExpr 0 e1 + " in " + printExpr 0 b | LetRec(vse,b) -> "let rec ... in " + printExpr 0 b | NewArray(ty,es) -> "[|" + (es |> Seq.map (printExpr 0) |> String.concat "; ") + "|]" | NewDelegate(ty,es) -> "new-delegate" @@ -133,8 +133,8 @@ module internal Utils = | FSharpFieldSet(obj, ty,f,arg) -> printObjOpt obj + f.Name + " <- " + printExpr 0 arg | Sequential(e1,e2) -> "(" + printExpr 0 e1 + "; " + printExpr 0 e2 + ")" | ThisValue _ -> "this" - | TryFinally(e1,e2) -> "try " + printExpr 0 e1 + " finally " + printExpr 0 e2 - | TryWith(e1,_,_,vC,eC) -> "try " + printExpr 0 e1 + " with " + vC.CompiledName + " -> " + printExpr 0 eC + | TryFinally(e1,e2, _dp1, _dp2) -> "try " + printExpr 0 e1 + " finally " + printExpr 0 e2 + | TryWith(e1,_,_,vC,eC, _dp1, _dp2) -> "try " + printExpr 0 e1 + " with " + vC.CompiledName + " -> " + printExpr 0 eC | TupleGet(ty,n,e1) -> printExpr 10 e1 + ".Item" + string n | DecisionTree(dtree,targets) -> "match " + printExpr 10 dtree + " targets ..." | DecisionTreeSuccess (tg,es) -> "$" + string tg @@ -153,7 +153,8 @@ module internal Utils = | _ -> string obj | Value(v) -> v.CompiledName | ValueSet(v,e1) -> quote low (v.CompiledName + " <- " + printExpr 0 e1) - | WhileLoop(e1,e2) -> "while " + printExpr 0 e1 + " do " + printExpr 0 e2 + " done" + | WhileLoop(e1,e2, _dp) -> "while " + printExpr 0 e1 + " do " + printExpr 0 e2 + " done" + | DebugPoint(_dp, innerExpr) -> printExpr low innerExpr | _ -> failwith (sprintf "unrecognized %+A" e) and quote low s = if low > 0 then "(" + s + ")" else s @@ -288,7 +289,7 @@ module internal Utils = | Call(None,v,_,_,argsL) -> Seq.concat [ Seq.singleton v; Seq.collect collectMembers argsL ] | Coerce(_,e) -> collectMembers e | DefaultValue _ -> Seq.empty - | FastIntegerForLoop (fromArg, toArg, body, _) -> Seq.collect collectMembers [ fromArg; toArg; body ] + | FastIntegerForLoop (fromArg, toArg, body, _, _dp1, _dp2) -> Seq.collect collectMembers [ fromArg; toArg; body ] | ILAsm(_,_,args) -> Seq.collect collectMembers args | ILFieldGet (Some e,_,_) -> collectMembers e | ILFieldGet _ -> Seq.empty @@ -296,8 +297,8 @@ module internal Utils = | ILFieldSet _ -> Seq.empty | IfThenElse (a,b,c) -> Seq.collect collectMembers [ a; b; c ] | Lambda(v,e1) -> collectMembers e1 - | Let((v,e1),b) -> Seq.append (collectMembers e1) (collectMembers b) - | LetRec(vse,b) -> Seq.append (vse |> Seq.collect (snd >> collectMembers)) (collectMembers b) + | Let((v,e1, _dp),b) -> Seq.append (collectMembers e1) (collectMembers b) + | LetRec(vse,b) -> Seq.append (vse |> Seq.collect (fun (_, a, _) -> a |> collectMembers)) (collectMembers b) | NewArray(_,es) -> Seq.collect collectMembers es | NewDelegate(ty,es) -> collectMembers es | NewObject(v,tys,args) -> Seq.append (Seq.singleton v) (Seq.collect collectMembers args) @@ -311,8 +312,8 @@ module internal Utils = | FSharpFieldSet(None,_,_,arg) -> collectMembers arg | Sequential(e1,e2) -> Seq.append (collectMembers e1) (collectMembers e2) | ThisValue _ -> Seq.empty - | TryFinally(e1,e2) -> Seq.append (collectMembers e1) (collectMembers e2) - | TryWith(e1,_,f,_,eC) -> Seq.collect collectMembers [ e1; f; eC ] + | TryFinally(e1,e2, _dp1, _dp2) -> Seq.append (collectMembers e1) (collectMembers e2) + | TryWith(e1,_,f,_,eC, _dp1, _dp2) -> Seq.collect collectMembers [ e1; f; eC ] | TupleGet(ty,n,e1) -> collectMembers e1 | DecisionTree(dtree,targets) -> Seq.append (collectMembers dtree) (targets |> Seq.collect (snd >> collectMembers)) | DecisionTreeSuccess (tg,es) -> Seq.collect collectMembers es @@ -335,7 +336,8 @@ module internal Utils = | Const(obj,ty) -> Seq.empty | Value(v) -> Seq.singleton v | ValueSet(v,e1) -> Seq.append (Seq.singleton v) (collectMembers e1) - | WhileLoop(e1,e2) -> Seq.append (collectMembers e1) (collectMembers e2) + | WhileLoop(e1,e2,_dp) -> Seq.append (collectMembers e1) (collectMembers e2) + | DebugPoint(_dp, innerExpr) -> collectMembers innerExpr | _ -> failwith (sprintf "unrecognized %+A" e) let rec printMembersOfDeclatations ds = @@ -949,15 +951,15 @@ let ``Test Optimized Declarations Project1`` () = "let start(name) = (name,name) @ (217,4--217,14)"; "let last(name,values) = Operators.Identity ((name,values)) @ (220,4--220,21)"; "let last2(name) = Operators.Identity (name) @ (223,4--223,11)"; - "let test7(s) = let Pipe #1 input at line 226: Microsoft.FSharp.Core.string * Microsoft.FSharp.Core.string = M.start (s) in (let name: Microsoft.FSharp.Core.string = Pipe #1 input at line 226.Item0 in let values: Microsoft.FSharp.Core.string = Pipe #1 input at line 226.Item1 in M.last (name,values); ()) @ (226,4--226,19)"; + "let test7(s) = let Pipe #1 input at line 226: Microsoft.FSharp.Core.string * Microsoft.FSharp.Core.string = M.start (s) in let name: Microsoft.FSharp.Core.string = Pipe #1 input at line 226.Item0 in let values: Microsoft.FSharp.Core.string = Pipe #1 input at line 226.Item1 in M.last (name,values) @ (226,4--226,19)"; "let test8(unitVar0) = fun tupledArg -> let name: Microsoft.FSharp.Core.string = tupledArg.Item0 in let values: Microsoft.FSharp.Core.string = tupledArg.Item1 in M.last (name,values) @ (229,4--229,8)"; - "let test9(s) = let Pipe #1 input at line 232: Microsoft.FSharp.Core.string * Microsoft.FSharp.Core.string = (s,s) in (let name: Microsoft.FSharp.Core.string = Pipe #1 input at line 232.Item0 in let values: Microsoft.FSharp.Core.string = Pipe #1 input at line 232.Item1 in M.last (name,values); ()) @ (232,4--232,17)"; + "let test9(s) = let Pipe #1 input at line 232: Microsoft.FSharp.Core.string * Microsoft.FSharp.Core.string = (s,s) in let name: Microsoft.FSharp.Core.string = Pipe #1 input at line 232.Item0 in let values: Microsoft.FSharp.Core.string = Pipe #1 input at line 232.Item1 in M.last (name,values) @ (232,4--232,17)"; "let test10(unitVar0) = fun name -> M.last2 (name) @ (235,4--235,9)"; - "let test11(s) = let Pipe #1 input at line 238: Microsoft.FSharp.Core.string = s in (M.last2 (Pipe #1 input at line 238); ()) @ (238,4--238,14)"; + "let test11(s) = let Pipe #1 input at line 238: Microsoft.FSharp.Core.string = s in M.last2 (Pipe #1 input at line 238) @ (238,4--238,14)"; "let badLoop = badLoop@240.Force Microsoft.FSharp.Core.int>(()) @ (240,8--240,15)"; "type LetLambda"; "let f = fun a -> fun b -> Operators.op_Addition (fun arg0_0 -> fun arg1_0 -> LanguagePrimitives.AdditionDynamic (arg0_0,arg1_0),a,b) @ (247,8--247,24)"; - "let letLambdaRes = let Pipe #1 input at line 249: (Microsoft.FSharp.Core.int * Microsoft.FSharp.Core.int) Microsoft.FSharp.Collections.list = Cons((1,2),Empty()) in (ListModule.Map (fun tupledArg -> let a: Microsoft.FSharp.Core.int = tupledArg.Item0 in let b: Microsoft.FSharp.Core.int = tupledArg.Item1 in (LetLambda.f () a) b,Pipe #1 input at line 249); ()) @ (249,19--249,71)"; + "let letLambdaRes = let Pipe #1 input at line 249: (Microsoft.FSharp.Core.int * Microsoft.FSharp.Core.int) Microsoft.FSharp.Collections.list = Cons((1,2),Empty()) in ListModule.Map (fun tupledArg -> let a: Microsoft.FSharp.Core.int = tupledArg.Item0 in let b: Microsoft.FSharp.Core.int = tupledArg.Item1 in (LetLambda.f () a) b,Pipe #1 input at line 249) @ (249,19--249,71)"; "let anonRecd = {X = 1; Y = 2} @ (251,15--251,33)"; "let anonRecdGet = (M.anonRecd ().X,M.anonRecd ().Y) @ (252,19--252,41)"] let expected2 = diff --git a/tests/service/ProjectAnalysisTests.fs b/tests/service/ProjectAnalysisTests.fs index 9012406bdc8..2843f9b8b12 100644 --- a/tests/service/ProjectAnalysisTests.fs +++ b/tests/service/ProjectAnalysisTests.fs @@ -4621,7 +4621,7 @@ let ``Test project36 FSharpMemberOrFunctionOrValue.IsConstructorThisValue & IsMe // ThisValue in these cases, this is only used when the symbol // is implicit in the constructor match getExpr 4 with - | Let((b,_),_) -> + | Let((b,_, _),_) -> b.IsConstructorThisValue && not b.IsMemberThisValue | _ -> failwith "unexpected expression" |> shouldEqual true diff --git a/tests/walkthroughs/DebugStepping/TheBigFileOfDebugStepping.fsx b/tests/walkthroughs/DebugStepping/TheBigFileOfDebugStepping.fsx index 4f2a37f6f2f..32bd0e5fa1e 100644 --- a/tests/walkthroughs/DebugStepping/TheBigFileOfDebugStepping.fsx +++ b/tests/walkthroughs/DebugStepping/TheBigFileOfDebugStepping.fsx @@ -10,6 +10,7 @@ // - Different visual debuggers open System +open System.Threading open System.Threading.Tasks type U2 = U2 of int * int @@ -98,8 +99,6 @@ let AsyncExpressionSteppingTest6b () = let z = x1 + !y + x4 return z } - - let AsyncBreakpoints1 () = async { let! res1 = f2() @@ -261,6 +260,10 @@ and rwalk2 x = seq { yield x; yield! rwalk1 (x+1) } let SeqExpressionTailCalls02() = rwalk2 3 |> Seq.truncate 3 |> Seq.length +SeqExpressionSteppingTest7() +SeqExpressionTailCalls01() +SeqExpressionTailCalls02() + let SteppingMatch01 (n) = match n with | Choice2Of2 _ -> @@ -268,8 +271,6 @@ let SteppingMatch01 (n) = | Choice1Of2 _ -> Console.WriteLine("B") - - let SteppingMatch03 (n) = match n with | Choice1Of2 _ -> @@ -544,7 +545,6 @@ let TestFunction9(x) = | 4 -> "four" | _ -> "five" - let TestFunction9b(x) = match x with | [1;2] -> "three" @@ -552,39 +552,12 @@ let TestFunction9b(x) = | [a;b] when a+b = 4 -> "four" | _ -> "big" - -let TestFunction9c(x) = - match x with - | [1;2] -> "three" - | [3;4] -> "seven" - | [a;b] when a+b = 4 -> "four" - | _ -> "big" -// #NoMono #NoMT #CodeGen #EmittedIL - - -let TestFunction9d(x) = - match x with - | [1;2] -> "three" - | [3;4] -> "seven" - | [a;b] when a+b = 4 -> "four" - | _ -> "big" -// #NoMono #NoMT #CodeGen #EmittedIL - - -let TestFunction9e(x) = - match x with - | [1;2] -> "three" - | [3;4] -> "seven" - | [a;b] when a+b = 4 -> "four" - | _ -> "big" - let TestFunction22() = let x1 = if DateTime.Now.Day = 0 then DateTime.Now.Day else DateTime.MinValue.Day let x2 = if DateTime.Now.Day = 1 then DateTime.Now.Day else DateTime.MinValue.Day let x3 = if DateTime.Now.Day > 1 then DateTime.Now.Day else DateTime.MinValue.Day (x1,x2,x3) - let InnerFunctionDefinitionHadTwoBreakpoints (str: string) = let isVowel (ch: char) = let c = Char.ToUpper(ch) @@ -611,8 +584,6 @@ let InnerRecursiveFunctionDefinitionHadTwoBreakpoints (str: string) = else str.[1..str.Length-1] + string(firstChar) + "ay" - - let LocalValueShadowsArgument1 x = let x = // quick watch 1 if isNull(x) then @@ -799,23 +770,23 @@ module Pipelined = printfn "%A" newData -TailcallRecursionTest1 3 -TailcallRecursionTest2 (U2(3,4)) -SteppingMatch01 (Choice1Of2 3) +TailcallRecursionTest1 2 +TailcallRecursionTest2 (U2(2,3)) SteppingMatch01 (Choice2Of2 3) +SteppingMatch01 (Choice1Of2 3) SteppingMatch03 (Choice1Of2 3) SteppingMatch03 (Choice2Of2 "3") SteppingMatch03b (Choice1Of3 3) SteppingMatch03b (Choice2Of3 "3") SteppingMatch03b (Choice3Of3 5.0) -SteppingMatch04 (Choice1Of3 3) SteppingMatch04 (Choice2Of3 "3") SteppingMatch04 (Choice3Of3 5.0) -SteppingMatch05 (Choice1Of3 3) -SteppingMatch05 (Choice2Of3 "3") +SteppingMatch04 (Choice1Of3 3) SteppingMatch05 (Choice3Of3 5.0) -SteppingMatch06 CaseA +SteppingMatch05 (Choice2Of3 "3") +SteppingMatch05 (Choice1Of3 3) SteppingMatch06 CaseB +SteppingMatch06 CaseA SteppingMatch07 CaseA SteppingMatch07 CaseB SteppingMatch08 0 @@ -851,14 +822,18 @@ TestFunction18 3 TestFunction19 3 TestFunction21(U2(3,4)) TestFunction22() +TestFunction9b [1;2] +TestFunction9b [3;4] +TestFunction9b [3;1] +TestFunction9b [3] -AsyncBreakpoints1() |> Async.RunSynchronously AsyncExpressionSteppingTest1() |> Async.RunSynchronously AsyncExpressionSteppingTest2() |> Async.RunSynchronously AsyncExpressionSteppingTest3() |> Async.RunSynchronously AsyncExpressionSteppingTest4() |> Async.RunSynchronously AsyncExpressionSteppingTest5() |> Async.RunSynchronously AsyncExpressionSteppingTest6b() |> Async.RunSynchronously +AsyncBreakpoints1() |> Async.RunSynchronously ListExpressionSteppingTest1() ListExpressionSteppingTest2() ListExpressionSteppingTest3() @@ -973,6 +948,7 @@ module DebuggingSteppingForMatchWithWhen1 = | _ -> 2 + TestMatchWithWhen [1] 3 TestMatchWithWhen [1] 4 TestMatchWithWhen [1] 5 TestMatchWithWhen [1] 6 @@ -1040,3 +1016,1053 @@ module NestedScopesWithShadowing = f2 (true, false) f2 (false, true) f2 (false, false) + +module ForLoopRegularCode = + let testSimpleForEachSeqLoopWithOneStatement inp = + for x in inp do + printfn $"hello, x = {x}" + + let testSimpleForEachSeqLoopWithTwoStatements inp = + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + + let testSimpleForEachArrayLoopWithOneStatement (inp:int array) = + for x in inp do + printfn $"hello, x = {x}" + + let testSimpleForEachArrayLoopWithTwoStatements (inp:int array) = + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + + let testSimpleForEachListLoopWithOneStatement (inp:int list) = + for x in inp do + printfn $"hello, x = {x}" + + let testSimpleForEachListLoopWithTwoStatements (inp:int list) = + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + + let testSimpleForEachStringLoopWithOneStatement (inp:string) = + for x in inp do + printfn $"hello, x = {x}" + + let testSimpleForEachStringLoopWithTwoStatements (inp:string) = + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + + let testSimpleForEachIntRangeLoopWithOneStatement (start, stop) = + for x in start .. stop do + printfn $"hello, x = {x}" + + let testSimpleForEachIntRangeLoopWithTwoStatements (start, stop) = + for x in start .. stop do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + + let testSimpleForEachIntRangeLoopDownWithOneStatement (start, stop) = + for x in stop .. -1 .. start do + printfn $"hello, x = {x}" + + let testSimpleForEachIntRangeLoopDownWithTwoStatements (start, stop) = + for x in stop .. -1 .. start do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + + let testSimpleForEachIntLoopWithOneStatement (start, stop) = + for x = start to stop do + printfn $"hello, x = {x}" + + let testSimpleForEachIntLoopWithTwoStatements (start, stop) = + for x = start to stop do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + + let testSimpleForEachIntLoopDownWithOneStatement (start, stop) = + for x = stop downto start do + printfn $"hello, x = {x}" + + let testSimpleForEachIntLoopDownWithTwoStatements (start, stop) = + for x = stop downto start do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + + testSimpleForEachSeqLoopWithOneStatement [1..3] + testSimpleForEachSeqLoopWithTwoStatements [1..3] + testSimpleForEachArrayLoopWithOneStatement [|1..3|] + testSimpleForEachArrayLoopWithTwoStatements [|1..3|] + testSimpleForEachListLoopWithOneStatement [1..3] + testSimpleForEachListLoopWithTwoStatements [1..3] + testSimpleForEachStringLoopWithOneStatement "123" + testSimpleForEachStringLoopWithTwoStatements "123" + testSimpleForEachIntRangeLoopWithOneStatement (1, 3) + testSimpleForEachIntRangeLoopWithTwoStatements (1, 3) + testSimpleForEachIntRangeLoopDownWithOneStatement (1, 3) + testSimpleForEachIntRangeLoopDownWithTwoStatements (1, 3) + testSimpleForEachIntLoopWithOneStatement (1, 3) + testSimpleForEachIntLoopWithTwoStatements (1, 3) + testSimpleForEachIntLoopDownWithOneStatement (1, 3) + testSimpleForEachIntLoopDownWithTwoStatements (1, 3) + +#if NETCOREAPP + let testSimpleForEachReadOnlySpanLoopWithOneStatement (inp: System.ReadOnlySpan) = + [ for x in inp do + printfn $"hello, x = {x}" ] + + let testSimpleForEachSpanLoopWithOneStatement (inp: System.Span) = + for x in inp do + printfn $"hello, x = {x}" + + testSimpleForEachReadOnlySpanLoopWithOneStatement ("abc".AsSpan()) + testSimpleForEachSpanLoopWithOneStatement ([|'a'..'c'|].AsSpan()) +#endif + +module ForLoopInGeneratedList = + let testSimpleListEachSeqLoopWithOneStatement inp = + [ for x in inp do + yield x+1 ] + + let testSimpleListEachSeqLoopWithTwoStatements inp = + [ for x in inp do + printfn $"hello, x = {x}" + yield x + 1 ] + + let testSimpleListEachArrayLoopWithOneStatement (inp:int array) = + [ for x in inp do + yield x + 1 ] + + let testSimpleListEachArrayLoopWithTwoStatements (inp:int array) = + [ for x in inp do + printfn $"hello, x = {x}" + yield x + 1 ] + + let testSimpleListEachListLoopWithOneStatement (inp:int list) = + [ for x in inp do + yield x + 1 ] + + let testSimpleListEachListLoopWithTwoStatements (inp:int list) = + [ for x in inp do + printfn $"hello, x = {x}" + yield x + 1 ] + + let testSimpleListEachStringLoopWithOneStatement (inp:string) = + [ for x in inp do + yield x ] + + let testSimpleListEachStringLoopWithTwoStatements (inp:string) = + [ for x in inp do + printfn $"hello, x = {x}" + yield x ] + + let testSimpleListEachIntRangeLoopWithOneStatement (start, stop) = + [ for x in start .. stop do + yield x + 1 ] + + let testSimpleListEachIntRangeLoopWithTwoStatements (start, stop) = + [ for x in start .. stop do + printfn $"hello, x = {x}" + yield x + 1 ] + + let testSimpleListEachIntRangeLoopDownWithOneStatement (start, stop) = + [ for x in stop .. -1 .. start do + yield x + 1 ] + + let testSimpleListEachIntRangeLoopDownWithTwoStatements (start, stop) = + [ for x in stop .. -1 .. stop do + printfn $"hello, x = {x}" + yield x + 1 ] + + let testSimpleListEachIntLoopWithOneStatement (start, stop) = + [ for x = start to stop do + yield x + 1 ] + + let testSimpleListEachIntLoopWithTwoStatements (start, stop) = + [ for x = start to stop do + printfn $"hello, x = {x}" + yield x + 1 ] + + let testSimpleListEachIntLoopDownWithOneStatement (start, stop) = + [ for x = stop downto start do + yield x + 1 ] + + let testSimpleListEachIntLoopDownWithTwoStatements (start, stop) = + [ for x = stop downto start do + printfn $"hello, x = {x}" + yield x + 1 ] + + testSimpleListEachSeqLoopWithOneStatement [1..3] + testSimpleListEachSeqLoopWithTwoStatements [1..3] + testSimpleListEachArrayLoopWithOneStatement [|1..3|] + testSimpleListEachArrayLoopWithTwoStatements [|1..3|] + testSimpleListEachListLoopWithOneStatement [1..3] + testSimpleListEachListLoopWithTwoStatements [1..3] + testSimpleListEachStringLoopWithOneStatement "123" + testSimpleListEachStringLoopWithTwoStatements "123" + testSimpleListEachIntRangeLoopWithOneStatement (1, 3) + testSimpleListEachIntRangeLoopWithTwoStatements (1, 3) + testSimpleListEachIntRangeLoopDownWithOneStatement (1, 3) + testSimpleListEachIntRangeLoopDownWithTwoStatements (1, 3) + testSimpleListEachIntLoopWithOneStatement (1, 3) + testSimpleListEachIntLoopWithTwoStatements (1, 3) + testSimpleListEachIntLoopDownWithOneStatement (1, 3) + testSimpleListEachIntLoopDownWithTwoStatements (1, 3) + +#if NETCOREAPP + let testSimpleListEachReadOnlySpanLoopWithOneStatement (inp: System.ReadOnlySpan) = + [ for x in inp do + printfn $"hello, x = {x}" + yield x + 1 ] + + let testSimpleListEachSpanLoopWithOneStatement (inp: System.Span) = + [ for x in inp do + printfn $"hello, x = {x}" + yield x + 1 ] + + testSimpleListEachReadOnlySpanLoopWithOneStatement ("abc".AsSpan()) + testSimpleListEachSpanLoopWithOneStatement ([|'a'..'c'|].AsSpan()) +#endif + +module ForLoopTaskCode = + let testSimpleTaskEachSeqLoopWithOneStatement inp = + task { + for x in inp do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleTaskEachSeqLoopWithTwoStatements inp = + task { + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + + let testSimpleTaskEachArrayLoopWithOneStatement (inp:int array) = + task { + for x in inp do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleTaskEachArrayLoopWithTwoStatements (inp:int array) = + task { + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleTaskEachListLoopWithOneStatement (inp:int list) = + task { + for x in inp do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleTaskEachListLoopWithTwoStatements (inp:int list) = + task { + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleTaskEachStringLoopWithOneStatement (inp:string) = + task { + for x in inp do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleTaskEachStringLoopWithTwoStatements (inp:string) = + task { + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleTaskEachIntRangeLoopWithOneStatement (start, stop) = + task { + for x in start .. stop do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleTaskEachIntRangeLoopWithTwoStatements (start, stop) = + task { + for x in start .. stop do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleTaskEachIntRangeLoopDownWithOneStatement (start, stop) = + task { + for x in stop .. -1 .. start do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleTaskEachIntRangeLoopDownWithTwoStatements (start, stop) = + task { + for x in stop .. -1 .. start do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleTaskEachIntLoopWithOneStatement (start, stop) = + task { + for x = start to stop do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleTaskEachIntLoopWithTwoStatements (start, stop) = + task { + for x = start to stop do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleTaskEachIntLoopDownWithOneStatement (start, stop) = + task { + for x = stop downto start do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleTaskEachIntLoopDownWithTwoStatements (start, stop) = + task { + for x = stop downto start do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + testSimpleTaskEachSeqLoopWithOneStatement [1..3] |> fun t -> t.Result + testSimpleTaskEachSeqLoopWithTwoStatements [1..3] |> fun t -> t.Result + testSimpleTaskEachArrayLoopWithOneStatement [|1..3|] |> fun t -> t.Result + testSimpleTaskEachArrayLoopWithTwoStatements [|1..3|] |> fun t -> t.Result + testSimpleTaskEachListLoopWithOneStatement [1..3] |> fun t -> t.Result + testSimpleTaskEachListLoopWithTwoStatements [1..3] |> fun t -> t.Result + testSimpleTaskEachStringLoopWithOneStatement "123" |> fun t -> t.Result + testSimpleTaskEachStringLoopWithTwoStatements "123" |> fun t -> t.Result + testSimpleTaskEachIntRangeLoopWithOneStatement (1, 3) |> fun t -> t.Result + testSimpleTaskEachIntRangeLoopWithTwoStatements (1, 3) |> fun t -> t.Result + testSimpleTaskEachIntRangeLoopDownWithOneStatement (1, 3) |> fun t -> t.Result + testSimpleTaskEachIntRangeLoopDownWithTwoStatements (1, 3) |> fun t -> t.Result + testSimpleTaskEachIntLoopWithOneStatement (1, 3) |> fun t -> t.Result + testSimpleTaskEachIntLoopWithTwoStatements (1, 3) |> fun t -> t.Result + testSimpleTaskEachIntLoopDownWithOneStatement (1, 3) |> fun t -> t.Result + testSimpleTaskEachIntLoopDownWithTwoStatements (1, 3) |> fun t -> t.Result + +#if NETCOREAPP + let testSimpleTaskEachReadOnlySpanLoopWithOneStatement (inp: System.ReadOnlySpan) = + task { + for x in inp do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleTaskEachSpanLoopWithOneStatement (inp: System.Span) = + task { + for x in inp do + printfn $"hello, x = {x}" + return 1 + } + + testSimpleTaskEachReadOnlySpanLoopWithOneStatement ("abc".AsSpan()) |> fun t -> t.Result + testSimpleTaskEachSpanLoopWithOneStatement ([|'a'..'c'|].AsSpan()) |> fun t -> t.Result +#endif + + +module ForLoopSeqCode = + let testSimpleSeqEachSeqLoopWithOneStatement inp = + seq { + for x in inp do + printfn $"hello, x = {x}" + yield 1 + } + + let testSimpleSeqEachSeqLoopWithTwoStatements inp = + seq { + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + yield 1 + } + + let testSimpleSeqEachArrayLoopWithOneStatement (inp:int array) = + seq { + for x in inp do + printfn $"hello, x = {x}" + yield 1 + } + + let testSimpleSeqEachArrayLoopWithTwoStatements (inp:int array) = + seq { + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + yield 1 + } + + let testSimpleSeqEachListLoopWithOneStatement (inp:int list) = + seq { + for x in inp do + printfn $"hello, x = {x}" + yield 1 + } + + let testSimpleSeqEachListLoopWithTwoStatements (inp:int list) = + seq { + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + yield 1 + } + + let testSimpleSeqEachStringLoopWithOneStatement (inp:string) = + seq { + for x in inp do + printfn $"hello, x = {x}" + yield 1 + } + + let testSimpleSeqEachStringLoopWithTwoStatements (inp:string) = + seq { + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + yield 1 + } + + let testSimpleSeqEachIntRangeLoopWithOneStatement (start, stop) = + seq { + for x in start .. stop do + printfn $"hello, x = {x}" + yield 1 + } + + let testSimpleSeqEachIntRangeLoopWithTwoStatements (start, stop) = + seq { + for x in start .. stop do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + yield 1 + } + + let testSimpleSeqEachIntRangeLoopDownWithOneStatement (start, stop) = + seq { + for x in stop .. -1 .. start do + printfn $"hello, x = {x}" + yield 1 + } + + let testSimpleSeqEachIntRangeLoopDownWithTwoStatements (start, stop) = + seq { + for x in stop .. -1 .. stop do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + yield 1 + } + + let testSimpleSeqEachIntLoopWithOneStatement (start, stop) = + seq { + for x = start to stop do + printfn $"hello, x = {x}" + yield 1 + } + + let testSimpleSeqEachIntLoopWithTwoStatements (start, stop) = + seq { + for x = start to stop do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + yield 1 + } + + let testSimpleSeqEachIntLoopDownWithOneStatement (start, stop) = + seq { + for x = stop downto start do + printfn $"hello, x = {x}" + yield 1 + } + + let testSimpleSeqEachIntLoopDownWithTwoStatements (start, stop) = + seq { + for x = stop downto start do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + yield 1 + } + + testSimpleSeqEachSeqLoopWithOneStatement [1..3] |> Seq.toList + testSimpleSeqEachSeqLoopWithTwoStatements [1..3] |> Seq.toList + testSimpleSeqEachArrayLoopWithOneStatement [|1..3|] |> Seq.toList + testSimpleSeqEachArrayLoopWithTwoStatements [|1..3|] |> Seq.toList + testSimpleSeqEachListLoopWithOneStatement [1..3] |> Seq.toList + testSimpleSeqEachListLoopWithTwoStatements [1..3] |> Seq.toList + testSimpleSeqEachStringLoopWithOneStatement "123" |> Seq.toList + testSimpleSeqEachStringLoopWithTwoStatements "123" |> Seq.toList + testSimpleSeqEachIntRangeLoopWithOneStatement (1, 3) |> Seq.toList + testSimpleSeqEachIntRangeLoopWithTwoStatements (1, 3) |> Seq.toList + testSimpleSeqEachIntRangeLoopDownWithOneStatement (1, 3) |> Seq.toList + testSimpleSeqEachIntRangeLoopDownWithTwoStatements (1, 3) |> Seq.toList + testSimpleSeqEachIntLoopWithOneStatement (1, 3) |> Seq.toList + testSimpleSeqEachIntLoopWithTwoStatements (1, 3) |> Seq.toList + testSimpleSeqEachIntLoopDownWithOneStatement (1, 3) |> Seq.toList + testSimpleSeqEachIntLoopDownWithTwoStatements (1, 3) |> Seq.toList + +#if NETCOREAPP + let testSimpleSeqEachReadOnlySpanLoopWithOneStatement (inp: System.ReadOnlySpan) = + seq { + for x in inp do + printfn $"hello, x = {x}" + yield 1 + } + + let testSimpleSeqEachSpanLoopWithOneStatement (inp: System.Span) = + seq { + for x in inp do + printfn $"hello, x = {x}" + yield 1 + } + + testSimpleSeqEachReadOnlySpanLoopWithOneStatement ("abc".AsSpan()) + testSimpleSeqEachSpanLoopWithOneStatement ([|'a'..'c'|].AsSpan()) +#endif + +module ForLoopAsyncCode = + let testSimpleAsyncEachSeqLoopWithOneStatement inp = + async { + for x in inp do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleAsyncEachSeqLoopWithTwoStatements inp = + async { + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + + let testSimpleAsyncEachArrayLoopWithOneStatement (inp:int array) = + async { + for x in inp do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleAsyncEachArrayLoopWithTwoStatements (inp:int array) = + async { + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleAsyncEachListLoopWithOneStatement (inp:int list) = + async { + for x in inp do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleAsyncEachListLoopWithTwoStatements (inp:int list) = + async { + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleAsyncEachStringLoopWithOneStatement (inp:string) = + async { + for x in inp do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleAsyncEachStringLoopWithTwoStatements (inp:string) = + async { + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleAsyncEachIntRangeLoopWithOneStatement (start, stop) = + async { + for x in start .. stop do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleAsyncEachIntRangeLoopWithTwoStatements (start, stop) = + async { + for x in start .. stop do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleAsyncEachIntRangeLoopDownWithOneStatement (start, stop) = + async { + for x in stop .. -1 .. start do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleAsyncEachIntRangeLoopDownWithTwoStatements (start, stop) = + async { + for x in stop .. -1 .. stop do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleAsyncEachIntLoopWithOneStatement (start, stop) = + async { + for x = start to stop do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleAsyncEachIntLoopWithTwoStatements (start, stop) = + async { + for x = start to stop do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleAsyncEachIntLoopDownWithOneStatement (start, stop) = + async { + for x = stop downto start do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleAsyncEachIntLoopDownWithTwoStatements (start, stop) = + async { + for x = stop downto start do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + testSimpleAsyncEachSeqLoopWithOneStatement [1..3] |> Async.RunSynchronously + testSimpleAsyncEachSeqLoopWithTwoStatements [1..3] |> Async.RunSynchronously + testSimpleAsyncEachArrayLoopWithOneStatement [|1..3|] |> Async.RunSynchronously + testSimpleAsyncEachArrayLoopWithTwoStatements [|1..3|] |> Async.RunSynchronously + testSimpleAsyncEachListLoopWithOneStatement [1..3] |> Async.RunSynchronously + testSimpleAsyncEachListLoopWithTwoStatements [1..3] |> Async.RunSynchronously + testSimpleAsyncEachStringLoopWithOneStatement "123" |> Async.RunSynchronously + testSimpleAsyncEachStringLoopWithTwoStatements "123" |> Async.RunSynchronously + testSimpleAsyncEachIntRangeLoopWithOneStatement (1, 3) |> Async.RunSynchronously + testSimpleAsyncEachIntRangeLoopWithTwoStatements (1, 3) |> Async.RunSynchronously + testSimpleAsyncEachIntRangeLoopDownWithOneStatement (1, 3) |> Async.RunSynchronously + testSimpleAsyncEachIntRangeLoopDownWithTwoStatements (1, 3) |> Async.RunSynchronously + testSimpleAsyncEachIntLoopWithOneStatement (1, 3) |> Async.RunSynchronously + testSimpleAsyncEachIntLoopWithTwoStatements (1, 3) |> Async.RunSynchronously + testSimpleAsyncEachIntLoopDownWithOneStatement (1, 3) |> Async.RunSynchronously + testSimpleAsyncEachIntLoopDownWithTwoStatements (1, 3) |> Async.RunSynchronously + +#if NETCOREAPP + let testSimpleAsyncEachReadOnlySpanLoopWithOneStatement (inp: System.ReadOnlySpan) = + async { + for x in inp do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleAsyncEachSpanLoopWithOneStatement (inp: System.Span) = + async { + for x in inp do + printfn $"hello, x = {x}" + return 1 + } + + testSimpleAsyncEachReadOnlySpanLoopWithOneStatement ("abc".AsSpan()) |> Async.RunSynchronously + testSimpleAsyncEachSpanLoopWithOneStatement ([|'a'..'c'|].AsSpan()) |> Async.RunSynchronously +#endif + +//------------------------------------------------------------- + + +[] +type ValueOrCancelled<'TResult> = + | Value of result: 'TResult + | Cancelled of ``exception``: OperationCanceledException + +/// Represents a cancellable computation with explicit representation of a cancelled result. +/// +/// A cancellable computation is passed may be cancelled via a CancellationToken, which is propagated implicitly. +/// If cancellation occurs, it is propagated as data rather than by raising an OperationCanceledException. +//[] +type Cancellable<'TResult> = (*Cancellable of*) (CancellationToken -> ValueOrCancelled<'TResult>) + +module Cancellable = + + /// Run a cancellable computation using the given cancellation token + let run (ct: CancellationToken) (comp : Cancellable<_>) = + if ct.IsCancellationRequested then + ValueOrCancelled.Cancelled (OperationCanceledException ct) + else + comp ct + +(* + /// Bind the result of a cancellable computation + let inline bind f comp1 : Cancellable<_> = + (fun ct -> + match run ct comp1 with + | ValueOrCancelled.Value v1 -> run ct (f v1) + | ValueOrCancelled.Cancelled err1 -> ValueOrCancelled.Cancelled err1) +*) + + /// Return a simple value as the result of a cancellable computation + let inline ret x : Cancellable<_> = (fun _ -> ValueOrCancelled.Value x) + + let one = ret 1 + + /// Run the computation in a mode where it may not be cancelled. The computation never results in a + /// ValueOrCancelled.Cancelled. + let runWithoutCancellation comp = + let res = run CancellationToken.None comp + match res with + | ValueOrCancelled.Cancelled _ -> failwith "unexpected cancellation" + | ValueOrCancelled.Value r -> r + + /// Bind the cancellation token associated with the computation + let token () : Cancellable<_> = (fun ct -> ValueOrCancelled.Value ct) + + /// Represents a canceled computation + let canceled() : Cancellable<_> = (fun ct -> ValueOrCancelled.Cancelled (OperationCanceledException ct)) + +(* + /// Catch exceptions in a computation + let inline catch e : Cancellable<_> = + (fun ct -> + try + match e ct with + | ValueOrCancelled.Value r -> ValueOrCancelled.Value (Choice1Of2 r) + | ValueOrCancelled.Cancelled e -> ValueOrCancelled.Cancelled e + with err -> + ValueOrCancelled.Value (Choice2Of2 err)) + + /// Implement try/finally for a cancellable computation + let inline tryFinally e compensation : Cancellable<_> = + catch e |> bind (fun res -> + compensation() + match res with Choice1Of2 r -> ret r | Choice2Of2 err -> raise err) + + /// Implement try/with for a cancellable computation + let inline tryWith e handler : Cancellable<_> = + catch e |> bind (fun res -> + match res with Choice1Of2 r -> ret r | Choice2Of2 err -> handler err) +*) + +type CancellableBuilder() = + + member inline _.Delay ([] f: unit -> Cancellable<'T>) : Cancellable<'T> = + (fun ct -> + let g = f() + g ct) + + member inline _.BindReturn([] comp: Cancellable<'T>, [] f: ('T -> 'U)) : Cancellable<'U> = + (fun ct -> + if ct.IsCancellationRequested then + ValueOrCancelled.Cancelled (OperationCanceledException ct) + else + match comp ct with + | ValueOrCancelled.Value res -> ValueOrCancelled.Value (f res) + | ValueOrCancelled.Cancelled err -> ValueOrCancelled.Cancelled err) + + member inline _.Bind([] comp: Cancellable<'T>, [] f: ('T -> Cancellable<'U>)) : Cancellable<'U> = + (fun ct -> + if ct.IsCancellationRequested then + ValueOrCancelled.Cancelled (OperationCanceledException ct) + else + match comp ct with + | ValueOrCancelled.Value res -> + let comp2 = f res + comp2 ct + | ValueOrCancelled.Cancelled err -> ValueOrCancelled.Cancelled err) + + member inline _.Return v = + (fun _ -> ValueOrCancelled.Value v) + + member inline _.ReturnFrom ([] v: Cancellable<'T>) : Cancellable<'T> = + (fun ct -> v ct) + + member inline _.Combine([] comp1: Cancellable, [] comp2: Cancellable<'T>) : Cancellable<'T> = + (fun ct -> + if ct.IsCancellationRequested then + ValueOrCancelled.Cancelled (OperationCanceledException ct) + else + match comp1 ct with + | ValueOrCancelled.Value () -> comp2 ct + | ValueOrCancelled.Cancelled err -> ValueOrCancelled.Cancelled err) + + member inline _.For(sequence: seq<'T>, [] (f: 'T -> Cancellable<_>)) : Cancellable = + (fun ct -> + use ie = sequence.GetEnumerator() + let mutable fin = false + let mutable res = Unchecked.defaultof<_> + while not fin do + if ie.MoveNext() then + let step = f ie.Current + match step ct with + | ValueOrCancelled.Value () -> () + | ValueOrCancelled.Cancelled err -> + fin <- true + res <- ValueOrCancelled.Cancelled err + else + fin <- true + res <- ValueOrCancelled.Value () + res) + +(* + member (* inline *) _.TryWith(e, handler) = Cancellable.tryWith e handler + + member (* inline *) _.Using(resource, e) = Cancellable.tryFinally (e resource) (fun () -> (resource :> IDisposable).Dispose()) + + member (* inline *) _.TryFinally(e, compensation) = Cancellable.tryFinally e compensation + +*) + member inline _.Zero() : Cancellable = + (fun _ -> ValueOrCancelled.Value ()) + +[] +module CancellableAutoOpens = + let cancellable = CancellableBuilder() + +// 1. Internal delayed type must be a function to flatten the code with InlineIfLambda +// 1. Bind and BindReturn methods must be inlined to flatten the code + +module CancellableBasicTests = + let test0() = + cancellable.Delay (fun () -> + cancellable.Return(0xABBA)) + + test0() |> Cancellable.runWithoutCancellation + + let test1() = + cancellable { + return 12345 + } + + test1() |> Cancellable.runWithoutCancellation + + let test2() = + cancellable { + printfn "hello" + return 12345 + } + + test2() |> Cancellable.runWithoutCancellation + + let testLetBinding() = + cancellable { + let x = 1 + return 12345 + x + } + + testLetBinding() |> Cancellable.runWithoutCancellation + + let testLetFunctionBinding() = + cancellable { + let f () = 1 + return 12345 + f() + } + + testLetFunctionBinding() |> Cancellable.runWithoutCancellation + + let testBindReturn1() = + cancellable { + let! one = Cancellable.one + return 12345 + one + } + + testBindReturn1() |> Cancellable.runWithoutCancellation + + let testBindReturn2() = + cancellable { + System.Console.WriteLine() + let! one = Cancellable.one + return 12345 + one + } + + testBindReturn2() |> Cancellable.runWithoutCancellation + + let testBindReturn3() = + cancellable { + let! one = Cancellable.one + System.Console.WriteLine() + return 12345 + one + } + + testBindReturn3() |> Cancellable.runWithoutCancellation + + let testBind1() = + cancellable { + let! one = Cancellable.one + let! one = Cancellable.one + System.Console.WriteLine() + return 12345 + one + one + } + + testBind1() |> Cancellable.runWithoutCancellation + + +module ForLoopCancellableCode = + let testSimpleCancellableEachSeqLoopWithOneStatement inp = + cancellable { + for x in inp do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleCancellableEachSeqLoopWithTwoStatements inp = + cancellable { + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + + let testSimpleCancellableEachArrayLoopWithOneStatement (inp:int array) = + cancellable { + for x in inp do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleCancellableEachArrayLoopWithTwoStatements (inp:int array) = + cancellable { + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleCancellableEachListLoopWithOneStatement (inp:int list) = + cancellable { + for x in inp do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleCancellableEachListLoopWithTwoStatements (inp:int list) = + cancellable { + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleCancellableEachStringLoopWithOneStatement (inp:string) = + cancellable { + for x in inp do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleCancellableEachStringLoopWithTwoStatements (inp:string) = + cancellable { + for x in inp do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleCancellableEachIntRangeLoopWithOneStatement (start, stop) = + cancellable { + for x in start .. stop do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleCancellableEachIntRangeLoopWithTwoStatements (start, stop) = + cancellable { + for x in start .. stop do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleCancellableEachIntRangeLoopDownWithOneStatement (start, stop) = + cancellable { + for x in stop .. -1 .. start do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleCancellableEachIntRangeLoopDownWithTwoStatements (start, stop) = + cancellable { + for x in stop .. -1 .. stop do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleCancellableEachIntLoopWithOneStatement (start, stop) = + cancellable { + for x = start to stop do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleCancellableEachIntLoopWithTwoStatements (start, stop) = + cancellable { + for x = start to stop do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleCancellableEachIntLoopDownWithOneStatement (start, stop) = + cancellable { + for x = stop downto start do + printfn $"hello, x = {x}" + return 1 + } + + let testSimpleCancellableEachIntLoopDownWithTwoStatements (start, stop) = + cancellable { + for x = stop downto start do + printfn $"hello, x = {x}" + printfn $"hello, x = {x}" + return 1 + } + + testSimpleCancellableEachSeqLoopWithOneStatement [1..3] |> Cancellable.runWithoutCancellation + testSimpleCancellableEachSeqLoopWithTwoStatements [1..3] |> Cancellable.runWithoutCancellation + testSimpleCancellableEachArrayLoopWithOneStatement [|1..3|] |> Cancellable.runWithoutCancellation + testSimpleCancellableEachArrayLoopWithTwoStatements [|1..3|] |> Cancellable.runWithoutCancellation + testSimpleCancellableEachListLoopWithOneStatement [1..3] |> Cancellable.runWithoutCancellation + testSimpleCancellableEachListLoopWithTwoStatements [1..3] |> Cancellable.runWithoutCancellation + testSimpleCancellableEachStringLoopWithOneStatement "123" |> Cancellable.runWithoutCancellation + testSimpleCancellableEachStringLoopWithTwoStatements "123" |> Cancellable.runWithoutCancellation + testSimpleCancellableEachIntRangeLoopWithOneStatement (1, 3) |> Cancellable.runWithoutCancellation + testSimpleCancellableEachIntRangeLoopWithTwoStatements (1, 3) |> Cancellable.runWithoutCancellation + testSimpleCancellableEachIntRangeLoopDownWithOneStatement (1, 3) |> Cancellable.runWithoutCancellation + testSimpleCancellableEachIntRangeLoopDownWithTwoStatements (1, 3) |> Cancellable.runWithoutCancellation + testSimpleCancellableEachIntLoopWithOneStatement (1, 3) |> Cancellable.runWithoutCancellation + testSimpleCancellableEachIntLoopWithTwoStatements (1, 3) |> Cancellable.runWithoutCancellation + testSimpleCancellableEachIntLoopDownWithOneStatement (1, 3) |> Cancellable.runWithoutCancellation + testSimpleCancellableEachIntLoopDownWithTwoStatements (1, 3) |> Cancellable.runWithoutCancellation + From f6c016c245f3e51031926cb7c474b325f5a712f7 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Tue, 25 Jan 2022 16:39:32 +0000 Subject: [PATCH 02/35] preserve debug points in optimization --- src/fsharp/CheckExpressions.fs | 30 ++++++++++++++++++++++-------- src/fsharp/Optimizer.fs | 29 ++++++++++++++++++++++------- 2 files changed, 44 insertions(+), 15 deletions(-) diff --git a/src/fsharp/CheckExpressions.fs b/src/fsharp/CheckExpressions.fs index 1d87dbee1f5..d2734e6420d 100644 --- a/src/fsharp/CheckExpressions.fs +++ b/src/fsharp/CheckExpressions.fs @@ -1220,7 +1220,7 @@ type CheckedBindingInfo = literalValue: Const option * isFixed: bool member x.Expr = let (CheckedBindingInfo(_, _, _, _, _, _, expr, _, _, _, _, _, _, _)) = x in expr - member x.SeqPoint = let (CheckedBindingInfo(_, _, _, _, _, _, _, _, _, _, spBind, _, _, _)) = x in spBind + member x.DebugPoint = let (CheckedBindingInfo(_, _, _, _, _, _, _, _, _, _, spBind, _, _, _)) = x in spBind /// Return the generalized type for a type scheme let GeneralizedTypeForTypeScheme typeScheme = @@ -10188,8 +10188,22 @@ and TcNormalizedBinding declKind (cenv: cenv) env tpenv overallTy safeThisValOpt let (PartialValReprInfo(argInfos, _)) = partialValReprInfo // The right-hand-side is control flow (has an implicit debug point) in any situation where we - // haven't extended the debug point to include the 'let'. - let rhsIsControlFlow = match spBind with DebugPointAtBinding.Yes _ -> false | _ -> true + // haven't extended the debug point to include the 'let', that is, there is a debug point noted + // at the binding. + // + // This includes + // let _ = expr + // let () = expr + // which are transformed to sequential expressions in TcLetBinding + let rhsIsControlFlow = + match pat with + | SynPat.Wild _ + | SynPat.Const (SynConst.Unit, _) + | SynPat.Paren (SynPat.Const (SynConst.Unit, _), _) -> true + | _ -> + match spBind with + | DebugPointAtBinding.Yes _ -> false + | _ -> true let envinner = { envinner with eLambdaArgInfos = argInfos; eIsControlFlow = rhsIsControlFlow } @@ -10545,15 +10559,15 @@ and TcLetBinding cenv isUse env containerInfo declKind tpenv (synBinds, synBinds (buildExpr >> mkSequentialBind, env, tpenv) | _ -> - // nice: don't introduce awful temporary for r.h.s. in the 99% case where we know what we're binding it to let patternInputTmp, checkedPat2 = + match checkedPat with - // nice: don't introduce awful temporary for r.h.s. in the 99% case where we know what we're binding it to + + // We don't introduce a temporary for the case + // let v = expr | TPat_as (pat, PBind(v, TypeScheme(generalizedTypars', _)), _) when List.lengthsEqAndForall2 typarRefEq generalizedTypars generalizedTypars' -> - v, pat - //Op (LValueOp (LByrefGet,x),[],[],C:\GitHub\dsyme\visualfsharp\a.fs (15,42--15,43) IsSynthetic=false) | _ when inlineFlag.MustInline -> error(Error(FSComp.SR.tcInvalidInlineSpecification(), m)) @@ -11559,7 +11573,7 @@ and TcLetrecAdjustMemberForSpecialVals cenv (pgrbind: PostGeneralizationRecursiv let (RecursiveBindingInfo(_, _, _, _, vspec, _, _, _, baseValOpt, safeThisValOpt, safeInitInfo, _, _, _)) = pgrbind.RecBindingInfo let expr = pgrbind.CheckedBinding.Expr - let spBind = pgrbind.CheckedBinding.SeqPoint + let spBind = pgrbind.CheckedBinding.DebugPoint let expr = match TcLetrecComputeCtorSafeThisValBind cenv safeThisValOpt with diff --git a/src/fsharp/Optimizer.fs b/src/fsharp/Optimizer.fs index 6ea86c374fc..304e40ad12e 100644 --- a/src/fsharp/Optimizer.fs +++ b/src/fsharp/Optimizer.fs @@ -1645,9 +1645,12 @@ let CanExpandStructuralBinding (v: Val) = let ExprIsValue = function Expr.Val _ -> true | _ -> false -let MakeStructuralBindingTemp (v: Val) i (arg: Expr) argTy = +let MakeStructuralBindingTempVal (v: Val) i (arg: Expr) argTy = let name = v.LogicalName + "_" + string i - let v, ve = mkCompGenLocal arg.Range name argTy + mkCompGenLocal arg.Range name argTy + +let MakeStructuralBindingTemp (v: Val) i (arg: Expr) argTy = + let v, ve = MakeStructuralBindingTempVal v i arg argTy ve, mkCompGenBind v arg let MakeMutableStructuralBindingForTupleElement (v: Val) i (arg: Expr) argTy = @@ -1795,8 +1798,13 @@ let rec ExpandStructuralBinding cenv expr = when (isRefTupleTy cenv.g v.Type && not (isRefTupleExpr rhs) && CanExpandStructuralBinding v) -> - match RearrangeTupleBindings rhs (fun top -> mkLet tgtSeqPtOpt m v top body) with - | Some e -> ExpandStructuralBindingRaw cenv e + match RearrangeTupleBindings rhs (fun top -> mkLet DebugPointAtBinding.NoneAtLet m v top body) with + | Some e -> + let e2 = ExpandStructuralBindingRaw cenv e + // Preserve the outer debug point at the right point in the evaluation order + match tgtSeqPtOpt with + | DebugPointAtBinding.Yes dpm -> mkDebugPoint dpm e2 + | _ -> e2 | None -> // RearrangeTupleBindings could have failed because the rhs branches TryRewriteBranchingTupleBinding cenv.g v rhs tgtSeqPtOpt body m |> Option.defaultValue expr @@ -1809,9 +1817,10 @@ let rec ExpandStructuralBinding cenv expr = cenv.g.unionCaseRefEq uc (mkSomeCase cenv.g) && CanExpandStructuralBinding v -> let argTy = destOptionTy cenv.g v.Type - let ve, bind = MakeStructuralBindingTemp v 0 arg argTy - let newExpr = mkSome cenv.g argTy ve m - mkLetBind m bind (mkLet tgtSeqPtOpt m v newExpr body) + let vi, vie = MakeStructuralBindingTempVal v 0 arg argTy + let bind = mkBind tgtSeqPtOpt vi arg + let newExpr = mkSome cenv.g argTy vie m + mkLetBind m bind (mkLet DebugPointAtBinding.NoneAtLet m vi newExpr body) | e -> ExpandStructuralBindingRaw cenv e @@ -2608,6 +2617,12 @@ and OptimizeLinearExpr cenv env expr contf = else // On the way back up: Trim out any optimization info that involves escaping values on the way back up let evalueR = AbstractExprInfoByVars ([bindR.Var], []) bodyInfo.Info + + // Preserve the debug points for eliminated bindings that have debug points. + let bodyR = + match bindR.DebugPoint with + | DebugPointAtBinding.Yes m -> mkDebugPoint m bodyR + | _ -> bodyR bodyR, { TotalSize = bindingInfo.TotalSize + bodyInfo.TotalSize - localVarSize // eliminated a local var FunctionSize = bindingInfo.FunctionSize + bodyInfo.FunctionSize - localVarSize (* eliminated a local var *) From c25755dc25cc1797903cf3efc21cdbfa54bb2e47 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Tue, 25 Jan 2022 17:03:09 +0000 Subject: [PATCH 03/35] fix baselines --- src/fsharp/Optimizer.fs | 4 +- .../ListExpressionSteppingTest1.il.bsl | 5 +- .../ListExpressionSteppingTest2.il.bsl | 6 +- .../ListExpressionSteppingTest3.il.bsl | 5 +- .../ListExpressionSteppingTest4.il.bsl | 5 +- .../ListExpressionSteppingTest5.il.bsl | 5 +- .../ListExpressionSteppingTest6.il.bsl | 5 +- .../EmittedIL/Misc/CodeGenRenamings01.il.bsl | 9 +- .../CodeGen/EmittedIL/Misc/Decimal01.il.bsl | 6 +- .../Operators/comparison_decimal01.il.bsl | 13 +- .../TestFunctions/Testfunction22b.il.bsl | 6 +- .../TestFunctions/Testfunction22c.il.bsl | 6 +- .../CodeGen/EmittedIL/Tuples/Tuple01.il.bsl | 6 +- .../CodeGen/EmittedIL/Tuples/Tuple02.il.bsl | 6 +- .../CodeGen/EmittedIL/Tuples/Tuple03.il.bsl | 6 +- .../CodeGen/EmittedIL/Tuples/Tuple04.il.bsl | 6 +- .../CodeGen/EmittedIL/Tuples/Tuple05.il.bsl | 6 +- .../CodeGen/EmittedIL/Tuples/Tuple06.il.bsl | 6 +- .../CodeGen/EmittedIL/Tuples/Tuple07.il.bsl | 6 +- .../CodeGen/EmittedIL/Tuples/Tuple08.il.bsl | 6 +- .../EmittedIL/Tuples/TupleElimination.il.bsl | 33 ++- .../EmittedIL/Tuples/TupleMonster.il.bsl | 6 +- .../ForLoop/ForEachOnArray01.il.bsl | 5 +- .../ForLoop/ForEachOnString01.il.bsl | 276 +++++++++--------- .../GenericComparison/Compare01.il.bsl | 56 ++-- .../GenericComparison/Compare02.il.bsl | 74 ++--- .../GenericComparison/Compare03.il.bsl | 98 ++++--- .../GenericComparison/Compare04.il.bsl | 160 +++++----- .../GenericComparison/Compare11.il.bsl | 38 +-- .../GenericComparison/Equals01.il.bsl | 38 +-- .../GenericComparison/Equals02.il.bsl | 42 +-- .../GenericComparison/Equals03.il.bsl | 60 ++-- .../GenericComparison/Hash02.il.bsl | 12 +- .../GenericComparison/Hash03.il.bsl | 42 +-- .../GenericComparison/Hash04.il.bsl | 42 +-- .../GenericComparison/Hash05.il.bsl | 42 +-- .../GenericComparison/Hash06.il.bsl | 40 +-- .../GenericComparison/Hash08.il.bsl | 42 +-- .../GenericComparison/Hash09.il.bsl | 42 +-- .../GenericComparison/Hash10.il.bsl | 52 ++-- .../GenericComparison/Hash11.il.bsl | 52 ++-- .../GenericComparison/Hash12.il.bsl | 62 ++-- 42 files changed, 777 insertions(+), 660 deletions(-) diff --git a/src/fsharp/Optimizer.fs b/src/fsharp/Optimizer.fs index 304e40ad12e..fba59c14717 100644 --- a/src/fsharp/Optimizer.fs +++ b/src/fsharp/Optimizer.fs @@ -1650,8 +1650,8 @@ let MakeStructuralBindingTempVal (v: Val) i (arg: Expr) argTy = mkCompGenLocal arg.Range name argTy let MakeStructuralBindingTemp (v: Val) i (arg: Expr) argTy = - let v, ve = MakeStructuralBindingTempVal v i arg argTy - ve, mkCompGenBind v arg + let vi, vie = MakeStructuralBindingTempVal v i arg argTy + vie, mkCompGenBind vi arg let MakeMutableStructuralBindingForTupleElement (v: Val) i (arg: Expr) argTy = let name = sprintf "%s_%d%s" v.LogicalName i suffixForTupleElementAssignmentTarget diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.il.bsl index 076d1239779..a41acfab6f6 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000270 Length: 0x000000AF } .module ListExpressionSteppingTest1.exe -// MVID: {61E07031-50CF-F6CE-A745-03833170E061} +// MVID: {61F02896-50CF-F6CE-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x058C0000 +// Image base: 0x06AA0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -89,6 +89,7 @@ .entrypoint // Code size 7 (0x7) .maxstack 8 + .line 7,7 : 13,17 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest1/ListExpressionSteppingTest1::f0() IL_0005: pop IL_0006: ret diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.il.bsl index 2f1ec2391bf..c13863375e3 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: {61E07031-D3DE-B780-A745-03833170E061} +// MVID: {61F02896-D3DE-B780-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06CB0000 +// Image base: 0x07340000 // =============== CLASS MEMBERS DECLARATION =================== @@ -445,8 +445,10 @@ .entrypoint // Code size 14 (0xe) .maxstack 8 + .line 11,11 : 13,17 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest2/ListExpressionSteppingTest2::f1() IL_0005: pop + .line 29,29 : 13,17 '' IL_0006: ldc.i4.5 IL_0007: call class [mscorlib]System.Tuple`2>,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> ListExpressionSteppingTest2/ListExpressionSteppingTest2::f2(!!0) IL_000c: pop diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.il.bsl index b105290c596..244684f7611 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000280 Length: 0x000000AF } .module ListExpressionSteppingTest3.exe -// MVID: {61E07031-AE45-39B4-A745-03833170E061} +// MVID: {61F02896-AE45-39B4-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04F70000 +// Image base: 0x06FB0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -114,6 +114,7 @@ .entrypoint // Code size 7 (0x7) .maxstack 8 + .line 12,12 : 13,17 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ListExpressionSteppingTest3/ListExpressionSteppingTest3::f2() IL_0005: pop IL_0006: ret diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl index e893788ea36..002ec20729c 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: {61E07031-3154-FA67-A745-03833170E061} +// MVID: {61F02896-3154-FA67-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x068C0000 +// Image base: 0x06FE0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -122,6 +122,7 @@ .entrypoint // Code size 7 (0x7) .maxstack 8 + .line 14,14 : 13,17 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest4/ListExpressionSteppingTest4::f3() IL_0005: pop IL_0006: ret diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl index eea6dc07154..01a8d879860 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: {61E07031-CBE3-BFEA-A745-03833170E061} +// MVID: {61F02896-CBE3-BFEA-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x059E0000 +// Image base: 0x05020000 // =============== CLASS MEMBERS DECLARATION =================== @@ -146,6 +146,7 @@ .entrypoint // Code size 7 (0x7) .maxstack 8 + .line 17,17 : 13,17 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest5/ListExpressionSteppingTest5::f4() IL_0005: pop IL_0006: ret diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl index 02ab01f10a6..83d96dc7b16 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: {61E07031-98A2-AB14-A745-03833170E061} +// MVID: {61F02896-98A2-AB14-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07170000 +// Image base: 0x06990000 // =============== CLASS MEMBERS DECLARATION =================== @@ -233,6 +233,7 @@ IL_0017: dup IL_0018: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$ListExpressionSteppingTest6::es@5 IL_001d: stloc.0 + .line 14,14 : 13,17 '' IL_001e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ListExpressionSteppingTest6/ListExpressionSteppingTest6::f7() IL_0023: pop IL_0024: ret diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/CodeGenRenamings01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/CodeGenRenamings01.il.bsl index 5ac6e6194c5..0275dc8ba1d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/CodeGenRenamings01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/CodeGenRenamings01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000003D0 Length: 0x0000011B } .module CodeGenRenamings01.exe -// MVID: {61E07031-8173-986B-A745-03833170E061} +// MVID: {61F02896-8173-986B-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07570000 +// Image base: 0x05910000 // =============== CLASS MEMBERS DECLARATION =================== @@ -567,18 +567,23 @@ IL_00dc: dup IL_00dd: stsfld int32[0...,0...,0...,0...] ''.$CodeGenRenamings01::array4D@13 IL_00e2: stloc.s array4D + .line 16,16 : 9,27 '' IL_00e4: call int32[] CodeGenRenamings01::get_array() IL_00e9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::OfArray(!!0[]) IL_00ee: pop + .line 17,17 : 9,24 '' IL_00ef: call class [mscorlib]System.Collections.Generic.IEnumerable`1 CodeGenRenamings01::get_aseq() IL_00f4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::OfSeq(class [mscorlib]System.Collections.Generic.IEnumerable`1) IL_00f9: pop + .line 20,20 : 9,27 '' IL_00fa: call class [mscorlib]System.Tuple`2[] CodeGenRenamings01::get_array1() IL_00ff: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpMap`2 [FSharp.Core]Microsoft.FSharp.Collections.MapModule::OfArray(class [mscorlib]System.Tuple`2[]) IL_0104: pop + .line 21,21 : 9,25 '' IL_0105: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> CodeGenRenamings01::get_list1() IL_010a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpMap`2 [FSharp.Core]Microsoft.FSharp.Collections.MapModule::OfList(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>) IL_010f: pop + .line 22,22 : 9,23 '' IL_0110: call class [mscorlib]System.Collections.Generic.IEnumerable`1> CodeGenRenamings01::get_seq1() IL_0115: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpMap`2 [FSharp.Core]Microsoft.FSharp.Collections.MapModule::OfSeq(class [mscorlib]System.Collections.Generic.IEnumerable`1>) IL_011a: pop diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Decimal01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Decimal01.il.bsl index 08891aa017e..165fd198ad5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Decimal01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Decimal01.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x00000140 Length: 0x00000050 } .module Decimal01.exe -// MVID: {61E07031-F150-FA46-A745-03833170E061} +// MVID: {61F02896-F150-FA46-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06AE0000 +// Image base: 0x06C60000 // =============== CLASS MEMBERS DECLARATION =================== @@ -70,6 +70,8 @@ .entrypoint // Code size 13 (0xd) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 6,6 : 9,13 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\Decimal01.fs' IL_0000: ldc.i4.s 12 IL_0002: ldc.i4.0 IL_0003: ldc.i4.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.il.bsl index a7c461486a4..5c84d0e45b2 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Operators/comparison_decimal01.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x00000178 Length: 0x0000005B } .module comparison_decimal01.exe -// MVID: {61E07031-76D8-7EE3-A745-03833170E061} +// MVID: {61F02896-76D8-7EE3-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07480000 +// Image base: 0x06C60000 // =============== CLASS MEMBERS DECLARATION =================== @@ -70,6 +70,8 @@ .entrypoint // Code size 228 (0xe4) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 4,4 : 9,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Operators\\comparison_decimal01.fs' IL_0000: ldc.i4.s 10 IL_0002: ldc.i4.0 IL_0003: ldc.i4.0 @@ -93,6 +95,7 @@ IL_0016: call bool [netstandard]System.Decimal::op_LessThan(valuetype [netstandard]System.Decimal, valuetype [netstandard]System.Decimal) IL_001b: pop + .line 5,5 : 9,21 '' IL_001c: ldc.i4.s 10 IL_001e: ldc.i4.0 IL_001f: ldc.i4.0 @@ -116,6 +119,7 @@ IL_0032: call bool [netstandard]System.Decimal::op_LessThanOrEqual(valuetype [netstandard]System.Decimal, valuetype [netstandard]System.Decimal) IL_0037: pop + .line 6,6 : 9,20 '' IL_0038: ldc.i4.s 10 IL_003a: ldc.i4.0 IL_003b: ldc.i4.0 @@ -139,6 +143,7 @@ IL_004e: call bool [netstandard]System.Decimal::op_GreaterThan(valuetype [netstandard]System.Decimal, valuetype [netstandard]System.Decimal) IL_0053: pop + .line 7,7 : 9,21 '' IL_0054: ldc.i4.s 10 IL_0056: ldc.i4.0 IL_0057: ldc.i4.0 @@ -162,6 +167,7 @@ IL_006a: call bool [netstandard]System.Decimal::op_GreaterThanOrEqual(valuetype [netstandard]System.Decimal, valuetype [netstandard]System.Decimal) IL_006f: pop + .line 8,8 : 9,20 '' IL_0070: ldc.i4.s 10 IL_0072: ldc.i4.0 IL_0073: ldc.i4.0 @@ -185,6 +191,7 @@ IL_0086: call bool [netstandard]System.Decimal::op_Equality(valuetype [netstandard]System.Decimal, valuetype [netstandard]System.Decimal) IL_008b: pop + .line 9,9 : 9,21 '' IL_008c: ldc.i4.s 10 IL_008e: ldc.i4.0 IL_008f: ldc.i4.0 @@ -210,6 +217,7 @@ IL_00a7: ldc.i4.0 IL_00a8: ceq IL_00aa: pop + .line 10,10 : 9,20 '' IL_00ab: ldc.i4.s 10 IL_00ad: ldc.i4.0 IL_00ae: ldc.i4.0 @@ -233,6 +241,7 @@ IL_00c1: call bool [netstandard]System.Decimal::op_Equality(valuetype [netstandard]System.Decimal, valuetype [netstandard]System.Decimal) IL_00c6: pop + .line 11,11 : 9,26 '' IL_00c7: ldc.i4.s 10 IL_00c9: ldc.i4.0 IL_00ca: ldc.i4.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22b.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22b.il.bsl index 736680623cb..16c636cb2a4 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22b.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22b.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000160 Length: 0x00000056 } .module Testfunction22b.exe -// MVID: {61E07031-8504-18B7-A745-03833170E061} +// MVID: {61F02896-8504-18B7-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07440000 +// Image base: 0x04F90000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,6 +65,8 @@ .entrypoint // Code size 6 (0x6) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 9,35 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\Testfunction22b.fs' IL_0000: call void [mscorlib]System.Console::WriteLine() IL_0005: ret } // end of method $Testfunction22b::main@ diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22c.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22c.il.bsl index c2d31276a7d..5f6acc718f9 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22c.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22c.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000160 Length: 0x00000056 } .module Testfunction22c.exe -// MVID: {61E07031-459D-3DF8-A745-03833170E061} +// MVID: {61F02896-459D-3DF8-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x053B0000 +// Image base: 0x07280000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,6 +65,8 @@ .entrypoint // Code size 6 (0x6) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 10,36 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\Testfunction22c.fs' IL_0000: call void [mscorlib]System.Console::WriteLine() IL_0005: ret } // end of method $Testfunction22c::main@ diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple01.il.bsl index 64cca9debc3..ab08dac9a6a 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple01.exe -// MVID: {61E07031-6FDB-3E0B-A745-03833170E061} +// MVID: {61F02896-6FDB-3E0B-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06F10000 +// Image base: 0x04F50000 // =============== CLASS MEMBERS DECLARATION =================== @@ -61,6 +61,8 @@ .entrypoint // Code size 1 (0x1) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 9,10 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\Tuple01.fs' IL_0000: ret } // end of method $Tuple01::main@ diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple02.il.bsl index 2b360b44b9d..50f0744fe24 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple02.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple02.exe -// MVID: {61E07031-ECCC-7D58-A745-03833170E061} +// MVID: {61F02896-ECCC-7D58-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07400000 +// Image base: 0x06FE0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,6 +65,8 @@ .entrypoint // 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 : 9,12 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\Tuple02.fs' IL_0000: ldc.i4.1 IL_0001: ldc.i4.2 IL_0002: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple03.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple03.il.bsl index c4cc370f6f8..666f789a1fe 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple03.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple03.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple03.exe -// MVID: {61E07031-AD65-A299-A745-03833170E061} +// MVID: {61F02896-AD65-A299-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06F30000 +// Image base: 0x07280000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,6 +65,8 @@ .entrypoint // Code size 10 (0xa) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 9,14 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\Tuple03.fs' IL_0000: ldc.i4.1 IL_0001: ldc.i4.2 IL_0002: ldc.i4.3 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple04.il.bsl index cfac5f7b4be..c2d2d71e244 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple04.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple04.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple04.exe -// MVID: {61E07031-6A2E-9E97-A745-03833170E061} +// MVID: {61F02896-6A2E-9E97-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06760000 +// Image base: 0x06A30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,6 +65,8 @@ .entrypoint // Code size 11 (0xb) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 9,16 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\Tuple04.fs' IL_0000: ldc.i4.1 IL_0001: ldc.i4.2 IL_0002: ldc.i4.3 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple05.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple05.il.bsl index 4bebcd2f81d..629692238de 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple05.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple05.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple05.exe -// MVID: {61E07031-349F-319F-A745-03833170E061} +// MVID: {61F02896-349F-319F-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x099F0000 +// Image base: 0x07650000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,6 +65,8 @@ .entrypoint // Code size 12 (0xc) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 9,18 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\Tuple05.fs' IL_0000: ldc.i4.1 IL_0001: ldc.i4.2 IL_0002: ldc.i4.3 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple06.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple06.il.bsl index 523975aa8f5..26232d0047a 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple06.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple06.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple06.exe -// MVID: {61E07031-67E0-4675-A745-03833170E061} +// MVID: {61F02896-67E0-4675-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x076E0000 +// Image base: 0x06BE0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,6 +65,8 @@ .entrypoint // Code size 13 (0xd) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 9,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\Tuple06.fs' IL_0000: ldc.i4.1 IL_0001: ldc.i4.2 IL_0002: ldc.i4.3 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple07.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple07.il.bsl index ff966990b5e..787ab61985d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple07.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple07.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple07.exe -// MVID: {61E07031-7229-962D-A745-03833170E061} +// MVID: {61F02896-7229-962D-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06CF0000 +// Image base: 0x07100000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,6 +65,8 @@ .entrypoint // Code size 14 (0xe) .maxstack 9 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 9,22 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\Tuple07.fs' IL_0000: ldc.i4.1 IL_0001: ldc.i4.2 IL_0002: ldc.i4.3 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple08.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple08.il.bsl index 6ae92a14123..e4a58201526 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple08.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple08.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple08.exe -// MVID: {61E07031-E542-67B3-A745-03833170E061} +// MVID: {61F02896-E542-67B3-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05240000 +// Image base: 0x07190000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,6 +65,8 @@ .entrypoint // Code size 20 (0x14) .maxstack 10 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 9,24 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\Tuple08.fs' IL_0000: ldc.i4.1 IL_0001: ldc.i4.2 IL_0002: ldc.i4.3 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleElimination.il.bsl index 1c65ef67d04..2970b0c645b 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: {61EFEE1F-DFDD-92DF-A745-03831FEEEF61} +// MVID: {61F02896-DFDD-92DF-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07030000 +// Image base: 0x06990000 // =============== CLASS MEMBERS DECLARATION =================== @@ -60,7 +60,7 @@ { .entrypoint .custom instance void [FSharp.Core]Microsoft.FSharp.Core.EntryPointAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 205 (0xcd) + // Code size 206 (0xce) .maxstack 5 .locals init ([0] class [mscorlib]System.Collections.Generic.Dictionary`2 dic, [1] int32 i, @@ -78,6 +78,7 @@ .line 7,7 : 5,64 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\TupleElimination.fs' IL_0000: newobj instance void class [mscorlib]System.Collections.Generic.Dictionary`2::.ctor() IL_0005: stloc.0 + .line 9,9 : 5,48 '' IL_0006: ldloc.0 IL_0007: ldc.i4.1 IL_0008: ldloca.s i @@ -108,12 +109,12 @@ IL_0048: ldloc.s V_4 IL_004a: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_004f: pop + .line 14,14 : 5,65 '' IL_0050: ldstr "123" IL_0055: ldloca.s l IL_0057: call bool [mscorlib]System.Int64::TryParse(string, int64&) IL_005c: stloc.s b - .line 14,14 : 5,65 '' IL_005e: ldloc.s b IL_0060: ldloc.s l IL_0062: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, @@ -143,20 +144,22 @@ IL_00a3: ldloc.s V_9 IL_00a5: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) IL_00aa: pop + .line 18,18 : 5,28 '' + IL_00ab: nop .line 21,21 : 5,9 '' - IL_00ab: ldstr "%A" - IL_00b0: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [mscorlib]System.Tuple`2>::.ctor(string) - IL_00b5: stloc.s V_11 - IL_00b7: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_00bc: ldloc.s V_11 - IL_00be: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [mscorlib]System.IO.TextWriter, + IL_00ac: ldstr "%A" + IL_00b1: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5,class [FSharp.Core]Microsoft.FSharp.Core.Unit>,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [mscorlib]System.Tuple`2>::.ctor(string) + IL_00b6: stloc.s V_11 + IL_00b8: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_00bd: ldloc.s V_11 + IL_00bf: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit>>(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_00c3: ldloc.s t - IL_00c5: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) - IL_00ca: pop + IL_00c4: ldloc.s t + IL_00c6: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Core.Unit>::Invoke(!0) + IL_00cb: pop .line 23,23 : 5,6 '' - IL_00cb: ldc.i4.0 - IL_00cc: ret + IL_00cc: ldc.i4.0 + IL_00cd: ret } // end of method TupleElimination::main } // end of class TupleElimination diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleMonster.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleMonster.il.bsl index 4a303010020..1cf266ded91 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleMonster.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/TupleMonster.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000150 Length: 0x00000053 } .module TupleMonster.exe -// MVID: {61E07031-1552-41D8-A745-03833170E061} +// MVID: {61F02896-1552-41D8-A745-03839628F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x068B0000 +// Image base: 0x06830000 // =============== CLASS MEMBERS DECLARATION =================== @@ -65,6 +65,8 @@ .entrypoint // Code size 74 (0x4a) .maxstack 28 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 3,3 : 9,137 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\TupleMonster.fs' IL_0000: ldc.i4.s 97 IL_0002: ldc.i4.s 98 IL_0004: ldc.i4.s 99 diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnArray01.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnArray01.il.bsl index 53f88568bb0..f123d9e173c 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnArray01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnArray01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000001E0 Length: 0x0000007C } .module ForEachOnArray01.dll -// MVID: {61EFED17-7E2E-D3AE-A745-038317EDEF61} +// MVID: {61F0294F-7E2E-D3AE-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x074C0000 +// Image base: 0x07580000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,6 +62,7 @@ .line 6,6 : 6,23 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\ForLoop\\ForEachOnArray01.fs' IL_0000: ldc.i4.0 IL_0001: stloc.0 + .line 7,7 : 6,9 '' IL_0002: ldc.i4.0 IL_0003: stloc.1 IL_0004: br.s IL_0016 diff --git a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnString01.il.bsl b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnString01.il.bsl index 47e29ec8d51..6a0ae91334b 100644 --- a/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnString01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/ForLoop/ForEachOnString01.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x00000358 Length: 0x000000FF } .module ForEachOnString01.dll -// MVID: {61EFEE9C-105C-852B-A745-03839CEEEF61} +// MVID: {61F0294F-105C-852B-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07570000 +// Image base: 0x06C00000 // =============== CLASS MEMBERS DECLARATION =================== @@ -152,6 +152,7 @@ .line 8,8 : 6,23 '' IL_0000: ldc.i4.0 IL_0001: stloc.0 + .line 9,9 : 6,9 '' IL_0002: ldc.i4.0 IL_0003: stloc.2 IL_0004: ldarg.0 @@ -199,6 +200,7 @@ .line 13,13 : 6,23 '' IL_0000: ldc.i4.0 IL_0001: stloc.0 + .line 14,14 : 6,9 '' IL_0002: ldc.i4.0 IL_0003: stloc.2 IL_0004: ldstr "123" @@ -237,54 +239,57 @@ .method public static void test3() cil managed { - // Code size 49 (0x31) + // Code size 50 (0x32) .maxstack 5 .locals init ([0] int32 z, [1] int32 V_1, [2] int32 V_2, [3] char x) + .line 18,18 : 6,20 '' + IL_0000: nop .line 19,19 : 6,23 '' - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.0 - IL_0003: stloc.2 - IL_0004: ldstr "123" - IL_0009: callvirt instance int32 [mscorlib]System.String::get_Length() - IL_000e: ldc.i4.1 - IL_000f: sub - IL_0010: stloc.1 - IL_0011: ldloc.1 - IL_0012: ldloc.2 - IL_0013: blt.s IL_0030 + IL_0001: ldc.i4.0 + IL_0002: stloc.0 + .line 20,20 : 6,9 '' + IL_0003: ldc.i4.0 + IL_0004: stloc.2 + IL_0005: ldstr "123" + IL_000a: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_000f: ldc.i4.1 + IL_0010: sub + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldloc.2 + IL_0014: blt.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_0015: ldstr "123" - IL_001a: ldloc.2 - IL_001b: callvirt instance char [netstandard]System.String::get_Chars(int32) - IL_0020: stloc.3 + IL_0016: ldstr "123" + IL_001b: ldloc.2 + IL_001c: callvirt instance char [netstandard]System.String::get_Chars(int32) + IL_0021: stloc.3 .line 21,21 : 10,26 '' - IL_0021: ldloc.0 - IL_0022: ldloc.3 - IL_0023: conv.i4 - IL_0024: add - IL_0025: stloc.0 - IL_0026: ldloc.2 - IL_0027: ldc.i4.1 - IL_0028: add - IL_0029: stloc.2 + IL_0022: ldloc.0 + IL_0023: ldloc.3 + IL_0024: conv.i4 + IL_0025: add + IL_0026: stloc.0 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 .line 20,20 : 12,14 '' - IL_002a: ldloc.2 - IL_002b: ldloc.1 - IL_002c: ldc.i4.1 - IL_002d: add - IL_002e: bne.un.s IL_0015 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldc.i4.1 + IL_002e: add + IL_002f: bne.un.s IL_0016 - IL_0030: ret + IL_0031: ret } // end of method ForEachOnString01::test3 .method public static void test4() cil managed { - // Code size 49 (0x31) + // Code size 50 (0x32) .maxstack 5 .locals init ([0] int32 z, [1] int32 V_1, @@ -293,90 +298,95 @@ .line 24,24 : 6,23 '' IL_0000: ldc.i4.0 IL_0001: stloc.0 - IL_0002: ldc.i4.0 - IL_0003: stloc.2 - IL_0004: ldstr "123" - IL_0009: callvirt instance int32 [mscorlib]System.String::get_Length() - IL_000e: ldc.i4.1 - IL_000f: sub - IL_0010: stloc.1 - IL_0011: ldloc.1 - IL_0012: ldloc.2 - IL_0013: blt.s IL_0030 + .line 25,25 : 6,20 '' + IL_0002: nop + .line 26,26 : 6,9 '' + IL_0003: ldc.i4.0 + IL_0004: stloc.2 + IL_0005: ldstr "123" + IL_000a: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_000f: ldc.i4.1 + IL_0010: sub + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldloc.2 + IL_0014: blt.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_0015: ldstr "123" - IL_001a: ldloc.2 - IL_001b: callvirt instance char [netstandard]System.String::get_Chars(int32) - IL_0020: stloc.3 + IL_0016: ldstr "123" + IL_001b: ldloc.2 + IL_001c: callvirt instance char [netstandard]System.String::get_Chars(int32) + IL_0021: stloc.3 .line 27,27 : 10,26 '' - IL_0021: ldloc.0 - IL_0022: ldloc.3 - IL_0023: conv.i4 - IL_0024: add - IL_0025: stloc.0 - IL_0026: ldloc.2 - IL_0027: ldc.i4.1 - IL_0028: add - IL_0029: stloc.2 + IL_0022: ldloc.0 + IL_0023: ldloc.3 + IL_0024: conv.i4 + IL_0025: add + IL_0026: stloc.0 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 .line 26,26 : 12,14 '' - IL_002a: ldloc.2 - IL_002b: ldloc.1 - IL_002c: ldc.i4.1 - IL_002d: add - IL_002e: bne.un.s IL_0015 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldc.i4.1 + IL_002e: add + IL_002f: bne.un.s IL_0016 - IL_0030: ret + IL_0031: ret } // end of method ForEachOnString01::test4 .method public static void test5() cil managed { - // Code size 71 (0x47) + // Code size 72 (0x48) .maxstack 5 .locals init ([0] int32 V_0, [1] int32 V_1, [2] char x, [3] class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4,class [mscorlib]System.IO.TextWriter,class [FSharp.Core]Microsoft.FSharp.Core.Unit,class [FSharp.Core]Microsoft.FSharp.Core.Unit> V_3) - .line 16707566,16707566 : 0,0 '' - IL_0000: ldc.i4.0 - IL_0001: stloc.1 - IL_0002: ldstr "123" - IL_0007: callvirt instance int32 [mscorlib]System.String::get_Length() - IL_000c: ldc.i4.1 - IL_000d: sub - IL_000e: stloc.0 - IL_000f: ldloc.0 - IL_0010: ldloc.1 - IL_0011: blt.s IL_0046 + .line 30,30 : 6,20 '' + IL_0000: nop + .line 31,31 : 6,9 '' + IL_0001: ldc.i4.0 + IL_0002: stloc.1 + IL_0003: ldstr "123" + IL_0008: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_000d: ldc.i4.1 + IL_000e: sub + IL_000f: stloc.0 + IL_0010: ldloc.0 + IL_0011: ldloc.1 + IL_0012: blt.s IL_0047 .line 16707566,16707566 : 0,0 '' - IL_0013: ldstr "123" - IL_0018: ldloc.1 - IL_0019: callvirt instance char [netstandard]System.String::get_Chars(int32) - IL_001e: stloc.2 + IL_0014: ldstr "123" + IL_0019: ldloc.1 + IL_001a: callvirt instance char [netstandard]System.String::get_Chars(int32) + IL_001f: stloc.2 .line 32,32 : 10,24 '' - IL_001f: ldstr "%A" - IL_0024: 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,char>::.ctor(string) - IL_0029: stloc.3 - IL_002a: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() - IL_002f: ldloc.3 - IL_0030: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, + IL_0020: ldstr "%A" + IL_0025: 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,char>::.ctor(string) + IL_002a: stloc.3 + IL_002b: call class [netstandard]System.IO.TextWriter [netstandard]System.Console::get_Out() + IL_0030: ldloc.3 + IL_0031: call !!0 [FSharp.Core]Microsoft.FSharp.Core.PrintfModule::PrintFormatLineToTextWriter>(class [mscorlib]System.IO.TextWriter, class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0035: ldloc.2 - IL_0036: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_003b: pop - IL_003c: ldloc.1 - IL_003d: ldc.i4.1 - IL_003e: add - IL_003f: stloc.1 + 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: ldc.i4.1 + IL_003f: add + IL_0040: stloc.1 .line 31,31 : 12,14 '' - IL_0040: ldloc.1 - IL_0041: ldloc.0 - IL_0042: ldc.i4.1 - IL_0043: add - IL_0044: bne.un.s IL_0013 + IL_0041: ldloc.1 + IL_0042: ldloc.0 + IL_0043: ldc.i4.1 + IL_0044: add + IL_0045: bne.un.s IL_0014 - IL_0046: ret + IL_0047: ret } // end of method ForEachOnString01::test5 .method public static void test6(string str) cil managed @@ -390,6 +400,7 @@ .line 40,40 : 6,23 '' IL_0000: ldc.i4.0 IL_0001: stloc.0 + .line 41,41 : 6,9 '' IL_0002: ldc.i4.0 IL_0003: stloc.2 IL_0004: ldarg.0 @@ -428,49 +439,52 @@ .method public static void test7() cil managed { - // Code size 49 (0x31) + // Code size 50 (0x32) .maxstack 5 .locals init ([0] int32 z, [1] int32 V_1, [2] int32 V_2, [3] char x) + .line 45,45 : 6,29 '' + IL_0000: nop .line 46,46 : 6,23 '' - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: ldc.i4.0 - IL_0003: stloc.2 - IL_0004: ldstr "123" - IL_0009: callvirt instance int32 [mscorlib]System.String::get_Length() - IL_000e: ldc.i4.1 - IL_000f: sub - IL_0010: stloc.1 - IL_0011: ldloc.1 - IL_0012: ldloc.2 - IL_0013: blt.s IL_0030 + IL_0001: ldc.i4.0 + IL_0002: stloc.0 + .line 47,47 : 6,9 '' + IL_0003: ldc.i4.0 + IL_0004: stloc.2 + IL_0005: ldstr "123" + IL_000a: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_000f: ldc.i4.1 + IL_0010: sub + IL_0011: stloc.1 + IL_0012: ldloc.1 + IL_0013: ldloc.2 + IL_0014: blt.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_0015: ldstr "123" - IL_001a: ldloc.2 - IL_001b: callvirt instance char [netstandard]System.String::get_Chars(int32) - IL_0020: stloc.3 + IL_0016: ldstr "123" + IL_001b: ldloc.2 + IL_001c: callvirt instance char [netstandard]System.String::get_Chars(int32) + IL_0021: stloc.3 .line 48,48 : 10,26 '' - IL_0021: ldloc.0 - IL_0022: ldloc.3 - IL_0023: conv.i4 - IL_0024: add - IL_0025: stloc.0 - IL_0026: ldloc.2 - IL_0027: ldc.i4.1 - IL_0028: add - IL_0029: stloc.2 + IL_0022: ldloc.0 + IL_0023: ldloc.3 + IL_0024: conv.i4 + IL_0025: add + IL_0026: stloc.0 + IL_0027: ldloc.2 + IL_0028: ldc.i4.1 + IL_0029: add + IL_002a: stloc.2 .line 47,47 : 12,14 '' - IL_002a: ldloc.2 - IL_002b: ldloc.1 - IL_002c: ldc.i4.1 - IL_002d: add - IL_002e: bne.un.s IL_0015 + IL_002b: ldloc.2 + IL_002c: ldloc.1 + IL_002d: ldc.i4.1 + IL_002e: add + IL_002f: bne.un.s IL_0016 - IL_0030: ret + IL_0031: ret } // end of method ForEachOnString01::test7 .method public static void test8() cil managed diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare01.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare01.il.bsl index 7bcf6acd5e6..916f666f714 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: {619833D0-04A0-F88E-A745-0383D0339861} +// MVID: {61F0294F-04A0-F88E-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07510000 +// Image base: 0x07170000 // =============== CLASS MEMBERS DECLARATION =================== @@ -57,7 +57,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 void f4() cil managed { - // Code size 34 (0x22) + // Code size 36 (0x24) .maxstack 4 .locals init ([0] int32 x, [1] int32 i, @@ -66,42 +66,46 @@ .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare01.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 + .line 6,6 : 8,22 '' + IL_0002: nop + .line 7,7 : 8,22 '' + IL_0003: nop .line 9,9 : 8,11 '' - IL_0002: ldc.i4.0 - IL_0003: stloc.1 - IL_0004: br.s IL_0019 + IL_0004: ldc.i4.0 + IL_0005: stloc.1 + IL_0006: br.s IL_001b .line 10,10 : 12,30 '' - IL_0006: ldc.i4.1 - IL_0007: ldc.i4.1 - IL_0008: cgt - IL_000a: stloc.2 + IL_0008: ldc.i4.1 + IL_0009: ldc.i4.1 + IL_000a: cgt + IL_000c: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_000b: ldloc.2 - IL_000c: brfalse.s IL_0012 + IL_000d: ldloc.2 + IL_000e: brfalse.s IL_0014 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.2 + IL_0010: ldloc.2 .line 16707566,16707566 : 0,0 '' - IL_000f: nop - IL_0010: br.s IL_0014 + IL_0011: nop + IL_0012: br.s IL_0016 .line 16707566,16707566 : 0,0 '' - IL_0012: ldc.i4.m1 + IL_0014: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_0013: nop + IL_0015: nop .line 16707566,16707566 : 0,0 '' - IL_0014: stloc.0 - IL_0015: ldloc.1 - IL_0016: ldc.i4.1 - IL_0017: add - IL_0018: stloc.1 + IL_0016: stloc.0 + IL_0017: ldloc.1 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.1 .line 9,9 : 18,20 '' - IL_0019: ldloc.1 - IL_001a: ldc.i4 0x989681 - IL_001f: blt.s IL_0006 + IL_001b: ldloc.1 + IL_001c: ldc.i4 0x989681 + IL_0021: blt.s IL_0008 - IL_0021: ret + IL_0023: ret } // end of method CompareMicroPerfAndCodeGenerationTests::f4 } // end of class CompareMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare02.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare02.il.bsl index ee2bcc65859..36f4b37ed0a 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: {619833D0-0481-F88E-A745-0383D0339861} +// MVID: {61F0294F-0481-F88E-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06CF0000 +// Image base: 0x04B60000 // =============== CLASS MEMBERS DECLARATION =================== @@ -57,7 +57,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 void f4_triple() cil managed { - // Code size 46 (0x2e) + // Code size 48 (0x30) .maxstack 4 .locals init ([0] int32 x, [1] int32 i, @@ -67,57 +67,61 @@ .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare02.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 + .line 6,6 : 8,24 '' + IL_0002: nop + .line 7,7 : 8,24 '' + IL_0003: nop .line 8,8 : 8,11 '' - IL_0002: ldc.i4.0 - IL_0003: stloc.1 - IL_0004: br.s IL_0025 + IL_0004: ldc.i4.0 + IL_0005: stloc.1 + IL_0006: br.s IL_0027 .line 9,9 : 12,30 '' - IL_0006: ldc.i4.1 - IL_0007: ldc.i4.1 - IL_0008: cgt - IL_000a: stloc.2 + IL_0008: ldc.i4.1 + IL_0009: ldc.i4.1 + IL_000a: cgt + IL_000c: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_000b: ldloc.2 - IL_000c: brfalse.s IL_0012 + IL_000d: ldloc.2 + IL_000e: brfalse.s IL_0014 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.2 + IL_0010: ldloc.2 .line 16707566,16707566 : 0,0 '' - IL_000f: nop - IL_0010: br.s IL_0020 + IL_0011: nop + IL_0012: br.s IL_0022 .line 16707566,16707566 : 0,0 '' - IL_0012: ldc.i4.2 - IL_0013: ldc.i4.2 - IL_0014: cgt - IL_0016: stloc.3 + IL_0014: ldc.i4.2 + IL_0015: ldc.i4.2 + IL_0016: cgt + IL_0018: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0017: ldloc.3 - IL_0018: brfalse.s IL_001e + IL_0019: ldloc.3 + IL_001a: brfalse.s IL_0020 .line 16707566,16707566 : 0,0 '' - IL_001a: ldloc.3 + IL_001c: ldloc.3 .line 16707566,16707566 : 0,0 '' - IL_001b: nop - IL_001c: br.s IL_0020 + IL_001d: nop + IL_001e: br.s IL_0022 .line 16707566,16707566 : 0,0 '' - IL_001e: ldc.i4.m1 + IL_0020: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_001f: nop + IL_0021: nop .line 16707566,16707566 : 0,0 '' - IL_0020: stloc.0 - IL_0021: ldloc.1 - IL_0022: ldc.i4.1 - IL_0023: add - IL_0024: stloc.1 + IL_0022: stloc.0 + IL_0023: ldloc.1 + IL_0024: ldc.i4.1 + IL_0025: add + IL_0026: stloc.1 .line 8,8 : 18,20 '' - IL_0025: ldloc.1 - IL_0026: ldc.i4 0x989681 - IL_002b: blt.s IL_0006 + IL_0027: ldloc.1 + IL_0028: ldc.i4 0x989681 + IL_002d: blt.s IL_0008 - IL_002d: ret + IL_002f: ret } // end of method CompareMicroPerfAndCodeGenerationTests::f4_triple } // end of class CompareMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare03.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare03.il.bsl index bab4efa1164..e1ab482c909 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: {619833D0-0562-F88E-A745-0383D0339861} +// MVID: {61F0294F-0562-F88E-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07040000 +// Image base: 0x070D0000 // =============== 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 int32 f4_tuple4() cil managed { - // Code size 76 (0x4c) + // Code size 78 (0x4e) .maxstack 4 .locals init ([0] int32 x, [1] int32 i, @@ -73,77 +73,81 @@ .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare03.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 + .line 6,6 : 8,31 '' + IL_0002: nop + .line 7,7 : 8,28 '' + IL_0003: nop .line 8,8 : 8,11 '' - IL_0002: ldc.i4.0 - IL_0003: stloc.1 - IL_0004: br.s IL_0042 + IL_0004: ldc.i4.0 + IL_0005: stloc.1 + IL_0006: br.s IL_0044 .line 9,9 : 12,30 '' - IL_0006: ldc.i4.1 - IL_0007: ldc.i4.1 - IL_0008: cgt - IL_000a: stloc.2 + IL_0008: ldc.i4.1 + IL_0009: ldc.i4.1 + IL_000a: cgt + IL_000c: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_000b: ldloc.2 - IL_000c: brfalse.s IL_0012 + IL_000d: ldloc.2 + IL_000e: brfalse.s IL_0014 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.2 + IL_0010: ldloc.2 .line 16707566,16707566 : 0,0 '' - IL_000f: nop - IL_0010: br.s IL_003d + IL_0011: nop + IL_0012: br.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_0012: ldc.i4.2 - IL_0013: ldc.i4.2 - IL_0014: cgt - IL_0016: stloc.3 + IL_0014: ldc.i4.2 + IL_0015: ldc.i4.2 + IL_0016: cgt + IL_0018: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_0017: ldloc.3 - IL_0018: brfalse.s IL_001e + IL_0019: ldloc.3 + IL_001a: brfalse.s IL_0020 .line 16707566,16707566 : 0,0 '' - IL_001a: ldloc.3 + IL_001c: ldloc.3 .line 16707566,16707566 : 0,0 '' - IL_001b: nop - IL_001c: br.s IL_003d + IL_001d: nop + IL_001e: br.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_001e: ldc.i4.4 - IL_001f: ldc.i4.4 - IL_0020: cgt - IL_0022: stloc.s V_4 + IL_0020: ldc.i4.4 + IL_0021: ldc.i4.4 + IL_0022: cgt + IL_0024: stloc.s V_4 .line 16707566,16707566 : 0,0 '' - IL_0024: ldloc.s V_4 - IL_0026: brfalse.s IL_002d + IL_0026: ldloc.s V_4 + IL_0028: brfalse.s IL_002f .line 16707566,16707566 : 0,0 '' - IL_0028: ldloc.s V_4 + IL_002a: ldloc.s V_4 .line 16707566,16707566 : 0,0 '' - IL_002a: nop - IL_002b: br.s IL_003d + IL_002c: nop + IL_002d: br.s IL_003f .line 16707566,16707566 : 0,0 '' - IL_002d: ldstr "five" - IL_0032: ldstr "5" - IL_0037: call int32 [netstandard]System.String::CompareOrdinal(string, + IL_002f: ldstr "five" + IL_0034: ldstr "5" + IL_0039: call int32 [netstandard]System.String::CompareOrdinal(string, string) .line 16707566,16707566 : 0,0 '' - IL_003c: nop + IL_003e: nop .line 16707566,16707566 : 0,0 '' - IL_003d: stloc.0 - IL_003e: ldloc.1 - IL_003f: ldc.i4.1 - IL_0040: add - IL_0041: stloc.1 + IL_003f: stloc.0 + IL_0040: ldloc.1 + IL_0041: ldc.i4.1 + IL_0042: add + IL_0043: stloc.1 .line 8,8 : 18,20 '' - IL_0042: ldloc.1 - IL_0043: ldc.i4 0x989681 - IL_0048: blt.s IL_0006 + IL_0044: ldloc.1 + IL_0045: ldc.i4 0x989681 + IL_004a: blt.s IL_0008 .line 10,10 : 8,9 '' - IL_004a: ldloc.0 - IL_004b: ret + IL_004c: ldloc.0 + IL_004d: ret } // end of method CompareMicroPerfAndCodeGenerationTests::f4_tuple4 } // end of class CompareMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare04.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare04.il.bsl index d8e8b1cc7f6..2fa6397bb94 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: {619833D0-053B-F88E-A745-0383D0339861} +// MVID: {61F0294F-053B-F88E-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06AD0000 +// Image base: 0x06CD0000 // =============== 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 int32 f4_tuple5() cil managed { - // Code size 208 (0xd0) + // Code size 210 (0xd2) .maxstack 5 .locals init ([0] int32 x, [1] int32 i, @@ -74,131 +74,135 @@ .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare04.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 + .line 6,6 : 8,32 '' + IL_0002: nop + .line 7,7 : 8,32 '' + IL_0003: nop .line 8,8 : 8,11 '' - IL_0002: ldc.i4.0 - IL_0003: stloc.1 - IL_0004: br IL_00c3 + IL_0004: ldc.i4.0 + IL_0005: stloc.1 + IL_0006: br IL_00c5 .line 9,9 : 12,30 '' - IL_0009: ldc.i4.1 - IL_000a: ldc.i4.1 - IL_000b: cgt - IL_000d: stloc.2 + IL_000b: ldc.i4.1 + IL_000c: ldc.i4.1 + IL_000d: cgt + IL_000f: stloc.2 .line 16707566,16707566 : 0,0 '' - IL_000e: ldloc.2 - IL_000f: brfalse.s IL_0018 + IL_0010: ldloc.2 + IL_0011: brfalse.s IL_001a .line 16707566,16707566 : 0,0 '' - IL_0011: ldloc.2 + IL_0013: ldloc.2 .line 16707566,16707566 : 0,0 '' - IL_0012: nop - IL_0013: br IL_00be + IL_0014: nop + IL_0015: br IL_00c0 .line 16707566,16707566 : 0,0 '' - IL_0018: ldc.i4.2 - IL_0019: ldc.i4.2 - IL_001a: cgt - IL_001c: stloc.3 + IL_001a: ldc.i4.2 + IL_001b: ldc.i4.2 + IL_001c: cgt + IL_001e: stloc.3 .line 16707566,16707566 : 0,0 '' - IL_001d: ldloc.3 - IL_001e: brfalse.s IL_0027 + IL_001f: ldloc.3 + IL_0020: brfalse.s IL_0029 .line 16707566,16707566 : 0,0 '' - IL_0020: ldloc.3 + IL_0022: ldloc.3 .line 16707566,16707566 : 0,0 '' - IL_0021: nop - IL_0022: br IL_00be + IL_0023: nop + IL_0024: br IL_00c0 .line 16707566,16707566 : 0,0 '' - IL_0027: ldc.i4.4 - IL_0028: ldc.i4.4 - IL_0029: cgt - IL_002b: stloc.s V_4 + IL_0029: ldc.i4.4 + IL_002a: ldc.i4.4 + IL_002b: cgt + IL_002d: stloc.s V_4 .line 16707566,16707566 : 0,0 '' - IL_002d: ldloc.s V_4 - IL_002f: brfalse.s IL_0039 + IL_002f: ldloc.s V_4 + IL_0031: brfalse.s IL_003b .line 16707566,16707566 : 0,0 '' - IL_0031: ldloc.s V_4 + IL_0033: ldloc.s V_4 .line 16707566,16707566 : 0,0 '' - IL_0033: nop - IL_0034: br IL_00be + IL_0035: nop + IL_0036: br IL_00c0 .line 16707566,16707566 : 0,0 '' - IL_0039: ldstr "5" - IL_003e: ldstr "5" - IL_0043: call int32 [netstandard]System.String::CompareOrdinal(string, + IL_003b: ldstr "5" + IL_0040: ldstr "5" + IL_0045: call int32 [netstandard]System.String::CompareOrdinal(string, string) - IL_0048: stloc.s V_5 + IL_004a: stloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_004a: ldloc.s V_5 - IL_004c: brfalse.s IL_0053 + IL_004c: ldloc.s V_5 + IL_004e: brfalse.s IL_0055 .line 16707566,16707566 : 0,0 '' - IL_004e: ldloc.s V_5 + IL_0050: ldloc.s V_5 .line 16707566,16707566 : 0,0 '' - IL_0050: nop - IL_0051: br.s IL_00be + IL_0052: nop + IL_0053: br.s IL_00c0 .line 16707566,16707566 : 0,0 '' - IL_0053: ldc.r8 6. - IL_005c: ldc.r8 7. - IL_0065: clt - IL_0067: brfalse.s IL_006d + IL_0055: ldc.r8 6. + IL_005e: ldc.r8 7. + IL_0067: clt + IL_0069: brfalse.s IL_006f .line 16707566,16707566 : 0,0 '' - IL_0069: ldc.i4.m1 + IL_006b: ldc.i4.m1 .line 16707566,16707566 : 0,0 '' - IL_006a: nop - IL_006b: br.s IL_00be + IL_006c: nop + IL_006d: br.s IL_00c0 .line 16707566,16707566 : 0,0 '' - IL_006d: ldc.r8 6. - IL_0076: ldc.r8 7. - IL_007f: cgt - IL_0081: brfalse.s IL_0087 + IL_006f: ldc.r8 6. + IL_0078: ldc.r8 7. + IL_0081: cgt + IL_0083: brfalse.s IL_0089 .line 16707566,16707566 : 0,0 '' - IL_0083: ldc.i4.1 + IL_0085: ldc.i4.1 .line 16707566,16707566 : 0,0 '' - IL_0084: nop - IL_0085: br.s IL_00be + IL_0086: nop + IL_0087: br.s IL_00c0 .line 16707566,16707566 : 0,0 '' - IL_0087: ldc.r8 6. - IL_0090: ldc.r8 7. - IL_0099: ceq - IL_009b: brfalse.s IL_00a1 + IL_0089: ldc.r8 6. + IL_0092: ldc.r8 7. + IL_009b: ceq + IL_009d: brfalse.s IL_00a3 .line 16707566,16707566 : 0,0 '' - IL_009d: ldc.i4.0 + IL_009f: ldc.i4.0 .line 16707566,16707566 : 0,0 '' - IL_009e: nop - IL_009f: br.s IL_00be + IL_00a0: nop + IL_00a1: br.s IL_00c0 .line 16707566,16707566 : 0,0 '' - IL_00a1: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() - IL_00a6: ldc.r8 6. - IL_00af: ldc.r8 7. - IL_00b8: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, + IL_00a3: call class [mscorlib]System.Collections.IComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericComparer() + IL_00a8: ldc.r8 6. + IL_00b1: ldc.r8 7. + IL_00ba: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericComparisonWithComparerIntrinsic(class [mscorlib]System.Collections.IComparer, !!0, !!0) .line 16707566,16707566 : 0,0 '' - IL_00bd: nop + IL_00bf: nop .line 16707566,16707566 : 0,0 '' - IL_00be: stloc.0 - IL_00bf: ldloc.1 - IL_00c0: ldc.i4.1 - IL_00c1: add - IL_00c2: stloc.1 + IL_00c0: stloc.0 + IL_00c1: ldloc.1 + IL_00c2: ldc.i4.1 + IL_00c3: add + IL_00c4: stloc.1 .line 8,8 : 18,20 '' - IL_00c3: ldloc.1 - IL_00c4: ldc.i4 0x989681 - IL_00c9: blt IL_0009 + IL_00c5: ldloc.1 + IL_00c6: ldc.i4 0x989681 + IL_00cb: blt IL_000b .line 10,10 : 8,9 '' - IL_00ce: ldloc.0 - IL_00cf: ret + IL_00d0: ldloc.0 + IL_00d1: ret } // end of method CompareMicroPerfAndCodeGenerationTests::f4_tuple5 } // end of class CompareMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare11.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare11.il.bsl index 29f5a76c13e..eace4acf79f 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare11.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Compare11.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000230 Length: 0x000000B1 } .module Compare11.dll -// MVID: {619833D0-04A0-1753-A745-0383D0339861} +// MVID: {61F0294F-04A0-1753-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x075A0000 +// Image base: 0x070A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -57,7 +57,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() cil managed { - // Code size 22 (0x16) + // Code size 24 (0x18) .maxstack 4 .locals init ([0] bool x, [1] int32 i) @@ -65,26 +65,30 @@ .line 5,5 : 8,29 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Compare11.fsx' IL_0000: ldc.i4.0 IL_0001: stloc.0 + .line 6,6 : 8,22 '' + IL_0002: nop + .line 7,7 : 8,22 '' + IL_0003: nop .line 9,9 : 8,11 '' - IL_0002: ldc.i4.0 - IL_0003: stloc.1 - IL_0004: br.s IL_000c + IL_0004: ldc.i4.0 + IL_0005: stloc.1 + IL_0006: br.s IL_000e .line 10,10 : 12,26 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldloc.1 - IL_0009: ldc.i4.1 - IL_000a: add - IL_000b: stloc.1 + IL_0008: ldc.i4.0 + IL_0009: stloc.0 + IL_000a: ldloc.1 + IL_000b: ldc.i4.1 + IL_000c: add + IL_000d: stloc.1 .line 9,9 : 18,20 '' - IL_000c: ldloc.1 - IL_000d: ldc.i4 0x989681 - IL_0012: blt.s IL_0006 + IL_000e: ldloc.1 + IL_000f: ldc.i4 0x989681 + IL_0014: blt.s IL_0008 .line 11,11 : 8,9 '' - IL_0014: ldloc.0 - IL_0015: ret + IL_0016: ldloc.0 + IL_0017: ret } // end of method EqualsMicroPerfAndCodeGenerationTests::f4 } // end of class EqualsMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals01.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals01.il.bsl index 0c489996485..1534c1d4231 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals01.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000238 Length: 0x000000B6 } .module Equals01.dll -// MVID: {619833D0-0759-50B1-A745-0383D0339861} +// MVID: {61F0294F-0759-50B1-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06740000 +// Image base: 0x07450000 // =============== CLASS MEMBERS DECLARATION =================== @@ -57,7 +57,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_triple() cil managed { - // Code size 22 (0x16) + // Code size 24 (0x18) .maxstack 4 .locals init ([0] bool x, [1] int32 i) @@ -65,26 +65,30 @@ .line 5,5 : 8,29 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals01.fsx' IL_0000: ldc.i4.0 IL_0001: stloc.0 + .line 6,6 : 8,24 '' + IL_0002: nop + .line 7,7 : 8,24 '' + IL_0003: nop .line 8,8 : 8,11 '' - IL_0002: ldc.i4.0 - IL_0003: stloc.1 - IL_0004: br.s IL_000c + IL_0004: ldc.i4.0 + IL_0005: stloc.1 + IL_0006: br.s IL_000e .line 9,9 : 12,26 '' - IL_0006: ldc.i4.0 - IL_0007: stloc.0 - IL_0008: ldloc.1 - IL_0009: ldc.i4.1 - IL_000a: add - IL_000b: stloc.1 + IL_0008: ldc.i4.0 + IL_0009: stloc.0 + IL_000a: ldloc.1 + IL_000b: ldc.i4.1 + IL_000c: add + IL_000d: stloc.1 .line 8,8 : 18,20 '' - IL_000c: ldloc.1 - IL_000d: ldc.i4 0x989681 - IL_0012: blt.s IL_0006 + IL_000e: ldloc.1 + IL_000f: ldc.i4 0x989681 + IL_0014: blt.s IL_0008 .line 10,10 : 8,9 '' - IL_0014: ldloc.0 - IL_0015: ret + IL_0016: ldloc.0 + IL_0017: ret } // end of method EqualsMicroPerfAndCodeGenerationTests::f4_triple } // end of class EqualsMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals02.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals02.il.bsl index 610d890d892..af958bc2e91 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals02.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals02.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x00000238 Length: 0x000000B6 } .module Equals02.dll -// MVID: {619833D0-0759-B6D8-A745-0383D0339861} +// MVID: {61F0294F-0759-B6D8-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07360000 +// Image base: 0x07610000 // =============== 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_tuple4() cil managed { - // Code size 36 (0x24) + // Code size 38 (0x26) .maxstack 4 .locals init ([0] bool x, [1] int32 i) @@ -70,29 +70,33 @@ .line 5,5 : 8,29 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals02.fsx' IL_0000: ldc.i4.0 IL_0001: stloc.0 + .line 6,6 : 8,31 '' + IL_0002: nop + .line 7,7 : 8,28 '' + IL_0003: nop .line 8,8 : 8,11 '' - IL_0002: ldc.i4.0 - IL_0003: stloc.1 - IL_0004: br.s IL_001a + IL_0004: ldc.i4.0 + IL_0005: stloc.1 + IL_0006: br.s IL_001c .line 9,9 : 12,26 '' - IL_0006: ldstr "five" - IL_000b: ldstr "5" - IL_0010: call bool [netstandard]System.String::Equals(string, + IL_0008: ldstr "five" + IL_000d: ldstr "5" + IL_0012: call bool [netstandard]System.String::Equals(string, string) - IL_0015: stloc.0 - IL_0016: ldloc.1 - IL_0017: ldc.i4.1 - IL_0018: add - IL_0019: stloc.1 + IL_0017: stloc.0 + IL_0018: ldloc.1 + IL_0019: ldc.i4.1 + IL_001a: add + IL_001b: stloc.1 .line 8,8 : 18,20 '' - IL_001a: ldloc.1 - IL_001b: ldc.i4 0x989681 - IL_0020: blt.s IL_0006 + IL_001c: ldloc.1 + IL_001d: ldc.i4 0x989681 + IL_0022: blt.s IL_0008 .line 10,10 : 8,9 '' - IL_0022: ldloc.0 - IL_0023: ret + IL_0024: ldloc.0 + IL_0025: ret } // end of method EqualsMicroPerfAndCodeGenerationTests::f4_tuple4 } // end of class EqualsMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Equals03.il.bsl index 92858f58607..5589a2a8e9b 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: {619833D0-0759-3313-A745-0383D0339861} +// MVID: {61F0294F-0759-3313-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05790000 +// Image base: 0x069D0000 // =============== 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 64 (0x40) + // Code size 66 (0x42) .maxstack 4 .locals init ([0] bool x, [1] int32 i) @@ -70,46 +70,50 @@ .line 5,5 : 8,29 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Equals03.fsx' IL_0000: ldc.i4.0 IL_0001: stloc.0 + .line 6,6 : 8,32 '' + IL_0002: nop + .line 7,7 : 8,32 '' + IL_0003: nop .line 8,8 : 8,11 '' - IL_0002: ldc.i4.0 - IL_0003: stloc.1 - IL_0004: br.s IL_0036 + IL_0004: ldc.i4.0 + IL_0005: stloc.1 + IL_0006: br.s IL_0038 .line 9,9 : 12,26 '' - IL_0006: nop + IL_0008: nop .line 16707566,16707566 : 0,0 '' - IL_0007: ldstr "5" - IL_000c: ldstr "5" - IL_0011: call bool [netstandard]System.String::Equals(string, + IL_0009: ldstr "5" + IL_000e: ldstr "5" + IL_0013: call bool [netstandard]System.String::Equals(string, string) - IL_0016: brfalse.s IL_002f + IL_0018: brfalse.s IL_0031 .line 16707566,16707566 : 0,0 '' - IL_0018: ldc.r8 6. - IL_0021: ldc.r8 7. - IL_002a: ceq + IL_001a: ldc.r8 6. + IL_0023: ldc.r8 7. + IL_002c: ceq .line 16707566,16707566 : 0,0 '' - IL_002c: nop - IL_002d: br.s IL_0031 + IL_002e: nop + IL_002f: br.s IL_0033 .line 16707566,16707566 : 0,0 '' - IL_002f: ldc.i4.0 + IL_0031: ldc.i4.0 .line 16707566,16707566 : 0,0 '' - IL_0030: nop + IL_0032: nop .line 16707566,16707566 : 0,0 '' - IL_0031: stloc.0 - IL_0032: ldloc.1 - IL_0033: ldc.i4.1 - IL_0034: add - IL_0035: stloc.1 + IL_0033: stloc.0 + IL_0034: ldloc.1 + IL_0035: ldc.i4.1 + IL_0036: add + IL_0037: stloc.1 .line 8,8 : 18,20 '' - IL_0036: ldloc.1 - IL_0037: ldc.i4 0x989681 - IL_003c: blt.s IL_0006 + IL_0038: ldloc.1 + IL_0039: ldc.i4 0x989681 + IL_003e: blt.s IL_0008 .line 10,10 : 8,9 '' - IL_003e: ldloc.0 - IL_003f: ret + IL_0040: ldloc.0 + IL_0041: ret } // end of method EqualsMicroPerfAndCodeGenerationTests::f4_tuple5 } // end of class EqualsMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash02.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash02.il.bsl index 15aeb3de27a..5358b8c71df 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash02.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash02.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000220 Length: 0x0000010B } .module Hash02.dll -// MVID: {61E0712B-9642-796E-A745-03832B71E061} +// MVID: {61F0294F-9642-796E-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x071D0000 +// Image base: 0x06FB0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -57,9 +57,13 @@ .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 f4_triple() cil managed { - // Code size 1 (0x1) + // Code size 2 (0x2) .maxstack 8 - IL_0000: ret + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash02.fsx' + IL_0000: nop + .line 6,6 : 8,24 '' + IL_0001: ret } // end of method HashMicroPerfAndCodeGenerationTests::f4_triple } // end of class HashMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash03.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash03.il.bsl index 6b887484fe2..be6ca9ea874 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash03.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash03.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x00000220 Length: 0x000000B0 } .module Hash03.dll -// MVID: {619833D0-9642-788D-A745-0383D0339861} +// MVID: {61F0294F-9642-788D-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05400000 +// Image base: 0x050A0000 // =============== 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 void f4_tuple4() cil managed { - // Code size 39 (0x27) + // Code size 40 (0x28) .maxstack 5 .locals init ([0] int32 x, [1] int32 i) @@ -70,29 +70,31 @@ .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash03.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 + .line 6,6 : 8,28 '' + IL_0002: nop .line 7,7 : 8,11 '' - IL_0002: ldc.i4.0 - IL_0003: stloc.1 - IL_0004: br.s IL_001e + IL_0003: ldc.i4.0 + IL_0004: stloc.1 + IL_0005: br.s IL_001f .line 8,8 : 12,24 '' - IL_0006: ldc.i4 0x483 - IL_000b: ldc.i4.s 99 - IL_000d: ldstr "5" - IL_0012: callvirt instance int32 [netstandard]System.Object::GetHashCode() - IL_0017: xor + IL_0007: ldc.i4 0x483 + IL_000c: ldc.i4.s 99 + IL_000e: ldstr "5" + IL_0013: callvirt instance int32 [netstandard]System.Object::GetHashCode() IL_0018: xor - IL_0019: stloc.0 - IL_001a: ldloc.1 - IL_001b: ldc.i4.1 - IL_001c: add - IL_001d: stloc.1 + IL_0019: xor + IL_001a: stloc.0 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.1 .line 7,7 : 18,20 '' - IL_001e: ldloc.1 - IL_001f: ldc.i4 0x989681 - IL_0024: blt.s IL_0006 + IL_001f: ldloc.1 + IL_0020: ldc.i4 0x989681 + IL_0025: blt.s IL_0007 - IL_0026: ret + IL_0027: ret } // end of method HashMicroPerfAndCodeGenerationTests::f4_tuple4 } // end of class HashMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash04.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash04.il.bsl index d2b8f447e49..baba11c8087 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash04.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash04.il.bsl @@ -41,13 +41,13 @@ // Offset: 0x00000220 Length: 0x000000B0 } .module Hash04.dll -// MVID: {619833D0-9642-7838-A745-0383D0339861} +// MVID: {61F0294F-9642-7838-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05390000 +// Image base: 0x05200000 // =============== 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 void f4_tuple5() cil managed { - // Code size 39 (0x27) + // Code size 40 (0x28) .maxstack 5 .locals init ([0] int32 x, [1] int32 i) @@ -70,29 +70,31 @@ .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash04.fsx' IL_0000: ldc.i4.1 IL_0001: stloc.0 + .line 6,6 : 8,28 '' + IL_0002: nop .line 7,7 : 8,11 '' - IL_0002: ldc.i4.0 - IL_0003: stloc.1 - IL_0004: br.s IL_001e + IL_0003: ldc.i4.0 + IL_0004: stloc.1 + IL_0005: br.s IL_001f .line 8,8 : 12,24 '' - IL_0006: ldc.i4 0x483 - IL_000b: ldc.i4.s 99 - IL_000d: ldstr "5" - IL_0012: callvirt instance int32 [netstandard]System.Object::GetHashCode() - IL_0017: xor + IL_0007: ldc.i4 0x483 + IL_000c: ldc.i4.s 99 + IL_000e: ldstr "5" + IL_0013: callvirt instance int32 [netstandard]System.Object::GetHashCode() IL_0018: xor - IL_0019: stloc.0 - IL_001a: ldloc.1 - IL_001b: ldc.i4.1 - IL_001c: add - IL_001d: stloc.1 + IL_0019: xor + IL_001a: stloc.0 + IL_001b: ldloc.1 + IL_001c: ldc.i4.1 + IL_001d: add + IL_001e: stloc.1 .line 7,7 : 18,20 '' - IL_001e: ldloc.1 - IL_001f: ldc.i4 0x989681 - IL_0024: blt.s IL_0006 + IL_001f: ldloc.1 + IL_0020: ldc.i4 0x989681 + IL_0025: blt.s IL_0007 - IL_0026: ret + IL_0027: ret } // end of method HashMicroPerfAndCodeGenerationTests::f4_tuple5 } // end of class HashMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash05.il.bsl index 0734ff15608..83743703bab 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: {61E0712B-9642-7857-A745-03832B71E061} +// MVID: {61F0294F-9642-7857-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A00000 +// Image base: 0x06A20000 // =============== CLASS MEMBERS DECLARATION =================== @@ -681,33 +681,35 @@ .method public static void f5() cil managed { - // Code size 35 (0x23) + // Code size 36 (0x24) .maxstack 4 .locals init ([0] int32 i, [1] int32 V_1) + .line 7,7 : 8,25 '' + IL_0000: nop .line 8,8 : 8,11 '' - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: br.s IL_001a + IL_0001: ldc.i4.0 + IL_0002: stloc.0 + IL_0003: br.s IL_001b .line 9,9 : 12,37 '' - IL_0004: ldc.i4.1 - IL_0005: ldc.i4.2 - IL_0006: call class Hash05/HashMicroPerfAndCodeGenerationTests/Key Hash05/HashMicroPerfAndCodeGenerationTests/Key::NewKey(int32, + IL_0005: ldc.i4.1 + IL_0006: ldc.i4.2 + IL_0007: call class Hash05/HashMicroPerfAndCodeGenerationTests/Key Hash05/HashMicroPerfAndCodeGenerationTests/Key::NewKey(int32, int32) - IL_000b: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityERComparer() - IL_0010: callvirt instance int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0015: stloc.1 - IL_0016: ldloc.0 - IL_0017: ldc.i4.1 - IL_0018: add - IL_0019: stloc.0 + IL_000c: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityERComparer() + IL_0011: callvirt instance int32 Hash05/HashMicroPerfAndCodeGenerationTests/Key::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_0016: stloc.1 + IL_0017: ldloc.0 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.0 .line 8,8 : 18,20 '' - IL_001a: ldloc.0 - IL_001b: ldc.i4 0x989681 - IL_0020: blt.s IL_0004 + IL_001b: ldloc.0 + IL_001c: ldc.i4 0x989681 + IL_0021: blt.s IL_0005 - IL_0022: ret + IL_0023: ret } // end of method HashMicroPerfAndCodeGenerationTests::f5 } // end of class HashMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash06.il.bsl index 04dde3f372e..123b3da4dc0 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: {61E0712B-9642-78F2-A745-03832B71E061} +// MVID: {61F0294F-9642-78F2-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06D20000 +// Image base: 0x06B50000 // =============== CLASS MEMBERS DECLARATION =================== @@ -681,32 +681,34 @@ .method public static void f5a() cil managed { - // Code size 30 (0x1e) + // Code size 31 (0x1f) .maxstack 4 .locals init ([0] int32 i, [1] int32 V_1) + .line 6,6 : 8,25 '' + IL_0000: nop .line 7,7 : 8,11 '' - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: br.s IL_0015 + IL_0001: ldc.i4.0 + IL_0002: stloc.0 + IL_0003: br.s IL_0016 .line 8,8 : 12,46 '' - IL_0004: ldc.i4.1 - IL_0005: ldc.i4.2 - IL_0006: call class Hash06/HashMicroPerfAndCodeGenerationTests/Key Hash06/HashMicroPerfAndCodeGenerationTests/Key::NewKey(int32, + IL_0005: ldc.i4.1 + IL_0006: ldc.i4.2 + IL_0007: call class Hash06/HashMicroPerfAndCodeGenerationTests/Key Hash06/HashMicroPerfAndCodeGenerationTests/Key::NewKey(int32, int32) - IL_000b: callvirt instance int32 [mscorlib]System.Object::GetHashCode() - IL_0010: stloc.1 - IL_0011: ldloc.0 - IL_0012: ldc.i4.1 - IL_0013: add - IL_0014: stloc.0 + IL_000c: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_0011: stloc.1 + IL_0012: ldloc.0 + IL_0013: ldc.i4.1 + IL_0014: add + IL_0015: stloc.0 .line 7,7 : 18,20 '' - IL_0015: ldloc.0 - IL_0016: ldc.i4 0x989681 - IL_001b: blt.s IL_0004 + IL_0016: ldloc.0 + IL_0017: ldc.i4 0x989681 + IL_001c: blt.s IL_0005 - IL_001d: ret + IL_001e: ret } // end of method HashMicroPerfAndCodeGenerationTests::f5a } // end of class HashMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash08.il.bsl index 378545f8882..367e8b2108b 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: {61E0712B-9642-77BC-A745-03832B71E061} +// MVID: {61F0294F-9642-77BC-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06FA0000 +// Image base: 0x073F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -566,33 +566,35 @@ .method public static void f5c() cil managed { - // Code size 35 (0x23) + // Code size 36 (0x24) .maxstack 4 .locals init ([0] int32 i, [1] int32 V_1) + .line 6,6 : 8,25 '' + IL_0000: nop .line 7,7 : 8,11 '' - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: br.s IL_001a + IL_0001: ldc.i4.0 + IL_0002: stloc.0 + IL_0003: br.s IL_001b .line 8,8 : 12,49 '' - IL_0004: ldc.i4.1 - IL_0005: ldc.i4.2 - IL_0006: newobj instance void Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, + IL_0005: ldc.i4.1 + IL_0006: ldc.i4.2 + IL_0007: newobj instance void Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::.ctor(int32, int32) - IL_000b: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityERComparer() - IL_0010: callvirt instance int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0015: stloc.1 - IL_0016: ldloc.0 - IL_0017: ldc.i4.1 - IL_0018: add - IL_0019: stloc.0 + IL_000c: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityERComparer() + IL_0011: callvirt instance int32 Hash08/HashMicroPerfAndCodeGenerationTests/KeyR::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_0016: stloc.1 + IL_0017: ldloc.0 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.0 .line 7,7 : 18,20 '' - IL_001a: ldloc.0 - IL_001b: ldc.i4 0x989681 - IL_0020: blt.s IL_0004 + IL_001b: ldloc.0 + IL_001c: ldc.i4 0x989681 + IL_0021: blt.s IL_0005 - IL_0022: ret + IL_0023: ret } // end of method HashMicroPerfAndCodeGenerationTests::f5c } // end of class HashMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash09.il.bsl index 0ec932e83b8..c30b1196014 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: {61E0712B-9642-77DB-A745-03832B71E061} +// MVID: {61F0294F-9642-77DB-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07130000 +// Image base: 0x069F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -690,33 +690,35 @@ .method public static void f6() cil managed { - // Code size 35 (0x23) + // Code size 36 (0x24) .maxstack 4 .locals init ([0] int32 i, [1] int32 V_1) + .line 6,6 : 8,25 '' + IL_0000: nop .line 7,7 : 8,11 '' - IL_0000: ldc.i4.0 - IL_0001: stloc.0 - IL_0002: br.s IL_001a + IL_0001: ldc.i4.0 + IL_0002: stloc.0 + IL_0003: br.s IL_001b .line 8,8 : 12,44 '' - IL_0004: ldc.i4.1 - IL_0005: ldc.i4.2 - IL_0006: call class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::NewGenericKey(!0, + IL_0005: ldc.i4.1 + IL_0006: ldc.i4.2 + IL_0007: call class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::NewGenericKey(!0, !0) - IL_000b: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityERComparer() - IL_0010: callvirt instance int32 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_0015: stloc.1 - IL_0016: ldloc.0 - IL_0017: ldc.i4.1 - IL_0018: add - IL_0019: stloc.0 + IL_000c: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityERComparer() + IL_0011: callvirt instance int32 class Hash09/HashMicroPerfAndCodeGenerationTests/GenericKey`1::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_0016: stloc.1 + IL_0017: ldloc.0 + IL_0018: ldc.i4.1 + IL_0019: add + IL_001a: stloc.0 .line 7,7 : 18,20 '' - IL_001a: ldloc.0 - IL_001b: ldc.i4 0x989681 - IL_0020: blt.s IL_0004 + IL_001b: ldloc.0 + IL_001c: ldc.i4 0x989681 + IL_0021: blt.s IL_0005 - IL_0022: ret + IL_0023: ret } // end of method HashMicroPerfAndCodeGenerationTests::f6 } // end of class HashMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash10.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash10.il.bsl index be4ef0dafc1..ff47ad15f0f 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash10.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash10.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000220 Length: 0x000000A9 } .module Hash10.dll -// MVID: {619833D0-9661-78B4-A745-0383D0339861} +// MVID: {61F0294F-9661-78B4-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x069E0000 +// Image base: 0x06FD0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -57,41 +57,43 @@ .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 f7() cil managed { - // Code size 44 (0x2c) + // Code size 45 (0x2d) .maxstack 5 .locals init ([0] uint8[] arr, [1] int32 i, [2] int32 V_2) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 8,36 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash10.fsx' - IL_0000: ldc.i4.0 - IL_0001: ldc.i4.1 - IL_0002: ldc.i4.s 100 - IL_0004: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeByte(uint8, + .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash10.fsx' + IL_0000: nop + .line 6,6 : 8,36 '' + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.1 + IL_0003: ldc.i4.s 100 + IL_0005: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeByte(uint8, uint8, uint8) - IL_0009: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0013: stloc.0 + IL_000a: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_000f: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0014: stloc.0 .line 7,7 : 8,11 '' - IL_0014: ldc.i4.0 - IL_0015: stloc.1 - IL_0016: br.s IL_0023 + IL_0015: ldc.i4.0 + IL_0016: stloc.1 + IL_0017: br.s IL_0024 .line 8,8 : 12,30 '' - IL_0018: ldloc.0 - IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashIntrinsic(!!0) - IL_001e: stloc.2 - IL_001f: ldloc.1 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.1 + IL_0019: ldloc.0 + IL_001a: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashIntrinsic(!!0) + IL_001f: stloc.2 + IL_0020: ldloc.1 + IL_0021: ldc.i4.1 + IL_0022: add + IL_0023: stloc.1 .line 7,7 : 18,20 '' - IL_0023: ldloc.1 - IL_0024: ldc.i4 0x989681 - IL_0029: blt.s IL_0018 + IL_0024: ldloc.1 + IL_0025: ldc.i4 0x989681 + IL_002a: blt.s IL_0019 - IL_002b: ret + IL_002c: ret } // end of method HashMicroPerfAndCodeGenerationTests::f7 } // end of class HashMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash11.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash11.il.bsl index a2e58759c45..dc8c4dd1ec8 100644 --- a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash11.il.bsl +++ b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash11.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000220 Length: 0x000000A9 } .module Hash11.dll -// MVID: {619833D0-9661-78D3-A745-0383D0339861} +// MVID: {61F0294F-9661-78D3-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05A40000 +// Image base: 0x06870000 // =============== CLASS MEMBERS DECLARATION =================== @@ -57,41 +57,43 @@ .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 f8() cil managed { - // Code size 44 (0x2c) + // Code size 45 (0x2d) .maxstack 5 .locals init ([0] int32[] arr, [1] int32 i, [2] int32 V_2) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 6,6 : 8,32 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash11.fsx' - IL_0000: ldc.i4.0 - IL_0001: ldc.i4.1 - IL_0002: ldc.i4.s 100 - IL_0004: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, + .line 5,5 : 8,25 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\Optimizations\\GenericComparison\\Hash11.fsx' + IL_0000: nop + .line 6,6 : 8,32 '' + IL_0001: ldc.i4.0 + IL_0002: ldc.i4.1 + IL_0003: ldc.i4.s 100 + IL_0005: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, int32, int32) - IL_0009: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_000e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0013: stloc.0 + IL_000a: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_000f: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0014: stloc.0 .line 7,7 : 8,11 '' - IL_0014: ldc.i4.0 - IL_0015: stloc.1 - IL_0016: br.s IL_0023 + IL_0015: ldc.i4.0 + IL_0016: stloc.1 + IL_0017: br.s IL_0024 .line 8,8 : 12,30 '' - IL_0018: ldloc.0 - IL_0019: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashIntrinsic(!!0) - IL_001e: stloc.2 - IL_001f: ldloc.1 - IL_0020: ldc.i4.1 - IL_0021: add - IL_0022: stloc.1 + IL_0019: ldloc.0 + IL_001a: call int32 [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/HashCompare::GenericHashIntrinsic(!!0) + IL_001f: stloc.2 + IL_0020: ldloc.1 + IL_0021: ldc.i4.1 + IL_0022: add + IL_0023: stloc.1 .line 7,7 : 18,20 '' - IL_0023: ldloc.1 - IL_0024: ldc.i4 0x989681 - IL_0029: blt.s IL_0018 + IL_0024: ldloc.1 + IL_0025: ldc.i4 0x989681 + IL_002a: blt.s IL_0019 - IL_002b: ret + IL_002c: ret } // end of method HashMicroPerfAndCodeGenerationTests::f8 } // end of class HashMicroPerfAndCodeGenerationTests diff --git a/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.il.bsl b/tests/fsharpqa/Source/Optimizations/GenericComparison/Hash12.il.bsl index 60c760d10d4..074c977668d 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: {61E0712B-9661-796E-A745-03832B71E061} +// MVID: {61F0294F-9661-796E-A745-03834F29F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x066C0000 +// Image base: 0x07540000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1402,49 +1402,51 @@ .method public static void f9() cil managed { - // Code size 61 (0x3d) + // Code size 62 (0x3e) .maxstack 6 .locals init ([0] class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys key, [1] int32 i, [2] int32 V_2) + .line 7,7 : 8,25 '' + IL_0000: nop .line 8,8 : 8,64 '' - IL_0000: ldc.i4.1 - IL_0001: ldc.i4.2 - IL_0002: call class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/Key::NewKey(int32, + IL_0001: ldc.i4.1 + IL_0002: ldc.i4.2 + IL_0003: call class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/Key::NewKey(int32, int32) - IL_0007: ldc.i4.1 - IL_0008: ldc.i4.2 - IL_0009: call class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/Key::NewKey(int32, + IL_0008: ldc.i4.1 + IL_0009: ldc.i4.2 + IL_000a: call class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/Key::NewKey(int32, int32) - IL_000e: ldc.i4.1 - IL_000f: ldc.i4.2 - IL_0010: call class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/Key::NewKey(int32, + IL_000f: ldc.i4.1 + IL_0010: ldc.i4.2 + IL_0011: call class Hash12/HashMicroPerfAndCodeGenerationTests/Key Hash12/HashMicroPerfAndCodeGenerationTests/Key::NewKey(int32, int32) - IL_0015: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + IL_0016: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, !1) - IL_001a: call class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::NewKeyWithInnerKeys(class Hash12/HashMicroPerfAndCodeGenerationTests/Key, + IL_001b: call class Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::NewKeyWithInnerKeys(class Hash12/HashMicroPerfAndCodeGenerationTests/Key, class [mscorlib]System.Tuple`2) - IL_001f: stloc.0 + IL_0020: stloc.0 .line 9,9 : 8,11 '' - IL_0020: ldc.i4.0 - IL_0021: stloc.1 - IL_0022: br.s IL_0034 + IL_0021: ldc.i4.0 + IL_0022: stloc.1 + IL_0023: br.s IL_0035 .line 10,10 : 12,30 '' - IL_0024: ldloc.0 - IL_0025: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityERComparer() - IL_002a: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) - IL_002f: stloc.2 - IL_0030: ldloc.1 - IL_0031: ldc.i4.1 - IL_0032: add - IL_0033: stloc.1 + IL_0025: ldloc.0 + IL_0026: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityERComparer() + IL_002b: callvirt instance int32 Hash12/HashMicroPerfAndCodeGenerationTests/KeyWithInnerKeys::GetHashCode(class [mscorlib]System.Collections.IEqualityComparer) + IL_0030: stloc.2 + IL_0031: ldloc.1 + IL_0032: ldc.i4.1 + IL_0033: add + IL_0034: stloc.1 .line 9,9 : 18,20 '' - IL_0034: ldloc.1 - IL_0035: ldc.i4 0x989681 - IL_003a: blt.s IL_0024 + IL_0035: ldloc.1 + IL_0036: ldc.i4 0x989681 + IL_003b: blt.s IL_0025 - IL_003c: ret + IL_003d: ret } // end of method HashMicroPerfAndCodeGenerationTests::f9 } // end of class HashMicroPerfAndCodeGenerationTests From 59d8a0e6c3f084d6fd5f5803201061f8eb6a425a Mon Sep 17 00:00:00 2001 From: Don Syme Date: Tue, 25 Jan 2022 17:13:11 +0000 Subject: [PATCH 04/35] fix build --- src/fsharp/Optimizer.fs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/fsharp/Optimizer.fs b/src/fsharp/Optimizer.fs index fba59c14717..54663a94a14 100644 --- a/src/fsharp/Optimizer.fs +++ b/src/fsharp/Optimizer.fs @@ -1818,9 +1818,8 @@ let rec ExpandStructuralBinding cenv expr = CanExpandStructuralBinding v -> let argTy = destOptionTy cenv.g v.Type let vi, vie = MakeStructuralBindingTempVal v 0 arg argTy - let bind = mkBind tgtSeqPtOpt vi arg let newExpr = mkSome cenv.g argTy vie m - mkLetBind m bind (mkLet DebugPointAtBinding.NoneAtLet m vi newExpr body) + mkLet tgtSeqPtOpt m vi arg (mkLet DebugPointAtBinding.NoneAtLet m v newExpr body) | e -> ExpandStructuralBindingRaw cenv e From 190d2a580b20dac220bf14140c4c0584e7f16eea Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 27 Jan 2022 13:02:00 +0000 Subject: [PATCH 05/35] update tests --- .../CodeGen/EmittedIL/TaskGeneratedCode.fs | 1089 +++++++++-------- .../EmittedIL/Tuples/OptionalArg01.il.bsl | 128 +- 2 files changed, 627 insertions(+), 590 deletions(-) diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs index e80e68891ef..4c93cd92625 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs @@ -375,101 +375,111 @@ let testTask() = task { try 1+1 finally System.Console.WriteLine("finally") } """ (fun verifier -> verifier.VerifyIL [ """ - .method public strict virtual instance void - MoveNext() cil managed +.method public strict virtual instance void + MoveNext() cil managed +{ + .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + bool V_2, + bool V_3, + bool V_4, + class [runtime]System.Exception V_5) + IL_0000: ldarg.0 + IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint + IL_0006: stloc.0 + .try + { + IL_0007: ldc.i4.0 + IL_0008: stloc.3 + IL_0009: ldloc.3 + IL_000a: brfalse.s IL_0010 + + IL_000c: ldc.i4.1 + IL_000d: nop + IL_000e: br.s IL_0012 + + IL_0010: ldloc.3 + IL_0011: nop + IL_0012: stloc.3 + .try { - .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext - - .maxstack 4 - .locals init (int32 V_0, - class [runtime]System.Exception V_1, - bool V_2, - bool V_3, - bool V_4, - class [runtime]System.Exception V_5) - IL_0000: ldarg.0 - IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint - IL_0006: stloc.0 - .try - { - IL_0007: ldc.i4.0 - IL_0008: stloc.3 - .try - { - IL_0009: ldc.i4.1 - IL_000a: stloc.s V_4 - IL_000c: ldloc.s V_4 - IL_000e: stloc.3 - IL_000f: leave.s IL_0030 - - } - catch [runtime]System.Object - { - IL_0011: castclass [runtime]System.Exception - IL_0016: stloc.s V_5 - IL_0018: ldstr "finally" - IL_001d: call void [runtime]System.Console::WriteLine(string) - IL_0022: ldc.i4.1 - IL_0023: stloc.s V_4 - IL_0025: rethrow - IL_0027: ldnull - IL_0028: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_002d: pop - IL_002e: leave.s IL_0030 - - } - IL_0030: ldloc.3 - IL_0031: brfalse.s IL_0043 - - IL_0033: ldstr "finally" - IL_0038: call void [runtime]System.Console::WriteLine(string) - IL_003d: ldc.i4.1 - IL_003e: stloc.s V_4 - IL_0040: nop - IL_0041: br.s IL_0044 - - IL_0043: nop - IL_0044: ldloc.3 - IL_0045: stloc.2 - IL_0046: ldloc.2 - IL_0047: brfalse.s IL_0066 - - IL_0049: ldarg.0 - IL_004a: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_004f: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0054: ldarg.0 - IL_0055: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_005a: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result - IL_005f: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) - IL_0064: leave.s IL_0074 - - IL_0066: leave.s IL_0074 - - } - catch [runtime]System.Object - { - IL_0068: castclass [runtime]System.Exception - IL_006d: stloc.s V_5 - IL_006f: ldloc.s V_5 - IL_0071: stloc.1 - IL_0072: leave.s IL_0074 - - } - IL_0074: ldloc.1 - IL_0075: stloc.s V_5 - IL_0077: ldloc.s V_5 - IL_0079: brtrue.s IL_007c - - IL_007b: ret - - IL_007c: ldarg.0 - IL_007d: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0082: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0087: ldloc.s V_5 - IL_0089: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) - IL_008e: ret - } - + IL_0013: nop + IL_0014: ldc.i4.1 + IL_0015: stloc.s V_4 + IL_0017: ldloc.s V_4 + IL_0019: stloc.3 + IL_001a: leave.s IL_003b + + } + catch [runtime]System.Object + { + IL_001c: castclass [runtime]System.Exception + IL_0021: stloc.s V_5 + IL_0023: ldstr "finally" + IL_0028: call void [runtime]System.Console::WriteLine(string) + IL_002d: ldc.i4.1 + IL_002e: stloc.s V_4 + IL_0030: rethrow + IL_0032: ldnull + IL_0033: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0038: pop + IL_0039: leave.s IL_003b + + } + IL_003b: ldloc.3 + IL_003c: brfalse.s IL_004e + + IL_003e: ldstr "finally" + IL_0043: call void [runtime]System.Console::WriteLine(string) + IL_0048: ldc.i4.1 + IL_0049: stloc.s V_4 + IL_004b: nop + IL_004c: br.s IL_004f + + IL_004e: nop + IL_004f: ldloc.3 + IL_0050: stloc.2 + IL_0051: ldloc.2 + IL_0052: brfalse.s IL_0071 + + IL_0054: ldarg.0 + IL_0055: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_005a: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_005f: ldarg.0 + IL_0060: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0065: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result + IL_006a: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_006f: leave.s IL_007f + + IL_0071: leave.s IL_007f + + } + catch [runtime]System.Object + { + IL_0073: castclass [runtime]System.Exception + IL_0078: stloc.s V_5 + IL_007a: ldloc.s V_5 + IL_007c: stloc.1 + IL_007d: leave.s IL_007f + + } + IL_007f: ldloc.1 + IL_0080: stloc.s V_5 + IL_0082: ldloc.s V_5 + IL_0084: brtrue.s IL_0087 + + IL_0086: ret + + IL_0087: ldarg.0 + IL_0088: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_008d: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0092: ldloc.s V_5 + IL_0094: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) + IL_0099: ret +} """ ]) @@ -484,107 +494,115 @@ let testTask() = task { try 1+1 finally System.Console.WriteLine("finally") } """ (fun verifier -> verifier.VerifyIL [ """ - .method public strict virtual instance void - MoveNext() cil managed +.method public strict virtual instance void + MoveNext() cil managed +{ + .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + bool V_2, + bool V_3, + bool V_4, + class [runtime]System.Exception V_5, + bool V_6, + bool V_7, + class [runtime]System.Exception V_8, + class [runtime]System.Exception V_9) + IL_0000: ldarg.0 + IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint + IL_0006: stloc.0 + .try + { + IL_0007: ldc.i4.0 + IL_0008: stloc.3 + IL_0009: ldloc.3 + IL_000a: brfalse.s IL_0010 + + IL_000c: ldc.i4.1 + IL_000d: nop + IL_000e: br.s IL_0012 + + IL_0010: ldloc.3 + IL_0011: nop + IL_0012: stloc.3 + .try { - .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext - - .maxstack 4 - .locals init (int32 V_0, - class [runtime]System.Exception V_1, - bool V_2, - bool V_3, - bool V_4, - class [runtime]System.Exception V_5, - bool V_6, - bool V_7, - class [runtime]System.Exception V_8, - class [runtime]System.Exception V_9) - IL_0000: ldarg.0 - IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint - IL_0006: stloc.0 - .try - { - IL_0007: ldc.i4.0 - IL_0008: stloc.3 - .try - { - IL_0009: nop - IL_000a: ldc.i4.1 - IL_000b: stloc.s V_4 - IL_000d: ldloc.s V_4 - IL_000f: stloc.3 - IL_0010: leave.s IL_0032 - - } - catch [runtime]System.Object - { - IL_0012: castclass [runtime]System.Exception - IL_0017: stloc.s V_5 - IL_0019: nop - IL_001a: ldstr "finally" - IL_001f: call void [runtime]System.Console::WriteLine(string) - IL_0024: ldc.i4.1 - IL_0025: stloc.s V_6 - IL_0027: rethrow - IL_0029: ldnull - IL_002a: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_002f: pop - IL_0030: leave.s IL_0032 - - } - IL_0032: ldloc.3 - IL_0033: brfalse.s IL_0046 - - IL_0035: nop - IL_0036: ldstr "finally" - IL_003b: call void [runtime]System.Console::WriteLine(string) - IL_0040: ldc.i4.1 - IL_0041: stloc.s V_7 - IL_0043: nop - IL_0044: br.s IL_0047 - - IL_0046: nop - IL_0047: ldloc.3 - IL_0048: stloc.2 - IL_0049: ldloc.2 - IL_004a: brfalse.s IL_0069 - - IL_004c: ldarg.0 - IL_004d: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0052: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0057: ldarg.0 - IL_0058: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_005d: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result - IL_0062: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) - IL_0067: leave.s IL_0077 - - IL_0069: leave.s IL_0077 - - } - catch [runtime]System.Object - { - IL_006b: castclass [runtime]System.Exception - IL_0070: stloc.s V_8 - IL_0072: ldloc.s V_8 - IL_0074: stloc.1 - IL_0075: leave.s IL_0077 - - } - IL_0077: ldloc.1 - IL_0078: stloc.s V_9 - IL_007a: ldloc.s V_9 - IL_007c: brtrue.s IL_007f - - IL_007e: ret - - IL_007f: ldarg.0 - IL_0080: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0085: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_008a: ldloc.s V_9 - IL_008c: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) - IL_0091: ret - } + IL_0013: nop + IL_0014: ldc.i4.1 + IL_0015: stloc.s V_4 + IL_0017: ldloc.s V_4 + IL_0019: stloc.3 + IL_001a: leave.s IL_003b + + } + catch [runtime]System.Object + { + IL_001c: castclass [runtime]System.Exception + IL_0021: stloc.s V_5 + IL_0023: ldstr "finally" + IL_0028: call void [runtime]System.Console::WriteLine(string) + IL_002d: ldc.i4.1 + IL_002e: stloc.s V_6 + IL_0030: rethrow + IL_0032: ldnull + IL_0033: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_0038: pop + IL_0039: leave.s IL_003b + + } + IL_003b: ldloc.3 + IL_003c: brfalse.s IL_004e + + IL_003e: ldstr "finally" + IL_0043: call void [runtime]System.Console::WriteLine(string) + IL_0048: ldc.i4.1 + IL_0049: stloc.s V_7 + IL_004b: nop + IL_004c: br.s IL_004f + + IL_004e: nop + IL_004f: ldloc.3 + IL_0050: stloc.2 + IL_0051: ldloc.2 + IL_0052: brfalse.s IL_0071 + + IL_0054: ldarg.0 + IL_0055: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_005a: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_005f: ldarg.0 + IL_0060: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0065: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result + IL_006a: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_006f: leave.s IL_007f + + IL_0071: leave.s IL_007f + + } + catch [runtime]System.Object + { + IL_0073: castclass [runtime]System.Exception + IL_0078: stloc.s V_8 + IL_007a: ldloc.s V_8 + IL_007c: stloc.1 + IL_007d: leave.s IL_007f + + } + IL_007f: ldloc.1 + IL_0080: stloc.s V_9 + IL_0082: ldloc.s V_9 + IL_0084: brtrue.s IL_0087 + + IL_0086: ret + + IL_0087: ldarg.0 + IL_0088: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_008d: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0092: ldloc.s V_9 + IL_0094: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) + IL_0099: ret +} """ ]) @@ -646,56 +664,57 @@ let testTask() = task { try 1 with e -> System.Console.WriteLine("finally"); 2 } } IL_0027: ldloc.s V_4 - IL_0029: brfalse.s IL_003d + IL_0029: brfalse.s IL_003e IL_002b: ldloc.s V_5 IL_002d: stloc.s V_7 - IL_002f: ldstr "finally" - IL_0034: call void [runtime]System.Console::WriteLine(string) - IL_0039: ldc.i4.1 - IL_003a: nop - IL_003b: br.s IL_003f - - IL_003d: ldloc.3 - IL_003e: nop - IL_003f: stloc.2 - IL_0040: ldloc.2 - IL_0041: brfalse.s IL_0060 + IL_002f: nop + IL_0030: ldstr "finally" + IL_0035: call void [runtime]System.Console::WriteLine(string) + IL_003a: ldc.i4.1 + IL_003b: nop + IL_003c: br.s IL_0040 + + IL_003e: ldloc.3 + IL_003f: nop + IL_0040: stloc.2 + IL_0041: ldloc.2 + IL_0042: brfalse.s IL_0061 - IL_0043: ldarg.0 - IL_0044: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0049: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_004e: ldarg.0 - IL_004f: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0054: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result - IL_0059: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) - IL_005e: leave.s IL_006e + IL_0044: ldarg.0 + IL_0045: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_004a: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_004f: ldarg.0 + IL_0050: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0055: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result + IL_005a: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_005f: leave.s IL_006f - IL_0060: leave.s IL_006e + IL_0061: leave.s IL_006f } catch [runtime]System.Object { - IL_0062: castclass [runtime]System.Exception - IL_0067: stloc.s V_5 - IL_0069: ldloc.s V_5 - IL_006b: stloc.1 - IL_006c: leave.s IL_006e + IL_0063: castclass [runtime]System.Exception + IL_0068: stloc.s V_5 + IL_006a: ldloc.s V_5 + IL_006c: stloc.1 + IL_006d: leave.s IL_006f } - IL_006e: ldloc.1 - IL_006f: stloc.s V_5 - IL_0071: ldloc.s V_5 - IL_0073: brtrue.s IL_0076 - - IL_0075: ret - - IL_0076: ldarg.0 - IL_0077: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_007c: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0081: ldloc.s V_5 - IL_0083: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) - IL_0088: ret + IL_006f: ldloc.1 + IL_0070: stloc.s V_5 + IL_0072: ldloc.s V_5 + IL_0074: brtrue.s IL_0077 + + IL_0076: ret + + IL_0077: ldarg.0 + IL_0078: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_007d: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0082: ldloc.s V_5 + IL_0084: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) + IL_0089: ret } """ ]) @@ -711,110 +730,120 @@ let testTask() = task { try 1 with e -> System.Console.WriteLine("with"); 2 } """ (fun verifier -> verifier.VerifyIL [ """ - .method public strict virtual instance void - MoveNext() cil managed +.method public strict virtual instance void + MoveNext() cil managed +{ + .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + bool V_2, + bool V_3, + bool V_4, + class [runtime]System.Exception V_5, + bool V_6, + class [runtime]System.Exception V_7, + class [runtime]System.Exception V_8, + class [runtime]System.Exception V_9, + class [runtime]System.Exception V_10, + class [runtime]System.Exception V_11) + IL_0000: ldarg.0 + IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint + IL_0006: stloc.0 + .try + { + IL_0007: ldc.i4.0 + IL_0008: stloc.3 + IL_0009: ldc.i4.0 + IL_000a: stloc.s V_4 + IL_000c: ldnull + IL_000d: stloc.s V_5 + IL_000f: ldloc.3 + IL_0010: brfalse.s IL_0016 + + IL_0012: ldc.i4.1 + IL_0013: nop + IL_0014: br.s IL_0018 + + IL_0016: ldloc.3 + IL_0017: nop + IL_0018: stloc.3 + .try { - .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext - - .maxstack 4 - .locals init (int32 V_0, - class [runtime]System.Exception V_1, - bool V_2, - bool V_3, - bool V_4, - class [runtime]System.Exception V_5, - bool V_6, - class [runtime]System.Exception V_7, - class [runtime]System.Exception V_8, - class [runtime]System.Exception V_9, - class [runtime]System.Exception V_10, - class [runtime]System.Exception V_11) - IL_0000: ldarg.0 - IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint - IL_0006: stloc.0 - .try - { - IL_0007: ldc.i4.0 - IL_0008: stloc.3 - IL_0009: ldc.i4.0 - IL_000a: stloc.s V_4 - IL_000c: ldnull - IL_000d: stloc.s V_5 - .try - { - IL_000f: nop - IL_0010: ldc.i4.1 - IL_0011: stloc.s V_6 - IL_0013: ldloc.s V_6 - IL_0015: stloc.3 - IL_0016: leave.s IL_0028 - - } - catch [runtime]System.Object - { - IL_0018: castclass [runtime]System.Exception - IL_001d: stloc.s V_7 - IL_001f: ldc.i4.1 - IL_0020: stloc.s V_4 - IL_0022: ldloc.s V_7 - IL_0024: stloc.s V_5 - IL_0026: leave.s IL_0028 - - } - IL_0028: ldloc.s V_4 - IL_002a: brfalse.s IL_0042 - - IL_002c: ldloc.s V_5 - IL_002e: stloc.s V_8 - IL_0030: ldloc.s V_8 - IL_0032: stloc.s V_9 - IL_0034: ldstr "with" - IL_0039: call void [runtime]System.Console::WriteLine(string) - IL_003e: ldc.i4.1 - IL_003f: nop - IL_0040: br.s IL_0044 - - IL_0042: ldloc.3 - IL_0043: nop - IL_0044: stloc.2 - IL_0045: ldloc.2 - IL_0046: brfalse.s IL_0065 - - IL_0048: ldarg.0 - IL_0049: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_004e: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0053: ldarg.0 - IL_0054: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0059: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result - IL_005e: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) - IL_0063: leave.s IL_0073 - - IL_0065: leave.s IL_0073 - - } - catch [runtime]System.Object - { - IL_0067: castclass [runtime]System.Exception - IL_006c: stloc.s V_10 - IL_006e: ldloc.s V_10 - IL_0070: stloc.1 - IL_0071: leave.s IL_0073 - - } - IL_0073: ldloc.1 - IL_0074: stloc.s V_11 - IL_0076: ldloc.s V_11 - IL_0078: brtrue.s IL_007b - - IL_007a: ret - - IL_007b: ldarg.0 - IL_007c: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0081: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0086: ldloc.s V_11 - IL_0088: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) - IL_008d: ret - } + IL_0019: nop + IL_001a: ldc.i4.1 + IL_001b: stloc.s V_6 + IL_001d: ldloc.s V_6 + IL_001f: stloc.3 + IL_0020: leave.s IL_0032 + + } + catch [runtime]System.Object + { + IL_0022: castclass [runtime]System.Exception + IL_0027: stloc.s V_7 + IL_0029: ldc.i4.1 + IL_002a: stloc.s V_4 + IL_002c: ldloc.s V_7 + IL_002e: stloc.s V_5 + IL_0030: leave.s IL_0032 + + } + IL_0032: ldloc.s V_4 + IL_0034: brfalse.s IL_004c + + IL_0036: ldloc.s V_5 + IL_0038: stloc.s V_8 + IL_003a: ldloc.s V_8 + IL_003c: stloc.s V_9 + IL_003e: ldstr "with" + IL_0043: call void [runtime]System.Console::WriteLine(string) + IL_0048: ldc.i4.1 + IL_0049: nop + IL_004a: br.s IL_004e + + IL_004c: ldloc.3 + IL_004d: nop + IL_004e: stloc.2 + IL_004f: ldloc.2 + IL_0050: brfalse.s IL_006f + + IL_0052: ldarg.0 + IL_0053: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0058: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_005d: ldarg.0 + IL_005e: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0063: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result + IL_0068: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_006d: leave.s IL_007d + + IL_006f: leave.s IL_007d + + } + catch [runtime]System.Object + { + IL_0071: castclass [runtime]System.Exception + IL_0076: stloc.s V_10 + IL_0078: ldloc.s V_10 + IL_007a: stloc.1 + IL_007b: leave.s IL_007d + + } + IL_007d: ldloc.1 + IL_007e: stloc.s V_11 + IL_0080: ldloc.s V_11 + IL_0082: brtrue.s IL_0085 + + IL_0084: ret + + IL_0085: ldarg.0 + IL_0086: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_008b: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0090: ldloc.s V_11 + IL_0092: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) + IL_0097: ret +} """ ]) @@ -831,89 +860,90 @@ let testTask() = task { while x > 4 do System.Console.WriteLine("loop") } """ (fun verifier -> verifier.VerifyIL [ """ - .method public strict virtual instance void - MoveNext() cil managed - { - .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext - - .maxstack 4 - .locals init (int32 V_0, - class [runtime]System.Exception V_1, - bool V_2, - bool V_3, - bool V_4, - class [runtime]System.Exception V_5) - IL_0000: ldarg.0 - IL_0001: ldfld int32 Test/testTask@5::ResumptionPoint - IL_0006: stloc.0 - .try - { - 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 - - } - 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_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 - } +.method public strict virtual instance void + MoveNext() cil managed +{ + .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + bool V_2, + bool V_3, + bool V_4, + class [runtime]System.Exception V_5) + IL_0000: ldarg.0 + IL_0001: ldfld int32 Test/testTask@5::ResumptionPoint + IL_0006: stloc.0 + .try + { + IL_0007: ldc.i4.1 + IL_0008: stloc.3 + 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_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_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 +} """ ]) @@ -929,91 +959,91 @@ let testTask() = task { while x > 4 do System.Console.WriteLine("loop") } """ (fun verifier -> verifier.VerifyIL [ """ - .method public strict virtual instance void - MoveNext() cil managed - { - .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext - - .maxstack 4 - .locals init (int32 V_0, - class [runtime]System.Exception V_1, - bool V_2, - bool V_3, - bool V_4, - class [runtime]System.Exception V_5, - class [runtime]System.Exception V_6) - IL_0000: ldarg.0 - IL_0001: ldfld int32 Test/testTask@5::ResumptionPoint - IL_0006: stloc.0 - .try - { - IL_0007: ldc.i4.1 - IL_0008: stloc.3 - IL_0009: ldloc.3 - IL_000a: brfalse.s IL_0018 - - IL_000c: nop - 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_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_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 - } +.method public strict virtual instance void + MoveNext() cil managed +{ + .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + bool V_2, + bool V_3, + bool V_4, + class [runtime]System.Exception V_5, + class [runtime]System.Exception V_6) + IL_0000: ldarg.0 + IL_0001: ldfld int32 Test/testTask@5::ResumptionPoint + IL_0006: stloc.0 + .try + { + IL_0007: ldc.i4.1 + IL_0008: stloc.3 + 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_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_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 +} """ ]) #endif @@ -1088,38 +1118,35 @@ type Generic1InGeneric1<'T>() = """ (fun verifier -> verifier.VerifyIL [ """ - .method assembly hidebysig instance class [runtime]System.Threading.Tasks.Task`1 + .method assembly hidebysig instance class [runtime]System.Threading.Tasks.Task`1 run(class [runtime]System.Threading.Tasks.Task`1 computation) cil managed { .custom instance void [runtime]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .maxstack 4 - .locals init (class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder V_0, - valuetype Test/clo@7 V_1, - valuetype Test/clo@7& V_2) - IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.TaskBuilder [FSharp.Core]Microsoft.FSharp.Control.TaskBuilderModule::get_task() - IL_0005: stloc.0 - IL_0006: ldloca.s V_1 - IL_0008: initobj valuetype Test/clo@7 - IL_000e: ldloca.s V_1 - IL_0010: stloc.2 - IL_0011: ldloc.2 - IL_0012: ldarg.1 - IL_0013: stfld class [runtime]System.Threading.Tasks.Task`1 valuetype Test/clo@7::computation - IL_0018: ldloc.2 - IL_0019: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/clo@7::Data - IL_001e: call valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Create() - IL_0023: stfld valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0028: ldloc.2 - IL_0029: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/clo@7::Data - IL_002e: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0033: ldloc.2 - IL_0034: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Start>(!!0&) - IL_0039: ldloc.2 - IL_003a: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/clo@7::Data - IL_003f: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0044: call instance class [netstandard]System.Threading.Tasks.Task`1 valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::get_Task() - IL_0049: ret + .locals init (valuetype Test/clo@7 V_0, + valuetype Test/clo@7& V_1) + IL_0000: ldloca.s V_0 + IL_0002: initobj valuetype Test/clo@7 + IL_0008: ldloca.s V_0 + IL_000a: stloc.1 + IL_000b: ldloc.1 + IL_000c: ldarg.1 + IL_000d: stfld class [runtime]System.Threading.Tasks.Task`1 valuetype Test/clo@7::computation + IL_0012: ldloc.1 + IL_0013: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/clo@7::Data + IL_0018: call valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Create() + IL_001d: stfld valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0022: ldloc.1 + IL_0023: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/clo@7::Data + IL_0028: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_002d: ldloc.1 + IL_002e: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::Start>(!!0&) + IL_0033: ldloc.1 + IL_0034: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 valuetype Test/clo@7::Data + IL_0039: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_003e: call instance class [netstandard]System.Threading.Tasks.Task`1 valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::get_Task() + IL_0043: ret } """ """ diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/OptionalArg01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/OptionalArg01.il.bsl index 5e89cf4f53f..76d1d5166b0 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: {61E07031-4F48-B5AF-A745-03833170E061} +// MVID: {61F030F2-4F48-B5AF-A745-0383F230F061} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07450000 +// Image base: 0x072A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -93,7 +93,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 96 (0x60) .maxstack 4 .locals init ([0] int32 'count (shadowed)', [1] int32 count, @@ -101,99 +101,109 @@ [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_3, [4] class OptionalArg01/A v2) .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\\Tuples\\OptionalArg01.fs' - IL_0000: ldarg.0 - IL_0001: brfalse.s IL_0005 + .line 7,7 : 9,22 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\OptionalArg01.fs' + IL_0000: nop + .line 8,8 : 21,34 '' + IL_0001: nop + .line 16707566,16707566 : 0,0 '' + IL_0002: ldarg.0 + IL_0003: brfalse.s IL_0007 - IL_0003: br.s IL_0009 + IL_0005: br.s IL_000b .line 8,8 : 43,48 '' - IL_0005: ldc.i4.0 + IL_0007: ldc.i4.0 .line 16707566,16707566 : 0,0 '' - IL_0006: nop - IL_0007: br.s IL_000b + IL_0008: nop + IL_0009: br.s IL_000d .line 8,8 : 61,70 '' - IL_0009: ldc.i4.1 + IL_000b: ldc.i4.1 .line 16707566,16707566 : 0,0 '' - IL_000a: nop + IL_000c: nop .line 16707566,16707566 : 0,0 '' - IL_000b: stloc.0 + IL_000d: stloc.0 + .line 9,9 : 21,34 '' + IL_000e: nop .line 16707566,16707566 : 0,0 '' - IL_000c: ldarg.1 - IL_000d: brfalse.s IL_0011 + IL_000f: ldarg.1 + IL_0010: brfalse.s IL_0014 - IL_000f: br.s IL_0015 + IL_0012: br.s IL_0018 .line 9,9 : 43,48 '' - IL_0011: ldloc.0 + IL_0014: ldloc.0 .line 16707566,16707566 : 0,0 '' - IL_0012: nop - IL_0013: br.s IL_0019 + IL_0015: nop + IL_0016: br.s IL_001c .line 9,9 : 61,70 '' - IL_0015: ldloc.0 - IL_0016: ldc.i4.1 - IL_0017: add + IL_0018: ldloc.0 + IL_0019: ldc.i4.1 + IL_001a: add .line 16707566,16707566 : 0,0 '' - IL_0018: nop + IL_001b: nop .line 16707566,16707566 : 0,0 '' - IL_0019: stloc.1 + IL_001c: 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_001d: ldloc.1 + IL_001e: newobj instance void class [mscorlib]System.Collections.Generic.List`1::.ctor(int32) + IL_0023: stloc.2 + .line 11,11 : 9,22 '' + IL_0024: nop .line 16707566,16707566 : 0,0 '' - IL_0021: ldarg.0 - IL_0022: brfalse.s IL_0026 + IL_0025: ldarg.0 + IL_0026: brfalse.s IL_002a - IL_0024: br.s IL_002a + IL_0028: br.s IL_002e .line 11,11 : 31,33 '' - IL_0026: nop + IL_002a: nop .line 16707566,16707566 : 0,0 '' - IL_0027: nop - IL_0028: br.s IL_003d + IL_002b: nop + IL_002c: br.s IL_0041 .line 16707566,16707566 : 0,0 '' - 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 + IL_002e: ldarg.0 + IL_002f: stloc.3 + IL_0030: ldloc.3 + IL_0031: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() + IL_0036: 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_0038: ldloc.2 + IL_0039: ldloc.s v2 + IL_003b: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) .line 16707566,16707566 : 0,0 '' - IL_003c: nop + IL_0040: nop + .line 12,12 : 9,22 '' + IL_0041: nop .line 16707566,16707566 : 0,0 '' - IL_003d: ldarg.1 - IL_003e: brfalse.s IL_0042 + IL_0042: ldarg.1 + IL_0043: brfalse.s IL_0047 - IL_0040: br.s IL_0046 + IL_0045: br.s IL_004b .line 12,12 : 31,33 '' - IL_0042: nop + IL_0047: nop .line 16707566,16707566 : 0,0 '' - IL_0043: nop - IL_0044: br.s IL_0059 + IL_0048: nop + IL_0049: br.s IL_005e .line 16707566,16707566 : 0,0 '' - 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 + IL_004b: ldarg.1 + IL_004c: stloc.3 + IL_004d: ldloc.3 + IL_004e: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() + IL_0053: 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_0055: ldloc.2 + IL_0056: ldloc.s v2 + IL_0058: callvirt instance void class [mscorlib]System.Collections.Generic.List`1::Add(!0) .line 16707566,16707566 : 0,0 '' - IL_0058: nop + IL_005d: nop .line 13,13 : 9,16 '' - IL_0059: ldloc.2 - IL_005a: ret + IL_005e: ldloc.2 + IL_005f: ret } // end of method C::F } // end of class C From 8e327e9a0c9a1552b77a25da692ada541acd0d3e Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 27 Jan 2022 16:01:08 +0000 Subject: [PATCH 06/35] simplify 'when' debug points and add debug points on conditional logic --- src/fsharp/AugmentWithHashCompare.fs | 14 +- src/fsharp/CheckExpressions.fs | 31 ++- src/fsharp/FindUnsolved.fs | 2 +- src/fsharp/IlxGen.fs | 13 +- src/fsharp/InnerLambdasToTopLevelFuncs.fs | 6 +- src/fsharp/LowerCallsAndSeqs.fs | 3 +- src/fsharp/LowerStateMachines.fs | 1 - src/fsharp/Optimizer.fs | 48 ++-- src/fsharp/PatternMatchCompilation.fs | 16 +- src/fsharp/PostInferenceChecks.fs | 2 +- src/fsharp/QuotationTranslator.fs | 11 +- src/fsharp/SyntaxTree.fs | 5 - src/fsharp/SyntaxTree.fsi | 8 - src/fsharp/TypedTree.fs | 2 +- src/fsharp/TypedTreeOps.fs | 54 ++-- src/fsharp/TypedTreeOps.fsi | 5 +- src/fsharp/TypedTreePickle.fs | 4 +- src/fsharp/symbols/Exprs.fs | 4 +- .../Misc/TryWith_NoFilterBlocks01.il.bsl | 34 ++- .../Linq101Where01.il.bsl | 40 ++- .../TestFunctions/TestFunction3c.il.bsl | 52 ++-- .../TestFunctions/Testfunction9b.il.bsl | 242 +++++++++--------- .../TestFunctions/Testfunction9b1.il.bsl | 242 +++++++++--------- .../TestFunctions/Testfunction9b2.il.bsl | 242 +++++++++--------- .../TestFunctions/Testfunction9b3.il.bsl | 242 +++++++++--------- .../TheBigFileOfDebugStepping.fsx | 8 +- 26 files changed, 653 insertions(+), 678 deletions(-) diff --git a/src/fsharp/AugmentWithHashCompare.fs b/src/fsharp/AugmentWithHashCompare.fs index acfc6d3ae31..520eb382fec 100644 --- a/src/fsharp/AugmentWithHashCompare.fs +++ b/src/fsharp/AugmentWithHashCompare.fs @@ -305,7 +305,7 @@ let mkExnEquality (g: TcGlobals) exnref (exnc: Tycon) = [ mkCase(DecisionTreeTest.IsInst(g.exn_ty, mkAppTy exnref []), mbuilder.AddResultTarget(expr)) ] let dflt = Some(mbuilder.AddResultTarget(mkFalse g m)) - let dtree = TDSwitch(DebugPointAtSwitch.No, thate, cases, dflt, m) + let dtree = TDSwitch(thate, cases, dflt, m) mbuilder.Close(dtree, m, g.bool_ty) let expr = mkBindThatNullEquals g m thise thate expr @@ -328,7 +328,7 @@ let mkExnEqualityWithComparer g exnref (exnc: Tycon) (_thisv, thise) thatobje (t [ mkCase(DecisionTreeTest.IsInst(g.exn_ty, mkAppTy exnref []), mbuilder.AddResultTarget(expr)) ] let dflt = mbuilder.AddResultTarget(mkFalse g m) - let dtree = TDSwitch(DebugPointAtSwitch.No, thate, cases, Some dflt, m) + let dtree = TDSwitch(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) @@ -372,7 +372,7 @@ let mkUnionCompare g tcref (tycon: Tycon) = 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)) - let dtree = TDSwitch(DebugPointAtSwitch.No, thise, cases, dflt, m) + let dtree = TDSwitch(thise, cases, dflt, m) mbuilder.Close(dtree, m, g.int_ty) let expr = @@ -433,7 +433,7 @@ let mkUnionCompareWithComparer g tcref (tycon: Tycon) (_thisv, thise) (_thatobjv 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)) - let dtree = TDSwitch(DebugPointAtSwitch.No, thise, cases, dflt, m) + let dtree = TDSwitch(thise, cases, dflt, m) mbuilder.Close(dtree, m, g.int_ty) let expr = @@ -493,7 +493,7 @@ let mkUnionEquality g tcref (tycon: Tycon) = 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))) - let dtree = TDSwitch(DebugPointAtSwitch.No, thise, cases, dflt, m) + let dtree = TDSwitch(thise, cases, dflt, m) mbuilder.Close(dtree, m, g.bool_ty) let expr = @@ -555,7 +555,7 @@ let mkUnionEqualityWithComparer g tcref (tycon: Tycon) (_thisv, thise) thatobje 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)) - let dtree = TDSwitch(DebugPointAtSwitch.No, thise, cases, dflt, m) + let dtree = TDSwitch(thise, cases, dflt, m) mbuilder.Close(dtree, m, g.bool_ty) let expr = @@ -658,7 +658,7 @@ let mkUnionHashWithComparer g tcref (tycon: Tycon) compe = else let tag = mkUnionCaseTagGetViaExprAddr (thise, tcref, tinst, m) Some(mbuilder.AddResultTarget(tag)) - let dtree = TDSwitch(DebugPointAtSwitch.No, thise, cases, dflt, m) + let dtree = TDSwitch(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/CheckExpressions.fs b/src/fsharp/CheckExpressions.fs index d2734e6420d..3e79968c74c 100644 --- a/src/fsharp/CheckExpressions.fs +++ b/src/fsharp/CheckExpressions.fs @@ -3462,8 +3462,9 @@ 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 + and CheckDecisionTree st dt = + match dt with + | 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 @@ -5682,7 +5683,12 @@ and TcNonControlFlowExpr (env: TcEnv) f = | NotedSourceConstruct.While -> res, tpenv | NotedSourceConstruct.None -> - mkDebugPoint res.Range res, tpenv + // Skip outer debug point for "e1 && e2" and "e1 || e2" + let res2 = + match res with + | IfThenElseExpr _ -> res + | _ -> mkDebugPoint res.Range res + res2, tpenv else f env @@ -8120,6 +8126,7 @@ and isAdjacentListExpr isSugar atomicFlag (synLeftExprOpt: SynExpr option) (synA // Check seq { expr } // Check async { expr } and TcApplicationThen cenv (overallTy: OverallTy) env tpenv mExprAndArg synLeftExprOpt leftExpr exprty (synArg: SynExpr) atomicFlag isSugar delayed = + let g = cenv.g let denv = env.DisplayEnv let mArg = synArg.Range let mLeftExpr = leftExpr.Range @@ -8158,7 +8165,23 @@ and TcApplicationThen cenv (overallTy: OverallTy) env tpenv mExprAndArg synLeftE SynExpr.ComputationExpr (true, comp, m) | _ -> synArg - let arg, tpenv = TcExprFlex2 cenv domainTy env false tpenv synArg + let arg, tpenv = + // treat left and right of '||' and '&&' as control flow, so for example + // f e1 && g e2 + // will have debug points on "f e1" and "g e2" + let env = + match leftExpr with + | ApplicableExpr(_, Expr.Val (vf, _, _), _) + | ApplicableExpr(_, Expr.App (Expr.Val (vf, _, _), _, _, [_], _), _) + when valRefEq g vf g.and_vref + || valRefEq g vf g.and2_vref + || valRefEq g vf g.or_vref + || valRefEq g vf g.or2_vref -> + { env with eIsControlFlow = true } + | _ -> env + + TcExprFlex2 cenv domainTy env false tpenv synArg + let exprAndArg, resultTy = buildApp cenv leftExpr resultTy arg mExprAndArg TcDelayed cenv overallTy env tpenv mExprAndArg exprAndArg resultTy atomicFlag delayed diff --git a/src/fsharp/FindUnsolved.fs b/src/fsharp/FindUnsolved.fs index 9b6a998d1b2..6b11d3e77d3 100644 --- a/src/fsharp/FindUnsolved.fs +++ b/src/fsharp/FindUnsolved.fs @@ -188,7 +188,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 3650216d180..957e1779cee 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -5546,13 +5546,7 @@ and GenDecisionTreeAndTargetsInner cenv cgbuf inplabOpt stackAtTargets eenv tree | _ -> contf targetInfos - | TDSwitch(sp, e, cases, dflt, m) -> - - // Emit the debug point - match sp with - | DebugPointAtSwitch.Yes dpm -> CG.EmitDebugPoint cgbuf dpm - | DebugPointAtSwitch.No -> () - + | TDSwitch(e, cases, dflt, m) -> GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases dflt m targets targetCounts targetInfos sequel contf and GetTarget (targets:_[]) n = @@ -5765,8 +5759,8 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau (cases, caseLabels) ||> List.map2 (fun case label -> let i = match case.Discriminator with - DecisionTreeTest.Const c' -> - match c' with + DecisionTreeTest.Const c2 -> + match c2 with | Const.SByte i -> int32 i | Const.Int16 i -> int32 i | Const.Int32 i -> i @@ -5792,6 +5786,7 @@ and GenDecisionTreeSwitch cenv cgbuf inplabOpt stackAtTargets eenv e cases defau 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 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 targetInfos sequel caseLabels cases (contf: Zmap<_,_> -> FakeUnit) = diff --git a/src/fsharp/InnerLambdasToTopLevelFuncs.fs b/src/fsharp/InnerLambdasToTopLevelFuncs.fs index 67c9b33aed6..f5788c9c810 100644 --- a/src/fsharp/InnerLambdasToTopLevelFuncs.fs +++ b/src/fsharp/InnerLambdasToTopLevelFuncs.fs @@ -1295,15 +1295,15 @@ module Pass4_RewriteAssembly = let rest, z = TransDecisionTree penv z rest TDBind(bind, rest), z - | TDSwitch (sp, e, cases, dflt, m) -> + | TDSwitch (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 TCase(discrim, dtree), z let cases, z = List.mapFold (TransDecisionTreeCase penv) z cases - let dflt, z = Option.mapFold (TransDecisionTree penv) z dflt - TDSwitch (sp, e, cases, dflt, m), z + let dflt, z = Option.mapFold (TransDecisionTree penv) z dflt + TDSwitch (e, cases, dflt, m), z and TransDecisionTreeTarget penv z (TTarget(vs, e, flags)) = let z = EnterInner z diff --git a/src/fsharp/LowerCallsAndSeqs.fs b/src/fsharp/LowerCallsAndSeqs.fs index df0b97ec74e..febc309e07a 100644 --- a/src/fsharp/LowerCallsAndSeqs.fs +++ b/src/fsharp/LowerCallsAndSeqs.fs @@ -737,7 +737,6 @@ let ConvertSequenceExprToObject g amap overallExpr = let mkGotoLabelTarget lab = mbuilder.AddResultTarget(Expr.Op (TOp.Goto lab, [], [], m)) let dtree = TDSwitch( - DebugPointAtSwitch.No, pcExpr, [ // Add an empty disposal action for the initial state (pc = 0) @@ -805,7 +804,7 @@ let ConvertSequenceExprToObject g amap overallExpr = let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m) let addResultTarget e = mbuilder.AddResultTarget(e) let dtree = - TDSwitch(DebugPointAtSwitch.No, + TDSwitch( pcExpr, [ mkCase((DecisionTreeTest.Const(Const.Int32 pcDone)), addResultTarget (Expr.Op (TOp.Goto doneDisposeLabel, [], [], m)) ) ], Some (addResultTarget (mkUnit g m)), diff --git a/src/fsharp/LowerStateMachines.fs b/src/fsharp/LowerStateMachines.fs index b4d446761bc..b7a05925120 100644 --- a/src/fsharp/LowerStateMachines.fs +++ b/src/fsharp/LowerStateMachines.fs @@ -426,7 +426,6 @@ type LowerStateMachine(g: TcGlobals) = let mkGotoLabelTarget lab = mbuilder.AddResultTarget(Expr.Op (TOp.Goto lab, [], [], m)) let dtree = 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 diff --git a/src/fsharp/Optimizer.fs b/src/fsharp/Optimizer.fs index 54663a94a14..6ce3dd5fdd5 100644 --- a/src/fsharp/Optimizer.fs +++ b/src/fsharp/Optimizer.fs @@ -1485,25 +1485,25 @@ let TryEliminateBinding cenv _env bind e2 _m = // Immediate consumption of function in an application in a sequential, e.g. 'let part1 = e in part1 arg; rest' // See https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1034-lambda-optimizations.md - | Expr.Sequential(DebugPoints(Expr.App(Expr.Val (VRefLocal vspec2, _, _), f0ty, c, args, d), recreate), rest, NormalSeq, m) + | Expr.Sequential(DebugPoints(Expr.App(DebugPoints(Expr.Val (VRefLocal vspec2, _, _), recreate2), f0ty, c, args, d), recreate1), rest, NormalSeq, m) when IsUniqueUse vspec2 (rest :: args) -> - Some (Expr.Sequential(recreate(Expr.App(e1, f0ty, c, args, d)), rest, NormalSeq, m) |> recreate0) + Some (Expr.Sequential(recreate1(Expr.App(recreate2 e1, f0ty, c, args, d)), rest, NormalSeq, m) |> recreate0) // Immediate consumption of delegate via an application in a sequential, e.g. 'let part1 = e in part1.Invoke(args); rest' // See https://github.com/fsharp/fslang-design/blob/master/tooling/FST-1034-lambda-optimizations.md - | Expr.Sequential(DebugPoints(DelegateInvokeExpr cenv.g (invokeRef, f0ty, tyargs, Expr.Val (VRefLocal vspec2, _, _), args, _), recreate), rest, NormalSeq, m) + | Expr.Sequential(DebugPoints(DelegateInvokeExpr cenv.g (invokeRef, f0ty, tyargs, DebugPoints (Expr.Val (VRefLocal vspec2, _, _), recreate2), args, _), recreate1), rest, NormalSeq, m) when IsUniqueUse vspec2 (rest :: args) -> - let invoke = MakeFSharpDelegateInvokeAndTryBetaReduce cenv.g (invokeRef, e1, f0ty, tyargs, args, m) - Some (Expr.Sequential(recreate invoke, rest, NormalSeq, m) |> recreate0) + let invoke = MakeFSharpDelegateInvokeAndTryBetaReduce cenv.g (invokeRef, recreate2 e1, f0ty, tyargs, args, m) + Some (Expr.Sequential(recreate1 invoke, rest, NormalSeq, m) |> recreate0) // Immediate consumption of value by a pattern match 'let x = e in match x with ...' - | Expr.Match (spMatch, _exprm, TDSwitch(sp, Expr.Val (VRefLocal vspec2, _, _), cases, dflt, _), targets, m, ty2) + | Expr.Match (spMatch, _exprm, TDSwitch(DebugPoints(Expr.Val (VRefLocal vspec2, _, _), recreate1), 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(sp, e1, cases, dflt, m), targets, m, ty2) |> recreate0) + Some (Expr.Match (spMatch, e1.Range, TDSwitch(recreate1 e1, cases, dflt, m), targets, m, ty2) |> recreate0) // 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 @@ -1518,11 +1518,11 @@ let TryEliminateBinding cenv _env bind e2 _m = // 'let x = e in op[op[x;arg2];arg3]' --> op[op[e;arg2];arg3] // 'let x = e in op[op[arg1;x];arg3]' --> op[op[arg1;e];arg3] when arg1 has no side effects etc. // 'let x = e in op[op[arg1;arg2];x]' --> op[op[arg1;arg2];e] when arg1, arg2 have no side effects etc. - | Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [arg1;arg2], m2);arg3], m1) -> + | Expr.Op (c1, tyargs1, [DebugPoints(Expr.Op (c2, tyargs2, [arg1;arg2], m2), recreate1);arg3], m1) -> match GetImmediateUseContext [] [arg1;arg2;arg3] with - | Some([], [arg2;arg3]) -> Some (Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [e1;arg2], m2);arg3], m1) |> recreate0) - | Some([arg1], [arg3]) -> Some (Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [arg1;e1], m2);arg3], m1) |> recreate0) - | Some([arg1;arg2], []) -> Some (Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [arg1;arg2], m2);e1], m1) |> recreate0) + | Some([], [arg2;arg3]) -> Some (Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [e1;arg2], m2) |> recreate1; arg3], m1) |> recreate0) + | Some([arg1], [arg3]) -> Some (Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [arg1;e1], m2) |> recreate1; arg3], m1) |> recreate0) + | Some([arg1;arg2], []) -> Some (Expr.Op (c1, tyargs1, [Expr.Op (c2, tyargs2, [arg1;arg2], m2) |> recreate1; e1], m1) |> recreate0) | Some _ -> error(InternalError("unexpected return pattern from GetImmediateUseContext", m1)) | None -> None @@ -1552,8 +1552,8 @@ let rec (|KnownValApp|_|) expr = /// check single case with bool const. let (|TDBoolSwitch|_|) dtree = match dtree with - | TDSwitch(sp, expr, [TCase (DecisionTreeTest.Const(Const.Bool testBool), caseTree )], Some defaultTree, range) -> - Some (sp, expr, testBool, caseTree, defaultTree, range) + | TDSwitch(expr, [TCase (DecisionTreeTest.Const(Const.Bool testBool), caseTree )], Some defaultTree, range) -> + Some (expr, testBool, caseTree, defaultTree, range) | _ -> None @@ -1567,7 +1567,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 (_sp, _expr, [case], Some defaultTree, _range) -> + | TDSwitch (_expr, [case], Some defaultTree, _range) -> let tc1,ec1 = CountBoolLogicTree data case.CaseTree let tc2, ec2 = CountBoolLogicTree data defaultTree tc1 + tc2, ec1 + ec2 @@ -1583,14 +1583,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 (sp, expr, cases, defaultTree, range) -> + | TDSwitch (expr, cases, defaultTree, range) -> let cases2 = cases |> List.map (RewriteBoolLogicCase data) let defaultTree2 = defaultTree |> Option.map (RewriteBoolLogicTree data) - TDSwitch (sp, expr, cases2, defaultTree2, range) + TDSwitch (expr, cases2, defaultTree2, range) | TDSuccess([], idx) -> match targets.[idx] with | ConstantBoolTarget result -> if result = testBool then outerCaseTree else outerDefaultTree - | TTarget([], exp, _) -> mkBoolSwitch DebugPointAtSwitch.No exp.Range exp (if testBool then outerCaseTree else outerDefaultTree) (if testBool then outerDefaultTree else outerCaseTree) + | TTarget([], exp, _) -> mkBoolSwitch 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" @@ -1605,7 +1605,7 @@ let rec CombineBoolLogic expr = // try to find nested boolean switch match expr with | Expr.Match (outerSP, outerMatchRange, - TDBoolSwitch(_switchSP, + TDBoolSwitch( DebugPoints(Expr.Match (_innerSP, _innerMatchRange, innerTree, innerTargets, _innerDefaultRange, _innerMatchTy), _), outerTestBool, outerCaseTree, outerDefaultTree, _outerSwitchRange ), outerTargets, outerDefaultRange, outerMatchTy) -> @@ -3673,7 +3673,7 @@ and OptimizeDecisionTree cenv env m x = else rest, rinfo - | TDSwitch (sp, e, cases, dflt, m) -> + | TDSwitch (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. // @@ -3681,7 +3681,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 (sp, e, cases, dflt, m) + OptimizeSwitch cenv env (e, cases, dflt, m) and TryOptimizeDecisionTreeTest cenv test vinfo = match test, vinfo with @@ -3695,7 +3695,7 @@ and TryOptimizeDecisionTreeTest cenv test vinfo = | _ -> None /// Optimize/analyze a switch construct from pattern matching -and OptimizeSwitch cenv env (sp, e, cases, dflt, m) = +and OptimizeSwitch cenv env (e, cases, dflt, m) = let eR, einfo = OptimizeExpr cenv env e let cases, dflt = @@ -3712,9 +3712,9 @@ and OptimizeSwitch cenv env (sp, 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 (sp, eR, einfo, cases, dflt, m) + | _ -> OptimizeSwitchFallback cenv env (eR, einfo, cases, dflt, m) -and OptimizeSwitchFallback cenv env (sp, eR, einfo, cases, dflt, m) = +and OptimizeSwitchFallback cenv env (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) @@ -3726,7 +3726,7 @@ and OptimizeSwitchFallback cenv env (sp, 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 (sp, eR, casesR, dfltR, m), info + TDSwitch (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 f65a30c87f9..3e809b83e9e 100644 --- a/src/fsharp/PatternMatchCompilation.fs +++ b/src/fsharp/PatternMatchCompilation.fs @@ -583,11 +583,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(DebugPointAtSwitch.No, expr, [TCase(DecisionTreeTest.IsNull, BuildSwitch None g expr edges dflt m)], Some success, m) + TDSwitch(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(DebugPointAtSwitch.No, expr, [edge], Some (BuildSwitch inpExprOpt g expr edges dflt m), m) + TDSwitch(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 +597,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(DebugPointAtSwitch.No, expr, [TCase(DecisionTreeTest.IsNull, emptyCase)], Some consCase, m) + TDSwitch(expr, [TCase(DecisionTreeTest.IsNull, emptyCase)], Some consCase, m) #endif // All these should also always have default cases @@ -621,7 +621,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 DebugPointAtSwitch.No m testexpr tree sofar) + mkBoolSwitch m testexpr tree sofar) edges dflt @@ -663,7 +663,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(DebugPointAtSwitch.No, expr, edgeGroup, Some sofar, m)) + (edgeGroups, dflt) ||> List.foldBack (fun edgeGroup sofar -> TDSwitch(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 +671,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 (DebugPointAtSwitch.No, expr, rest, Some tree, m) + | TCase(_, tree) :: rest, None -> TDSwitch (expr, rest, Some tree, m) // Otherwise let codegen make the choices - | _ -> TDSwitch (DebugPointAtSwitch.No, expr, edges, dflt, m) + | _ -> TDSwitch (expr, edges, dflt, m) #if DEBUG let rec layoutPat pat = @@ -939,7 +939,7 @@ let CompilePatternBasic 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 + mkBoolSwitch m whenExprWithBindings successTree failureTree | None -> successTree diff --git a/src/fsharp/PostInferenceChecks.fs b/src/fsharp/PostInferenceChecks.fs index a2609b70832..e7554a1f8c7 100644 --- a/src/fsharp/PostInferenceChecks.fs +++ b/src/fsharp/PostInferenceChecks.fs @@ -1838,7 +1838,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 9659a0f6931..b697bf7b7e9 100644 --- a/src/fsharp/QuotationTranslator.fs +++ b/src/fsharp/QuotationTranslator.fs @@ -187,7 +187,7 @@ let (|SimpleArrayLoopUpperBound|_|) expr = let (|SimpleArrayLoopBody|_|) g expr = match expr with - | Expr.Lambda (_, a, b, ([_] as args), Expr.Let (TBind(forVarLoop, Expr.Op (TOp.ILAsm ([I_ldelem_any(ILArrayShape [(Some 0, None)], _)], _), [elemTy], [arr; idx], m1), seqPoint), body, m2, freeVars), m, ty) -> + | Expr.Lambda (_, a, b, ([_] as args), DebugPoints (Expr.Let (TBind(forVarLoop, DebugPoints (Expr.Op (TOp.ILAsm ([I_ldelem_any(ILArrayShape [(Some 0, None)], _)], _), [elemTy], [arr; idx], m1), _), seqPoint), body, m2, freeVars), _), m, ty) -> let body = Expr.Let (TBind(forVarLoop, mkCallArrayGet g m1 elemTy arr idx, seqPoint), body, m2, freeVars) let expr = Expr.Lambda (newUnique(), a, b, args, body, m, ty) Some (arr, elemTy, expr) @@ -197,12 +197,9 @@ let (|ObjectInitializationCheck|_|) g expr = // recognize "if this.init@ < 1 then failinit" match expr with | Expr.Match - ( - _, _, + (_, _, TDSwitch - (_, - Expr.Op (TOp.ILAsm ([AI_clt], _), _, [Expr.Op (TOp.ValFieldGet (RecdFieldRef(_, name)), _, [Expr.Val (selfRef, NormalValUse, _)], _); Expr.Const (Const.Int32 1, _, _)], _), _, _, _ - ), + (DebugPoints (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 ) when IsCompilerGeneratedName name && @@ -1046,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 e84314604eb..008a52a4425 100644 --- a/src/fsharp/SyntaxTree.fs +++ b/src/fsharp/SyntaxTree.fs @@ -173,11 +173,6 @@ type DebugPointAtTarget = | Yes | No -[] -type DebugPointAtSwitch = - | Yes of range - | No - [] type DebugPointAtSequential = | SuppressNeither diff --git a/src/fsharp/SyntaxTree.fsi b/src/fsharp/SyntaxTree.fsi index 75f53a5b4ca..0f456326fb7 100644 --- a/src/fsharp/SyntaxTree.fsi +++ b/src/fsharp/SyntaxTree.fsi @@ -223,14 +223,6 @@ type DebugPointAtTarget = type DebugPointAtLeafExpr = | Yes of range -/// 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. diff --git a/src/fsharp/TypedTree.fs b/src/fsharp/TypedTree.fs index cab36954288..4482b1af6f9 100644 --- a/src/fsharp/TypedTree.fs +++ b/src/fsharp/TypedTree.fs @@ -4307,7 +4307,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 debugPoint: DebugPointAtSwitch * input: Expr * cases: DecisionTreeCase list * defaultOpt: DecisionTree option * range: range + | TDSwitch of input: Expr * cases: DecisionTreeCase list * defaultOpt: DecisionTree option * range: range /// TDSuccess(results, targets) /// diff --git a/src/fsharp/TypedTreeOps.fs b/src/fsharp/TypedTreeOps.fs index f07bbb191a8..bddf72fe432 100644 --- a/src/fsharp/TypedTreeOps.fs +++ b/src/fsharp/TypedTreeOps.fs @@ -1210,12 +1210,12 @@ type MatchBuilder(spBind, inpRange: range) = member _.Close(dtree, m, ty) = primMkMatch (spBind, inpRange, dtree, targets.ToArray(), m, ty) -let mkBoolSwitch debugPoint m g t e = - TDSwitch(debugPoint, g, [TCase(DecisionTreeTest.Const(Const.Bool true), t)], Some e, m) +let mkBoolSwitch m g t e = + TDSwitch(g, [TCase(DecisionTreeTest.Const(Const.Bool true), t)], Some e, m) let primMkCond spBind m ty e1 e2 e3 = let mbuilder = MatchBuilder(spBind, m) - let dtree = mkBoolSwitch DebugPointAtSwitch.No m e1 (mbuilder.AddResultTarget(e2)) (mbuilder.AddResultTarget(e3)) + let dtree = mkBoolSwitch m e1 (mbuilder.AddResultTarget(e2)) (mbuilder.AddResultTarget(e3)) mbuilder.Close(dtree, m, ty) let mkCond spBind m ty e1 e2 e3 = @@ -4164,7 +4164,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 @@ -4667,7 +4667,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 @@ -5519,7 +5519,7 @@ and remapFlatExprs ctxt compgen tmenv es = List.mapq (remapExprImpl ctxt compgen and remapDecisionTree ctxt compgen tmenv x = match x with - | TDSwitch(sp, e1, cases, dflt, m) -> + | TDSwitch(e1, cases, dflt, m) -> let e1R = remapExprImpl ctxt compgen tmenv e1 let casesR = cases |> List.map (fun (TCase(test, subTree)) -> @@ -5535,7 +5535,7 @@ and remapDecisionTree ctxt compgen tmenv x = let subTreeR = remapDecisionTree ctxt compgen tmenv subTree TCase(testR, subTreeR)) let dfltR = Option.map (remapDecisionTree ctxt compgen tmenv) dflt - TDSwitch(sp, e1R, casesR, dfltR, m) + TDSwitch(e1R, casesR, dfltR, m) | TDSuccess (es, n) -> TDSuccess (remapFlatExprs ctxt compgen tmenv es, n) @@ -5953,11 +5953,11 @@ and remarkExprs m es = es |> List.map (remarkExpr m) and remarkDecisionTree m x = match x with - | TDSwitch(sp, e1, cases, dflt, _) -> + | TDSwitch(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, dfltR, m) + TDSwitch(e1R, casesR, dfltR, m) | TDSuccess (es, n) -> TDSuccess (remarkExprs m es, n) | TDBind (bind, rest) -> @@ -6194,7 +6194,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 @@ -6202,10 +6202,10 @@ let rec accTargetsOfDecisionTree tree acc = let rec mapTargetsOfDecisionTree f tree = match tree with - | TDSwitch (sp, e, cases, dflt, m) -> + | TDSwitch (e, cases, dflt, m) -> let casesR = cases |> List.map (mapTargetsOfDecisionTreeCase f) let dfltR = Option.map (mapTargetsOfDecisionTree f) dflt - TDSwitch (sp, e, casesR, dfltR, m) + TDSwitch (e, casesR, dfltR, m) | TDSuccess (es, i) -> TDSuccess(es, f i) | TDBind (bind, rest) -> TDBind(bind, mapTargetsOfDecisionTree f rest) @@ -6238,7 +6238,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 @@ -6258,7 +6258,7 @@ 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 @@ -6291,10 +6291,10 @@ let foldLinearBindingTargetsOfMatch tree (targets: _[]) = | Some i when isLinearTgtIdx i -> TDSuccess([], i) | _ -> match tree with - | TDSwitch (sp, e, cases, dflt, m) -> + | TDSwitch (e, cases, dflt, m) -> let casesR = List.map rebuildDecisionTreeEdge cases let dfltR = Option.map rebuildDecisionTree dflt - TDSwitch (sp, e, casesR, dfltR, m) + TDSwitch (e, casesR, dfltR, m) | TDSuccess _ -> tree | TDBind _ -> tree @@ -6845,7 +6845,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 @@ -8589,7 +8589,7 @@ let mkIsInstConditional g m tgty vinpe v e2 e3 = let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m) let tg2 = mbuilder.AddResultTarget(e2) let tg3 = mbuilder.AddResultTarget(e3) - let dtree = TDSwitch(DebugPointAtSwitch.No, exprForVal m v, [TCase(DecisionTreeTest.IsNull, tg3)], Some tg2, m) + let dtree = TDSwitch(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 @@ -8597,7 +8597,7 @@ let mkIsInstConditional g m tgty vinpe v e2 e3 = let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m) let tg2 = TDSuccess([mkCallUnbox g m tgty vinpe], mbuilder.AddTarget(TTarget([v], e2, None))) let tg3 = mbuilder.AddResultTarget(e3) - let dtree = TDSwitch(DebugPointAtSwitch.No, vinpe, [TCase(DecisionTreeTest.IsInst(tyOfExpr g vinpe, tgty), tg2)], Some tg3, m) + let dtree = TDSwitch(vinpe, [TCase(DecisionTreeTest.IsInst(tyOfExpr g vinpe, tgty), tg2)], Some tg3, m) let expr = mbuilder.Close(dtree, m, tyOfExpr g e2) expr @@ -8609,7 +8609,7 @@ let mkNullTest g m e1 e2 e3 = let mbuilder = MatchBuilder(DebugPointAtBinding.NoneAtInvisible, m) let tg2 = mbuilder.AddResultTarget(e2) let tg3 = mbuilder.AddResultTarget(e3) - let dtree = TDSwitch(DebugPointAtSwitch.No, e1, [TCase(DecisionTreeTest.IsNull, tg3)], Some tg2, m) + let dtree = TDSwitch(e1, [TCase(DecisionTreeTest.IsNull, tg3)], Some tg2, m) let expr = mbuilder.Close(dtree, m, tyOfExpr g e2) expr @@ -8955,11 +8955,11 @@ and RewriteDecisionTree env x = if LanguagePrimitives.PhysicalEquality es esR then x else TDSuccess(esR, n) - | TDSwitch (sp, e, cases, dflt, m) -> + | TDSwitch (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) + TDSwitch (eR, casesR, dfltR, m) | TDBind (bind, body) -> let bindR = rewriteBind env bind @@ -9193,7 +9193,7 @@ let IsSimpleSyntacticConstantExpr g inputExpr = and checkDecisionTree vrefs x = match x with | TDSuccess (es, _n) -> es |> List.forall (checkExpr vrefs) - | TDSwitch (_, e, cases, dflt, _m) -> + | TDSwitch (e, cases, dflt, _m) -> checkExpr vrefs e && cases |> List.forall (checkDecisionTreeCase vrefs) && dflt |> Option.forall (checkDecisionTree vrefs) @@ -9589,10 +9589,10 @@ let (|UseResumableStateMachinesExpr|_|) g expr = | ValApp g g.cgh__useResumableCode_vref (_, _, _m) -> Some () | _ -> None -/// Match +/// Match an if...then...else expression or the result of "a && b" or "a || b" let (|IfThenElseExpr|_|) expr = match expr with - | Expr.Match (_spBind, _exprm, TDSwitch(_spSwitch, cond, [ TCase( DecisionTreeTest.Const (Const.Bool true), TDSuccess ([], 0) )], Some (TDSuccess ([], 1)), _), + | Expr.Match (_spBind, _exprm, TDSwitch(cond, [ TCase( DecisionTreeTest.Const (Const.Bool true), TDSuccess ([], 0) )], Some (TDSuccess ([], 1)), _), [| TTarget([], thenExpr, _); TTarget([], elseExpr, _) |], _m, _ty) -> Some (cond, thenExpr, elseExpr) | _ -> None @@ -9699,11 +9699,11 @@ let (|TryWithExpr|_|) expr = let (|MatchTwoCasesExpr|_|) expr = match expr with - | Expr.Match (spBind, exprm, TDSwitch(spSwitch, cond, [ TCase( DecisionTreeTest.UnionCase (ucref, a), TDSuccess ([], tg1) )], Some (TDSuccess ([], tg2)), b), tgs, m, ty) -> + | Expr.Match (spBind, exprm, TDSwitch(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(spSwitch, cond, [ TCase( DecisionTreeTest.UnionCase (ucref, a), TDSuccess ([], tg1) )], Some (TDSuccess ([], tg2)), b), tgs, m, ty) + Expr.Match (spBind, exprm, TDSwitch(cond, [ TCase( DecisionTreeTest.UnionCase (ucref, a), TDSuccess ([], tg1) )], Some (TDSuccess ([], tg2)), b), tgs, m, ty) Some (cond, ucref, tg1, tg2, tgs, rebuild) diff --git a/src/fsharp/TypedTreeOps.fsi b/src/fsharp/TypedTreeOps.fsi index 326532497e2..0c7e432a964 100755 --- a/src/fsharp/TypedTreeOps.fsi +++ b/src/fsharp/TypedTreeOps.fsi @@ -93,7 +93,7 @@ type MatchBuilder = member Close: DecisionTree * range * TType -> Expr /// Add an if-then-else boolean conditional node into a decision tree -val mkBoolSwitch: DebugPointAtSwitch -> range -> Expr -> DecisionTree -> DecisionTree -> DecisionTree +val mkBoolSwitch: range -> Expr -> DecisionTree -> DecisionTree -> DecisionTree /// Build a conditional expression val primMkCond: DebugPointAtBinding -> range -> TType -> Expr -> Expr -> Expr -> Expr @@ -2542,3 +2542,6 @@ val (|OpPipeRight3|_|): (TType * Expr * Expr * Expr * Expr * range) option val mkDebugPoint: m: range -> expr: Expr -> Expr + +/// Match an if...then...else expression or the result of "a && b" or "a || b" +val (|IfThenElseExpr|_|): expr: Expr -> (Expr * Expr * Expr) option diff --git a/src/fsharp/TypedTreePickle.fs b/src/fsharp/TypedTreePickle.fs index 1e912d1037a..4fb87e131c7 100644 --- a/src/fsharp/TypedTreePickle.fs +++ b/src/fsharp/TypedTreePickle.fs @@ -2378,7 +2378,7 @@ and u_const st = and p_dtree x st = match x with - | 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 + | 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 | 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 @@ -2410,7 +2410,7 @@ and u_dtree st = match tag with | 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) + TDSwitch(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" diff --git a/src/fsharp/symbols/Exprs.fs b/src/fsharp/symbols/Exprs.fs index 633440ea735..97af23bf405 100644 --- a/src/fsharp/symbols/Exprs.fs +++ b/src/fsharp/symbols/Exprs.fs @@ -219,7 +219,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" @@ -1251,7 +1251,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/fsharpqa/Source/CodeGen/EmittedIL/Misc/TryWith_NoFilterBlocks01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/TryWith_NoFilterBlocks01.il.bsl index a582377e853..0c8705bf204 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: {61E07031-3DEF-9A40-A745-03833170E061} +// MVID: {61F2AFF9-3DEF-9A40-A745-0383F9AFF261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x067E0000 +// Image base: 0x057D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -63,7 +63,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 30 (0x1e) + // Code size 29 (0x1d) .maxstack 4 .locals init ([0] class [mscorlib]System.Exception V_0, [1] class [mscorlib]System.Exception e, @@ -74,7 +74,7 @@ { IL_0000: nop .line 4,4 : 3,5 '' - IL_0001: leave.s IL_001d + IL_0001: leave.s IL_001c .line 5,5 : 2,6 '' } // end .try @@ -82,30 +82,28 @@ { 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_0009: ldloc.0 + IL_000a: stloc.1 .line 6,6 : 12,31 '' - 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 + IL_000b: ldloc.1 + IL_000c: callvirt instance int32 [mscorlib]System.Object::GetHashCode() + IL_0011: ldc.i4.0 + IL_0012: ceq + IL_0014: brfalse.s IL_001a .line 100001,100001 : 0,0 '' - IL_0017: ldloc.0 - IL_0018: stloc.2 + IL_0016: ldloc.0 + IL_0017: stloc.2 .line 6,6 : 35,37 '' - IL_0019: leave.s IL_001d + IL_0018: leave.s IL_001c .line 7,7 : 10,12 '' - IL_001b: leave.s IL_001d + IL_001a: leave.s IL_001c .line 100001,100001 : 0,0 '' } // end handler - IL_001d: ret + IL_001c: ret } // end of method $TryWith_NoFilterBlocks01::main@ } // end of class ''.$TryWith_NoFilterBlocks01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl index 0150bd6d17c..566cd6a5d6a 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: {61E07032-FF23-CD21-A745-03833270E061} +// MVID: {61F2AFFA-FF23-CD21-A745-0383FAAFF261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x071D0000 +// Image base: 0x06BE0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -363,36 +363,34 @@ .method public strict virtual instance bool Invoke(class [Utils]Utils/Product p) cil managed { - // Code size 38 (0x26) + // Code size 37 (0x25) .maxstack 10 - .line 33,33 : 16,57 '' - IL_0000: nop - .line 100001,100001 : 0,0 '' - 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 33,33 : 16,34 '' + 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 - .line 100001,100001 : 0,0 '' - IL_000a: ldarg.1 - IL_000b: callvirt instance valuetype [mscorlib]System.Decimal [Utils]Utils/Product::get_UnitPrice() - IL_0010: ldc.i4 0x12c + .line 33,33 : 38,57 '' + 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_0015: ldc.i4.0 IL_0016: ldc.i4.0 - IL_0017: ldc.i4.0 - IL_0018: ldc.i4.2 - IL_0019: newobj instance void [netstandard]System.Decimal::.ctor(int32, + IL_0017: ldc.i4.2 + IL_0018: newobj instance void [netstandard]System.Decimal::.ctor(int32, int32, int32, bool, uint8) - IL_001e: call bool [netstandard]System.Decimal::op_GreaterThan(valuetype [netstandard]System.Decimal, + IL_001d: call bool [netstandard]System.Decimal::op_GreaterThan(valuetype [netstandard]System.Decimal, valuetype [netstandard]System.Decimal) - IL_0023: ret + IL_0022: ret .line 100001,100001 : 0,0 '' - IL_0024: ldc.i4.0 - IL_0025: ret + IL_0023: ldc.i4.0 + IL_0024: ret } // end of method 'expensiveInStockProducts@33-1'::Invoke .method private specialname rtspecialname static diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3c.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3c.il.bsl index e95cb9d1dbd..4db042320d2 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: {61E07031-A662-4FAC-A745-03833170E061} +// MVID: {61F2AFF9-A662-4FAC-A745-0383F9AFF261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06DA0000 +// Image base: 0x07520000 // =============== CLASS MEMBERS DECLARATION =================== @@ -80,7 +80,7 @@ .method public static void TestFunction3c() cil managed { - // Code size 97 (0x61) + // Code size 96 (0x60) .maxstack 4 .locals init ([0] int32 x, [1] string V_1, @@ -113,42 +113,40 @@ IL_0020: stloc.3 .line 100001,100001 : 0,0 '' IL_0021: ldloc.3 - IL_0022: brfalse.s IL_0055 + IL_0022: brfalse.s IL_0054 - .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_0024: ldloc.3 + IL_0025: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() + IL_002a: stloc.s msg .line 13,13 : 27,40 '' - IL_002d: ldloc.s msg - IL_002f: ldstr "hello" - IL_0034: call bool [netstandard]System.String::Equals(string, + IL_002c: ldloc.s msg + IL_002e: ldstr "hello" + IL_0033: call bool [netstandard]System.String::Equals(string, string) - IL_0039: brfalse.s IL_0055 + IL_0038: brfalse.s IL_0054 .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 + IL_003a: ldloc.3 + IL_003b: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1::get_Value() + IL_0040: stloc.s V_5 .line 14,14 : 8,23 '' - 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 + IL_0042: ldstr "World" + IL_0047: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_004c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0051: pop + IL_0052: leave.s IL_005f .line 100001,100001 : 0,0 '' - 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 + 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_0060: ret + IL_005f: ret } // end of method TestFunction3c::TestFunction3c } // end of class TestFunction3c diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction9b.il.bsl index ab3658ea0ee..08f18e70431 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: {61E07031-A52C-4FC9-A745-03833170E061} +// MVID: {61F2AFF9-A52C-4FC9-A745-0383F9AFF261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x08E50000 +// Image base: 0x069F0000 // =============== 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 412 (0x19c) + // Code size 409 (0x199) .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, @@ -75,7 +75,7 @@ .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_0196 + IL_0008: brfalse IL_0193 IL_000d: ldloc.0 IL_000e: stloc.1 @@ -85,19 +85,19 @@ IL_0015: ldc.i4.1 IL_0016: sub IL_0017: switch ( - IL_00ff) + IL_00fd) .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_0079) + IL_0078) .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_0196 + IL_003c: brfalse IL_0193 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() @@ -106,159 +106,153 @@ 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_0196 + IL_0053: brtrue IL_0193 - .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_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 .line 8,8 : 18,25 '' - 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_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_0074: br IL_0180 + IL_0073: br IL_017d .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 + 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 .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) + 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) .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 + 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 - .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_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 .line 8,8 : 18,25 '' - 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 + 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 .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 + 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 .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_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_00fa: br IL_017a + IL_00f8: br IL_0177 .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 + 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 .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) + 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) .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 + 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 - .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_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 .line 8,8 : 18,25 '' - 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 + 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 .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 + 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 .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 + 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 .line 6,6 : 16,23 '' - IL_0174: ldstr "three" - IL_0179: ret + IL_0171: ldstr "three" + IL_0176: ret .line 7,7 : 16,23 '' - IL_017a: ldstr "seven" - IL_017f: ret + IL_0177: ldstr "seven" + IL_017c: 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 + 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 .line 8,8 : 29,35 '' - IL_0190: ldstr "four" - IL_0195: ret + IL_018d: ldstr "four" + IL_0192: ret .line 9,9 : 12,17 '' - IL_0196: ldstr "big" - IL_019b: ret + IL_0193: ldstr "big" + IL_0198: 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 70a39e712ec..1d36facd4af 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: {61E07031-A406-DAF4-A745-03833170E061} +// MVID: {61F2AFF9-A406-DAF4-A745-0383F9AFF261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06CD0000 +// Image base: 0x06D40000 // =============== 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 412 (0x19c) + // Code size 409 (0x199) .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, @@ -75,7 +75,7 @@ .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_0196 + IL_0008: brfalse IL_0193 IL_000d: ldloc.0 IL_000e: stloc.1 @@ -85,19 +85,19 @@ IL_0015: ldc.i4.1 IL_0016: sub IL_0017: switch ( - IL_00ff) + IL_00fd) .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_0079) + IL_0078) .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_0196 + IL_003c: brfalse IL_0193 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() @@ -106,159 +106,153 @@ 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_0196 + IL_0053: brtrue IL_0193 - .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_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 .line 8,8 : 18,25 '' - 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_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_0074: br IL_0180 + IL_0073: br IL_017d .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 + 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 .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) + 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) .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 + 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 - .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_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 .line 8,8 : 18,25 '' - 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 + 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 .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 + 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 .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_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_00fa: br IL_017a + IL_00f8: br IL_0177 .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 + 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 .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) + 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) .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 + 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 - .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_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 .line 8,8 : 18,25 '' - 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 + 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 .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 + 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 .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 + 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 .line 6,6 : 16,23 '' - IL_0174: ldstr "three" - IL_0179: ret + IL_0171: ldstr "three" + IL_0176: ret .line 7,7 : 16,23 '' - IL_017a: ldstr "seven" - IL_017f: ret + IL_0177: ldstr "seven" + IL_017c: 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 + 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 .line 8,8 : 29,35 '' - IL_0190: ldstr "four" - IL_0195: ret + IL_018d: ldstr "four" + IL_0192: ret .line 9,9 : 12,17 '' - IL_0196: ldstr "big" - IL_019b: ret + IL_0193: ldstr "big" + IL_0198: 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 83b6129c16e..79a7528cb60 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: {61E07031-9C0B-E35E-A745-03833170E061} +// MVID: {61F2AFF9-9C0B-E35E-A745-0383F9AFF261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07130000 +// Image base: 0x056D0000 // =============== 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 412 (0x19c) + // Code size 409 (0x199) .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, @@ -75,7 +75,7 @@ .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_0196 + IL_0008: brfalse IL_0193 IL_000d: ldloc.0 IL_000e: stloc.1 @@ -85,19 +85,19 @@ IL_0015: ldc.i4.1 IL_0016: sub IL_0017: switch ( - IL_00ff) + IL_00fd) .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_0079) + IL_0078) .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_0196 + IL_003c: brfalse IL_0193 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() @@ -106,159 +106,153 @@ 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_0196 + IL_0053: brtrue IL_0193 - .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_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 .line 8,8 : 18,25 '' - 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_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_0074: br IL_0180 + IL_0073: br IL_017d .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 + 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 .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) + 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) .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 + 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 - .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_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 .line 8,8 : 18,25 '' - 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 + 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 .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 + 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 .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_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_00fa: br IL_017a + IL_00f8: br IL_0177 .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 + 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 .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) + 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) .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 + 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 - .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_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 .line 8,8 : 18,25 '' - 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 + 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 .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 + 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 .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 + 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 .line 6,6 : 16,23 '' - IL_0174: ldstr "three" - IL_0179: ret + IL_0171: ldstr "three" + IL_0176: ret .line 7,7 : 16,23 '' - IL_017a: ldstr "seven" - IL_017f: ret + IL_0177: ldstr "seven" + IL_017c: 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 + 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 .line 8,8 : 29,35 '' - IL_0190: ldstr "four" - IL_0195: ret + IL_018d: ldstr "four" + IL_0192: ret .line 9,9 : 12,17 '' - IL_0196: ldstr "big" - IL_019b: ret + IL_0193: ldstr "big" + IL_0198: 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 24abf24e465..a8219299e3f 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: {61E07031-C1A4-612A-A745-03833170E061} +// MVID: {61F2AFF9-C1A4-612A-A745-0383F9AFF261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07320000 +// Image base: 0x07370000 // =============== 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 412 (0x19c) + // Code size 409 (0x199) .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, @@ -75,7 +75,7 @@ .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_0196 + IL_0008: brfalse IL_0193 IL_000d: ldloc.0 IL_000e: stloc.1 @@ -85,19 +85,19 @@ IL_0015: ldc.i4.1 IL_0016: sub IL_0017: switch ( - IL_00ff) + IL_00fd) .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_0079) + IL_0078) .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_0196 + IL_003c: brfalse IL_0193 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() @@ -106,159 +106,153 @@ 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_0196 + IL_0053: brtrue IL_0193 - .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_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 .line 8,8 : 18,25 '' - 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_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_0074: br IL_0180 + IL_0073: br IL_017d .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 + 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 .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) + 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) .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 + 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 - .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_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 .line 8,8 : 18,25 '' - 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 + 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 .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 + 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 .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_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_00fa: br IL_017a + IL_00f8: br IL_0177 .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 + 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 .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) + 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) .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 + 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 - .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_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 .line 8,8 : 18,25 '' - 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 + 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 .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 + 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 .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 + 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 .line 6,6 : 16,23 '' - IL_0174: ldstr "three" - IL_0179: ret + IL_0171: ldstr "three" + IL_0176: ret .line 7,7 : 16,23 '' - IL_017a: ldstr "seven" - IL_017f: ret + IL_0177: ldstr "seven" + IL_017c: 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 + 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 .line 8,8 : 29,35 '' - IL_0190: ldstr "four" - IL_0195: ret + IL_018d: ldstr "four" + IL_0192: ret .line 9,9 : 12,17 '' - IL_0196: ldstr "big" - IL_019b: ret + IL_0193: ldstr "big" + IL_0198: ret } // end of method TestFunction9b3::TestFunction9b } // end of class TestFunction9b3 diff --git a/tests/walkthroughs/DebugStepping/TheBigFileOfDebugStepping.fsx b/tests/walkthroughs/DebugStepping/TheBigFileOfDebugStepping.fsx index 32bd0e5fa1e..a170890350f 100644 --- a/tests/walkthroughs/DebugStepping/TheBigFileOfDebugStepping.fsx +++ b/tests/walkthroughs/DebugStepping/TheBigFileOfDebugStepping.fsx @@ -1774,12 +1774,14 @@ module Cancellable = match res with Choice1Of2 r -> ret r | Choice2Of2 err -> handler err) *) +let inline invoke ([] f: Cancellable<'T>) ct = f ct + type CancellableBuilder() = member inline _.Delay ([] f: unit -> Cancellable<'T>) : Cancellable<'T> = (fun ct -> let g = f() - g ct) + invoke g ct) member inline _.BindReturn([] comp: Cancellable<'T>, [] f: ('T -> 'U)) : Cancellable<'U> = (fun ct -> @@ -1798,7 +1800,7 @@ type CancellableBuilder() = match comp ct with | ValueOrCancelled.Value res -> let comp2 = f res - comp2 ct + invoke comp2 ct | ValueOrCancelled.Cancelled err -> ValueOrCancelled.Cancelled err) member inline _.Return v = @@ -1824,7 +1826,7 @@ type CancellableBuilder() = while not fin do if ie.MoveNext() then let step = f ie.Current - match step ct with + match invoke step ct with | ValueOrCancelled.Value () -> () | ValueOrCancelled.Cancelled err -> fin <- true From d04c98adbe9387791a7870ff75c238aeae761503 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 27 Jan 2022 16:17:51 +0000 Subject: [PATCH 07/35] fix tests --- src/fsharp/SyntaxTreeOps.fs | 11 + src/fsharp/SyntaxTreeOps.fsi | 9 + src/fsharp/service/FSharpParseFileResults.fs | 4 + .../CodeGen/EmittedIL/TaskGeneratedCode.fs | 958 +++++++++--------- 4 files changed, 488 insertions(+), 494 deletions(-) diff --git a/src/fsharp/SyntaxTreeOps.fs b/src/fsharp/SyntaxTreeOps.fs index 2759b595483..5bb38b5cd25 100644 --- a/src/fsharp/SyntaxTreeOps.fs +++ b/src/fsharp/SyntaxTreeOps.fs @@ -807,3 +807,14 @@ let (|SynPipeRight3|_|) input = when synId.idText = "op_PipeRight3" -> Some (x1a, x1b, x1c, x2) | _ -> None + +let (|SynAndAlso|_|) input = + match input with + | SynBinOp (synId, x1, x2) when synId.idText = "op_BooleanAnd" -> Some (x1, x2) + | _ -> None + +let (|SynOrElse|_|) input = + match input with + | SynBinOp (synId, x1, x2) when synId.idText = "op_BooleanOr" -> Some (x1, x2) + | _ -> None + diff --git a/src/fsharp/SyntaxTreeOps.fsi b/src/fsharp/SyntaxTreeOps.fsi index ecff46167e7..0033f4bbe5e 100644 --- a/src/fsharp/SyntaxTreeOps.fsi +++ b/src/fsharp/SyntaxTreeOps.fsi @@ -268,9 +268,18 @@ val synExprContainsError: inpExpr:SynExpr -> bool val ( |ParsedHashDirectiveArguments| ) : ParsedHashDirectiveArgument list -> string list +/// 'e1 && e2' +val (|SynAndAlso|_|): SynExpr -> (SynExpr * SynExpr) option + +/// 'e1 || e2' +val (|SynOrElse|_|): SynExpr -> (SynExpr * SynExpr) option + +/// 'e1 |> e2' val (|SynPipeRight|_|): SynExpr -> (SynExpr * SynExpr) option +/// 'e1 ||> e2' val (|SynPipeRight2|_|): SynExpr -> (SynExpr * SynExpr * SynExpr) option +/// 'e1 |||> e2' val (|SynPipeRight3|_|): SynExpr -> (SynExpr * SynExpr * SynExpr * SynExpr) option diff --git a/src/fsharp/service/FSharpParseFileResults.fs b/src/fsharp/service/FSharpParseFileResults.fs index 7a2d38d69e3..e5232a57028 100644 --- a/src/fsharp/service/FSharpParseFileResults.fs +++ b/src/fsharp/service/FSharpParseFileResults.fs @@ -527,6 +527,10 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, yield! checkRange e.Range yield! walkExpr false e + | SynAndAlso (e1, e2) -> + yield! walkExpr true e1 + yield! walkExpr true e2 + // Always allow breakpoints on input and stages of x |> f1 |> f2 pipelines | SynPipeRight _ -> let rec loop e = diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs index 4c93cd92625..371b2d44c12 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs @@ -375,111 +375,100 @@ let testTask() = task { try 1+1 finally System.Console.WriteLine("finally") } """ (fun verifier -> verifier.VerifyIL [ """ -.method public strict virtual instance void - MoveNext() cil managed -{ - .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext - - .maxstack 4 - .locals init (int32 V_0, - class [runtime]System.Exception V_1, - bool V_2, - bool V_3, - bool V_4, - class [runtime]System.Exception V_5) - IL_0000: ldarg.0 - IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint - IL_0006: stloc.0 - .try - { - IL_0007: ldc.i4.0 - IL_0008: stloc.3 - IL_0009: ldloc.3 - IL_000a: brfalse.s IL_0010 - - IL_000c: ldc.i4.1 - IL_000d: nop - IL_000e: br.s IL_0012 - - IL_0010: ldloc.3 - IL_0011: nop - IL_0012: stloc.3 - .try - { - IL_0013: nop - IL_0014: ldc.i4.1 - IL_0015: stloc.s V_4 - IL_0017: ldloc.s V_4 - IL_0019: stloc.3 - IL_001a: leave.s IL_003b - - } - catch [runtime]System.Object + .method public strict virtual instance void + MoveNext() cil managed { - IL_001c: castclass [runtime]System.Exception - IL_0021: stloc.s V_5 - IL_0023: ldstr "finally" - IL_0028: call void [runtime]System.Console::WriteLine(string) - IL_002d: ldc.i4.1 - IL_002e: stloc.s V_4 - IL_0030: rethrow - IL_0032: ldnull - IL_0033: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_0038: pop - IL_0039: leave.s IL_003b - - } - IL_003b: ldloc.3 - IL_003c: brfalse.s IL_004e - - IL_003e: ldstr "finally" - IL_0043: call void [runtime]System.Console::WriteLine(string) - IL_0048: ldc.i4.1 - IL_0049: stloc.s V_4 - IL_004b: nop - IL_004c: br.s IL_004f - - IL_004e: nop - IL_004f: ldloc.3 - IL_0050: stloc.2 - IL_0051: ldloc.2 - IL_0052: brfalse.s IL_0071 - - IL_0054: ldarg.0 - IL_0055: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_005a: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_005f: ldarg.0 - IL_0060: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0065: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result - IL_006a: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) - IL_006f: leave.s IL_007f - - IL_0071: leave.s IL_007f - - } - catch [runtime]System.Object - { - IL_0073: castclass [runtime]System.Exception - IL_0078: stloc.s V_5 - IL_007a: ldloc.s V_5 - IL_007c: stloc.1 - IL_007d: leave.s IL_007f - - } - IL_007f: ldloc.1 - IL_0080: stloc.s V_5 - IL_0082: ldloc.s V_5 - IL_0084: brtrue.s IL_0087 - - IL_0086: ret - - IL_0087: ldarg.0 - IL_0088: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_008d: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0092: ldloc.s V_5 - IL_0094: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) - IL_0099: ret -} + .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + bool V_2, + bool V_3, + bool V_4, + class [runtime]System.Exception V_5) + IL_0000: ldarg.0 + IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint + IL_0006: stloc.0 + .try + { + IL_0007: ldc.i4.0 + IL_0008: stloc.3 + .try + { + IL_0009: ldc.i4.1 + IL_000a: stloc.s V_4 + IL_000c: ldloc.s V_4 + IL_000e: stloc.3 + IL_000f: leave.s IL_0030 + + } + catch [runtime]System.Object + { + IL_0011: castclass [runtime]System.Exception + IL_0016: stloc.s V_5 + IL_0018: ldstr "finally" + IL_001d: call void [runtime]System.Console::WriteLine(string) + IL_0022: ldc.i4.1 + IL_0023: stloc.s V_4 + IL_0025: rethrow + IL_0027: ldnull + IL_0028: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_002d: pop + IL_002e: leave.s IL_0030 + + } + IL_0030: ldloc.3 + IL_0031: brfalse.s IL_0043 + + IL_0033: ldstr "finally" + IL_0038: call void [runtime]System.Console::WriteLine(string) + IL_003d: ldc.i4.1 + IL_003e: stloc.s V_4 + IL_0040: nop + IL_0041: br.s IL_0044 + + IL_0043: nop + IL_0044: ldloc.3 + IL_0045: stloc.2 + IL_0046: ldloc.2 + IL_0047: brfalse.s IL_0066 + + IL_0049: ldarg.0 + IL_004a: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_004f: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0054: ldarg.0 + IL_0055: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_005a: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result + IL_005f: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_0064: leave.s IL_0074 + + IL_0066: leave.s IL_0074 + + } + catch [runtime]System.Object + { + IL_0068: castclass [runtime]System.Exception + IL_006d: stloc.s V_5 + IL_006f: ldloc.s V_5 + IL_0071: stloc.1 + IL_0072: leave.s IL_0074 + + } + IL_0074: ldloc.1 + IL_0075: stloc.s V_5 + IL_0077: ldloc.s V_5 + IL_0079: brtrue.s IL_007c + + IL_007b: ret + + IL_007c: ldarg.0 + IL_007d: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0082: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0087: ldloc.s V_5 + IL_0089: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) + IL_008e: ret + } """ ]) @@ -494,115 +483,107 @@ let testTask() = task { try 1+1 finally System.Console.WriteLine("finally") } """ (fun verifier -> verifier.VerifyIL [ """ -.method public strict virtual instance void - MoveNext() cil managed -{ - .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext - - .maxstack 4 - .locals init (int32 V_0, - class [runtime]System.Exception V_1, - bool V_2, - bool V_3, - bool V_4, - class [runtime]System.Exception V_5, - bool V_6, - bool V_7, - class [runtime]System.Exception V_8, - class [runtime]System.Exception V_9) - IL_0000: ldarg.0 - IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint - IL_0006: stloc.0 - .try - { - IL_0007: ldc.i4.0 - IL_0008: stloc.3 - IL_0009: ldloc.3 - IL_000a: brfalse.s IL_0010 - - IL_000c: ldc.i4.1 - IL_000d: nop - IL_000e: br.s IL_0012 - - IL_0010: ldloc.3 - IL_0011: nop - IL_0012: stloc.3 - .try - { - IL_0013: nop - IL_0014: ldc.i4.1 - IL_0015: stloc.s V_4 - IL_0017: ldloc.s V_4 - IL_0019: stloc.3 - IL_001a: leave.s IL_003b - - } - catch [runtime]System.Object + .method public strict virtual instance void + MoveNext() cil managed { - IL_001c: castclass [runtime]System.Exception - IL_0021: stloc.s V_5 - IL_0023: ldstr "finally" - IL_0028: call void [runtime]System.Console::WriteLine(string) - IL_002d: ldc.i4.1 - IL_002e: stloc.s V_6 - IL_0030: rethrow - IL_0032: ldnull - IL_0033: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit - IL_0038: pop - IL_0039: leave.s IL_003b - - } - IL_003b: ldloc.3 - IL_003c: brfalse.s IL_004e - - IL_003e: ldstr "finally" - IL_0043: call void [runtime]System.Console::WriteLine(string) - IL_0048: ldc.i4.1 - IL_0049: stloc.s V_7 - IL_004b: nop - IL_004c: br.s IL_004f - - IL_004e: nop - IL_004f: ldloc.3 - IL_0050: stloc.2 - IL_0051: ldloc.2 - IL_0052: brfalse.s IL_0071 - - IL_0054: ldarg.0 - IL_0055: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_005a: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_005f: ldarg.0 - IL_0060: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0065: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result - IL_006a: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) - IL_006f: leave.s IL_007f - - IL_0071: leave.s IL_007f - - } - catch [runtime]System.Object - { - IL_0073: castclass [runtime]System.Exception - IL_0078: stloc.s V_8 - IL_007a: ldloc.s V_8 - IL_007c: stloc.1 - IL_007d: leave.s IL_007f - - } - IL_007f: ldloc.1 - IL_0080: stloc.s V_9 - IL_0082: ldloc.s V_9 - IL_0084: brtrue.s IL_0087 - - IL_0086: ret - - IL_0087: ldarg.0 - IL_0088: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_008d: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0092: ldloc.s V_9 - IL_0094: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) - IL_0099: ret -} + .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + bool V_2, + bool V_3, + bool V_4, + class [runtime]System.Exception V_5, + bool V_6, + bool V_7, + class [runtime]System.Exception V_8, + class [runtime]System.Exception V_9) + IL_0000: ldarg.0 + IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint + IL_0006: stloc.0 + .try + { + IL_0007: ldc.i4.0 + IL_0008: stloc.3 + .try + { + IL_0009: nop + IL_000a: ldc.i4.1 + IL_000b: stloc.s V_4 + IL_000d: ldloc.s V_4 + IL_000f: stloc.3 + IL_0010: leave.s IL_0032 + + } + catch [runtime]System.Object + { + IL_0012: castclass [runtime]System.Exception + IL_0017: stloc.s V_5 + IL_0019: nop + IL_001a: ldstr "finally" + IL_001f: call void [runtime]System.Console::WriteLine(string) + IL_0024: ldc.i4.1 + IL_0025: stloc.s V_6 + IL_0027: rethrow + IL_0029: ldnull + IL_002a: unbox.any [FSharp.Core]Microsoft.FSharp.Core.Unit + IL_002f: pop + IL_0030: leave.s IL_0032 + + } + IL_0032: ldloc.3 + IL_0033: brfalse.s IL_0046 + + IL_0035: nop + IL_0036: ldstr "finally" + IL_003b: call void [runtime]System.Console::WriteLine(string) + IL_0040: ldc.i4.1 + IL_0041: stloc.s V_7 + IL_0043: nop + IL_0044: br.s IL_0047 + + IL_0046: nop + IL_0047: ldloc.3 + IL_0048: stloc.2 + IL_0049: ldloc.2 + IL_004a: brfalse.s IL_0069 + + IL_004c: ldarg.0 + IL_004d: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0052: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0057: ldarg.0 + IL_0058: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_005d: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result + IL_0062: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_0067: leave.s IL_0077 + + IL_0069: leave.s IL_0077 + + } + catch [runtime]System.Object + { + IL_006b: castclass [runtime]System.Exception + IL_0070: stloc.s V_8 + IL_0072: ldloc.s V_8 + IL_0074: stloc.1 + IL_0075: leave.s IL_0077 + + } + IL_0077: ldloc.1 + IL_0078: stloc.s V_9 + IL_007a: ldloc.s V_9 + IL_007c: brtrue.s IL_007f + + IL_007e: ret + + IL_007f: ldarg.0 + IL_0080: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0085: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_008a: ldloc.s V_9 + IL_008c: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) + IL_0091: ret + } """ ]) @@ -730,120 +711,110 @@ let testTask() = task { try 1 with e -> System.Console.WriteLine("with"); 2 } """ (fun verifier -> verifier.VerifyIL [ """ -.method public strict virtual instance void - MoveNext() cil managed -{ - .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext - - .maxstack 4 - .locals init (int32 V_0, - class [runtime]System.Exception V_1, - bool V_2, - bool V_3, - bool V_4, - class [runtime]System.Exception V_5, - bool V_6, - class [runtime]System.Exception V_7, - class [runtime]System.Exception V_8, - class [runtime]System.Exception V_9, - class [runtime]System.Exception V_10, - class [runtime]System.Exception V_11) - IL_0000: ldarg.0 - IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint - IL_0006: stloc.0 - .try - { - IL_0007: ldc.i4.0 - IL_0008: stloc.3 - IL_0009: ldc.i4.0 - IL_000a: stloc.s V_4 - IL_000c: ldnull - IL_000d: stloc.s V_5 - IL_000f: ldloc.3 - IL_0010: brfalse.s IL_0016 - - IL_0012: ldc.i4.1 - IL_0013: nop - IL_0014: br.s IL_0018 - - IL_0016: ldloc.3 - IL_0017: nop - IL_0018: stloc.3 - .try - { - IL_0019: nop - IL_001a: ldc.i4.1 - IL_001b: stloc.s V_6 - IL_001d: ldloc.s V_6 - IL_001f: stloc.3 - IL_0020: leave.s IL_0032 - - } - catch [runtime]System.Object + .method public strict virtual instance void + MoveNext() cil managed { - IL_0022: castclass [runtime]System.Exception - IL_0027: stloc.s V_7 - IL_0029: ldc.i4.1 - IL_002a: stloc.s V_4 - IL_002c: ldloc.s V_7 - IL_002e: stloc.s V_5 - IL_0030: leave.s IL_0032 - - } - IL_0032: ldloc.s V_4 - IL_0034: brfalse.s IL_004c - - IL_0036: ldloc.s V_5 - IL_0038: stloc.s V_8 - IL_003a: ldloc.s V_8 - IL_003c: stloc.s V_9 - IL_003e: ldstr "with" - IL_0043: call void [runtime]System.Console::WriteLine(string) - IL_0048: ldc.i4.1 - IL_0049: nop - IL_004a: br.s IL_004e - - IL_004c: ldloc.3 - IL_004d: nop - IL_004e: stloc.2 - IL_004f: ldloc.2 - IL_0050: brfalse.s IL_006f - - IL_0052: ldarg.0 - IL_0053: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0058: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_005d: ldarg.0 - IL_005e: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_0063: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result - IL_0068: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) - IL_006d: leave.s IL_007d - - IL_006f: leave.s IL_007d - - } - catch [runtime]System.Object - { - IL_0071: castclass [runtime]System.Exception - IL_0076: stloc.s V_10 - IL_0078: ldloc.s V_10 - IL_007a: stloc.1 - IL_007b: leave.s IL_007d - - } - IL_007d: ldloc.1 - IL_007e: stloc.s V_11 - IL_0080: ldloc.s V_11 - IL_0082: brtrue.s IL_0085 - - IL_0084: ret - - IL_0085: ldarg.0 - IL_0086: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data - IL_008b: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder - IL_0090: ldloc.s V_11 - IL_0092: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) - IL_0097: ret -} + .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + bool V_2, + bool V_3, + bool V_4, + class [runtime]System.Exception V_5, + bool V_6, + class [runtime]System.Exception V_7, + class [runtime]System.Exception V_8, + class [runtime]System.Exception V_9, + class [runtime]System.Exception V_10, + class [runtime]System.Exception V_11) + IL_0000: ldarg.0 + IL_0001: ldfld int32 Test/testTask@4::ResumptionPoint + IL_0006: stloc.0 + .try + { + IL_0007: ldc.i4.0 + IL_0008: stloc.3 + IL_0009: ldc.i4.0 + IL_000a: stloc.s V_4 + IL_000c: ldnull + IL_000d: stloc.s V_5 + .try + { + IL_000f: nop + IL_0010: ldc.i4.1 + IL_0011: stloc.s V_6 + IL_0013: ldloc.s V_6 + IL_0015: stloc.3 + IL_0016: leave.s IL_0028 + + } + catch [runtime]System.Object + { + IL_0018: castclass [runtime]System.Exception + IL_001d: stloc.s V_7 + IL_001f: ldc.i4.1 + IL_0020: stloc.s V_4 + IL_0022: ldloc.s V_7 + IL_0024: stloc.s V_5 + IL_0026: leave.s IL_0028 + + } + IL_0028: ldloc.s V_4 + IL_002a: brfalse.s IL_0042 + + IL_002c: ldloc.s V_5 + IL_002e: stloc.s V_8 + IL_0030: ldloc.s V_8 + IL_0032: stloc.s V_9 + IL_0034: ldstr "with" + IL_0039: call void [runtime]System.Console::WriteLine(string) + IL_003e: ldc.i4.1 + IL_003f: nop + IL_0040: br.s IL_0044 + + IL_0042: ldloc.3 + IL_0043: nop + IL_0044: stloc.2 + IL_0045: ldloc.2 + IL_0046: brfalse.s IL_0065 + + IL_0048: ldarg.0 + IL_0049: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_004e: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0053: ldarg.0 + IL_0054: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0059: ldfld !0 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::Result + IL_005e: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetResult(!0) + IL_0063: leave.s IL_0073 + + IL_0065: leave.s IL_0073 + + } + catch [runtime]System.Object + { + IL_0067: castclass [runtime]System.Exception + IL_006c: stloc.s V_10 + IL_006e: ldloc.s V_10 + IL_0070: stloc.1 + IL_0071: leave.s IL_0073 + + } + IL_0073: ldloc.1 + IL_0074: stloc.s V_11 + IL_0076: ldloc.s V_11 + IL_0078: brtrue.s IL_007b + + IL_007a: ret + + IL_007b: ldarg.0 + IL_007c: ldflda valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1 Test/testTask@4::Data + IL_0081: ldflda valuetype [runtime]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1 valuetype [FSharp.Core]Microsoft.FSharp.Control.TaskStateMachineData`1::MethodBuilder + IL_0086: ldloc.s V_11 + IL_0088: call instance void valuetype [netstandard]System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1::SetException(class [netstandard]System.Exception) + IL_008d: ret + } """ ]) @@ -860,90 +831,89 @@ let testTask() = task { while x > 4 do System.Console.WriteLine("loop") } """ (fun verifier -> verifier.VerifyIL [ """ -.method public strict virtual instance void - MoveNext() cil managed -{ - .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext - - .maxstack 4 - .locals init (int32 V_0, - class [runtime]System.Exception V_1, - bool V_2, - bool V_3, - bool V_4, - class [runtime]System.Exception V_5) - IL_0000: ldarg.0 - IL_0001: ldfld int32 Test/testTask@5::ResumptionPoint - IL_0006: stloc.0 - .try - { - IL_0007: ldc.i4.1 - IL_0008: stloc.3 - 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_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_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 -} + .method public strict virtual instance void + MoveNext() cil managed + { + .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + bool V_2, + bool V_3, + bool V_4, + class [runtime]System.Exception V_5) + IL_0000: ldarg.0 + IL_0001: ldfld int32 Test/testTask@5::ResumptionPoint + IL_0006: stloc.0 + .try + { + 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 + + } + 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_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 + } """ ]) @@ -959,91 +929,91 @@ let testTask() = task { while x > 4 do System.Console.WriteLine("loop") } """ (fun verifier -> verifier.VerifyIL [ """ -.method public strict virtual instance void - MoveNext() cil managed -{ - .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext - - .maxstack 4 - .locals init (int32 V_0, - class [runtime]System.Exception V_1, - bool V_2, - bool V_3, - bool V_4, - class [runtime]System.Exception V_5, - class [runtime]System.Exception V_6) - IL_0000: ldarg.0 - IL_0001: ldfld int32 Test/testTask@5::ResumptionPoint - IL_0006: stloc.0 - .try - { - IL_0007: ldc.i4.1 - IL_0008: stloc.3 - 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_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_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 -} + .method public strict virtual instance void + MoveNext() cil managed + { + .override [runtime]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext + + .maxstack 4 + .locals init (int32 V_0, + class [runtime]System.Exception V_1, + bool V_2, + bool V_3, + bool V_4, + class [runtime]System.Exception V_5, + class [runtime]System.Exception V_6) + IL_0000: ldarg.0 + IL_0001: ldfld int32 Test/testTask@5::ResumptionPoint + IL_0006: stloc.0 + .try + { + IL_0007: ldc.i4.1 + IL_0008: stloc.3 + IL_0009: ldloc.3 + IL_000a: brfalse.s IL_0018 + + IL_000c: nop + 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_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_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 + } """ ]) #endif From e8dc38202a5f3bc7207d9fbb9ad2e0ecc0fa7aae Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 27 Jan 2022 16:40:09 +0000 Subject: [PATCH 08/35] unwind async changes --- src/fsharp/FSharp.Core/async.fs | 59 +++++++--------------- src/fsharp/FSharp.Core/async.fsi | 14 ----- src/fsharp/FSharp.Core/resumable.fs | 1 - tests/FSharp.Core.UnitTests/SurfaceArea.fs | 2 - 4 files changed, 18 insertions(+), 58 deletions(-) diff --git a/src/fsharp/FSharp.Core/async.fs b/src/fsharp/FSharp.Core/async.fs index 5f9230cd3c9..f28526b949a 100644 --- a/src/fsharp/FSharp.Core/async.fs +++ b/src/fsharp/FSharp.Core/async.fs @@ -16,9 +16,6 @@ namespace Microsoft.FSharp.Control open Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicOperators open Microsoft.FSharp.Control open Microsoft.FSharp.Collections -#if !BUILDING_WITH_LKG && !BUILD_FROM_SOURCE - open Microsoft.FSharp.Core.CompilerServices.StateMachineHelpers -#endif type LinkedSubSource(cancellationToken: CancellationToken) = @@ -507,7 +504,7 @@ namespace Microsoft.FSharp.Control let MakeAsync body = { Invoke = body } [] - let inline MakeAsyncWithCancelCheck ([] body) = + let MakeAsyncWithCancelCheck body = MakeAsync (fun ctxt -> if ctxt.IsCancellationRequested then ctxt.OnCancellation () @@ -644,9 +641,7 @@ namespace Microsoft.FSharp.Control /// - Hijack check after 'entering' the try/finally and before running the body (see TryFinally) /// - Apply 'finallyFunction' with exception protection (see TryFinally) let inline CreateTryFinallyAsync finallyFunction computation = - MakeAsync (fun ctxt -> - TryFinally ctxt computation (fun () -> - finallyFunction())) + MakeAsync (fun ctxt -> TryFinally ctxt computation finallyFunction) /// Create an async for a try/with filtering exceptions through a pattern match /// - Cancellation check before entering the try (see TryWith) @@ -654,9 +649,7 @@ namespace Microsoft.FSharp.Control /// - Apply `filterFunction' to argument with exception protection (see TryWith) /// - Hijack check before invoking the resulting computation or exception continuation let inline CreateTryWithFilterAsync filterFunction computation = - MakeAsync (fun ctxt -> - TryWith ctxt computation (fun exn -> - filterFunction exn)) + MakeAsync (fun ctxt -> TryWith ctxt computation filterFunction) /// Create an async for a try/with filtering /// - Cancellation check before entering the try (see TryWith) @@ -664,9 +657,7 @@ namespace Microsoft.FSharp.Control /// - Apply `catchFunction' to argument with exception protection (see TryWith) /// - Hijack check before invoking the resulting computation or exception continuation let inline CreateTryWithAsync catchFunction computation = - MakeAsync (fun ctxt -> - TryWith ctxt computation (fun exn -> - Some (catchFunction exn))) + MakeAsync (fun ctxt -> TryWith ctxt computation (fun exn -> Some (catchFunction exn))) /// Call the finallyFunction if the computation results in a cancellation, and then continue with cancellation. /// If the finally function gives an exception then continue with cancellation regardless. @@ -689,7 +680,7 @@ namespace Microsoft.FSharp.Control /// A single pre-allocated computation that returns a unit result /// - Cancellation check (see CreateReturnAsync) /// - Hijack check (see CreateReturnAsync) - let UnitAsync = + let unitAsync = CreateReturnAsync() /// Implement use/Dispose @@ -699,14 +690,14 @@ namespace Microsoft.FSharp.Control /// - Cancellation check after 'entering' the implied try/finally and before running the body (see CreateTryFinallyAsync) /// - Hijack check after 'entering' the implied try/finally and before running the body (see CreateTryFinallyAsync) /// - Run 'disposeFunction' with exception protection (see CreateTryFinallyAsync) - let inline CreateUsingAsync (resource:'T :> IDisposable) ([] computation:'T -> Async<'a>) : Async<'a> = + let CreateUsingAsync (resource:'T :> IDisposable) (computation:'T -> Async<'a>) : Async<'a> = let disposeFunction () = Microsoft.FSharp.Core.LanguagePrimitives.IntrinsicFunctions.Dispose resource CreateTryFinallyAsync disposeFunction (CreateCallAsync computation resource) /// - Initial cancellation check (see CreateBindAsync) /// - Initial hijack check (see CreateBindAsync) - /// - Cancellation check after (see UnitAsync) - /// - No hijack check after (see UnitAsync) + /// - Cancellation check after (see unitAsync) + /// - No hijack check after (see unitAsync) let inline CreateIgnoreAsync computation = CreateBindAsync computation (fun _ -> UnitAsync) @@ -717,18 +708,18 @@ namespace Microsoft.FSharp.Control /// - Hijack check before each execution of guard (see CreateBindAsync) /// - Cancellation check before each execution of the body after guard (CreateBindAsync) /// - No hijack check before each execution of the body after guard (see CreateBindAsync) - /// - Cancellation check after guard fails (see UnitAsync) - /// - Hijack check after guard fails (see UnitAsync) + /// - Cancellation check after guard fails (see unitAsync) + /// - Hijack check after guard fails (see unitAsync) /// - Apply 'guardFunc' with exception protection (see ProtectCode) // // Note: There are allocations during loop set up, but no allocations during iterations of the loop - let inline CreateWhileAsync ([] guardFunc) computation = + let CreateWhileAsync guardFunc computation = if guardFunc() then let mutable whileAsync = Unchecked.defaultof<_> - whileAsync <- CreateBindAsync computation (fun () -> if guardFunc() then whileAsync else UnitAsync) + whileAsync <- CreateBindAsync computation (fun () -> if guardFunc() then whileAsync else unitAsync) whileAsync else - UnitAsync + unitAsync #if REDUCED_ALLOCATIONS_BUT_RUNS_SLOWER /// Implement the while loop construct of async computation expressions @@ -772,14 +763,10 @@ namespace Microsoft.FSharp.Control // Note: No allocations during iterations of the loop apart from those from // applying the loop body to the element - let inline CreateForLoopAsync (source: seq<_>) computation = + let CreateForLoopAsync (source: seq<_>) computation = CreateUsingAsync (source.GetEnumerator()) (fun ie -> CreateWhileAsync - (fun () -> -#if !BUILDING_WITH_LKG && !BUILD_FROM_SOURCE - __debugPoint "ForLoop.InOrToKeyword" -#endif - ie.MoveNext()) + (fun () -> ie.MoveNext()) (CreateDelayAsync (fun () -> computation ie.Current))) #if REDUCED_ALLOCATIONS_BUT_RUNS_SLOWER @@ -1291,7 +1278,7 @@ namespace Microsoft.FSharp.Control [] type AsyncBuilder() = - member _.Zero () = UnitAsync + member _.Zero () = unitAsync member _.Delay generator = CreateDelayAsync generator @@ -1303,19 +1290,9 @@ namespace Microsoft.FSharp.Control member _.Using (resource, binder) = CreateUsingAsync resource binder -#if BUILDING_WITH_LKG || BUILD_FROM_SOURCE - member _.While (guard, computation) = -#else - member inline _.While (guard, computation) = -#endif - CreateWhileAsync (fun () -> - guard()) computation + member _.While (guard, computation) = CreateWhileAsync guard computation -#if BUILDING_WITH_LKG || BUILD_FROM_SOURCE member _.For (sequence, body) = CreateForLoopAsync sequence body -#else - member inline _.For (sequence, body) = CreateForLoopAsync sequence body -#endif member inline _.Combine (computation1, computation2) = CreateSequentialAsync computation1 computation2 @@ -1334,7 +1311,7 @@ namespace Microsoft.FSharp.Control static member CancellationToken = cancellationTokenAsync - static member CancelCheck () = UnitAsync + static member CancelCheck () = unitAsync static member FromContinuations (callback: ('T -> unit) * (exn -> unit) * (OperationCanceledException -> unit) -> unit) : Async<'T> = MakeAsyncWithCancelCheck (fun ctxt -> diff --git a/src/fsharp/FSharp.Core/async.fsi b/src/fsharp/FSharp.Core/async.fsi index a2a3e52a72c..aeccba2ea0f 100644 --- a/src/fsharp/FSharp.Core/async.fsi +++ b/src/fsharp/FSharp.Core/async.fsi @@ -794,12 +794,6 @@ namespace Microsoft.FSharp.Control /// A value indicating asynchronous execution. val TryWith: ctxt:AsyncActivation<'T> -> computation: Async<'T> -> catchFunction: (Exception -> Async<'T> option) -> AsyncReturn -#if !BUILDING_WITH_LKG && !BUILD_FROM_SOURCE - /// The F# compiler emits calls to this function to implement F# async expressions. - /// The unit-returning async. - val UnitAsync: Async -#endif - [] // Internals used by MailboxProcessor type internal ResultCell<'T> = @@ -838,11 +832,7 @@ namespace Microsoft.FSharp.Control /// for each element. /// /// -#if BUILDING_WITH_LKG || BUILD_FROM_SOURCE member For: sequence:seq<'T> * body:('T -> Async) -> Async -#else - member inline For: sequence:seq<'T> * body:('T -> Async) -> Async -#endif /// Creates an asynchronous computation that just returns (). /// @@ -886,11 +876,7 @@ namespace Microsoft.FSharp.Control /// An asynchronous computation that behaves similarly to a while loop when run. /// /// -#if BUILDING_WITH_LKG || BUILD_FROM_SOURCE member While : guard:(unit -> bool) * computation:Async -> Async -#else - member inline While : guard:(unit -> bool) * computation:Async -> Async -#endif /// Creates an asynchronous computation that returns the result v. /// diff --git a/src/fsharp/FSharp.Core/resumable.fs b/src/fsharp/FSharp.Core/resumable.fs index 813270ff343..326438aad23 100644 --- a/src/fsharp/FSharp.Core/resumable.fs +++ b/src/fsharp/FSharp.Core/resumable.fs @@ -86,7 +86,6 @@ module StateMachineHelpers = [] let __debugPoint (_name: string) : unit = () - //failwith "__debugPoint should always be eliminated by the F# compiler" [] let __resumableEntry () : int option = diff --git a/tests/FSharp.Core.UnitTests/SurfaceArea.fs b/tests/FSharp.Core.UnitTests/SurfaceArea.fs index 831d6ab1af7..2db79e90d6f 100644 --- a/tests/FSharp.Core.UnitTests/SurfaceArea.fs +++ b/tests/FSharp.Core.UnitTests/SurfaceArea.fs @@ -2493,8 +2493,6 @@ Microsoft.FSharp.Reflection.UnionCaseInfo: System.String ToString() Microsoft.FSharp.Reflection.UnionCaseInfo: System.String get_Name() Microsoft.FSharp.Reflection.UnionCaseInfo: System.Type DeclaringType Microsoft.FSharp.Reflection.UnionCaseInfo: System.Type get_DeclaringType() -Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] UnitAsync -Microsoft.FSharp.Control.AsyncPrimitives: Microsoft.FSharp.Control.FSharpAsync`1[Microsoft.FSharp.Core.Unit] get_UnitAsync() Microsoft.FSharp.Core.CompilerServices.StateMachineHelpers: Void __debugPoint(System.String) " #if NETCOREAPP From 10d18fe1bbbd65fc7b68041109b81898195512f0 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 27 Jan 2022 16:41:45 +0000 Subject: [PATCH 09/35] unwind async changes --- src/fsharp/FSharp.Core/async.fs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fsharp/FSharp.Core/async.fs b/src/fsharp/FSharp.Core/async.fs index f28526b949a..ccfb8dd75db 100644 --- a/src/fsharp/FSharp.Core/async.fs +++ b/src/fsharp/FSharp.Core/async.fs @@ -699,7 +699,7 @@ namespace Microsoft.FSharp.Control /// - Cancellation check after (see unitAsync) /// - No hijack check after (see unitAsync) let inline CreateIgnoreAsync computation = - CreateBindAsync computation (fun _ -> UnitAsync) + CreateBindAsync computation (fun _ -> unitAsync) /// Implement the while loop construct of async computation expressions /// - No initial cancellation check before first execution of guard From 53622150f8eb21a3d593156f1615b55040c81000 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 27 Jan 2022 17:27:27 +0000 Subject: [PATCH 10/35] revert changes to async --- src/fsharp/CheckComputationExpressions.fs | 13 +- src/fsharp/CheckDeclarations.fs | 2 + src/fsharp/CheckExpressions.fs | 3 +- src/fsharp/range.fs | 3 + src/fsharp/range.fsi | 12 + .../AsyncExpressionSteppingTest2.il.bsl | 176 +-- .../AsyncExpressionSteppingTest4.il.bsl | 50 +- .../AsyncExpressionSteppingTest5.il.bsl | 1183 ++--------------- 8 files changed, 169 insertions(+), 1273 deletions(-) diff --git a/src/fsharp/CheckComputationExpressions.fs b/src/fsharp/CheckComputationExpressions.fs index 2b83c3c8868..1d1c1360445 100644 --- a/src/fsharp/CheckComputationExpressions.fs +++ b/src/fsharp/CheckComputationExpressions.fs @@ -1736,23 +1736,28 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let basicSynExpr = trans CompExprTranslationPass.Initial (hasCustomOperations ()) (LazyWithContext.NotLazy ([], env)) comp id + let mDelayOrQuoteOrRun = mBuilderVal.NoteSourceConstruct(NotedSourceConstruct.DelayOrQuoteOrRun).MakeSynthetic() + + // Add a call to 'Delay' if the method is present let delayedExpr = match TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mBuilderVal ad "Delay" builderTy with | [] -> basicSynExpr - | _ -> mkSynCall "Delay" mBuilderVal [(mkSynDelay2 basicSynExpr)] + | _ -> + mkSynCall "Delay" mDelayOrQuoteOrRun [(mkSynDelay2 basicSynExpr)] + // Add a call to 'Quote' if the method is present let quotedSynExpr = if isAutoQuote then - SynExpr.Quote (mkSynIdGet (mBuilderVal.MakeSynthetic()) (CompileOpName "<@ @>"), (*isRaw=*)false, delayedExpr, (*isFromQueryExpression=*)true, mWhole) + SynExpr.Quote (mkSynIdGet mDelayOrQuoteOrRun (CompileOpName "<@ @>"), (*isRaw=*)false, delayedExpr, (*isFromQueryExpression=*)true, mWhole) else delayedExpr + // Add a call to 'Run' if the method is present let runExpr = match TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mBuilderVal ad "Run" builderTy with | [] -> quotedSynExpr - | _ -> mkSynCall "Run" mBuilderVal [quotedSynExpr] + | _ -> mkSynCall "Run" mDelayOrQuoteOrRun [quotedSynExpr] let lambdaExpr = - let mBuilderVal = mBuilderVal.MakeSynthetic() SynExpr.Lambda (false, false, SynSimplePats.SimplePats ([mkSynSimplePatVar false (mkSynId mBuilderVal builderValName)], mBuilderVal), None, runExpr, None, mBuilderVal) let env = diff --git a/src/fsharp/CheckDeclarations.fs b/src/fsharp/CheckDeclarations.fs index 2114104c6bf..87e4e9e2d5e 100644 --- a/src/fsharp/CheckDeclarations.fs +++ b/src/fsharp/CheckDeclarations.fs @@ -2091,6 +2091,8 @@ module MutRecBindingChecking = mkUnit g tcref.Range, false, None, defnCs else let inheritsExpr, _ = TcNewExpr cenv envForDecls tpenv g.obj_ty None true (SynExpr.Const (SynConst.Unit, tcref.Range)) tcref.Range + // If there is no 'inherits' add a debug point at the entry to the constructor over the type name itself. + let inheritsExpr = mkDebugPoint tcref.Range inheritsExpr inheritsExpr, false, None, defnCs let envForTycon = MakeInnerEnvForTyconRef envForDecls tcref false diff --git a/src/fsharp/CheckExpressions.fs b/src/fsharp/CheckExpressions.fs index 3e79968c74c..a6196a01c3b 100644 --- a/src/fsharp/CheckExpressions.fs +++ b/src/fsharp/CheckExpressions.fs @@ -5680,7 +5680,8 @@ and TcNonControlFlowExpr (env: TcEnv) f = | NotedSourceConstruct.InOrTo | NotedSourceConstruct.Combine | NotedSourceConstruct.With - | NotedSourceConstruct.While -> + | NotedSourceConstruct.While + | NotedSourceConstruct.DelayOrQuoteOrRun -> res, tpenv | NotedSourceConstruct.None -> // Skip outer debug point for "e1 && e2" and "e1 || e2" diff --git a/src/fsharp/range.fs b/src/fsharp/range.fs index 06add92032e..46ed09e6262 100755 --- a/src/fsharp/range.fs +++ b/src/fsharp/range.fs @@ -72,6 +72,7 @@ type NotedSourceConstruct = | Finally | With | Combine + | DelayOrQuoteOrRun [] module RangeImpl = @@ -265,6 +266,7 @@ type Range(code1:int64, code2: int64) = | 6 -> NotedSourceConstruct.InOrTo | 7 -> NotedSourceConstruct.With | 8 -> NotedSourceConstruct.Combine + | 9 -> NotedSourceConstruct.DelayOrQuoteOrRun | _ -> NotedSourceConstruct.None member m.Start = pos (m.StartLine, m.StartColumn) @@ -298,6 +300,7 @@ type Range(code1:int64, code2: int64) = | NotedSourceConstruct.InOrTo -> 6 | NotedSourceConstruct.With -> 7 | NotedSourceConstruct.Combine -> 8 + | NotedSourceConstruct.DelayOrQuoteOrRun -> 9 range(code1, (code2 &&& ~~~debugPointKindMask) ||| (int64 code <<< debugPointKindShift)) member _.Code1 = code1 diff --git a/src/fsharp/range.fsi b/src/fsharp/range.fsi index a9715be1ce8..b4e00434789 100755 --- a/src/fsharp/range.fsi +++ b/src/fsharp/range.fsi @@ -11,26 +11,38 @@ type internal FileIndex = int32 [] type internal NotedSourceConstruct = | None + /// Notes that a range is related to a "while" in "while .. do" in a computation, list, array or sequence expression | While + /// Notes that a range is related to a "for" in "for .. do" in a computation, list, array or sequence expression | For + /// Notes that a range is related to a "in" in a "for .. in ... do" or "to" in "for .. = .. to .. do" in a computation, list, array or sequence expression | InOrTo + /// Notes that a range is related to a "try" in a "try/with" in a computation, list, array or sequence expression | Try + /// Notes that a range is related to a "let" or other binding range in a computation, list, array or sequence expression | Binding + /// Notes that a range is related to a "finally" in a "try/finally" in a computation, list, array or sequence expression | Finally + /// Notes that a range is related to a "with" in a "try/with" in a computation, list, array or sequence expression | With + /// Notes that a range is related to a sequential "a; b" translated to a "Combine" call in a computation expression /// /// This doesn't include "expr; cexpr" sequentials where the "expr" is a side-effecting simple statement /// This does include "expr; cexpr" sequentials where the "expr" is interpreted as an implicit yield + Combine call | Combine + /// Notes that a range is related to an implied "Delay"m "Quote" or "Run" at the entry to a computation expression. THis doesn't + /// apply to the "Delay" calls added for try/with, try/finally, while or for constructs. + | DelayOrQuoteOrRun + /// Represents a position in a file [] type Position = diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl index 23484cad54f..f931a57cc8a 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000B1 } .module AsyncExpressionSteppingTest2.dll -// MVID: {61EFEE1F-6394-D499-A745-03831FEEEF61} +// MVID: {61F2CC40-6394-D499-A745-038340CCF261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A90000 +// Image base: 0x06940000 // =============== CLASS MEMBERS DECLARATION =================== @@ -144,110 +144,6 @@ } // end of class 'f2@7-2' - .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@6-3' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 guard - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> whileAsync - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 guard, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> whileAsync) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 21 (0x15) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-3'::guard - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-3'::whileAsync - IL_0014: ret - } // end of method 'f2@6-3'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed - { - // Code size 32 (0x20) - .maxstack 8 - .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-3'::guard - IL_0006: ldnull - IL_0007: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_000c: brfalse.s IL_001a - - .line 100001,100001 : 0,0 '' - IL_000e: ldarg.0 - IL_000f: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-3'::whileAsync - IL_0014: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::get_contents() - IL_0019: ret - - .line 100001,100001 : 0,0 '' - IL_001a: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::get_UnitAsync() - IL_001f: ret - } // end of method 'f2@6-3'::Invoke - - } // end of class 'f2@6-3' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f2@6-4' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> part2 - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> part2) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 21 (0x15) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-4'::computation - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-4'::part2 - IL_0014: ret - } // end of method 'f2@6-4'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn - Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - // Code size 21 (0x15) - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-4'::computation - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-4'::part2 - IL_000d: tail. - IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0014: ret - } // end of method 'f2@6-4'::Invoke - - } // end of class 'f2@6-4' - .class auto ansi serializable sealed nested assembly beforefieldinit f2@6 extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { @@ -278,60 +174,26 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 105 (0x69) - .maxstack 7 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, - [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_1, - [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, - [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> V_3, - [4] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_4) - .line 100001,100001 : 0,0 '' + // Code size 53 (0x35) + .maxstack 9 IL_0000: ldarg.0 IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::builder@ - IL_0006: stloc.0 - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::x - IL_000d: newobj instance void AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_0012: stloc.1 - IL_0013: ldarg.0 - IL_0014: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::builder@ - IL_0019: ldarg.0 - IL_001a: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::x - IL_001f: ldarg.0 - IL_0020: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::builder@ - IL_0025: newobj instance void AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@7-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, + IL_0006: ldarg.0 + IL_0007: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::x + IL_000c: newobj instance void AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_0011: ldarg.0 + IL_0012: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::builder@ + IL_0017: ldarg.0 + IL_0018: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::x + IL_001d: ldarg.0 + IL_001e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/f2@6::builder@ + IL_0023: newobj instance void AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@7-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) - IL_002a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_002f: stloc.2 - .line 100001,100001 : 0,0 '' - IL_0030: ldloc.1 - IL_0031: ldnull - IL_0032: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0037: brfalse.s IL_0063 - - .line 100001,100001 : 0,0 '' - IL_0039: ldnull - IL_003a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::.ctor(!0) - IL_003f: stloc.3 - IL_0040: ldloc.3 - IL_0041: ldloc.1 - IL_0042: ldloc.3 - IL_0043: newobj instance void AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>) - IL_0048: stloc.s V_4 - IL_004a: ldloc.2 - IL_004b: ldloc.s V_4 - IL_004d: newobj instance void AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0052: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0057: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::set_contents(!0) - IL_005c: ldloc.3 - IL_005d: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::get_contents() - IL_0062: ret - - .line 100001,100001 : 0,0 '' - IL_0063: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::get_UnitAsync() - IL_0068: ret + IL_0028: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_002d: tail. + IL_002f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::While(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, + class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) + IL_0034: ret } // end of method f2@6::Invoke } // end of class f2@6 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl index f971f80213c..b3be0bcb929 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: {61EFEE1F-6394-6D4B-A745-03831FEEEF61} +// MVID: {61F2CC40-6394-6D4B-A745-038340CCF261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06840000 +// Image base: 0x072B0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -204,43 +204,6 @@ } // end of class 'f4@12-3' - .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@6-5' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 compensation) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-5'::compensation - IL_000d: ret - } // end of method 'f4@6-5'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed - { - // Code size 15 (0xf) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-5'::compensation - IL_0006: ldnull - IL_0007: tail. - IL_0009: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_000e: ret - } // end of method 'f4@6-5'::Invoke - - } // end of class 'f4@6-5' - .class auto ansi serializable sealed nested assembly beforefieldinit 'f4@6-4' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { @@ -274,19 +237,18 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed { - // Code size 26 (0x1a) + // Code size 21 (0x15) .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-4'::computation IL_0007: ldarg.0 IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-4'::compensation - IL_000d: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/'f4@6-5'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0012: tail. - IL_0014: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, + IL_000d: tail. + IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0019: ret + IL_0014: ret } // end of method 'f4@6-4'::Invoke } // end of class 'f4@6-4' diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl index 8559ede9e25..5204fd988fe 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl @@ -15,11 +15,6 @@ .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: .ver 6:0:0:0 } -.assembly extern netstandard -{ - .publickeytoken = (CC 7B 13 FF CD 2D DD 51 ) // .{...-.Q - .ver 2:0:0:0 -} .assembly AsyncExpressionSteppingTest5 { .custom instance void [FSharp.Core]Microsoft.FSharp.Core.FSharpInterfaceDataVersionAttribute::.ctor(int32, @@ -41,13 +36,13 @@ // Offset: 0x000002B0 Length: 0x000000BE } .module AsyncExpressionSteppingTest5.dll -// MVID: {61EFEE1F-6394-30E8-A745-03831FEEEF61} +// MVID: {61F2CC40-6394-30E8-A745-038340CCF261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06880000 +// Image base: 0x05A70000 // =============== CLASS MEMBERS DECLARATION =================== @@ -111,199 +106,136 @@ } // end of class 'f7@6-1' - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-2' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-3' + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 resource + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname - instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 resource) cil managed + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-2'::resource + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-3'::builder@ IL_000d: ret - } // end of method 'f7@6-2'::.ctor + } // end of method 'f7@9-3'::.ctor - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed + .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 + Invoke(int32 _arg2) cil managed { - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-2'::resource - IL_0006: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_000b: nop - IL_000c: ldnull - IL_000d: ret - } // end of method 'f7@6-2'::Invoke + // Code size 48 (0x30) + .maxstack 5 + .locals init ([0] int32 x) + .line 100001,100001 : 0,0 '' + IL_0000: ldarg.1 + IL_0001: stloc.0 + .line 10,10 : 20,37 '' + IL_0002: ldstr "goodbye" + IL_0007: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_000c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0011: pop + .line 11,11 : 20,39 '' + IL_0012: ldstr "goodbye 2" + IL_0017: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_001c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0021: pop + IL_0022: ldarg.0 + IL_0023: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-3'::builder@ + IL_0028: tail. + IL_002a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Zero() + IL_002f: ret + } // end of method 'f7@9-3'::Invoke - } // end of class 'f7@6-2' + } // end of class 'f7@9-3' - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-5' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-2' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 ie + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body, - class [mscorlib]System.Collections.Generic.IEnumerator`1 ie) cil managed + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 21 (0x15) + // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::body - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::ie - IL_0014: ret - } // end of method 'f7@6-5'::.ctor + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-2'::builder@ + IL_000d: ret + } // end of method 'f7@9-2'::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed - { - // Code size 25 (0x19) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::body - IL_0006: ldarg.0 - IL_0007: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::ie - IL_000c: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0011: tail. - IL_0013: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::Invoke(!0) - IL_0018: ret - } // end of method 'f7@6-5'::Invoke - - } // end of class 'f7@6-5' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-6' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> computation - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> computation) cil managed + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 14 (0xe) + // Code size 30 (0x1e) .maxstack 8 + .line 9,9 : 17,20 '' IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-6'::computation - IL_000d: ret - } // end of method 'f7@6-6'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn - Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - // Code size 33 (0x21) - .maxstack 8 - .line 100001,100001 : 0,0 '' - IL_0000: ldarga.s ctxt - IL_0002: call instance bool valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::get_IsCancellationRequested() - IL_0007: brfalse.s IL_0011 - - .line 100001,100001 : 0,0 '' - IL_0009: ldarga.s ctxt - IL_000b: call instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::OnCancellation() - IL_0010: ret - - .line 100001,100001 : 0,0 '' - IL_0011: ldarg.1 - IL_0012: ldnull - IL_0013: ldarg.0 - IL_0014: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-6'::computation - IL_0019: tail. - IL_001b: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::CallThenInvoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - !!1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0020: ret - } // end of method 'f7@6-6'::Invoke + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-2'::builder@ + IL_0006: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5::get_es() + IL_000b: ldarg.0 + IL_000c: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-2'::builder@ + IL_0011: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_0016: tail. + IL_0018: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::For(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_001d: ret + } // end of method 'f7@9-2'::Invoke - } // end of class 'f7@6-6' + } // end of class 'f7@9-2' - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-7' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-4' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 ie - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> whileAsync + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation2 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname - instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 ie, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> whileAsync) cil managed + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation2) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 21 (0x15) + // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-7'::ie - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-7'::whileAsync - IL_0014: ret - } // end of method 'f7@6-7'::.ctor + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::computation2 + IL_000d: ret + } // end of method 'f7@6-4'::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed { - // Code size 31 (0x1f) + // Code size 7 (0x7) .maxstack 8 - .line 6,6 : 23,25 '' IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-7'::ie - IL_0006: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() - IL_000b: brfalse.s IL_0019 - - .line 100001,100001 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-7'::whileAsync - IL_0013: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::get_contents() - IL_0018: ret - - .line 100001,100001 : 0,0 '' - IL_0019: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::get_UnitAsync() - IL_001e: ret - } // end of method 'f7@6-7'::Invoke + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::computation2 + IL_0006: ret + } // end of method 'f7@6-4'::Invoke - } // end of class 'f7@6-7' + } // end of class 'f7@6-4' - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-8' + .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-5' extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation1 .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) @@ -312,7 +244,7 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> part2) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) @@ -323,12 +255,12 @@ IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-8'::computation + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::computation1 IL_000d: ldarg.0 IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-8'::part2 + IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::part2 IL_0014: ret - } // end of method 'f7@6-8'::.ctor + } // end of method 'f7@6-5'::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed @@ -337,963 +269,80 @@ .maxstack 8 IL_0000: ldarg.1 IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-8'::computation + IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::computation1 IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-8'::part2 + IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::part2 IL_000d: tail. IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) IL_0014: ret - } // end of method 'f7@6-8'::Invoke + } // end of method 'f7@6-5'::Invoke - } // end of class 'f7@6-8' + } // end of class 'f7@6-5' - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-4' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> + .class auto ansi serializable sealed nested assembly beforefieldinit f7@6 + extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body + .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body) cil managed + instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed { .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 14 (0xe) .maxstack 8 IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1>::.ctor() + IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() IL_0006: ldarg.0 IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::body + IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ IL_000d: ret - } // end of method 'f7@6-4'::.ctor + } // end of method f7@6::.ctor .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 - Invoke(class [mscorlib]System.Collections.Generic.IEnumerator`1 ie) cil managed + Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 79 (0x4f) + // Code size 80 (0x50) .maxstack 7 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, - [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_1, - [2] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> V_2, + .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, + [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, + [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_2, [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::body - IL_0006: ldarg.1 - IL_0007: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, - class [mscorlib]System.Collections.Generic.IEnumerator`1) - IL_000c: stloc.1 - IL_000d: ldloc.1 - IL_000e: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-6'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0013: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0018: stloc.0 - .line 6,6 : 23,25 '' - IL_0019: ldarg.1 - IL_001a: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() - IL_001f: brfalse.s IL_0049 - - .line 100001,100001 : 0,0 '' - IL_0021: ldnull - IL_0022: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::.ctor(!0) - IL_0027: stloc.2 - IL_0028: ldloc.2 - IL_0029: ldarg.1 - IL_002a: ldloc.2 - IL_002b: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-7'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>) - IL_0030: stloc.3 - IL_0031: ldloc.0 - IL_0032: ldloc.3 - IL_0033: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-8'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0038: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_003d: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::set_contents(!0) - IL_0042: ldloc.2 - IL_0043: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::get_contents() - IL_0048: ret - - .line 100001,100001 : 0,0 '' - IL_0049: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::get_UnitAsync() - IL_004e: ret - } // end of method 'f7@6-4'::Invoke - - } // end of class 'f7@6-4' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-3' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 resource - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body, - class [mscorlib]System.Collections.Generic.IEnumerator`1 resource) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 21 (0x15) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-3'::body - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-3'::resource - IL_0014: ret - } // end of method 'f7@6-3'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn - Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - // Code size 26 (0x1a) - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-3'::resource - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-3'::body - IL_000d: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0012: tail. - IL_0014: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::CallThenInvoke>(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - !!1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0019: ret - } // end of method 'f7@6-3'::Invoke - - } // end of class 'f7@6-3' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-10' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 disposeFunction - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 disposeFunction) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-10'::disposeFunction - IL_000d: ret - } // end of method 'f7@6-10'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed - { - // Code size 15 (0xf) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-10'::disposeFunction - IL_0006: ldnull - IL_0007: tail. - IL_0009: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_000e: ret - } // end of method 'f7@6-10'::Invoke - - } // end of class 'f7@6-10' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-9' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 disposeFunction - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 disposeFunction, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 21 (0x15) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-9'::disposeFunction - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-9'::computation - IL_0014: ret - } // end of method 'f7@6-9'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn - Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - // Code size 26 (0x1a) - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-9'::computation - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-9'::disposeFunction - IL_000d: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-10'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0012: tail. - IL_0014: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0019: ret - } // end of method 'f7@6-9'::Invoke - - } // end of class 'f7@6-9' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-12' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-12'::builder@ - IL_000d: ret - } // end of method 'f7@9-12'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 - Invoke(int32 _arg2) cil managed - { - // Code size 48 (0x30) - .maxstack 5 - .locals init ([0] int32 x) - .line 100001,100001 : 0,0 '' - IL_0000: ldarg.1 - IL_0001: stloc.0 - .line 10,10 : 20,37 '' - IL_0002: ldstr "goodbye" - IL_0007: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_000c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0011: pop - .line 11,11 : 20,39 '' - IL_0012: ldstr "goodbye 2" - IL_0017: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) - IL_001c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) - IL_0021: pop - IL_0022: ldarg.0 - IL_0023: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-12'::builder@ - IL_0028: tail. - IL_002a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Zero() - IL_002f: ret - } // end of method 'f7@9-12'::Invoke - - } // end of class 'f7@9-12' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-13' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 resource - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 resource) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-13'::resource - IL_000d: ret - } // end of method 'f7@9-13'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed - { - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-13'::resource - IL_0006: call void [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives/IntrinsicFunctions::Dispose>(!!0) - IL_000b: nop - IL_000c: ldnull - IL_000d: ret - } // end of method 'f7@9-13'::Invoke - - } // end of class 'f7@9-13' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-16' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 ie - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body, - class [mscorlib]System.Collections.Generic.IEnumerator`1 ie) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 21 (0x15) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-16'::body - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-16'::ie - IL_0014: ret - } // end of method 'f7@9-16'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed - { - // Code size 25 (0x19) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-16'::body - IL_0006: ldarg.0 - IL_0007: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-16'::ie - IL_000c: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0011: tail. - IL_0013: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::Invoke(!0) - IL_0018: ret - } // end of method 'f7@9-16'::Invoke - - } // end of class 'f7@9-16' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-17' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> computation - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> computation) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-17'::computation - IL_000d: ret - } // end of method 'f7@9-17'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn - Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - // Code size 33 (0x21) - .maxstack 8 - .line 100001,100001 : 0,0 '' - IL_0000: ldarga.s ctxt - IL_0002: call instance bool valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::get_IsCancellationRequested() - IL_0007: brfalse.s IL_0011 - - .line 100001,100001 : 0,0 '' - IL_0009: ldarga.s ctxt - IL_000b: call instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1::OnCancellation() - IL_0010: ret - - .line 100001,100001 : 0,0 '' - IL_0011: ldarg.1 - IL_0012: ldnull - IL_0013: ldarg.0 - IL_0014: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-17'::computation - IL_0019: tail. - IL_001b: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::CallThenInvoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - !!1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0020: ret - } // end of method 'f7@9-17'::Invoke - - } // end of class 'f7@9-17' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-18' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 ie - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> whileAsync - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1 ie, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> whileAsync) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 21 (0x15) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-18'::ie - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-18'::whileAsync - IL_0014: ret - } // end of method 'f7@9-18'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed - { - // Code size 31 (0x1f) - .maxstack 8 - .line 9,9 : 23,25 '' - IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-18'::ie - IL_0006: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() - IL_000b: brfalse.s IL_0019 - - .line 100001,100001 : 0,0 '' - IL_000d: ldarg.0 - IL_000e: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-18'::whileAsync - IL_0013: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::get_contents() - IL_0018: ret - - .line 100001,100001 : 0,0 '' - IL_0019: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::get_UnitAsync() - IL_001e: ret - } // end of method 'f7@9-18'::Invoke - - } // end of class 'f7@9-18' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-19' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> part2 - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> part2) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 21 (0x15) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-19'::computation - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-19'::part2 - IL_0014: ret - } // end of method 'f7@9-19'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn - Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - // Code size 21 (0x15) - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-19'::computation - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-19'::part2 - IL_000d: tail. - IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0014: ret - } // end of method 'f7@9-19'::Invoke - - } // end of class 'f7@9-19' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-15' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-15'::body - IL_000d: ret - } // end of method 'f7@9-15'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 - Invoke(class [mscorlib]System.Collections.Generic.IEnumerator`1 ie) cil managed - { - // Code size 79 (0x4f) - .maxstack 7 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_0, - [1] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_1, - [2] class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1> V_2, - [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_3) - .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-15'::body - IL_0006: ldarg.1 - IL_0007: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-16'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, - class [mscorlib]System.Collections.Generic.IEnumerator`1) - IL_000c: stloc.1 - IL_000d: ldloc.1 - IL_000e: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-17'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0013: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0018: stloc.0 - .line 9,9 : 23,25 '' - IL_0019: ldarg.1 - IL_001a: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() - IL_001f: brfalse.s IL_0049 - - .line 100001,100001 : 0,0 '' - IL_0021: ldnull - IL_0022: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::.ctor(!0) - IL_0027: stloc.2 - IL_0028: ldloc.2 - IL_0029: ldarg.1 - IL_002a: ldloc.2 - IL_002b: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-18'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>) - IL_0030: stloc.3 - IL_0031: ldloc.0 - IL_0032: ldloc.3 - IL_0033: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-19'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0038: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_003d: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::set_contents(!0) - IL_0042: ldloc.2 - IL_0043: call instance !0 class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1>::get_contents() - IL_0048: ret - - .line 100001,100001 : 0,0 '' - IL_0049: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::get_UnitAsync() - IL_004e: ret - } // end of method 'f7@9-15'::Invoke - - } // end of class 'f7@9-15' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-14' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [mscorlib]System.Collections.Generic.IEnumerator`1 resource - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> body, - class [mscorlib]System.Collections.Generic.IEnumerator`1 resource) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 21 (0x15) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-14'::body - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-14'::resource - IL_0014: ret - } // end of method 'f7@9-14'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn - Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - // Code size 26 (0x1a) - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld class [mscorlib]System.Collections.Generic.IEnumerator`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-14'::resource - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-14'::body - IL_000d: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-15'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0012: tail. - IL_0014: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::CallThenInvoke>(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - !!1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0019: ret - } // end of method 'f7@9-14'::Invoke - - } // end of class 'f7@9-14' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-21' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 disposeFunction - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 disposeFunction) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-21'::disposeFunction - IL_000d: ret - } // end of method 'f7@9-21'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Core.Unit - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed - { - // Code size 15 (0xf) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-21'::disposeFunction - IL_0006: ldnull - IL_0007: tail. - IL_0009: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_000e: ret - } // end of method 'f7@9-21'::Invoke - - } // end of class 'f7@9-21' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-20' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 disposeFunction - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 disposeFunction, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 21 (0x15) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-20'::disposeFunction - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-20'::computation - IL_0014: ret - } // end of method 'f7@9-20'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn - Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - // Code size 26 (0x1a) - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-20'::computation - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-20'::disposeFunction - IL_000d: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-21'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0012: tail. - IL_0014: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::TryFinally(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0019: ret - } // end of method 'f7@9-20'::Invoke - - } // end of class 'f7@9-20' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@9-11' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-11'::builder@ - IL_000d: ret - } // end of method 'f7@9-11'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - // Code size 71 (0x47) - .maxstack 6 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, - [1] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_1, - [2] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_2, - [3] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_3, - [4] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_4, - [5] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_5) - .line 9,9 : 17,20 '' - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-11'::builder@ - IL_0006: stloc.0 - IL_0007: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5::get_es() - IL_000c: stloc.1 - IL_000d: ldarg.0 - IL_000e: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-11'::builder@ - IL_0013: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-12'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) - IL_0018: stloc.2 - IL_0019: ldloc.1 - IL_001a: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_001f: stloc.3 - IL_0020: ldloc.3 - IL_0021: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-13'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1) - IL_0026: stloc.s V_4 - IL_0028: ldloc.2 - IL_0029: ldloc.3 - IL_002a: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-14'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, - class [mscorlib]System.Collections.Generic.IEnumerator`1) - IL_002f: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0034: stloc.s V_5 - IL_0036: ldloc.s V_4 - IL_0038: ldloc.s V_5 - IL_003a: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-20'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) - IL_003f: tail. - IL_0041: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0046: ret - } // end of method 'f7@9-11'::Invoke - - } // end of class 'f7@9-11' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-22' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation2 - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation2) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-22'::computation2 - IL_000d: ret - } // end of method 'f7@6-22'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar0) cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-22'::computation2 - IL_0006: ret - } // end of method 'f7@6-22'::Invoke - - } // end of class 'f7@6-22' - - .class auto ansi serializable sealed nested assembly beforefieldinit 'f7@6-23' - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn> - { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation1 - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .field public class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> part2 - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 computation1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> part2) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 21 (0x15) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-23'::computation1 - IL_000d: ldarg.0 - IL_000e: ldarg.2 - IL_000f: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-23'::part2 - IL_0014: ret - } // end of method 'f7@6-23'::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn - Invoke(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1 ctxt) cil managed - { - // Code size 21 (0x15) - .maxstack 8 - IL_0000: ldarg.1 - IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-23'::computation1 - IL_0007: ldarg.0 - IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-23'::part2 - IL_000d: tail. - IL_000f: call class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::Bind(valuetype [FSharp.Core]Microsoft.FSharp.Control.AsyncActivation`1, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0014: ret - } // end of method 'f7@6-23'::Invoke - - } // end of class 'f7@6-23' - - .class auto ansi serializable sealed nested assembly beforefieldinit f7@6 - extends class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> - { - .field public class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@ - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly specialname rtspecialname - instance void .ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder builder@) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ - IL_000d: ret - } // end of method f7@6::.ctor - - .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 - Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed - { - // Code size 130 (0x82) - .maxstack 6 - .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_0, - [1] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_1, - [2] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder V_2, - [3] class [mscorlib]System.Collections.Generic.IEnumerable`1 V_3, - [4] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_4, - [5] class [mscorlib]System.Collections.Generic.IEnumerator`1 V_5, - [6] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2 V_6, - [7] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_7, - [8] class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 V_8, - [9] class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2> V_9) - .line 100001,100001 : 0,0 '' - IL_0000: ldarg.0 - IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ - IL_0006: stloc.0 - .line 6,6 : 17,20 '' + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ + IL_0006: stloc.0 + .line 6,6 : 17,20 '' IL_0007: ldarg.0 IL_0008: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ - IL_000d: stloc.2 - IL_000e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5::get_es() - IL_0013: stloc.3 - IL_0014: ldarg.0 - IL_0015: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ - IL_001a: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) - IL_001f: stloc.s V_4 - IL_0021: ldloc.3 - IL_0022: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0027: stloc.s V_5 - IL_0029: ldloc.s V_5 - IL_002b: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-2'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1) - IL_0030: stloc.s V_6 - IL_0032: ldloc.s V_4 - IL_0034: ldloc.s V_5 - IL_0036: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, - class [mscorlib]System.Collections.Generic.IEnumerator`1) - IL_003b: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0040: stloc.s V_7 - IL_0042: ldloc.s V_6 - IL_0044: ldloc.s V_7 - IL_0046: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-9'::.ctor(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, - class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) - IL_004b: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0050: stloc.1 - IL_0051: ldarg.0 - IL_0052: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ - IL_0057: ldarg.0 - IL_0058: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ - IL_005d: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-11'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) - IL_0062: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0067: stloc.s V_8 - IL_0069: ldloc.s V_8 - IL_006b: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-22'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) - IL_0070: stloc.s V_9 - IL_0072: ldloc.1 - IL_0073: ldloc.s V_9 - IL_0075: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-23'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, - class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_007a: tail. - IL_007c: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) - IL_0081: ret + IL_000d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5::get_es() + IL_0012: ldarg.0 + IL_0013: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ + IL_0018: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-1'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_001d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::For(class [mscorlib]System.Collections.Generic.IEnumerable`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0022: stloc.1 + IL_0023: ldarg.0 + IL_0024: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ + IL_0029: ldarg.0 + IL_002a: ldfld class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::builder@ + IL_002f: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@9-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) + IL_0034: callvirt instance class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder::Delay(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0039: stloc.2 + IL_003a: ldloc.2 + IL_003b: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-4'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1) + IL_0040: stloc.3 + IL_0041: ldloc.1 + IL_0042: ldloc.3 + IL_0043: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/'f7@6-5'::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1, + class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) + IL_0048: tail. + IL_004a: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsync`1 [FSharp.Core]Microsoft.FSharp.Control.AsyncPrimitives::MakeAsync(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,class [FSharp.Core]Microsoft.FSharp.Control.AsyncReturn>) + IL_004f: ret } // end of method f7@6::Invoke } // end of class f7@6 From 0d5656ffa37dcf1457a2a4c0c86dde1f8b513277 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 27 Jan 2022 17:44:31 +0000 Subject: [PATCH 11/35] remove false extra debug points from computation expressions --- .../AsyncExpressionSteppingTest1.il.bsl | 5 +- .../AsyncExpressionSteppingTest2.il.bsl | 3 +- .../AsyncExpressionSteppingTest3.il.bsl | 5 +- .../AsyncExpressionSteppingTest4.il.bsl | 5 +- .../AsyncExpressionSteppingTest5.il.bsl | 5 +- .../AsyncExpressionSteppingTest6.il.bsl | 6 +- .../CompiledNameAttribute04.il.bsl | 9 +- .../ComputationExpr01.il.bsl | 5 +- .../ComputationExpr02.il.bsl | 5 +- .../ComputationExpr03.il.bsl | 7 +- .../ComputationExpr04.il.bsl | 5 +- .../ComputationExpr05.il.bsl | 5 +- .../ComputationExpr06.il.bsl | 5 +- .../ComputationExpr07.il.bsl | 5 +- .../EmittedIL/Misc/AbstractClass.il.bsl | 9 +- .../Misc/ArgumentNamesInClosures01.il.bsl | 5 +- .../Misc/GenericTypeStaticField01.il.bsl | 10 +- .../Misc/NonEscapingArguments02.il.bsl | 9 +- .../Source/CodeGen/EmittedIL/Misc/cas.il.bsl | 9 +- .../Linq101Aggregates01.il.bsl | 901 +++++++++--------- .../Linq101ElementOperators01.il.bsl | 109 +-- .../Linq101Grouping01.il.bsl | 10 +- .../Linq101Joins01.il.bsl | 8 +- .../Linq101Ordering01.il.bsl | 10 +- .../Linq101Partitioning01.il.bsl | 10 +- .../Linq101Quantifiers01.il.bsl | 218 +++-- .../Linq101Select01.il.bsl | 16 +- .../Linq101SetOperators01.il.bsl | 8 +- .../Linq101Where01.il.bsl | 9 +- .../ToplevelModule.il.bsl | 6 +- .../ToplevelNamespace.il.bsl | 7 +- .../StaticInit/StaticInit_Class01.il.bsl | 9 +- .../TestFunctions/TestFunction19.il.bsl | 9 +- .../TestFunctions/TestFunction20.il.bsl | 6 +- .../TestFunctions/TestFunction23.il.bsl | 9 +- .../EmittedIL/Tuples/OptionalArg01.il.bsl | 10 +- 36 files changed, 695 insertions(+), 777 deletions(-) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl index b7deae82822..4b43c80e4ce 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000B1 } .module AsyncExpressionSteppingTest1.dll -// MVID: {61E07031-6394-B5D4-A745-03833170E061} +// MVID: {61F2D6A5-6394-B5D4-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B60000 +// Image base: 0x06F60000 // =============== CLASS MEMBERS DECLARATION =================== @@ -116,7 +116,6 @@ .line 6,6 : 9,14 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_0005: stloc.0 - .line 6,6 : 9,14 '' IL_0006: ldloc.0 IL_0007: ldloc.0 IL_0008: newobj instance void AsyncExpressionSteppingTest1/AsyncExpressionSteppingTest1/f1@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl index f931a57cc8a..2d367600087 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl @@ -36,7 +36,7 @@ // Offset: 0x00000268 Length: 0x000000B1 } .module AsyncExpressionSteppingTest2.dll -// MVID: {61F2CC40-6394-D499-A745-038340CCF261} +// MVID: {61F2D6A5-6394-D499-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 @@ -212,7 +212,6 @@ .line 6,6 : 9,14 '' IL_0007: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_000c: stloc.1 - .line 6,6 : 9,14 '' IL_000d: ldloc.1 IL_000e: ldloc.0 IL_000f: ldloc.1 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest3.il.bsl index 468d3191b03..00a2f6ce8a4 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: {61EFEE1F-6394-F35E-A745-03831FEEEF61} +// MVID: {61F2D6A5-6394-F35E-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07220000 +// Image base: 0x069A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -173,7 +173,6 @@ .line 5,5 : 9,14 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_0005: stloc.0 - .line 5,5 : 9,14 '' IL_0006: ldloc.0 IL_0007: ldloc.0 IL_0008: newobj instance void AsyncExpressionSteppingTest3/AsyncExpressionSteppingTest3/f3@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest4.il.bsl index b3be0bcb929..2b3d8d6fbf8 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: {61F2CC40-6394-6D4B-A745-038340CCF261} +// MVID: {61F2D6A5-6394-6D4B-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x072B0000 +// Image base: 0x07140000 // =============== CLASS MEMBERS DECLARATION =================== @@ -323,7 +323,6 @@ .line 5,5 : 9,14 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_0005: stloc.0 - .line 5,5 : 9,14 '' IL_0006: ldloc.0 IL_0007: ldloc.0 IL_0008: newobj instance void AsyncExpressionSteppingTest4/AsyncExpressionSteppingTest4/f4@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest5.il.bsl index 5204fd988fe..89b5f397ce7 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: {61F2CC40-6394-30E8-A745-038340CCF261} +// MVID: {61F2D6A5-6394-30E8-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05A70000 +// Image base: 0x06DC0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -365,7 +365,6 @@ .line 6,6 : 9,14 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_0005: stloc.0 - .line 6,6 : 9,14 '' IL_0006: ldloc.0 IL_0007: ldloc.0 IL_0008: newobj instance void AsyncExpressionSteppingTest5/AsyncExpressionSteppingTest5/f7@6::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest6.il.bsl index 1ece0a88b4d..6cf7f4b83d6 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: {61EFEE1F-6394-4FAD-A745-03831FEEEF61} +// MVID: {61F2D6A5-6394-4FAD-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x067A0000 +// Image base: 0x05370000 // =============== CLASS MEMBERS DECLARATION =================== @@ -721,7 +721,6 @@ .line 5,5 : 9,14 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_0005: stloc.0 - .line 5,5 : 9,14 '' IL_0006: ldloc.0 IL_0007: ldloc.0 IL_0008: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/f2@5::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) @@ -739,7 +738,6 @@ .line 13,13 : 9,14 '' IL_0000: call class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_DefaultAsyncBuilder() IL_0005: stloc.0 - .line 13,13 : 9,14 '' IL_0006: ldloc.0 IL_0007: ldloc.0 IL_0008: newobj instance void AsyncExpressionSteppingTest6/AsyncExpressionSteppingTest6/f3@13::.ctor(class [FSharp.Core]Microsoft.FSharp.Control.FSharpAsyncBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/CompiledNameAttribute/CompiledNameAttribute04.il.bsl index a2f0ef812f8..34fe1c3a684 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: {61E07031-34DF-584F-A745-03833170E061} +// MVID: {61F2D6A5-34DF-584F-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07310000 +// Image base: 0x07550000 // =============== CLASS MEMBERS DECLARATION =================== @@ -73,6 +73,8 @@ { // Code size 9 (0x9) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 20,20 : 6,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CompiledNameAttribute\\CompiledNameAttribute04.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 @@ -85,8 +87,7 @@ { // Code size 2 (0x2) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 21,21 : 19,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\CompiledNameAttribute\\CompiledNameAttribute04.fs' + .line 21,21 : 19,20 '' IL_0000: ldc.i4.1 IL_0001: ret } // end of method C::get_P diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr01.il.bsl index e77c2a162b7..8cb3a7dadd6 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr01.il.bsl @@ -40,13 +40,13 @@ // Offset: 0x00000218 Length: 0x0000007D } .module ComputationExpr01.exe -// MVID: {61E07031-3703-E566-A745-03833170E061} +// MVID: {61F2D6A5-3703-E566-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07390000 +// Image base: 0x07190000 // =============== CLASS MEMBERS DECLARATION =================== @@ -131,7 +131,6 @@ .line 7,7 : 5,15 '' IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 - .line 7,7 : 5,15 '' IL_0006: ldloc.1 IL_0007: ldloc.1 IL_0008: newobj instance void ComputationExpr01/res1@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr02.il.bsl index 89ea4f002d0..f2c964aa910 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: {61E07031-3624-E566-A745-03833170E061} +// MVID: {61F2D6A5-3624-E566-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06F40000 +// Image base: 0x071D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -145,7 +145,6 @@ .line 7,7 : 5,15 '' IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 - .line 7,7 : 5,15 '' IL_0006: ldloc.1 IL_0007: ldloc.1 IL_0008: newobj instance void ComputationExpr02/res2@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr03.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr03.il.bsl index 6278a362b58..b61b543873a 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: {61E07031-3649-E566-A745-03833170E061} +// MVID: {61F2D6A5-3649-E566-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07350000 +// Image base: 0x07320000 // =============== CLASS MEMBERS DECLARATION =================== @@ -237,7 +237,6 @@ IL_0003: ldfld class [ComputationExprLibrary]Library.EventuallyBuilder ComputationExpr03/'res3@15-1'::builder@ IL_0008: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_000d: stloc.1 - .line 16,16 : 13,23 '' IL_000e: ldloc.1 IL_000f: ldloc.1 IL_0010: newobj instance void ComputationExpr03/'res3@17-2'::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) @@ -352,7 +351,6 @@ .line 7,7 : 5,15 '' IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.2 - .line 7,7 : 5,15 '' IL_0006: ldloc.2 IL_0007: ldloc.2 IL_0008: newobj instance void ComputationExpr03/res2@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) @@ -370,7 +368,6 @@ .line 13,13 : 5,15 '' IL_0026: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_002b: stloc.s V_4 - .line 13,13 : 5,15 '' IL_002d: ldloc.s V_4 IL_002f: ldloc.s V_4 IL_0031: newobj instance void ComputationExpr03/res3@14::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr04.il.bsl index c4837548c57..35d59d998d9 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: {61E07031-366A-E566-A745-03833170E061} +// MVID: {61F2D6A5-366A-E566-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07120000 +// Image base: 0x06E30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -261,7 +261,6 @@ .line 5,5 : 5,15 '' IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 - .line 5,5 : 5,15 '' IL_0006: ldloc.1 IL_0007: ldloc.1 IL_0008: newobj instance void ComputationExpr04/res4@6::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr05.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr05.il.bsl index 94076cd37de..c16eee3c74d 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: {61E07031-3687-E566-A745-03833170E061} +// MVID: {61F2D6A5-3687-E566-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06E70000 +// Image base: 0x06E50000 // =============== CLASS MEMBERS DECLARATION =================== @@ -236,7 +236,6 @@ .line 7,7 : 5,15 '' IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 - .line 7,7 : 5,15 '' IL_0006: ldloc.1 IL_0007: ldloc.1 IL_0008: newobj instance void ComputationExpr05/res5@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.il.bsl index 44ae6919cdd..05265ca99e5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.il.bsl @@ -40,13 +40,13 @@ // Offset: 0x00000218 Length: 0x0000007D } .module ComputationExpr06.exe -// MVID: {61E07031-35A8-E566-A745-03833170E061} +// MVID: {61F2D6A5-35A8-E566-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B20000 +// Image base: 0x06DB0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -301,7 +301,6 @@ .line 7,7 : 5,15 '' IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 - .line 7,7 : 5,15 '' IL_0006: ldloc.1 IL_0007: ldloc.1 IL_0008: newobj instance void ComputationExpr06/res6@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr07.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr07.il.bsl index b5c73a6bddb..f1c492b2867 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr07.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr07.il.bsl @@ -40,13 +40,13 @@ // Offset: 0x00000218 Length: 0x0000007D } .module ComputationExpr07.exe -// MVID: {61E07031-35BD-E566-A745-03833170E061} +// MVID: {61F2D6A5-35BD-E566-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07070000 +// Image base: 0x07190000 // =============== CLASS MEMBERS DECLARATION =================== @@ -262,7 +262,6 @@ .line 7,7 : 5,15 '' IL_0000: call class [ComputationExprLibrary]Library.EventuallyBuilder [ComputationExprLibrary]Library.TheEventuallyBuilder::get_eventually() IL_0005: stloc.1 - .line 7,7 : 5,15 '' IL_0006: ldloc.1 IL_0007: ldloc.1 IL_0008: newobj instance void ComputationExpr07/res7@8::.ctor(class [ComputationExprLibrary]Library.EventuallyBuilder) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AbstractClass.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AbstractClass.il.bsl index 035e4385fe1..53be01d947b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AbstractClass.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/AbstractClass.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000308 Length: 0x000000B1 } .module AbstractClass.exe -// MVID: {61E07031-333C-8BAF-A745-03833170E061} +// MVID: {61F2D6A5-333C-8BAF-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04E00000 +// Image base: 0x07160000 // =============== CLASS MEMBERS DECLARATION =================== @@ -61,6 +61,8 @@ { // Code size 9 (0x9) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 4,4 : 6,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\AbstractClass.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 @@ -73,8 +75,7 @@ { // Code size 8 (0x8) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 22,26 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\AbstractClass.fs' + .line 5,5 : 22,26 '' IL_0000: ldarg.0 IL_0001: ldc.i4.1 IL_0002: callvirt instance void AbstractClass/X::.ctor(int32) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ArgumentNamesInClosures01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ArgumentNamesInClosures01.il.bsl index 341656266c5..5fd72c0d5c9 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ArgumentNamesInClosures01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/ArgumentNamesInClosures01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000003A0 Length: 0x0000010D } .module ArgumentNamesInClosures01.dll -// MVID: {61E07031-39CA-41B5-A745-03833170E061} +// MVID: {61F2D6A5-39CA-41B5-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07340000 +// Image base: 0x07320000 // =============== CLASS MEMBERS DECLARATION =================== @@ -83,6 +83,7 @@ { // Code size 9 (0x9) .maxstack 8 + .line 40,40 : 10,11 '' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GenericTypeStaticField01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GenericTypeStaticField01.il.bsl index 30a3cf15112..26d0b0250c8 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GenericTypeStaticField01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GenericTypeStaticField01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000608 Length: 0x000001E1 } .module GenericTypeStaticField01.exe -// MVID: {61E07031-1E75-7E6B-A745-03833170E061} +// MVID: {61F2D6A5-1E75-7E6B-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07590000 +// Image base: 0x06F00000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,6 +62,8 @@ { // Code size 9 (0x9) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 2,2 : 6,9 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\GenericTypeStaticField01.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 @@ -87,8 +89,7 @@ { // Code size 27 (0x1b) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 4,4 : 28,39 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\GenericTypeStaticField01.fs' + .line 4,4 : 28,39 '' IL_0000: nop .line 16707566,16707566 : 0,0 '' IL_0001: volatile. @@ -127,6 +128,7 @@ { // Code size 9 (0x9) .maxstack 8 + .line 6,6 : 6,9 '' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NonEscapingArguments02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NonEscapingArguments02.il.bsl index e7d9474e35b..adafe97f786 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NonEscapingArguments02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NonEscapingArguments02.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000360 Length: 0x0000019E } .module NonEscapingArguments02.dll -// MVID: {61E07031-BB56-6582-A745-03833170E061} +// MVID: {61F2D6A5-BB56-6582-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05190000 +// Image base: 0x06C70000 // =============== CLASS MEMBERS DECLARATION =================== @@ -61,6 +61,8 @@ { // Code size 21 (0x15) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 6,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\NonEscapingArguments02.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 @@ -77,8 +79,7 @@ { // Code size 7 (0x7) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 7,7 : 24,28 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\NonEscapingArguments02.fs' + .line 7,7 : 24,28 '' IL_0000: ldarg.0 IL_0001: ldfld int32 class NonEscapingArguments02/ListSizeCounter`1::size IL_0006: ret diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/cas.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/cas.il.bsl index 4e002592f66..84875c94cab 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/cas.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/cas.il.bsl @@ -43,13 +43,13 @@ // Offset: 0x00000620 Length: 0x000000F3 } .module cas.exe -// MVID: {61E07031-35EA-18E3-A745-03833170E061} +// MVID: {61F2D6A5-35EA-18E3-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07440000 +// Image base: 0x05050000 // =============== CLASS MEMBERS DECLARATION =================== @@ -75,6 +75,8 @@ { // Code size 9 (0x9) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 11,11 : 10,13 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\cas.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 @@ -92,8 +94,7 @@ // Code size 8 (0x8) .maxstack 3 .locals init ([0] class Cas/AttrTest/Foo x) - .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\\cas.fs' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: stloc.0 .line 14,14 : 33,37 '' diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl index 875958cb5a7..3bd6a3acc8c 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: {61EFEE20-D281-4783-A745-038320EEEF61} +// MVID: {61F2D6A6-D281-4783-A745-0383A6D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B00000 +// Image base: 0x06B60000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1540,7 +1540,6 @@ .line 41,41 : 19,24 '' IL_0002: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0007: stloc.2 - .line 41,41 : 19,24 '' IL_0008: ldloc.2 IL_0009: stloc.3 IL_000a: ldloc.0 @@ -2828,7 +2827,7 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal>,object> Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed { - // Code size 54 (0x36) + // Code size 53 (0x35) .maxstack 9 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, [1] valuetype [mscorlib]System.Decimal min) @@ -2836,32 +2835,30 @@ IL_0000: ldarg.1 IL_0001: stloc.0 .line 59,59 : 19,24 '' - IL_0002: nop - .line 59,59 : 19,24 '' - IL_0003: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0008: ldloc.0 - IL_0009: ldnull - IL_000a: ldc.i4.0 - IL_000b: ldnull - IL_000c: newobj instance void Linq101Aggregates01/min@59::.ctor(class [System.Core]System.Linq.IGrouping`2, + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0007: ldloc.0 + IL_0008: ldnull + IL_0009: ldc.i4.0 + IL_000a: ldnull + IL_000b: newobj instance void Linq101Aggregates01/min@59::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0011: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0016: ldsfld class Linq101Aggregates01/'min@59-1' Linq101Aggregates01/'min@59-1'::@_instance - IL_001b: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0010: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0015: ldsfld class Linq101Aggregates01/'min@59-1' Linq101Aggregates01/'min@59-1'::@_instance + IL_001a: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0020: stloc.1 + IL_001f: stloc.1 .line 60,60 : 9,28 '' - IL_0021: ldarg.0 - IL_0022: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #3 input at line 56@58-3'::builder@ - IL_0027: ldloc.0 - IL_0028: ldloc.1 - IL_0029: newobj instance void class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::.ctor(!0, + IL_0020: ldarg.0 + IL_0021: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #3 input at line 56@58-3'::builder@ + IL_0026: ldloc.0 + IL_0027: ldloc.1 + IL_0028: newobj instance void class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::.ctor(!0, !1) - IL_002e: tail. - IL_0030: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal>,object>(!!0) - IL_0035: ret + IL_002d: tail. + IL_002f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal>,object>(!!0) + IL_0034: ret } // end of method 'Pipe #3 input at line 56@58-3'::Invoke } // end of class 'Pipe #3 input at line 56@58-3' @@ -3442,7 +3439,6 @@ .line 69,69 : 32,37 '' IL_0015: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_001a: stloc.3 - .line 69,69 : 32,37 '' IL_001b: ldloc.3 IL_001c: ldloc.0 IL_001d: ldnull @@ -4689,7 +4685,7 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal>,object> Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed { - // Code size 54 (0x36) + // Code size 53 (0x35) .maxstack 9 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, [1] valuetype [mscorlib]System.Decimal mostExpensivePrice) @@ -4697,32 +4693,30 @@ IL_0000: ldarg.1 IL_0001: stloc.0 .line 84,84 : 34,39 '' - IL_0002: nop - .line 84,84 : 34,39 '' - IL_0003: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0008: ldloc.0 - IL_0009: ldnull - IL_000a: ldc.i4.0 - IL_000b: ldnull - IL_000c: newobj instance void Linq101Aggregates01/mostExpensivePrice@84::.ctor(class [System.Core]System.Linq.IGrouping`2, + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0007: ldloc.0 + IL_0008: ldnull + IL_0009: ldc.i4.0 + IL_000a: ldnull + IL_000b: newobj instance void Linq101Aggregates01/mostExpensivePrice@84::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0011: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0016: ldsfld class Linq101Aggregates01/'mostExpensivePrice@84-1' Linq101Aggregates01/'mostExpensivePrice@84-1'::@_instance - IL_001b: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0010: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0015: ldsfld class Linq101Aggregates01/'mostExpensivePrice@84-1' Linq101Aggregates01/'mostExpensivePrice@84-1'::@_instance + IL_001a: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0020: stloc.1 + IL_001f: stloc.1 .line 85,85 : 9,43 '' - IL_0021: ldarg.0 - IL_0022: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #5 input at line 81@83-3'::builder@ - IL_0027: ldloc.0 - IL_0028: ldloc.1 - IL_0029: newobj instance void class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::.ctor(!0, + IL_0020: ldarg.0 + IL_0021: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #5 input at line 81@83-3'::builder@ + IL_0026: ldloc.0 + IL_0027: ldloc.1 + IL_0028: newobj instance void class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>::.ctor(!0, !1) - IL_002e: tail. - IL_0030: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal>,object>(!!0) - IL_0035: ret + IL_002d: tail. + IL_002f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal>,object>(!!0) + IL_0034: ret } // end of method 'Pipe #5 input at line 81@83-3'::Invoke } // end of class 'Pipe #5 input at line 81@83-3' @@ -5609,7 +5603,7 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object> Invoke(class [System.Core]System.Linq.IGrouping`2 _arg2) cil managed { - // Code size 93 (0x5d) + // Code size 92 (0x5c) .maxstack 9 .locals init ([0] class [System.Core]System.Linq.IGrouping`2 g, [1] valuetype [mscorlib]System.Decimal maxPrice, @@ -5619,54 +5613,51 @@ IL_0000: ldarg.1 IL_0001: stloc.0 .line 93,93 : 24,29 '' - IL_0002: nop - .line 93,93 : 24,29 '' - IL_0003: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0008: ldloc.0 - IL_0009: ldnull - IL_000a: ldc.i4.0 - IL_000b: ldnull - IL_000c: newobj instance void Linq101Aggregates01/maxPrice@93::.ctor(class [System.Core]System.Linq.IGrouping`2, + IL_0002: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0007: ldloc.0 + IL_0008: ldnull + IL_0009: ldc.i4.0 + IL_000a: ldnull + IL_000b: newobj instance void Linq101Aggregates01/maxPrice@93::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0011: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0016: ldsfld class Linq101Aggregates01/'maxPrice@93-1' Linq101Aggregates01/'maxPrice@93-1'::@_instance - IL_001b: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0010: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0015: ldsfld class Linq101Aggregates01/'maxPrice@93-1' Linq101Aggregates01/'maxPrice@93-1'::@_instance + IL_001a: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0020: stloc.1 - .line 94,94 : 37,42 '' - IL_0021: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0026: stloc.3 + IL_001f: stloc.1 .line 94,94 : 37,42 '' - IL_0027: ldloc.3 - IL_0028: ldloc.0 - IL_0029: ldnull - IL_002a: ldc.i4.0 - IL_002b: ldnull - IL_002c: newobj instance void Linq101Aggregates01/mostExpensiveProducts@94::.ctor(class [System.Core]System.Linq.IGrouping`2, + IL_0020: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0025: stloc.3 + IL_0026: ldloc.3 + IL_0027: ldloc.0 + IL_0028: ldnull + IL_0029: ldc.i4.0 + IL_002a: ldnull + IL_002b: newobj instance void Linq101Aggregates01/mostExpensiveProducts@94::.ctor(class [System.Core]System.Linq.IGrouping`2, class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0031: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0036: ldloc.1 - IL_0037: newobj instance void Linq101Aggregates01/'mostExpensiveProducts@94-1'::.ctor(valuetype [mscorlib]System.Decimal) - IL_003c: 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_0030: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0035: ldloc.1 + IL_0036: newobj instance void Linq101Aggregates01/'mostExpensiveProducts@94-1'::.ctor(valuetype [mscorlib]System.Decimal) + IL_003b: 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_0041: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0046: stloc.2 + IL_0040: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0045: stloc.2 .line 95,95 : 9,46 '' - IL_0047: ldarg.0 - IL_0048: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #6 input at line 90@92-3'::builder@ - IL_004d: ldloc.0 - IL_004e: ldloc.1 - IL_004f: ldloc.2 - IL_0050: newobj instance void class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>::.ctor(!0, + IL_0046: ldarg.0 + IL_0047: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/'Pipe #6 input at line 90@92-3'::builder@ + IL_004c: ldloc.0 + IL_004d: ldloc.1 + IL_004e: ldloc.2 + IL_004f: newobj instance void class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>::.ctor(!0, !1, !2) - IL_0055: tail. - IL_0057: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(!!0) - IL_005c: ret + IL_0054: tail. + IL_0056: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(!!0) + IL_005b: ret } // end of method 'Pipe #6 input at line 90@92-3'::Invoke } // end of class 'Pipe #6 input at line 90@92-3' @@ -6676,7 +6667,6 @@ .line 115,115 : 28,33 '' IL_0002: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0007: stloc.2 - .line 115,115 : 28,33 '' IL_0008: ldloc.2 IL_0009: stloc.3 IL_000a: ldloc.0 @@ -7195,7 +7185,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 1760 (0x6e0) + // Code size 1756 (0x6dc) .maxstack 13 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 factorsOf300, [1] int32 uniqueFactors, @@ -7298,7 +7288,6 @@ .line 11,11 : 5,10 '' IL_002b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0030: stloc.s V_21 - .line 11,11 : 5,10 '' IL_0032: ldloc.s V_21 IL_0034: ldnull IL_0035: ldc.i4.0 @@ -7354,7 +7343,6 @@ .line 20,20 : 5,10 '' IL_00a4: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00a9: stloc.s V_22 - .line 20,20 : 5,10 '' IL_00ab: ldloc.s V_22 IL_00ad: stloc.s V_23 IL_00af: ldnull @@ -7435,7 +7423,6 @@ .line 29,29 : 5,10 '' IL_0149: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_014e: stloc.s V_31 - .line 29,29 : 5,10 '' IL_0150: ldloc.s V_31 IL_0152: stloc.s V_32 IL_0154: ldnull @@ -7509,7 +7496,6 @@ .line 38,38 : 5,10 '' IL_01d2: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_01d7: stloc.s V_41 - .line 38,38 : 5,10 '' IL_01d9: ldloc.s V_41 IL_01db: ldloc.s V_41 IL_01dd: ldloc.s V_41 @@ -7543,507 +7529,492 @@ IL_022d: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories@37 IL_0232: stloc.s categories .line 49,49 : 14,19 '' - IL_0234: nop - .line 49,49 : 14,19 '' - IL_0235: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_023a: ldnull + IL_0234: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0239: ldnull + IL_023a: ldc.i4.0 IL_023b: ldc.i4.0 - IL_023c: ldc.i4.0 - IL_023d: newobj instance void Linq101Aggregates01/minNum@49::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_023c: newobj instance void Linq101Aggregates01/minNum@49::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0242: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0247: ldsfld class Linq101Aggregates01/'minNum@49-1' Linq101Aggregates01/'minNum@49-1'::@_instance - IL_024c: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0241: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0246: ldsfld class Linq101Aggregates01/'minNum@49-1' Linq101Aggregates01/'minNum@49-1'::@_instance + IL_024b: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0251: dup - IL_0252: stsfld int32 ''.$Linq101Aggregates01::minNum@49 - IL_0257: stloc.s minNum + IL_0250: dup + IL_0251: stsfld int32 ''.$Linq101Aggregates01::minNum@49 + IL_0256: stloc.s minNum .line 52,52 : 20,25 '' - IL_0259: nop - .line 52,52 : 20,25 '' - IL_025a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0258: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_025d: ldnull + IL_025e: ldc.i4.0 IL_025f: ldnull - IL_0260: ldc.i4.0 - IL_0261: ldnull - IL_0262: newobj instance void Linq101Aggregates01/shortestWord@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0260: newobj instance void Linq101Aggregates01/shortestWord@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0267: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_026c: ldsfld class Linq101Aggregates01/'shortestWord@52-1' Linq101Aggregates01/'shortestWord@52-1'::@_instance - IL_0271: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0265: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_026a: ldsfld class Linq101Aggregates01/'shortestWord@52-1' Linq101Aggregates01/'shortestWord@52-1'::@_instance + IL_026f: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0276: dup - IL_0277: stsfld int32 ''.$Linq101Aggregates01::shortestWord@52 - IL_027c: stloc.s shortestWord + IL_0274: dup + IL_0275: stsfld int32 ''.$Linq101Aggregates01::shortestWord@52 + IL_027a: stloc.s shortestWord .line 55,61 : 1,21 '' - IL_027e: nop - .line 56,56 : 5,10 '' - IL_027f: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0284: stloc.s V_43 + IL_027c: nop .line 56,56 : 5,10 '' + IL_027d: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0282: stloc.s V_43 + IL_0284: ldloc.s V_43 IL_0286: ldloc.s V_43 IL_0288: ldloc.s V_43 - IL_028a: ldloc.s V_43 .line 57,57 : 9,12 '' + IL_028a: ldloc.s V_43 IL_028c: ldloc.s V_43 - IL_028e: ldloc.s V_43 - IL_0290: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_0295: 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_029a: ldloc.s V_43 - IL_029c: newobj instance void Linq101Aggregates01/'Pipe #3 input at line 56@57'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_02a1: 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_028e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_0293: 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_0298: ldloc.s V_43 + IL_029a: newobj instance void Linq101Aggregates01/'Pipe #3 input at line 56@57'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_029f: 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_02a6: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@58-1' Linq101Aggregates01/'Pipe #3 input at line 56@58-1'::@_instance - IL_02ab: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@58-2' Linq101Aggregates01/'Pipe #3 input at line 56@58-2'::@_instance - IL_02b0: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_02a4: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@58-1' Linq101Aggregates01/'Pipe #3 input at line 56@58-1'::@_instance + IL_02a9: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@58-2' Linq101Aggregates01/'Pipe #3 input at line 56@58-2'::@_instance + IL_02ae: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_02b5: ldloc.s V_43 - IL_02b7: newobj instance void Linq101Aggregates01/'Pipe #3 input at line 56@58-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_02bc: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_02b3: ldloc.s V_43 + IL_02b5: newobj instance void Linq101Aggregates01/'Pipe #3 input at line 56@58-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_02ba: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_02c1: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@60-4' Linq101Aggregates01/'Pipe #3 input at line 56@60-4'::@_instance - IL_02c6: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_02bf: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@60-4' Linq101Aggregates01/'Pipe #3 input at line 56@60-4'::@_instance + IL_02c4: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,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_02cb: 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_02d0: stloc.s 'Pipe #3 input at line 56' + IL_02c9: 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_02ce: stloc.s 'Pipe #3 input at line 56' .line 61,61 : 10,21 '' - IL_02d2: ldloc.s 'Pipe #3 input at line 56' - IL_02d4: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_02d9: dup - IL_02da: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories2@55 - IL_02df: stloc.s categories2 + IL_02d0: ldloc.s 'Pipe #3 input at line 56' + IL_02d2: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_02d7: dup + IL_02d8: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories2@55 + IL_02dd: stloc.s categories2 .line 64,71 : 1,21 '' - IL_02e1: nop - .line 65,65 : 5,10 '' - IL_02e2: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_02e7: stloc.s V_45 + IL_02df: nop .line 65,65 : 5,10 '' + IL_02e0: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_02e5: stloc.s V_45 + IL_02e7: ldloc.s V_45 IL_02e9: ldloc.s V_45 IL_02eb: ldloc.s V_45 - IL_02ed: ldloc.s V_45 .line 66,66 : 9,12 '' + IL_02ed: ldloc.s V_45 IL_02ef: ldloc.s V_45 - IL_02f1: ldloc.s V_45 - IL_02f3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_02f8: 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_02fd: ldloc.s V_45 - IL_02ff: newobj instance void Linq101Aggregates01/'Pipe #4 input at line 65@66'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0304: 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_02f1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_02f6: 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_02fb: ldloc.s V_45 + IL_02fd: newobj instance void Linq101Aggregates01/'Pipe #4 input at line 65@66'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0302: 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_0309: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@67-1' Linq101Aggregates01/'Pipe #4 input at line 65@67-1'::@_instance - IL_030e: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@67-2' Linq101Aggregates01/'Pipe #4 input at line 65@67-2'::@_instance - IL_0313: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0307: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@67-1' Linq101Aggregates01/'Pipe #4 input at line 65@67-1'::@_instance + IL_030c: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@67-2' Linq101Aggregates01/'Pipe #4 input at line 65@67-2'::@_instance + IL_0311: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0318: ldloc.s V_45 - IL_031a: newobj instance void Linq101Aggregates01/'Pipe #4 input at line 65@67-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_031f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0316: ldloc.s V_45 + IL_0318: newobj instance void Linq101Aggregates01/'Pipe #4 input at line 65@67-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_031d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0324: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@70-4' Linq101Aggregates01/'Pipe #4 input at line 65@70-4'::@_instance - IL_0329: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0322: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@70-4' Linq101Aggregates01/'Pipe #4 input at line 65@70-4'::@_instance + IL_0327: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,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_032e: 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_0333: stloc.s 'Pipe #4 input at line 65' + IL_032c: 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_0331: stloc.s 'Pipe #4 input at line 65' .line 71,71 : 10,21 '' - IL_0335: ldloc.s 'Pipe #4 input at line 65' - IL_0337: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_033c: dup - IL_033d: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories3@64 - IL_0342: stloc.s categories3 + IL_0333: ldloc.s 'Pipe #4 input at line 65' + IL_0335: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_033a: dup + IL_033b: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories3@64 + IL_0340: stloc.s categories3 .line 74,74 : 14,19 '' - IL_0344: nop - .line 74,74 : 14,19 '' - IL_0345: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_034a: ldnull - IL_034b: ldc.i4.0 - IL_034c: ldc.i4.0 - IL_034d: newobj instance void Linq101Aggregates01/maxNum@74::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0342: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0347: ldnull + IL_0348: ldc.i4.0 + IL_0349: ldc.i4.0 + IL_034a: newobj instance void Linq101Aggregates01/maxNum@74::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0352: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0357: ldsfld class Linq101Aggregates01/'maxNum@74-1' Linq101Aggregates01/'maxNum@74-1'::@_instance - IL_035c: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_034f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0354: ldsfld class Linq101Aggregates01/'maxNum@74-1' Linq101Aggregates01/'maxNum@74-1'::@_instance + IL_0359: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0361: dup - IL_0362: stsfld int32 ''.$Linq101Aggregates01::maxNum@74 - IL_0367: stloc.s maxNum - .line 77,77 : 21,26 '' - IL_0369: nop + IL_035e: dup + IL_035f: stsfld int32 ''.$Linq101Aggregates01::maxNum@74 + IL_0364: stloc.s maxNum .line 77,77 : 21,26 '' - IL_036a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_036f: ldnull - IL_0370: ldc.i4.0 - IL_0371: ldnull - IL_0372: newobj instance void Linq101Aggregates01/longestLength@77::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0366: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_036b: ldnull + IL_036c: ldc.i4.0 + IL_036d: ldnull + IL_036e: newobj instance void Linq101Aggregates01/longestLength@77::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0377: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_037c: ldsfld class Linq101Aggregates01/'longestLength@77-1' Linq101Aggregates01/'longestLength@77-1'::@_instance - IL_0381: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0373: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0378: ldsfld class Linq101Aggregates01/'longestLength@77-1' Linq101Aggregates01/'longestLength@77-1'::@_instance + IL_037d: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0386: dup - IL_0387: stsfld int32 ''.$Linq101Aggregates01::longestLength@77 - IL_038c: stloc.s longestLength + IL_0382: dup + IL_0383: stsfld int32 ''.$Linq101Aggregates01::longestLength@77 + IL_0388: stloc.s longestLength .line 80,86 : 1,21 '' - IL_038e: nop - .line 81,81 : 5,10 '' - IL_038f: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0394: stloc.s V_47 + IL_038a: nop .line 81,81 : 5,10 '' + IL_038b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0390: stloc.s V_47 + IL_0392: ldloc.s V_47 + IL_0394: ldloc.s V_47 IL_0396: ldloc.s V_47 + .line 82,82 : 9,12 '' IL_0398: ldloc.s V_47 IL_039a: ldloc.s V_47 - .line 82,82 : 9,12 '' - IL_039c: ldloc.s V_47 - IL_039e: ldloc.s V_47 - IL_03a0: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_03a5: 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_03aa: ldloc.s V_47 - IL_03ac: newobj instance void Linq101Aggregates01/'Pipe #5 input at line 81@82'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_03b1: 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_039c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_03a1: 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_03a6: ldloc.s V_47 + IL_03a8: newobj instance void Linq101Aggregates01/'Pipe #5 input at line 81@82'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_03ad: 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_03b6: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@83-1' Linq101Aggregates01/'Pipe #5 input at line 81@83-1'::@_instance - IL_03bb: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@83-2' Linq101Aggregates01/'Pipe #5 input at line 81@83-2'::@_instance - IL_03c0: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03b2: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@83-1' Linq101Aggregates01/'Pipe #5 input at line 81@83-1'::@_instance + IL_03b7: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@83-2' Linq101Aggregates01/'Pipe #5 input at line 81@83-2'::@_instance + IL_03bc: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_03c5: ldloc.s V_47 - IL_03c7: newobj instance void Linq101Aggregates01/'Pipe #5 input at line 81@83-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_03cc: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03c1: ldloc.s V_47 + IL_03c3: newobj instance void Linq101Aggregates01/'Pipe #5 input at line 81@83-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_03c8: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_03d1: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@85-4' Linq101Aggregates01/'Pipe #5 input at line 81@85-4'::@_instance - IL_03d6: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03cd: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@85-4' Linq101Aggregates01/'Pipe #5 input at line 81@85-4'::@_instance + IL_03d2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,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_03db: 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_03e0: stloc.s 'Pipe #5 input at line 81' + IL_03d7: 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_03dc: stloc.s 'Pipe #5 input at line 81' .line 86,86 : 10,21 '' - IL_03e2: ldloc.s 'Pipe #5 input at line 81' - IL_03e4: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_03e9: dup - IL_03ea: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories4@80 - IL_03ef: stloc.s categories4 + IL_03de: ldloc.s 'Pipe #5 input at line 81' + IL_03e0: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_03e5: dup + IL_03e6: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories4@80 + IL_03eb: stloc.s categories4 .line 89,96 : 1,21 '' - IL_03f1: nop - .line 90,90 : 5,10 '' - IL_03f2: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_03f7: stloc.s V_49 + IL_03ed: nop .line 90,90 : 5,10 '' + IL_03ee: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_03f3: stloc.s V_49 + IL_03f5: ldloc.s V_49 + IL_03f7: ldloc.s V_49 IL_03f9: ldloc.s V_49 + .line 91,91 : 9,12 '' IL_03fb: ldloc.s V_49 IL_03fd: ldloc.s V_49 - .line 91,91 : 9,12 '' - IL_03ff: ldloc.s V_49 - IL_0401: ldloc.s V_49 - IL_0403: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_0408: 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_040d: ldloc.s V_49 - IL_040f: newobj instance void Linq101Aggregates01/'Pipe #6 input at line 90@91'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0414: 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_03ff: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_0404: 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_0409: ldloc.s V_49 + IL_040b: newobj instance void Linq101Aggregates01/'Pipe #6 input at line 90@91'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0410: 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_0419: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@92-1' Linq101Aggregates01/'Pipe #6 input at line 90@92-1'::@_instance - IL_041e: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@92-2' Linq101Aggregates01/'Pipe #6 input at line 90@92-2'::@_instance - IL_0423: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0415: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@92-1' Linq101Aggregates01/'Pipe #6 input at line 90@92-1'::@_instance + IL_041a: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@92-2' Linq101Aggregates01/'Pipe #6 input at line 90@92-2'::@_instance + IL_041f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0428: ldloc.s V_49 - IL_042a: newobj instance void Linq101Aggregates01/'Pipe #6 input at line 90@92-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_042f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0424: ldloc.s V_49 + IL_0426: newobj instance void Linq101Aggregates01/'Pipe #6 input at line 90@92-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_042b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0434: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@95-4' Linq101Aggregates01/'Pipe #6 input at line 90@95-4'::@_instance - IL_0439: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0430: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@95-4' Linq101Aggregates01/'Pipe #6 input at line 90@95-4'::@_instance + IL_0435: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,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_043e: 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_0443: stloc.s 'Pipe #6 input at line 90' + IL_043a: 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_043f: stloc.s 'Pipe #6 input at line 90' .line 96,96 : 10,21 '' - IL_0445: ldloc.s 'Pipe #6 input at line 90' - IL_0447: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_044c: dup - IL_044d: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories5@89 - IL_0452: stloc.s categories5 + IL_0441: ldloc.s 'Pipe #6 input at line 90' + IL_0443: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0448: dup + IL_0449: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories5@89 + IL_044e: stloc.s categories5 .line 99,99 : 1,66 '' - IL_0454: ldc.r8 5. - IL_045d: ldc.r8 4. - IL_0466: ldc.r8 1. - IL_046f: ldc.r8 3. - IL_0478: ldc.r8 9. - IL_0481: ldc.r8 8. - IL_048a: ldc.r8 6. - IL_0493: ldc.r8 7. - IL_049c: ldc.r8 2. - IL_04a5: ldc.r8 0.0 - IL_04ae: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_04b3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0450: ldc.r8 5. + IL_0459: ldc.r8 4. + IL_0462: ldc.r8 1. + IL_046b: ldc.r8 3. + IL_0474: ldc.r8 9. + IL_047d: ldc.r8 8. + IL_0486: ldc.r8 6. + IL_048f: ldc.r8 7. + IL_0498: ldc.r8 2. + IL_04a1: ldc.r8 0.0 + IL_04aa: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_04af: 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_04b8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04b4: 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_04bd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04b9: 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_04c2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04be: 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_04c7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04c3: 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_04cc: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04c8: 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_04d1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04cd: 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_04d6: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04d2: 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_04db: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04d7: 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_04e0: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04dc: 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_04e5: dup - IL_04e6: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::numbers2@99 - IL_04eb: stloc.s numbers2 - .line 100,100 : 18,23 '' - IL_04ed: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_04f2: stloc.s V_50 + IL_04e1: dup + IL_04e2: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::numbers2@99 + IL_04e7: stloc.s numbers2 .line 100,100 : 18,23 '' - IL_04f4: ldloc.s V_50 - IL_04f6: stloc.s V_51 - IL_04f8: ldnull - IL_04f9: ldc.i4.0 - IL_04fa: ldc.r8 0.0 - IL_0503: newobj instance void Linq101Aggregates01/averageNum@100::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_04e9: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_04ee: stloc.s V_50 + IL_04f0: ldloc.s V_50 + IL_04f2: stloc.s V_51 + IL_04f4: ldnull + IL_04f5: ldc.i4.0 + IL_04f6: ldc.r8 0.0 + IL_04ff: newobj instance void Linq101Aggregates01/averageNum@100::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, float64) - IL_0508: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_050d: stloc.s V_52 - IL_050f: ldsfld class Linq101Aggregates01/'averageNum@100-1' Linq101Aggregates01/'averageNum@100-1'::@_instance - IL_0514: stloc.s V_53 - IL_0516: ldloc.s V_52 - IL_0518: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_051d: stloc.s V_54 + IL_0504: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0509: stloc.s V_52 + IL_050b: ldsfld class Linq101Aggregates01/'averageNum@100-1' Linq101Aggregates01/'averageNum@100-1'::@_instance + IL_0510: stloc.s V_53 + 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_051f: ldloc.s V_54 - IL_0521: box class [mscorlib]System.Collections.Generic.IEnumerable`1 - IL_0526: brtrue.s IL_0533 + IL_051b: ldloc.s V_54 + IL_051d: box class [mscorlib]System.Collections.Generic.IEnumerable`1 + IL_0522: brtrue.s IL_052f .line 100001,100001 : 0,0 '' - IL_0528: ldstr "source" - IL_052d: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) - IL_0532: throw + IL_0524: ldstr "source" + IL_0529: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) + IL_052e: throw .line 100001,100001 : 0,0 '' - IL_0533: nop - IL_0534: ldloc.s V_54 - IL_0536: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_053b: stloc.s V_55 + IL_052f: nop + IL_0530: ldloc.s V_54 + IL_0532: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0537: stloc.s V_55 .try { - IL_053d: ldc.r8 0.0 - IL_0546: stloc.s V_57 - IL_0548: ldc.i4.0 - IL_0549: stloc.s V_58 - IL_054b: ldloc.s V_55 - IL_054d: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() - IL_0552: brfalse.s IL_0570 - - IL_0554: ldloc.s V_57 - IL_0556: ldloc.s V_53 - IL_0558: ldloc.s V_55 - IL_055a: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() - IL_055f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0564: add - IL_0565: stloc.s V_57 - IL_0567: ldloc.s V_58 - IL_0569: ldc.i4.1 - IL_056a: add - IL_056b: stloc.s V_58 - .line 100001,100001 : 0,0 '' - IL_056d: nop - IL_056e: br.s IL_054b - - .line 100001,100001 : 0,0 '' - IL_0570: ldloc.s V_58 - IL_0572: brtrue.s IL_057f - - .line 100001,100001 : 0,0 '' - IL_0574: ldstr "source" - IL_0579: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) - IL_057e: throw - - .line 100001,100001 : 0,0 '' - IL_057f: nop - IL_0580: ldloc.s V_57 - IL_0582: stloc.s V_59 - IL_0584: ldloc.s V_58 - IL_0586: stloc.s V_60 - IL_0588: ldloc.s V_59 - IL_058a: ldloc.s V_60 - IL_058c: conv.r8 - IL_058d: div - IL_058e: stloc.s V_56 - IL_0590: leave.s IL_05a8 + IL_0539: ldc.r8 0.0 + IL_0542: stloc.s V_57 + IL_0544: ldc.i4.0 + IL_0545: stloc.s V_58 + IL_0547: ldloc.s V_55 + IL_0549: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() + IL_054e: brfalse.s IL_056c + + IL_0550: ldloc.s V_57 + IL_0552: ldloc.s V_53 + IL_0554: ldloc.s V_55 + IL_0556: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() + IL_055b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0560: add + IL_0561: stloc.s V_57 + IL_0563: ldloc.s V_58 + IL_0565: ldc.i4.1 + IL_0566: add + IL_0567: stloc.s V_58 + .line 100001,100001 : 0,0 '' + 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 + + .line 100001,100001 : 0,0 '' + IL_0570: ldstr "source" + IL_0575: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) + IL_057a: throw + + .line 100001,100001 : 0,0 '' + IL_057b: nop + IL_057c: ldloc.s V_57 + IL_057e: stloc.s V_59 + IL_0580: ldloc.s V_58 + IL_0582: stloc.s V_60 + IL_0584: ldloc.s V_59 + IL_0586: ldloc.s V_60 + IL_0588: conv.r8 + IL_0589: div + IL_058a: stloc.s V_56 + IL_058c: leave.s IL_05a4 } // end .try finally { - IL_0592: ldloc.s V_55 - IL_0594: isinst [mscorlib]System.IDisposable - IL_0599: stloc.s V_61 + IL_058e: ldloc.s V_55 + IL_0590: isinst [mscorlib]System.IDisposable + IL_0595: stloc.s V_61 .line 100001,100001 : 0,0 '' - IL_059b: ldloc.s V_61 - IL_059d: brfalse.s IL_05a7 + IL_0597: ldloc.s V_61 + IL_0599: brfalse.s IL_05a3 .line 100001,100001 : 0,0 '' - IL_059f: ldloc.s V_61 - IL_05a1: callvirt instance void [netstandard]System.IDisposable::Dispose() - IL_05a6: endfinally + IL_059b: ldloc.s V_61 + IL_059d: callvirt instance void [netstandard]System.IDisposable::Dispose() + IL_05a2: endfinally .line 100001,100001 : 0,0 '' - IL_05a7: endfinally + IL_05a3: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_05a8: ldloc.s V_56 - IL_05aa: dup - IL_05ab: stsfld float64 ''.$Linq101Aggregates01::averageNum@100 - IL_05b0: stloc.s averageNum - .line 104,104 : 5,10 '' - IL_05b2: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_05b7: stloc.s V_62 + IL_05a4: ldloc.s V_56 + IL_05a6: dup + IL_05a7: stsfld float64 ''.$Linq101Aggregates01::averageNum@100 + IL_05ac: stloc.s averageNum .line 104,104 : 5,10 '' - IL_05b9: ldloc.s V_62 - IL_05bb: stloc.s V_63 + IL_05ae: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_05b3: stloc.s V_62 + IL_05b5: ldloc.s V_62 + IL_05b7: stloc.s V_63 .line 105,105 : 9,12 '' - IL_05bd: ldloc.s V_62 - IL_05bf: ldloc.s V_62 - IL_05c1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() - IL_05c6: 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_05cb: ldloc.s V_62 - IL_05cd: newobj instance void Linq101Aggregates01/averageLength@105::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_05d2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_05b9: ldloc.s V_62 + IL_05bb: ldloc.s V_62 + IL_05bd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() + IL_05c2: 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_05c7: ldloc.s V_62 + IL_05c9: newobj instance void Linq101Aggregates01/averageLength@105::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_05ce: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_05d7: stloc.s V_64 - IL_05d9: ldsfld class Linq101Aggregates01/'averageLength@107-1' Linq101Aggregates01/'averageLength@107-1'::@_instance - IL_05de: stloc.s V_65 - IL_05e0: ldloc.s V_64 - IL_05e2: 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_05e7: stloc.s V_66 + IL_05d3: stloc.s V_64 + IL_05d5: ldsfld class Linq101Aggregates01/'averageLength@107-1' Linq101Aggregates01/'averageLength@107-1'::@_instance + IL_05da: stloc.s V_65 + 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_05e9: ldloc.s V_66 - IL_05eb: box class [mscorlib]System.Collections.Generic.IEnumerable`1> - IL_05f0: brtrue.s IL_05fd + IL_05e5: ldloc.s V_66 + IL_05e7: box class [mscorlib]System.Collections.Generic.IEnumerable`1> + IL_05ec: brtrue.s IL_05f9 .line 100001,100001 : 0,0 '' - IL_05f2: ldstr "source" - IL_05f7: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) - IL_05fc: throw + IL_05ee: ldstr "source" + IL_05f3: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) + IL_05f8: throw .line 100001,100001 : 0,0 '' - IL_05fd: nop - IL_05fe: ldloc.s V_66 - IL_0600: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1>::GetEnumerator() - IL_0605: stloc.s V_67 + IL_05f9: nop + IL_05fa: ldloc.s V_66 + IL_05fc: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1>::GetEnumerator() + IL_0601: stloc.s V_67 .try { - IL_0607: ldc.r8 0.0 - IL_0610: stloc.s V_69 - IL_0612: ldc.i4.0 - IL_0613: stloc.s V_70 - IL_0615: ldloc.s V_67 - IL_0617: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() - IL_061c: brfalse.s IL_063a - - IL_061e: ldloc.s V_69 - IL_0620: ldloc.s V_65 - IL_0622: ldloc.s V_67 - IL_0624: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1>::get_Current() - IL_0629: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,float64>::Invoke(!0) - IL_062e: add - IL_062f: stloc.s V_69 - IL_0631: ldloc.s V_70 - IL_0633: ldc.i4.1 - IL_0634: add - IL_0635: stloc.s V_70 - .line 100001,100001 : 0,0 '' - IL_0637: nop - IL_0638: br.s IL_0615 - - .line 100001,100001 : 0,0 '' - IL_063a: ldloc.s V_70 - IL_063c: brtrue.s IL_0649 - - .line 100001,100001 : 0,0 '' - IL_063e: ldstr "source" - IL_0643: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) - IL_0648: throw - - .line 100001,100001 : 0,0 '' - IL_0649: nop - IL_064a: ldloc.s V_69 - IL_064c: stloc.s V_71 - IL_064e: ldloc.s V_70 - IL_0650: stloc.s V_72 - IL_0652: ldloc.s V_71 - IL_0654: ldloc.s V_72 - IL_0656: conv.r8 - IL_0657: div - IL_0658: stloc.s V_68 - IL_065a: leave.s IL_0672 + IL_0603: ldc.r8 0.0 + IL_060c: stloc.s V_69 + IL_060e: ldc.i4.0 + IL_060f: stloc.s V_70 + IL_0611: ldloc.s V_67 + IL_0613: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() + IL_0618: brfalse.s IL_0636 + + IL_061a: ldloc.s V_69 + IL_061c: ldloc.s V_65 + IL_061e: ldloc.s V_67 + IL_0620: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1>::get_Current() + IL_0625: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,float64>::Invoke(!0) + IL_062a: add + IL_062b: stloc.s V_69 + IL_062d: ldloc.s V_70 + IL_062f: ldc.i4.1 + IL_0630: add + IL_0631: stloc.s V_70 + .line 100001,100001 : 0,0 '' + 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 + + .line 100001,100001 : 0,0 '' + IL_063a: ldstr "source" + IL_063f: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) + IL_0644: throw + + .line 100001,100001 : 0,0 '' + IL_0645: nop + IL_0646: ldloc.s V_69 + IL_0648: stloc.s V_71 + IL_064a: ldloc.s V_70 + IL_064c: stloc.s V_72 + IL_064e: ldloc.s V_71 + IL_0650: ldloc.s V_72 + IL_0652: conv.r8 + IL_0653: div + IL_0654: stloc.s V_68 + IL_0656: leave.s IL_066e } // end .try finally { - IL_065c: ldloc.s V_67 - IL_065e: isinst [mscorlib]System.IDisposable - IL_0663: stloc.s V_73 + IL_0658: ldloc.s V_67 + IL_065a: isinst [mscorlib]System.IDisposable + IL_065f: stloc.s V_73 .line 100001,100001 : 0,0 '' - IL_0665: ldloc.s V_73 - IL_0667: brfalse.s IL_0671 + IL_0661: ldloc.s V_73 + IL_0663: brfalse.s IL_066d .line 100001,100001 : 0,0 '' - IL_0669: ldloc.s V_73 - IL_066b: callvirt instance void [netstandard]System.IDisposable::Dispose() - IL_0670: endfinally + IL_0665: ldloc.s V_73 + IL_0667: callvirt instance void [netstandard]System.IDisposable::Dispose() + IL_066c: endfinally .line 100001,100001 : 0,0 '' - IL_0671: endfinally + IL_066d: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_0672: ldloc.s V_68 - IL_0674: dup - IL_0675: stsfld float64 ''.$Linq101Aggregates01::averageLength@103 - IL_067a: stloc.s averageLength + IL_066e: ldloc.s V_68 + IL_0670: dup + IL_0671: stsfld float64 ''.$Linq101Aggregates01::averageLength@103 + IL_0676: stloc.s averageLength .line 111,117 : 1,21 '' - IL_067c: nop - .line 112,112 : 5,10 '' - IL_067d: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0682: stloc.s V_75 + IL_0678: nop .line 112,112 : 5,10 '' + IL_0679: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_067e: stloc.s V_75 + IL_0680: ldloc.s V_75 + IL_0682: ldloc.s V_75 IL_0684: ldloc.s V_75 + .line 113,113 : 9,12 '' IL_0686: ldloc.s V_75 IL_0688: ldloc.s V_75 - .line 113,113 : 9,12 '' - IL_068a: ldloc.s V_75 - IL_068c: ldloc.s V_75 - IL_068e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_0693: 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_0698: ldloc.s V_75 - IL_069a: newobj instance void Linq101Aggregates01/'Pipe #7 input at line 112@113'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_069f: 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_068a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_068f: 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_0694: ldloc.s V_75 + IL_0696: newobj instance void Linq101Aggregates01/'Pipe #7 input at line 112@113'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_069b: 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_06a4: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@114-1' Linq101Aggregates01/'Pipe #7 input at line 112@114-1'::@_instance - IL_06a9: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@114-2' Linq101Aggregates01/'Pipe #7 input at line 112@114-2'::@_instance - IL_06ae: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_06a0: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@114-1' Linq101Aggregates01/'Pipe #7 input at line 112@114-1'::@_instance + IL_06a5: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@114-2' Linq101Aggregates01/'Pipe #7 input at line 112@114-2'::@_instance + IL_06aa: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_06b3: ldloc.s V_75 - IL_06b5: newobj instance void Linq101Aggregates01/'Pipe #7 input at line 112@114-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_06ba: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_06af: ldloc.s V_75 + IL_06b1: newobj instance void Linq101Aggregates01/'Pipe #7 input at line 112@114-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_06b6: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_06bf: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@116-4' Linq101Aggregates01/'Pipe #7 input at line 112@116-4'::@_instance - IL_06c4: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_06bb: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@116-4' Linq101Aggregates01/'Pipe #7 input at line 112@116-4'::@_instance + IL_06c0: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,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_06c9: 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_06ce: stloc.s 'Pipe #7 input at line 112' + IL_06c5: 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_06ca: stloc.s 'Pipe #7 input at line 112' .line 117,117 : 10,21 '' - IL_06d0: ldloc.s 'Pipe #7 input at line 112' - IL_06d2: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_06d7: dup - IL_06d8: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories6@111 - IL_06dd: stloc.s categories6 - IL_06df: ret + IL_06cc: ldloc.s 'Pipe #7 input at line 112' + IL_06ce: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_06d3: dup + IL_06d4: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories6@111 + IL_06d9: stloc.s categories6 + IL_06db: ret } // end of method $Linq101Aggregates01::main@ } // end of class ''.$Linq101Aggregates01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101ElementOperators01.il.bsl index 5c8ac8df53a..d87ae14159c 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: {61E07032-19D7-C20D-A745-03833270E061} +// MVID: {61F2D6A6-19D7-C20D-A745-0383A6D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x069E0000 +// Image base: 0x07130000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1511,7 +1511,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 378 (0x17a) + // Code size 377 (0x179) .maxstack 13 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products, [1] class [Utils]Utils/Product products12, @@ -1532,7 +1532,6 @@ .line 11,11 : 5,10 '' IL_000c: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0011: stloc.s V_8 - .line 11,11 : 5,10 '' IL_0013: ldloc.s V_8 IL_0015: ldloc.s V_8 IL_0017: ldnull @@ -1587,7 +1586,6 @@ .line 21,21 : 5,10 '' IL_00aa: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00af: stloc.s V_9 - .line 21,21 : 5,10 '' IL_00b1: ldloc.s V_9 IL_00b3: ldloc.s V_9 IL_00b5: ldnull @@ -1608,78 +1606,75 @@ IL_00d8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101ElementOperators01::get_numbers() IL_00dd: stloc.s numbers .line 30,30 : 5,10 '' - IL_00df: nop - .line 30,30 : 5,10 '' - IL_00e0: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00e5: ldnull + IL_00df: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00e4: ldnull + IL_00e5: ldc.i4.0 IL_00e6: ldc.i4.0 - IL_00e7: ldc.i4.0 - IL_00e8: newobj instance void Linq101ElementOperators01/firstNumOrDefault@31::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_00e7: newobj instance void Linq101ElementOperators01/firstNumOrDefault@31::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_00ed: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00f2: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::HeadOrDefault(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) - IL_00f7: dup - IL_00f8: stsfld int32 ''.$Linq101ElementOperators01::firstNumOrDefault@29 - IL_00fd: stloc.s firstNumOrDefault + IL_00ec: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00f1: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::HeadOrDefault(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) + IL_00f6: dup + IL_00f7: stsfld int32 ''.$Linq101ElementOperators01::firstNumOrDefault@29 + IL_00fc: stloc.s firstNumOrDefault .line 48,48 : 1,48 '' - IL_00ff: ldc.i4.5 - IL_0100: ldc.i4.4 - IL_0101: ldc.i4.1 - IL_0102: ldc.i4.3 - IL_0103: ldc.i4.s 9 - IL_0105: ldc.i4.8 - IL_0106: ldc.i4.6 - IL_0107: ldc.i4.7 - IL_0108: ldc.i4.2 - IL_0109: ldc.i4.0 - IL_010a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_010f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00fe: ldc.i4.5 + IL_00ff: ldc.i4.4 + IL_0100: ldc.i4.1 + IL_0101: ldc.i4.3 + IL_0102: ldc.i4.s 9 + IL_0104: ldc.i4.8 + IL_0105: ldc.i4.6 + IL_0106: ldc.i4.7 + IL_0107: ldc.i4.2 + IL_0108: ldc.i4.0 + IL_0109: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_010e: 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_0114: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0113: 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_0119: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0118: 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_011e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_011d: 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_0123: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0122: 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_0128: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0127: 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_012d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_012c: 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_0132: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0131: 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_0137: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0136: 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_013c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_013b: 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_0141: dup - IL_0142: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::numbers2@48 - IL_0147: stloc.s numbers2 - .line 51,51 : 5,10 '' - IL_0149: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_014e: stloc.s V_10 + IL_0140: dup + IL_0141: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101ElementOperators01::numbers2@48 + IL_0146: stloc.s numbers2 .line 51,51 : 5,10 '' - IL_0150: ldloc.s V_10 - IL_0152: ldloc.s V_10 - IL_0154: ldnull + IL_0148: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_014d: stloc.s V_10 + IL_014f: ldloc.s V_10 + IL_0151: ldloc.s V_10 + IL_0153: ldnull + IL_0154: ldc.i4.0 IL_0155: ldc.i4.0 - IL_0156: ldc.i4.0 - IL_0157: newobj instance void Linq101ElementOperators01/fourthLowNum@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0156: newobj instance void Linq101ElementOperators01/fourthLowNum@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_015c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0161: ldsfld class Linq101ElementOperators01/'fourthLowNum@53-1' Linq101ElementOperators01/'fourthLowNum@53-1'::@_instance - IL_0166: 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_015b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0160: ldsfld class Linq101ElementOperators01/'fourthLowNum@53-1' Linq101ElementOperators01/'fourthLowNum@53-1'::@_instance + IL_0165: 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_016b: ldc.i4.1 - IL_016c: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Nth(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_016a: ldc.i4.1 + IL_016b: callvirt instance !!0 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Nth(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, int32) - IL_0171: dup - IL_0172: stsfld int32 ''.$Linq101ElementOperators01::fourthLowNum@50 - IL_0177: stloc.s fourthLowNum - IL_0179: ret + IL_0170: dup + IL_0171: stsfld int32 ''.$Linq101ElementOperators01::fourthLowNum@50 + IL_0176: stloc.s fourthLowNum + IL_0178: ret } // end of method $Linq101ElementOperators01::main@ } // end of class ''.$Linq101ElementOperators01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl index 08ab827279e..e3f74fbc720 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl @@ -50,13 +50,13 @@ // Offset: 0x00000408 Length: 0x00000129 } .module Linq101Grouping01.exe -// MVID: {61E07032-FB79-E5BF-A745-03833270E061} +// MVID: {61F2D6A6-FB79-E5BF-A745-0383A6D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07050000 +// Image base: 0x06CA0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1048,7 +1048,6 @@ .line 50,50 : 21,26 '' IL_0002: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0007: stloc.2 - .line 50,50 : 21,26 '' IL_0008: ldloc.2 IL_0009: ldloc.2 IL_000a: ldloc.2 @@ -1177,7 +1176,6 @@ .line 46,46 : 13,18 '' IL_0002: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0007: stloc.2 - .line 46,46 : 13,18 '' IL_0008: ldloc.2 IL_0009: ldloc.2 IL_000a: ldloc.2 @@ -1530,7 +1528,6 @@ .line 13,13 : 5,10 '' IL_00ba: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00bf: stloc.s V_10 - .line 13,13 : 5,10 '' IL_00c1: ldloc.s V_10 IL_00c3: ldloc.s V_10 IL_00c5: ldloc.s V_10 @@ -1591,7 +1588,6 @@ .line 23,23 : 5,10 '' IL_0164: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0169: stloc.s V_12 - .line 23,23 : 5,10 '' IL_016b: ldloc.s V_12 IL_016d: ldloc.s V_12 IL_016f: ldloc.s V_12 @@ -1634,7 +1630,6 @@ .line 33,33 : 5,10 '' IL_01d4: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_01d9: stloc.s V_14 - .line 33,33 : 5,10 '' IL_01db: ldloc.s V_14 IL_01dd: ldloc.s V_14 IL_01df: ldloc.s V_14 @@ -1677,7 +1672,6 @@ .line 43,43 : 5,10 '' IL_0244: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0249: stloc.s V_16 - .line 43,43 : 5,10 '' IL_024b: ldloc.s V_16 .line 44,44 : 9,12 '' IL_024d: ldloc.s V_16 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl index 93738326ab1..22b98a75c80 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: {61E07032-151B-685E-A745-03833270E061} +// MVID: {61F2D6A6-151B-685E-A745-0383A6D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06FE0000 +// Image base: 0x05610000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1288,7 +1288,6 @@ .line 12,12 : 5,10 '' IL_004b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0050: stloc.s V_7 - .line 12,12 : 5,10 '' IL_0052: ldloc.s V_7 IL_0054: ldloc.s V_7 IL_0056: ldloc.s V_7 @@ -1326,7 +1325,6 @@ .line 20,20 : 5,10 '' IL_00b0: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00b5: stloc.s V_9 - .line 20,20 : 5,10 '' IL_00b7: ldloc.s V_9 IL_00b9: ldloc.s V_9 IL_00bb: ldloc.s V_9 @@ -1364,7 +1362,6 @@ .line 28,28 : 5,10 '' IL_0115: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_011a: stloc.s V_11 - .line 28,28 : 5,10 '' IL_011c: ldloc.s V_11 IL_011e: ldloc.s V_11 IL_0120: ldloc.s V_11 @@ -1402,7 +1399,6 @@ .line 37,37 : 5,10 '' IL_017b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0180: stloc.s V_13 - .line 37,37 : 5,10 '' IL_0182: ldloc.s V_13 IL_0184: ldloc.s V_13 IL_0186: ldloc.s V_13 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl index a9a8038f588..bf6b54ffc62 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: {61E07032-649A-6956-A745-03833270E061} +// MVID: {61F2D6A6-649A-6956-A745-0383A6D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x069D0000 +// Image base: 0x05060000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1918,7 +1918,6 @@ .line 10,10 : 5,10 '' IL_002b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0030: stloc.s V_10 - .line 10,10 : 5,10 '' IL_0032: ldloc.s V_10 IL_0034: ldnull IL_0035: ldc.i4.0 @@ -1943,7 +1942,6 @@ .line 17,17 : 5,10 '' IL_0061: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0066: stloc.s V_12 - .line 17,17 : 5,10 '' IL_0068: ldloc.s V_12 IL_006a: ldnull IL_006b: ldc.i4.0 @@ -1973,7 +1971,6 @@ .line 25,25 : 5,10 '' IL_00a3: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00a8: stloc.s V_14 - .line 25,25 : 5,10 '' IL_00aa: ldloc.s V_14 IL_00ac: ldloc.s V_14 .line 26,26 : 9,12 '' @@ -2004,7 +2001,6 @@ .line 43,43 : 5,10 '' IL_00f3: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00f8: stloc.s V_16 - .line 43,43 : 5,10 '' IL_00fa: ldloc.s V_16 IL_00fc: ldnull IL_00fd: ldc.i4.0 @@ -2064,7 +2060,6 @@ .line 51,51 : 5,10 '' IL_019b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_01a0: stloc.s V_18 - .line 51,51 : 5,10 '' IL_01a2: ldloc.s V_18 IL_01a4: ldloc.s V_18 IL_01a6: ldnull @@ -2093,7 +2088,6 @@ .line 59,59 : 5,10 '' IL_01de: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_01e3: stloc.s V_20 - .line 59,59 : 5,10 '' IL_01e5: ldloc.s V_20 IL_01e7: ldloc.s V_20 IL_01e9: ldloc.s V_20 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl index 9e588bcbda2..da08438db70 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: {61E07032-B280-A6A2-A745-03833270E061} +// MVID: {61F2D6A6-B280-A6A2-A745-0383A6D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05270000 +// Image base: 0x070E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1958,7 +1958,6 @@ .line 11,11 : 5,10 '' IL_004a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_004f: stloc.s V_9 - .line 11,11 : 5,10 '' IL_0051: ldloc.s V_9 IL_0053: ldnull IL_0054: ldc.i4.0 @@ -1988,7 +1987,6 @@ .line 19,19 : 5,10 '' IL_0088: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_008d: stloc.s V_11 - .line 19,19 : 5,10 '' IL_008f: ldloc.s V_11 IL_0091: ldloc.s V_11 .line 20,20 : 9,12 '' @@ -2019,7 +2017,6 @@ .line 28,28 : 5,10 '' IL_00d7: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00dc: stloc.s V_13 - .line 28,28 : 5,10 '' IL_00de: ldloc.s V_13 IL_00e0: ldnull IL_00e1: ldc.i4.0 @@ -2044,7 +2041,6 @@ .line 35,35 : 5,10 '' IL_010a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_010f: stloc.s V_15 - .line 35,35 : 5,10 '' IL_0111: ldloc.s V_15 IL_0113: ldloc.s V_15 .line 36,36 : 9,12 '' @@ -2081,7 +2077,6 @@ .line 44,44 : 5,10 '' IL_0164: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0169: stloc.s V_18 - .line 44,44 : 5,10 '' IL_016b: ldloc.s V_18 IL_016d: ldnull IL_016e: ldc.i4.0 @@ -2106,7 +2101,6 @@ .line 51,51 : 5,10 '' IL_019b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_01a0: stloc.s V_20 - .line 51,51 : 5,10 '' IL_01a2: ldloc.s V_20 IL_01a4: ldnull IL_01a5: ldc.i4.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl index 8aaf191bd35..e6fb0af3b5a 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: {61E07032-76DD-E373-A745-03833270E061} +// MVID: {61F2D6A6-76DD-E373-A745-0383A6D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06950000 +// Image base: 0x07130000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1396,7 +1396,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 419 (0x1a3) + // Code size 417 (0x1a1) .maxstack 10 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 words, [1] bool iAfterE, @@ -1427,155 +1427,149 @@ IL_002e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::words@8 IL_0033: stloc.0 .line 11,11 : 5,10 '' - IL_0034: nop - .line 11,11 : 5,10 '' - IL_0035: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_003a: ldnull - IL_003b: ldc.i4.0 - IL_003c: ldnull - IL_003d: newobj instance void Linq101Quantifiers01/iAfterE@12::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0034: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0039: ldnull + IL_003a: ldc.i4.0 + IL_003b: ldnull + IL_003c: newobj instance void Linq101Quantifiers01/iAfterE@12::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0042: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0047: ldsfld class Linq101Quantifiers01/'iAfterE@13-1' Linq101Quantifiers01/'iAfterE@13-1'::@_instance - IL_004c: callvirt instance bool [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Exists(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0041: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0046: ldsfld class Linq101Quantifiers01/'iAfterE@13-1' Linq101Quantifiers01/'iAfterE@13-1'::@_instance + IL_004b: callvirt instance bool [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Exists(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0051: dup - IL_0052: stsfld bool ''.$Linq101Quantifiers01::iAfterE@10 - IL_0057: stloc.1 + IL_0050: dup + IL_0051: stsfld bool ''.$Linq101Quantifiers01::iAfterE@10 + IL_0056: stloc.1 .line 17,17 : 1,32 '' - IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() - IL_005d: dup - IL_005e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::products@17 - IL_0063: stloc.2 + IL_0057: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() + IL_005c: dup + IL_005d: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::products@17 + IL_0062: stloc.2 .line 19,25 : 1,21 '' - IL_0064: nop - .line 20,20 : 5,10 '' - IL_0065: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_006a: stloc.s V_8 + IL_0063: nop .line 20,20 : 5,10 '' - IL_006c: ldloc.s V_8 - IL_006e: ldloc.s V_8 - IL_0070: ldloc.s V_8 - IL_0072: ldloc.s V_8 + IL_0064: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0069: stloc.s V_8 + IL_006b: ldloc.s V_8 + IL_006d: ldloc.s V_8 + IL_006f: ldloc.s V_8 + IL_0071: ldloc.s V_8 .line 21,21 : 9,12 '' - IL_0074: ldloc.s V_8 - IL_0076: ldloc.s V_8 - IL_0078: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_products() - IL_007d: 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_0082: ldloc.s V_8 - IL_0084: newobj instance void Linq101Quantifiers01/'Pipe #1 input at line 20@21'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0089: 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_0073: ldloc.s V_8 + IL_0075: ldloc.s V_8 + IL_0077: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_products() + IL_007c: 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_0081: ldloc.s V_8 + IL_0083: newobj instance void Linq101Quantifiers01/'Pipe #1 input at line 20@21'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0088: 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_008e: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@22-1' Linq101Quantifiers01/'Pipe #1 input at line 20@22-1'::@_instance - IL_0093: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@22-2' Linq101Quantifiers01/'Pipe #1 input at line 20@22-2'::@_instance - IL_0098: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_008d: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@22-1' Linq101Quantifiers01/'Pipe #1 input at line 20@22-1'::@_instance + IL_0092: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@22-2' Linq101Quantifiers01/'Pipe #1 input at line 20@22-2'::@_instance + IL_0097: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_009d: ldloc.s V_8 - IL_009f: newobj instance void Linq101Quantifiers01/'Pipe #1 input at line 20@22-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_00a4: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_009c: ldloc.s V_8 + IL_009e: newobj instance void Linq101Quantifiers01/'Pipe #1 input at line 20@22-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_00a3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_00a9: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@23-4' Linq101Quantifiers01/'Pipe #1 input at line 20@23-4'::@_instance - IL_00ae: 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_00a8: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@23-4' Linq101Quantifiers01/'Pipe #1 input at line 20@23-4'::@_instance + IL_00ad: 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_00b3: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@24-6' Linq101Quantifiers01/'Pipe #1 input at line 20@24-6'::@_instance - IL_00b8: 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_00b2: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@24-6' Linq101Quantifiers01/'Pipe #1 input at line 20@24-6'::@_instance + IL_00b7: 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_00bd: 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_00c2: stloc.s 'Pipe #1 input at line 20' + IL_00bc: 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_00c1: stloc.s 'Pipe #1 input at line 20' .line 25,25 : 10,21 '' - IL_00c4: ldloc.s 'Pipe #1 input at line 20' - IL_00c6: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00cb: dup - IL_00cc: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups@19 - IL_00d1: stloc.3 + IL_00c3: ldloc.s 'Pipe #1 input at line 20' + IL_00c5: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00ca: dup + IL_00cb: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups@19 + IL_00d0: stloc.3 .line 28,28 : 1,35 '' - IL_00d2: ldc.i4.1 - IL_00d3: ldc.i4.s 11 - IL_00d5: ldc.i4.3 - IL_00d6: ldc.i4.s 19 - IL_00d8: ldc.i4.s 41 - IL_00da: ldc.i4.s 65 - IL_00dc: ldc.i4.s 19 - IL_00de: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_00e3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00d1: ldc.i4.1 + IL_00d2: ldc.i4.s 11 + IL_00d4: ldc.i4.3 + IL_00d5: ldc.i4.s 19 + IL_00d7: ldc.i4.s 41 + IL_00d9: ldc.i4.s 65 + IL_00db: ldc.i4.s 19 + IL_00dd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_00e2: 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_00e8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00e7: 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_00ed: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00ec: 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_00f2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00f1: 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_00f7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00f6: 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_00fc: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00fb: 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_0101: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0100: 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_0106: dup - IL_0107: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::numbers@28 - IL_010c: stloc.s numbers - .line 31,31 : 5,10 '' - IL_010e: nop + IL_0105: dup + IL_0106: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::numbers@28 + IL_010b: stloc.s numbers .line 31,31 : 5,10 '' - IL_010f: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0114: ldnull - IL_0115: ldc.i4.0 - IL_0116: ldc.i4.0 - IL_0117: newobj instance void Linq101Quantifiers01/onlyOdd@32::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_010d: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0112: ldnull + IL_0113: ldc.i4.0 + IL_0114: ldc.i4.0 + IL_0115: newobj instance void Linq101Quantifiers01/onlyOdd@32::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_011c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0121: ldsfld class Linq101Quantifiers01/'onlyOdd@33-1' Linq101Quantifiers01/'onlyOdd@33-1'::@_instance - IL_0126: callvirt instance bool [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::All(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_011a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_011f: ldsfld class Linq101Quantifiers01/'onlyOdd@33-1' Linq101Quantifiers01/'onlyOdd@33-1'::@_instance + IL_0124: callvirt instance bool [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::All(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_012b: dup - IL_012c: stsfld bool ''.$Linq101Quantifiers01::onlyOdd@30 - IL_0131: stloc.s onlyOdd + IL_0129: dup + IL_012a: stsfld bool ''.$Linq101Quantifiers01::onlyOdd@30 + IL_012f: stloc.s onlyOdd .line 37,43 : 1,21 '' - IL_0133: nop - .line 38,38 : 5,10 '' - IL_0134: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0139: stloc.s V_10 + IL_0131: nop .line 38,38 : 5,10 '' + IL_0132: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0137: stloc.s V_10 + IL_0139: ldloc.s V_10 IL_013b: ldloc.s V_10 IL_013d: ldloc.s V_10 IL_013f: ldloc.s V_10 - IL_0141: ldloc.s V_10 .line 39,39 : 9,12 '' + IL_0141: ldloc.s V_10 IL_0143: ldloc.s V_10 - IL_0145: ldloc.s V_10 - IL_0147: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_products() - IL_014c: 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_0151: ldloc.s V_10 - IL_0153: newobj instance void Linq101Quantifiers01/'Pipe #2 input at line 38@39'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0158: 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_0145: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_products() + IL_014a: 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_014f: ldloc.s V_10 + IL_0151: newobj instance void Linq101Quantifiers01/'Pipe #2 input at line 38@39'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0156: 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_015d: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@40-1' Linq101Quantifiers01/'Pipe #2 input at line 38@40-1'::@_instance - IL_0162: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@40-2' Linq101Quantifiers01/'Pipe #2 input at line 38@40-2'::@_instance - IL_0167: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_015b: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@40-1' Linq101Quantifiers01/'Pipe #2 input at line 38@40-1'::@_instance + IL_0160: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@40-2' Linq101Quantifiers01/'Pipe #2 input at line 38@40-2'::@_instance + IL_0165: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_016c: ldloc.s V_10 - IL_016e: newobj instance void Linq101Quantifiers01/'Pipe #2 input at line 38@40-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0173: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_016a: ldloc.s V_10 + IL_016c: newobj instance void Linq101Quantifiers01/'Pipe #2 input at line 38@40-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0171: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0178: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@41-4' Linq101Quantifiers01/'Pipe #2 input at line 38@41-4'::@_instance - IL_017d: 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_0176: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@41-4' Linq101Quantifiers01/'Pipe #2 input at line 38@41-4'::@_instance + IL_017b: 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_0182: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@42-6' Linq101Quantifiers01/'Pipe #2 input at line 38@42-6'::@_instance - IL_0187: 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_0180: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@42-6' Linq101Quantifiers01/'Pipe #2 input at line 38@42-6'::@_instance + IL_0185: 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_018c: 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_0191: stloc.s 'Pipe #2 input at line 38' + IL_018a: 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_018f: stloc.s 'Pipe #2 input at line 38' .line 43,43 : 10,21 '' - IL_0193: ldloc.s 'Pipe #2 input at line 38' - IL_0195: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_019a: dup - IL_019b: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups2@37 - IL_01a0: stloc.s productGroups2 - IL_01a2: ret + IL_0191: ldloc.s 'Pipe #2 input at line 38' + IL_0193: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0198: dup + IL_0199: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups2@37 + IL_019e: stloc.s productGroups2 + IL_01a0: ret } // end of method $Linq101Quantifiers01::main@ } // end of class ''.$Linq101Quantifiers01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl index cba88c3ee1b..4238c26265d 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: {61EFEE20-6057-8F80-A745-038320EEEF61} +// MVID: {61F2D6A6-6057-8F80-A745-0383A6D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05190000 +// Image base: 0x070E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -3861,7 +3861,6 @@ .line 11,11 : 5,10 '' IL_004a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_004f: stloc.s V_22 - .line 11,11 : 5,10 '' IL_0051: ldnull IL_0052: ldc.i4.0 IL_0053: ldc.i4.0 @@ -3883,7 +3882,6 @@ .line 20,20 : 5,10 '' IL_0075: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_007a: stloc.s V_23 - .line 20,20 : 5,10 '' IL_007c: ldnull IL_007d: ldc.i4.0 IL_007e: ldnull @@ -3933,7 +3931,6 @@ .line 28,28 : 5,10 '' IL_00fd: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0102: stloc.s V_25 - .line 28,28 : 5,10 '' IL_0104: ldnull IL_0105: ldc.i4.0 IL_0106: ldnull @@ -3966,7 +3963,6 @@ .line 37,37 : 4,9 '' IL_0149: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_014e: stloc.s V_27 - .line 37,37 : 4,9 '' IL_0150: ldnull IL_0151: ldc.i4.0 IL_0152: ldnull @@ -3985,7 +3981,6 @@ .line 44,44 : 5,10 '' IL_016a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_016f: stloc.s V_29 - .line 44,44 : 5,10 '' IL_0171: ldnull IL_0172: ldc.i4.0 IL_0173: ldnull @@ -4004,7 +3999,6 @@ .line 51,51 : 5,10 '' IL_018b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0190: stloc.s V_31 - .line 51,51 : 5,10 '' IL_0192: ldnull IL_0193: ldc.i4.0 IL_0194: ldnull @@ -4028,7 +4022,6 @@ .line 59,59 : 5,10 '' IL_01b9: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_01be: stloc.s V_33 - .line 59,59 : 5,10 '' IL_01c0: ldloc.s V_33 IL_01c2: ldloc.s V_33 .line 60,60 : 9,12 '' @@ -4151,7 +4144,6 @@ .line 71,71 : 5,10 '' IL_02db: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_02e0: stloc.s V_37 - .line 71,71 : 5,10 '' IL_02e2: ldloc.s V_37 IL_02e4: ldloc.s V_37 .line 72,72 : 9,12 '' @@ -4187,7 +4179,6 @@ .line 81,81 : 5,10 '' IL_0338: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_033d: stloc.s V_39 - .line 81,81 : 5,10 '' IL_033f: ldloc.s V_39 IL_0341: ldloc.s V_39 .line 82,82 : 9,12 '' @@ -4218,7 +4209,6 @@ .line 90,90 : 5,10 '' IL_0388: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_038d: stloc.s V_41 - .line 90,90 : 5,10 '' IL_038f: ldloc.s V_41 IL_0391: ldloc.s V_41 .line 91,91 : 9,12 '' @@ -4247,7 +4237,6 @@ .line 99,99 : 5,10 '' IL_03d7: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_03dc: stloc.s V_42 - .line 99,99 : 5,10 '' IL_03de: ldloc.s V_42 IL_03e0: ldloc.s V_42 .line 100,100 : 9,12 '' @@ -4282,7 +4271,6 @@ .line 110,110 : 5,10 '' IL_0431: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0436: stloc.s V_43 - .line 110,110 : 5,10 '' IL_0438: ldloc.s V_43 IL_043a: ldloc.s V_43 IL_043c: ldloc.s V_43 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101SetOperators01.il.bsl index dca9f90cc1f..24e27d6fbf6 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: {61E07032-4EE5-349F-A745-03833270E061} +// MVID: {61F2D6A6-4EE5-349F-A745-0383A6D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07380000 +// Image base: 0x06C30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1552,7 +1552,6 @@ .line 12,12 : 5,10 '' IL_002b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0030: stloc.s V_8 - .line 12,12 : 5,10 '' IL_0032: ldloc.s V_8 IL_0034: ldnull IL_0035: ldc.i4.0 @@ -1580,7 +1579,6 @@ .line 21,21 : 5,10 '' IL_0068: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_006d: stloc.s V_10 - .line 21,21 : 5,10 '' IL_006f: ldloc.s V_10 IL_0071: ldnull IL_0072: ldc.i4.0 @@ -1606,7 +1604,6 @@ .line 31,31 : 5,10 '' IL_00a5: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00aa: stloc.s V_11 - .line 31,31 : 5,10 '' IL_00ac: ldnull IL_00ad: ldc.i4.0 IL_00ae: ldc.i4.0 @@ -1619,7 +1616,6 @@ .line 37,37 : 5,10 '' IL_00bc: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00c1: stloc.s V_12 - .line 37,37 : 5,10 '' IL_00c3: ldnull IL_00c4: ldc.i4.0 IL_00c5: ldc.i4.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl index 566cd6a5d6a..b3c994a2d28 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: {61F2AFFA-FF23-CD21-A745-0383FAAFF261} +// MVID: {61F2D6A6-FF23-CD21-A745-0383A6D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06BE0000 +// Image base: 0x06A50000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1220,7 +1220,6 @@ .line 13,13 : 5,10 '' IL_004a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_004f: stloc.s V_10 - .line 13,13 : 5,10 '' IL_0051: ldloc.s V_10 IL_0053: ldloc.s V_10 .line 14,14 : 9,12 '' @@ -1254,7 +1253,6 @@ .line 23,23 : 5,10 '' IL_00a4: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00a9: stloc.s V_11 - .line 23,23 : 5,10 '' IL_00ab: ldloc.s V_11 IL_00ad: ldloc.s V_11 .line 24,24 : 9,12 '' @@ -1279,7 +1277,6 @@ .line 31,31 : 5,10 '' IL_00e9: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_00ee: stloc.s V_12 - .line 31,31 : 5,10 '' IL_00f0: ldloc.s V_12 IL_00f2: ldloc.s V_12 .line 32,32 : 9,12 '' @@ -1311,7 +1308,6 @@ .line 41,41 : 5,10 '' IL_013d: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0142: stloc.s V_14 - .line 41,41 : 5,10 '' IL_0144: ldloc.s V_14 IL_0146: ldloc.s V_14 .line 42,42 : 9,12 '' @@ -1377,7 +1373,6 @@ .line 50,50 : 5,10 '' IL_01fe: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() IL_0203: stloc.s V_16 - .line 50,50 : 5,10 '' IL_0205: ldnull IL_0206: ldc.i4.0 IL_0207: ldnull diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelModule.il.bsl index 9cab640c02b..0e3f3afaa40 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: {61EFEE22-37F5-C118-A745-038322EEEF61} +// MVID: {61F2D6CA-37F5-C118-A745-0383CAD6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07240000 +// Image base: 0x07430000 // =============== CLASS MEMBERS DECLARATION =================== @@ -792,6 +792,7 @@ { // Code size 16 (0x10) .maxstack 8 + .line 8,8 : 14,15 '' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 @@ -1563,6 +1564,7 @@ { // Code size 16 (0x10) .maxstack 8 + .line 18,18 : 18,19 '' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SerializableAttribute/ToplevelNamespace.il.bsl index ae55993ea70..f91bd3c72d3 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: {61EFEE23-218B-729A-A745-038323EEEF61} +// MVID: {61F2D6CC-218B-729A-A745-0383CCD6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07150000 +// Image base: 0x07080000 // =============== CLASS MEMBERS DECLARATION =================== @@ -787,6 +787,7 @@ { // Code size 16 (0x10) .maxstack 8 + .line 9,9 : 10,11 '' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 @@ -1558,6 +1559,7 @@ { // Code size 16 (0x10) .maxstack 8 + .line 15,15 : 14,15 '' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 @@ -2329,6 +2331,7 @@ { // Code size 16 (0x10) .maxstack 8 + .line 25,25 : 18,19 '' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 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 a203c207a38..ec48ddb93c2 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: {61E07031-EC34-E66E-A745-03833170E061} +// MVID: {61F2D6A5-EC34-E66E-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x071A0000 +// Image base: 0x07370000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,6 +62,8 @@ { // Code size 9 (0x9) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 4,4 : 6,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\StaticInit\\StaticInit_Class01.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 @@ -74,8 +76,7 @@ .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) // Code size 38 (0x26) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 7,7 : 23,37 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\StaticInit\\StaticInit_Class01.fs' + .line 7,7 : 23,37 '' IL_0000: nop .line 100001,100001 : 0,0 '' IL_0001: volatile. diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction19.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction19.il.bsl index b8c9dfb4aed..59c76dae6fa 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction19.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction19.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000358 Length: 0x00000100 } .module TestFunction19.exe -// MVID: {61E07031-A624-46AE-A745-03833170E061} +// MVID: {61F2D6A5-A624-46AE-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07110000 +// Image base: 0x06B00000 // =============== CLASS MEMBERS DECLARATION =================== @@ -63,6 +63,8 @@ { // Code size 23 (0x17) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 4,4 : 6,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction19.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 @@ -81,8 +83,7 @@ { // Code size 7 (0x7) .maxstack 8 - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 21,22 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction19.fs' + .line 5,5 : 21,22 '' IL_0000: ldarg.0 IL_0001: ldfld int32 TestFunction19/C::x IL_0006: ret diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction20.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction20.il.bsl index 5ef2076721e..65316d43de6 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction20.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction20.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000398 Length: 0x00000100 } .module TestFunction20.exe -// MVID: {61E07031-A643-44FB-A745-03833170E061} +// MVID: {61F2D6A5-A643-44FB-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06880000 +// Image base: 0x07180000 // =============== CLASS MEMBERS DECLARATION =================== @@ -66,7 +66,7 @@ .locals init ([0] int32 z, [1] int32 w) .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\\TestFunction20.fs' + .line 4,4 : 6,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction20.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction23.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction23.il.bsl index 3a966628ad7..7a18665fe81 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction23.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction23.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000340 Length: 0x000000E3 } .module TestFunction23.exe -// MVID: {61E07031-A643-451C-A745-03833170E061} +// MVID: {61F2D6A5-A643-451C-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06E80000 +// Image base: 0x073A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,6 +62,8 @@ { // Code size 31 (0x1f) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 5,5 : 6,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction23.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 @@ -81,8 +83,7 @@ // Code size 20 (0x14) .maxstack 4 .locals init ([0] class TestFunction23/C self) - .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\\TestFunction23.fs' + .line 100001,100001 : 0,0 '' IL_0000: ldarg.0 IL_0001: stloc.0 .line 9,9 : 23,30 '' diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/OptionalArg01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/OptionalArg01.il.bsl index 76d1d5166b0..6b7f68ae539 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: {61F030F2-4F48-B5AF-A745-0383F230F061} +// MVID: {61F2D6A5-4F48-B5AF-A745-0383A5D6F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x072A0000 +// Image base: 0x06C30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -60,6 +60,8 @@ { // Code size 9 (0x9) .maxstack 8 + .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' + .line 2,2 : 6,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\OptionalArg01.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 @@ -78,6 +80,7 @@ { // Code size 9 (0x9) .maxstack 8 + .line 5,5 : 6,7 '' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 @@ -100,8 +103,7 @@ [2] class [mscorlib]System.Collections.Generic.List`1 attribs, [3] class [FSharp.Core]Microsoft.FSharp.Core.FSharpOption`1 V_3, [4] class OptionalArg01/A v2) - .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 7,7 : 9,22 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Tuples\\OptionalArg01.fs' + .line 7,7 : 9,22 '' IL_0000: nop .line 8,8 : 21,34 '' IL_0001: nop From 505e2961f5aaf2916fd7c9d5c4d528810de8c154 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 27 Jan 2022 18:39:40 +0000 Subject: [PATCH 12/35] fix debug points on while of computation expressions --- docs/debug-emit.md | 21 +++++++++- src/fsharp/CheckComputationExpressions.fs | 40 +++++++++++-------- .../AsyncExpressionSteppingTest2.il.bsl | 20 +++++----- .../ComputationExpr06.il.bsl | 20 +++++----- 4 files changed, 61 insertions(+), 40 deletions(-) diff --git a/docs/debug-emit.md b/docs/debug-emit.md index 70477ded0b0..7a9157532c1 100644 --- a/docs/debug-emit.md +++ b/docs/debug-emit.md @@ -102,7 +102,7 @@ The intended debug points for control-flow constructs are as follows: | `yield expr` | On `yield expr` | | `return expr` | On `return expr` | -Some debug points are implicit. In particular, whenever a non-control-flow expression (e.g. a constant or a call) is used in statement position (e.g. as the implementation of a method, or the body of a `while`) then there is an implicit debug point over the whole statement/expression. +Other non-control-flow expression (e.g. a constant or a call) get a debug point when used in statement position (e.g. as the implementation of a method, or the body of a `while`). ### Intended debug points for let-bindings @@ -162,7 +162,24 @@ This will have debug points on `for i in 1 .. 10 do` and `printfn "hello"`. ### Intended debug points for other computation expressions -Other computation expressions such as `async { .. }` have significant problems with their debug points, for multiple reasons: +Other computation expressions such as `async { .. }` or `builder { ... }` get debug points as follows: + +* A debug point for `builder` prior to the evaluation of the expression + +* In the de-sugaring of the computation expression, each point a lambda is created implicitly, then the body of that + lambda as specified by the F# language spec is treated as control-flow and debug points added per the earlier spec. + +* For every `builder.Bind`, `builder.BindReturn` and similar call that corresponds to a `let` where there would be a debug point, a debug point is added immediately prior to the call. + +* For every `builder.For` call, a debug point covering the `for` keyword is added immediately prior to the call. No debug point is added for the `builder.For` call itself even if used in statement position. The `ForLoop.InOrToKeyword` named debug point is associated with the `in` or `to` keyword and made available to inline code using `__debugPoint`. + +* For every `builder.While` call, a debug point covering the `while` keyword plus guard expression is added immediately prior to the execution of the guard within the guard lambda expression. No debug point is added for the `builder.While` call itself even if used in statement position. + +* For every `builder.TryFinally` call, a debug point covering the `try` keyword is added immediately within the body lambda expression. A debug point covering the `finally` keyword is added immediately within the finally lambda expression. No debug point is added for the `builder.TryFinally` call itself even if used in statement position. + +* For every `builder.Yield`, `builder.Return`, `builder.YieldFrom` or `builder.ReturnFrom` call, debug points are placed on the expression as if it were control flow. For example `yield 1` will place a debug point on `1`and `yield! printfn "hello"; [2]` will place two debug points. + +* No debug point is added for the `builder.Run`, `builder.Run` or `builder.Delay` calls at the entrance to the computation expression, nor the `builder.Delay` calls implied by `try/with` or `try/finally` or sequential `Combine` calls. * The debug points are largely lost during de-sugaring * The computations are often "cold-start" anyway, leading to a two-phase debug problem diff --git a/src/fsharp/CheckComputationExpressions.fs b/src/fsharp/CheckComputationExpressions.fs index 1d1c1360445..88f96cadadd 100644 --- a/src/fsharp/CheckComputationExpressions.fs +++ b/src/fsharp/CheckComputationExpressions.fs @@ -752,7 +752,8 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter // Flag that a debug point should get emitted prior to both the evaluation of 'rhsExpr' and the call to Using let addBindDebugPoint spBind e = match spBind with - | DebugPointAtBinding.Yes m -> SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes m, true), e) + | DebugPointAtBinding.Yes m -> + SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes m, true), e) | _ -> e let emptyVarSpace = LazyWithContext.NotLazy ([], env) @@ -979,7 +980,8 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let forCall = match spFor with - | DebugPointAtFor.Yes m -> SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes m, false), forCall) + | DebugPointAtFor.Yes _ -> + SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mFor, true), forCall) | DebugPointAtFor.No -> forCall translatedCtxt forCall)) @@ -1007,8 +1009,8 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter // 'while' is hit just before each time the guard is called let guardExpr = match spWhile with - | DebugPointAtWhile.Yes mWhile -> - SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mWhile, false), guardExpr) + | DebugPointAtWhile.Yes _ -> + SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mWhile, true), guardExpr) | DebugPointAtWhile.No -> guardExpr Some(trans CompExprTranslationPass.Initial q varSpace innerComp (fun holeFill -> @@ -1020,11 +1022,13 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter | SynExpr.TryFinally (innerComp, unwindExpr, mTryToLast, spTry, spFinally) -> let mTry = match spTry with DebugPointAtTry.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.Try) | _ -> mTryToLast + let mFinally = match spFinally with DebugPointAtFinally.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.Finally) | _ -> mTryToLast // Put down a debug point for the 'finally' let unwindExpr2 = match spFinally with - | DebugPointAtFinally.Yes mFinally -> SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mFinally, false), unwindExpr) + | DebugPointAtFinally.Yes _ -> + SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mFinally, false), unwindExpr) | DebugPointAtFinally.No -> unwindExpr if isQuery then error(Error(FSComp.SR.tcNoTryFinallyInQuery(), mTry)) @@ -1035,12 +1039,13 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mTry ad "Delay" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("Delay"), mTry)) + let innerExpr = transNoQueryOps innerComp + let innerExpr = - transNoQueryOps innerComp - |> fun e -> - match spTry with - | DebugPointAtTry.Yes mTry -> SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mTry, false), e) - | _ -> e + match spTry with + | DebugPointAtTry.Yes _ -> + SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mTry, false), innerExpr) + | _ -> innerExpr Some (translatedCtxt (mkSynCall "TryFinally" mTry [ @@ -1401,19 +1406,19 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mTry ad "Delay" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("Delay"), mTry)) + let innerExpr = transNoQueryOps innerComp + let innerExpr = - transNoQueryOps innerComp - |> fun e -> match spTry with - | DebugPointAtTry.Yes m -> SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes m, false), e) - | _ -> e + | DebugPointAtTry.Yes _ -> + SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mTry, false), innerExpr) + | _ -> innerExpr let callExpr = mkSynCall "TryWith" mTry [ mkSynCall "Delay" mTry [mkSynDelay2 innerExpr] consumeExpr ] - //|> fun e -> SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes m), e) Some(translatedCtxt callExpr) @@ -1912,7 +1917,10 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m = let guardLambdaExpr = mkUnitDelayLambda cenv.g guardExprMark guardExpr // We attach the debug point to the lambda expression so we can fetch it out again in LowerComputedListOrArraySeqExpr - let mWhile = match spWhile with DebugPointAtWhile.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.While) | _ -> guardExprMark + let mWhile = + match spWhile with + | DebugPointAtWhile.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.While) + | _ -> guardExprMark let innerDelayedExpr = mkSeqDelayedExpr mWhile innerExpr Some(mkSeqGenerated cenv env guardExprMark genOuterTy guardLambdaExpr innerDelayedExpr, tpenv) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl index 2d367600087..c2c1e4df2cc 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest2.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000B1 } .module AsyncExpressionSteppingTest2.dll -// MVID: {61F2D6A5-6394-D499-A745-0383A5D6F261} +// MVID: {61F2E23B-6394-D499-A745-03833BE2F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06940000 +// Image base: 0x05BB0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -77,18 +77,16 @@ .method public strict virtual instance bool Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 16 (0x10) + // Code size 15 (0xf) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 6,6 : 17,29 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\AsyncExpressionStepping\\AsyncExpressionSteppingTest2.fs' - IL_0000: nop - .line 6,6 : 23,29 '' - IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-1'::x - IL_0007: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_000c: ldc.i4.4 - IL_000d: clt - IL_000f: ret + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 AsyncExpressionSteppingTest2/AsyncExpressionSteppingTest2/'f2@6-1'::x + IL_0006: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_000b: ldc.i4.4 + IL_000c: clt + IL_000e: ret } // end of method 'f2@6-1'::Invoke } // end of class 'f2@6-1' diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.il.bsl index 05265ca99e5..368de5fccbb 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ComputationExpressions/ComputationExpr06.il.bsl @@ -40,13 +40,13 @@ // Offset: 0x00000218 Length: 0x0000007D } .module ComputationExpr06.exe -// MVID: {61F2D6A5-35A8-E566-A745-0383A5D6F261} +// MVID: {61F2E23B-35A8-E566-A745-03833BE2F261} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06DB0000 +// Image base: 0x07210000 // =============== CLASS MEMBERS DECLARATION =================== @@ -77,18 +77,16 @@ .method public strict virtual instance bool Invoke(class [FSharp.Core]Microsoft.FSharp.Core.Unit unitVar) cil managed { - // Code size 16 (0x10) + // Code size 15 (0xf) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 9,9 : 9,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ComputationExpressions\\ComputationExpr06.fs' - IL_0000: nop - .line 9,9 : 15,21 '' - IL_0001: ldarg.0 - IL_0002: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ComputationExpr06/'res6@9-1'::x - IL_0007: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) - IL_000c: ldc.i4.0 - IL_000d: cgt - IL_000f: ret + IL_0000: ldarg.0 + IL_0001: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 ComputationExpr06/'res6@9-1'::x + IL_0006: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) + IL_000b: ldc.i4.0 + IL_000c: cgt + IL_000e: ret } // end of method 'res6@9-1'::Invoke } // end of class 'res6@9-1' From 9941dd9fc07f11c6889169e933b3e7d42da81968 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 28 Jan 2022 00:28:50 +0000 Subject: [PATCH 13/35] fix test --- src/fsharp/CheckComputationExpressions.fs | 8 +- ...erService.SurfaceArea.netstandard.expected | 22 ---- .../CodeGen/EmittedIL/TaskGeneratedCode.fs | 113 +++++++++--------- 3 files changed, 60 insertions(+), 83 deletions(-) diff --git a/src/fsharp/CheckComputationExpressions.fs b/src/fsharp/CheckComputationExpressions.fs index 88f96cadadd..b75ebdf3402 100644 --- a/src/fsharp/CheckComputationExpressions.fs +++ b/src/fsharp/CheckComputationExpressions.fs @@ -1409,10 +1409,10 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let innerExpr = transNoQueryOps innerComp let innerExpr = - match spTry with - | DebugPointAtTry.Yes _ -> - SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mTry, false), innerExpr) - | _ -> innerExpr + match spTry with + | DebugPointAtTry.Yes _ -> + SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mTry, false), innerExpr) + | _ -> innerExpr let callExpr = mkSynCall "TryWith" mTry [ 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 d0e2ca8b038..bdb846bb6ec 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected @@ -5290,28 +5290,6 @@ 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.DebugPointAtTarget FSharp.Compiler.Syntax.DebugPointAtTarget+Tags: Int32 No FSharp.Compiler.Syntax.DebugPointAtTarget+Tags: Int32 Yes diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs index 371b2d44c12..0ae297ffaa0 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/TaskGeneratedCode.fs @@ -950,69 +950,68 @@ 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_0018 - - IL_000c: nop - 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 + 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 } catch [runtime]System.Object { - 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_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_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 + 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 } """ ]) From ebfd31b4f2546e9c3114ba235fe5b5e068abfbcc Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 3 Feb 2022 20:04:36 +0000 Subject: [PATCH 14/35] fix debug points in classes --- docs/debug-emit.md | 17 ++++++++-- src/fsharp/CheckComputationExpressions.fs | 9 +---- src/fsharp/CheckDeclarations.fs | 23 ++++++++++--- src/fsharp/CheckExpressions.fs | 3 -- src/fsharp/CheckExpressions.fsi | 2 -- src/fsharp/FSharp.Core/resumable.fs | 7 +--- src/fsharp/FSharp.Core/resumable.fsi | 23 ------------- src/fsharp/IlxGen.fs | 40 +---------------------- src/fsharp/InnerLambdasToTopLevelFuncs.fs | 4 +-- src/fsharp/Optimizer.fs | 4 +-- src/fsharp/ParseAndCheckInputs.fs | 2 +- src/fsharp/TypedTree.fs | 3 +- src/fsharp/TypedTreeBasics.fs | 8 ++--- src/fsharp/fsi/fsi.fs | 2 +- src/fsharp/symbols/Exprs.fs | 2 +- 15 files changed, 49 insertions(+), 100 deletions(-) diff --git a/docs/debug-emit.md b/docs/debug-emit.md index 2d0d9435d77..eded2d3b4fb 100644 --- a/docs/debug-emit.md +++ b/docs/debug-emit.md @@ -195,7 +195,7 @@ Other computation expressions such as `async { .. }` or `builder { ... }` get de * For every `builder.Bind`, `builder.BindReturn` and similar call that corresponds to a `let` where there would be a debug point, a debug point is added immediately prior to the call. -* For every `builder.For` call, a debug point covering the `for` keyword is added immediately prior to the call. No debug point is added for the `builder.For` call itself even if used in statement position. The `ForLoop.InOrToKeyword` named debug point is associated with the `in` or `to` keyword and made available to inline code using `__debugPoint`. +* For every `builder.For` call, a debug point covering the `for` keyword is added immediately prior to the call. No debug point is added for the `builder.For` call itself even if used in statement position. * For every `builder.While` call, a debug point covering the `while` keyword plus guard expression is added immediately prior to the execution of the guard within the guard lambda expression. No debug point is added for the `builder.While` call itself even if used in statement position. @@ -213,7 +213,20 @@ One approach is to inline the `builder.While` method, and apply `[ + | SynExpr.ForEach (spFor, _spIn, SeqExprOnly _seqExprOnly, isFromSource, pat, sourceExpr, innerComp, _mEntireForEach) -> let sourceExpr = match RewriteRangeExpr sourceExpr with | Some e -> e @@ -954,13 +954,6 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter | DebugPointAtFor.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.For) | DebugPointAtFor.No -> pat.Range - // For computation expressions, 'in' or 'to' is hit on each MoveNext. - // To support this a named debug point for the "in" keyword is available to inlined code. - match spIn with - | DebugPointAtInOrTo.Yes mIn -> - cenv.namedDebugPointsForInlinedCode[{Range=mFor; Name="ForLoop.InOrToKeyword"}] <- mIn - | _ -> () - let mPat = pat.Range if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mFor ad "For" builderTy) then diff --git a/src/fsharp/CheckDeclarations.fs b/src/fsharp/CheckDeclarations.fs index 0e9997c99cf..32b5346605c 100644 --- a/src/fsharp/CheckDeclarations.fs +++ b/src/fsharp/CheckDeclarations.fs @@ -975,8 +975,13 @@ module IncrClassChecking = ValReprInfo(tpNames@ValReprInfo.InferTyparInfo copyOfTyconTypars, args, ret) let prelimTyschemeG = TypeScheme(copyOfTyconTypars@tps, memberTauTy) + + // NOTE: putting isCompilerGenerated=true here is strange. The method is not public, nor is + // it a "member" in the F# sense, but the F# spec says it is generated and it is reasonable to reflect on it. let memberValScheme = ValScheme(id, prelimTyschemeG, Some topValInfo, Some memberInfo, false, ValInline.Never, NormalVal, None, true (* isCompilerGenerated *), true (* isIncrClass *), false, false) + let methodVal = MakeAndPublishVal cenv env (Parent tcref, false, ModuleOrMemberBinding, ValNotInRecScope, memberValScheme, v.Attribs, XmlDoc.Empty, None, false) + reportIfUnused() InMethod(isStatic, methodVal, topValInfo) @@ -1301,7 +1306,9 @@ module IncrClassChecking = | _, (Expr.Lambda _ | Expr.TyLambda _) -> v.Range | DebugPointAtBinding.Yes m, _ -> m | _ -> v.Range + let assignExpr = reps.MakeValueAssign (Some thisVal) thisTyInst NoSafeInitInfo v rhsExpr m + let adjustSafeInitFieldExprOpt = if isStatic then match safeStaticInitInfo with @@ -1315,7 +1322,16 @@ module IncrClassChecking = None (isPriorToSuperInit, (fun e -> - let e = match adjustSafeInitFieldExprOpt with None -> e | Some ae -> mkCompGenSequential m ae e + let e = + match adjustSafeInitFieldExprOpt with + | None -> e + | Some adjustExpr -> mkCompGenSequential m adjustExpr e + + let assignExpr = + match spBind with + | DebugPointAtBinding.Yes _ -> mkDebugPoint m assignExpr + | _ -> assignExpr + mkSequential m assignExpr e)), [] /// Work out the implicit construction side effects of a 'let', 'let rec' or 'do' @@ -1344,7 +1360,7 @@ module IncrClassChecking = | IncrClassDo (doExpr, isStatic) -> let doExpr = reps.FixupIncrClassExprPhase2C cenv (Some thisVal) safeStaticInitInfo thisTyInst doExpr - let binder = (fun e -> mkSequential doExpr.Range doExpr e) + let binder = (fun e -> mkSequential doExpr.Range (Expr.DebugPoint(DebugPointAtLeafExpr.Yes doExpr.Range, doExpr)) e) let isPriorToSuperInit = false if isStatic then ([(isPriorToSuperInit, binder)], [], []), reps @@ -5969,8 +5985,7 @@ let TypeCheckOneImplFile | _ -> () | _ -> ()) - let namedDebugPointsForInlinedCode = cenv.namedDebugPointsForInlinedCode |> Seq.toArray |> Array.map (fun (KeyValue(k,v)) -> (k,v)) |> Map - let implFile = TImplFile (qualNameOfFile, scopedPragmas, implFileExprAfterSig, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode) + let implFile = TImplFile (qualNameOfFile, scopedPragmas, implFileExprAfterSig, hasExplicitEntryPoint, isScript, anonRecdTypes) return (topAttrs, implFile, implFileTypePriorToSig, envAtEnd, cenv.createsGeneratedProvidedTypes) } diff --git a/src/fsharp/CheckExpressions.fs b/src/fsharp/CheckExpressions.fs index 10a93c8c714..bd1a16cd955 100644 --- a/src/fsharp/CheckExpressions.fs +++ b/src/fsharp/CheckExpressions.fs @@ -412,8 +412,6 @@ type TcFileState = /// The set of active conditional defines. The value is None when conditional erasure is disabled in tooling. conditionalDefines: string list option - namedDebugPointsForInlinedCode: Dictionary - isInternalTestSpanStackReferring: bool // forward call TcSequenceExpressionEntry: TcFileState -> TcEnv -> OverallTy -> UnscopedTyparEnv -> bool * SynExpr -> range -> Expr * UnscopedTyparEnv @@ -447,7 +445,6 @@ type TcFileState = synArgNameGenerator = SynArgNameGenerator() isSig = isSig haveSig = haveSig - namedDebugPointsForInlinedCode = Dictionary() compilingCanonicalFslibModuleType = (isSig || not haveSig) && g.compilingFslib conditionalDefines = conditionalDefines isInternalTestSpanStackReferring = isInternalTestSpanStackReferring diff --git a/src/fsharp/CheckExpressions.fsi b/src/fsharp/CheckExpressions.fsi index 97f0191a8e4..2455f11819f 100644 --- a/src/fsharp/CheckExpressions.fsi +++ b/src/fsharp/CheckExpressions.fsi @@ -229,8 +229,6 @@ type TcFileState = /// The set of active conditional defines. The value is None when conditional erasure is disabled in tooling. conditionalDefines: string list option - namedDebugPointsForInlinedCode: Dictionary - isInternalTestSpanStackReferring: bool // forward call TcSequenceExpressionEntry: TcFileState -> TcEnv -> OverallTy -> UnscopedTyparEnv -> bool * SynExpr -> range -> Expr * UnscopedTyparEnv diff --git a/src/fsharp/FSharp.Core/resumable.fs b/src/fsharp/FSharp.Core/resumable.fs index 326438aad23..6a233dd869c 100644 --- a/src/fsharp/FSharp.Core/resumable.fs +++ b/src/fsharp/FSharp.Core/resumable.fs @@ -84,9 +84,6 @@ module StateMachineHelpers = [] let __useResumableCode<'T> : bool = false - [] - let __debugPoint (_name: string) : unit = () - [] let __resumableEntry () : int option = failwith "__resumableEntry should always be guarded by __useResumableCode and only used in valid state machine implementations" @@ -330,9 +327,7 @@ module ResumableCode = // ... and its body is a while loop that advances the enumerator and runs the body on each element. (fun e -> While( - (fun () -> - __debugPoint "ForLoop.InOrToKeyword" - e.MoveNext()), + (fun () -> e.MoveNext()), ResumableCode<'Data, unit>(fun sm -> (body e.Current).Invoke(&sm))))) diff --git a/src/fsharp/FSharp.Core/resumable.fsi b/src/fsharp/FSharp.Core/resumable.fsi index f223ddbf726..303c9c67a4c 100644 --- a/src/fsharp/FSharp.Core/resumable.fsi +++ b/src/fsharp/FSharp.Core/resumable.fsi @@ -136,29 +136,6 @@ module StateMachineHelpers = [] val __useResumableCode<'T> : bool - /// - /// Indicates a named debug point arising from the context of inlined resumable code. - /// - /// - /// If the code was ultimately inlined from a "try .. with" construct in a computation expression, - /// the names "TryWith.TryKeyword" and "TryWith.WithKeyword" can be used. - /// - /// If the code was ultimately inlined from a "try .. finally" construct in a computation expression, - /// the names "TryFinally.TryKeyword" and "TryFinally.FinallyKeyword" can be used. - /// - /// If the code was ultimately inlined from a "while .. do" construct in a computation expression, - /// the name "While.WhileKeyword" can be used. - /// - /// If the code was ultimately inlined from a "for .. in .. do" or "for .. = .. to .. do" construct in a computation expression, - /// the name "ForLoop.InOrToKeyword" can be used. - /// - /// If the name doesn't correspond to a known debug point arising from the original source context, then no - /// debug point is emitted. If opt-in warning 3514 is enabled a warning is emitted. - /// - - [] - val __debugPoint: string -> unit - /// /// Indicates a resumption point within resumable code /// diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index 957e1779cee..54481c57513 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -245,12 +245,6 @@ type cenv = /// The options for ILX code generation opts: IlxGenOptions - /// Collection of all debug points available for inlined code - namedDebugPointsForInlinedCode: Map - - // /// Unnamed extra debug points that have been emitted - //emittedPriorDebugPoints: HashSet - /// Cache the generation of the "unit" type mutable ilUnitTy: ILType option @@ -2320,30 +2314,6 @@ let rec GenExpr cenv cgbuf eenv (expr: Expr) sequel = and GenExprPreSteps (cenv: cenv) (cgbuf: CodeGenBuffer) eenv expr sequel = let g = cenv.g - // Check for the '__debugPoint" construct for inlined code - match expr with - | Expr.Sequential((DebugPointExpr g debugPointName) as dpExpr, codeExpr, NormalSeq, m) -> - match cenv.namedDebugPointsForInlinedCode.TryGetValue({Range=m; Name=debugPointName}) with - | false, _ -> - // printfn $"---- Unfound debug point {debugPointName} at {m}" - // for KeyValue(k,v) in cenv.namedDebugPointsForInlinedCode do - // printfn $"{k.Range} , {k.Name} -> {v}" - let others = - [ for k in cenv.namedDebugPointsForInlinedCode.Keys do - if Range.equals m k.Range then - yield k.Name ] - |> String.concat "," - informationalWarning(Error(FSComp.SR.ilxGenUnknownDebugPoint(debugPointName, others), dpExpr.Range)) - | true, dp -> - // printfn $"---- Found debug point {debugPointName} at {m} --> {dp}" - CG.EmitDebugPoint cgbuf dp - GenExpr cenv cgbuf eenv codeExpr sequel - true - - | _ -> - - //ProcessDebugPointForExpr cenv cgbuf expr - match (if compileSequenceExpressions then LowerComputedListOrArrayExpr cenv.tcVal g cenv.amap expr else None) with | Some altExpr -> GenExpr cenv cgbuf eenv altExpr sequel @@ -7435,7 +7405,7 @@ and GenModuleBinding cenv (cgbuf: CodeGenBuffer) (qname: QualifiedNameOfFile) la /// Generate the namespace fragments in a single file and GenImplFile cenv (mgbuf: AssemblyBuilder) mainInfoOpt eenv (implFile: TypedImplFileAfterOptimization) = - let (TImplFile (qname, _, mexpr, hasExplicitEntryPoint, isScript, anonRecdTypes, _)) = implFile.ImplFile + let (TImplFile (qname, _, mexpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = implFile.ImplFile let optimizeDuringCodeGen = implFile.OptimizeDuringCodeGen let g = cenv.g let m = qname.Range @@ -8707,19 +8677,11 @@ type IlxAssemblyGenerator(amap: ImportMap, tcGlobals: TcGlobals, tcVal: Constrai /// Generate ILX code for an assembly fragment member _.GenerateCode (codeGenOpts, typedAssembly: TypedAssemblyAfterOptimization, assemAttribs, moduleAttribs) = - let namedDebugPointsForInlinedCode = - let (TypedAssemblyAfterOptimization impls) = typedAssembly - [| for impl in impls do - let (TImplFile(namedDebugPointsForInlinedCode=dps)) = impl.ImplFile - for KeyValue(k,v) in dps do - yield (k,v) |] - |> Map let cenv: cenv = { g=tcGlobals tcVal = tcVal viewCcu = ccu ilUnitTy = None - namedDebugPointsForInlinedCode = namedDebugPointsForInlinedCode //emittedPriorDebugPoints = HashSet() amap = amap casApplied = casApplied diff --git a/src/fsharp/InnerLambdasToTopLevelFuncs.fs b/src/fsharp/InnerLambdasToTopLevelFuncs.fs index f5788c9c810..ca291f2e816 100644 --- a/src/fsharp/InnerLambdasToTopLevelFuncs.fs +++ b/src/fsharp/InnerLambdasToTopLevelFuncs.fs @@ -1354,9 +1354,9 @@ module Pass4_RewriteAssembly = let rhs, z = TransModuleDef penv z rhs ModuleOrNamespaceBinding.Module(nm, rhs), z - let TransImplFile penv z (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = + let TransImplFile penv z (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = let moduleExpr, z = TransModuleExpr penv z moduleExpr - (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)), z + (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)), z //------------------------------------------------------------------------- // pass5: copyExpr diff --git a/src/fsharp/Optimizer.fs b/src/fsharp/Optimizer.fs index 6ce3dd5fdd5..2cab5c0b5b4 100644 --- a/src/fsharp/Optimizer.fs +++ b/src/fsharp/Optimizer.fs @@ -3973,7 +3973,7 @@ and OptimizeModuleDefs cenv (env, bindInfosColl) defs = (defs, UnionOptimizationInfos minfos), (env, bindInfosColl) and OptimizeImplFileInternal cenv env isIncrementalFragment hidden implFile = - let (TImplFile (qname, pragmas, mexpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = implFile + let (TImplFile (qname, pragmas, mexpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = implFile let env, mexprR, minfo = match mexpr with // FSI: FSI compiles everything as if you're typing incrementally into one module @@ -3992,7 +3992,7 @@ and OptimizeImplFileInternal cenv env isIncrementalFragment hidden implFile = let hidden = ComputeHidingInfoAtAssemblyBoundary mexpr.Type hidden let minfo = AbstractLazyModulInfoByHiding true hidden minfo - env, TImplFile (qname, pragmas, mexprR, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode), minfo, hidden + env, TImplFile (qname, pragmas, mexprR, hasExplicitEntryPoint, isScript, anonRecdTypes), minfo, hidden /// Entry point let OptimizeImplFile (settings, ccu, tcGlobals, tcVal, importMap, optEnv, isIncrementalFragment, emitTailcalls, hidden, mimpls) = diff --git a/src/fsharp/ParseAndCheckInputs.fs b/src/fsharp/ParseAndCheckInputs.fs index b65bb99d614..345a2113749 100644 --- a/src/fsharp/ParseAndCheckInputs.fs +++ b/src/fsharp/ParseAndCheckInputs.fs @@ -891,7 +891,7 @@ let TypeCheckOneInput(checkForErrors, let typeCheckOne = if skipImplIfSigExists && hadSig then let dummyExpr = ModuleOrNamespaceExprWithSig.ModuleOrNamespaceExprWithSig(rootSigOpt.Value, ModuleOrNamespaceExpr.TMDefs [], range.Zero) - let dummyImplFile = TypedImplFile.TImplFile(qualNameOfFile, [], dummyExpr, false, false, StampMap [], Map.empty) + let dummyImplFile = TypedImplFile.TImplFile(qualNameOfFile, [], dummyExpr, false, false, StampMap []) (EmptyTopAttrs, dummyImplFile, Unchecked.defaultof<_>, tcImplEnv, false) |> Cancellable.ret diff --git a/src/fsharp/TypedTree.fs b/src/fsharp/TypedTree.fs index 4482b1af6f9..7b5d8890918 100644 --- a/src/fsharp/TypedTree.fs +++ b/src/fsharp/TypedTree.fs @@ -5197,8 +5197,7 @@ type TypedImplFile = implExprWithSig: ModuleOrNamespaceExprWithSig * hasExplicitEntryPoint: bool * isScript: bool * - anonRecdTypeInfo: StampMap * - namedDebugPointsForInlinedCode: Map + anonRecdTypeInfo: StampMap [] member x.DebugText = x.ToString() diff --git a/src/fsharp/TypedTreeBasics.fs b/src/fsharp/TypedTreeBasics.fs index b92bd6ff7bb..673bc8a76ed 100644 --- a/src/fsharp/TypedTreeBasics.fs +++ b/src/fsharp/TypedTreeBasics.fs @@ -78,12 +78,12 @@ let mkRawStructTupleTy tys = TType_tuple (tupInfoStruct, tys) // make up the entire compilation unit //--------------------------------------------------------------------------- -let mapTImplFile f (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = - TImplFile (fragName, pragmas, f moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode) +let mapTImplFile f (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = + TImplFile (fragName, pragmas, f moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes) -let mapAccImplFile f z (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = +let mapAccImplFile f z (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = let moduleExpr, z = f z moduleExpr - TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode), z + TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes), z let foldTImplFile f z (TImplFile (implExprWithSig= moduleExpr)) = f z moduleExpr diff --git a/src/fsharp/fsi/fsi.fs b/src/fsharp/fsi/fsi.fs index c8535fa96c0..02871c7d01c 100644 --- a/src/fsharp/fsi/fsi.fs +++ b/src/fsharp/fsi/fsi.fs @@ -1089,7 +1089,7 @@ let internal mkBoundValueTypedImpl tcGlobals m moduleName name ty = let binding = Binding.TBind(v, bindExpr, DebugPointAtBinding.NoneAtLet) let mbinding = ModuleOrNamespaceBinding.Module(moduleOrNamespace, TMDefs([TMDefLet(binding, m)])) let expr = ModuleOrNamespaceExprWithSig(mty, TMDefs([TMDefs[TMDefRec(false, [], [], [mbinding], m)]]), range0) - moduleOrNamespace, v, TypedImplFile.TImplFile(QualifiedNameOfFile.QualifiedNameOfFile(Ident(moduleName, m)), [], expr, false, false, StampMap.Empty, Map.empty) + moduleOrNamespace, v, TypedImplFile.TImplFile(QualifiedNameOfFile.QualifiedNameOfFile(Ident(moduleName, m)), [], expr, false, false, StampMap.Empty) /// Encapsulates the coordination of the typechecking, optimization and code generation /// components of the F# compiler for interactively executed fragments of code. diff --git a/src/fsharp/symbols/Exprs.fs b/src/fsharp/symbols/Exprs.fs index 97af23bf405..44ab7f15895 100644 --- a/src/fsharp/symbols/Exprs.fs +++ b/src/fsharp/symbols/Exprs.fs @@ -1333,7 +1333,7 @@ and FSharpImplementationFileDeclaration = | InitAction of action: FSharpExpr and FSharpImplementationFileContents(cenv, mimpl) = - let (TImplFile (qname, _pragmas, ModuleOrNamespaceExprWithSig(_, mdef, _), hasExplicitEntryPoint, isScript, _anonRecdTypes, _)) = mimpl + let (TImplFile (qname, _pragmas, ModuleOrNamespaceExprWithSig(_, mdef, _), hasExplicitEntryPoint, isScript, _anonRecdTypes)) = mimpl let rec getDecls2 (ModuleOrNamespaceExprWithSig(_mty, def, _m)) = getDecls def and getBind (bind: Binding) = let v = bind.Var From f60f9bfd92b5e317b895c36be9662cb108a48f25 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Thu, 3 Feb 2022 20:16:26 +0000 Subject: [PATCH 15/35] fix debug points in classes --- .../CodeGen/EmittedIL/Misc/GenericTypeStaticField01.il.bsl | 6 ++++-- .../CodeGen/EmittedIL/Misc/NonEscapingArguments02.il.bsl | 5 +++-- .../CodeGen/EmittedIL/StaticInit/StaticInit_Class01.il.bsl | 5 +++-- .../CodeGen/EmittedIL/StaticInit/StaticInit_Struct01.il.bsl | 5 +++-- .../CodeGen/EmittedIL/TestFunctions/TestFunction23.il.bsl | 6 ++++-- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GenericTypeStaticField01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GenericTypeStaticField01.il.bsl index 26d0b0250c8..ffb061fb8fe 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GenericTypeStaticField01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/GenericTypeStaticField01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000608 Length: 0x000001E1 } .module GenericTypeStaticField01.exe -// MVID: {61F2D6A5-1E75-7E6B-A745-0383A5D6F261} +// MVID: {61FC3629-1E75-7E6B-A745-03832936FC61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06F00000 +// Image base: 0x05580000 // =============== CLASS MEMBERS DECLARATION =================== @@ -76,6 +76,7 @@ { // Code size 19 (0x13) .maxstack 8 + .line 3,3 : 10,41 '' IL_0000: newobj instance void class GenericTypeStaticField01/Foo`1::.ctor() IL_0005: stsfld class GenericTypeStaticField01/Foo`1 class GenericTypeStaticField01/Foo`1::theInstance IL_000a: ldc.i4.1 @@ -141,6 +142,7 @@ { // Code size 19 (0x13) .maxstack 8 + .line 7,7 : 10,44 '' IL_0000: newobj instance void class GenericTypeStaticField01/Bar`2::.ctor() IL_0005: stsfld class GenericTypeStaticField01/Bar`2 class GenericTypeStaticField01/Bar`2::theInstance IL_000a: ldc.i4.1 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NonEscapingArguments02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NonEscapingArguments02.il.bsl index adafe97f786..ba4da100a17 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NonEscapingArguments02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NonEscapingArguments02.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000360 Length: 0x0000019E } .module NonEscapingArguments02.dll -// MVID: {61F2D6A5-BB56-6582-A745-0383A5D6F261} +// MVID: {61FC3629-BB56-6582-A745-03832936FC61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06C70000 +// Image base: 0x00FC0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -67,6 +67,7 @@ IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop + .line 6,6 : 5,36 '' IL_0008: ldarg.0 IL_0009: ldarg.1 IL_000a: call int32 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::Length(class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) 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 ec48ddb93c2..0473438cf5b 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: {61F2D6A5-EC34-E66E-A745-0383A5D6F261} +// MVID: {61FC3629-EC34-E66E-A745-03832936FC61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07370000 +// Image base: 0x07570000 // =============== CLASS MEMBERS DECLARATION =================== @@ -129,6 +129,7 @@ { // Code size 24 (0x18) .maxstack 8 + .line 6,6 : 12,30 '' IL_0000: ldstr "1" IL_0005: callvirt instance int32 [mscorlib]System.String::get_Length() IL_000a: stsfld int32 StaticInit_ClassS01/C::x 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 412169b9868..0d494197f3c 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: {61EFEE1F-05F6-D6CB-A745-03831FEEEF61} +// MVID: {61FC3629-05F6-D6CB-A745-03832936FC61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07310000 +// Image base: 0x05360000 // =============== CLASS MEMBERS DECLARATION =================== @@ -323,6 +323,7 @@ { // Code size 24 (0x18) .maxstack 8 + .line 6,6 : 12,30 '' IL_0000: ldstr "1" IL_0005: callvirt instance int32 [mscorlib]System.String::get_Length() IL_000a: stsfld int32 StaticInit_Struct01/C::x diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction23.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction23.il.bsl index 7a18665fe81..30075ba25bc 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction23.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction23.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000340 Length: 0x000000E3 } .module TestFunction23.exe -// MVID: {61F2D6A5-A643-451C-A745-0383A5D6F261} +// MVID: {61FC3629-A643-451C-A745-03832936FC61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x073A0000 +// Image base: 0x07640000 // =============== CLASS MEMBERS DECLARATION =================== @@ -68,9 +68,11 @@ IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 IL_0007: pop + .line 6,6 : 5,38 '' IL_0008: ldarg.0 IL_0009: call string [mscorlib]System.Console::ReadLine() IL_000e: stfld string TestFunction23/C::x + .line 8,8 : 5,38 '' IL_0013: ldarg.0 IL_0014: call string [mscorlib]System.Console::ReadLine() IL_0019: stfld string TestFunction23/C::x@8 From 4ab2e76b5f66dee876b97f51a55cfa751062e69e Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 Feb 2022 11:32:29 +0000 Subject: [PATCH 16/35] fix surface area --- src/fsharp/TcGlobals.fs | 2 -- src/fsharp/TypedTreeOps.fs | 5 ----- src/fsharp/TypedTreeOps.fsi | 3 --- tests/FSharp.Core.UnitTests/SurfaceArea.fs | 1 - 4 files changed, 11 deletions(-) diff --git a/src/fsharp/TcGlobals.fs b/src/fsharp/TcGlobals.fs index 4cdaf2cc326..96c64326f15 100755 --- a/src/fsharp/TcGlobals.fs +++ b/src/fsharp/TcGlobals.fs @@ -732,7 +732,6 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let v_seq_of_functions_info = makeIntrinsicValRef(fslib_MFRuntimeHelpers_nleref, "EnumerateFromFunctions" , None , None , [vara;varb], ([[v_unit_ty --> varaTy]; [varaTy --> v_bool_ty]; [varaTy --> varbTy]], mkSeqTy varbTy)) let v_create_event_info = makeIntrinsicValRef(fslib_MFRuntimeHelpers_nleref, "CreateEvent" , None , None , [vara;varb], ([[varaTy --> v_unit_ty]; [varaTy --> v_unit_ty]; [(v_obj_ty --> (varbTy --> v_unit_ty)) --> varaTy]], TType_app (v_fslib_IEvent2_tcr, [varaTy;varbTy]))) let v_cgh__useResumableCode_info = makeIntrinsicValRef(fslib_MFStateMachineHelpers_nleref, "__useResumableCode" , None , None , [vara], ([[]], v_bool_ty)) - let v_cgh__debugPoint_info = makeIntrinsicValRef(fslib_MFStateMachineHelpers_nleref, "__debugPoint" , None , None , [vara], ([[v_int_ty]; [varaTy]], varaTy)) let v_cgh__resumeAt_info = makeIntrinsicValRef(fslib_MFStateMachineHelpers_nleref, "__resumeAt" , None , None , [vara], ([[v_int_ty]; [varaTy]], varaTy)) let v_cgh__stateMachine_info = makeIntrinsicValRef(fslib_MFStateMachineHelpers_nleref, "__stateMachine" , None , None , [vara; varb], ([[varaTy]], varbTy)) // inaccurate type but it doesn't matter for linking let v_cgh__resumableEntry_info = makeIntrinsicValRef(fslib_MFStateMachineHelpers_nleref, "__resumableEntry" , None , None , [vara], ([[v_int_ty --> varaTy]; [v_unit_ty --> varaTy]], varaTy)) @@ -1544,7 +1543,6 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member val cgh__stateMachine_vref = ValRefForIntrinsic v_cgh__stateMachine_info member val cgh__useResumableCode_vref = ValRefForIntrinsic v_cgh__useResumableCode_info - member val cgh__debugPoint_vref = ValRefForIntrinsic v_cgh__debugPoint_info member val cgh__resumeAt_vref = ValRefForIntrinsic v_cgh__resumeAt_info member val cgh__resumableEntry_vref = ValRefForIntrinsic v_cgh__resumableEntry_info diff --git a/src/fsharp/TypedTreeOps.fs b/src/fsharp/TypedTreeOps.fs index bddf72fe432..39b6dbb0fc0 100644 --- a/src/fsharp/TypedTreeOps.fs +++ b/src/fsharp/TypedTreeOps.fs @@ -9783,11 +9783,6 @@ let (|ResumeAtExpr|_|) g expr = | ValApp g g.cgh__resumeAt_vref (_, [pcExpr], _m) -> Some pcExpr | _ -> None -let (|DebugPointExpr|_|) g expr = - match expr with - | ValApp g g.cgh__debugPoint_vref (_, [StringExpr debugPointName], _m) -> Some debugPointName - | _ -> None - // Detect sequencing constructs in state machine code let (|SequentialResumableCode|_|) (g: TcGlobals) expr = match expr with diff --git a/src/fsharp/TypedTreeOps.fsi b/src/fsharp/TypedTreeOps.fsi index 0c7e432a964..9c8373422a0 100755 --- a/src/fsharp/TypedTreeOps.fsi +++ b/src/fsharp/TypedTreeOps.fsi @@ -2483,9 +2483,6 @@ val (|StructStateMachineExpr|_|): /// Recognise a sequential or binding construct in a resumable code val (|SequentialResumableCode|_|): g: TcGlobals -> Expr -> (Expr * Expr * range * (Expr -> Expr -> Expr)) option -/// Recognise a '__debugPoint' expression -val (|DebugPointExpr|_|): g: TcGlobals -> Expr -> string option - /// Recognise a '__resumeAt' expression val (|ResumeAtExpr|_|): g: TcGlobals -> Expr -> Expr option diff --git a/tests/FSharp.Core.UnitTests/SurfaceArea.fs b/tests/FSharp.Core.UnitTests/SurfaceArea.fs index 2db79e90d6f..eaef9f3c04c 100644 --- a/tests/FSharp.Core.UnitTests/SurfaceArea.fs +++ b/tests/FSharp.Core.UnitTests/SurfaceArea.fs @@ -2493,7 +2493,6 @@ Microsoft.FSharp.Reflection.UnionCaseInfo: System.String ToString() Microsoft.FSharp.Reflection.UnionCaseInfo: System.String get_Name() Microsoft.FSharp.Reflection.UnionCaseInfo: System.Type DeclaringType Microsoft.FSharp.Reflection.UnionCaseInfo: System.Type get_DeclaringType() -Microsoft.FSharp.Core.CompilerServices.StateMachineHelpers: Void __debugPoint(System.String) " #if NETCOREAPP // This is in netstandard 2.1 From 081213952fb3879396be00272a0939cf2d1bd162 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 Feb 2022 12:59:11 +0000 Subject: [PATCH 17/35] add back __debugPoint for 'in' for for loops in tasks and CEs --- src/fsharp/CheckComputationExpressions.fs | 9 ++++- src/fsharp/CheckDeclarations.fs | 8 ++++- src/fsharp/CheckExpressions.fs | 4 +++ src/fsharp/CheckExpressions.fsi | 3 ++ src/fsharp/FSharp.Core/resumable.fs | 9 +++-- src/fsharp/FSharp.Core/resumable.fsi | 13 ++++++++ src/fsharp/IlxGen.fs | 38 ++++++++++++++++++++-- src/fsharp/InnerLambdasToTopLevelFuncs.fs | 4 +-- src/fsharp/Optimizer.fs | 4 +-- src/fsharp/ParseAndCheckInputs.fs | 2 +- src/fsharp/TcGlobals.fs | 2 ++ src/fsharp/TypedTree.fs | 3 +- src/fsharp/TypedTreeBasics.fs | 8 ++--- src/fsharp/TypedTreeOps.fs | 6 ++++ src/fsharp/TypedTreeOps.fsi | 3 ++ src/fsharp/fsi/fsi.fs | 2 +- src/fsharp/symbols/Exprs.fs | 2 +- tests/FSharp.Core.UnitTests/SurfaceArea.fs | 1 + 18 files changed, 103 insertions(+), 18 deletions(-) diff --git a/src/fsharp/CheckComputationExpressions.fs b/src/fsharp/CheckComputationExpressions.fs index d0097a216b1..ef79b8a9af5 100644 --- a/src/fsharp/CheckComputationExpressions.fs +++ b/src/fsharp/CheckComputationExpressions.fs @@ -942,7 +942,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter Some (trans CompExprTranslationPass.Initial q varSpaceInner consumingExpr translatedCtxt) - | SynExpr.ForEach (spFor, _spIn, SeqExprOnly _seqExprOnly, isFromSource, pat, sourceExpr, innerComp, _mEntireForEach) -> + | SynExpr.ForEach (spFor, spIn, SeqExprOnly _seqExprOnly, isFromSource, pat, sourceExpr, innerComp, _mEntireForEach) -> let sourceExpr = match RewriteRangeExpr sourceExpr with | Some e -> e @@ -954,6 +954,13 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter | DebugPointAtFor.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.For) | DebugPointAtFor.No -> pat.Range + // For computation expressions, 'in' or 'to' is hit on each MoveNext. + // To support this a named debug point for the "in" keyword is available to inlined code. + match spIn with + | DebugPointAtInOrTo.Yes mIn -> + cenv.namedDebugPointsForInlinedCode[{Range=mFor; Name="ForLoop.InOrToKeyword"}] <- mIn + | _ -> () + let mPat = pat.Range if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env mFor ad "For" builderTy) then diff --git a/src/fsharp/CheckDeclarations.fs b/src/fsharp/CheckDeclarations.fs index 32b5346605c..7adeb395d24 100644 --- a/src/fsharp/CheckDeclarations.fs +++ b/src/fsharp/CheckDeclarations.fs @@ -5985,7 +5985,13 @@ let TypeCheckOneImplFile | _ -> () | _ -> ()) - let implFile = TImplFile (qualNameOfFile, scopedPragmas, implFileExprAfterSig, hasExplicitEntryPoint, isScript, anonRecdTypes) + let namedDebugPointsForInlinedCode = + cenv.namedDebugPointsForInlinedCode + |> Seq.toArray + |> Array.map (fun (KeyValue(k,v)) -> (k,v)) + |> Map + + let implFile = TImplFile (qualNameOfFile, scopedPragmas, implFileExprAfterSig, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode) return (topAttrs, implFile, implFileTypePriorToSig, envAtEnd, cenv.createsGeneratedProvidedTypes) } diff --git a/src/fsharp/CheckExpressions.fs b/src/fsharp/CheckExpressions.fs index bd1a16cd955..1757cf89912 100644 --- a/src/fsharp/CheckExpressions.fs +++ b/src/fsharp/CheckExpressions.fs @@ -412,7 +412,10 @@ type TcFileState = /// The set of active conditional defines. The value is None when conditional erasure is disabled in tooling. conditionalDefines: string list option + namedDebugPointsForInlinedCode: Dictionary + isInternalTestSpanStackReferring: bool + // forward call TcSequenceExpressionEntry: TcFileState -> TcEnv -> OverallTy -> UnscopedTyparEnv -> bool * SynExpr -> range -> Expr * UnscopedTyparEnv @@ -445,6 +448,7 @@ type TcFileState = synArgNameGenerator = SynArgNameGenerator() isSig = isSig haveSig = haveSig + namedDebugPointsForInlinedCode = Dictionary() compilingCanonicalFslibModuleType = (isSig || not haveSig) && g.compilingFslib conditionalDefines = conditionalDefines isInternalTestSpanStackReferring = isInternalTestSpanStackReferring diff --git a/src/fsharp/CheckExpressions.fsi b/src/fsharp/CheckExpressions.fsi index 2455f11819f..0b7cdac4244 100644 --- a/src/fsharp/CheckExpressions.fsi +++ b/src/fsharp/CheckExpressions.fsi @@ -229,7 +229,10 @@ type TcFileState = /// The set of active conditional defines. The value is None when conditional erasure is disabled in tooling. conditionalDefines: string list option + namedDebugPointsForInlinedCode: Dictionary + isInternalTestSpanStackReferring: bool + // forward call TcSequenceExpressionEntry: TcFileState -> TcEnv -> OverallTy -> UnscopedTyparEnv -> bool * SynExpr -> range -> Expr * UnscopedTyparEnv diff --git a/src/fsharp/FSharp.Core/resumable.fs b/src/fsharp/FSharp.Core/resumable.fs index 6a233dd869c..02b896f62fa 100644 --- a/src/fsharp/FSharp.Core/resumable.fs +++ b/src/fsharp/FSharp.Core/resumable.fs @@ -83,7 +83,10 @@ module StateMachineHelpers = /// Statically determines whether resumable code is being used [] let __useResumableCode<'T> : bool = false - + + [] + let __debugPoint (_name: string) : unit = () + [] let __resumableEntry () : int option = failwith "__resumableEntry should always be guarded by __useResumableCode and only used in valid state machine implementations" @@ -327,7 +330,9 @@ module ResumableCode = // ... and its body is a while loop that advances the enumerator and runs the body on each element. (fun e -> While( - (fun () -> e.MoveNext()), + (fun () -> + __debugPoint "ForLoop.InOrToKeyword" + e.MoveNext()), ResumableCode<'Data, unit>(fun sm -> (body e.Current).Invoke(&sm))))) diff --git a/src/fsharp/FSharp.Core/resumable.fsi b/src/fsharp/FSharp.Core/resumable.fsi index 303c9c67a4c..aec3fb31c44 100644 --- a/src/fsharp/FSharp.Core/resumable.fsi +++ b/src/fsharp/FSharp.Core/resumable.fsi @@ -128,6 +128,19 @@ type AfterCode<'Data, 'Result> = delegate of byref> [] module StateMachineHelpers = + /// + /// Indicates a named debug point arising from the context of inlined code to implement a computation expression. + /// + /// + /// If the code was ultimately inlined from a "for .. in .. do" or "for .. = .. to .. do" construct in a computation expression, + /// the name "ForLoop.InOrToKeyword" can be used. + /// + /// If the name doesn't correspond to a known debug point arising from the original source context, then no + /// debug point is emitted. If opt-in warning 3514 is enabled a warning is emitted. + /// + [] + val __debugPoint: string -> unit + /// /// When used in a conditional, statically determines whether the 'then' branch /// represents valid resumable code and provides an alternative implementation diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index 54481c57513..0009e957547 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -242,6 +242,9 @@ type cenv = /// The TAST for the assembly being emitted viewCcu: CcuThunk + /// Collection of all debug points available for inlined code + namedDebugPointsForInlinedCode: Map + /// The options for ILX code generation opts: IlxGenOptions @@ -2314,6 +2317,30 @@ let rec GenExpr cenv cgbuf eenv (expr: Expr) sequel = and GenExprPreSteps (cenv: cenv) (cgbuf: CodeGenBuffer) eenv expr sequel = let g = cenv.g + // Check for the '__debugPoint" construct for inlined code + match expr with + | Expr.Sequential((DebugPointExpr g debugPointName) as dpExpr, codeExpr, NormalSeq, m) -> + match cenv.namedDebugPointsForInlinedCode.TryGetValue({Range=m; Name=debugPointName}) with + | false, _ -> + // printfn $"---- Unfound debug point {debugPointName} at {m}" + // for KeyValue(k,v) in cenv.namedDebugPointsForInlinedCode do + // printfn $"{k.Range} , {k.Name} -> {v}" + let others = + [ for k in cenv.namedDebugPointsForInlinedCode.Keys do + if Range.equals m k.Range then + yield k.Name ] + |> String.concat "," + informationalWarning(Error(FSComp.SR.ilxGenUnknownDebugPoint(debugPointName, others), dpExpr.Range)) + | true, dp -> + // printfn $"---- Found debug point {debugPointName} at {m} --> {dp}" + CG.EmitDebugPoint cgbuf dp + GenExpr cenv cgbuf eenv codeExpr sequel + true + + | _ -> + + //ProcessDebugPointForExpr cenv cgbuf expr + match (if compileSequenceExpressions then LowerComputedListOrArrayExpr cenv.tcVal g cenv.amap expr else None) with | Some altExpr -> GenExpr cenv cgbuf eenv altExpr sequel @@ -7405,7 +7432,7 @@ and GenModuleBinding cenv (cgbuf: CodeGenBuffer) (qname: QualifiedNameOfFile) la /// Generate the namespace fragments in a single file and GenImplFile cenv (mgbuf: AssemblyBuilder) mainInfoOpt eenv (implFile: TypedImplFileAfterOptimization) = - let (TImplFile (qname, _, mexpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = implFile.ImplFile + let (TImplFile (qname, _, mexpr, hasExplicitEntryPoint, isScript, anonRecdTypes, _)) = implFile.ImplFile let optimizeDuringCodeGen = implFile.OptimizeDuringCodeGen let g = cenv.g let m = qname.Range @@ -8677,12 +8704,19 @@ type IlxAssemblyGenerator(amap: ImportMap, tcGlobals: TcGlobals, tcVal: Constrai /// Generate ILX code for an assembly fragment member _.GenerateCode (codeGenOpts, typedAssembly: TypedAssemblyAfterOptimization, assemAttribs, moduleAttribs) = + let namedDebugPointsForInlinedCode = + let (TypedAssemblyAfterOptimization impls) = typedAssembly + [| for impl in impls do + let (TImplFile(namedDebugPointsForInlinedCode=dps)) = impl.ImplFile + for KeyValue(k,v) in dps do + yield (k,v) |] + |> Map let cenv: cenv = { g=tcGlobals tcVal = tcVal viewCcu = ccu ilUnitTy = None - //emittedPriorDebugPoints = HashSet() + namedDebugPointsForInlinedCode = namedDebugPointsForInlinedCode amap = amap casApplied = casApplied intraAssemblyInfo = intraAssemblyInfo diff --git a/src/fsharp/InnerLambdasToTopLevelFuncs.fs b/src/fsharp/InnerLambdasToTopLevelFuncs.fs index ca291f2e816..f5788c9c810 100644 --- a/src/fsharp/InnerLambdasToTopLevelFuncs.fs +++ b/src/fsharp/InnerLambdasToTopLevelFuncs.fs @@ -1354,9 +1354,9 @@ module Pass4_RewriteAssembly = let rhs, z = TransModuleDef penv z rhs ModuleOrNamespaceBinding.Module(nm, rhs), z - let TransImplFile penv z (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = + let TransImplFile penv z (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = let moduleExpr, z = TransModuleExpr penv z moduleExpr - (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)), z + (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)), z //------------------------------------------------------------------------- // pass5: copyExpr diff --git a/src/fsharp/Optimizer.fs b/src/fsharp/Optimizer.fs index 2cab5c0b5b4..6ce3dd5fdd5 100644 --- a/src/fsharp/Optimizer.fs +++ b/src/fsharp/Optimizer.fs @@ -3973,7 +3973,7 @@ and OptimizeModuleDefs cenv (env, bindInfosColl) defs = (defs, UnionOptimizationInfos minfos), (env, bindInfosColl) and OptimizeImplFileInternal cenv env isIncrementalFragment hidden implFile = - let (TImplFile (qname, pragmas, mexpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = implFile + let (TImplFile (qname, pragmas, mexpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = implFile let env, mexprR, minfo = match mexpr with // FSI: FSI compiles everything as if you're typing incrementally into one module @@ -3992,7 +3992,7 @@ and OptimizeImplFileInternal cenv env isIncrementalFragment hidden implFile = let hidden = ComputeHidingInfoAtAssemblyBoundary mexpr.Type hidden let minfo = AbstractLazyModulInfoByHiding true hidden minfo - env, TImplFile (qname, pragmas, mexprR, hasExplicitEntryPoint, isScript, anonRecdTypes), minfo, hidden + env, TImplFile (qname, pragmas, mexprR, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode), minfo, hidden /// Entry point let OptimizeImplFile (settings, ccu, tcGlobals, tcVal, importMap, optEnv, isIncrementalFragment, emitTailcalls, hidden, mimpls) = diff --git a/src/fsharp/ParseAndCheckInputs.fs b/src/fsharp/ParseAndCheckInputs.fs index 345a2113749..b65bb99d614 100644 --- a/src/fsharp/ParseAndCheckInputs.fs +++ b/src/fsharp/ParseAndCheckInputs.fs @@ -891,7 +891,7 @@ let TypeCheckOneInput(checkForErrors, let typeCheckOne = if skipImplIfSigExists && hadSig then let dummyExpr = ModuleOrNamespaceExprWithSig.ModuleOrNamespaceExprWithSig(rootSigOpt.Value, ModuleOrNamespaceExpr.TMDefs [], range.Zero) - let dummyImplFile = TypedImplFile.TImplFile(qualNameOfFile, [], dummyExpr, false, false, StampMap []) + let dummyImplFile = TypedImplFile.TImplFile(qualNameOfFile, [], dummyExpr, false, false, StampMap [], Map.empty) (EmptyTopAttrs, dummyImplFile, Unchecked.defaultof<_>, tcImplEnv, false) |> Cancellable.ret diff --git a/src/fsharp/TcGlobals.fs b/src/fsharp/TcGlobals.fs index 96c64326f15..4cdaf2cc326 100755 --- a/src/fsharp/TcGlobals.fs +++ b/src/fsharp/TcGlobals.fs @@ -732,6 +732,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let v_seq_of_functions_info = makeIntrinsicValRef(fslib_MFRuntimeHelpers_nleref, "EnumerateFromFunctions" , None , None , [vara;varb], ([[v_unit_ty --> varaTy]; [varaTy --> v_bool_ty]; [varaTy --> varbTy]], mkSeqTy varbTy)) let v_create_event_info = makeIntrinsicValRef(fslib_MFRuntimeHelpers_nleref, "CreateEvent" , None , None , [vara;varb], ([[varaTy --> v_unit_ty]; [varaTy --> v_unit_ty]; [(v_obj_ty --> (varbTy --> v_unit_ty)) --> varaTy]], TType_app (v_fslib_IEvent2_tcr, [varaTy;varbTy]))) let v_cgh__useResumableCode_info = makeIntrinsicValRef(fslib_MFStateMachineHelpers_nleref, "__useResumableCode" , None , None , [vara], ([[]], v_bool_ty)) + let v_cgh__debugPoint_info = makeIntrinsicValRef(fslib_MFStateMachineHelpers_nleref, "__debugPoint" , None , None , [vara], ([[v_int_ty]; [varaTy]], varaTy)) let v_cgh__resumeAt_info = makeIntrinsicValRef(fslib_MFStateMachineHelpers_nleref, "__resumeAt" , None , None , [vara], ([[v_int_ty]; [varaTy]], varaTy)) let v_cgh__stateMachine_info = makeIntrinsicValRef(fslib_MFStateMachineHelpers_nleref, "__stateMachine" , None , None , [vara; varb], ([[varaTy]], varbTy)) // inaccurate type but it doesn't matter for linking let v_cgh__resumableEntry_info = makeIntrinsicValRef(fslib_MFStateMachineHelpers_nleref, "__resumableEntry" , None , None , [vara], ([[v_int_ty --> varaTy]; [v_unit_ty --> varaTy]], varaTy)) @@ -1543,6 +1544,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member val cgh__stateMachine_vref = ValRefForIntrinsic v_cgh__stateMachine_info member val cgh__useResumableCode_vref = ValRefForIntrinsic v_cgh__useResumableCode_info + member val cgh__debugPoint_vref = ValRefForIntrinsic v_cgh__debugPoint_info member val cgh__resumeAt_vref = ValRefForIntrinsic v_cgh__resumeAt_info member val cgh__resumableEntry_vref = ValRefForIntrinsic v_cgh__resumableEntry_info diff --git a/src/fsharp/TypedTree.fs b/src/fsharp/TypedTree.fs index 7b5d8890918..4482b1af6f9 100644 --- a/src/fsharp/TypedTree.fs +++ b/src/fsharp/TypedTree.fs @@ -5197,7 +5197,8 @@ type TypedImplFile = implExprWithSig: ModuleOrNamespaceExprWithSig * hasExplicitEntryPoint: bool * isScript: bool * - anonRecdTypeInfo: StampMap + anonRecdTypeInfo: StampMap * + namedDebugPointsForInlinedCode: Map [] member x.DebugText = x.ToString() diff --git a/src/fsharp/TypedTreeBasics.fs b/src/fsharp/TypedTreeBasics.fs index 673bc8a76ed..b92bd6ff7bb 100644 --- a/src/fsharp/TypedTreeBasics.fs +++ b/src/fsharp/TypedTreeBasics.fs @@ -78,12 +78,12 @@ let mkRawStructTupleTy tys = TType_tuple (tupInfoStruct, tys) // make up the entire compilation unit //--------------------------------------------------------------------------- -let mapTImplFile f (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = - TImplFile (fragName, pragmas, f moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes) +let mapTImplFile f (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = + TImplFile (fragName, pragmas, f moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode) -let mapAccImplFile f z (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes)) = +let mapAccImplFile f z (TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode)) = let moduleExpr, z = f z moduleExpr - TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes), z + TImplFile (fragName, pragmas, moduleExpr, hasExplicitEntryPoint, isScript, anonRecdTypes, namedDebugPointsForInlinedCode), z let foldTImplFile f z (TImplFile (implExprWithSig= moduleExpr)) = f z moduleExpr diff --git a/src/fsharp/TypedTreeOps.fs b/src/fsharp/TypedTreeOps.fs index 39b6dbb0fc0..e90d97f91be 100644 --- a/src/fsharp/TypedTreeOps.fs +++ b/src/fsharp/TypedTreeOps.fs @@ -9783,6 +9783,12 @@ let (|ResumeAtExpr|_|) g expr = | ValApp g g.cgh__resumeAt_vref (_, [pcExpr], _m) -> Some pcExpr | _ -> None +// Detect __debugPoint calls +let (|DebugPointExpr|_|) g expr = + match expr with + | ValApp g g.cgh__debugPoint_vref (_, [StringExpr debugPointName], _m) -> Some debugPointName + | _ -> None + // Detect sequencing constructs in state machine code let (|SequentialResumableCode|_|) (g: TcGlobals) expr = match expr with diff --git a/src/fsharp/TypedTreeOps.fsi b/src/fsharp/TypedTreeOps.fsi index 9c8373422a0..0c7e432a964 100755 --- a/src/fsharp/TypedTreeOps.fsi +++ b/src/fsharp/TypedTreeOps.fsi @@ -2483,6 +2483,9 @@ val (|StructStateMachineExpr|_|): /// Recognise a sequential or binding construct in a resumable code val (|SequentialResumableCode|_|): g: TcGlobals -> Expr -> (Expr * Expr * range * (Expr -> Expr -> Expr)) option +/// Recognise a '__debugPoint' expression +val (|DebugPointExpr|_|): g: TcGlobals -> Expr -> string option + /// Recognise a '__resumeAt' expression val (|ResumeAtExpr|_|): g: TcGlobals -> Expr -> Expr option diff --git a/src/fsharp/fsi/fsi.fs b/src/fsharp/fsi/fsi.fs index 02871c7d01c..c8535fa96c0 100644 --- a/src/fsharp/fsi/fsi.fs +++ b/src/fsharp/fsi/fsi.fs @@ -1089,7 +1089,7 @@ let internal mkBoundValueTypedImpl tcGlobals m moduleName name ty = let binding = Binding.TBind(v, bindExpr, DebugPointAtBinding.NoneAtLet) let mbinding = ModuleOrNamespaceBinding.Module(moduleOrNamespace, TMDefs([TMDefLet(binding, m)])) let expr = ModuleOrNamespaceExprWithSig(mty, TMDefs([TMDefs[TMDefRec(false, [], [], [mbinding], m)]]), range0) - moduleOrNamespace, v, TypedImplFile.TImplFile(QualifiedNameOfFile.QualifiedNameOfFile(Ident(moduleName, m)), [], expr, false, false, StampMap.Empty) + moduleOrNamespace, v, TypedImplFile.TImplFile(QualifiedNameOfFile.QualifiedNameOfFile(Ident(moduleName, m)), [], expr, false, false, StampMap.Empty, Map.empty) /// Encapsulates the coordination of the typechecking, optimization and code generation /// components of the F# compiler for interactively executed fragments of code. diff --git a/src/fsharp/symbols/Exprs.fs b/src/fsharp/symbols/Exprs.fs index 44ab7f15895..97af23bf405 100644 --- a/src/fsharp/symbols/Exprs.fs +++ b/src/fsharp/symbols/Exprs.fs @@ -1333,7 +1333,7 @@ and FSharpImplementationFileDeclaration = | InitAction of action: FSharpExpr and FSharpImplementationFileContents(cenv, mimpl) = - let (TImplFile (qname, _pragmas, ModuleOrNamespaceExprWithSig(_, mdef, _), hasExplicitEntryPoint, isScript, _anonRecdTypes)) = mimpl + let (TImplFile (qname, _pragmas, ModuleOrNamespaceExprWithSig(_, mdef, _), hasExplicitEntryPoint, isScript, _anonRecdTypes, _)) = mimpl let rec getDecls2 (ModuleOrNamespaceExprWithSig(_mty, def, _m)) = getDecls def and getBind (bind: Binding) = let v = bind.Var diff --git a/tests/FSharp.Core.UnitTests/SurfaceArea.fs b/tests/FSharp.Core.UnitTests/SurfaceArea.fs index eaef9f3c04c..2db79e90d6f 100644 --- a/tests/FSharp.Core.UnitTests/SurfaceArea.fs +++ b/tests/FSharp.Core.UnitTests/SurfaceArea.fs @@ -2493,6 +2493,7 @@ Microsoft.FSharp.Reflection.UnionCaseInfo: System.String ToString() Microsoft.FSharp.Reflection.UnionCaseInfo: System.String get_Name() Microsoft.FSharp.Reflection.UnionCaseInfo: System.Type DeclaringType Microsoft.FSharp.Reflection.UnionCaseInfo: System.Type get_DeclaringType() +Microsoft.FSharp.Core.CompilerServices.StateMachineHelpers: Void __debugPoint(System.String) " #if NETCOREAPP // This is in netstandard 2.1 From 43099da920aec400a0c23828dd041d1d25aea810 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 Feb 2022 13:29:45 +0000 Subject: [PATCH 18/35] fix ValidateBreakpointLocation for pipe and boolean logic --- src/fsharp/SyntaxTreeOps.fs | 84 +++-- src/fsharp/service/FSharpParseFileResults.fs | 1 + tests/service/EditorTests.fs | 327 ++++++------------- 3 files changed, 148 insertions(+), 264 deletions(-) diff --git a/src/fsharp/SyntaxTreeOps.fs b/src/fsharp/SyntaxTreeOps.fs index e2ba2a3b3b6..cba6688072b 100644 --- a/src/fsharp/SyntaxTreeOps.fs +++ b/src/fsharp/SyntaxTreeOps.fs @@ -70,17 +70,51 @@ let (|SingleIdent|_|) inp = | SynExpr.Ident id -> Some id | _ -> None -/// This affects placement of sequence points +let (|SynBinOp|_|) input = + match input with + | SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, true, SynExpr.Ident synId, x1, _m1), x2, _m2) -> + Some (synId, x1, x2) + | _ -> None + +let (|SynPipeRight|_|) input = + match input with + | SynBinOp (synId, x1, x2) when synId.idText = "op_PipeRight" -> Some (x1, x2) + | _ -> None + +let (|SynPipeRight2|_|) input = + match input with + | SynBinOp (synId, SynExpr.Paren(SynExpr.Tuple(false, [x1a; x1b], _, _), _, _, _), x2) + when synId.idText = "op_PipeRight2" -> + Some (x1a, x1b, x2) + | _ -> None + +let (|SynPipeRight3|_|) input = + match input with + | SynBinOp (synId, SynExpr.Paren(SynExpr.Tuple(false, [x1a; x1b; x1c], _, _), _, _, _), x2) + when synId.idText = "op_PipeRight3" -> + Some (x1a, x1b, x1c, x2) + | _ -> None + +let (|SynAndAlso|_|) input = + match input with + | SynBinOp (synId, x1, x2) when synId.idText = "op_BooleanAnd" -> Some (x1, x2) + | _ -> None + +let (|SynOrElse|_|) input = + match input with + | SynBinOp (synId, x1, x2) when synId.idText = "op_BooleanOr" -> Some (x1, x2) + | _ -> None + +/// This affects placement of debug points let rec IsControlFlowExpression e = match e with - // We do allow breakpoints on the creation of a delegate or object using an object expression - //| SynExpr.ObjExpr _ - - // These expressions create an object, but we do not allow breakpoints on the creation of the lambda, only on the execution - // of its body. + | SynOrElse _ + | SynAndAlso _ + | SynPipeRight _ + | SynPipeRight2 _ + | SynPipeRight3 _ | SynExpr.MatchLambda _ | SynExpr.Lambda _ - | SynExpr.LetOrUse _ | SynExpr.Sequential _ // Treat "ident { ... }" as a control flow expression @@ -787,39 +821,3 @@ let (|ParsedHashDirectiveArguments|) (input: ParsedHashDirectiveArgument list) = | ParsedHashDirectiveArgument.String (s, _, _) -> s | ParsedHashDirectiveArgument.SourceIdentifier (_, v, _) -> v) input - -let (|SynBinOp|_|) input = - match input with - | SynExpr.App (ExprAtomicFlag.NonAtomic, false, SynExpr.App (ExprAtomicFlag.NonAtomic, true, SynExpr.Ident synId, x1, _m1), x2, _m2) -> - Some (synId, x1, x2) - | _ -> None - -let (|SynPipeRight|_|) input = - match input with - | SynBinOp (synId, x1, x2) when synId.idText = "op_PipeRight" -> Some (x1, x2) - | _ -> None - -let (|SynPipeRight2|_|) input = - match input with - | SynBinOp (synId, SynExpr.Paren(SynExpr.Tuple(false, [x1a; x1b], _, _), _, _, _), x2) - when synId.idText = "op_PipeRight2" -> - Some (x1a, x1b, x2) - | _ -> None - -let (|SynPipeRight3|_|) input = - match input with - | SynBinOp (synId, SynExpr.Paren(SynExpr.Tuple(false, [x1a; x1b; x1c], _, _), _, _, _), x2) - when synId.idText = "op_PipeRight3" -> - Some (x1a, x1b, x1c, x2) - | _ -> None - -let (|SynAndAlso|_|) input = - match input with - | SynBinOp (synId, x1, x2) when synId.idText = "op_BooleanAnd" -> Some (x1, x2) - | _ -> None - -let (|SynOrElse|_|) input = - match input with - | SynBinOp (synId, x1, x2) when synId.idText = "op_BooleanOr" -> Some (x1, x2) - | _ -> None - diff --git a/src/fsharp/service/FSharpParseFileResults.fs b/src/fsharp/service/FSharpParseFileResults.fs index f1407035938..e58e2e5e6cb 100644 --- a/src/fsharp/service/FSharpParseFileResults.fs +++ b/src/fsharp/service/FSharpParseFileResults.fs @@ -527,6 +527,7 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, yield! checkRange e.Range yield! walkExpr false e + | SynOrElse (e1, e2) | SynAndAlso (e1, e2) -> yield! walkExpr true e1 yield! walkExpr true e2 diff --git a/tests/service/EditorTests.fs b/tests/service/EditorTests.fs index 124383a90c1..7b63749bda8 100644 --- a/tests/service/EditorTests.fs +++ b/tests/service/EditorTests.fs @@ -1128,37 +1128,17 @@ let f () = let results = getBreakpointLocations input parseResult printfn "%A" results results |> shouldEqual - [((3, 0), (3, 4, 3, 7, "[2]")); - ((3, 1), - (3, 4, 5, 30, - "[2]$ |> List.map (fun b -> b+1)$ |> List.map (fun b -> b+1)")); - ((3, 2), - (3, 4, 5, 30, - "[2]$ |> List.map (fun b -> b+1)$ |> List.map (fun b -> b+1)")); - ((3, 3), - (3, 4, 5, 30, - "[2]$ |> List.map (fun b -> b+1)$ |> List.map (fun b -> b+1)")); + [((3, 0), (3, 4, 3, 7, "[2]")); ((3, 1), (3, 4, 3, 7, "[2]")); + ((3, 2), (3, 4, 3, 7, "[2]")); ((3, 3), (3, 4, 3, 7, "[2]")); ((3, 4), (3, 4, 3, 7, "[2]")); ((3, 5), (3, 4, 3, 7, "[2]")); ((3, 6), (3, 4, 3, 7, "[2]")); ((4, 0), (4, 7, 4, 30, "List.map (fun b -> b+1)")); - ((4, 1), - (3, 4, 5, 30, - "[2]$ |> List.map (fun b -> b+1)$ |> List.map (fun b -> b+1)")); - ((4, 2), - (3, 4, 5, 30, - "[2]$ |> List.map (fun b -> b+1)$ |> List.map (fun b -> b+1)")); - ((4, 3), - (3, 4, 5, 30, - "[2]$ |> List.map (fun b -> b+1)$ |> List.map (fun b -> b+1)")); - ((4, 4), - (3, 4, 5, 30, - "[2]$ |> List.map (fun b -> b+1)$ |> List.map (fun b -> b+1)")); - ((4, 5), - (3, 4, 5, 30, - "[2]$ |> List.map (fun b -> b+1)$ |> List.map (fun b -> b+1)")); - ((4, 6), - (3, 4, 5, 30, - "[2]$ |> List.map (fun b -> b+1)$ |> List.map (fun b -> b+1)")); + ((4, 1), (4, 7, 4, 30, "List.map (fun b -> b+1)")); + ((4, 2), (4, 7, 4, 30, "List.map (fun b -> b+1)")); + ((4, 3), (4, 7, 4, 30, "List.map (fun b -> b+1)")); + ((4, 4), (4, 7, 4, 30, "List.map (fun b -> b+1)")); + ((4, 5), (4, 7, 4, 30, "List.map (fun b -> b+1)")); + ((4, 6), (4, 7, 4, 30, "List.map (fun b -> b+1)")); ((4, 7), (4, 7, 4, 30, "List.map (fun b -> b+1)")); ((4, 8), (4, 7, 4, 30, "List.map (fun b -> b+1)")); ((4, 9), (4, 7, 4, 30, "List.map (fun b -> b+1)")); @@ -1181,24 +1161,12 @@ let f () = ((4, 26), (4, 26, 4, 29, "b+1")); ((4, 27), (4, 26, 4, 29, "b+1")); ((4, 28), (4, 26, 4, 29, "b+1")); ((4, 29), (4, 26, 4, 29, "b+1")); ((5, 0), (5, 7, 5, 30, "List.map (fun b -> b+1)")); - ((5, 1), - (3, 4, 5, 30, - "[2]$ |> List.map (fun b -> b+1)$ |> List.map (fun b -> b+1)")); - ((5, 2), - (3, 4, 5, 30, - "[2]$ |> List.map (fun b -> b+1)$ |> List.map (fun b -> b+1)")); - ((5, 3), - (3, 4, 5, 30, - "[2]$ |> List.map (fun b -> b+1)$ |> List.map (fun b -> b+1)")); - ((5, 4), - (3, 4, 5, 30, - "[2]$ |> List.map (fun b -> b+1)$ |> List.map (fun b -> b+1)")); - ((5, 5), - (3, 4, 5, 30, - "[2]$ |> List.map (fun b -> b+1)$ |> List.map (fun b -> b+1)")); - ((5, 6), - (3, 4, 5, 30, - "[2]$ |> List.map (fun b -> b+1)$ |> List.map (fun b -> b+1)")); + ((5, 1), (5, 7, 5, 30, "List.map (fun b -> b+1)")); + ((5, 2), (5, 7, 5, 30, "List.map (fun b -> b+1)")); + ((5, 3), (5, 7, 5, 30, "List.map (fun b -> b+1)")); + ((5, 4), (5, 7, 5, 30, "List.map (fun b -> b+1)")); + ((5, 5), (5, 7, 5, 30, "List.map (fun b -> b+1)")); + ((5, 6), (5, 7, 5, 30, "List.map (fun b -> b+1)")); ((5, 7), (5, 7, 5, 30, "List.map (fun b -> b+1)")); ((5, 8), (5, 7, 5, 30, "List.map (fun b -> b+1)")); ((5, 9), (5, 7, 5, 30, "List.map (fun b -> b+1)")); @@ -1235,71 +1203,28 @@ let f () = let results = getBreakpointLocations input parseResult printfn "%A" results results |> shouldEqual - [((3, 0), (3, 5, 3, 8, "[1]")); - ((3, 1), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((3, 2), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((3, 3), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((3, 4), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((3, 5), (3, 5, 3, 8, "[1]")); ((3, 6), (3, 5, 3, 8, "[1]")); - ((3, 7), (3, 5, 3, 8, "[1]")); ((3, 8), (3, 5, 3, 8, "[1]")); - ((3, 9), (3, 9, 3, 12, "[2]")); ((3, 10), (3, 9, 3, 12, "[2]")); - ((3, 11), (3, 9, 3, 12, "[2]")); ((3, 12), (3, 9, 3, 12, "[2]")); - ((3, 13), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((4, 0), (4, 8, 4, 16, "List.zip")); - ((4, 1), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((4, 2), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((4, 3), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((4, 4), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((4, 5), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((4, 6), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((4, 7), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); + [((3, 0), (3, 5, 3, 8, "[1]")); ((3, 1), (3, 5, 3, 8, "[1]")); + ((3, 2), (3, 5, 3, 8, "[1]")); ((3, 3), (3, 5, 3, 8, "[1]")); + ((3, 4), (3, 5, 3, 8, "[1]")); ((3, 5), (3, 5, 3, 8, "[1]")); + ((3, 6), (3, 5, 3, 8, "[1]")); ((3, 7), (3, 5, 3, 8, "[1]")); + ((3, 8), (3, 5, 3, 8, "[1]")); ((3, 9), (3, 9, 3, 12, "[2]")); + ((3, 10), (3, 9, 3, 12, "[2]")); ((3, 11), (3, 9, 3, 12, "[2]")); + ((3, 12), (3, 9, 3, 12, "[2]")); ((3, 13), (3, 5, 3, 8, "[1]")); + ((4, 0), (4, 8, 4, 16, "List.zip")); ((4, 1), (4, 8, 4, 16, "List.zip")); + ((4, 2), (4, 8, 4, 16, "List.zip")); ((4, 3), (4, 8, 4, 16, "List.zip")); + ((4, 4), (4, 8, 4, 16, "List.zip")); ((4, 5), (4, 8, 4, 16, "List.zip")); + ((4, 6), (4, 8, 4, 16, "List.zip")); ((4, 7), (4, 8, 4, 16, "List.zip")); ((4, 8), (4, 8, 4, 16, "List.zip")); ((4, 9), (4, 8, 4, 16, "List.zip")); ((4, 10), (4, 8, 4, 16, "List.zip")); ((4, 11), (4, 8, 4, 16, "List.zip")); ((4, 12), (4, 8, 4, 16, "List.zip")); ((4, 13), (4, 8, 4, 16, "List.zip")); ((4, 14), (4, 8, 4, 16, "List.zip")); ((4, 15), (4, 8, 4, 16, "List.zip")); ((5, 0), (5, 7, 5, 36, "List.map (fun (b,c) -> (c,b))")); - ((5, 1), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((5, 2), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((5, 3), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((5, 4), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((5, 5), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((5, 6), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); + ((5, 1), (5, 7, 5, 36, "List.map (fun (b,c) -> (c,b))")); + ((5, 2), (5, 7, 5, 36, "List.map (fun (b,c) -> (c,b))")); + ((5, 3), (5, 7, 5, 36, "List.map (fun (b,c) -> (c,b))")); + ((5, 4), (5, 7, 5, 36, "List.map (fun (b,c) -> (c,b))")); + ((5, 5), (5, 7, 5, 36, "List.map (fun (b,c) -> (c,b))")); + ((5, 6), (5, 7, 5, 36, "List.map (fun (b,c) -> (c,b))")); ((5, 7), (5, 7, 5, 36, "List.map (fun (b,c) -> (c,b))")); ((5, 8), (5, 7, 5, 36, "List.map (fun (b,c) -> (c,b))")); ((5, 9), (5, 7, 5, 36, "List.map (fun (b,c) -> (c,b))")); @@ -1326,30 +1251,16 @@ let f () = ((5, 30), (5, 30, 5, 35, "(c,b)")); ((5, 31), (5, 30, 5, 35, "(c,b)")); ((5, 32), (5, 30, 5, 35, "(c,b)")); ((5, 33), (5, 30, 5, 35, "(c,b)")); ((5, 34), (5, 30, 5, 35, "(c,b)")); ((5, 35), (5, 30, 5, 35, "(c,b)")); - ((6, 0), (6, 7, 6, 17, "List.unzip")); - ((6, 1), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((6, 2), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((6, 3), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((6, 4), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((6, 5), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((6, 6), - (3, 4, 6, 17, - "([1],[2]) $ ||> List.zip$ |> List.map (fun (b,c) -> (c,b))$ |> List.unzip")); - ((6, 7), (6, 7, 6, 17, "List.unzip")); ((6, 8), (6, 7, 6, 17, "List.unzip")); - ((6, 9), (6, 7, 6, 17, "List.unzip")); ((6, 10), (6, 7, 6, 17, "List.unzip")); - ((6, 11), (6, 7, 6, 17, "List.unzip")); ((6, 12), (6, 7, 6, 17, "List.unzip")); - ((6, 13), (6, 7, 6, 17, "List.unzip")); ((6, 14), (6, 7, 6, 17, "List.unzip")); - ((6, 15), (6, 7, 6, 17, "List.unzip")); ((6, 16), (6, 7, 6, 17, "List.unzip"))] + ((6, 0), (6, 7, 6, 17, "List.unzip")); ((6, 1), (6, 7, 6, 17, "List.unzip")); + ((6, 2), (6, 7, 6, 17, "List.unzip")); ((6, 3), (6, 7, 6, 17, "List.unzip")); + ((6, 4), (6, 7, 6, 17, "List.unzip")); ((6, 5), (6, 7, 6, 17, "List.unzip")); + ((6, 6), (6, 7, 6, 17, "List.unzip")); ((6, 7), (6, 7, 6, 17, "List.unzip")); + ((6, 8), (6, 7, 6, 17, "List.unzip")); ((6, 9), (6, 7, 6, 17, "List.unzip")); + ((6, 10), (6, 7, 6, 17, "List.unzip")); ((6, 11), (6, 7, 6, 17, "List.unzip")); + ((6, 12), (6, 7, 6, 17, "List.unzip")); ((6, 13), (6, 7, 6, 17, "List.unzip")); + ((6, 14), (6, 7, 6, 17, "List.unzip")); ((6, 15), (6, 7, 6, 17, "List.unzip")); + ((6, 16), (6, 7, 6, 17, "List.unzip"))] + [] let ``ValidateBreakpointLocation tests for pipe3`` () = @@ -1365,77 +1276,31 @@ let f () = let results = getBreakpointLocations input parseResult printfn "%A" results results |> shouldEqual - [((3, 0), (3, 5, 3, 8, "[1]")); - ((3, 1), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((3, 2), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((3, 3), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((3, 4), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((3, 5), (3, 5, 3, 8, "[1]")); ((3, 6), (3, 5, 3, 8, "[1]")); - ((3, 7), (3, 5, 3, 8, "[1]")); ((3, 8), (3, 5, 3, 8, "[1]")); - ((3, 9), (3, 9, 3, 12, "[2]")); ((3, 10), (3, 9, 3, 12, "[2]")); - ((3, 11), (3, 9, 3, 12, "[2]")); ((3, 12), (3, 9, 3, 12, "[2]")); - ((3, 13), (3, 13, 3, 16, "[3]")); ((3, 14), (3, 13, 3, 16, "[3]")); - ((3, 15), (3, 13, 3, 16, "[3]")); ((3, 16), (3, 13, 3, 16, "[3]")); - ((3, 17), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((4, 0), (4, 9, 4, 18, "List.zip3")); - ((4, 1), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((4, 2), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((4, 3), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((4, 4), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((4, 5), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((4, 6), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((4, 7), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((4, 8), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((4, 9), (4, 9, 4, 18, "List.zip3")); ((4, 10), (4, 9, 4, 18, "List.zip3")); - ((4, 11), (4, 9, 4, 18, "List.zip3")); ((4, 12), (4, 9, 4, 18, "List.zip3")); - ((4, 13), (4, 9, 4, 18, "List.zip3")); ((4, 14), (4, 9, 4, 18, "List.zip3")); - ((4, 15), (4, 9, 4, 18, "List.zip3")); ((4, 16), (4, 9, 4, 18, "List.zip3")); - ((4, 17), (4, 9, 4, 18, "List.zip3")); + [((3, 0), (3, 5, 3, 8, "[1]")); ((3, 1), (3, 5, 3, 8, "[1]")); + ((3, 2), (3, 5, 3, 8, "[1]")); ((3, 3), (3, 5, 3, 8, "[1]")); + ((3, 4), (3, 5, 3, 8, "[1]")); ((3, 5), (3, 5, 3, 8, "[1]")); + ((3, 6), (3, 5, 3, 8, "[1]")); ((3, 7), (3, 5, 3, 8, "[1]")); + ((3, 8), (3, 5, 3, 8, "[1]")); ((3, 9), (3, 9, 3, 12, "[2]")); + ((3, 10), (3, 9, 3, 12, "[2]")); ((3, 11), (3, 9, 3, 12, "[2]")); + ((3, 12), (3, 9, 3, 12, "[2]")); ((3, 13), (3, 13, 3, 16, "[3]")); + ((3, 14), (3, 13, 3, 16, "[3]")); ((3, 15), (3, 13, 3, 16, "[3]")); + ((3, 16), (3, 13, 3, 16, "[3]")); ((3, 17), (3, 5, 3, 8, "[1]")); + ((4, 0), (4, 9, 4, 18, "List.zip3")); ((4, 1), (4, 9, 4, 18, "List.zip3")); + ((4, 2), (4, 9, 4, 18, "List.zip3")); ((4, 3), (4, 9, 4, 18, "List.zip3")); + ((4, 4), (4, 9, 4, 18, "List.zip3")); ((4, 5), (4, 9, 4, 18, "List.zip3")); + ((4, 6), (4, 9, 4, 18, "List.zip3")); ((4, 7), (4, 9, 4, 18, "List.zip3")); + ((4, 8), (4, 9, 4, 18, "List.zip3")); ((4, 9), (4, 9, 4, 18, "List.zip3")); + ((4, 10), (4, 9, 4, 18, "List.zip3")); ((4, 11), (4, 9, 4, 18, "List.zip3")); + ((4, 12), (4, 9, 4, 18, "List.zip3")); ((4, 13), (4, 9, 4, 18, "List.zip3")); + ((4, 14), (4, 9, 4, 18, "List.zip3")); ((4, 15), (4, 9, 4, 18, "List.zip3")); + ((4, 16), (4, 9, 4, 18, "List.zip3")); ((4, 17), (4, 9, 4, 18, "List.zip3")); ((5, 0), (5, 7, 5, 40, "List.map (fun (a,b,c) -> (c,b,a))")); - ((5, 1), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((5, 2), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((5, 3), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((5, 4), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((5, 5), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((5, 6), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); + ((5, 1), (5, 7, 5, 40, "List.map (fun (a,b,c) -> (c,b,a))")); + ((5, 2), (5, 7, 5, 40, "List.map (fun (a,b,c) -> (c,b,a))")); + ((5, 3), (5, 7, 5, 40, "List.map (fun (a,b,c) -> (c,b,a))")); + ((5, 4), (5, 7, 5, 40, "List.map (fun (a,b,c) -> (c,b,a))")); + ((5, 5), (5, 7, 5, 40, "List.map (fun (a,b,c) -> (c,b,a))")); + ((5, 6), (5, 7, 5, 40, "List.map (fun (a,b,c) -> (c,b,a))")); ((5, 7), (5, 7, 5, 40, "List.map (fun (a,b,c) -> (c,b,a))")); ((5, 8), (5, 7, 5, 40, "List.map (fun (a,b,c) -> (c,b,a))")); ((5, 9), (5, 7, 5, 40, "List.map (fun (a,b,c) -> (c,b,a))")); @@ -1465,27 +1330,12 @@ let f () = ((5, 34), (5, 32, 5, 39, "(c,b,a)")); ((5, 35), (5, 32, 5, 39, "(c,b,a)")); ((5, 36), (5, 32, 5, 39, "(c,b,a)")); ((5, 37), (5, 32, 5, 39, "(c,b,a)")); ((5, 38), (5, 32, 5, 39, "(c,b,a)")); ((5, 39), (5, 32, 5, 39, "(c,b,a)")); - ((6, 0), (6, 7, 6, 18, "List.unzip3")); - ((6, 1), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((6, 2), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((6, 3), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((6, 4), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((6, 5), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((6, 6), - (3, 4, 6, 18, - "([1],[2],[3]) $ |||> List.zip3$ |> List.map (fun (a,b,c) -> (c,b,a))$ |> List.unzip3")); - ((6, 7), (6, 7, 6, 18, "List.unzip3")); ((6, 8), (6, 7, 6, 18, "List.unzip3")); - ((6, 9), (6, 7, 6, 18, "List.unzip3")); ((6, 10), (6, 7, 6, 18, "List.unzip3")); + ((6, 0), (6, 7, 6, 18, "List.unzip3")); ((6, 1), (6, 7, 6, 18, "List.unzip3")); + ((6, 2), (6, 7, 6, 18, "List.unzip3")); ((6, 3), (6, 7, 6, 18, "List.unzip3")); + ((6, 4), (6, 7, 6, 18, "List.unzip3")); ((6, 5), (6, 7, 6, 18, "List.unzip3")); + ((6, 6), (6, 7, 6, 18, "List.unzip3")); ((6, 7), (6, 7, 6, 18, "List.unzip3")); + ((6, 8), (6, 7, 6, 18, "List.unzip3")); ((6, 9), (6, 7, 6, 18, "List.unzip3")); + ((6, 10), (6, 7, 6, 18, "List.unzip3")); ((6, 11), (6, 7, 6, 18, "List.unzip3")); ((6, 12), (6, 7, 6, 18, "List.unzip3")); ((6, 13), (6, 7, 6, 18, "List.unzip3")); @@ -1555,6 +1405,41 @@ let bodyWrapper () = ((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 ``ValidateBreakpointLocation tests for boolean logic`` () = + let input = + """ +let bodyWrapper (a, b, c) = a || b && c""" + 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 + [((2, 0), (2, 28, 2, 29, "a")); ((2, 1), (2, 28, 2, 29, "a")); + ((2, 2), (2, 28, 2, 29, "a")); ((2, 3), (2, 28, 2, 29, "a")); + ((2, 4), (2, 28, 2, 29, "a")); ((2, 5), (2, 28, 2, 29, "a")); + ((2, 6), (2, 28, 2, 29, "a")); ((2, 7), (2, 28, 2, 29, "a")); + ((2, 8), (2, 28, 2, 29, "a")); ((2, 9), (2, 28, 2, 29, "a")); + ((2, 10), (2, 28, 2, 29, "a")); ((2, 11), (2, 28, 2, 29, "a")); + ((2, 12), (2, 28, 2, 29, "a")); ((2, 13), (2, 28, 2, 29, "a")); + ((2, 14), (2, 28, 2, 29, "a")); ((2, 15), (2, 28, 2, 29, "a")); + ((2, 16), (2, 28, 2, 29, "a")); ((2, 17), (2, 28, 2, 29, "a")); + ((2, 18), (2, 28, 2, 29, "a")); ((2, 19), (2, 28, 2, 29, "a")); + ((2, 20), (2, 28, 2, 29, "a")); ((2, 21), (2, 28, 2, 29, "a")); + ((2, 22), (2, 28, 2, 29, "a")); ((2, 23), (2, 28, 2, 29, "a")); + ((2, 24), (2, 28, 2, 29, "a")); ((2, 25), (2, 28, 2, 29, "a")); + ((2, 26), (2, 28, 2, 29, "a")); ((2, 27), (2, 28, 2, 29, "a")); + ((2, 28), (2, 28, 2, 29, "a")); ((2, 29), (2, 28, 2, 29, "a")); + ((2, 30), (2, 33, 2, 34, "b")); ((2, 31), (2, 33, 2, 34, "b")); + ((2, 32), (2, 33, 2, 34, "b")); ((2, 33), (2, 33, 2, 34, "b")); + ((2, 34), (2, 33, 2, 34, "b")); ((2, 35), (2, 38, 2, 39, "c")); + ((2, 36), (2, 38, 2, 39, "c")); ((2, 37), (2, 38, 2, 39, "c")); + ((2, 38), (2, 38, 2, 39, "c"))] + [] let ``Partially valid namespaces should be reported`` () = let input = From 28fff66623697c256f6184e8d129f44e5bcc2f2f Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 Feb 2022 14:19:26 +0000 Subject: [PATCH 19/35] update baselines --- docs/debug-emit.md | 14 +- src/fsharp/CheckDeclarations.fs | 22 +- src/fsharp/SyntaxTreeOps.fs | 19 +- .../ListExpressionSteppingTest2.il.bsl | 136 +- .../Misc/NonEscapingArguments02.il.bsl | 6 +- .../Linq101Aggregates01.il.bsl | 1096 ++++++++--------- .../Linq101Grouping01.il.bsl | 258 ++-- .../Linq101Joins01.il.bsl | 222 ++-- .../Linq101Ordering01.il.bsl | 308 +++-- .../Linq101Partitioning01.il.bsl | 252 ++-- .../Linq101Quantifiers01.il.bsl | 178 ++- .../Linq101Select01.il.bsl | 660 +++++----- .../Linq101SetOperators01.il.bsl | 124 +- .../Linq101Where01.il.bsl | 272 ++-- .../TestFunctions/TestFunction20.il.bsl | 6 +- .../TestFunctions/TestFunction23.il.bsl | 6 +- 16 files changed, 1764 insertions(+), 1815 deletions(-) diff --git a/docs/debug-emit.md b/docs/debug-emit.md index eded2d3b4fb..fe0b833cf85 100644 --- a/docs/debug-emit.md +++ b/docs/debug-emit.md @@ -220,10 +220,20 @@ more complete inlining and code-flattening is applied. e.g. ```fsharp -type C(args) = // debug point over `(args)` - let x = v // debug point over `let x = v` +type C(args) = + let x = 1+1 // debug point over `let x = 1+1` as the only side effect let f x = x + 1 member _.P = x + f 4 + +type C(args) = + do printfn "hello" // debug point over `printfn "hello"` as side effect + static do printfn "hello" // debug point over `printfn "hello"` as side effect for static init + let f x = x + 1 + member _.P = x + f 4 + +type C(args) = // debug point over `(args)` since there's no other place to stop on object construction + let f x = x + 1 + member _.P = 4 ``` ## Internal implementation of debug points in the compiler diff --git a/src/fsharp/CheckDeclarations.fs b/src/fsharp/CheckDeclarations.fs index 7adeb395d24..12d8913e5a9 100644 --- a/src/fsharp/CheckDeclarations.fs +++ b/src/fsharp/CheckDeclarations.fs @@ -2107,8 +2107,26 @@ module MutRecBindingChecking = mkUnit g tcref.Range, false, None, defnCs else let inheritsExpr, _ = TcNewExpr cenv envForDecls tpenv g.obj_ty None true (SynExpr.Const (SynConst.Unit, tcref.Range)) tcref.Range - // If there is no 'inherits' add a debug point at the entry to the constructor over the type name itself. - let inheritsExpr = mkDebugPoint tcref.Range inheritsExpr + + // If there is no 'inherits' and no simple non-static 'let' of a non-method then add a debug point at the entry to the constructor over the type name itself. + let addDebugPointAtImplicitCtorArguments = + defnCs |> List.forall (fun defnC -> + match defnC with + | Phase2CIncrClassBindings binds -> + binds |> List.forall (fun bind -> + match bind with + | IncrClassBindingGroup(binds, isStatic, _) -> + isStatic || + binds |> List.forall (IncrClassReprInfo.IsMethodRepr cenv) + | IncrClassDo(_, isStatic) -> + isStatic) + | _ -> true) + + let inheritsExpr = + if addDebugPointAtImplicitCtorArguments then + mkDebugPoint tcref.Range inheritsExpr + else + inheritsExpr inheritsExpr, false, None, defnCs let envForTycon = MakeInnerEnvForTyconRef envForDecls tcref false diff --git a/src/fsharp/SyntaxTreeOps.fs b/src/fsharp/SyntaxTreeOps.fs index cba6688072b..dbc5d8d5922 100644 --- a/src/fsharp/SyntaxTreeOps.fs +++ b/src/fsharp/SyntaxTreeOps.fs @@ -130,14 +130,27 @@ let rec IsControlFlowExpression e = | SynExpr.Typed (e, _, _) -> IsControlFlowExpression e | _ -> false -// The debug point for a 'let' extends to include the 'let' if we're not defining a function and the r.h.s. is not a control-flow -// expression +// The syntactic criteria for when a debug point for a 'let' is extended to include +// the 'let' - which happens if we're not defining a function, or a type function, +// and the r.h.s. is not a control-flow expression. This is a syntactic criteria known +// to both ValidateBreakpointLocation and the parser that is marking up debug points. +// +// For example +// let x = 1 + 1 +// gets extended to inludde the 'let x'. +// +// A corner case: some things that look like simple value bindings get generalized, e.g. +// let empty = [] +// let Null = null +// and get compiled as generic methods that return different type instantiations of the given value. +// However these do not have side-effect and do not get a debug point recognised by ValidateBreakpointLocation. + let IsDebugPointBinding synPat synExpr = not (IsControlFlowExpression synExpr) && // Don't yield the binding sequence point if there are any arguments, i.e. we're defining a function or a method let isFunction = match synPat with - | SynPat.LongIdent (argPats=SynArgPats.Pats args) when not (List.isEmpty args) -> true + | SynPat.LongIdent (argPats=SynArgPats.Pats args; typarDecls=typarDecls) when not args.IsEmpty || typarDecls.IsSome -> true | _ -> false not isFunction diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.il.bsl index c13863375e3..3e9e182b557 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: {61F02896-D3DE-B780-A745-03839628F061} +// MVID: {61FD32BA-D3DE-B780-A745-0383BA32FD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07340000 +// Image base: 0x06760000 // =============== CLASS MEMBERS DECLARATION =================== @@ -312,7 +312,7 @@ .method public static class [mscorlib]System.Tuple`2>,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>> f2(!!a x) cil managed { - // Code size 194 (0xc2) + // Code size 192 (0xc0) .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', @@ -325,108 +325,104 @@ [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: 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, + 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, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_000e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_000d: 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_0013: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0012: 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_0018: stloc.1 + IL_0017: stloc.1 .line 16,16 : 22,28 '' - 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, + 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, int32, int32) - 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 + 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 .line 17,17 : 16,24 '' - 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, + 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, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_0033: stloc.3 + IL_0032: stloc.3 .line 18,18 : 15,45 '' - 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, + 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, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_003f: stloc.s 'Pipe #1 stage #2 at line 18' + IL_003e: stloc.s 'Pipe #1 stage #2 at line 18' .line 19,19 : 15,45 '' - 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, + 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, class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1) - IL_004d: stloc.0 - .line 21,25 : 9,50 '' - IL_004e: nop + IL_004c: stloc.0 .line 22,22 : 13,20 '' + IL_004d: ldarg.0 + IL_004e: ldarg.0 IL_004f: ldarg.0 - IL_0050: ldarg.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, + IL_0050: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0055: 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_005c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_005a: 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_0061: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_005f: 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_0066: stloc.s 'Pipe #2 input #1 at line 22' + IL_0064: stloc.s 'Pipe #2 input #1 at line 22' .line 22,22 : 22,28 '' - 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, + IL_0066: ldc.i4.0 + IL_0067: ldc.i4.1 + IL_0068: ldc.i4.2 + IL_0069: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, int32, int32) - 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' + IL_006e: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0073: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0078: stloc.s 'Pipe #2 input #2 at line 22' .line 22,22 : 30,36 '' - 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, + IL_007a: ldc.i4.0 + IL_007b: ldc.i4.1 + IL_007c: ldc.i4.2 + IL_007d: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators/OperatorIntrinsics::RangeInt32(int32, int32, int32) - 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' + IL_0082: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Core.Operators::CreateSequence(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0087: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_008c: stloc.s 'Pipe #2 input #3 at line 22' .line 23,23 : 17,26 '' - 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, + IL_008e: ldloc.s 'Pipe #2 input #1 at line 22' + IL_0090: ldloc.s 'Pipe #2 input #2 at line 22' + IL_0092: ldloc.s 'Pipe #2 input #3 at line 22' + IL_0094: 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_009b: stloc.s 'Pipe #2 stage #1 at line 23' + IL_0099: stloc.s 'Pipe #2 stage #1 at line 23' .line 24,24 : 15,50 '' - 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, + IL_009b: 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_00a0: ldloc.s 'Pipe #2 stage #1 at line 23' + IL_00a2: 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_00a9: stloc.s 'Pipe #2 stage #2 at line 24' + IL_00a7: stloc.s 'Pipe #2 stage #2 at line 24' .line 25,25 : 15,50 '' - 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, + IL_00a9: ldsfld class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25 class ListExpressionSteppingTest2/ListExpressionSteppingTest2/xs2@25::@_instance + IL_00ae: ldloc.s 'Pipe #2 stage #2 at line 24' + IL_00b0: 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_00b7: stloc.s xs2 + IL_00b5: stloc.s xs2 .line 27,27 : 9,17 '' - 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, + IL_00b7: ldloc.0 + IL_00b8: ldloc.s xs2 + IL_00ba: newobj instance void class [mscorlib]System.Tuple`2>,class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1>>::.ctor(!0, !1) - IL_00c1: ret + IL_00bf: ret } // end of method ListExpressionSteppingTest2::f2 } // end of class ListExpressionSteppingTest2 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NonEscapingArguments02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NonEscapingArguments02.il.bsl index ba4da100a17..dd09e377c37 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NonEscapingArguments02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/NonEscapingArguments02.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000360 Length: 0x0000019E } .module NonEscapingArguments02.dll -// MVID: {61FC3629-BB56-6582-A745-03832936FC61} +// MVID: {61FD32BA-BB56-6582-A745-0383BA32FD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x00FC0000 +// Image base: 0x06870000 // =============== CLASS MEMBERS DECLARATION =================== @@ -62,7 +62,7 @@ // Code size 21 (0x15) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 6,21 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\NonEscapingArguments02.fs' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\Misc\\NonEscapingArguments02.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Aggregates01.il.bsl index 3bd6a3acc8c..c8603a78df6 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: {61F2D6A6-D281-4783-A745-0383A6D6F261} +// MVID: {61FD32BA-D281-4783-A745-0383BA32FD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06B60000 +// Image base: 0x05570000 // =============== CLASS MEMBERS DECLARATION =================== @@ -6076,7 +6076,7 @@ .method public strict virtual instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,object> Invoke(string _arg1) cil managed { - // Code size 34 (0x22) + // Code size 33 (0x21) .maxstack 7 .locals init ([0] string w, [1] float64 wl, @@ -6084,26 +6084,24 @@ .line 100001,100001 : 0,0 '' IL_0000: ldarg.1 IL_0001: stloc.0 - .line 106,106 : 9,35 '' - IL_0002: nop .line 106,106 : 18,26 '' - IL_0003: ldloc.0 - IL_0004: callvirt instance int32 [mscorlib]System.String::get_Length() - IL_0009: stloc.2 + IL_0002: ldloc.0 + IL_0003: callvirt instance int32 [mscorlib]System.String::get_Length() + IL_0008: stloc.2 .line 106,106 : 30,35 '' - IL_000a: ldloc.2 - IL_000b: conv.r8 - IL_000c: stloc.1 + IL_0009: ldloc.2 + IL_000a: conv.r8 + IL_000b: stloc.1 .line 107,107 : 9,21 '' - IL_000d: ldarg.0 - IL_000e: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/averageLength@105::builder@ - IL_0013: ldloc.0 - IL_0014: ldloc.1 - IL_0015: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, + IL_000c: ldarg.0 + IL_000d: ldfld class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder Linq101Aggregates01/averageLength@105::builder@ + IL_0012: ldloc.0 + IL_0013: ldloc.1 + IL_0014: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, !1) - IL_001a: tail. - IL_001c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,object>(!!0) - IL_0021: ret + IL_0019: tail. + IL_001b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Yield,object>(!!0) + IL_0020: ret } // end of method averageLength@105::Invoke } // end of class averageLength@105 @@ -7185,7 +7183,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 1756 (0x6dc) + // Code size 1749 (0x6d5) .maxstack 13 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 factorsOf300, [1] int32 uniqueFactors, @@ -7283,738 +7281,724 @@ IL_0023: dup IL_0024: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::factorsOf300@8 IL_0029: stloc.0 - .line 10,14 : 1,20 '' - IL_002a: nop .line 11,11 : 5,10 '' - IL_002b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0030: stloc.s V_21 - IL_0032: ldloc.s V_21 - IL_0034: ldnull + IL_002a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_002f: stloc.s V_21 + IL_0031: ldloc.s V_21 + IL_0033: ldnull + IL_0034: ldc.i4.0 IL_0035: ldc.i4.0 - IL_0036: ldc.i4.0 - IL_0037: newobj instance void Linq101Aggregates01/'Pipe #1 input at line 11@12'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0036: newobj instance void Linq101Aggregates01/'Pipe #1 input at line 11@12'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_003c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0041: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Distinct(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) - IL_0046: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_004b: stloc.s 'Pipe #1 input at line 11' + IL_003b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0040: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Distinct(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) + IL_0045: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_004a: stloc.s 'Pipe #1 input at line 11' .line 14,14 : 10,20 '' - IL_004d: ldloc.s 'Pipe #1 input at line 11' - IL_004f: call int32 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Length(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0054: dup - IL_0055: stsfld int32 ''.$Linq101Aggregates01::uniqueFactors@10 - IL_005a: stloc.1 + IL_004c: ldloc.s 'Pipe #1 input at line 11' + IL_004e: call int32 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Length(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0053: dup + IL_0054: stsfld int32 ''.$Linq101Aggregates01::uniqueFactors@10 + IL_0059: stloc.1 .line 17,17 : 1,47 '' - IL_005b: ldc.i4.5 - IL_005c: ldc.i4.4 - IL_005d: ldc.i4.1 - IL_005e: ldc.i4.3 - IL_005f: ldc.i4.s 9 - IL_0061: ldc.i4.8 - IL_0062: ldc.i4.6 - IL_0063: ldc.i4.7 - IL_0064: ldc.i4.2 - IL_0065: ldc.i4.0 - IL_0066: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_006b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_005a: ldc.i4.5 + IL_005b: ldc.i4.4 + IL_005c: ldc.i4.1 + IL_005d: ldc.i4.3 + IL_005e: ldc.i4.s 9 + IL_0060: ldc.i4.8 + IL_0061: ldc.i4.6 + IL_0062: ldc.i4.7 + IL_0063: ldc.i4.2 + IL_0064: ldc.i4.0 + IL_0065: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_006a: 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_0070: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_006f: 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_0075: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0074: 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_007a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0079: 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_007f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_007e: 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_0084: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0083: 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_0089: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0088: 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_008e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_008d: 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_0093: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0092: 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_0098: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0097: 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_009d: dup - IL_009e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::numbers@17 - IL_00a3: stloc.2 + IL_009c: dup + IL_009d: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::numbers@17 + IL_00a2: stloc.2 .line 20,20 : 5,10 '' - IL_00a4: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00a9: stloc.s V_22 - IL_00ab: ldloc.s V_22 - IL_00ad: stloc.s V_23 - IL_00af: ldnull + IL_00a3: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00a8: stloc.s V_22 + IL_00aa: ldloc.s V_22 + IL_00ac: stloc.s V_23 + IL_00ae: ldnull + IL_00af: ldc.i4.0 IL_00b0: ldc.i4.0 - IL_00b1: ldc.i4.0 - IL_00b2: newobj instance void Linq101Aggregates01/numSum@21::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_00b1: newobj instance void Linq101Aggregates01/numSum@21::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_00b7: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00bc: stloc.s V_24 - IL_00be: ldsfld class Linq101Aggregates01/'numSum@22-1' Linq101Aggregates01/'numSum@22-1'::@_instance - IL_00c3: stloc.s V_25 - IL_00c5: ldloc.s V_24 - IL_00c7: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_00cc: stloc.s V_26 - IL_00ce: ldloc.s V_26 - IL_00d0: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_00d5: stloc.s V_27 + IL_00b6: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00bb: stloc.s V_24 + IL_00bd: ldsfld class Linq101Aggregates01/'numSum@22-1' Linq101Aggregates01/'numSum@22-1'::@_instance + IL_00c2: stloc.s V_25 + IL_00c4: ldloc.s V_24 + IL_00c6: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_00cb: stloc.s V_26 + IL_00cd: ldloc.s V_26 + IL_00cf: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_00d4: stloc.s V_27 .try { - IL_00d7: ldc.i4.0 - IL_00d8: stloc.s V_29 - IL_00da: ldloc.s V_27 - IL_00dc: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() - IL_00e1: brfalse.s IL_00f9 + IL_00d6: ldc.i4.0 + IL_00d7: stloc.s V_29 + IL_00d9: ldloc.s V_27 + IL_00db: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() + IL_00e0: brfalse.s IL_00f8 - IL_00e3: ldloc.s V_29 - IL_00e5: ldloc.s V_25 - IL_00e7: ldloc.s V_27 - IL_00e9: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() - IL_00ee: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_00f3: add.ovf - IL_00f4: stloc.s V_29 + IL_00e2: ldloc.s V_29 + IL_00e4: ldloc.s V_25 + IL_00e6: ldloc.s V_27 + IL_00e8: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() + IL_00ed: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_00f2: add.ovf + IL_00f3: stloc.s V_29 .line 100001,100001 : 0,0 '' - IL_00f6: nop - IL_00f7: br.s IL_00da + IL_00f5: nop + IL_00f6: br.s IL_00d9 - IL_00f9: ldloc.s V_29 - IL_00fb: stloc.s V_28 - IL_00fd: leave.s IL_0115 + IL_00f8: ldloc.s V_29 + IL_00fa: stloc.s V_28 + IL_00fc: leave.s IL_0114 } // end .try finally { - IL_00ff: ldloc.s V_27 - IL_0101: isinst [mscorlib]System.IDisposable - IL_0106: stloc.s V_30 + IL_00fe: ldloc.s V_27 + IL_0100: isinst [mscorlib]System.IDisposable + IL_0105: stloc.s V_30 .line 100001,100001 : 0,0 '' - IL_0108: ldloc.s V_30 - IL_010a: brfalse.s IL_0114 + IL_0107: ldloc.s V_30 + IL_0109: brfalse.s IL_0113 .line 100001,100001 : 0,0 '' - IL_010c: ldloc.s V_30 - IL_010e: callvirt instance void [netstandard]System.IDisposable::Dispose() - IL_0113: endfinally + IL_010b: ldloc.s V_30 + IL_010d: callvirt instance void [netstandard]System.IDisposable::Dispose() + IL_0112: endfinally .line 100001,100001 : 0,0 '' - IL_0114: endfinally + IL_0113: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_0115: ldloc.s V_28 - IL_0117: dup - IL_0118: stsfld int32 ''.$Linq101Aggregates01::numSum@19 - IL_011d: stloc.3 + IL_0114: ldloc.s V_28 + IL_0116: dup + IL_0117: stsfld int32 ''.$Linq101Aggregates01::numSum@19 + IL_011c: stloc.3 .line 26,26 : 1,45 '' - IL_011e: ldstr "cherry" - IL_0123: ldstr "apple" - IL_0128: ldstr "blueberry" - IL_012d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0132: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_011d: ldstr "cherry" + IL_0122: ldstr "apple" + IL_0127: ldstr "blueberry" + IL_012c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0131: 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_0137: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0136: 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_013c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_013b: 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_0141: dup - IL_0142: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::words@26 - IL_0147: stloc.s words + IL_0140: dup + IL_0141: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::words@26 + IL_0146: stloc.s words .line 29,29 : 5,10 '' - IL_0149: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_014e: stloc.s V_31 - IL_0150: ldloc.s V_31 - IL_0152: stloc.s V_32 - IL_0154: ldnull - IL_0155: ldc.i4.0 - IL_0156: ldnull - IL_0157: newobj instance void Linq101Aggregates01/totalChars@30::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0148: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_014d: stloc.s V_31 + IL_014f: ldloc.s V_31 + IL_0151: stloc.s V_32 + IL_0153: ldnull + IL_0154: ldc.i4.0 + IL_0155: ldnull + IL_0156: newobj instance void Linq101Aggregates01/totalChars@30::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_015c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0161: stloc.s V_33 - IL_0163: ldsfld class Linq101Aggregates01/'totalChars@31-1' Linq101Aggregates01/'totalChars@31-1'::@_instance - IL_0168: stloc.s V_34 - IL_016a: ldloc.s V_33 - IL_016c: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0171: stloc.s V_35 - IL_0173: ldloc.s V_35 - IL_0175: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_017a: stloc.s V_36 + IL_015b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0160: stloc.s V_33 + IL_0162: ldsfld class Linq101Aggregates01/'totalChars@31-1' Linq101Aggregates01/'totalChars@31-1'::@_instance + IL_0167: stloc.s V_34 + IL_0169: ldloc.s V_33 + IL_016b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0170: stloc.s V_35 + IL_0172: ldloc.s V_35 + IL_0174: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0179: stloc.s V_36 .try { - IL_017c: ldc.i4.0 - IL_017d: stloc.s V_38 - IL_017f: ldloc.s V_36 - IL_0181: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() - IL_0186: brfalse.s IL_019e + IL_017b: ldc.i4.0 + IL_017c: stloc.s V_38 + IL_017e: ldloc.s V_36 + IL_0180: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() + IL_0185: brfalse.s IL_019d - IL_0188: ldloc.s V_38 - IL_018a: ldloc.s V_34 - IL_018c: ldloc.s V_36 - IL_018e: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0193: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) - IL_0198: add.ovf - IL_0199: stloc.s V_38 + IL_0187: ldloc.s V_38 + IL_0189: ldloc.s V_34 + IL_018b: ldloc.s V_36 + IL_018d: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0192: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0197: add.ovf + IL_0198: stloc.s V_38 .line 100001,100001 : 0,0 '' - IL_019b: nop - IL_019c: br.s IL_017f + IL_019a: nop + IL_019b: br.s IL_017e - IL_019e: ldloc.s V_38 - IL_01a0: stloc.s V_37 - IL_01a2: leave.s IL_01ba + IL_019d: ldloc.s V_38 + IL_019f: stloc.s V_37 + IL_01a1: leave.s IL_01b9 } // end .try finally { - IL_01a4: ldloc.s V_36 - IL_01a6: isinst [mscorlib]System.IDisposable - IL_01ab: stloc.s V_39 + IL_01a3: ldloc.s V_36 + IL_01a5: isinst [mscorlib]System.IDisposable + IL_01aa: stloc.s V_39 .line 100001,100001 : 0,0 '' - IL_01ad: ldloc.s V_39 - IL_01af: brfalse.s IL_01b9 + IL_01ac: ldloc.s V_39 + IL_01ae: brfalse.s IL_01b8 .line 100001,100001 : 0,0 '' - IL_01b1: ldloc.s V_39 - IL_01b3: callvirt instance void [netstandard]System.IDisposable::Dispose() - IL_01b8: endfinally + IL_01b0: ldloc.s V_39 + IL_01b2: callvirt instance void [netstandard]System.IDisposable::Dispose() + IL_01b7: endfinally .line 100001,100001 : 0,0 '' - IL_01b9: endfinally + IL_01b8: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_01ba: ldloc.s V_37 - IL_01bc: dup - IL_01bd: stsfld int32 ''.$Linq101Aggregates01::totalChars@28 - IL_01c2: stloc.s totalChars + IL_01b9: ldloc.s V_37 + IL_01bb: dup + IL_01bc: stsfld int32 ''.$Linq101Aggregates01::totalChars@28 + IL_01c1: stloc.s totalChars .line 35,35 : 1,32 '' - IL_01c4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() - IL_01c9: dup - IL_01ca: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::products@35 - IL_01cf: stloc.s products - .line 37,46 : 1,21 '' - IL_01d1: nop + IL_01c3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() + IL_01c8: dup + IL_01c9: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::products@35 + IL_01ce: stloc.s products .line 38,38 : 5,10 '' - IL_01d2: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_01d7: stloc.s V_41 + IL_01d0: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_01d5: stloc.s V_41 + IL_01d7: ldloc.s V_41 IL_01d9: ldloc.s V_41 IL_01db: ldloc.s V_41 - IL_01dd: ldloc.s V_41 .line 39,39 : 9,12 '' + IL_01dd: ldloc.s V_41 IL_01df: ldloc.s V_41 - IL_01e1: ldloc.s V_41 - IL_01e3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_01e8: 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_01ed: ldloc.s V_41 - IL_01ef: newobj instance void Linq101Aggregates01/'Pipe #2 input at line 38@39'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_01f4: 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_01e1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_01e6: 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_01eb: ldloc.s V_41 + IL_01ed: newobj instance void Linq101Aggregates01/'Pipe #2 input at line 38@39'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_01f2: 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_01f9: ldsfld class Linq101Aggregates01/'Pipe #2 input at line 38@40-1' Linq101Aggregates01/'Pipe #2 input at line 38@40-1'::@_instance - IL_01fe: ldsfld class Linq101Aggregates01/'Pipe #2 input at line 38@40-2' Linq101Aggregates01/'Pipe #2 input at line 38@40-2'::@_instance - IL_0203: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01f7: ldsfld class Linq101Aggregates01/'Pipe #2 input at line 38@40-1' Linq101Aggregates01/'Pipe #2 input at line 38@40-1'::@_instance + IL_01fc: ldsfld class Linq101Aggregates01/'Pipe #2 input at line 38@40-2' Linq101Aggregates01/'Pipe #2 input at line 38@40-2'::@_instance + IL_0201: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0208: ldloc.s V_41 - IL_020a: newobj instance void Linq101Aggregates01/'Pipe #2 input at line 38@40-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_020f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,int32>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0206: ldloc.s V_41 + IL_0208: newobj instance void Linq101Aggregates01/'Pipe #2 input at line 38@40-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_020d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,int32>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0214: ldsfld class Linq101Aggregates01/'Pipe #2 input at line 38@45-4' Linq101Aggregates01/'Pipe #2 input at line 38@45-4'::@_instance - IL_0219: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,int32>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0212: ldsfld class Linq101Aggregates01/'Pipe #2 input at line 38@45-4' Linq101Aggregates01/'Pipe #2 input at line 38@45-4'::@_instance + IL_0217: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,int32>,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_021e: 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_0223: stloc.s 'Pipe #2 input at line 38' + IL_021c: 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_0221: stloc.s 'Pipe #2 input at line 38' .line 46,46 : 10,21 '' - IL_0225: ldloc.s 'Pipe #2 input at line 38' - IL_0227: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_022c: dup - IL_022d: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories@37 - IL_0232: stloc.s categories + IL_0223: ldloc.s 'Pipe #2 input at line 38' + IL_0225: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_022a: dup + IL_022b: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories@37 + IL_0230: stloc.s categories .line 49,49 : 14,19 '' - IL_0234: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0239: ldnull - IL_023a: ldc.i4.0 - IL_023b: ldc.i4.0 - IL_023c: newobj instance void Linq101Aggregates01/minNum@49::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0232: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0237: ldnull + IL_0238: ldc.i4.0 + IL_0239: ldc.i4.0 + IL_023a: newobj instance void Linq101Aggregates01/minNum@49::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0241: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0246: ldsfld class Linq101Aggregates01/'minNum@49-1' Linq101Aggregates01/'minNum@49-1'::@_instance - IL_024b: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_023f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0244: ldsfld class Linq101Aggregates01/'minNum@49-1' Linq101Aggregates01/'minNum@49-1'::@_instance + IL_0249: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0250: dup - IL_0251: stsfld int32 ''.$Linq101Aggregates01::minNum@49 - IL_0256: stloc.s minNum + IL_024e: dup + IL_024f: stsfld int32 ''.$Linq101Aggregates01::minNum@49 + IL_0254: stloc.s minNum .line 52,52 : 20,25 '' - IL_0258: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0256: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_025b: ldnull + IL_025c: ldc.i4.0 IL_025d: ldnull - IL_025e: ldc.i4.0 - IL_025f: ldnull - IL_0260: newobj instance void Linq101Aggregates01/shortestWord@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_025e: newobj instance void Linq101Aggregates01/shortestWord@52::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0265: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_026a: ldsfld class Linq101Aggregates01/'shortestWord@52-1' Linq101Aggregates01/'shortestWord@52-1'::@_instance - IL_026f: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0263: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0268: ldsfld class Linq101Aggregates01/'shortestWord@52-1' Linq101Aggregates01/'shortestWord@52-1'::@_instance + IL_026d: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MinBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0274: dup - IL_0275: stsfld int32 ''.$Linq101Aggregates01::shortestWord@52 - IL_027a: stloc.s shortestWord - .line 55,61 : 1,21 '' - IL_027c: nop + IL_0272: dup + IL_0273: stsfld int32 ''.$Linq101Aggregates01::shortestWord@52 + IL_0278: stloc.s shortestWord .line 56,56 : 5,10 '' - IL_027d: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0282: stloc.s V_43 - IL_0284: ldloc.s V_43 - IL_0286: ldloc.s V_43 - IL_0288: ldloc.s V_43 + IL_027a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_027f: stloc.s V_43 + IL_0281: ldloc.s V_43 + IL_0283: ldloc.s V_43 + IL_0285: ldloc.s V_43 .line 57,57 : 9,12 '' - IL_028a: ldloc.s V_43 - IL_028c: ldloc.s V_43 - IL_028e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_0293: 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_0298: ldloc.s V_43 - IL_029a: newobj instance void Linq101Aggregates01/'Pipe #3 input at line 56@57'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_029f: 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_0287: ldloc.s V_43 + IL_0289: ldloc.s V_43 + IL_028b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_0290: 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_0295: ldloc.s V_43 + IL_0297: newobj instance void Linq101Aggregates01/'Pipe #3 input at line 56@57'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_029c: 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_02a4: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@58-1' Linq101Aggregates01/'Pipe #3 input at line 56@58-1'::@_instance - IL_02a9: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@58-2' Linq101Aggregates01/'Pipe #3 input at line 56@58-2'::@_instance - IL_02ae: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_02a1: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@58-1' Linq101Aggregates01/'Pipe #3 input at line 56@58-1'::@_instance + IL_02a6: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@58-2' Linq101Aggregates01/'Pipe #3 input at line 56@58-2'::@_instance + IL_02ab: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_02b3: ldloc.s V_43 - IL_02b5: newobj instance void Linq101Aggregates01/'Pipe #3 input at line 56@58-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_02ba: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_02b0: ldloc.s V_43 + IL_02b2: newobj instance void Linq101Aggregates01/'Pipe #3 input at line 56@58-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_02b7: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_02bf: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@60-4' Linq101Aggregates01/'Pipe #3 input at line 56@60-4'::@_instance - IL_02c4: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_02bc: ldsfld class Linq101Aggregates01/'Pipe #3 input at line 56@60-4' Linq101Aggregates01/'Pipe #3 input at line 56@60-4'::@_instance + IL_02c1: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,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_02c9: 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_02ce: stloc.s 'Pipe #3 input at line 56' + IL_02c6: 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_02cb: stloc.s 'Pipe #3 input at line 56' .line 61,61 : 10,21 '' - IL_02d0: ldloc.s 'Pipe #3 input at line 56' - IL_02d2: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_02d7: dup - IL_02d8: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories2@55 - IL_02dd: stloc.s categories2 - .line 64,71 : 1,21 '' - IL_02df: nop + IL_02cd: ldloc.s 'Pipe #3 input at line 56' + IL_02cf: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_02d4: dup + IL_02d5: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories2@55 + IL_02da: stloc.s categories2 .line 65,65 : 5,10 '' - IL_02e0: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_02e5: stloc.s V_45 + IL_02dc: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_02e1: stloc.s V_45 + IL_02e3: ldloc.s V_45 + IL_02e5: ldloc.s V_45 IL_02e7: ldloc.s V_45 + .line 66,66 : 9,12 '' IL_02e9: ldloc.s V_45 IL_02eb: ldloc.s V_45 - .line 66,66 : 9,12 '' - IL_02ed: ldloc.s V_45 - IL_02ef: ldloc.s V_45 - IL_02f1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_02f6: 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_02fb: ldloc.s V_45 - IL_02fd: newobj instance void Linq101Aggregates01/'Pipe #4 input at line 65@66'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0302: 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_02ed: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_02f2: 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_02f7: ldloc.s V_45 + IL_02f9: newobj instance void Linq101Aggregates01/'Pipe #4 input at line 65@66'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_02fe: 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_0307: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@67-1' Linq101Aggregates01/'Pipe #4 input at line 65@67-1'::@_instance - IL_030c: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@67-2' Linq101Aggregates01/'Pipe #4 input at line 65@67-2'::@_instance - IL_0311: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0303: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@67-1' Linq101Aggregates01/'Pipe #4 input at line 65@67-1'::@_instance + IL_0308: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@67-2' Linq101Aggregates01/'Pipe #4 input at line 65@67-2'::@_instance + IL_030d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0316: ldloc.s V_45 - IL_0318: newobj instance void Linq101Aggregates01/'Pipe #4 input at line 65@67-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_031d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0312: ldloc.s V_45 + IL_0314: newobj instance void Linq101Aggregates01/'Pipe #4 input at line 65@67-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0319: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0322: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@70-4' Linq101Aggregates01/'Pipe #4 input at line 65@70-4'::@_instance - IL_0327: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_031e: ldsfld class Linq101Aggregates01/'Pipe #4 input at line 65@70-4' Linq101Aggregates01/'Pipe #4 input at line 65@70-4'::@_instance + IL_0323: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,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_032c: 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_0331: stloc.s 'Pipe #4 input at line 65' + IL_0328: 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_032d: stloc.s 'Pipe #4 input at line 65' .line 71,71 : 10,21 '' - IL_0333: ldloc.s 'Pipe #4 input at line 65' - IL_0335: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_033a: dup - IL_033b: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories3@64 - IL_0340: stloc.s categories3 + IL_032f: ldloc.s 'Pipe #4 input at line 65' + IL_0331: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0336: dup + IL_0337: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories3@64 + IL_033c: stloc.s categories3 .line 74,74 : 14,19 '' - IL_0342: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0347: ldnull - IL_0348: ldc.i4.0 - IL_0349: ldc.i4.0 - IL_034a: newobj instance void Linq101Aggregates01/maxNum@74::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_033e: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0343: ldnull + IL_0344: ldc.i4.0 + IL_0345: ldc.i4.0 + IL_0346: newobj instance void Linq101Aggregates01/maxNum@74::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_034f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0354: ldsfld class Linq101Aggregates01/'maxNum@74-1' Linq101Aggregates01/'maxNum@74-1'::@_instance - IL_0359: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_034b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0350: ldsfld class Linq101Aggregates01/'maxNum@74-1' Linq101Aggregates01/'maxNum@74-1'::@_instance + IL_0355: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_035e: dup - IL_035f: stsfld int32 ''.$Linq101Aggregates01::maxNum@74 - IL_0364: stloc.s maxNum + IL_035a: dup + IL_035b: stsfld int32 ''.$Linq101Aggregates01::maxNum@74 + IL_0360: stloc.s maxNum .line 77,77 : 21,26 '' - IL_0366: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_036b: ldnull - IL_036c: ldc.i4.0 - IL_036d: ldnull - IL_036e: newobj instance void Linq101Aggregates01/longestLength@77::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0362: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0367: ldnull + IL_0368: ldc.i4.0 + IL_0369: ldnull + IL_036a: newobj instance void Linq101Aggregates01/longestLength@77::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0373: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0378: ldsfld class Linq101Aggregates01/'longestLength@77-1' Linq101Aggregates01/'longestLength@77-1'::@_instance - IL_037d: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_036f: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0374: ldsfld class Linq101Aggregates01/'longestLength@77-1' Linq101Aggregates01/'longestLength@77-1'::@_instance + IL_0379: callvirt instance !!2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::MaxBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0382: dup - IL_0383: stsfld int32 ''.$Linq101Aggregates01::longestLength@77 - IL_0388: stloc.s longestLength - .line 80,86 : 1,21 '' - IL_038a: nop + IL_037e: dup + IL_037f: stsfld int32 ''.$Linq101Aggregates01::longestLength@77 + IL_0384: stloc.s longestLength .line 81,81 : 5,10 '' - IL_038b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0390: stloc.s V_47 - IL_0392: ldloc.s V_47 - IL_0394: ldloc.s V_47 - IL_0396: ldloc.s V_47 + IL_0386: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_038b: stloc.s V_47 + IL_038d: ldloc.s V_47 + IL_038f: ldloc.s V_47 + IL_0391: ldloc.s V_47 .line 82,82 : 9,12 '' - IL_0398: ldloc.s V_47 - IL_039a: ldloc.s V_47 - IL_039c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_03a1: 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_03a6: ldloc.s V_47 - IL_03a8: newobj instance void Linq101Aggregates01/'Pipe #5 input at line 81@82'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_03ad: 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_0393: ldloc.s V_47 + IL_0395: ldloc.s V_47 + IL_0397: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + 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_47 + IL_03a3: newobj instance void Linq101Aggregates01/'Pipe #5 input at line 81@82'::.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 [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_03b2: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@83-1' Linq101Aggregates01/'Pipe #5 input at line 81@83-1'::@_instance - IL_03b7: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@83-2' Linq101Aggregates01/'Pipe #5 input at line 81@83-2'::@_instance - IL_03bc: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03ad: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@83-1' Linq101Aggregates01/'Pipe #5 input at line 81@83-1'::@_instance + IL_03b2: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@83-2' Linq101Aggregates01/'Pipe #5 input at line 81@83-2'::@_instance + IL_03b7: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_03c1: ldloc.s V_47 - IL_03c3: newobj instance void Linq101Aggregates01/'Pipe #5 input at line 81@83-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_03c8: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03bc: ldloc.s V_47 + IL_03be: newobj instance void Linq101Aggregates01/'Pipe #5 input at line 81@83-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_03c3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_03cd: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@85-4' Linq101Aggregates01/'Pipe #5 input at line 81@85-4'::@_instance - IL_03d2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_03c8: ldsfld class Linq101Aggregates01/'Pipe #5 input at line 81@85-4' Linq101Aggregates01/'Pipe #5 input at line 81@85-4'::@_instance + IL_03cd: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,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_03d7: 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_03dc: stloc.s 'Pipe #5 input at line 81' + IL_03d2: 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_03d7: stloc.s 'Pipe #5 input at line 81' .line 86,86 : 10,21 '' - IL_03de: ldloc.s 'Pipe #5 input at line 81' - IL_03e0: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_03e5: dup - IL_03e6: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories4@80 - IL_03eb: stloc.s categories4 - .line 89,96 : 1,21 '' - IL_03ed: nop + IL_03d9: ldloc.s 'Pipe #5 input at line 81' + IL_03db: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_03e0: dup + IL_03e1: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories4@80 + IL_03e6: stloc.s categories4 .line 90,90 : 5,10 '' - IL_03ee: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_03f3: stloc.s V_49 + IL_03e8: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_03ed: stloc.s V_49 + IL_03ef: ldloc.s V_49 + IL_03f1: ldloc.s V_49 + IL_03f3: ldloc.s V_49 + .line 91,91 : 9,12 '' IL_03f5: ldloc.s V_49 IL_03f7: ldloc.s V_49 - IL_03f9: ldloc.s V_49 - .line 91,91 : 9,12 '' - IL_03fb: ldloc.s V_49 - IL_03fd: ldloc.s V_49 - IL_03ff: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_0404: 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_0409: ldloc.s V_49 - IL_040b: newobj instance void Linq101Aggregates01/'Pipe #6 input at line 90@91'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0410: 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_03f9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_03fe: 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_0403: ldloc.s V_49 + IL_0405: newobj instance void Linq101Aggregates01/'Pipe #6 input at line 90@91'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_040a: 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_0415: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@92-1' Linq101Aggregates01/'Pipe #6 input at line 90@92-1'::@_instance - IL_041a: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@92-2' Linq101Aggregates01/'Pipe #6 input at line 90@92-2'::@_instance - IL_041f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_040f: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@92-1' Linq101Aggregates01/'Pipe #6 input at line 90@92-1'::@_instance + IL_0414: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@92-2' Linq101Aggregates01/'Pipe #6 input at line 90@92-2'::@_instance + IL_0419: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0424: ldloc.s V_49 - IL_0426: newobj instance void Linq101Aggregates01/'Pipe #6 input at line 90@92-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_042b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_041e: ldloc.s V_49 + IL_0420: newobj instance void Linq101Aggregates01/'Pipe #6 input at line 90@92-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0425: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0430: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@95-4' Linq101Aggregates01/'Pipe #6 input at line 90@95-4'::@_instance - IL_0435: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_042a: ldsfld class Linq101Aggregates01/'Pipe #6 input at line 90@95-4' Linq101Aggregates01/'Pipe #6 input at line 90@95-4'::@_instance + IL_042f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal,class [mscorlib]System.Collections.Generic.IEnumerable`1>,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_043a: 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_043f: stloc.s 'Pipe #6 input at line 90' + IL_0434: 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_0439: stloc.s 'Pipe #6 input at line 90' .line 96,96 : 10,21 '' - IL_0441: ldloc.s 'Pipe #6 input at line 90' - IL_0443: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0448: dup - IL_0449: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories5@89 - IL_044e: stloc.s categories5 + IL_043b: ldloc.s 'Pipe #6 input at line 90' + IL_043d: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0442: dup + IL_0443: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Aggregates01::categories5@89 + IL_0448: stloc.s categories5 .line 99,99 : 1,66 '' - IL_0450: ldc.r8 5. - IL_0459: ldc.r8 4. - IL_0462: ldc.r8 1. - IL_046b: ldc.r8 3. - IL_0474: ldc.r8 9. - IL_047d: ldc.r8 8. - IL_0486: ldc.r8 6. - IL_048f: ldc.r8 7. - IL_0498: ldc.r8 2. - IL_04a1: ldc.r8 0.0 - IL_04aa: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_04af: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_044a: ldc.r8 5. + IL_0453: ldc.r8 4. + IL_045c: ldc.r8 1. + IL_0465: ldc.r8 3. + IL_046e: ldc.r8 9. + IL_0477: ldc.r8 8. + IL_0480: ldc.r8 6. + IL_0489: ldc.r8 7. + IL_0492: ldc.r8 2. + IL_049b: ldc.r8 0.0 + IL_04a4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_04a9: 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_04b4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04ae: 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_04b9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04b3: 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_04be: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04b8: 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_04c3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04bd: 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_04c8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04c2: 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_04cd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04c7: 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_04d2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04cc: 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_04d7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04d1: 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_04dc: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_04d6: 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_04e1: dup - IL_04e2: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::numbers2@99 - IL_04e7: stloc.s numbers2 + IL_04db: dup + IL_04dc: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Aggregates01::numbers2@99 + IL_04e1: stloc.s numbers2 .line 100,100 : 18,23 '' - IL_04e9: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_04ee: stloc.s V_50 - IL_04f0: ldloc.s V_50 - IL_04f2: stloc.s V_51 - IL_04f4: ldnull - IL_04f5: ldc.i4.0 - IL_04f6: ldc.r8 0.0 - IL_04ff: newobj instance void Linq101Aggregates01/averageNum@100::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_04e3: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_04e8: stloc.s V_50 + IL_04ea: ldloc.s V_50 + IL_04ec: stloc.s V_51 + IL_04ee: ldnull + IL_04ef: ldc.i4.0 + IL_04f0: ldc.r8 0.0 + IL_04f9: newobj instance void Linq101Aggregates01/averageNum@100::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, float64) - IL_0504: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0509: stloc.s V_52 - IL_050b: ldsfld class Linq101Aggregates01/'averageNum@100-1' Linq101Aggregates01/'averageNum@100-1'::@_instance - IL_0510: stloc.s V_53 - 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 + IL_04fe: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0503: stloc.s V_52 + IL_0505: ldsfld class Linq101Aggregates01/'averageNum@100-1' Linq101Aggregates01/'averageNum@100-1'::@_instance + IL_050a: stloc.s V_53 + IL_050c: ldloc.s V_52 + IL_050e: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0513: 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 + IL_0515: ldloc.s V_54 + IL_0517: box class [mscorlib]System.Collections.Generic.IEnumerable`1 + IL_051c: brtrue.s IL_0529 .line 100001,100001 : 0,0 '' - IL_0524: ldstr "source" - IL_0529: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) - IL_052e: throw + IL_051e: ldstr "source" + IL_0523: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) + IL_0528: throw .line 100001,100001 : 0,0 '' - IL_052f: nop - IL_0530: ldloc.s V_54 - IL_0532: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0537: stloc.s V_55 + IL_0529: nop + IL_052a: ldloc.s V_54 + IL_052c: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1::GetEnumerator() + IL_0531: stloc.s V_55 .try { - IL_0539: ldc.r8 0.0 - IL_0542: stloc.s V_57 - IL_0544: ldc.i4.0 - IL_0545: stloc.s V_58 - IL_0547: ldloc.s V_55 - IL_0549: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() - IL_054e: brfalse.s IL_056c - - IL_0550: ldloc.s V_57 - IL_0552: ldloc.s V_53 - IL_0554: ldloc.s V_55 - IL_0556: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() - IL_055b: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_0533: ldc.r8 0.0 + IL_053c: stloc.s V_57 + IL_053e: ldc.i4.0 + IL_053f: stloc.s V_58 + IL_0541: ldloc.s V_55 + IL_0543: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() + IL_0548: brfalse.s IL_0566 + + IL_054a: ldloc.s V_57 + IL_054c: ldloc.s V_53 + IL_054e: ldloc.s V_55 + IL_0550: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1::get_Current() + IL_0555: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2::Invoke(!0) + IL_055a: add + IL_055b: stloc.s V_57 + IL_055d: ldloc.s V_58 + IL_055f: ldc.i4.1 IL_0560: add - IL_0561: stloc.s V_57 - IL_0563: ldloc.s V_58 - IL_0565: ldc.i4.1 - IL_0566: add - IL_0567: stloc.s V_58 + IL_0561: stloc.s V_58 .line 100001,100001 : 0,0 '' - IL_0569: nop - IL_056a: br.s IL_0547 + IL_0563: nop + IL_0564: br.s IL_0541 .line 100001,100001 : 0,0 '' - IL_056c: ldloc.s V_58 - IL_056e: brtrue.s IL_057b + IL_0566: ldloc.s V_58 + IL_0568: brtrue.s IL_0575 .line 100001,100001 : 0,0 '' - IL_0570: ldstr "source" - IL_0575: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) - IL_057a: throw + IL_056a: ldstr "source" + IL_056f: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) + IL_0574: throw .line 100001,100001 : 0,0 '' - IL_057b: nop - IL_057c: ldloc.s V_57 - IL_057e: stloc.s V_59 - IL_0580: ldloc.s V_58 - IL_0582: stloc.s V_60 - IL_0584: ldloc.s V_59 - IL_0586: ldloc.s V_60 - IL_0588: conv.r8 - IL_0589: div - IL_058a: stloc.s V_56 - IL_058c: leave.s IL_05a4 + IL_0575: nop + IL_0576: ldloc.s V_57 + IL_0578: stloc.s V_59 + IL_057a: ldloc.s V_58 + IL_057c: stloc.s V_60 + IL_057e: ldloc.s V_59 + IL_0580: ldloc.s V_60 + IL_0582: conv.r8 + IL_0583: div + IL_0584: stloc.s V_56 + IL_0586: leave.s IL_059e } // end .try finally { - IL_058e: ldloc.s V_55 - IL_0590: isinst [mscorlib]System.IDisposable - IL_0595: stloc.s V_61 + IL_0588: ldloc.s V_55 + IL_058a: isinst [mscorlib]System.IDisposable + IL_058f: stloc.s V_61 .line 100001,100001 : 0,0 '' - IL_0597: ldloc.s V_61 - IL_0599: brfalse.s IL_05a3 + IL_0591: ldloc.s V_61 + IL_0593: brfalse.s IL_059d .line 100001,100001 : 0,0 '' - IL_059b: ldloc.s V_61 - IL_059d: callvirt instance void [netstandard]System.IDisposable::Dispose() - IL_05a2: endfinally + IL_0595: ldloc.s V_61 + IL_0597: callvirt instance void [netstandard]System.IDisposable::Dispose() + IL_059c: endfinally .line 100001,100001 : 0,0 '' - IL_05a3: endfinally + IL_059d: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_05a4: ldloc.s V_56 - IL_05a6: dup - IL_05a7: stsfld float64 ''.$Linq101Aggregates01::averageNum@100 - IL_05ac: stloc.s averageNum + IL_059e: ldloc.s V_56 + IL_05a0: dup + IL_05a1: stsfld float64 ''.$Linq101Aggregates01::averageNum@100 + IL_05a6: stloc.s averageNum .line 104,104 : 5,10 '' - IL_05ae: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_05b3: stloc.s V_62 - IL_05b5: ldloc.s V_62 - IL_05b7: stloc.s V_63 + IL_05a8: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_05ad: stloc.s V_62 + IL_05af: ldloc.s V_62 + IL_05b1: stloc.s V_63 .line 105,105 : 9,12 '' - IL_05b9: ldloc.s V_62 - IL_05bb: ldloc.s V_62 - IL_05bd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() - IL_05c2: 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_05c7: ldloc.s V_62 - IL_05c9: newobj instance void Linq101Aggregates01/averageLength@105::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_05ce: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_05b3: ldloc.s V_62 + IL_05b5: ldloc.s V_62 + IL_05b7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_words() + IL_05bc: 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_05c1: ldloc.s V_62 + IL_05c3: newobj instance void Linq101Aggregates01/averageLength@105::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_05c8: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_05d3: stloc.s V_64 - IL_05d5: ldsfld class Linq101Aggregates01/'averageLength@107-1' Linq101Aggregates01/'averageLength@107-1'::@_instance - IL_05da: stloc.s V_65 - 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 + IL_05cd: stloc.s V_64 + IL_05cf: ldsfld class Linq101Aggregates01/'averageLength@107-1' Linq101Aggregates01/'averageLength@107-1'::@_instance + IL_05d4: stloc.s V_65 + IL_05d6: ldloc.s V_64 + IL_05d8: 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_05dd: 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 + IL_05df: ldloc.s V_66 + IL_05e1: box class [mscorlib]System.Collections.Generic.IEnumerable`1> + IL_05e6: brtrue.s IL_05f3 .line 100001,100001 : 0,0 '' - IL_05ee: ldstr "source" - IL_05f3: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) - IL_05f8: throw + IL_05e8: ldstr "source" + IL_05ed: newobj instance void [netstandard]System.ArgumentNullException::.ctor(string) + IL_05f2: throw .line 100001,100001 : 0,0 '' - IL_05f9: nop - IL_05fa: ldloc.s V_66 - IL_05fc: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1>::GetEnumerator() - IL_0601: stloc.s V_67 + IL_05f3: nop + IL_05f4: ldloc.s V_66 + IL_05f6: callvirt instance class [netstandard]System.Collections.Generic.IEnumerator`1 class [netstandard]System.Collections.Generic.IEnumerable`1>::GetEnumerator() + IL_05fb: stloc.s V_67 .try { - IL_0603: ldc.r8 0.0 - IL_060c: stloc.s V_69 - IL_060e: ldc.i4.0 - IL_060f: stloc.s V_70 - IL_0611: ldloc.s V_67 - IL_0613: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() - IL_0618: brfalse.s IL_0636 - - IL_061a: ldloc.s V_69 - IL_061c: ldloc.s V_65 - IL_061e: ldloc.s V_67 - IL_0620: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1>::get_Current() - IL_0625: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,float64>::Invoke(!0) + IL_05fd: ldc.r8 0.0 + IL_0606: stloc.s V_69 + IL_0608: ldc.i4.0 + IL_0609: stloc.s V_70 + IL_060b: ldloc.s V_67 + IL_060d: callvirt instance bool [netstandard]System.Collections.IEnumerator::MoveNext() + IL_0612: brfalse.s IL_0630 + + IL_0614: ldloc.s V_69 + IL_0616: ldloc.s V_65 + IL_0618: ldloc.s V_67 + IL_061a: callvirt instance !0 class [netstandard]System.Collections.Generic.IEnumerator`1>::get_Current() + IL_061f: callvirt instance !1 class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,float64>::Invoke(!0) + IL_0624: add + IL_0625: stloc.s V_69 + IL_0627: ldloc.s V_70 + IL_0629: ldc.i4.1 IL_062a: add - IL_062b: stloc.s V_69 - IL_062d: ldloc.s V_70 - IL_062f: ldc.i4.1 - IL_0630: add - IL_0631: stloc.s V_70 + IL_062b: stloc.s V_70 .line 100001,100001 : 0,0 '' - IL_0633: nop - IL_0634: br.s IL_0611 + IL_062d: nop + IL_062e: br.s IL_060b .line 100001,100001 : 0,0 '' - IL_0636: ldloc.s V_70 - IL_0638: brtrue.s IL_0645 + IL_0630: ldloc.s V_70 + IL_0632: brtrue.s IL_063f .line 100001,100001 : 0,0 '' - IL_063a: ldstr "source" - IL_063f: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) - IL_0644: throw + IL_0634: ldstr "source" + IL_0639: newobj instance void [netstandard]System.InvalidOperationException::.ctor(string) + IL_063e: throw .line 100001,100001 : 0,0 '' - IL_0645: nop - IL_0646: ldloc.s V_69 - IL_0648: stloc.s V_71 - IL_064a: ldloc.s V_70 - IL_064c: stloc.s V_72 - IL_064e: ldloc.s V_71 - IL_0650: ldloc.s V_72 - IL_0652: conv.r8 - IL_0653: div - IL_0654: stloc.s V_68 - IL_0656: leave.s IL_066e + IL_063f: nop + IL_0640: ldloc.s V_69 + IL_0642: stloc.s V_71 + IL_0644: ldloc.s V_70 + IL_0646: stloc.s V_72 + IL_0648: ldloc.s V_71 + IL_064a: ldloc.s V_72 + IL_064c: conv.r8 + IL_064d: div + IL_064e: stloc.s V_68 + IL_0650: leave.s IL_0668 } // end .try finally { - IL_0658: ldloc.s V_67 - IL_065a: isinst [mscorlib]System.IDisposable - IL_065f: stloc.s V_73 + IL_0652: ldloc.s V_67 + IL_0654: isinst [mscorlib]System.IDisposable + IL_0659: stloc.s V_73 .line 100001,100001 : 0,0 '' - IL_0661: ldloc.s V_73 - IL_0663: brfalse.s IL_066d + IL_065b: ldloc.s V_73 + IL_065d: brfalse.s IL_0667 .line 100001,100001 : 0,0 '' - IL_0665: ldloc.s V_73 - IL_0667: callvirt instance void [netstandard]System.IDisposable::Dispose() - IL_066c: endfinally + IL_065f: ldloc.s V_73 + IL_0661: callvirt instance void [netstandard]System.IDisposable::Dispose() + IL_0666: endfinally .line 100001,100001 : 0,0 '' - IL_066d: endfinally + IL_0667: endfinally .line 100001,100001 : 0,0 '' } // end handler - IL_066e: ldloc.s V_68 - IL_0670: dup - IL_0671: stsfld float64 ''.$Linq101Aggregates01::averageLength@103 - IL_0676: stloc.s averageLength - .line 111,117 : 1,21 '' - IL_0678: nop + IL_0668: ldloc.s V_68 + IL_066a: dup + IL_066b: stsfld float64 ''.$Linq101Aggregates01::averageLength@103 + IL_0670: stloc.s averageLength .line 112,112 : 5,10 '' - IL_0679: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_067e: stloc.s V_75 - IL_0680: ldloc.s V_75 - IL_0682: ldloc.s V_75 - IL_0684: ldloc.s V_75 + IL_0672: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0677: stloc.s V_75 + IL_0679: ldloc.s V_75 + IL_067b: ldloc.s V_75 + IL_067d: ldloc.s V_75 .line 113,113 : 9,12 '' - IL_0686: ldloc.s V_75 - IL_0688: ldloc.s V_75 - IL_068a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() - IL_068f: 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_0694: ldloc.s V_75 - IL_0696: newobj instance void Linq101Aggregates01/'Pipe #7 input at line 112@113'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_069b: 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_067f: ldloc.s V_75 + IL_0681: ldloc.s V_75 + IL_0683: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Aggregates01::get_products() + IL_0688: 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_068d: ldloc.s V_75 + IL_068f: newobj instance void Linq101Aggregates01/'Pipe #7 input at line 112@113'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0694: 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_06a0: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@114-1' Linq101Aggregates01/'Pipe #7 input at line 112@114-1'::@_instance - IL_06a5: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@114-2' Linq101Aggregates01/'Pipe #7 input at line 112@114-2'::@_instance - IL_06aa: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0699: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@114-1' Linq101Aggregates01/'Pipe #7 input at line 112@114-1'::@_instance + IL_069e: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@114-2' Linq101Aggregates01/'Pipe #7 input at line 112@114-2'::@_instance + IL_06a3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_06af: ldloc.s V_75 - IL_06b1: newobj instance void Linq101Aggregates01/'Pipe #7 input at line 112@114-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_06b6: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_06a8: ldloc.s V_75 + IL_06aa: newobj instance void Linq101Aggregates01/'Pipe #7 input at line 112@114-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_06af: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,valuetype [mscorlib]System.Decimal>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_06bb: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@116-4' Linq101Aggregates01/'Pipe #7 input at line 112@116-4'::@_instance - IL_06c0: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_06b4: ldsfld class Linq101Aggregates01/'Pipe #7 input at line 112@116-4' Linq101Aggregates01/'Pipe #7 input at line 112@116-4'::@_instance + IL_06b9: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,valuetype [mscorlib]System.Decimal>,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_06c5: 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_06ca: stloc.s 'Pipe #7 input at line 112' + IL_06be: 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_06c3: stloc.s 'Pipe #7 input at line 112' .line 117,117 : 10,21 '' - IL_06cc: ldloc.s 'Pipe #7 input at line 112' - IL_06ce: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_06d3: dup - IL_06d4: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories6@111 - IL_06d9: stloc.s categories6 - IL_06db: ret + IL_06c5: ldloc.s 'Pipe #7 input at line 112' + IL_06c7: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_06cc: dup + IL_06cd: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Aggregates01::categories6@111 + IL_06d2: stloc.s categories6 + IL_06d4: ret } // end of method $Linq101Aggregates01::main@ } // end of class ''.$Linq101Aggregates01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl index e3f74fbc720..465ac26c138 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Grouping01.il.bsl @@ -50,13 +50,13 @@ // Offset: 0x00000408 Length: 0x00000129 } .module Linq101Grouping01.exe -// MVID: {61F2D6A6-FB79-E5BF-A745-0383A6D6F261} +// MVID: {61FD32BA-FB79-E5BF-A745-0383BA32FD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06CA0000 +// Image base: 0x06EB0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1434,7 +1434,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 648 (0x288) + // Code size 644 (0x284) .maxstack 13 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 digits, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers, @@ -1523,177 +1523,169 @@ IL_00b2: dup IL_00b3: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::numbers@10 IL_00b8: stloc.1 - .line 12,17 : 1,21 '' - IL_00b9: nop .line 13,13 : 5,10 '' - IL_00ba: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00bf: stloc.s V_10 - IL_00c1: ldloc.s V_10 - IL_00c3: ldloc.s V_10 - IL_00c5: ldloc.s V_10 + IL_00b9: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00be: stloc.s V_10 + IL_00c0: ldloc.s V_10 + IL_00c2: ldloc.s V_10 + IL_00c4: ldloc.s V_10 .line 14,14 : 9,12 '' - IL_00c7: ldloc.s V_10 - IL_00c9: ldloc.s V_10 - IL_00cb: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Grouping01::get_numbers() - IL_00d0: 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_00d5: ldloc.s V_10 - IL_00d7: newobj instance void Linq101Grouping01/'Pipe #1 input at line 13@14'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_00dc: 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_00c6: ldloc.s V_10 + IL_00c8: ldloc.s V_10 + IL_00ca: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Grouping01::get_numbers() + IL_00cf: 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_00d4: ldloc.s V_10 + IL_00d6: newobj instance void Linq101Grouping01/'Pipe #1 input at line 13@14'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_00db: 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_00e1: ldsfld class Linq101Grouping01/'Pipe #1 input at line 13@15-1' Linq101Grouping01/'Pipe #1 input at line 13@15-1'::@_instance - IL_00e6: ldsfld class Linq101Grouping01/'Pipe #1 input at line 13@15-2' Linq101Grouping01/'Pipe #1 input at line 13@15-2'::@_instance - IL_00eb: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00e0: ldsfld class Linq101Grouping01/'Pipe #1 input at line 13@15-1' Linq101Grouping01/'Pipe #1 input at line 13@15-1'::@_instance + IL_00e5: ldsfld class Linq101Grouping01/'Pipe #1 input at line 13@15-2' Linq101Grouping01/'Pipe #1 input at line 13@15-2'::@_instance + IL_00ea: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_00f0: ldloc.s V_10 - IL_00f2: newobj instance void Linq101Grouping01/'Pipe #1 input at line 13@15-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_00f7: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00ef: ldloc.s V_10 + IL_00f1: newobj instance void Linq101Grouping01/'Pipe #1 input at line 13@15-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_00f6: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_00fc: ldsfld class Linq101Grouping01/'Pipe #1 input at line 13@16-4' Linq101Grouping01/'Pipe #1 input at line 13@16-4'::@_instance - IL_0101: 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_00fb: ldsfld class Linq101Grouping01/'Pipe #1 input at line 13@16-4' Linq101Grouping01/'Pipe #1 input at line 13@16-4'::@_instance + IL_0100: 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_0106: 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_010b: stloc.s 'Pipe #1 input at line 13' + IL_0105: 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_010a: stloc.s 'Pipe #1 input at line 13' .line 17,17 : 10,21 '' - IL_010d: ldloc.s 'Pipe #1 input at line 13' - IL_010f: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0114: dup - IL_0115: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Grouping01::numberGroups@12 - IL_011a: stloc.2 + IL_010c: ldloc.s 'Pipe #1 input at line 13' + IL_010e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0113: dup + IL_0114: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Grouping01::numberGroups@12 + IL_0119: stloc.2 .line 20,20 : 1,80 '' - IL_011b: ldstr "blueberry" - IL_0120: ldstr "chimpanzee" - IL_0125: ldstr "abacus" - IL_012a: ldstr "banana" - IL_012f: ldstr "apple" - IL_0134: ldstr "cheese" - IL_0139: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_013e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_011a: ldstr "blueberry" + IL_011f: ldstr "chimpanzee" + IL_0124: ldstr "abacus" + IL_0129: ldstr "banana" + IL_012e: ldstr "apple" + IL_0133: ldstr "cheese" + IL_0138: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_013d: 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_0143: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0142: 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_0148: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0147: 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_014d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_014c: 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_0152: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0151: 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_0157: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0156: 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_015c: dup - IL_015d: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::words@20 - IL_0162: stloc.3 - .line 22,27 : 1,21 '' - IL_0163: nop + IL_015b: dup + IL_015c: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::words@20 + IL_0161: stloc.3 .line 23,23 : 5,10 '' - IL_0164: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0169: stloc.s V_12 + IL_0162: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0167: stloc.s V_12 + IL_0169: ldloc.s V_12 IL_016b: ldloc.s V_12 IL_016d: ldloc.s V_12 - IL_016f: ldloc.s V_12 .line 24,24 : 9,12 '' + IL_016f: ldloc.s V_12 IL_0171: ldloc.s V_12 - IL_0173: ldloc.s V_12 - IL_0175: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Grouping01::get_words() - IL_017a: 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_017f: ldloc.s V_12 - IL_0181: newobj instance void Linq101Grouping01/'Pipe #2 input at line 23@24'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0186: 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_0173: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Grouping01::get_words() + IL_0178: 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_017d: ldloc.s V_12 + IL_017f: newobj instance void Linq101Grouping01/'Pipe #2 input at line 23@24'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0184: 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_018b: ldsfld class Linq101Grouping01/'Pipe #2 input at line 23@25-1' Linq101Grouping01/'Pipe #2 input at line 23@25-1'::@_instance - IL_0190: ldsfld class Linq101Grouping01/'Pipe #2 input at line 23@25-2' Linq101Grouping01/'Pipe #2 input at line 23@25-2'::@_instance - IL_0195: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0189: ldsfld class Linq101Grouping01/'Pipe #2 input at line 23@25-1' Linq101Grouping01/'Pipe #2 input at line 23@25-1'::@_instance + IL_018e: ldsfld class Linq101Grouping01/'Pipe #2 input at line 23@25-2' Linq101Grouping01/'Pipe #2 input at line 23@25-2'::@_instance + IL_0193: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_019a: ldloc.s V_12 - IL_019c: newobj instance void Linq101Grouping01/'Pipe #2 input at line 23@25-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_01a1: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0198: ldloc.s V_12 + IL_019a: newobj instance void Linq101Grouping01/'Pipe #2 input at line 23@25-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_019f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_01a6: ldsfld class Linq101Grouping01/'Pipe #2 input at line 23@26-4' Linq101Grouping01/'Pipe #2 input at line 23@26-4'::@_instance - IL_01ab: 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_01a4: ldsfld class Linq101Grouping01/'Pipe #2 input at line 23@26-4' Linq101Grouping01/'Pipe #2 input at line 23@26-4'::@_instance + IL_01a9: 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_01b0: 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_01b5: stloc.s 'Pipe #2 input at line 23' + IL_01ae: 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_01b3: stloc.s 'Pipe #2 input at line 23' .line 27,27 : 10,21 '' - IL_01b7: ldloc.s 'Pipe #2 input at line 23' - IL_01b9: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_01be: dup - IL_01bf: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Grouping01::wordGroups@22 - IL_01c4: stloc.s wordGroups + IL_01b5: ldloc.s 'Pipe #2 input at line 23' + IL_01b7: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_01bc: dup + IL_01bd: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Grouping01::wordGroups@22 + IL_01c2: stloc.s wordGroups .line 30,30 : 1,32 '' - IL_01c6: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() - IL_01cb: dup - IL_01cc: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::products@30 - IL_01d1: stloc.s products - .line 32,37 : 1,21 '' - IL_01d3: nop + IL_01c4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() + IL_01c9: dup + IL_01ca: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::products@30 + IL_01cf: stloc.s products .line 33,33 : 5,10 '' - IL_01d4: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_01d9: stloc.s V_14 - IL_01db: ldloc.s V_14 - IL_01dd: ldloc.s V_14 - IL_01df: ldloc.s V_14 + IL_01d1: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_01d6: stloc.s V_14 + IL_01d8: ldloc.s V_14 + IL_01da: ldloc.s V_14 + IL_01dc: ldloc.s V_14 .line 34,34 : 9,12 '' - IL_01e1: ldloc.s V_14 - IL_01e3: ldloc.s V_14 - IL_01e5: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Grouping01::get_products() - IL_01ea: 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_01ef: ldloc.s V_14 - IL_01f1: newobj instance void Linq101Grouping01/'Pipe #3 input at line 33@34'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_01f6: 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_01de: ldloc.s V_14 + IL_01e0: ldloc.s V_14 + IL_01e2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Grouping01::get_products() + IL_01e7: 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_01ec: ldloc.s V_14 + IL_01ee: newobj instance void Linq101Grouping01/'Pipe #3 input at line 33@34'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_01f3: 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_01fb: ldsfld class Linq101Grouping01/'Pipe #3 input at line 33@35-1' Linq101Grouping01/'Pipe #3 input at line 33@35-1'::@_instance - IL_0200: ldsfld class Linq101Grouping01/'Pipe #3 input at line 33@35-2' Linq101Grouping01/'Pipe #3 input at line 33@35-2'::@_instance - IL_0205: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01f8: ldsfld class Linq101Grouping01/'Pipe #3 input at line 33@35-1' Linq101Grouping01/'Pipe #3 input at line 33@35-1'::@_instance + IL_01fd: ldsfld class Linq101Grouping01/'Pipe #3 input at line 33@35-2' Linq101Grouping01/'Pipe #3 input at line 33@35-2'::@_instance + IL_0202: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_020a: ldloc.s V_14 - IL_020c: newobj instance void Linq101Grouping01/'Pipe #3 input at line 33@35-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0211: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0207: ldloc.s V_14 + IL_0209: newobj instance void Linq101Grouping01/'Pipe #3 input at line 33@35-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_020e: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0216: ldsfld class Linq101Grouping01/'Pipe #3 input at line 33@36-4' Linq101Grouping01/'Pipe #3 input at line 33@36-4'::@_instance - IL_021b: 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_0213: ldsfld class Linq101Grouping01/'Pipe #3 input at line 33@36-4' Linq101Grouping01/'Pipe #3 input at line 33@36-4'::@_instance + IL_0218: 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_0220: 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_0225: stloc.s 'Pipe #3 input at line 33' + IL_021d: 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_0222: stloc.s 'Pipe #3 input at line 33' .line 37,37 : 10,21 '' - IL_0227: ldloc.s 'Pipe #3 input at line 33' - IL_0229: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_022e: dup - IL_022f: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Grouping01::orderGroups@32 - IL_0234: stloc.s orderGroups + IL_0224: ldloc.s 'Pipe #3 input at line 33' + IL_0226: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_022b: dup + IL_022c: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Grouping01::orderGroups@32 + IL_0231: stloc.s orderGroups .line 40,40 : 1,34 '' - IL_0236: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() - IL_023b: dup - IL_023c: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::customers@40 - IL_0241: stloc.s customers - .line 42,58 : 1,21 '' - IL_0243: nop + IL_0233: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() + IL_0238: dup + IL_0239: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Grouping01::customers@40 + IL_023e: stloc.s customers .line 43,43 : 5,10 '' - IL_0244: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0249: stloc.s V_16 - IL_024b: ldloc.s V_16 + IL_0240: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0245: stloc.s V_16 + IL_0247: ldloc.s V_16 .line 44,44 : 9,12 '' - IL_024d: ldloc.s V_16 - IL_024f: ldloc.s V_16 - IL_0251: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Grouping01::get_customers() - IL_0256: 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_025b: ldloc.s V_16 - IL_025d: newobj instance void Linq101Grouping01/'Pipe #4 input at line 43@44'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0262: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For[]>>>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0249: ldloc.s V_16 + IL_024b: ldloc.s V_16 + IL_024d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Grouping01::get_customers() + IL_0252: 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_0257: ldloc.s V_16 + IL_0259: newobj instance void Linq101Grouping01/'Pipe #4 input at line 43@44'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_025e: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For[]>>>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0267: ldsfld class Linq101Grouping01/'Pipe #4 input at line 43@57-1' Linq101Grouping01/'Pipe #4 input at line 43@57-1'::@_instance - IL_026c: 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_0263: ldsfld class Linq101Grouping01/'Pipe #4 input at line 43@57-1' Linq101Grouping01/'Pipe #4 input at line 43@57-1'::@_instance + IL_0268: 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_0271: 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_0276: stloc.s 'Pipe #4 input at line 43' + IL_026d: 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_0272: stloc.s 'Pipe #4 input at line 43' .line 58,58 : 10,21 '' - IL_0278: ldloc.s 'Pipe #4 input at line 43' - IL_027a: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray[]>[]>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_027f: dup - IL_0280: stsfld class [mscorlib]System.Tuple`2[]>[]>[] ''.$Linq101Grouping01::customerOrderGroups@42 - IL_0285: stloc.s customerOrderGroups - IL_0287: ret + IL_0274: ldloc.s 'Pipe #4 input at line 43' + IL_0276: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray[]>[]>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_027b: dup + IL_027c: stsfld class [mscorlib]System.Tuple`2[]>[]>[] ''.$Linq101Grouping01::customerOrderGroups@42 + IL_0281: stloc.s customerOrderGroups + IL_0283: ret } // end of method $Linq101Grouping01::main@ } // end of class ''.$Linq101Grouping01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Joins01.il.bsl index 22b98a75c80..6ea0b8858b0 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: {61F2D6A6-151B-685E-A745-0383A6D6F261} +// MVID: {61FD32BA-151B-685E-A745-0383BA32FD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05610000 +// Image base: 0x052C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1242,7 +1242,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 481 (0x1e1) + // Code size 477 (0x1dd) .maxstack 10 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 categories, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 products, @@ -1283,155 +1283,147 @@ IL_0043: dup IL_0044: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Joins01::products@9 IL_0049: stloc.1 - .line 11,16 : 1,21 '' - IL_004a: nop .line 12,12 : 5,10 '' - IL_004b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0050: stloc.s V_7 - IL_0052: ldloc.s V_7 - IL_0054: ldloc.s V_7 - IL_0056: ldloc.s V_7 - IL_0058: ldloc.s V_7 - IL_005a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_categories() - IL_005f: 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_0064: ldloc.s V_7 - IL_0066: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_products() - IL_006b: 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_0070: ldsfld class Linq101Joins01/'Pipe #1 input at line 12@14' Linq101Joins01/'Pipe #1 input at line 12@14'::@_instance - IL_0075: ldsfld class Linq101Joins01/'Pipe #1 input at line 12@14-1' Linq101Joins01/'Pipe #1 input at line 12@14-1'::@_instance - IL_007a: ldsfld class Linq101Joins01/'Pipe #1 input at line 12@14-2' Linq101Joins01/'Pipe #1 input at line 12@14-2'::@_instance - IL_007f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Join>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_004a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_004f: stloc.s V_7 + IL_0051: ldloc.s V_7 + IL_0053: ldloc.s V_7 + IL_0055: ldloc.s V_7 + IL_0057: ldloc.s V_7 + IL_0059: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_categories() + IL_005e: 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_0063: ldloc.s V_7 + IL_0065: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_products() + IL_006a: 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_006f: ldsfld class Linq101Joins01/'Pipe #1 input at line 12@14' Linq101Joins01/'Pipe #1 input at line 12@14'::@_instance + IL_0074: ldsfld class Linq101Joins01/'Pipe #1 input at line 12@14-1' Linq101Joins01/'Pipe #1 input at line 12@14-1'::@_instance + IL_0079: ldsfld class Linq101Joins01/'Pipe #1 input at line 12@14-2' Linq101Joins01/'Pipe #1 input at line 12@14-2'::@_instance + IL_007e: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Join>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0084: ldloc.s V_7 - IL_0086: newobj instance void Linq101Joins01/'Pipe #1 input at line 12@14-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_008b: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0083: ldloc.s V_7 + IL_0085: newobj instance void Linq101Joins01/'Pipe #1 input at line 12@14-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_008a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0090: ldsfld class Linq101Joins01/'Pipe #1 input at line 12@15-4' Linq101Joins01/'Pipe #1 input at line 12@15-4'::@_instance - IL_0095: 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_008f: ldsfld class Linq101Joins01/'Pipe #1 input at line 12@15-4' Linq101Joins01/'Pipe #1 input at line 12@15-4'::@_instance + IL_0094: 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_009a: 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_009f: stloc.s 'Pipe #1 input at line 12' + IL_0099: 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_009e: stloc.s 'Pipe #1 input at line 12' .line 16,16 : 10,21 '' - IL_00a1: ldloc.s 'Pipe #1 input at line 12' - IL_00a3: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00a8: dup - IL_00a9: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Joins01::q@11 - IL_00ae: stloc.2 - .line 19,24 : 1,21 '' - IL_00af: nop + IL_00a0: ldloc.s 'Pipe #1 input at line 12' + IL_00a2: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00a7: dup + IL_00a8: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Joins01::q@11 + IL_00ad: stloc.2 .line 20,20 : 5,10 '' - IL_00b0: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00b5: stloc.s V_9 + IL_00ae: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00b3: stloc.s V_9 + IL_00b5: ldloc.s V_9 IL_00b7: ldloc.s V_9 IL_00b9: ldloc.s V_9 IL_00bb: ldloc.s V_9 - IL_00bd: ldloc.s V_9 - IL_00bf: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_categories() - IL_00c4: 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_00c9: ldloc.s V_9 - IL_00cb: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_products() - IL_00d0: 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_00d5: ldsfld class Linq101Joins01/'Pipe #2 input at line 20@22' Linq101Joins01/'Pipe #2 input at line 20@22'::@_instance - IL_00da: ldsfld class Linq101Joins01/'Pipe #2 input at line 20@22-1' Linq101Joins01/'Pipe #2 input at line 20@22-1'::@_instance - IL_00df: ldsfld class Linq101Joins01/'Pipe #2 input at line 20@22-2' Linq101Joins01/'Pipe #2 input at line 20@22-2'::@_instance - IL_00e4: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupJoin>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00bd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_categories() + IL_00c2: 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_00c7: ldloc.s V_9 + IL_00c9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_products() + IL_00ce: 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_00d3: ldsfld class Linq101Joins01/'Pipe #2 input at line 20@22' Linq101Joins01/'Pipe #2 input at line 20@22'::@_instance + IL_00d8: ldsfld class Linq101Joins01/'Pipe #2 input at line 20@22-1' Linq101Joins01/'Pipe #2 input at line 20@22-1'::@_instance + IL_00dd: ldsfld class Linq101Joins01/'Pipe #2 input at line 20@22-2' Linq101Joins01/'Pipe #2 input at line 20@22-2'::@_instance + IL_00e2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupJoin>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,!!4>>) - IL_00e9: ldloc.s V_9 - IL_00eb: newobj instance void Linq101Joins01/'Pipe #2 input at line 20@22-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_00f0: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00e7: ldloc.s V_9 + IL_00e9: newobj instance void Linq101Joins01/'Pipe #2 input at line 20@22-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_00ee: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_00f5: ldsfld class Linq101Joins01/'Pipe #2 input at line 20@23-4' Linq101Joins01/'Pipe #2 input at line 20@23-4'::@_instance - IL_00fa: 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_00f3: ldsfld class Linq101Joins01/'Pipe #2 input at line 20@23-4' Linq101Joins01/'Pipe #2 input at line 20@23-4'::@_instance + IL_00f8: 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_00ff: 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_0104: stloc.s 'Pipe #2 input at line 20' + IL_00fd: 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_0102: stloc.s 'Pipe #2 input at line 20' .line 24,24 : 10,21 '' - IL_0106: ldloc.s 'Pipe #2 input at line 20' - IL_0108: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_010d: dup - IL_010e: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Joins01::q2@19 - IL_0113: stloc.3 - .line 27,33 : 1,21 '' - IL_0114: nop + IL_0104: ldloc.s 'Pipe #2 input at line 20' + IL_0106: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_010b: dup + IL_010c: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Joins01::q2@19 + IL_0111: stloc.3 .line 28,28 : 5,10 '' - IL_0115: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_011a: stloc.s V_11 - IL_011c: ldloc.s V_11 - IL_011e: ldloc.s V_11 - IL_0120: ldloc.s V_11 - IL_0122: ldloc.s V_11 - IL_0124: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_categories() - IL_0129: 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_012e: ldloc.s V_11 - IL_0130: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_products() - IL_0135: 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_013a: ldsfld class Linq101Joins01/'Pipe #3 input at line 28@30' Linq101Joins01/'Pipe #3 input at line 28@30'::@_instance - IL_013f: ldsfld class Linq101Joins01/'Pipe #3 input at line 28@30-1' Linq101Joins01/'Pipe #3 input at line 28@30-1'::@_instance - IL_0144: ldsfld class Linq101Joins01/'Pipe #3 input at line 28@30-2' Linq101Joins01/'Pipe #3 input at line 28@30-2'::@_instance - IL_0149: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupJoin>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0112: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0117: stloc.s V_11 + IL_0119: ldloc.s V_11 + IL_011b: ldloc.s V_11 + IL_011d: ldloc.s V_11 + IL_011f: ldloc.s V_11 + IL_0121: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_categories() + IL_0126: 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_012b: ldloc.s V_11 + IL_012d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_products() + IL_0132: 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_0137: ldsfld class Linq101Joins01/'Pipe #3 input at line 28@30' Linq101Joins01/'Pipe #3 input at line 28@30'::@_instance + IL_013c: ldsfld class Linq101Joins01/'Pipe #3 input at line 28@30-1' Linq101Joins01/'Pipe #3 input at line 28@30-1'::@_instance + IL_0141: ldsfld class Linq101Joins01/'Pipe #3 input at line 28@30-2' Linq101Joins01/'Pipe #3 input at line 28@30-2'::@_instance + IL_0146: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupJoin>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,!!4>>) - IL_014e: ldloc.s V_11 - IL_0150: newobj instance void Linq101Joins01/'Pipe #3 input at line 28@30-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0155: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,class [Utils]Utils/Product>,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_014b: ldloc.s V_11 + IL_014d: newobj instance void Linq101Joins01/'Pipe #3 input at line 28@30-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0152: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`3,class [Utils]Utils/Product>,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_015a: ldsfld class Linq101Joins01/'Pipe #3 input at line 28@32-5' Linq101Joins01/'Pipe #3 input at line 28@32-5'::@_instance - IL_015f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [Utils]Utils/Product>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0157: ldsfld class Linq101Joins01/'Pipe #3 input at line 28@32-5' Linq101Joins01/'Pipe #3 input at line 28@32-5'::@_instance + IL_015c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [Utils]Utils/Product>,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_0164: 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_0169: stloc.s 'Pipe #3 input at line 28' + IL_0161: 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_0166: stloc.s 'Pipe #3 input at line 28' .line 33,33 : 10,21 '' - IL_016b: ldloc.s 'Pipe #3 input at line 28' - IL_016d: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0172: dup - IL_0173: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Joins01::q3@27 - IL_0178: stloc.s q3 - .line 36,43 : 1,21 '' - IL_017a: nop + IL_0168: ldloc.s 'Pipe #3 input at line 28' + IL_016a: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_016f: dup + IL_0170: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Joins01::q3@27 + IL_0175: stloc.s q3 .line 37,37 : 5,10 '' - IL_017b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0180: stloc.s V_13 + IL_0177: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_017c: stloc.s V_13 + IL_017e: ldloc.s V_13 + IL_0180: ldloc.s V_13 IL_0182: ldloc.s V_13 IL_0184: ldloc.s V_13 - IL_0186: ldloc.s V_13 - IL_0188: ldloc.s V_13 - IL_018a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_categories() - IL_018f: 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_0194: ldloc.s V_13 - IL_0196: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_products() - IL_019b: 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_01a0: ldsfld class Linq101Joins01/'Pipe #4 input at line 37@39' Linq101Joins01/'Pipe #4 input at line 37@39'::@_instance - IL_01a5: ldsfld class Linq101Joins01/'Pipe #4 input at line 37@39-1' Linq101Joins01/'Pipe #4 input at line 37@39-1'::@_instance - IL_01aa: ldsfld class Linq101Joins01/'Pipe #4 input at line 37@39-2' Linq101Joins01/'Pipe #4 input at line 37@39-2'::@_instance - IL_01af: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupJoin>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0186: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_categories() + IL_018b: 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_0190: ldloc.s V_13 + IL_0192: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Joins01::get_products() + IL_0197: 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_019c: ldsfld class Linq101Joins01/'Pipe #4 input at line 37@39' Linq101Joins01/'Pipe #4 input at line 37@39'::@_instance + IL_01a1: ldsfld class Linq101Joins01/'Pipe #4 input at line 37@39-1' Linq101Joins01/'Pipe #4 input at line 37@39-1'::@_instance + IL_01a6: ldsfld class Linq101Joins01/'Pipe #4 input at line 37@39-2' Linq101Joins01/'Pipe #4 input at line 37@39-2'::@_instance + IL_01ab: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupJoin>>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2,!!4>>) - IL_01b4: ldloc.s V_13 - IL_01b6: newobj instance void Linq101Joins01/'Pipe #4 input at line 37@39-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_01bb: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`4,class [Utils]Utils/Product,string>,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01b0: ldloc.s V_13 + IL_01b2: newobj instance void Linq101Joins01/'Pipe #4 input at line 37@39-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_01b7: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`4,class [Utils]Utils/Product,string>,class [mscorlib]System.Collections.IEnumerable>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_01c0: ldsfld class Linq101Joins01/'Pipe #4 input at line 37@42-5' Linq101Joins01/'Pipe #4 input at line 37@42-5'::@_instance - IL_01c5: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [Utils]Utils/Product,string>,class [mscorlib]System.Collections.IEnumerable,class [mscorlib]System.Tuple`2>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01bc: ldsfld class Linq101Joins01/'Pipe #4 input at line 37@42-5' Linq101Joins01/'Pipe #4 input at line 37@42-5'::@_instance + IL_01c1: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select,class [Utils]Utils/Product,string>,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_01ca: 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_01cf: stloc.s 'Pipe #4 input at line 37' + IL_01c6: 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_01cb: stloc.s 'Pipe #4 input at line 37' .line 43,43 : 10,21 '' - IL_01d1: ldloc.s 'Pipe #4 input at line 37' - IL_01d3: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_01d8: dup - IL_01d9: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Joins01::q4@36 - IL_01de: stloc.s q4 - IL_01e0: ret + IL_01cd: ldloc.s 'Pipe #4 input at line 37' + IL_01cf: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_01d4: dup + IL_01d5: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Joins01::q4@36 + IL_01da: stloc.s q4 + IL_01dc: ret } // end of method $Linq101Joins01::main@ } // end of class ''.$Linq101Joins01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Ordering01.il.bsl index bf6b54ffc62..55a7e663c2d 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: {61F2D6A6-649A-6956-A745-0383A6D6F261} +// MVID: {61FD32BA-649A-6956-A745-0383BA32FD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05060000 +// Image base: 0x051E0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1876,7 +1876,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 570 (0x23a) + // Code size 564 (0x234) .maxstack 13 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 words, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 sortedWords, @@ -1913,211 +1913,199 @@ IL_0023: dup IL_0024: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::words@8 IL_0029: stloc.0 - .line 9,13 : 1,20 '' - IL_002a: nop .line 10,10 : 5,10 '' - IL_002b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0030: stloc.s V_10 - IL_0032: ldloc.s V_10 - IL_0034: ldnull - IL_0035: ldc.i4.0 - IL_0036: ldnull - IL_0037: newobj instance void Linq101Ordering01/'Pipe #1 input at line 10@11'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_002a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_002f: stloc.s V_10 + IL_0031: ldloc.s V_10 + IL_0033: ldnull + IL_0034: ldc.i4.0 + IL_0035: ldnull + IL_0036: newobj instance void Linq101Ordering01/'Pipe #1 input at line 10@11'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_003c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0041: ldsfld class Linq101Ordering01/'Pipe #1 input at line 10@12-1' Linq101Ordering01/'Pipe #1 input at line 10@12-1'::@_instance - IL_0046: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_003b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0040: ldsfld class Linq101Ordering01/'Pipe #1 input at line 10@12-1' Linq101Ordering01/'Pipe #1 input at line 10@12-1'::@_instance + IL_0045: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_004b: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0050: stloc.s 'Pipe #1 input at line 10' + IL_004a: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_004f: stloc.s 'Pipe #1 input at line 10' .line 13,13 : 10,20 '' - IL_0052: ldloc.s 'Pipe #1 input at line 10' - IL_0054: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0059: dup - IL_005a: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::sortedWords@9 - IL_005f: stloc.1 - .line 16,20 : 1,20 '' - IL_0060: nop + IL_0051: ldloc.s 'Pipe #1 input at line 10' + IL_0053: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0058: dup + IL_0059: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::sortedWords@9 + IL_005e: stloc.1 .line 17,17 : 5,10 '' - IL_0061: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0066: stloc.s V_12 - IL_0068: ldloc.s V_12 + IL_005f: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0064: stloc.s V_12 + IL_0066: ldloc.s V_12 + IL_0068: ldnull + IL_0069: ldc.i4.0 IL_006a: ldnull - IL_006b: ldc.i4.0 - IL_006c: ldnull - IL_006d: newobj instance void Linq101Ordering01/'Pipe #2 input at line 17@18'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_006b: newobj instance void Linq101Ordering01/'Pipe #2 input at line 17@18'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0072: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0077: ldsfld class Linq101Ordering01/'Pipe #2 input at line 17@19-1' Linq101Ordering01/'Pipe #2 input at line 17@19-1'::@_instance - IL_007c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0070: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0075: ldsfld class Linq101Ordering01/'Pipe #2 input at line 17@19-1' Linq101Ordering01/'Pipe #2 input at line 17@19-1'::@_instance + IL_007a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0081: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0086: stloc.s 'Pipe #2 input at line 17' + IL_007f: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0084: stloc.s 'Pipe #2 input at line 17' .line 20,20 : 10,20 '' - IL_0088: ldloc.s 'Pipe #2 input at line 17' - IL_008a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_008f: dup - IL_0090: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::sortedWords2@16 - IL_0095: stloc.2 + IL_0086: ldloc.s 'Pipe #2 input at line 17' + 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: dup + IL_008e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::sortedWords2@16 + IL_0093: stloc.2 .line 23,23 : 1,32 '' - IL_0096: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() - IL_009b: dup - IL_009c: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::products@23 - IL_00a1: stloc.3 - .line 24,29 : 1,21 '' - IL_00a2: nop + IL_0094: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() + IL_0099: dup + IL_009a: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::products@23 + IL_009f: stloc.3 .line 25,25 : 5,10 '' - IL_00a3: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00a8: stloc.s V_14 - IL_00aa: ldloc.s V_14 - IL_00ac: ldloc.s V_14 + IL_00a0: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00a5: stloc.s V_14 + IL_00a7: ldloc.s V_14 + IL_00a9: ldloc.s V_14 .line 26,26 : 9,12 '' - IL_00ae: ldloc.s V_14 - IL_00b0: ldloc.s V_14 - IL_00b2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_products() - IL_00b7: 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_00bc: ldloc.s V_14 - IL_00be: newobj instance void Linq101Ordering01/'Pipe #3 input at line 25@26'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_00c3: 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_00ab: ldloc.s V_14 + IL_00ad: ldloc.s V_14 + IL_00af: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_products() + IL_00b4: 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_00b9: ldloc.s V_14 + IL_00bb: newobj instance void Linq101Ordering01/'Pipe #3 input at line 25@26'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_00c0: 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_00c8: ldsfld class Linq101Ordering01/'Pipe #3 input at line 25@27-1' Linq101Ordering01/'Pipe #3 input at line 25@27-1'::@_instance - IL_00cd: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00c5: ldsfld class Linq101Ordering01/'Pipe #3 input at line 25@27-1' Linq101Ordering01/'Pipe #3 input at line 25@27-1'::@_instance + IL_00ca: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_00d2: ldsfld class Linq101Ordering01/'Pipe #3 input at line 25@28-2' Linq101Ordering01/'Pipe #3 input at line 25@28-2'::@_instance - IL_00d7: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00cf: ldsfld class Linq101Ordering01/'Pipe #3 input at line 25@28-2' Linq101Ordering01/'Pipe #3 input at line 25@28-2'::@_instance + IL_00d4: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_00dc: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_00e1: stloc.s 'Pipe #3 input at line 25' + IL_00d9: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_00de: stloc.s 'Pipe #3 input at line 25' .line 29,29 : 10,21 '' - IL_00e3: ldloc.s 'Pipe #3 input at line 25' - IL_00e5: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00ea: dup - IL_00eb: stsfld class [Utils]Utils/Product[] ''.$Linq101Ordering01::sortedProducts@24 - IL_00f0: stloc.s sortedProducts - .line 42,46 : 1,21 '' - IL_00f2: nop + IL_00e0: ldloc.s 'Pipe #3 input at line 25' + IL_00e2: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00e7: dup + IL_00e8: stsfld class [Utils]Utils/Product[] ''.$Linq101Ordering01::sortedProducts@24 + IL_00ed: stloc.s sortedProducts .line 43,43 : 5,10 '' - IL_00f3: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00f8: stloc.s V_16 - IL_00fa: ldloc.s V_16 - IL_00fc: ldnull - IL_00fd: ldc.i4.0 - IL_00fe: ldnull - IL_00ff: newobj instance void Linq101Ordering01/'Pipe #4 input at line 43@44'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_00ef: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00f4: stloc.s V_16 + IL_00f6: ldloc.s V_16 + IL_00f8: ldnull + IL_00f9: ldc.i4.0 + IL_00fa: ldnull + IL_00fb: newobj instance void Linq101Ordering01/'Pipe #4 input at line 43@44'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [Utils]Utils/Product) - IL_0104: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0109: ldsfld class Linq101Ordering01/'Pipe #4 input at line 43@45-1' Linq101Ordering01/'Pipe #4 input at line 43@45-1'::@_instance - IL_010e: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortByDescending(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0100: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0105: ldsfld class Linq101Ordering01/'Pipe #4 input at line 43@45-1' Linq101Ordering01/'Pipe #4 input at line 43@45-1'::@_instance + IL_010a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortByDescending(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0113: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0118: stloc.s 'Pipe #4 input at line 43' + IL_010f: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0114: stloc.s 'Pipe #4 input at line 43' .line 46,46 : 10,21 '' - IL_011a: ldloc.s 'Pipe #4 input at line 43' - IL_011c: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0121: dup - IL_0122: stsfld class [Utils]Utils/Product[] ''.$Linq101Ordering01::sortedProducts2@42 - IL_0127: stloc.s sortedProducts2 + IL_0116: ldloc.s 'Pipe #4 input at line 43' + IL_0118: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_011d: dup + IL_011e: stsfld class [Utils]Utils/Product[] ''.$Linq101Ordering01::sortedProducts2@42 + IL_0123: stloc.s sortedProducts2 .line 49,49 : 1,96 '' - IL_0129: ldstr "zero" - IL_012e: ldstr "one" - IL_0133: ldstr "two" - IL_0138: ldstr "three" - IL_013d: ldstr "four" - IL_0142: ldstr "five" - IL_0147: ldstr "six" - IL_014c: ldstr "seven" - IL_0151: ldstr "eight" - IL_0156: ldstr "nine" - IL_015b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0160: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0125: ldstr "zero" + IL_012a: ldstr "one" + IL_012f: ldstr "two" + IL_0134: ldstr "three" + IL_0139: ldstr "four" + IL_013e: ldstr "five" + IL_0143: ldstr "six" + IL_0148: ldstr "seven" + IL_014d: ldstr "eight" + IL_0152: ldstr "nine" + IL_0157: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_015c: 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_0165: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0161: 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_016a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0166: 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_016f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_016b: 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_0174: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0170: 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_0179: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0175: 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_017e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_017a: 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_0183: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_017f: 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_0188: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0184: 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_018d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0189: 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_0192: dup - IL_0193: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::digits@49 - IL_0198: stloc.s digits - .line 50,55 : 1,20 '' - IL_019a: nop + IL_018e: dup + IL_018f: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::digits@49 + IL_0194: stloc.s digits .line 51,51 : 5,10 '' - IL_019b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_01a0: stloc.s V_18 - IL_01a2: ldloc.s V_18 - IL_01a4: ldloc.s V_18 - IL_01a6: ldnull - IL_01a7: ldc.i4.0 - IL_01a8: ldnull - IL_01a9: newobj instance void Linq101Ordering01/'Pipe #5 input at line 51@52'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0196: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_019b: stloc.s V_18 + IL_019d: ldloc.s V_18 + IL_019f: ldloc.s V_18 + IL_01a1: ldnull + IL_01a2: ldc.i4.0 + IL_01a3: ldnull + IL_01a4: newobj instance void Linq101Ordering01/'Pipe #5 input at line 51@52'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_01ae: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_01b3: ldsfld class Linq101Ordering01/'Pipe #5 input at line 51@53-1' Linq101Ordering01/'Pipe #5 input at line 51@53-1'::@_instance - IL_01b8: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01a9: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_01ae: ldsfld class Linq101Ordering01/'Pipe #5 input at line 51@53-1' Linq101Ordering01/'Pipe #5 input at line 51@53-1'::@_instance + IL_01b3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_01bd: ldsfld class Linq101Ordering01/'Pipe #5 input at line 51@54-2' Linq101Ordering01/'Pipe #5 input at line 51@54-2'::@_instance - IL_01c2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::ThenBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01b8: ldsfld class Linq101Ordering01/'Pipe #5 input at line 51@54-2' Linq101Ordering01/'Pipe #5 input at line 51@54-2'::@_instance + IL_01bd: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::ThenBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_01c7: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_01cc: stloc.s 'Pipe #5 input at line 51' + IL_01c2: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_01c7: stloc.s 'Pipe #5 input at line 51' .line 55,55 : 10,20 '' - IL_01ce: ldloc.s 'Pipe #5 input at line 51' - IL_01d0: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_01d5: dup - IL_01d6: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::sortedDigits@50 - IL_01db: stloc.s sortedDigits - .line 58,64 : 1,21 '' - IL_01dd: nop + IL_01c9: ldloc.s 'Pipe #5 input at line 51' + IL_01cb: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_01d0: dup + IL_01d1: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Ordering01::sortedDigits@50 + IL_01d6: stloc.s sortedDigits .line 59,59 : 5,10 '' - IL_01de: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_01e3: stloc.s V_20 + IL_01d8: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_01dd: stloc.s V_20 + IL_01df: ldloc.s V_20 + IL_01e1: ldloc.s V_20 + IL_01e3: ldloc.s V_20 + .line 60,60 : 9,12 '' IL_01e5: ldloc.s V_20 IL_01e7: ldloc.s V_20 - IL_01e9: ldloc.s V_20 - .line 60,60 : 9,12 '' - IL_01eb: ldloc.s V_20 - IL_01ed: ldloc.s V_20 - IL_01ef: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_products() - IL_01f4: 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_01f9: ldloc.s V_20 - IL_01fb: newobj instance void Linq101Ordering01/'Pipe #6 input at line 59@60'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0200: 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_01e9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Ordering01::get_products() + IL_01ee: 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_01f3: ldloc.s V_20 + IL_01f5: newobj instance void Linq101Ordering01/'Pipe #6 input at line 59@60'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_01fa: 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_0205: ldsfld class Linq101Ordering01/'Pipe #6 input at line 59@61-1' Linq101Ordering01/'Pipe #6 input at line 59@61-1'::@_instance - IL_020a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01ff: ldsfld class Linq101Ordering01/'Pipe #6 input at line 59@61-1' Linq101Ordering01/'Pipe #6 input at line 59@61-1'::@_instance + IL_0204: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SortBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_020f: ldsfld class Linq101Ordering01/'Pipe #6 input at line 59@62-2' Linq101Ordering01/'Pipe #6 input at line 59@62-2'::@_instance - IL_0214: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::ThenByDescending(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0209: ldsfld class Linq101Ordering01/'Pipe #6 input at line 59@62-2' Linq101Ordering01/'Pipe #6 input at line 59@62-2'::@_instance + IL_020e: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::ThenByDescending(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0219: ldsfld class Linq101Ordering01/'Pipe #6 input at line 59@63-3' Linq101Ordering01/'Pipe #6 input at line 59@63-3'::@_instance - IL_021e: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0213: ldsfld class Linq101Ordering01/'Pipe #6 input at line 59@63-3' Linq101Ordering01/'Pipe #6 input at line 59@63-3'::@_instance + IL_0218: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0223: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0228: stloc.s 'Pipe #6 input at line 59' + IL_021d: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0222: stloc.s 'Pipe #6 input at line 59' .line 64,64 : 10,21 '' - IL_022a: ldloc.s 'Pipe #6 input at line 59' - IL_022c: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0231: dup - IL_0232: stsfld class [Utils]Utils/Product[] ''.$Linq101Ordering01::sortedProducts3@58 - IL_0237: stloc.s sortedProducts3 - IL_0239: ret + IL_0224: ldloc.s 'Pipe #6 input at line 59' + IL_0226: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_022b: dup + IL_022c: stsfld class [Utils]Utils/Product[] ''.$Linq101Ordering01::sortedProducts3@58 + IL_0231: stloc.s sortedProducts3 + IL_0233: ret } // end of method $Linq101Ordering01::main@ } // end of class ''.$Linq101Ordering01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Partitioning01.il.bsl index da08438db70..dc9761089b4 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: {61F2D6A6-B280-A6A2-A745-0383A6D6F261} +// MVID: {61FD32BA-B280-A6A2-A745-0383BA32FD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x070E0000 +// Image base: 0x06E50000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1895,7 +1895,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 466 (0x1d2) + // Code size 460 (0x1cc) .maxstack 13 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 first3Numbers, @@ -1953,174 +1953,162 @@ IL_0042: dup IL_0043: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::numbers@7 IL_0048: stloc.0 - .line 10,14 : 1,20 '' - IL_0049: nop .line 11,11 : 5,10 '' - IL_004a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_004f: stloc.s V_9 - IL_0051: ldloc.s V_9 - IL_0053: ldnull + IL_0049: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_004e: stloc.s V_9 + IL_0050: ldloc.s V_9 + IL_0052: ldnull + IL_0053: ldc.i4.0 IL_0054: ldc.i4.0 - IL_0055: ldc.i4.0 - IL_0056: newobj instance void Linq101Partitioning01/'Pipe #1 input at line 11@12'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0055: newobj instance void Linq101Partitioning01/'Pipe #1 input at line 11@12'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_005b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0060: ldc.i4.3 - IL_0061: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Take(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_005a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_005f: ldc.i4.3 + IL_0060: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Take(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, int32) - IL_0066: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_006b: stloc.s 'Pipe #1 input at line 11' + IL_0065: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_006a: stloc.s 'Pipe #1 input at line 11' .line 14,14 : 10,20 '' - IL_006d: ldloc.s 'Pipe #1 input at line 11' - IL_006f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0074: dup - IL_0075: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::first3Numbers@10 - IL_007a: stloc.1 + IL_006c: ldloc.s 'Pipe #1 input at line 11' + IL_006e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0073: dup + IL_0074: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::first3Numbers@10 + IL_0079: stloc.1 .line 17,17 : 1,34 '' - IL_007b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() - IL_0080: dup - IL_0081: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::customers@17 - IL_0086: stloc.2 - .line 18,24 : 1,21 '' - IL_0087: nop + IL_007a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() + IL_007f: dup + IL_0080: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::customers@17 + IL_0085: stloc.2 .line 19,19 : 5,10 '' - IL_0088: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_008d: stloc.s V_11 + IL_0086: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_008b: stloc.s V_11 + IL_008d: ldloc.s V_11 IL_008f: ldloc.s V_11 - IL_0091: ldloc.s V_11 .line 20,20 : 9,12 '' + IL_0091: ldloc.s V_11 IL_0093: ldloc.s V_11 - IL_0095: ldloc.s V_11 - IL_0097: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_customers() - IL_009c: 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_00a1: ldloc.s V_11 - IL_00a3: newobj instance void Linq101Partitioning01/'Pipe #2 input at line 19@20'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_00a8: 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_0095: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_customers() + IL_009a: 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_009f: ldloc.s V_11 + IL_00a1: newobj instance void Linq101Partitioning01/'Pipe #2 input at line 19@20'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_00a6: 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_00ad: ldsfld class Linq101Partitioning01/'Pipe #2 input at line 19@22-2' Linq101Partitioning01/'Pipe #2 input at line 19@22-2'::@_instance - IL_00b2: 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_00ab: ldsfld class Linq101Partitioning01/'Pipe #2 input at line 19@22-2' Linq101Partitioning01/'Pipe #2 input at line 19@22-2'::@_instance + IL_00b0: 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_00b7: ldsfld class Linq101Partitioning01/'Pipe #2 input at line 19@23-3' Linq101Partitioning01/'Pipe #2 input at line 19@23-3'::@_instance - IL_00bc: 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_00b5: ldsfld class Linq101Partitioning01/'Pipe #2 input at line 19@23-3' Linq101Partitioning01/'Pipe #2 input at line 19@23-3'::@_instance + IL_00ba: 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_00c1: 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_00c6: stloc.s 'Pipe #2 input at line 19' + IL_00bf: 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_00c4: stloc.s 'Pipe #2 input at line 19' .line 24,24 : 10,21 '' - IL_00c8: ldloc.s 'Pipe #2 input at line 19' - IL_00ca: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00cf: dup - IL_00d0: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Partitioning01::WAOrders@18 - IL_00d5: stloc.3 - .line 27,31 : 1,20 '' - IL_00d6: nop + IL_00c6: ldloc.s 'Pipe #2 input at line 19' + IL_00c8: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00cd: dup + IL_00ce: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Partitioning01::WAOrders@18 + IL_00d3: stloc.3 .line 28,28 : 5,10 '' - IL_00d7: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00dc: stloc.s V_13 - IL_00de: ldloc.s V_13 - IL_00e0: ldnull - IL_00e1: ldc.i4.0 - IL_00e2: ldc.i4.0 - IL_00e3: newobj instance void Linq101Partitioning01/'Pipe #3 input at line 28@29'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_00d4: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00d9: stloc.s V_13 + IL_00db: ldloc.s V_13 + IL_00dd: ldnull + IL_00de: ldc.i4.0 + IL_00df: ldc.i4.0 + IL_00e0: newobj instance void Linq101Partitioning01/'Pipe #3 input at line 28@29'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_00e8: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00ed: ldc.i4.4 - IL_00ee: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Skip(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00e5: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00ea: ldc.i4.4 + IL_00eb: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Skip(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, int32) - IL_00f3: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_00f8: stloc.s 'Pipe #3 input at line 28' + IL_00f0: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_00f5: stloc.s 'Pipe #3 input at line 28' .line 31,31 : 10,20 '' - IL_00fa: ldloc.s 'Pipe #3 input at line 28' - IL_00fc: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0101: dup - IL_0102: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::allButFirst4Numbers@27 - IL_0107: stloc.s allButFirst4Numbers - .line 34,40 : 1,34 '' - IL_0109: nop + IL_00f7: ldloc.s 'Pipe #3 input at line 28' + IL_00f9: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00fe: dup + IL_00ff: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::allButFirst4Numbers@27 + IL_0104: stloc.s allButFirst4Numbers .line 35,35 : 5,10 '' - IL_010a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_010f: stloc.s V_15 + IL_0106: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_010b: stloc.s V_15 + IL_010d: ldloc.s V_15 + IL_010f: ldloc.s V_15 + .line 36,36 : 9,12 '' IL_0111: ldloc.s V_15 IL_0113: ldloc.s V_15 - .line 36,36 : 9,12 '' - IL_0115: ldloc.s V_15 - IL_0117: ldloc.s V_15 - IL_0119: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_customers() - IL_011e: 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_0123: ldloc.s V_15 - IL_0125: newobj instance void Linq101Partitioning01/'Pipe #4 input at line 35@36'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_012a: 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_0115: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Partitioning01::get_customers() + IL_011a: 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_011f: ldloc.s V_15 + IL_0121: newobj instance void Linq101Partitioning01/'Pipe #4 input at line 35@36'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0126: 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_012f: ldsfld class Linq101Partitioning01/'Pipe #4 input at line 35@38-2' Linq101Partitioning01/'Pipe #4 input at line 35@38-2'::@_instance - IL_0134: 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_012b: ldsfld class Linq101Partitioning01/'Pipe #4 input at line 35@38-2' Linq101Partitioning01/'Pipe #4 input at line 35@38-2'::@_instance + IL_0130: 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_0139: ldsfld class Linq101Partitioning01/'Pipe #4 input at line 35@39-3' Linq101Partitioning01/'Pipe #4 input at line 35@39-3'::@_instance - IL_013e: 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_0135: ldsfld class Linq101Partitioning01/'Pipe #4 input at line 35@39-3' Linq101Partitioning01/'Pipe #4 input at line 35@39-3'::@_instance + IL_013a: 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_0143: 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_0148: stloc.s 'Pipe #4 input at line 35' + IL_013f: 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_0144: stloc.s 'Pipe #4 input at line 35' .line 40,40 : 10,20 '' - IL_014a: ldc.i4.2 - IL_014b: ldloc.s 'Pipe #4 input at line 35' - IL_014d: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Skip>(int32, + IL_0146: ldc.i4.2 + IL_0147: ldloc.s 'Pipe #4 input at line 35' + IL_0149: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Skip>(int32, class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0152: stloc.s 'Pipe #4 stage #1 at line 40' + IL_014e: stloc.s 'Pipe #4 stage #1 at line 40' .line 40,40 : 24,34 '' - IL_0154: ldloc.s 'Pipe #4 stage #1 at line 40' - IL_0156: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_015b: dup - IL_015c: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$Linq101Partitioning01::WAOrders2@34 - IL_0161: stloc.s WAOrders2 - .line 43,47 : 1,20 '' - IL_0163: nop + IL_0150: ldloc.s 'Pipe #4 stage #1 at line 40' + IL_0152: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0157: dup + IL_0158: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$Linq101Partitioning01::WAOrders2@34 + IL_015d: stloc.s WAOrders2 .line 44,44 : 5,10 '' - IL_0164: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0169: stloc.s V_18 - IL_016b: ldloc.s V_18 - IL_016d: ldnull - IL_016e: ldc.i4.0 - IL_016f: ldc.i4.0 - IL_0170: newobj instance void Linq101Partitioning01/'Pipe #5 input at line 44@45'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_015f: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0164: stloc.s V_18 + IL_0166: ldloc.s V_18 + IL_0168: ldnull + IL_0169: ldc.i4.0 + IL_016a: ldc.i4.0 + IL_016b: newobj instance void Linq101Partitioning01/'Pipe #5 input at line 44@45'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0175: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_017a: ldsfld class Linq101Partitioning01/'Pipe #5 input at line 44@46-1' Linq101Partitioning01/'Pipe #5 input at line 44@46-1'::@_instance - IL_017f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::TakeWhile(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0170: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0175: ldsfld class Linq101Partitioning01/'Pipe #5 input at line 44@46-1' Linq101Partitioning01/'Pipe #5 input at line 44@46-1'::@_instance + IL_017a: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::TakeWhile(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0184: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0189: stloc.s 'Pipe #5 input at line 44' + IL_017f: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0184: stloc.s 'Pipe #5 input at line 44' .line 47,47 : 10,20 '' - IL_018b: ldloc.s 'Pipe #5 input at line 44' - IL_018d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0192: dup - IL_0193: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::firstNumbersLessThan6@43 - IL_0198: stloc.s firstNumbersLessThan6 - .line 50,54 : 1,20 '' - IL_019a: nop + IL_0186: ldloc.s 'Pipe #5 input at line 44' + IL_0188: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_018d: dup + IL_018e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::firstNumbersLessThan6@43 + IL_0193: stloc.s firstNumbersLessThan6 .line 51,51 : 5,10 '' - IL_019b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_01a0: stloc.s V_20 - IL_01a2: ldloc.s V_20 - IL_01a4: ldnull - IL_01a5: ldc.i4.0 - IL_01a6: ldc.i4.0 - IL_01a7: newobj instance void Linq101Partitioning01/'Pipe #6 input at line 51@52'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0195: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_019a: stloc.s V_20 + IL_019c: ldloc.s V_20 + IL_019e: ldnull + IL_019f: ldc.i4.0 + IL_01a0: ldc.i4.0 + IL_01a1: newobj instance void Linq101Partitioning01/'Pipe #6 input at line 51@52'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_01ac: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_01b1: ldsfld class Linq101Partitioning01/'Pipe #6 input at line 51@53-1' Linq101Partitioning01/'Pipe #6 input at line 51@53-1'::@_instance - IL_01b6: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SkipWhile(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01a6: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_01ab: ldsfld class Linq101Partitioning01/'Pipe #6 input at line 51@53-1' Linq101Partitioning01/'Pipe #6 input at line 51@53-1'::@_instance + IL_01b0: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::SkipWhile(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_01bb: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_01c0: stloc.s 'Pipe #6 input at line 51' + IL_01b5: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_01ba: stloc.s 'Pipe #6 input at line 51' .line 54,54 : 10,20 '' - IL_01c2: ldloc.s 'Pipe #6 input at line 51' - IL_01c4: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_01c9: dup - IL_01ca: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::allButFirst3Numbers@50 - IL_01cf: stloc.s allButFirst3Numbers - IL_01d1: ret + IL_01bc: ldloc.s 'Pipe #6 input at line 51' + IL_01be: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_01c3: dup + IL_01c4: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Partitioning01::allButFirst3Numbers@50 + IL_01c9: stloc.s allButFirst3Numbers + IL_01cb: ret } // end of method $Linq101Partitioning01::main@ } // end of class ''.$Linq101Partitioning01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl index e6fb0af3b5a..cee73d81f73 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Quantifiers01.il.bsl @@ -45,7 +45,7 @@ // Offset: 0x00000398 Length: 0x000000FF } .module Linq101Quantifiers01.exe -// MVID: {61F2D6A6-76DD-E373-A745-0383A6D6F261} +// MVID: {61FD32BA-76DD-E373-A745-0383BA32FD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 @@ -1396,7 +1396,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 417 (0x1a1) + // Code size 415 (0x19f) .maxstack 10 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 words, [1] bool iAfterE, @@ -1446,130 +1446,126 @@ IL_005c: dup IL_005d: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::products@17 IL_0062: stloc.2 - .line 19,25 : 1,21 '' - IL_0063: nop .line 20,20 : 5,10 '' - IL_0064: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0069: stloc.s V_8 - IL_006b: ldloc.s V_8 - IL_006d: ldloc.s V_8 - IL_006f: ldloc.s V_8 - IL_0071: ldloc.s V_8 + IL_0063: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0068: stloc.s V_8 + IL_006a: ldloc.s V_8 + IL_006c: ldloc.s V_8 + IL_006e: ldloc.s V_8 + IL_0070: ldloc.s V_8 .line 21,21 : 9,12 '' - IL_0073: ldloc.s V_8 - IL_0075: ldloc.s V_8 - IL_0077: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_products() - IL_007c: 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_0081: ldloc.s V_8 - IL_0083: newobj instance void Linq101Quantifiers01/'Pipe #1 input at line 20@21'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0088: 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_0072: ldloc.s V_8 + IL_0074: ldloc.s V_8 + IL_0076: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_products() + IL_007b: 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_0080: ldloc.s V_8 + IL_0082: newobj instance void Linq101Quantifiers01/'Pipe #1 input at line 20@21'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0087: 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_008d: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@22-1' Linq101Quantifiers01/'Pipe #1 input at line 20@22-1'::@_instance - IL_0092: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@22-2' Linq101Quantifiers01/'Pipe #1 input at line 20@22-2'::@_instance - IL_0097: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_008c: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@22-1' Linq101Quantifiers01/'Pipe #1 input at line 20@22-1'::@_instance + IL_0091: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@22-2' Linq101Quantifiers01/'Pipe #1 input at line 20@22-2'::@_instance + IL_0096: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_009c: ldloc.s V_8 - IL_009e: newobj instance void Linq101Quantifiers01/'Pipe #1 input at line 20@22-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_00a3: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_009b: ldloc.s V_8 + IL_009d: newobj instance void Linq101Quantifiers01/'Pipe #1 input at line 20@22-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_00a2: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_00a8: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@23-4' Linq101Quantifiers01/'Pipe #1 input at line 20@23-4'::@_instance - IL_00ad: 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_00a7: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@23-4' Linq101Quantifiers01/'Pipe #1 input at line 20@23-4'::@_instance + IL_00ac: 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_00b2: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@24-6' Linq101Quantifiers01/'Pipe #1 input at line 20@24-6'::@_instance - IL_00b7: 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_00b1: ldsfld class Linq101Quantifiers01/'Pipe #1 input at line 20@24-6' Linq101Quantifiers01/'Pipe #1 input at line 20@24-6'::@_instance + IL_00b6: 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_00bc: 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_00c1: stloc.s 'Pipe #1 input at line 20' + IL_00bb: 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_00c0: stloc.s 'Pipe #1 input at line 20' .line 25,25 : 10,21 '' - IL_00c3: ldloc.s 'Pipe #1 input at line 20' - IL_00c5: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_00ca: dup - IL_00cb: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups@19 - IL_00d0: stloc.3 + IL_00c2: ldloc.s 'Pipe #1 input at line 20' + IL_00c4: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_00c9: dup + IL_00ca: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups@19 + IL_00cf: stloc.3 .line 28,28 : 1,35 '' - IL_00d1: ldc.i4.1 - IL_00d2: ldc.i4.s 11 - IL_00d4: ldc.i4.3 - IL_00d5: ldc.i4.s 19 - IL_00d7: ldc.i4.s 41 - IL_00d9: ldc.i4.s 65 - IL_00db: ldc.i4.s 19 - IL_00dd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_00e2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00d0: ldc.i4.1 + IL_00d1: ldc.i4.s 11 + IL_00d3: ldc.i4.3 + IL_00d4: ldc.i4.s 19 + IL_00d6: ldc.i4.s 41 + IL_00d8: ldc.i4.s 65 + IL_00da: ldc.i4.s 19 + IL_00dc: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_00e1: 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_00e7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00e6: 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_00ec: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00eb: 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_00f1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00f0: 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_00f6: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00f5: 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_00fb: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00fa: 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_0100: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00ff: 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_0105: dup - IL_0106: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::numbers@28 - IL_010b: stloc.s numbers + IL_0104: dup + IL_0105: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Quantifiers01::numbers@28 + IL_010a: stloc.s numbers .line 31,31 : 5,10 '' - IL_010d: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0112: ldnull + IL_010c: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0111: ldnull + IL_0112: ldc.i4.0 IL_0113: ldc.i4.0 - IL_0114: ldc.i4.0 - IL_0115: newobj instance void Linq101Quantifiers01/onlyOdd@32::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0114: newobj instance void Linq101Quantifiers01/onlyOdd@32::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_011a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_011f: ldsfld class Linq101Quantifiers01/'onlyOdd@33-1' Linq101Quantifiers01/'onlyOdd@33-1'::@_instance - IL_0124: callvirt instance bool [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::All(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0119: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_011e: ldsfld class Linq101Quantifiers01/'onlyOdd@33-1' Linq101Quantifiers01/'onlyOdd@33-1'::@_instance + IL_0123: callvirt instance bool [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::All(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0129: dup - IL_012a: stsfld bool ''.$Linq101Quantifiers01::onlyOdd@30 - IL_012f: stloc.s onlyOdd - .line 37,43 : 1,21 '' - IL_0131: nop + IL_0128: dup + IL_0129: stsfld bool ''.$Linq101Quantifiers01::onlyOdd@30 + IL_012e: stloc.s onlyOdd .line 38,38 : 5,10 '' - IL_0132: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0137: stloc.s V_10 + IL_0130: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0135: stloc.s V_10 + IL_0137: ldloc.s V_10 IL_0139: ldloc.s V_10 IL_013b: ldloc.s V_10 IL_013d: ldloc.s V_10 - IL_013f: ldloc.s V_10 .line 39,39 : 9,12 '' + IL_013f: ldloc.s V_10 IL_0141: ldloc.s V_10 - IL_0143: ldloc.s V_10 - IL_0145: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_products() - IL_014a: 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_014f: ldloc.s V_10 - IL_0151: newobj instance void Linq101Quantifiers01/'Pipe #2 input at line 38@39'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0156: 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_0143: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Quantifiers01::get_products() + IL_0148: 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_014d: ldloc.s V_10 + IL_014f: newobj instance void Linq101Quantifiers01/'Pipe #2 input at line 38@39'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0154: 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_015b: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@40-1' Linq101Quantifiers01/'Pipe #2 input at line 38@40-1'::@_instance - IL_0160: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@40-2' Linq101Quantifiers01/'Pipe #2 input at line 38@40-2'::@_instance - IL_0165: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0159: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@40-1' Linq101Quantifiers01/'Pipe #2 input at line 38@40-1'::@_instance + IL_015e: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@40-2' Linq101Quantifiers01/'Pipe #2 input at line 38@40-2'::@_instance + IL_0163: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2,!!3> [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::GroupValBy(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_016a: ldloc.s V_10 - IL_016c: newobj instance void Linq101Quantifiers01/'Pipe #2 input at line 38@40-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0171: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0168: ldloc.s V_10 + IL_016a: newobj instance void Linq101Quantifiers01/'Pipe #2 input at line 38@40-3'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_016f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::For,class [mscorlib]System.Collections.IEnumerable,class [System.Core]System.Linq.IGrouping`2,object>(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>) - IL_0176: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@41-4' Linq101Quantifiers01/'Pipe #2 input at line 38@41-4'::@_instance - IL_017b: 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_0174: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@41-4' Linq101Quantifiers01/'Pipe #2 input at line 38@41-4'::@_instance + IL_0179: 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_0180: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@42-6' Linq101Quantifiers01/'Pipe #2 input at line 38@42-6'::@_instance - IL_0185: 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_017e: ldsfld class Linq101Quantifiers01/'Pipe #2 input at line 38@42-6' Linq101Quantifiers01/'Pipe #2 input at line 38@42-6'::@_instance + IL_0183: 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_018a: 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_018f: stloc.s 'Pipe #2 input at line 38' + IL_0188: 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_018d: stloc.s 'Pipe #2 input at line 38' .line 43,43 : 10,21 '' - IL_0191: ldloc.s 'Pipe #2 input at line 38' - IL_0193: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0198: dup - IL_0199: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups2@37 - IL_019e: stloc.s productGroups2 - IL_01a0: ret + IL_018f: ldloc.s 'Pipe #2 input at line 38' + IL_0191: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0196: dup + IL_0197: stsfld class [mscorlib]System.Tuple`2>[] ''.$Linq101Quantifiers01::productGroups2@37 + IL_019c: stloc.s productGroups2 + IL_019e: ret } // end of method $Linq101Quantifiers01::main@ } // end of class ''.$Linq101Quantifiers01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Select01.il.bsl index 4238c26265d..d8b2b469cfb 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: {61F2D6A6-6057-8F80-A745-0383A6D6F261} +// MVID: {61FD32BA-6057-8F80-A745-0383BA32FD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x070E0000 +// Image base: 0x05A30000 // =============== CLASS MEMBERS DECLARATION =================== @@ -3775,7 +3775,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 1170 (0x492) + // Code size 1161 (0x489) .maxstack 13 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numsPlusOne, @@ -3856,452 +3856,434 @@ IL_0042: dup IL_0043: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numbers@7 IL_0048: stloc.0 - .line 10,14 : 1,20 '' - IL_0049: nop .line 11,11 : 5,10 '' - IL_004a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_004f: stloc.s V_22 - IL_0051: ldnull + IL_0049: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_004e: stloc.s V_22 + IL_0050: ldnull + IL_0051: ldc.i4.0 IL_0052: ldc.i4.0 - IL_0053: ldc.i4.0 - IL_0054: newobj instance void Linq101Select01/'Pipe #1 input at line 11@13'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0053: newobj instance void Linq101Select01/'Pipe #1 input at line 11@13'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_0059: stloc.s 'Pipe #1 input at line 11' + IL_0058: stloc.s 'Pipe #1 input at line 11' .line 14,14 : 10,20 '' - IL_005b: ldloc.s 'Pipe #1 input at line 11' - IL_005d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0062: dup - IL_0063: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numsPlusOne@10 - IL_0068: stloc.1 + IL_005a: ldloc.s 'Pipe #1 input at line 11' + IL_005c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0061: dup + IL_0062: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numsPlusOne@10 + IL_0067: stloc.1 .line 17,17 : 1,32 '' - IL_0069: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() - IL_006e: dup - IL_006f: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::products@17 - IL_0074: stloc.2 + IL_0068: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() + IL_006d: dup + IL_006e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::products@17 + IL_0073: stloc.2 .line 20,20 : 5,10 '' - IL_0075: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_007a: stloc.s V_23 - IL_007c: ldnull - IL_007d: ldc.i4.0 - IL_007e: ldnull - IL_007f: newobj instance void Linq101Select01/productNames@22::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0074: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0079: stloc.s V_23 + IL_007b: ldnull + IL_007c: ldc.i4.0 + IL_007d: ldnull + IL_007e: newobj instance void Linq101Select01/productNames@22::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0084: dup - IL_0085: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101Select01::productNames@19 - IL_008a: stloc.3 + IL_0083: dup + IL_0084: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101Select01::productNames@19 + IL_0089: stloc.3 .line 26,26 : 1,97 '' - IL_008b: ldstr "zero" - IL_0090: ldstr "one" - IL_0095: ldstr "two" - IL_009a: ldstr "three" - IL_009f: ldstr "four" - IL_00a4: ldstr "five" - IL_00a9: ldstr "six" - IL_00ae: ldstr "seven" - IL_00b3: ldstr "eight" - IL_00b8: ldstr "nine" - IL_00bd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_00c2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_008a: ldstr "zero" + IL_008f: ldstr "one" + IL_0094: ldstr "two" + IL_0099: ldstr "three" + IL_009e: ldstr "four" + IL_00a3: ldstr "five" + IL_00a8: ldstr "six" + IL_00ad: ldstr "seven" + IL_00b2: ldstr "eight" + IL_00b7: ldstr "nine" + IL_00bc: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_00c1: 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_00c7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00c6: 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_00cc: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00cb: 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_00d1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00d0: 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_00d6: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00d5: 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_00db: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00da: 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_00e0: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00df: 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_00e5: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00e4: 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_00ea: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00e9: 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_00ef: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_00ee: 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_00f4: dup - IL_00f5: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::strings@26 - IL_00fa: stloc.s strings - .line 27,31 : 1,20 '' - IL_00fc: nop + IL_00f3: dup + IL_00f4: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::strings@26 + IL_00f9: stloc.s strings .line 28,28 : 5,10 '' - IL_00fd: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0102: stloc.s V_25 + IL_00fb: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0100: stloc.s V_25 + IL_0102: ldnull + IL_0103: ldc.i4.0 IL_0104: ldnull - IL_0105: ldc.i4.0 - IL_0106: ldnull - IL_0107: newobj instance void Linq101Select01/'Pipe #2 input at line 28@30'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0105: newobj instance void Linq101Select01/'Pipe #2 input at line 28@30'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_010c: stloc.s 'Pipe #2 input at line 28' + IL_010a: stloc.s 'Pipe #2 input at line 28' .line 31,31 : 10,20 '' - IL_010e: ldloc.s 'Pipe #2 input at line 28' - IL_0110: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0115: dup - IL_0116: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::textNums@27 - IL_011b: stloc.s textNums + IL_010c: ldloc.s 'Pipe #2 input at line 28' + IL_010e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0113: dup + IL_0114: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::textNums@27 + IL_0119: stloc.s textNums .line 34,34 : 1,46 '' - IL_011d: ldstr "aPPLE" - IL_0122: ldstr "BlUeBeRrY" - IL_0127: ldstr "cHeRry" - IL_012c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_0131: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_011b: ldstr "aPPLE" + IL_0120: ldstr "BlUeBeRrY" + IL_0125: ldstr "cHeRry" + IL_012a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_012f: 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_0136: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0134: 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_013b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0139: 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_0140: dup - IL_0141: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::words@34 - IL_0146: stloc.s words - .line 36,40 : 1,20 '' - IL_0148: nop + IL_013e: dup + IL_013f: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::words@34 + IL_0144: stloc.s words .line 37,37 : 4,9 '' - IL_0149: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_014e: stloc.s V_27 - IL_0150: ldnull - IL_0151: ldc.i4.0 - IL_0152: ldnull - IL_0153: newobj instance void Linq101Select01/'Pipe #3 input at line 37@39'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0146: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_014b: stloc.s V_27 + IL_014d: ldnull + IL_014e: ldc.i4.0 + IL_014f: ldnull + IL_0150: newobj instance void Linq101Select01/'Pipe #3 input at line 37@39'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [mscorlib]System.Tuple`2) - IL_0158: stloc.s 'Pipe #3 input at line 37' + IL_0155: stloc.s 'Pipe #3 input at line 37' .line 40,40 : 9,20 '' - IL_015a: ldloc.s 'Pipe #3 input at line 37' - IL_015c: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0161: dup - IL_0162: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Select01::upperLowerWords@36 - IL_0167: stloc.s upperLowerWords - .line 43,47 : 1,20 '' - IL_0169: nop + IL_0157: ldloc.s 'Pipe #3 input at line 37' + IL_0159: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_015e: dup + IL_015f: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Select01::upperLowerWords@36 + IL_0164: stloc.s upperLowerWords .line 44,44 : 5,10 '' - IL_016a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_016f: stloc.s V_29 - IL_0171: ldnull - IL_0172: ldc.i4.0 - IL_0173: ldnull - IL_0174: newobj instance void Linq101Select01/'Pipe #4 input at line 44@46'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0166: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_016b: stloc.s V_29 + IL_016d: ldnull + IL_016e: ldc.i4.0 + IL_016f: ldnull + IL_0170: newobj instance void Linq101Select01/'Pipe #4 input at line 44@46'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [mscorlib]System.Tuple`2) - IL_0179: stloc.s 'Pipe #4 input at line 44' + IL_0175: stloc.s 'Pipe #4 input at line 44' .line 47,47 : 10,20 '' - IL_017b: ldloc.s 'Pipe #4 input at line 44' - IL_017d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0182: dup - IL_0183: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$Linq101Select01::digitOddEvens@43 - IL_0188: stloc.s digitOddEvens - .line 50,54 : 1,21 '' - IL_018a: nop + IL_0177: ldloc.s 'Pipe #4 input at line 44' + IL_0179: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_017e: dup + IL_017f: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1> ''.$Linq101Select01::digitOddEvens@43 + IL_0184: stloc.s digitOddEvens .line 51,51 : 5,10 '' - IL_018b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0190: stloc.s V_31 - IL_0192: ldnull - IL_0193: ldc.i4.0 - IL_0194: ldnull - IL_0195: newobj instance void Linq101Select01/'Pipe #5 input at line 51@53'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0186: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_018b: stloc.s V_31 + IL_018d: ldnull + IL_018e: ldc.i4.0 + IL_018f: ldnull + IL_0190: newobj instance void Linq101Select01/'Pipe #5 input at line 51@53'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, class [mscorlib]System.Tuple`3) - IL_019a: stloc.s 'Pipe #5 input at line 51' + IL_0195: stloc.s 'Pipe #5 input at line 51' .line 54,54 : 10,21 '' - IL_019c: ldloc.s 'Pipe #5 input at line 51' - IL_019e: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_01a3: dup - IL_01a4: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::productInfos@50 - IL_01a9: stloc.s productInfos + IL_0197: ldloc.s 'Pipe #5 input at line 51' + IL_0199: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_019e: dup + IL_019f: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::productInfos@50 + IL_01a4: stloc.s productInfos .line 57,57 : 1,21 '' - IL_01ab: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_strings() - IL_01b0: dup - IL_01b1: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::digits@57 - IL_01b6: stloc.s digits - .line 58,63 : 1,20 '' - IL_01b8: nop + IL_01a6: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_strings() + IL_01ab: dup + IL_01ac: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::digits@57 + IL_01b1: stloc.s digits .line 59,59 : 5,10 '' - IL_01b9: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_01be: stloc.s V_33 - IL_01c0: ldloc.s V_33 - IL_01c2: ldloc.s V_33 + IL_01b3: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_01b8: stloc.s V_33 + IL_01ba: ldloc.s V_33 + IL_01bc: ldloc.s V_33 .line 60,60 : 9,12 '' - IL_01c4: ldloc.s V_33 - IL_01c6: ldloc.s V_33 - IL_01c8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbers() - IL_01cd: 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_01d2: ldloc.s V_33 - IL_01d4: newobj instance void Linq101Select01/'Pipe #6 input at line 59@60'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_01d9: 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_01be: ldloc.s V_33 + IL_01c0: ldloc.s V_33 + IL_01c2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbers() + IL_01c7: 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_01cc: ldloc.s V_33 + IL_01ce: newobj instance void Linq101Select01/'Pipe #6 input at line 59@60'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_01d3: 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_01de: ldsfld class Linq101Select01/'Pipe #6 input at line 59@61-1' Linq101Select01/'Pipe #6 input at line 59@61-1'::@_instance - IL_01e3: 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_01d8: ldsfld class Linq101Select01/'Pipe #6 input at line 59@61-1' Linq101Select01/'Pipe #6 input at line 59@61-1'::@_instance + IL_01dd: 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_01e8: ldsfld class Linq101Select01/'Pipe #6 input at line 59@62-2' Linq101Select01/'Pipe #6 input at line 59@62-2'::@_instance - IL_01ed: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_01e2: ldsfld class Linq101Select01/'Pipe #6 input at line 59@62-2' Linq101Select01/'Pipe #6 input at line 59@62-2'::@_instance + IL_01e7: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_01f2: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_01f7: stloc.s 'Pipe #6 input at line 59' + IL_01ec: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_01f1: stloc.s 'Pipe #6 input at line 59' .line 63,63 : 10,20 '' - IL_01f9: ldloc.s 'Pipe #6 input at line 59' - IL_01fb: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0200: dup - IL_0201: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::lowNums@58 - IL_0206: stloc.s lowNums + IL_01f3: ldloc.s 'Pipe #6 input at line 59' + IL_01f5: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_01fa: dup + IL_01fb: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::lowNums@58 + IL_0200: stloc.s lowNums .line 64,64 : 1,59 '' - IL_0208: nop + IL_0202: 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, + IL_0203: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_lowNums() + IL_0208: stloc.s V_34 + IL_020a: ldstr "four" + IL_020f: ldstr "one" + IL_0214: ldstr "three" + IL_0219: ldstr "two" + IL_021e: ldstr "zero" + IL_0223: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_0228: 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_0233: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_022d: 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_0238: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0232: 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_023d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0237: 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_0242: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_023c: 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_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, + IL_0241: stloc.s V_35 + IL_0243: ldloc.s V_34 + IL_0245: ldloc.s V_35 + IL_0247: call class [mscorlib]System.Collections.IEqualityComparer [FSharp.Core]Microsoft.FSharp.Core.LanguagePrimitives::get_GenericEqualityComparer() + IL_024c: callvirt instance bool class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Equals(object, class [mscorlib]System.Collections.IEqualityComparer) - IL_0257: ldc.i4.0 - IL_0258: ceq - IL_025a: brfalse.s IL_0276 + IL_0251: ldc.i4.0 + IL_0252: ceq + IL_0254: brfalse.s IL_0270 .line 64,64 : 60,84 '' - 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 + IL_0256: ldstr "lowNums failed" + IL_025b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) + IL_0260: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) + IL_0265: pop .line 64,64 : 86,92 '' - IL_026c: ldc.i4.1 - IL_026d: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) - IL_0272: pop + IL_0266: ldc.i4.1 + IL_0267: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::Exit(int32) + IL_026c: pop .line 100001,100001 : 0,0 '' - IL_0273: nop - IL_0274: br.s IL_0277 + IL_026d: nop + IL_026e: br.s IL_0271 .line 100001,100001 : 0,0 '' - IL_0276: nop + IL_0270: nop .line 67,67 : 1,37 '' - 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, + IL_0271: ldc.i4.0 + IL_0272: ldc.i4.2 + IL_0273: ldc.i4.4 + IL_0274: ldc.i4.5 + IL_0275: ldc.i4.6 + IL_0276: ldc.i4.8 + IL_0277: ldc.i4.s 9 + IL_0279: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_027e: 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_0289: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0283: 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_028e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0288: 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_0293: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_028d: 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_0298: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0292: 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_029d: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_0297: 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_02a2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_029c: 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_02a7: dup - IL_02a8: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numbersA@67 - IL_02ad: stloc.s numbersA + IL_02a1: dup + IL_02a2: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numbersA@67 + IL_02a7: stloc.s numbersA .line 68,68 : 1,31 '' - 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, + IL_02a9: ldc.i4.1 + IL_02aa: ldc.i4.3 + IL_02ab: ldc.i4.5 + IL_02ac: ldc.i4.7 + IL_02ad: ldc.i4.8 + IL_02ae: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_02b3: 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_02be: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_02b8: 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_02c3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_02bd: 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_02c8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_02c2: 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_02cd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_02c7: 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_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_02da: nop + IL_02cc: dup + IL_02cd: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::numbersB@68 + IL_02d2: stloc.s numbersB .line 71,71 : 5,10 '' - 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_02d4: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_02d9: stloc.s V_37 + IL_02db: ldloc.s V_37 + IL_02dd: ldloc.s V_37 .line 72,72 : 9,12 '' - 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, + IL_02df: ldloc.s V_37 + IL_02e1: ldloc.s V_37 + IL_02e3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_numbersA() + IL_02e8: 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_02ed: ldloc.s V_37 + IL_02ef: newobj instance void Linq101Select01/'Pipe #7 input at line 71@72'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_02f4: 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_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, + IL_02f9: ldsfld class Linq101Select01/'Pipe #7 input at line 71@74-2' Linq101Select01/'Pipe #7 input at line 71@74-2'::@_instance + IL_02fe: 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_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, + IL_0303: ldsfld class Linq101Select01/'Pipe #7 input at line 71@75-3' Linq101Select01/'Pipe #7 input at line 71@75-3'::@_instance + IL_0308: 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_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' + IL_030d: 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_0312: stloc.s 'Pipe #7 input at line 71' .line 76,76 : 10,21 '' - 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 + IL_0314: ldloc.s 'Pipe #7 input at line 71' + IL_0316: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_031b: dup + IL_031c: stsfld class [mscorlib]System.Tuple`2[] ''.$Linq101Select01::pairs@70 + IL_0321: stloc.s pairs .line 79,79 : 1,34 '' - 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_0337: nop + IL_0323: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() + IL_0328: dup + IL_0329: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Select01::customers@79 + IL_032e: stloc.s customers .line 81,81 : 5,10 '' - 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_0330: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0335: stloc.s V_39 + IL_0337: ldloc.s V_39 + IL_0339: ldloc.s V_39 .line 82,82 : 9,12 '' - 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, + IL_033b: ldloc.s V_39 + IL_033d: ldloc.s V_39 + IL_033f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() + IL_0344: 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_0349: ldloc.s V_39 + IL_034b: newobj instance void Linq101Select01/'Pipe #8 input at line 81@82'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0350: 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_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, + IL_0355: ldsfld class Linq101Select01/'Pipe #8 input at line 81@84-2' Linq101Select01/'Pipe #8 input at line 81@84-2'::@_instance + IL_035a: 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_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, + IL_035f: ldsfld class Linq101Select01/'Pipe #8 input at line 81@85-3' Linq101Select01/'Pipe #8 input at line 81@85-3'::@_instance + IL_0364: 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_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' + IL_0369: 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_036e: stloc.s 'Pipe #8 input at line 81' .line 86,86 : 10,21 '' - 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_0387: nop + IL_0370: ldloc.s 'Pipe #8 input at line 81' + IL_0372: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0377: dup + IL_0378: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::orders@80 + IL_037d: stloc.s orders .line 90,90 : 5,10 '' - 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_037f: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0384: stloc.s V_41 + IL_0386: ldloc.s V_41 + IL_0388: ldloc.s V_41 .line 91,91 : 9,12 '' - 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, + IL_038a: ldloc.s V_41 + IL_038c: ldloc.s V_41 + IL_038e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() + IL_0393: 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_0398: ldloc.s V_41 + IL_039a: newobj instance void Linq101Select01/'Pipe #9 input at line 90@91'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_039f: 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_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, + IL_03a4: ldsfld class Linq101Select01/'Pipe #9 input at line 90@93-2' Linq101Select01/'Pipe #9 input at line 90@93-2'::@_instance + IL_03a9: 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_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, + IL_03ae: ldsfld class Linq101Select01/'Pipe #9 input at line 90@94-3' Linq101Select01/'Pipe #9 input at line 90@94-3'::@_instance + IL_03b3: 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_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' + IL_03b8: 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_03bd: stloc.s 'Pipe #9 input at line 90' .line 95,95 : 10,21 '' - 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_03bf: ldloc.s 'Pipe #9 input at line 90' + IL_03c1: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray>(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_03c6: dup + IL_03c7: stsfld class [mscorlib]System.Tuple`3[] ''.$Linq101Select01::orders2@89 + IL_03cc: stloc.s orders2 .line 99,99 : 5,10 '' - 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_03ce: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_03d3: stloc.s V_42 + IL_03d5: ldloc.s V_42 + IL_03d7: ldloc.s V_42 .line 100,100 : 9,12 '' - 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, + IL_03d9: ldloc.s V_42 + IL_03db: ldloc.s V_42 + IL_03dd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() + IL_03e2: 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_03e7: ldloc.s V_42 + IL_03e9: newobj instance void Linq101Select01/orders3@100::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_03ee: 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_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, + IL_03f3: ldsfld class Linq101Select01/'orders3@102-2' Linq101Select01/'orders3@102-2'::@_instance + IL_03f8: 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_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, + IL_03fd: ldsfld class Linq101Select01/'orders3@103-3' Linq101Select01/'orders3@103-3'::@_instance + IL_0402: 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_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 + IL_0407: 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_040c: dup + IL_040d: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1> ''.$Linq101Select01::orders3@98 + IL_0412: stloc.s orders3 .line 107,107 : 1,38 '' - IL_041d: ldc.i4 0x7cd - IL_0422: ldc.i4.1 - IL_0423: ldc.i4.1 - IL_0424: newobj instance void [mscorlib]System.DateTime::.ctor(int32, + IL_0414: ldc.i4 0x7cd + IL_0419: ldc.i4.1 + IL_041a: ldc.i4.1 + IL_041b: newobj instance void [mscorlib]System.DateTime::.ctor(int32, int32, int32) - IL_0429: dup - IL_042a: stsfld valuetype [mscorlib]System.DateTime ''.$Linq101Select01::cutOffDate@107 - IL_042f: stloc.s cutOffDate + IL_0420: dup + IL_0421: stsfld valuetype [mscorlib]System.DateTime ''.$Linq101Select01::cutOffDate@107 + IL_0426: stloc.s cutOffDate .line 110,110 : 5,10 '' - 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_0428: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_042d: stloc.s V_43 + IL_042f: ldloc.s V_43 + IL_0431: ldloc.s V_43 + IL_0433: ldloc.s V_43 + IL_0435: ldloc.s V_43 .line 111,111 : 9,12 '' - 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, + IL_0437: ldloc.s V_43 + IL_0439: ldloc.s V_43 + IL_043b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Select01::get_customers() + IL_0440: 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_0445: ldloc.s V_43 + IL_0447: newobj instance void Linq101Select01/orders4@111::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_044c: 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_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, + IL_0451: ldsfld class Linq101Select01/'orders4@112-1' Linq101Select01/'orders4@112-1'::@_instance + IL_0456: 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_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, + IL_045b: ldloc.s V_43 + IL_045d: newobj instance void Linq101Select01/'orders4@111-2'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0462: 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_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, + IL_0467: ldsfld class Linq101Select01/'orders4@114-4' Linq101Select01/'orders4@114-4'::@_instance + IL_046c: 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_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, + IL_0471: ldsfld class Linq101Select01/'orders4@115-5' Linq101Select01/'orders4@115-5'::@_instance + IL_0476: 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_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 + IL_047b: 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_0480: dup + IL_0481: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1> ''.$Linq101Select01::orders4@109 + IL_0486: stloc.s orders4 + IL_0488: 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 24e27d6fbf6..4976371674b 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: {61F2D6A6-4EE5-349F-A745-0383A6D6F261} +// MVID: {61FD32BA-4EE5-349F-A745-0383BA32FD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06C30000 +// Image base: 0x05B90000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1512,7 +1512,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 212 (0xd4) + // Code size 210 (0xd2) .maxstack 8 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 factorsOf300, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 uniqueFactors, @@ -1547,85 +1547,81 @@ IL_0023: dup IL_0024: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::factorsOf300@9 IL_0029: stloc.0 - .line 11,15 : 1,20 '' - IL_002a: nop .line 12,12 : 5,10 '' - IL_002b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0030: stloc.s V_8 - IL_0032: ldloc.s V_8 - IL_0034: ldnull + IL_002a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_002f: stloc.s V_8 + IL_0031: ldloc.s V_8 + IL_0033: ldnull + IL_0034: ldc.i4.0 IL_0035: ldc.i4.0 - IL_0036: ldc.i4.0 - IL_0037: newobj instance void Linq101SetOperators01/'Pipe #1 input at line 12@13'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0036: newobj instance void Linq101SetOperators01/'Pipe #1 input at line 12@13'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, int32) - IL_003c: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0041: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Distinct(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) - IL_0046: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_004b: stloc.s 'Pipe #1 input at line 12' + IL_003b: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0040: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Distinct(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) + IL_0045: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_004a: stloc.s 'Pipe #1 input at line 12' .line 15,15 : 10,20 '' - IL_004d: ldloc.s 'Pipe #1 input at line 12' - IL_004f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0054: dup - IL_0055: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::uniqueFactors@11 - IL_005a: stloc.1 + IL_004c: ldloc.s 'Pipe #1 input at line 12' + IL_004e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0053: dup + IL_0054: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::uniqueFactors@11 + IL_0059: stloc.1 .line 18,18 : 1,32 '' - IL_005b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() - IL_0060: dup - IL_0061: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::products@18 - IL_0066: stloc.2 - .line 20,25 : 1,20 '' - IL_0067: nop + IL_005a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() + IL_005f: dup + IL_0060: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::products@18 + IL_0065: stloc.2 .line 21,21 : 5,10 '' - IL_0068: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_006d: stloc.s V_10 - IL_006f: ldloc.s V_10 + IL_0066: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_006b: stloc.s V_10 + IL_006d: ldloc.s V_10 + IL_006f: ldnull + IL_0070: ldc.i4.0 IL_0071: ldnull - IL_0072: ldc.i4.0 - IL_0073: ldnull - IL_0074: newobj instance void Linq101SetOperators01/'Pipe #2 input at line 21@23'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_0072: newobj instance void Linq101SetOperators01/'Pipe #2 input at line 21@23'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_0079: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_007e: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Distinct(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) - IL_0083: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0088: stloc.s 'Pipe #2 input at line 21' + IL_0077: newobj instance void class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::.ctor(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_007c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Distinct(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2) + IL_0081: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0086: stloc.s 'Pipe #2 input at line 21' .line 25,25 : 10,20 '' - IL_008a: ldloc.s 'Pipe #2 input at line 21' - IL_008c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0091: dup - IL_0092: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::categoryNames@20 - IL_0097: stloc.3 + IL_0088: ldloc.s 'Pipe #2 input at line 21' + IL_008a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToList(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_008f: dup + IL_0090: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::categoryNames@20 + IL_0095: stloc.3 .line 28,28 : 1,34 '' - IL_0098: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() - IL_009d: dup - IL_009e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::customers@28 - IL_00a3: stloc.s customers + IL_0096: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() + IL_009b: dup + IL_009c: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101SetOperators01::customers@28 + IL_00a1: stloc.s customers .line 31,31 : 5,10 '' - IL_00a5: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00aa: stloc.s V_11 - IL_00ac: ldnull - IL_00ad: ldc.i4.0 - IL_00ae: ldc.i4.0 - IL_00af: newobj instance void Linq101SetOperators01/productFirstChars@33::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_00a3: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00a8: stloc.s V_11 + IL_00aa: ldnull + IL_00ab: ldc.i4.0 + IL_00ac: ldc.i4.0 + IL_00ad: newobj instance void Linq101SetOperators01/productFirstChars@33::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, char) - IL_00b4: dup - IL_00b5: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101SetOperators01::productFirstChars@30 - IL_00ba: stloc.s productFirstChars + IL_00b2: dup + IL_00b3: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101SetOperators01::productFirstChars@30 + IL_00b8: stloc.s productFirstChars .line 37,37 : 5,10 '' - IL_00bc: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00c1: stloc.s V_12 - IL_00c3: ldnull - IL_00c4: ldc.i4.0 - IL_00c5: ldc.i4.0 - IL_00c6: newobj instance void Linq101SetOperators01/customerFirstChars@39::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_00ba: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00bf: stloc.s V_12 + IL_00c1: ldnull + IL_00c2: ldc.i4.0 + IL_00c3: ldc.i4.0 + IL_00c4: newobj instance void Linq101SetOperators01/customerFirstChars@39::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, char) - IL_00cb: dup - IL_00cc: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101SetOperators01::customerFirstChars@36 - IL_00d1: stloc.s customerFirstChars - IL_00d3: ret + IL_00c9: dup + IL_00ca: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101SetOperators01::customerFirstChars@36 + IL_00cf: stloc.s customerFirstChars + IL_00d1: ret } // end of method $Linq101SetOperators01::main@ } // end of class ''.$Linq101SetOperators01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/QueryExpressionStepping/Linq101Where01.il.bsl index b3c994a2d28..aecbaf18528 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: {61F2D6A6-FF23-CD21-A745-0383A6D6F261} +// MVID: {61FD32BA-FF23-CD21-A745-0383BA32FD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A50000 +// Image base: 0x05C80000 // =============== CLASS MEMBERS DECLARATION =================== @@ -1160,7 +1160,7 @@ .method public static void main@() cil managed { .entrypoint - // Code size 562 (0x232) + // Code size 559 (0x22f) .maxstack 13 .locals init ([0] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 numbers, [1] class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 lowNums, @@ -1215,186 +1215,180 @@ IL_0042: dup IL_0043: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::numbers@9 IL_0048: stloc.0 - .line 12,17 : 1,20 '' - IL_0049: nop .line 13,13 : 5,10 '' - IL_004a: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_004f: stloc.s V_10 - IL_0051: ldloc.s V_10 - IL_0053: ldloc.s V_10 + IL_0049: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_004e: stloc.s V_10 + IL_0050: ldloc.s V_10 + IL_0052: ldloc.s V_10 .line 14,14 : 9,12 '' - IL_0055: ldloc.s V_10 - IL_0057: ldloc.s V_10 - IL_0059: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_numbers() - IL_005e: 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_0063: ldloc.s V_10 - IL_0065: newobj instance void Linq101Where01/'Pipe #1 input at line 13@14'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_006a: 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_0054: ldloc.s V_10 + IL_0056: ldloc.s V_10 + IL_0058: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_numbers() + IL_005d: 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_0062: ldloc.s V_10 + IL_0064: newobj instance void Linq101Where01/'Pipe #1 input at line 13@14'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0069: 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_006f: ldsfld class Linq101Where01/'Pipe #1 input at line 13@15-1' Linq101Where01/'Pipe #1 input at line 13@15-1'::@_instance - IL_0074: 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_006e: ldsfld class Linq101Where01/'Pipe #1 input at line 13@15-1' Linq101Where01/'Pipe #1 input at line 13@15-1'::@_instance + IL_0073: 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_0079: ldsfld class Linq101Where01/'Pipe #1 input at line 13@16-2' Linq101Where01/'Pipe #1 input at line 13@16-2'::@_instance - IL_007e: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0078: ldsfld class Linq101Where01/'Pipe #1 input at line 13@16-2' Linq101Where01/'Pipe #1 input at line 13@16-2'::@_instance + IL_007d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0083: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0088: stloc.s 'Pipe #1 input at line 13' + IL_0082: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0087: stloc.s 'Pipe #1 input at line 13' .line 17,17 : 10,20 '' - IL_008a: ldloc.s 'Pipe #1 input at line 13' - IL_008c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::OfSeq(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0091: dup - IL_0092: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::lowNums@12 - IL_0097: stloc.1 + IL_0089: ldloc.s 'Pipe #1 input at line 13' + IL_008b: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [FSharp.Core]Microsoft.FSharp.Collections.ListModule::OfSeq(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0090: dup + IL_0091: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::lowNums@12 + IL_0096: stloc.1 .line 20,20 : 1,32 '' - IL_0098: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() - IL_009d: dup - IL_009e: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::products@20 - IL_00a3: stloc.2 + IL_0097: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getProductList() + IL_009c: dup + IL_009d: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::products@20 + IL_00a2: stloc.2 .line 23,23 : 5,10 '' - IL_00a4: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00a9: stloc.s V_11 - IL_00ab: ldloc.s V_11 - IL_00ad: ldloc.s V_11 + IL_00a3: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00a8: stloc.s V_11 + IL_00aa: ldloc.s V_11 + IL_00ac: ldloc.s V_11 .line 24,24 : 9,12 '' - IL_00af: ldloc.s V_11 - IL_00b1: ldloc.s V_11 - IL_00b3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_products() - IL_00b8: 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_00bd: ldloc.s V_11 - IL_00bf: newobj instance void Linq101Where01/soldOutProducts@24::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_00c4: 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_00ae: ldloc.s V_11 + IL_00b0: ldloc.s V_11 + IL_00b2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_products() + IL_00b7: 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_00bc: ldloc.s V_11 + IL_00be: newobj instance void Linq101Where01/soldOutProducts@24::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_00c3: 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_00c9: ldsfld class Linq101Where01/'soldOutProducts@25-1' Linq101Where01/'soldOutProducts@25-1'::@_instance - IL_00ce: 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_00c8: ldsfld class Linq101Where01/'soldOutProducts@25-1' Linq101Where01/'soldOutProducts@25-1'::@_instance + IL_00cd: 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_00d3: ldsfld class Linq101Where01/'soldOutProducts@26-2' Linq101Where01/'soldOutProducts@26-2'::@_instance - IL_00d8: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_00d2: ldsfld class Linq101Where01/'soldOutProducts@26-2' Linq101Where01/'soldOutProducts@26-2'::@_instance + IL_00d7: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_00dd: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_00e2: dup - IL_00e3: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101Where01::soldOutProducts@22 - IL_00e8: stloc.3 + IL_00dc: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_00e1: dup + IL_00e2: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101Where01::soldOutProducts@22 + IL_00e7: stloc.3 .line 31,31 : 5,10 '' - IL_00e9: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_00ee: stloc.s V_12 - IL_00f0: ldloc.s V_12 - IL_00f2: ldloc.s V_12 + IL_00e8: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_00ed: stloc.s V_12 + IL_00ef: ldloc.s V_12 + IL_00f1: ldloc.s V_12 .line 32,32 : 9,12 '' - IL_00f4: ldloc.s V_12 - IL_00f6: ldloc.s V_12 - IL_00f8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_products() - IL_00fd: 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_0102: ldloc.s V_12 - IL_0104: newobj instance void Linq101Where01/expensiveInStockProducts@32::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_0109: 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_00f3: ldloc.s V_12 + IL_00f5: ldloc.s V_12 + IL_00f7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_products() + IL_00fc: 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_0101: ldloc.s V_12 + IL_0103: newobj instance void Linq101Where01/expensiveInStockProducts@32::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_0108: 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_010e: ldsfld class Linq101Where01/'expensiveInStockProducts@33-1' Linq101Where01/'expensiveInStockProducts@33-1'::@_instance - IL_0113: 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_010d: ldsfld class Linq101Where01/'expensiveInStockProducts@33-1' Linq101Where01/'expensiveInStockProducts@33-1'::@_instance + IL_0112: 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_0118: ldsfld class Linq101Where01/'expensiveInStockProducts@34-2' Linq101Where01/'expensiveInStockProducts@34-2'::@_instance - IL_011d: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_0117: ldsfld class Linq101Where01/'expensiveInStockProducts@34-2' Linq101Where01/'expensiveInStockProducts@34-2'::@_instance + IL_011c: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0122: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_0127: dup - IL_0128: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101Where01::expensiveInStockProducts@30 - IL_012d: stloc.s expensiveInStockProducts + IL_0121: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0126: dup + IL_0127: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101Where01::expensiveInStockProducts@30 + IL_012c: stloc.s expensiveInStockProducts .line 38,38 : 1,34 '' - IL_012f: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() - IL_0134: dup - IL_0135: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::customers@38 - IL_013a: stloc.s customers - .line 40,45 : 1,21 '' - IL_013c: nop + IL_012e: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 [Utils]Utils::getCustomerList() + IL_0133: dup + IL_0134: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::customers@38 + IL_0139: stloc.s customers .line 41,41 : 5,10 '' - IL_013d: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0142: stloc.s V_14 + IL_013b: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0140: stloc.s V_14 + IL_0142: ldloc.s V_14 IL_0144: ldloc.s V_14 - IL_0146: ldloc.s V_14 .line 42,42 : 9,12 '' + IL_0146: ldloc.s V_14 IL_0148: ldloc.s V_14 - IL_014a: ldloc.s V_14 - IL_014c: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_customers() - IL_0151: 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_0156: ldloc.s V_14 - IL_0158: newobj instance void Linq101Where01/'Pipe #2 input at line 41@42'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) - IL_015d: 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_014a: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 Linq101Where01::get_customers() + IL_014f: 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_0154: ldloc.s V_14 + IL_0156: newobj instance void Linq101Where01/'Pipe #2 input at line 41@42'::.ctor(class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder) + IL_015b: 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_0162: ldsfld class Linq101Where01/'Pipe #2 input at line 41@43-1' Linq101Where01/'Pipe #2 input at line 41@43-1'::@_instance - IL_0167: 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_0160: ldsfld class Linq101Where01/'Pipe #2 input at line 41@43-1' Linq101Where01/'Pipe #2 input at line 41@43-1'::@_instance + IL_0165: 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_016c: ldsfld class Linq101Where01/'Pipe #2 input at line 41@44-2' Linq101Where01/'Pipe #2 input at line 41@44-2'::@_instance - IL_0171: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, + IL_016a: ldsfld class Linq101Where01/'Pipe #2 input at line 41@44-2' Linq101Where01/'Pipe #2 input at line 41@44-2'::@_instance + IL_016f: callvirt instance class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2 [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder::Select(class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2, class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2) - IL_0176: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() - IL_017b: stloc.s 'Pipe #2 input at line 41' + IL_0174: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerable`1 class [FSharp.Core]Microsoft.FSharp.Linq.QuerySource`2::get_Source() + IL_0179: stloc.s 'Pipe #2 input at line 41' .line 45,45 : 10,21 '' - IL_017d: ldloc.s 'Pipe #2 input at line 41' - IL_017f: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0184: dup - IL_0185: stsfld class [Utils]Utils/Customer[] ''.$Linq101Where01::waCustomers@40 - IL_018a: stloc.s waCustomers + IL_017b: ldloc.s 'Pipe #2 input at line 41' + IL_017d: call !!0[] [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::ToArray(class [mscorlib]System.Collections.Generic.IEnumerable`1) + IL_0182: dup + IL_0183: stsfld class [Utils]Utils/Customer[] ''.$Linq101Where01::waCustomers@40 + IL_0188: stloc.s waCustomers .line 48,48 : 1,96 '' - IL_018c: ldstr "zero" - IL_0191: ldstr "one" - IL_0196: ldstr "two" - IL_019b: ldstr "three" - IL_01a0: ldstr "four" - IL_01a5: ldstr "five" - IL_01aa: ldstr "six" - IL_01af: ldstr "seven" - IL_01b4: ldstr "eight" - IL_01b9: ldstr "nine" - IL_01be: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() - IL_01c3: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_018a: ldstr "zero" + IL_018f: ldstr "one" + IL_0194: ldstr "two" + IL_0199: ldstr "three" + IL_019e: ldstr "four" + IL_01a3: ldstr "five" + IL_01a8: ldstr "six" + IL_01ad: ldstr "seven" + IL_01b2: ldstr "eight" + IL_01b7: ldstr "nine" + IL_01bc: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::get_Empty() + IL_01c1: 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_01c8: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_01c6: 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_01cd: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_01cb: 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_01d2: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_01d0: 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_01d7: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_01d5: 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_01dc: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_01da: 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_01e1: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_01df: 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_01e6: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_01e4: 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_01eb: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_01e9: 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_01f0: call class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1::Cons(!0, + IL_01ee: 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_01f5: dup - IL_01f6: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::digits@48 - IL_01fb: stloc.s digits - .line 49,55 : 1,21 '' - IL_01fd: nop + IL_01f3: dup + IL_01f4: stsfld class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 ''.$Linq101Where01::digits@48 + IL_01f9: stloc.s digits .line 50,50 : 5,10 '' - IL_01fe: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() - IL_0203: stloc.s V_16 - IL_0205: ldnull - IL_0206: ldc.i4.0 - IL_0207: ldnull - IL_0208: newobj instance void Linq101Where01/'Pipe #3 input at line 50@52'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, + IL_01fb: call class [FSharp.Core]Microsoft.FSharp.Linq.QueryBuilder [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::get_query() + IL_0200: stloc.s V_16 + IL_0202: ldnull + IL_0203: ldc.i4.0 + IL_0204: ldnull + IL_0205: newobj instance void Linq101Where01/'Pipe #3 input at line 50@52'::.ctor(class [mscorlib]System.Collections.Generic.IEnumerator`1, int32, string) - IL_020d: stloc.s 'Pipe #3 input at line 50' + IL_020a: stloc.s 'Pipe #3 input at line 50' .line 54,54 : 8,68 '' - IL_020f: ldsfld class Linq101Where01/'Pipe #3 stage #1 at line 54@54' Linq101Where01/'Pipe #3 stage #1 at line 54@54'::@_instance - IL_0214: ldloc.s 'Pipe #3 input at line 50' - IL_0216: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::MapIndexed>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + IL_020c: ldsfld class Linq101Where01/'Pipe #3 stage #1 at line 54@54' Linq101Where01/'Pipe #3 stage #1 at line 54@54'::@_instance + IL_0211: ldloc.s 'Pipe #3 input at line 50' + IL_0213: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::MapIndexed>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_021b: stloc.s 'Pipe #3 stage #1 at line 54' + IL_0218: stloc.s 'Pipe #3 stage #1 at line 54' .line 55,55 : 8,21 '' - IL_021d: ldsfld class Linq101Where01/shortDigits@55 Linq101Where01/shortDigits@55::@_instance - IL_0222: ldloc.s 'Pipe #3 stage #1 at line 54' - IL_0224: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Choose,string>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, + IL_021a: ldsfld class Linq101Where01/shortDigits@55 Linq101Where01/shortDigits@55::@_instance + IL_021f: ldloc.s 'Pipe #3 stage #1 at line 54' + IL_0221: call class [mscorlib]System.Collections.Generic.IEnumerable`1 [FSharp.Core]Microsoft.FSharp.Collections.SeqModule::Choose,string>(class [FSharp.Core]Microsoft.FSharp.Core.FSharpFunc`2>, class [mscorlib]System.Collections.Generic.IEnumerable`1) - IL_0229: dup - IL_022a: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101Where01::shortDigits@49 - IL_022f: stloc.s shortDigits - IL_0231: ret + IL_0226: dup + IL_0227: stsfld class [mscorlib]System.Collections.Generic.IEnumerable`1 ''.$Linq101Where01::shortDigits@49 + IL_022c: stloc.s shortDigits + IL_022e: ret } // end of method $Linq101Where01::main@ } // end of class ''.$Linq101Where01 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction20.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction20.il.bsl index 65316d43de6..ffddfd77ac5 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction20.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction20.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000398 Length: 0x00000100 } .module TestFunction20.exe -// MVID: {61F2D6A5-A643-44FB-A745-0383A5D6F261} +// MVID: {61FD32BA-A643-44FB-A745-0383BA32FD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07180000 +// Image base: 0x06C20000 // =============== CLASS MEMBERS DECLARATION =================== @@ -66,7 +66,7 @@ .locals init ([0] int32 z, [1] int32 w) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 4,4 : 6,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction20.fs' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction20.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction23.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction23.il.bsl index 30075ba25bc..25c7d5cba86 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction23.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction23.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000340 Length: 0x000000E3 } .module TestFunction23.exe -// MVID: {61FC3629-A643-451C-A745-03832936FC61} +// MVID: {61FD32BA-A643-451C-A745-0383BA32FD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07640000 +// Image base: 0x07260000 // =============== CLASS MEMBERS DECLARATION =================== @@ -63,7 +63,7 @@ // Code size 31 (0x1f) .maxstack 8 .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' - .line 5,5 : 6,7 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction23.fs' + .line 100001,100001 : 0,0 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\TestFunctions\\TestFunction23.fs' IL_0000: ldarg.0 IL_0001: callvirt instance void [mscorlib]System.Object::.ctor() IL_0006: ldarg.0 From 5d454aefc5344d973b58f037d9b81e8cf77c30e7 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 Feb 2022 16:00:25 +0000 Subject: [PATCH 20/35] better debug points for yield/return --- docs/debug-emit.md | 10 +- src/fsharp/CheckComputationExpressions.fs | 130 +++++++++++++----- src/fsharp/CheckExpressions.fs | 15 +- src/fsharp/SyntaxTree.fs | 5 +- src/fsharp/SyntaxTree.fsi | 5 +- src/fsharp/SyntaxTreeOps.fs | 2 +- src/fsharp/service/FSharpParseFileResults.fs | 10 +- src/fsharp/service/ServiceParseTreeWalk.fs | 2 +- .../AsyncExpressionSteppingTest1.il.bsl | 6 +- .../GeneratedIterators/GenIter01.il.bsl | 6 +- .../GeneratedIterators/GenIter02.il.bsl | 6 +- .../GeneratedIterators/GenIter03.il.bsl | 6 +- .../GeneratedIterators/GenIter04.il.bsl | 6 +- .../ListExpressionSteppingTest1.il.bsl | 23 ++-- .../ListExpressionSteppingTest2.il.bsl | 8 +- .../ListExpressionSteppingTest3.il.bsl | 6 +- .../ListExpressionSteppingTest4.il.bsl | 8 +- .../ListExpressionSteppingTest5.il.bsl | 8 +- .../ListExpressionSteppingTest6.il.bsl | 8 +- .../EmittedIL/Misc/CodeGenRenamings01.il.bsl | 8 +- .../CodeGen/EmittedIL/Misc/Decimal01.il.bsl | 6 +- .../SeqExpressionSteppingTest1.il.bsl | 6 +- .../SeqExpressionSteppingTest2.il.bsl | 8 +- .../SeqExpressionSteppingTest3.il.bsl | 6 +- .../SeqExpressionSteppingTest4.il.bsl | 8 +- .../SeqExpressionSteppingTest5.il.bsl | 8 +- .../SeqExpressionSteppingTest6.il.bsl | 8 +- .../SeqExpressionSteppingTest7.il.bsl | 8 +- .../SeqExpressionTailCalls01.il.bsl | 8 +- .../SeqExpressionTailCalls02.il.bsl | 12 +- .../TestFunctions/TestFunction3b.il.bsl | 6 +- .../TestFunctions/Testfunction22b.il.bsl | 6 +- .../TestFunctions/Testfunction22c.il.bsl | 6 +- .../CodeGen/EmittedIL/Tuples/Tuple01.il.bsl | 6 +- .../CodeGen/EmittedIL/Tuples/Tuple02.il.bsl | 6 +- .../CodeGen/EmittedIL/Tuples/Tuple03.il.bsl | 6 +- .../CodeGen/EmittedIL/Tuples/Tuple04.il.bsl | 6 +- .../CodeGen/EmittedIL/Tuples/Tuple05.il.bsl | 6 +- .../CodeGen/EmittedIL/Tuples/Tuple06.il.bsl | 6 +- .../CodeGen/EmittedIL/Tuples/Tuple07.il.bsl | 6 +- .../CodeGen/EmittedIL/Tuples/Tuple08.il.bsl | 6 +- 41 files changed, 235 insertions(+), 187 deletions(-) diff --git a/docs/debug-emit.md b/docs/debug-emit.md index fe0b833cf85..e0e89f20e7d 100644 --- a/docs/debug-emit.md +++ b/docs/debug-emit.md @@ -108,7 +108,7 @@ The intended debug points for constructs are determined by syntax as follows. P | `for .. in collection-expr do BODY-EXPR` | Debug points over `for`, `in` and `collection-expr` | | `try TRY-EXPR with .. -> HANDLER-EXPR` | Debug points over `try` and `with` | | `try TRY-EXPR finally .. -> FINALLY-EXPR` | Debug points `try` and `finally` | -| `use x = leaf-expr in BODY-EXPR` | Debug point over `let x = leaf-expr`. | +| `use x = leaf-expr in BODY-EXPR` | Debug point over `use x = leaf-expr`. | | `use x = NON-LEAF-EXPR in BODY-EXPR` | | | `EXPR; EXPR` | | | `(fun .. -> BODY-EXPR)` | Not a leaf, do not produce a debug point on outer expression, but include them on BODY-EXPR | @@ -118,10 +118,10 @@ The intended debug points for constructs are determined by syntax as follows. P | Pipe `EXPR1 |> EXPR2` | | | Pipe `(EXPR1, EXPR2) ||> EXPR3` | | | Pipe `(EXPR1, EXPR2, EXPR3) |||> EXPR4` | | -| `yield EXPR` | | -| `yield! EXPR` | | -| `return EXPR` | | -| `return! EXPR` | | +| `yield leaf-expr` | Debug point over 'yield expr' | +| `yield! leaf-expr` | Debug point over 'yield! expr' | +| `return leaf-expr` | Debug point over 'return expr' | +| `return! leaf-expr` | Debug point over 'return! expr' | | `[ BODY ]` | See notes below. If a computed list expression with yields (explicit or implicit) then process as control-flow. Otherwise treat as leaf | | `[| BODY |]` | See notes below. If a computed list expression with yields (explicit or implicit) then process as control-flow. Otherwise treat as leaf | | `seq { BODY }` | See notes below | diff --git a/src/fsharp/CheckComputationExpressions.fs b/src/fsharp/CheckComputationExpressions.fs index ef79b8a9af5..69d8a5b48aa 100644 --- a/src/fsharp/CheckComputationExpressions.fs +++ b/src/fsharp/CheckComputationExpressions.fs @@ -754,7 +754,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let addBindDebugPoint spBind e = match spBind with | DebugPointAtBinding.Yes m -> - SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes m, true), e) + SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes m, false, e) | _ -> e let emptyVarSpace = LazyWithContext.NotLazy ([], env) @@ -982,7 +982,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let forCall = match spFor with | DebugPointAtFor.Yes _ -> - SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mFor, true), forCall) + SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes mFor, false, forCall) | DebugPointAtFor.No -> forCall translatedCtxt forCall)) @@ -1011,7 +1011,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let guardExpr = match spWhile with | DebugPointAtWhile.Yes _ -> - SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mWhile, true), guardExpr) + SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes mWhile, false, guardExpr) | DebugPointAtWhile.No -> guardExpr Some(trans CompExprTranslationPass.Initial q varSpace innerComp (fun holeFill -> @@ -1029,7 +1029,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let unwindExpr2 = match spFinally with | DebugPointAtFinally.Yes _ -> - SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mFinally, false), unwindExpr) + SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes mFinally, true, unwindExpr) | DebugPointAtFinally.No -> unwindExpr if isQuery then error(Error(FSComp.SR.tcNoTryFinallyInQuery(), mTry)) @@ -1045,7 +1045,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let innerExpr = match spTry with | DebugPointAtTry.Yes _ -> - SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mTry, false), innerExpr) + SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes mTry, true, innerExpr) | _ -> innerExpr Some (translatedCtxt @@ -1412,7 +1412,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter let innerExpr = match spTry with | DebugPointAtTry.Yes _ -> - SynExpr.DebugPoint(Some (DebugPointAtLeafExpr.Yes mTry, false), innerExpr) + SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes mTry, true, innerExpr) | _ -> innerExpr let callExpr = @@ -1423,40 +1423,52 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter Some(translatedCtxt callExpr) - | SynExpr.YieldOrReturnFrom ((true, _), yieldExpr, m) -> - let yieldFromExpr = mkSourceExpr yieldExpr + | SynExpr.YieldOrReturnFrom ((true, _), synYieldExpr, m) -> + let yieldFromExpr = mkSourceExpr synYieldExpr if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env m ad "YieldFrom" builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod("YieldFrom"), m)) + let yieldFromCall = mkSynCall "YieldFrom" m [yieldFromExpr] + let yieldFromCall = - mkSynCall "YieldFrom" m [yieldFromExpr] - |> fun e -> SynExpr.DebugPoint(None, e) + if IsControlFlowExpression synYieldExpr then + yieldFromCall + else + SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes m, false, yieldFromCall) Some (translatedCtxt yieldFromCall) - | SynExpr.YieldOrReturnFrom ((false, _), returnedExpr, m) -> - let returnFromExpr = mkSourceExpr returnedExpr + | SynExpr.YieldOrReturnFrom ((false, _), synReturnExpr, m) -> + let returnFromExpr = mkSourceExpr synReturnExpr if isQuery then error(Error(FSComp.SR.tcReturnMayNotBeUsedInQueries(), m)) if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env m ad "ReturnFrom" builderTy) then - errorR(Error(FSComp.SR.tcRequireBuilderMethod("ReturnFrom"), m)) - Some (translatedCtxt returnFromExpr) - else - let returnFromCall = - mkSynCall "ReturnFrom" m [returnFromExpr] - |> fun e -> SynExpr.DebugPoint(None, e) - Some (translatedCtxt returnFromCall) + error(Error(FSComp.SR.tcRequireBuilderMethod("ReturnFrom"), m)) + + let returnFromCall = mkSynCall "ReturnFrom" m [returnFromExpr] + + let returnFromCall = + if IsControlFlowExpression synReturnExpr then + returnFromCall + else + SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes m, false, returnFromCall) - | SynExpr.YieldOrReturn ((isYield, _), yieldOrReturnExpr, m) -> + Some (translatedCtxt returnFromCall) + + | SynExpr.YieldOrReturn ((isYield, _), synYieldOrReturnExpr, m) -> let methName = (if isYield then "Yield" else "Return") if isQuery && not isYield then error(Error(FSComp.SR.tcReturnMayNotBeUsedInQueries(), m)) if isNil (TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env m ad methName builderTy) then error(Error(FSComp.SR.tcRequireBuilderMethod(methName), m)) + let yieldOrReturnCall = mkSynCall methName m [synYieldOrReturnExpr] + let yieldOrReturnCall = - mkSynCall methName m [yieldOrReturnExpr] - |> fun e -> SynExpr.DebugPoint(None, e) + if IsControlFlowExpression synYieldOrReturnExpr then + yieldOrReturnCall + else + SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes m, false, yieldOrReturnCall) Some(translatedCtxt yieldOrReturnCall) @@ -1655,7 +1667,10 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter and convertSimpleReturnToExpr varSpace innerComp = match innerComp with - | SynExpr.YieldOrReturn ((false, _), returnExpr, _) -> Some (returnExpr, None) + | SynExpr.YieldOrReturn ((false, _), returnExpr, m) -> + let returnExpr = SynExpr.DebugPoint(DebugPointAtLeafExpr.Yes m, false, returnExpr) + Some (returnExpr, None) + | SynExpr.Match (mMatch, spMatch, mWith, expr, clauses, m) -> let clauses = clauses |> List.map (fun (SynMatchClause(pat, cond, innerComp2, patm, sp, trivia)) -> @@ -1957,11 +1972,14 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m = error(Error(FSComp.SR.tcDoBangIllegalInSequenceExpression(), m)) | SynExpr.Sequential (sp, true, innerComp1, innerComp2, m) -> - // "expr; cexpr" is treated as sequential execution - // "cexpr; cexpr" is treated as append let env1 = { env with eIsControlFlow = (match sp with DebugPointAtSequential.SuppressNeither | DebugPointAtSequential.SuppressExpr -> true | _ -> false) } + let res, tpenv = tcSequenceExprBodyAsSequenceOrStatement env1 genOuterTy tpenv innerComp1 + let env2 = { env with eIsControlFlow = (match sp with DebugPointAtSequential.SuppressNeither | DebugPointAtSequential.SuppressStmt -> true | _ -> false) } + + // "expr; cexpr" is treated as sequential execution + // "cexpr; cexpr" is treated as append match res with | Choice1Of2 innerExpr1 -> let innerExpr2, tpenv = tcSequenceExprBody env2 genOuterTy tpenv innerComp2 @@ -1995,20 +2013,28 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m = let bindPatTy = NewInferenceType () let inputExprTy = NewInferenceType () let pat', _, vspecs, envinner, tpenv = TcMatchPattern cenv bindPatTy env tpenv (pat, None) + UnifyTypes cenv env m inputExprTy bindPatTy + let inputExpr, tpenv = let env = { env with eIsControlFlow = true } TcExpr cenv (MustEqual inputExprTy) env tpenv rhsExpr + let innerExpr, tpenv = let envinner = { envinner with eIsControlFlow = true } tcSequenceExprBody envinner genOuterTy tpenv innerComp + let mBind = match spBind with | DebugPointAtBinding.Yes m -> m.NoteSourceConstruct(NotedSourceConstruct.Binding) | _ -> inputExpr.Range + let inputExprMark = inputExpr.Range + let matchv, matchExpr = compileSeqExprMatchClauses cenv envinner inputExprMark (pat', vspecs) innerExpr (Some inputExpr) bindPatTy genOuterTy + let consumeExpr = mkLambda mBind matchv (matchExpr, genOuterTy) + // The 'mBind' is attached to the lambda Some(mkSeqUsing cenv env wholeExprMark bindPatTy genOuterTy inputExpr consumeExpr, tpenv) @@ -2017,37 +2043,63 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m = | SynExpr.Match (_mMatch, spMatch, expr, _mWith, clauses, _m) -> let inputExpr, matchty, tpenv = TcExprOfUnknownType cenv env tpenv expr + let tclauses, tpenv = (tpenv, clauses) ||> List.mapFold (fun tpenv (SynMatchClause(pat, cond, innerComp, _, sp, _)) -> - let pat', cond', vspecs, envinner, tpenv = TcMatchPattern cenv matchty env tpenv (pat, cond) - let envinner = match sp with DebugPointAtTarget.Yes -> { envinner with eIsControlFlow = true } | DebugPointAtTarget.No -> envinner + let patR, condR, vspecs, envinner, tpenv = TcMatchPattern cenv matchty env tpenv (pat, cond) + let envinner = + match sp with + | DebugPointAtTarget.Yes -> { envinner with eIsControlFlow = true } + | DebugPointAtTarget.No -> envinner let innerExpr, tpenv = tcSequenceExprBody envinner genOuterTy tpenv innerComp - TClause(pat', cond', TTarget(vspecs, innerExpr, None), pat'.Range), tpenv) + TClause(patR, condR, TTarget(vspecs, innerExpr, None), patR.Range), tpenv) + let inputExprTy = tyOfExpr cenv.g inputExpr let inputExprMark = inputExpr.Range let matchv, matchExpr = CompilePatternForMatchClauses cenv env inputExprMark inputExprMark true ThrowIncompleteMatchException (Some inputExpr) inputExprTy genOuterTy tclauses + Some(mkLet spMatch inputExprMark matchv inputExpr matchExpr, tpenv) | SynExpr.TryWith (trivia={ TryToWithRange = mTryToWith }) -> error(Error(FSComp.SR.tcTryIllegalInSequenceExpression(), mTryToWith)) - | SynExpr.YieldOrReturnFrom ((isYield, _), yieldExpr, m) -> - let env = { env with eIsControlFlow = true } - let resultExpr, genExprTy, tpenv = TcExprOfUnknownType cenv env tpenv yieldExpr + | SynExpr.YieldOrReturnFrom ((isYield, _), synYieldExpr, m) -> + let env = { env with eIsControlFlow = false } + let resultExpr, genExprTy, tpenv = TcExprOfUnknownType cenv env tpenv synYieldExpr if not isYield then errorR(Error(FSComp.SR.tcUseYieldBangForMultipleResults(), m)) AddCxTypeMustSubsumeType ContextInfo.NoContext env.DisplayEnv cenv.css m NoTrace genOuterTy genExprTy - Some(mkCoerceExpr(resultExpr, genOuterTy, m, genExprTy), tpenv) - | SynExpr.YieldOrReturn ((isYield, _), yieldExpr, m) -> - let env = { env with eIsControlFlow = true } + let resultExpr = mkCoerceExpr(resultExpr, genOuterTy, m, genExprTy) + + let resultExpr = + if IsControlFlowExpression synYieldExpr then + resultExpr + else + mkDebugPoint m resultExpr + + Some(resultExpr, tpenv) + + | SynExpr.YieldOrReturn ((isYield, _), synYieldExpr, m) -> + let env = { env with eIsControlFlow = false } let genResultTy = NewInferenceType () + if not isYield then errorR(Error(FSComp.SR.tcSeqResultsUseYield(), m)) + UnifyTypes cenv env m genOuterTy (mkSeqTy cenv.g genResultTy) - let resultExpr, tpenv = TcExprFlex cenv flex true genResultTy env tpenv yieldExpr - Some(mkCallSeqSingleton cenv.g m genResultTy resultExpr, tpenv ) + let resultExpr, tpenv = TcExprFlex cenv flex true genResultTy env tpenv synYieldExpr + + let resultExpr = mkCallSeqSingleton cenv.g m genResultTy resultExpr + + let resultExpr = + if IsControlFlowExpression synYieldExpr then + resultExpr + else + mkDebugPoint m resultExpr + + Some(resultExpr, tpenv ) | _ -> None @@ -2065,7 +2117,9 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m = match tryTcSequenceExprBody env genOuterTy tpenv comp with | Some (expr, tpenv) -> Choice1Of2 expr, tpenv | None -> + let env = { env with eContextInfo = ContextInfo.SequenceExpression genOuterTy } + if enableImplicitYield then let hasTypeUnit, expr, tpenv = TryTcStmt cenv env tpenv comp if hasTypeUnit then @@ -2092,7 +2146,9 @@ let TcSequenceExpressionEntry (cenv: cenv) env (overallTy: OverallTy) tpenv (has | None -> let implicitYieldEnabled = cenv.g.langVersion.SupportsFeature LanguageFeature.ImplicitYield + let validateObjectSequenceOrRecordExpression = not implicitYieldEnabled + match comp with | SynExpr.New _ -> errorR(Error(FSComp.SR.tcInvalidObjectExpressionSyntaxForm(), m)) @@ -2122,9 +2178,9 @@ let TcArrayOrListComputedExpression (cenv: cenv) env (overallTy: OverallTy) tpen let exprTy = mkSeqTy cenv.g genCollElemTy let expr, tpenv = TcExpr cenv (MustEqual exprTy) env tpenv replacementExpr + let expr = if cenv.g.compilingFslib then - //warning(Error(FSComp.SR.fslibUsingComputedListOrArray(), expr.Range)) expr else // We add a call to 'seq ... ' to make sure sequence expression compilation gets applied to the contents of the diff --git a/src/fsharp/CheckExpressions.fs b/src/fsharp/CheckExpressions.fs index 1757cf89912..9b36eeab41d 100644 --- a/src/fsharp/CheckExpressions.fs +++ b/src/fsharp/CheckExpressions.fs @@ -5749,15 +5749,10 @@ and TcExprUndelayed cenv (overallTy: OverallTy) env tpenv (synExpr: SynExpr) = TcNonControlFlowExpr env <| fun env -> TcAssertExpr cenv overallTy env m tpenv x - | SynExpr.DebugPoint (dpOpt, innerExpr) -> - match dpOpt with - | Some (dp , isExpr)-> - let env = if isExpr then { env with eIsControlFlow = false } else { env with eIsControlFlow = true } - let innerExprR, tpenv = TcExpr cenv overallTy env tpenv innerExpr - Expr.DebugPoint (dp, innerExprR), tpenv - | None -> - let env = { env with eIsControlFlow = true } - TcExpr cenv overallTy env tpenv innerExpr + | SynExpr.DebugPoint (dp, isControlFlow, innerExpr) -> + let env = { env with eIsControlFlow = isControlFlow } + let innerExprR, tpenv = TcExpr cenv overallTy env tpenv innerExpr + Expr.DebugPoint (dp, innerExprR), tpenv | SynExpr.Fixed (_, m) -> error(Error(FSComp.SR.tcFixedNotAllowed(), m)) @@ -8618,7 +8613,7 @@ and TcImplicitOpItemThen cenv overallTy env id sln tpenv mItem delayed = | SynExpr.InferredUpcast (synExpr, _) | SynExpr.InferredDowncast (synExpr, _) | SynExpr.AddressOf (_, synExpr, _, _) - | SynExpr.DebugPoint (_, synExpr) + | SynExpr.DebugPoint (_, _, synExpr) | SynExpr.Quote (_, _, synExpr, _, _) -> isSimpleArgument synExpr | SynExpr.InterpolatedString _ diff --git a/src/fsharp/SyntaxTree.fs b/src/fsharp/SyntaxTree.fs index 172c9a33e39..13b1e2e6937 100644 --- a/src/fsharp/SyntaxTree.fs +++ b/src/fsharp/SyntaxTree.fs @@ -849,7 +849,8 @@ type SynExpr = range: range | DebugPoint of - debugPoint: (DebugPointAtLeafExpr * bool) option * + debugPoint: DebugPointAtLeafExpr * + isControlFlow: bool * innerExpr: SynExpr member e.Range = @@ -922,7 +923,7 @@ type SynExpr = | SynExpr.Fixed (range=m) | SynExpr.InterpolatedString (range=m) -> m | SynExpr.Ident id -> id.idRange - | SynExpr.DebugPoint (_, innerExpr) -> innerExpr.Range + | SynExpr.DebugPoint (_, _, innerExpr) -> innerExpr.Range member e.RangeWithoutAnyExtraDot = match e with diff --git a/src/fsharp/SyntaxTree.fsi b/src/fsharp/SyntaxTree.fsi index e92797cf630..a727a578151 100644 --- a/src/fsharp/SyntaxTree.fsi +++ b/src/fsharp/SyntaxTree.fsi @@ -14,11 +14,9 @@ type Ident = member idText: string member idRange: range - /// Represents a long identifier e.g. 'A.B.C' type LongIdent = Ident list - /// Represents a long identifier with possible '.' at end. /// /// Typically dotRanges.Length = lid.Length-1, but they may be same if (incomplete) code ends in a dot, e.g. "Foo.Bar." @@ -1053,7 +1051,8 @@ type SynExpr = /// Debug points arising from computation expressions | DebugPoint of - debugPoint: (DebugPointAtLeafExpr * bool) option * + debugPoint: DebugPointAtLeafExpr * + isControlFlow: bool * innerExpr: SynExpr /// Gets the syntax range of this construct diff --git a/src/fsharp/SyntaxTreeOps.fs b/src/fsharp/SyntaxTreeOps.fs index dbc5d8d5922..1824d4d462b 100644 --- a/src/fsharp/SyntaxTreeOps.fs +++ b/src/fsharp/SyntaxTreeOps.fs @@ -736,7 +736,7 @@ let rec synExprContainsError inpExpr = | SynExpr.YieldOrReturnFrom (_, e, _) | SynExpr.DoBang (e, _) | SynExpr.Fixed (e, _) - | SynExpr.DebugPoint (_, e) + | SynExpr.DebugPoint (_, _, e) | SynExpr.Paren (e, _, _, _) -> walkExpr e diff --git a/src/fsharp/service/FSharpParseFileResults.fs b/src/fsharp/service/FSharpParseFileResults.fs index e58e2e5e6cb..c0f048af142 100644 --- a/src/fsharp/service/FSharpParseFileResults.fs +++ b/src/fsharp/service/FSharpParseFileResults.fs @@ -510,13 +510,9 @@ type FSharpParseFileResults(diagnostics: FSharpDiagnostic[], input: ParsedInput, | SynInterpolatedStringPart.String _ -> () | SynInterpolatedStringPart.FillExpr (fillExpr, _) -> yield fillExpr ] - | SynExpr.DebugPoint (dpOpt, innerExpr) -> - match dpOpt with - | Some (DebugPointAtLeafExpr.Yes m, isExpr) -> - yield! checkRange m - yield! walkExpr (not isExpr) innerExpr - | None -> - yield! walkExpr true innerExpr + | SynExpr.DebugPoint (DebugPointAtLeafExpr.Yes m, isControlFlow, innerExpr) -> + yield! checkRange m + yield! walkExpr isControlFlow innerExpr | SynExpr.YieldOrReturn (_, e, m) -> yield! checkRange m diff --git a/src/fsharp/service/ServiceParseTreeWalk.fs b/src/fsharp/service/ServiceParseTreeWalk.fs index c21dce58a60..b7a00f01be3 100755 --- a/src/fsharp/service/ServiceParseTreeWalk.fs +++ b/src/fsharp/service/ServiceParseTreeWalk.fs @@ -467,7 +467,7 @@ module SyntaxTraversal = | SynExpr.Fixed (synExpr, _range) -> traverseSynExpr synExpr - | SynExpr.DebugPoint (_, synExpr) -> traverseSynExpr synExpr + | SynExpr.DebugPoint (_, _, synExpr) -> traverseSynExpr synExpr | SynExpr.App (_exprAtomicFlag, isInfix, synExpr, synExpr2, _range) -> if isInfix then diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl index 4b43c80e4ce..821abbd9685 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/AsyncExpressionStepping/AsyncExpressionSteppingTest1.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly AsyncExpressionSteppingTest1 { @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000B1 } .module AsyncExpressionSteppingTest1.dll -// MVID: {61F2D6A5-6394-B5D4-A745-0383A5D6F261} +// MVID: {611B0EC4-6394-B5D4-A745-0383C40E1B61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06F60000 +// Image base: 0x06680000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter01.il.bsl index 68e153e96bd..9d241560824 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: {61E07031-F836-DC98-A745-03833170E061} +// MVID: {61FD4A6D-F836-DC98-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06CC0000 +// Image base: 0x067C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -83,8 +83,8 @@ IL_0017: ldloc.1 IL_0018: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() IL_001d: stloc.3 + .line 6,6 : 12,23 '' IL_001e: ldloca.s V_0 - .line 6,6 : 18,23 '' IL_0020: ldloc.3 IL_0021: ldloc.3 IL_0022: mul diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter02.il.bsl index 1dd42f31823..645d501bfa5 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: {61E07031-F857-DC98-A745-03833170E061} +// MVID: {61FD4A6D-F857-DC98-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06D10000 +// Image base: 0x06ED0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -88,8 +88,8 @@ 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 + .line 7,7 : 12,23 '' IL_002e: ldloca.s V_0 - .line 7,7 : 18,23 '' IL_0030: ldloc.3 IL_0031: ldloc.3 IL_0032: mul diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter03.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter03.il.bsl index 425c7e292f5..c904ae04745 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: {61E07031-F77C-DC98-A745-03833170E061} +// MVID: {61FD4A6D-F77C-DC98-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04FB0000 +// Image base: 0x07420000 // =============== CLASS MEMBERS DECLARATION =================== @@ -83,8 +83,8 @@ IL_0018: ldloc.1 IL_0019: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() IL_001e: stloc.3 + .line 4,4 : 47,55 '' IL_001f: ldloca.s V_0 - .line 4,4 : 50,55 '' IL_0021: ldloc.3 IL_0022: ldloc.3 IL_0023: mul diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter04.il.bsl index c039ad2e336..f72ad318e24 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: {61E07031-F79D-DC98-A745-03833170E061} +// MVID: {61FD4A6D-F79D-DC98-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06BD0000 +// Image base: 0x070D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -110,8 +110,8 @@ IL_0018: ldloc.2 IL_0019: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() IL_001e: stloc.s x + .line 4,4 : 45,53 '' IL_0020: ldloca.s V_1 - .line 4,4 : 48,53 '' IL_0022: ldloc.s x IL_0024: ldloc.s x IL_0026: mul diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.il.bsl index a41acfab6f6..5b10949b9fe 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest1.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000270 Length: 0x000000AF } .module ListExpressionSteppingTest1.exe -// MVID: {61F02896-50CF-F6CE-A745-03839628F061} +// MVID: {61FD4A6D-50CF-F6CE-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06AA0000 +// Image base: 0x07510000 // =============== CLASS MEMBERS DECLARATION =================== @@ -58,19 +58,20 @@ .method public static class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 f0() cil managed { - // Code size 17 (0x11) + // Code size 18 (0x12) .maxstack 4 .locals init ([0] valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0) .language '{AB4F38C9-B6E6-43BA-BE3B-58080B2CCCE3}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' .line 6,6 : 9,20 'C:\\GitHub\\dsyme\\fsharp\\tests\\fsharpqa\\source\\CodeGen\\EmittedIL\\ListExpressionStepping\\ListExpressionSteppingTest1.fs' - IL_0000: ldloca.s V_0 - .line 6,6 : 17,18 '' - IL_0002: ldc.i4.1 - IL_0003: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0008: nop - IL_0009: ldloca.s V_0 - IL_000b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0010: ret + IL_0000: nop + .line 6,6 : 11,18 '' + IL_0001: ldloca.s V_0 + IL_0003: ldc.i4.1 + IL_0004: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0009: nop + IL_000a: ldloca.s V_0 + IL_000c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0011: ret } // end of method ListExpressionSteppingTest1::f0 } // end of class ListExpressionSteppingTest1 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest2.il.bsl index 3e9e182b557..c9c2bef48b9 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: {61FD32BA-D3DE-B780-A745-0383BA32FD61} +// MVID: {61FD4A6D-D3DE-B780-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06760000 +// Image base: 0x06FC0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -289,8 +289,8 @@ 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_0011: ldloca.s V_0 - .line 7,7 : 17,18 '' IL_0013: ldc.i4.1 IL_0014: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0019: nop @@ -299,8 +299,8 @@ 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_002a: ldloca.s V_0 - .line 9,9 : 17,18 '' IL_002c: ldc.i4.2 IL_002d: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0032: nop diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.il.bsl index 244684f7611..67d4ffdb520 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest3.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000280 Length: 0x000000AF } .module ListExpressionSteppingTest3.exe -// MVID: {61F02896-AE45-39B4-A745-03839628F061} +// MVID: {61FD4A6D-AE45-39B4-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06FB0000 +// Image base: 0x06BE0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -84,8 +84,8 @@ IL_001d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_0022: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0027: pop + .line 10,10 : 14,21 '' IL_0028: ldloca.s V_1 - .line 10,10 : 20,21 '' IL_002a: ldloc.0 IL_002b: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1>::Add(!0) IL_0030: nop diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest4.il.bsl index 002ec20729c..a9e8feff346 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: {61F02896-3154-FA67-A745-03839628F061} +// MVID: {61FD4A6D-3154-FA67-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06FE0000 +// Image base: 0x07210000 // =============== CLASS MEMBERS DECLARATION =================== @@ -83,8 +83,8 @@ 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_001d: ldloca.s V_0 - .line 10,10 : 17,19 '' 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) @@ -96,8 +96,8 @@ 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_0039: ldloca.s V_0 - .line 12,12 : 17,18 '' IL_003b: ldloc.3 IL_003c: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0041: nop diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest5.il.bsl index 01a8d879860..48677cab5b4 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: {61F02896-CBE3-BFEA-A745-03839628F061} +// MVID: {61FD4A6D-CBE3-BFEA-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05020000 +// Image base: 0x06850000 // =============== CLASS MEMBERS DECLARATION =================== @@ -84,8 +84,8 @@ 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_0017: ldloca.s V_0 - .line 10,10 : 21,23 '' 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) @@ -97,8 +97,8 @@ 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_0034: ldloca.s V_0 - .line 12,12 : 21,22 '' IL_0036: ldloc.s z IL_0038: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_003d: nop diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/ListExpressionStepping/ListExpressionSteppingTest6.il.bsl index 83d96dc7b16..4ac00d88e64 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: {61F02896-98A2-AB14-A745-03839628F061} +// MVID: {61FD4A6D-98A2-AB14-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06990000 +// Image base: 0x06960000 // =============== CLASS MEMBERS DECLARATION =================== @@ -102,8 +102,8 @@ IL_0021: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_0026: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_002b: pop + .line 9,9 : 14,21 '' IL_002c: ldloca.s V_0 - .line 9,9 : 20,21 '' IL_002e: ldloc.3 IL_002f: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0034: nop @@ -156,8 +156,8 @@ IL_0077: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_007c: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0081: pop + .line 12,12 : 14,21 '' IL_0082: ldloca.s V_0 - .line 12,12 : 20,21 '' IL_0084: ldloc.s V_7 IL_0086: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_008b: nop diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/CodeGenRenamings01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/CodeGenRenamings01.il.bsl index 0275dc8ba1d..4f1575c3c40 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/CodeGenRenamings01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/CodeGenRenamings01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x000003D0 Length: 0x0000011B } .module CodeGenRenamings01.exe -// MVID: {61F02896-8173-986B-A745-03839628F061} +// MVID: {61FD4A6C-8173-986B-A745-03836C4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05910000 +// Image base: 0x07220000 // =============== CLASS MEMBERS DECLARATION =================== @@ -111,11 +111,11 @@ .line 100001,100001 : 0,0 '' IL_0024: nop + .line 9,9 : 18,30 '' IL_0025: ldarg.0 IL_0026: ldc.i4.1 IL_0027: stfld int32 CodeGenRenamings01/seq1@9::pc IL_002c: ldarg.0 - .line 9,9 : 25,29 '' IL_002d: ldc.i4.1 IL_002e: ldc.i4.1 IL_002f: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, @@ -124,11 +124,11 @@ IL_0039: ldc.i4.1 IL_003a: ret + .line 9,9 : 32,44 '' IL_003b: ldarg.0 IL_003c: ldc.i4.2 IL_003d: stfld int32 CodeGenRenamings01/seq1@9::pc IL_0042: ldarg.0 - .line 9,9 : 39,43 '' IL_0043: ldc.i4.2 IL_0044: ldc.i4.2 IL_0045: newobj instance void class [mscorlib]System.Tuple`2::.ctor(!0, diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Decimal01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Decimal01.il.bsl index 165fd198ad5..b0c34bdda4a 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Decimal01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/Decimal01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly extern netstandard { @@ -41,13 +41,13 @@ // Offset: 0x00000140 Length: 0x00000050 } .module Decimal01.exe -// MVID: {61F02896-F150-FA46-A745-03839628F061} +// MVID: {60B68B7F-F150-FA46-A745-03837F8BB660} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06C60000 +// Image base: 0x05600000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.il.bsl index 2a1f442bc0a..ef47993705d 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000AD } .module SeqExpressionSteppingTest1.exe -// MVID: {61E07032-2432-947D-A745-03833270E061} +// MVID: {61FD4A6D-2432-947D-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x071A0000 +// Image base: 0x06E10000 // =============== CLASS MEMBERS DECLARATION =================== @@ -110,11 +110,11 @@ .line 100001,100001 : 0,0 '' IL_001d: nop + .line 6,6 : 15,22 '' IL_001e: ldarg.0 IL_001f: ldc.i4.1 IL_0020: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::pc IL_0025: ldarg.0 - .line 6,6 : 21,22 '' IL_0026: ldc.i4.1 IL_0027: stfld int32 SeqExpressionSteppingTest1/SeqExpressionSteppingTest1/f0@6::current IL_002c: ldc.i4.1 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.il.bsl index da2e3ee60db..5d77287fffe 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000AD } .module SeqExpressionSteppingTest2.exe -// MVID: {61E07032-2432-951E-A745-03833270E061} +// MVID: {61FD4A6D-2432-951E-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06BB0000 +// Image base: 0x05C70000 // =============== CLASS MEMBERS DECLARATION =================== @@ -120,11 +120,11 @@ IL_002a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_002f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0034: pop + .line 6,6 : 15,22 '' IL_0035: ldarg.0 IL_0036: ldc.i4.1 IL_0037: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc IL_003c: ldarg.0 - .line 6,6 : 21,22 '' IL_003d: ldc.i4.1 IL_003e: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current IL_0043: ldc.i4.1 @@ -135,11 +135,11 @@ IL_004a: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_004f: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0054: pop + .line 8,8 : 15,22 '' IL_0055: ldarg.0 IL_0056: ldc.i4.2 IL_0057: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::pc IL_005c: ldarg.0 - .line 8,8 : 21,22 '' IL_005d: ldc.i4.2 IL_005e: stfld int32 SeqExpressionSteppingTest2/SeqExpressionSteppingTest2/f1@5::current IL_0063: ldc.i4.1 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.il.bsl index e6365e1bbb0..77563555595 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000278 Length: 0x000000AD } .module SeqExpressionSteppingTest3.exe -// MVID: {61E07032-2432-943F-A745-03833270E061} +// MVID: {61FD4A6D-2432-943F-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06C40000 +// Image base: 0x059D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -132,11 +132,11 @@ IL_003d: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_0042: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_0047: pop + .line 9,9 : 18,25 '' IL_0048: ldarg.0 IL_0049: ldc.i4.1 IL_004a: stfld int32 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::pc IL_004f: ldarg.0 - .line 9,9 : 24,25 '' IL_0050: ldarg.0 IL_0051: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::x IL_0056: stfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest3/SeqExpressionSteppingTest3/f2@6::current diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.il.bsl index 73efbe49712..1d760a896ae 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest4.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000AD } .module SeqExpressionSteppingTest4.exe -// MVID: {61E07032-2432-93E0-A745-03833270E061} +// MVID: {61FD4A6D-2432-93E0-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06DD0000 +// Image base: 0x069C0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -146,11 +146,11 @@ IL_004d: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::y IL_0052: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) IL_0057: nop + .line 9,9 : 15,23 '' IL_0058: ldarg.0 IL_0059: ldc.i4.1 IL_005a: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::pc IL_005f: ldarg.0 - .line 9,9 : 21,23 '' IL_0060: ldarg.0 IL_0061: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::x IL_0066: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) @@ -167,11 +167,11 @@ IL_0083: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) IL_0088: add IL_0089: stloc.0 + .line 11,11 : 15,22 '' IL_008a: ldarg.0 IL_008b: ldc.i4.2 IL_008c: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::pc IL_0091: ldarg.0 - .line 11,11 : 21,22 '' IL_0092: ldloc.0 IL_0093: stfld int32 SeqExpressionSteppingTest4/SeqExpressionSteppingTest4/f3@5::current IL_0098: ldc.i4.1 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest5.il.bsl index 084e329f3c5..d8d9b87bf50 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: {61E07032-2432-9401-A745-03833270E061} +// MVID: {61FD4A6D-2432-9401-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A60000 +// Image base: 0x06FD0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -150,11 +150,11 @@ IL_0052: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::y IL_0057: call void [FSharp.Core]Microsoft.FSharp.Core.Operators::Increment(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) IL_005c: nop + .line 9,9 : 19,27 '' IL_005d: ldarg.0 IL_005e: ldc.i4.2 IL_005f: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc IL_0064: ldarg.0 - .line 9,9 : 25,27 '' IL_0065: ldarg.0 IL_0066: ldfld class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::x IL_006b: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) @@ -171,11 +171,11 @@ IL_0088: call !!0 [FSharp.Core]Microsoft.FSharp.Core.Operators::op_Dereference(class [FSharp.Core]Microsoft.FSharp.Core.FSharpRef`1) IL_008d: add IL_008e: stloc.0 + .line 11,11 : 19,26 '' IL_008f: ldarg.0 IL_0090: ldc.i4.3 IL_0091: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::pc IL_0096: ldarg.0 - .line 11,11 : 25,26 '' IL_0097: ldloc.0 IL_0098: stfld int32 SeqExpressionSteppingTest5/SeqExpressionSteppingTest5/f4@5::current IL_009d: ldc.i4.1 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest6.il.bsl index 7d23cdf1ff3..619f85c4a5c 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: {61E07032-2432-94A2-A745-03833270E061} +// MVID: {61FD4A6D-2432-94A2-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x068B0000 +// Image base: 0x06F10000 // =============== CLASS MEMBERS DECLARATION =================== @@ -167,11 +167,11 @@ IL_0071: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_0076: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_007b: pop + .line 8,8 : 18,25 '' IL_007c: ldarg.0 IL_007d: ldc.i4.2 IL_007e: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc IL_0083: ldarg.0 - .line 8,8 : 24,25 '' IL_0084: ldloc.0 IL_0085: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current IL_008a: ldc.i4.1 @@ -215,11 +215,11 @@ IL_00de: newobj instance void class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`5::.ctor(string) IL_00e3: call !!0 [FSharp.Core]Microsoft.FSharp.Core.ExtraTopLevelOperators::PrintFormatLine(class [FSharp.Core]Microsoft.FSharp.Core.PrintfFormat`4) IL_00e8: pop + .line 11,11 : 18,25 '' IL_00e9: ldarg.0 IL_00ea: ldc.i4.4 IL_00eb: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::pc IL_00f0: ldarg.0 - .line 11,11 : 24,25 '' IL_00f1: ldloc.1 IL_00f2: stfld int32 SeqExpressionSteppingTest6/SeqExpressionSteppingTest6/f7@6::current IL_00f7: ldc.i4.1 diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest7.il.bsl index a68df290837..fb5d62e1ea4 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: {61EFEC61-2432-93C3-A745-038361ECEF61} +// MVID: {61FD4A6D-2432-93C3-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06830000 +// Image base: 0x07240000 // =============== CLASS MEMBERS DECLARATION =================== @@ -80,7 +80,7 @@ IL_000d: ldc.i4.1 IL_000e: brfalse.s IL_0033 - .line 5,5 : 44,55 '' + .line 5,5 : 37,55 '' IL_0010: ldstr "" IL_0015: stloc.1 IL_0016: ldloca.s V_0 @@ -801,8 +801,8 @@ 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 + .line 75,75 : 13,20 '' IL_002e: ldloca.s V_0 - .line 75,75 : 19,20 '' IL_0030: ldloc.3 IL_0031: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) IL_0036: nop diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.il.bsl index 4859d49167e..15530e6ca76 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls01.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000220 Length: 0x0000008C } .module SeqExpressionTailCalls01.exe -// MVID: {61E07031-093A-A6BE-A745-03833170E061} +// MVID: {61FD4A6D-093A-A6BE-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06830000 +// Image base: 0x05DB0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -116,18 +116,18 @@ .line 100001,100001 : 0,0 '' IL_0024: nop + .line 3,3 : 25,32 '' IL_0025: ldarg.0 IL_0026: ldc.i4.1 IL_0027: stfld int32 SeqExpressionTailCalls01/rwalk@3::pc IL_002c: ldarg.0 - .line 3,3 : 31,32 '' IL_002d: ldarg.0 IL_002e: ldfld int32 SeqExpressionTailCalls01/rwalk@3::x IL_0033: stfld int32 SeqExpressionTailCalls01/rwalk@3::current IL_0038: ldc.i4.1 IL_0039: ret - .line 3,3 : 41,52 '' + .line 3,3 : 34,52 '' IL_003a: ldarg.0 IL_003b: ldc.i4.2 IL_003c: stfld int32 SeqExpressionTailCalls01/rwalk@3::pc diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.il.bsl index e640d6921bb..28843dbeeb9 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionTailCalls/SeqExpressionTailCalls02.il.bsl @@ -36,13 +36,13 @@ // Offset: 0x00000258 Length: 0x0000009E } .module SeqExpressionTailCalls02.exe -// MVID: {61E07031-093A-EC43-A745-03833170E061} +// MVID: {61FD4A6D-093A-EC43-A745-03836D4AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05230000 +// Image base: 0x052F0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -116,18 +116,18 @@ .line 100001,100001 : 0,0 '' IL_0024: nop + .line 5,5 : 26,33 '' IL_0025: ldarg.0 IL_0026: ldc.i4.1 IL_0027: stfld int32 SeqExpressionTailCalls02/rwalk1@5::pc IL_002c: ldarg.0 - .line 5,5 : 32,33 '' IL_002d: ldarg.0 IL_002e: ldfld int32 SeqExpressionTailCalls02/rwalk1@5::x IL_0033: stfld int32 SeqExpressionTailCalls02/rwalk1@5::current IL_0038: ldc.i4.1 IL_0039: ret - .line 5,5 : 42,54 '' + .line 5,5 : 35,54 '' IL_003a: ldarg.0 IL_003b: ldc.i4.2 IL_003c: stfld int32 SeqExpressionTailCalls02/rwalk1@5::pc @@ -300,18 +300,18 @@ .line 100001,100001 : 0,0 '' IL_0024: nop + .line 6,6 : 26,33 '' IL_0025: ldarg.0 IL_0026: ldc.i4.1 IL_0027: stfld int32 SeqExpressionTailCalls02/rwalk2@6::pc IL_002c: ldarg.0 - .line 6,6 : 32,33 '' IL_002d: ldarg.0 IL_002e: ldfld int32 SeqExpressionTailCalls02/rwalk2@6::x IL_0033: stfld int32 SeqExpressionTailCalls02/rwalk2@6::current IL_0038: ldc.i4.1 IL_0039: ret - .line 6,6 : 42,54 '' + .line 6,6 : 35,54 '' IL_003a: ldarg.0 IL_003b: ldc.i4.2 IL_003c: stfld int32 SeqExpressionTailCalls02/rwalk2@6::pc diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3b.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3b.il.bsl index fdab908b9ce..605bb5ca37b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3b.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/TestFunction3b.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly TestFunction3b { @@ -36,13 +36,13 @@ // Offset: 0x00000200 Length: 0x0000008A } .module TestFunction3b.exe -// MVID: {61E07031-A662-4FC9-A745-03833170E061} +// MVID: {611C4D9E-A662-4FC9-A745-03839E4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07430000 +// Image base: 0x053D0000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22b.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22b.il.bsl index 16c636cb2a4..aea4e753718 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22b.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22b.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly Testfunction22b { @@ -36,13 +36,13 @@ // Offset: 0x00000160 Length: 0x00000056 } .module Testfunction22b.exe -// MVID: {61F02896-8504-18B7-A745-03839628F061} +// MVID: {60B68B97-8504-18B7-A745-0383978BB660} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04F90000 +// Image base: 0x00AF0000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22c.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22c.il.bsl index 5f6acc718f9..19f08efe5bf 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22c.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/TestFunctions/Testfunction22c.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly Testfunction22c { @@ -36,13 +36,13 @@ // Offset: 0x00000160 Length: 0x00000056 } .module Testfunction22c.exe -// MVID: {61F02896-459D-3DF8-A745-03839628F061} +// MVID: {60B68B97-459D-3DF8-A745-0383978BB660} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07280000 +// Image base: 0x00F10000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple01.il.bsl index ab08dac9a6a..6b7cc9c8d49 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly Tuple01 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple01.exe -// MVID: {61F02896-6FDB-3E0B-A745-03839628F061} +// MVID: {60B68B97-6FDB-3E0B-A745-0383978BB660} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x04F50000 +// Image base: 0x07270000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple02.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple02.il.bsl index 50f0744fe24..3f0835a20bc 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple02.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple02.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly Tuple02 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple02.exe -// MVID: {61F02896-ECCC-7D58-A745-03839628F061} +// MVID: {60B68B97-ECCC-7D58-A745-0383978BB660} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06FE0000 +// Image base: 0x070F0000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple03.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple03.il.bsl index 666f789a1fe..694e959cf21 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple03.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple03.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly Tuple03 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple03.exe -// MVID: {61F02896-AD65-A299-A745-03839628F061} +// MVID: {60B68B97-AD65-A299-A745-0383978BB660} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07280000 +// Image base: 0x05690000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple04.il.bsl index c2d2d71e244..67ffcf00724 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple04.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple04.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly Tuple04 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple04.exe -// MVID: {61F02896-6A2E-9E97-A745-03839628F061} +// MVID: {60B68B97-6A2E-9E97-A745-0383978BB660} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06A30000 +// Image base: 0x06E90000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple05.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple05.il.bsl index 629692238de..0626f63d7be 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple05.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple05.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly Tuple05 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple05.exe -// MVID: {61F02896-349F-319F-A745-03839628F061} +// MVID: {60B68B97-349F-319F-A745-0383978BB660} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07650000 +// Image base: 0x06BA0000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple06.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple06.il.bsl index 26232d0047a..26e99d88dca 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple06.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple06.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly Tuple06 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple06.exe -// MVID: {61F02896-67E0-4675-A745-03839628F061} +// MVID: {60B68B97-67E0-4675-A745-0383978BB660} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06BE0000 +// Image base: 0x06A80000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple07.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple07.il.bsl index 787ab61985d..c4d97daf2ef 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple07.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple07.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly Tuple07 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple07.exe -// MVID: {61F02896-7229-962D-A745-03839628F061} +// MVID: {60B68B97-7229-962D-A745-0383978BB660} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07100000 +// Image base: 0x00F10000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple08.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple08.il.bsl index e4a58201526..72e7d3feed7 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple08.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Tuples/Tuple08.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly Tuple08 { @@ -36,13 +36,13 @@ // Offset: 0x00000140 Length: 0x0000004E } .module Tuple08.exe -// MVID: {61F02896-E542-67B3-A745-03839628F061} +// MVID: {60B68B97-E542-67B3-A745-0383978BB660} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07190000 +// Image base: 0x00E80000 // =============== CLASS MEMBERS DECLARATION =================== From 625706623047d6b6a204ea318d07955f72d2ee7c Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 Feb 2022 17:35:43 +0000 Subject: [PATCH 21/35] update surface area --- ...Sharp.CompilerService.SurfaceArea.netstandard.expected | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 8509a4edef2..df69ecb3072 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected @@ -6243,8 +6243,10 @@ FSharp.Compiler.Syntax.SynExpr+Const: FSharp.Compiler.Text.Range get_range() FSharp.Compiler.Syntax.SynExpr+Const: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.SynExpr+DebugPoint: FSharp.Compiler.Syntax.SynExpr get_innerExpr() FSharp.Compiler.Syntax.SynExpr+DebugPoint: FSharp.Compiler.Syntax.SynExpr innerExpr -FSharp.Compiler.Syntax.SynExpr+DebugPoint: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.DebugPointAtLeafExpr,System.Boolean]] debugPoint -FSharp.Compiler.Syntax.SynExpr+DebugPoint: Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.DebugPointAtLeafExpr,System.Boolean]] get_debugPoint() +FSharp.Compiler.Syntax.SynExpr+DebugPoint: Boolean get_isControlFlow() +FSharp.Compiler.Syntax.SynExpr+DebugPoint: Boolean isControlFlow +FSharp.Compiler.Syntax.SynExpr+DebugPoint: FSharp.Compiler.Syntax.DebugPointAtLeafExpr debugPoint +FSharp.Compiler.Syntax.SynExpr+DebugPoint: FSharp.Compiler.Syntax.DebugPointAtLeafExpr get_debugPoint() FSharp.Compiler.Syntax.SynExpr+DiscardAfterMissingQualificationAfterDot: FSharp.Compiler.Syntax.SynExpr expr FSharp.Compiler.Syntax.SynExpr+DiscardAfterMissingQualificationAfterDot: FSharp.Compiler.Syntax.SynExpr get_expr() FSharp.Compiler.Syntax.SynExpr+DiscardAfterMissingQualificationAfterDot: FSharp.Compiler.Text.Range get_range() @@ -6924,7 +6926,7 @@ FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewArrayOrListCom FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewAssert(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewComputationExpr(Boolean, FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewConst(FSharp.Compiler.Syntax.SynConst, FSharp.Compiler.Text.Range) -FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewDebugPoint(Microsoft.FSharp.Core.FSharpOption`1[System.Tuple`2[FSharp.Compiler.Syntax.DebugPointAtLeafExpr,System.Boolean]], FSharp.Compiler.Syntax.SynExpr) +FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewDebugPoint(FSharp.Compiler.Syntax.DebugPointAtLeafExpr, Boolean, FSharp.Compiler.Syntax.SynExpr) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewDiscardAfterMissingQualificationAfterDot(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewDo(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.SynExpr: FSharp.Compiler.Syntax.SynExpr NewDoBang(FSharp.Compiler.Syntax.SynExpr, FSharp.Compiler.Text.Range) From e61c3266314f31da7cbef7aafe6a26c7d2aaeed0 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 Feb 2022 20:16:33 +0000 Subject: [PATCH 22/35] fix minor issues --- release-notes.md | 7 ++++++ src/fsharp/CheckComputationExpressions.fs | 6 ++--- src/fsharp/FSharp.Core/resumable.fsi | 18 ++++++++++----- src/fsharp/IlxGen.fs | 9 +++++--- src/fsharp/LowerStateMachines.fsi | 2 -- src/fsharp/Optimizer.fs | 1 - src/fsharp/SyntaxTree.fs | 2 +- src/fsharp/SyntaxTree.fsi | 2 +- src/fsharp/TcGlobals.fs | 14 +----------- src/fsharp/fsi/fsi.fs | 2 +- src/fsharp/ilx/EraseClosures.fs | 22 +++++++------------ src/fsharp/ilx/EraseClosures.fsi | 5 ++--- src/fsharp/pars.fsy | 8 +++---- src/fsharp/symbols/Exprs.fsi | 4 ++++ ...erService.SurfaceArea.netstandard.expected | 10 ++++----- 15 files changed, 56 insertions(+), 56 deletions(-) diff --git a/release-notes.md b/release-notes.md index e3a0b6771ae..ad714bb6e5e 100644 --- a/release-notes.md +++ b/release-notes.md @@ -14,6 +14,13 @@ This document contains current and historical release notes information. They ar These release notes track our current efforts to document changes to the F# project over time. They are split into the language, core library, compiler/tools, and compiler service. +### FSharp Compiler Service (main) + +* Some syntax tree nodes have changed, e.g. introduction of SyntaxTree trivia +* Resolved expressions (FSharpExpr) now reveal debug points, you must match them explicitly using `DebugPoint(dp, expr)` +* Some node types in FSharpExpr (e.g. Let, While, TryFinally, TryWith) reveal additional debug points +* In FSharpExpr, FastIntegerForLoop has been renamed to IntegerForLoop + ### F# 6.0 / Visual Studio 17.0 diff --git a/src/fsharp/CheckComputationExpressions.fs b/src/fsharp/CheckComputationExpressions.fs index 69d8a5b48aa..80b30ac1206 100644 --- a/src/fsharp/CheckComputationExpressions.fs +++ b/src/fsharp/CheckComputationExpressions.fs @@ -1133,8 +1133,8 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter | SynExpr.DoBang (rhsExpr, m) -> let sp = match sp with - | DebugPointAtSequential.SuppressExpr -> DebugPointAtBinding.ImplicitAtDo - | DebugPointAtSequential.SuppressBoth -> DebugPointAtBinding.ImplicitAtDo + | DebugPointAtSequential.SuppressExpr -> DebugPointAtBinding.NoneAtDo + | DebugPointAtSequential.SuppressBoth -> DebugPointAtBinding.NoneAtDo | DebugPointAtSequential.SuppressStmt -> DebugPointAtBinding.Yes m | DebugPointAtSequential.SuppressNeither -> DebugPointAtBinding.Yes m Some(trans CompExprTranslationPass.Initial q varSpace (SynExpr.LetOrUseBang (sp, false, true, SynPat.Const(SynConst.Unit, rhsExpr.Range), None, rhsExpr, [], innerComp2, m)) translatedCtxt) @@ -1604,7 +1604,7 @@ let TcComputationExpression cenv env (overallTy: OverallTy) tpenv (mWhole, inter match TryFindIntrinsicOrExtensionMethInfo ResultCollectionSettings.AtMostOneResult cenv env m ad "Zero" builderTy with | minfo :: _ when MethInfoHasAttribute cenv.g m cenv.g.attrib_DefaultValueAttribute minfo -> SynExpr.ImplicitZero m | _ -> SynExpr.YieldOrReturn ((false, true), SynExpr.Const (SynConst.Unit, m), m) - let letBangBind = SynExpr.LetOrUseBang (DebugPointAtBinding.ImplicitAtDo, false, false, SynPat.Const(SynConst.Unit, mUnit), None, rhsExpr, [], bodyExpr, m) + let letBangBind = SynExpr.LetOrUseBang (DebugPointAtBinding.NoneAtDo, false, false, SynPat.Const(SynConst.Unit, mUnit), None, rhsExpr, [], bodyExpr, m) trans CompExprTranslationPass.Initial q varSpace letBangBind translatedCtxt // "expr;" in final position is treated as { expr; zero } diff --git a/src/fsharp/FSharp.Core/resumable.fsi b/src/fsharp/FSharp.Core/resumable.fsi index aec3fb31c44..d7c82027279 100644 --- a/src/fsharp/FSharp.Core/resumable.fsi +++ b/src/fsharp/FSharp.Core/resumable.fsi @@ -129,14 +129,22 @@ type AfterCode<'Data, 'Result> = delegate of byref> module StateMachineHelpers = /// - /// Indicates a named debug point arising from the context of inlined code to implement a computation expression. + /// Indicates a named debug point arising from the context of inlined code. /// /// - /// If the code was ultimately inlined from a "for .. in .. do" or "for .. = .. to .. do" construct in a computation expression, - /// the name "ForLoop.InOrToKeyword" can be used. + /// Only a limited range of debug point names are supported. /// - /// If the name doesn't correspond to a known debug point arising from the original source context, then no - /// debug point is emitted. If opt-in warning 3514 is enabled a warning is emitted. + /// If the debug point name is the empty string then the range used for the debug point will be + /// the range of the outermost expression prior to inlining. + /// + /// If the debug point name is ForLoop.InOrToKeyword and the code was ultimately + /// from a for .. in .. do or for .. = .. to .. do construct in a computation expression, + /// de-sugared to an inlined builder.For call, then the name "ForLoop.InOrToKeyword" can be used. + /// The range of the debug point will be precisely the range of the in or to keyword. + /// + /// If the name doesn't correspond to a known debug point arising from the original source context, then + /// an opt-in warning 3514 is emitted, and the range used for the debug point will be + /// the range of the root expression prior to inlining. /// [] val __debugPoint: string -> unit diff --git a/src/fsharp/IlxGen.fs b/src/fsharp/IlxGen.fs index 0009e957547..bce32b0ea40 100644 --- a/src/fsharp/IlxGen.fs +++ b/src/fsharp/IlxGen.fs @@ -2297,7 +2297,7 @@ let ComputeDebugPointForBinding g bind = match spBind, stripExpr e with | DebugPointAtBinding.NoneAtInvisible, _ -> false, None | DebugPointAtBinding.NoneAtSticky, _ -> true, None - | DebugPointAtBinding.ImplicitAtDo, _ -> false, None + | DebugPointAtBinding.NoneAtDo, _ -> false, None | DebugPointAtBinding.NoneAtLet, _ -> false, None // Don't emit debug points for lambdas. | _, (Expr.Lambda _ | Expr.TyLambda _) -> false, None @@ -2321,6 +2321,8 @@ and GenExprPreSteps (cenv: cenv) (cgbuf: CodeGenBuffer) eenv expr sequel = match expr with | Expr.Sequential((DebugPointExpr g debugPointName) as dpExpr, codeExpr, NormalSeq, m) -> match cenv.namedDebugPointsForInlinedCode.TryGetValue({Range=m; Name=debugPointName}) with + | false, _ when debugPointName = "" -> + CG.EmitDebugPoint cgbuf m | false, _ -> // printfn $"---- Unfound debug point {debugPointName} at {m}" // for KeyValue(k,v) in cenv.namedDebugPointsForInlinedCode do @@ -2331,6 +2333,7 @@ and GenExprPreSteps (cenv: cenv) (cgbuf: CodeGenBuffer) eenv expr sequel = yield k.Name ] |> String.concat "," informationalWarning(Error(FSComp.SR.ilxGenUnknownDebugPoint(debugPointName, others), dpExpr.Range)) + CG.EmitDebugPoint cgbuf m | true, dp -> // printfn $"---- Found debug point {debugPointName} at {m} --> {dp}" CG.EmitDebugPoint cgbuf dp @@ -2815,7 +2818,7 @@ and GenLinearExpr cenv cgbuf eenv expr sequel preSteps (contf: FakeUnit -> FakeU match spBind with | DebugPointAtBinding.Yes m -> CG.EmitDebugPoint cgbuf m - | DebugPointAtBinding.ImplicitAtDo + | DebugPointAtBinding.NoneAtDo | DebugPointAtBinding.NoneAtLet | DebugPointAtBinding.NoneAtInvisible | DebugPointAtBinding.NoneAtSticky -> () @@ -5030,7 +5033,7 @@ and GenClosureTypeDefs cenv (tref: ILTypeRef, ilGenParams, attrs, ilCloAllFreeVa .WithEncoding(ILDefaultPInvokeEncoding.Auto) .WithInitSemantics(ILTypeInit.BeforeField) - let tdefs = EraseClosures.convIlxClosureDef g.ilxPubCloEnv cenv.opts.generateDebugSymbols tref.Enclosing tdef cloInfo + let tdefs = EraseClosures.convIlxClosureDef g.ilxPubCloEnv tref.Enclosing tdef cloInfo tdefs and GenStaticDelegateClosureTypeDefs cenv (tref: ILTypeRef, ilGenParams, attrs, ilCloAllFreeVars, ilCloLambdas, ilCtorBody, mdefs, mimpls, ext, ilIntfTys, staticCloInfo) = diff --git a/src/fsharp/LowerStateMachines.fsi b/src/fsharp/LowerStateMachines.fsi index 3cff9856315..5a37c4ada6f 100644 --- a/src/fsharp/LowerStateMachines.fsi +++ b/src/fsharp/LowerStateMachines.fsi @@ -2,8 +2,6 @@ module internal FSharp.Compiler.LowerStateMachines -open System.Collections.Generic -open FSharp.Compiler.Text open FSharp.Compiler.TypedTree open FSharp.Compiler.TcGlobals diff --git a/src/fsharp/Optimizer.fs b/src/fsharp/Optimizer.fs index 6ce3dd5fdd5..1679aefb66f 100644 --- a/src/fsharp/Optimizer.fs +++ b/src/fsharp/Optimizer.fs @@ -2066,7 +2066,6 @@ let rec IsDebugPipeRightExpr cenv expr = else false | _ -> false - /// Optimize/analyze an expression let rec OptimizeExpr cenv (env: IncrementalOptimizationEnv) expr = cenv.stackGuard.Guard <| fun () -> diff --git a/src/fsharp/SyntaxTree.fs b/src/fsharp/SyntaxTree.fs index 13b1e2e6937..cdd7eee5b18 100644 --- a/src/fsharp/SyntaxTree.fs +++ b/src/fsharp/SyntaxTree.fs @@ -219,7 +219,7 @@ type DebugPointAtWhile = type DebugPointAtBinding = | Yes of range: range - | ImplicitAtDo + | NoneAtDo | NoneAtLet diff --git a/src/fsharp/SyntaxTree.fsi b/src/fsharp/SyntaxTree.fsi index a727a578151..11525f8c10b 100644 --- a/src/fsharp/SyntaxTree.fsi +++ b/src/fsharp/SyntaxTree.fsi @@ -289,7 +289,7 @@ type DebugPointAtBinding = | Yes of range: range // Indicates the omission of a debug point for a binding for a 'do expr' - | ImplicitAtDo + | NoneAtDo // Indicates the omission of a debug point for a binding for a 'let e = expr' where // 'expr' has immediate control flow diff --git a/src/fsharp/TcGlobals.fs b/src/fsharp/TcGlobals.fs index 4cdaf2cc326..ddb5904ca1f 100755 --- a/src/fsharp/TcGlobals.fs +++ b/src/fsharp/TcGlobals.fs @@ -800,18 +800,6 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d let addMethodGeneratedAttrs (mdef:ILMethodDef) = mdef.With(customAttrs = addGeneratedAttrs mdef.CustomAttrs) - // If generating debug information, then code that has no debug points apart from OxFEEFEE - // get CompilerGeneratedAttribute and DebuggerNonUserCodeAttribute, e.g. for lambdas - // from computation expressions. - let addMethodGeneratedAttrsIfNoDebugPoints debuginfo (mdef:ILMethodDef) = - if noDebugAttributes || not debuginfo then - mdef - else - match mdef.Body with - | MethodBody.IL ilBody when ilBody.Value.Code.Instrs |> Array.forall (function I_seqpoint sp -> sp.Line = 0xFEEFEE | _ -> true) -> - mdef.With(customAttrs = addGeneratedAttrs mdef.CustomAttrs) - | _ -> mdef - let addPropertyGeneratedAttrs (pdef:ILPropertyDef) = pdef.With(customAttrs = addGeneratedAttrs pdef.CustomAttrs) let addFieldGeneratedAttrs (fdef:ILFieldDef) = fdef.With(customAttrs = addGeneratedAttrs fdef.CustomAttrs) @@ -1596,7 +1584,7 @@ type public TcGlobals(compilingFslib: bool, ilg:ILGlobals, fslibCcu: CcuThunk, d member _.TryFindSysAttrib nm = tryFindSysAttrib nm member val ilxPubCloEnv = - EraseClosures.newIlxPubCloEnv(ilg, addMethodGeneratedAttrs, addFieldGeneratedAttrs, addFieldNeverAttrs, addMethodGeneratedAttrsIfNoDebugPoints) + EraseClosures.newIlxPubCloEnv(ilg, addMethodGeneratedAttrs, addFieldGeneratedAttrs, addFieldNeverAttrs) member _.AddMethodGeneratedAttributes mdef = addMethodGeneratedAttrs mdef diff --git a/src/fsharp/fsi/fsi.fs b/src/fsharp/fsi/fsi.fs index c8535fa96c0..1790f00c908 100644 --- a/src/fsharp/fsi/fsi.fs +++ b/src/fsharp/fsi/fsi.fs @@ -1473,7 +1473,7 @@ type internal FsiDynamicCompiler let methCall = SynExpr.LongIdent (false, LongIdentWithDots(List.map (mkSynId m) breakPath, dots), None, m) let args = SynExpr.Const (SynConst.Unit, m) let breakStatement = SynExpr.App (ExprAtomicFlag.Atomic, false, methCall, args, m) - SynModuleDecl.DoExpr(DebugPointAtBinding.ImplicitAtDo, breakStatement, m) + SynModuleDecl.DoExpr(DebugPointAtBinding.NoneAtDo, breakStatement, m) member _.EvalRequireReference (ctok, istate, m, path) = if FileSystem.IsInvalidPathShim(path) then diff --git a/src/fsharp/ilx/EraseClosures.fs b/src/fsharp/ilx/EraseClosures.fs index 4eb1dda7517..9919e39c8ef 100644 --- a/src/fsharp/ilx/EraseClosures.fs +++ b/src/fsharp/ilx/EraseClosures.fs @@ -124,8 +124,6 @@ type cenv = addFieldNeverAttrs: ILFieldDef -> ILFieldDef addMethodGeneratedAttrs: ILMethodDef -> ILMethodDef - - addMethodGeneratedAttrsIfNoDebugPoints: bool -> ILMethodDef -> ILMethodDef } override _.ToString() = "" @@ -134,14 +132,13 @@ type cenv = let addMethodGeneratedAttrsToTypeDef cenv (tdef: ILTypeDef) = tdef.With(methods = (tdef.Methods.AsList |> List.map (fun md -> md |> cenv.addMethodGeneratedAttrs) |> mkILMethods)) -let newIlxPubCloEnv(ilg, addMethodGeneratedAttrs, addFieldGeneratedAttrs, addFieldNeverAttrs, addMethodGeneratedAttrsIfNoDebugPoints) = +let newIlxPubCloEnv(ilg, addMethodGeneratedAttrs, addFieldGeneratedAttrs, addFieldNeverAttrs) = { ilg = ilg tref_Func = Array.init 10 (fun i -> mkFuncTypeRef ilg.fsharpCoreAssemblyScopeRef (i+1)) mkILTyFuncTy = ILType.Boxed (mkILNonGenericTySpec (mkILTyRef (ilg.fsharpCoreAssemblyScopeRef, fsharpCoreNamespace + ".FSharpTypeFunc"))) addMethodGeneratedAttrs = addMethodGeneratedAttrs addFieldGeneratedAttrs = addFieldGeneratedAttrs - addFieldNeverAttrs = addFieldNeverAttrs - addMethodGeneratedAttrsIfNoDebugPoints = addMethodGeneratedAttrsIfNoDebugPoints } + addFieldNeverAttrs = addFieldNeverAttrs } let mkILTyFuncTy cenv = cenv.mkILTyFuncTy let mkILFuncTy cenv dty rty = mkILBoxedTy cenv.tref_Func.[0] [dty;rty] @@ -359,7 +356,7 @@ let mkILCloFldDefs cenv flds = // it's a type abstraction or a term abstraction. // -------------------------------------------------------------------- -let rec convIlxClosureDef cenv debuginfo encl (td: ILTypeDef) clo = +let rec convIlxClosureDef cenv encl (td: ILTypeDef) clo = let newTypeDefs = // the following are shared between cases 1 && 2 @@ -415,7 +412,6 @@ let rec convIlxClosureDef cenv debuginfo encl (td: ILTypeDef) clo = // maxstack may increase by 1 due to environment loads MaxStack=il.MaxStack+1 } - match tyargsl, tmargsl, laterStruct with // CASE 1 - Type abstraction | _ :: _, [], _ -> @@ -441,7 +437,7 @@ let rec convIlxClosureDef cenv debuginfo encl (td: ILTypeDef) clo = let laterCode = rewriteCodeToAccessArgsFromEnv laterCloSpec [(0, selfFreeVar)] let laterTypeDefs = - convIlxClosureDef cenv debuginfo encl + convIlxClosureDef cenv encl (td.With(genericParams=laterGenericParams, name=laterTypeName, methods=emptyILMethods, fields=emptyILFields)) {clo with cloStructure=laterStruct cloFreeVars=laterFields @@ -462,7 +458,7 @@ let rec convIlxClosureDef cenv debuginfo encl (td: ILTypeDef) clo = let nowCode = mkILMethodBody (false, [], nowFields.Length + 1, nonBranchingInstrsToCode nowInstrs, cloDebugRange, cloImports) let nowTypeDefs = - convIlxClosureDef cenv debuginfo encl td + convIlxClosureDef cenv encl td {clo with cloStructure=nowStruct cloCode=notlazy nowCode} @@ -481,7 +477,6 @@ let rec convIlxClosureDef cenv debuginfo encl (td: ILTypeDef) clo = [], mkILReturn(cenv.ilg.typ_Object), MethodBody.IL (notlazy convil)) - |> cenv.addMethodGeneratedAttrsIfNoDebugPoints debuginfo let ctorMethodDef = mkILStorageCtor @@ -517,7 +512,7 @@ let rec convIlxClosureDef cenv debuginfo encl (td: ILTypeDef) clo = .WithEncoding(ILDefaultPInvokeEncoding.Ansi) [ cloTypeDef] - // CASE 2 - Term Application + // CASE 2 - Term abstraction | [], (_ :: _ as nowParams), _ -> let nowReturnTy = mkTyOfLambdas cenv laterStruct @@ -549,14 +544,14 @@ let rec convIlxClosureDef cenv debuginfo encl (td: ILTypeDef) clo = let nowCode = mkILMethodBody (false, [], argToFreeVarMap.Length + nowFields.Length, nonBranchingInstrsToCode nowInstrs, cloDebugRange, cloImports) let nowTypeDefs = - convIlxClosureDef cenv debuginfo encl td + convIlxClosureDef cenv encl td {clo with cloStructure=nowStruct cloCode=notlazy nowCode} let laterCode = rewriteCodeToAccessArgsFromEnv laterCloSpec argToFreeVarMap let laterTypeDefs = - convIlxClosureDef cenv debuginfo encl + convIlxClosureDef cenv encl (td.With(genericParams=laterGenericParams, name=laterTypeName, methods=emptyILMethods, fields=emptyILFields)) {clo with cloStructure=laterStruct cloFreeVars=laterFields @@ -580,7 +575,6 @@ let rec convIlxClosureDef cenv debuginfo encl (td: ILTypeDef) clo = nowParams, mkILReturn nowReturnTy, MethodBody.IL (notlazy convil)) - |> cenv.addMethodGeneratedAttrsIfNoDebugPoints debuginfo let ctorMethodDef = mkILStorageCtor diff --git a/src/fsharp/ilx/EraseClosures.fsi b/src/fsharp/ilx/EraseClosures.fsi index 779c061bc25..63355245824 100644 --- a/src/fsharp/ilx/EraseClosures.fsi +++ b/src/fsharp/ilx/EraseClosures.fsi @@ -18,11 +18,10 @@ val newIlxPubCloEnv: ilg: ILGlobals * addMethodGeneratedAttrs: (ILMethodDef -> ILMethodDef) * addFieldGeneratedAttrs: (ILFieldDef -> ILFieldDef) * - addFieldNeverAttrs: (ILFieldDef -> ILFieldDef) * - addMethodGeneratedAttrsIfNoDebugPoints: (bool -> ILMethodDef -> ILMethodDef) + addFieldNeverAttrs: (ILFieldDef -> ILFieldDef) -> cenv val mkTyOfLambdas: cenv -> IlxClosureLambdas -> ILType -val convIlxClosureDef: cenv -> debuginfo: bool -> encl: string list -> ILTypeDef -> IlxClosureInfo -> ILTypeDef list +val convIlxClosureDef: cenv -> encl: string list -> ILTypeDef -> IlxClosureInfo -> ILTypeDef list diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy index 5f5294568fd..d414996a750 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -64,10 +64,10 @@ let mkSynDoBinding (vis, strict, expr, m) = (if strict then SynBindingKind.Do else SynBindingKind.StandaloneExpression), false, false, [], PreXmlDoc.Empty, SynInfo.emptySynValData, (if strict then SynPat.Const(SynConst.Unit, m) else SynPat.Wild m), - None, None, expr, m, DebugPointAtBinding.ImplicitAtDo) + None, None, expr, m, DebugPointAtBinding.NoneAtDo) let mkSynDoDecl (e: SynExpr) = - SynModuleDecl.DoExpr(DebugPointAtBinding.ImplicitAtDo, e, e.Range) + SynModuleDecl.DoExpr(DebugPointAtBinding.NoneAtDo, e, e.Range) let addAttribs attrs p = SynPat.Attrib(p, attrs, p.Range) @@ -2781,7 +2781,7 @@ hardwhiteDoBinding: | ODO typedSequentialExprBlock hardwhiteDefnBindingsTerminator { let mLetKwd = rhs parseState 1 let bindingSetRange = unionRanges mLetKwd $2.Range - let seqPt = DebugPointAtBinding.ImplicitAtDo + let seqPt = DebugPointAtBinding.NoneAtDo // any attributes prior to the 'let' are left free, e.g. become top-level attributes // associated with the module, 'main' function or assembly depending on their target BindingSetPreAttrs(mLetKwd, false, false, (fun attrs vis -> attrs, [mkSynDoBinding (vis, true, $2, bindingSetRange)]), bindingSetRange), $2 } @@ -3904,7 +3904,7 @@ declExpr: SynExpr.LetOrUseBang(spBind, ($1 = "use"), true, $2, Some mEquals, $4, [], SynExpr.ImplicitZero m, mAll) } | DO_BANG typedSequentialExpr IN opt_OBLOCKSEP typedSequentialExprBlock %prec expr_let - { let spBind = DebugPointAtBinding.ImplicitAtDo + { let spBind = DebugPointAtBinding.NoneAtDo SynExpr.LetOrUseBang(spBind, false, true, SynPat.Const(SynConst.Unit, $2.Range), None, $2, [], $5, unionRanges (rhs parseState 1) $5.Range) } | ODO_BANG typedSequentialExprBlock hardwhiteDefnBindingsTerminator %prec expr_let diff --git a/src/fsharp/symbols/Exprs.fsi b/src/fsharp/symbols/Exprs.fsi index 947205ed5ef..fcc4a5a9aac 100644 --- a/src/fsharp/symbols/Exprs.fsi +++ b/src/fsharp/symbols/Exprs.fsi @@ -229,3 +229,7 @@ module public FSharpExprPatterns = /// Indicates a witness argument index from the witness arguments supplied to the enclosing method val (|WitnessArg|_|): FSharpExpr -> int option + + /// Matches an expression with a debug point + val (|DebugPoint|_|): FSharpExpr -> (DebugPointAtLeafExpr * FSharpExpr) option + 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 df69ecb3072..0e809758c95 100644 --- a/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected +++ b/tests/FSharp.Compiler.Service.Tests/FSharp.CompilerService.SurfaceArea.netstandard.expected @@ -5142,7 +5142,7 @@ FSharp.Compiler.Symbols.FSharpXmlDoc: Int32 Tag FSharp.Compiler.Symbols.FSharpXmlDoc: Int32 get_Tag() FSharp.Compiler.Symbols.FSharpXmlDoc: System.String ToString() FSharp.Compiler.Syntax.DebugPointAtBinding -FSharp.Compiler.Syntax.DebugPointAtBinding+Tags: Int32 ImplicitAtDo +FSharp.Compiler.Syntax.DebugPointAtBinding+Tags: Int32 NoneAtDo FSharp.Compiler.Syntax.DebugPointAtBinding+Tags: Int32 NoneAtInvisible FSharp.Compiler.Syntax.DebugPointAtBinding+Tags: Int32 NoneAtLet FSharp.Compiler.Syntax.DebugPointAtBinding+Tags: Int32 NoneAtSticky @@ -5152,23 +5152,23 @@ FSharp.Compiler.Syntax.DebugPointAtBinding+Yes: FSharp.Compiler.Text.Range range FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean Equals(FSharp.Compiler.Syntax.DebugPointAtBinding) FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean Equals(System.Object) FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean Equals(System.Object, System.Collections.IEqualityComparer) -FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean IsImplicitAtDo +FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean IsNoneAtDo FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean IsNoneAtInvisible FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean IsNoneAtLet FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean IsNoneAtSticky FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean IsYes -FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean get_IsImplicitAtDo() +FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean get_IsNoneAtDo() FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean get_IsNoneAtInvisible() FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean get_IsNoneAtLet() FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean get_IsNoneAtSticky() FSharp.Compiler.Syntax.DebugPointAtBinding: Boolean get_IsYes() FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding Combine(FSharp.Compiler.Syntax.DebugPointAtBinding) -FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding ImplicitAtDo +FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding NoneAtDo FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding NewYes(FSharp.Compiler.Text.Range) FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding NoneAtInvisible FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding NoneAtLet FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding NoneAtSticky -FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding get_ImplicitAtDo() +FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding get_NoneAtDo() FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding get_NoneAtInvisible() FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding get_NoneAtLet() FSharp.Compiler.Syntax.DebugPointAtBinding: FSharp.Compiler.Syntax.DebugPointAtBinding get_NoneAtSticky() From 56e4c109ed085436c715342e8f7567557ddfd54b Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 Feb 2022 21:11:40 +0000 Subject: [PATCH 23/35] remove attempt at extra attribute generation --- .../Source/CodeGen/EmittedIL/Misc/IfThenElse01.il.bsl | 6 ++---- .../CodeGen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/IfThenElse01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/IfThenElse01.il.bsl index 33dd9dc55d9..efd58156ef6 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: {61E07031-2D6C-0B5D-A745-03833170E061} +// MVID: {61FD8A9D-2D6C-0B5D-A745-03839D8AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07680000 +// Image base: 0x07450000 // =============== CLASS MEMBERS DECLARATION =================== @@ -76,8 +76,6 @@ .method public strict virtual instance object Specialize() cil managed { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl index 900e4276fbd..af3f921760a 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: {61E07031-4935-D6AC-A745-03833170E061} +// MVID: {61FD8A9E-4935-D6AC-A745-03839E8AFD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05B50000 +// Image base: 0x07500000 // =============== CLASS MEMBERS DECLARATION =================== @@ -72,8 +72,6 @@ .method public strict virtual instance object Specialize() cil managed { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerNonUserCodeAttribute::.ctor() = ( 01 00 00 00 ) // Code size 12 (0xc) From 80c02c33504fa5a794ae6511e85daabdcc145f15 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 Feb 2022 23:26:17 +0000 Subject: [PATCH 24/35] fix failing test --- src/fsharp/CheckComputationExpressions.fs | 4 ++-- .../Source/CodeGen/EmittedIL/Misc/IfThenElse01.il.bsl | 6 +++--- .../SeqExpressionStepping/SeqExpressionSteppingTest1.il.bsl | 6 +++--- .../SeqExpressionStepping/SeqExpressionSteppingTest2.il.bsl | 6 +++--- .../SeqExpressionStepping/SeqExpressionSteppingTest3.il.bsl | 6 +++--- .../CodeGen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl | 6 +++--- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/fsharp/CheckComputationExpressions.fs b/src/fsharp/CheckComputationExpressions.fs index 80b30ac1206..8d603f71083 100644 --- a/src/fsharp/CheckComputationExpressions.fs +++ b/src/fsharp/CheckComputationExpressions.fs @@ -1900,13 +1900,13 @@ let TcSequenceExpression (cenv: cenv) env tpenv comp (overallTy: OverallTy) m = // This transformation is visible in quotations and thus needs to remain. | (TPat_as (TPat_wild _, PBind (v, _), _), vs, - Expr.App (Expr.Val (vf, _, _), _, [genEnumElemTy], [yieldExpr], _mYield)) + DebugPoints(Expr.App (Expr.Val (vf, _, _), _, [genEnumElemTy], [yieldExpr], _mYield), recreate)) when vs.Length = 1 && valRefEq cenv.g vf cenv.g.seq_singleton_vref -> // The debug point mFor is attached to the 'map' // The debug point mIn is attached to the lambda // Note: the 'yield' part of the debug point for 'yield expr' is currently lost in debug points. - let lam = mkLambda mIn v (yieldExpr, genEnumElemTy) + let lam = mkLambda mIn v (recreate yieldExpr, genEnumElemTy) let enumExpr = mkCoerceIfNeeded cenv.g (mkSeqTy cenv.g enumElemTy) (tyOfExpr cenv.g enumExpr) enumExpr Some(mkCallSeqMap cenv.g mFor enumElemTy genEnumElemTy lam enumExpr, tpenv) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/IfThenElse01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/IfThenElse01.il.bsl index efd58156ef6..da3619e275e 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/IfThenElse01.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/Misc/IfThenElse01.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly IfThenElse01 { @@ -36,13 +36,13 @@ // Offset: 0x00000208 Length: 0x00000092 } .module IfThenElse01.dll -// MVID: {61FD8A9D-2D6C-0B5D-A745-03839D8AFD61} +// MVID: {611C4D7C-2D6C-0B5D-A745-03837C4D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07450000 +// Image base: 0x06B70000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.il.bsl index ef47993705d..4b4e0c5bf76 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest1.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly SeqExpressionSteppingTest1 { @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000AD } .module SeqExpressionSteppingTest1.exe -// MVID: {61FD4A6D-2432-947D-A745-03836D4AFD61} +// MVID: {611B0EC5-2432-947D-A745-0383C50E1B61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x06E10000 +// Image base: 0x06CF0000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.il.bsl index 5d77287fffe..91422d1148b 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest2.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly SeqExpressionSteppingTest2 { @@ -36,13 +36,13 @@ // Offset: 0x00000268 Length: 0x000000AD } .module SeqExpressionSteppingTest2.exe -// MVID: {61FD4A6D-2432-951E-A745-03836D4AFD61} +// MVID: {611B0EC5-2432-951E-A745-0383C50E1B61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x05C70000 +// Image base: 0x06940000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.il.bsl index 77563555595..5dfb9d70895 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SeqExpressionStepping/SeqExpressionSteppingTest3.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly SeqExpressionSteppingTest3 { @@ -36,13 +36,13 @@ // Offset: 0x00000278 Length: 0x000000AD } .module SeqExpressionSteppingTest3.exe -// MVID: {61FD4A6D-2432-943F-A745-03836D4AFD61} +// MVID: {611B0EC5-2432-943F-A745-0383C50E1B61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x059D0000 +// Image base: 0x06440000 // =============== CLASS MEMBERS DECLARATION =================== diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl index af3f921760a..0a66e664385 100644 --- a/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl +++ b/tests/fsharpqa/Source/CodeGen/EmittedIL/SteppingMatch/SteppingMatch09.il.bsl @@ -13,7 +13,7 @@ .assembly extern FSharp.Core { .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 6:0:0:0 + .ver 5:0:0:0 } .assembly SteppingMatch09 { @@ -36,13 +36,13 @@ // Offset: 0x00000310 Length: 0x000000EB } .module SteppingMatch09.dll -// MVID: {61FD8A9E-4935-D6AC-A745-03839E8AFD61} +// MVID: {611C4D99-4935-D6AC-A745-0383994D1C61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07500000 +// Image base: 0x07080000 // =============== CLASS MEMBERS DECLARATION =================== From a3e5b7749bb13425a13e5563213f2d4d96acb1c2 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 Feb 2022 23:41:00 +0000 Subject: [PATCH 25/35] update baselines --- .../CodeGen/EmittedIL/GeneratedIterators/GenIter01.il.bsl | 6 +++--- .../CodeGen/EmittedIL/GeneratedIterators/GenIter03.il.bsl | 6 +++--- .../CodeGen/EmittedIL/GeneratedIterators/GenIter04.il.bsl | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter01.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter01.il.bsl index 9d241560824..7ccf884cffb 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: {61FD4A6D-F836-DC98-A745-03836D4AFD61} +// MVID: {61FDB6C7-F836-DC98-A745-0383C7B6FD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x067C0000 +// Image base: 0x06B60000 // =============== CLASS MEMBERS DECLARATION =================== @@ -83,8 +83,8 @@ IL_0017: ldloc.1 IL_0018: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() IL_001d: stloc.3 - .line 6,6 : 12,23 '' IL_001e: ldloca.s V_0 + .line 6,6 : 12,23 '' IL_0020: ldloc.3 IL_0021: ldloc.3 IL_0022: mul diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter03.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter03.il.bsl index c904ae04745..c163ec5e0a1 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: {61FD4A6D-F77C-DC98-A745-03836D4AFD61} +// MVID: {61FDB6C7-F77C-DC98-A745-0383C7B6FD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x07420000 +// Image base: 0x07300000 // =============== CLASS MEMBERS DECLARATION =================== @@ -83,8 +83,8 @@ IL_0018: ldloc.1 IL_0019: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() IL_001e: stloc.3 - .line 4,4 : 47,55 '' IL_001f: ldloca.s V_0 + .line 4,4 : 47,55 '' IL_0021: ldloc.3 IL_0022: ldloc.3 IL_0023: mul diff --git a/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter04.il.bsl b/tests/fsharpqa/Source/CodeGen/EmittedIL/GeneratedIterators/GenIter04.il.bsl index f72ad318e24..ccd521dc79e 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: {61FD4A6D-F79D-DC98-A745-03836D4AFD61} +// MVID: {61FDB6C7-F79D-DC98-A745-0383C7B6FD61} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY -// Image base: 0x070D0000 +// Image base: 0x07060000 // =============== CLASS MEMBERS DECLARATION =================== @@ -110,8 +110,8 @@ IL_0018: ldloc.2 IL_0019: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() IL_001e: stloc.s x - .line 4,4 : 45,53 '' IL_0020: ldloca.s V_1 + .line 4,4 : 45,53 '' IL_0022: ldloc.s x IL_0024: ldloc.s x IL_0026: mul From ea4cbf50a4e03659cdb1af2402ac3adc094f071c Mon Sep 17 00:00:00 2001 From: Don Syme Date: Fri, 4 Feb 2022 23:59:34 +0000 Subject: [PATCH 26/35] walkthrough tweaks --- .../TheBigFileOfDebugStepping.fsx | 72 +++++++++---------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/tests/walkthroughs/DebugStepping/TheBigFileOfDebugStepping.fsx b/tests/walkthroughs/DebugStepping/TheBigFileOfDebugStepping.fsx index a170890350f..59e13687105 100644 --- a/tests/walkthroughs/DebugStepping/TheBigFileOfDebugStepping.fsx +++ b/tests/walkthroughs/DebugStepping/TheBigFileOfDebugStepping.fsx @@ -1090,12 +1090,12 @@ module ForLoopRegularCode = printfn $"hello, x = {x}" printfn $"hello, x = {x}" - testSimpleForEachSeqLoopWithOneStatement [1..3] - testSimpleForEachSeqLoopWithTwoStatements [1..3] - testSimpleForEachArrayLoopWithOneStatement [|1..3|] - testSimpleForEachArrayLoopWithTwoStatements [|1..3|] - testSimpleForEachListLoopWithOneStatement [1..3] - testSimpleForEachListLoopWithTwoStatements [1..3] + testSimpleForEachSeqLoopWithOneStatement [1;2;3] + testSimpleForEachSeqLoopWithTwoStatements [1;2;3] + testSimpleForEachArrayLoopWithOneStatement [|1;2;3|] + testSimpleForEachArrayLoopWithTwoStatements [|1;2;3|] + testSimpleForEachListLoopWithOneStatement [1;2;3] + testSimpleForEachListLoopWithTwoStatements [1;2;3] testSimpleForEachStringLoopWithOneStatement "123" testSimpleForEachStringLoopWithTwoStatements "123" testSimpleForEachIntRangeLoopWithOneStatement (1, 3) @@ -1193,12 +1193,12 @@ module ForLoopInGeneratedList = printfn $"hello, x = {x}" yield x + 1 ] - testSimpleListEachSeqLoopWithOneStatement [1..3] - testSimpleListEachSeqLoopWithTwoStatements [1..3] - testSimpleListEachArrayLoopWithOneStatement [|1..3|] - testSimpleListEachArrayLoopWithTwoStatements [|1..3|] - testSimpleListEachListLoopWithOneStatement [1..3] - testSimpleListEachListLoopWithTwoStatements [1..3] + testSimpleListEachSeqLoopWithOneStatement [1;2;3] + testSimpleListEachSeqLoopWithTwoStatements [1;2;3] + testSimpleListEachArrayLoopWithOneStatement [|1;2;3|] + testSimpleListEachArrayLoopWithTwoStatements [|1;2;3|] + testSimpleListEachListLoopWithOneStatement [1;2;3] + testSimpleListEachListLoopWithTwoStatements [1;2;3] testSimpleListEachStringLoopWithOneStatement "123" testSimpleListEachStringLoopWithTwoStatements "123" testSimpleListEachIntRangeLoopWithOneStatement (1, 3) @@ -1347,12 +1347,12 @@ module ForLoopTaskCode = return 1 } - testSimpleTaskEachSeqLoopWithOneStatement [1..3] |> fun t -> t.Result - testSimpleTaskEachSeqLoopWithTwoStatements [1..3] |> fun t -> t.Result - testSimpleTaskEachArrayLoopWithOneStatement [|1..3|] |> fun t -> t.Result - testSimpleTaskEachArrayLoopWithTwoStatements [|1..3|] |> fun t -> t.Result - testSimpleTaskEachListLoopWithOneStatement [1..3] |> fun t -> t.Result - testSimpleTaskEachListLoopWithTwoStatements [1..3] |> fun t -> t.Result + testSimpleTaskEachSeqLoopWithOneStatement [1;2;3] |> fun t -> t.Result + testSimpleTaskEachSeqLoopWithTwoStatements [1;2;3] |> fun t -> t.Result + testSimpleTaskEachArrayLoopWithOneStatement [|1;2;3|] |> fun t -> t.Result + testSimpleTaskEachArrayLoopWithTwoStatements [|1;2;3|] |> fun t -> t.Result + testSimpleTaskEachListLoopWithOneStatement [1;2;3] |> fun t -> t.Result + testSimpleTaskEachListLoopWithTwoStatements [1;2;3] |> fun t -> t.Result testSimpleTaskEachStringLoopWithOneStatement "123" |> fun t -> t.Result testSimpleTaskEachStringLoopWithTwoStatements "123" |> fun t -> t.Result testSimpleTaskEachIntRangeLoopWithOneStatement (1, 3) |> fun t -> t.Result @@ -1505,12 +1505,12 @@ module ForLoopSeqCode = yield 1 } - testSimpleSeqEachSeqLoopWithOneStatement [1..3] |> Seq.toList - testSimpleSeqEachSeqLoopWithTwoStatements [1..3] |> Seq.toList - testSimpleSeqEachArrayLoopWithOneStatement [|1..3|] |> Seq.toList - testSimpleSeqEachArrayLoopWithTwoStatements [|1..3|] |> Seq.toList - testSimpleSeqEachListLoopWithOneStatement [1..3] |> Seq.toList - testSimpleSeqEachListLoopWithTwoStatements [1..3] |> Seq.toList + testSimpleSeqEachSeqLoopWithOneStatement [1;2;3] |> Seq.toList + testSimpleSeqEachSeqLoopWithTwoStatements [1;2;3] |> Seq.toList + testSimpleSeqEachArrayLoopWithOneStatement [|1;2;3|] |> Seq.toList + testSimpleSeqEachArrayLoopWithTwoStatements [|1;2;3|] |> Seq.toList + testSimpleSeqEachListLoopWithOneStatement [1;2;3] |> Seq.toList + testSimpleSeqEachListLoopWithTwoStatements [1;2;3] |> Seq.toList testSimpleSeqEachStringLoopWithOneStatement "123" |> Seq.toList testSimpleSeqEachStringLoopWithTwoStatements "123" |> Seq.toList testSimpleSeqEachIntRangeLoopWithOneStatement (1, 3) |> Seq.toList @@ -1663,12 +1663,12 @@ module ForLoopAsyncCode = return 1 } - testSimpleAsyncEachSeqLoopWithOneStatement [1..3] |> Async.RunSynchronously - testSimpleAsyncEachSeqLoopWithTwoStatements [1..3] |> Async.RunSynchronously - testSimpleAsyncEachArrayLoopWithOneStatement [|1..3|] |> Async.RunSynchronously - testSimpleAsyncEachArrayLoopWithTwoStatements [|1..3|] |> Async.RunSynchronously - testSimpleAsyncEachListLoopWithOneStatement [1..3] |> Async.RunSynchronously - testSimpleAsyncEachListLoopWithTwoStatements [1..3] |> Async.RunSynchronously + testSimpleAsyncEachSeqLoopWithOneStatement [1;2;3] |> Async.RunSynchronously + testSimpleAsyncEachSeqLoopWithTwoStatements [1;2;3] |> Async.RunSynchronously + testSimpleAsyncEachArrayLoopWithOneStatement [|1;2;3|] |> Async.RunSynchronously + testSimpleAsyncEachArrayLoopWithTwoStatements [|1;2;3|] |> Async.RunSynchronously + testSimpleAsyncEachListLoopWithOneStatement [1;2;3] |> Async.RunSynchronously + testSimpleAsyncEachListLoopWithTwoStatements [1;2;3] |> Async.RunSynchronously testSimpleAsyncEachStringLoopWithOneStatement "123" |> Async.RunSynchronously testSimpleAsyncEachStringLoopWithTwoStatements "123" |> Async.RunSynchronously testSimpleAsyncEachIntRangeLoopWithOneStatement (1, 3) |> Async.RunSynchronously @@ -2051,12 +2051,12 @@ module ForLoopCancellableCode = return 1 } - testSimpleCancellableEachSeqLoopWithOneStatement [1..3] |> Cancellable.runWithoutCancellation - testSimpleCancellableEachSeqLoopWithTwoStatements [1..3] |> Cancellable.runWithoutCancellation - testSimpleCancellableEachArrayLoopWithOneStatement [|1..3|] |> Cancellable.runWithoutCancellation - testSimpleCancellableEachArrayLoopWithTwoStatements [|1..3|] |> Cancellable.runWithoutCancellation - testSimpleCancellableEachListLoopWithOneStatement [1..3] |> Cancellable.runWithoutCancellation - testSimpleCancellableEachListLoopWithTwoStatements [1..3] |> Cancellable.runWithoutCancellation + testSimpleCancellableEachSeqLoopWithOneStatement [1;2;3] |> Cancellable.runWithoutCancellation + testSimpleCancellableEachSeqLoopWithTwoStatements [1;2;3] |> Cancellable.runWithoutCancellation + testSimpleCancellableEachArrayLoopWithOneStatement [|1;2;3|] |> Cancellable.runWithoutCancellation + testSimpleCancellableEachArrayLoopWithTwoStatements [|1;2;3|] |> Cancellable.runWithoutCancellation + testSimpleCancellableEachListLoopWithOneStatement [1;2;3] |> Cancellable.runWithoutCancellation + testSimpleCancellableEachListLoopWithTwoStatements [1;2;3] |> Cancellable.runWithoutCancellation testSimpleCancellableEachStringLoopWithOneStatement "123" |> Cancellable.runWithoutCancellation testSimpleCancellableEachStringLoopWithTwoStatements "123" |> Cancellable.runWithoutCancellation testSimpleCancellableEachIntRangeLoopWithOneStatement (1, 3) |> Cancellable.runWithoutCancellation From 8d755b09abb241b79a3fcc5971821a9a9fac167f Mon Sep 17 00:00:00 2001 From: Don Syme Date: Sun, 6 Feb 2022 00:06:23 +0000 Subject: [PATCH 27/35] fix baseline --- .../EmittedIL/ComputedListExpressions.fs | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs index 52fbd3ee618..e6a2d763c97 100644 --- a/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs +++ b/tests/fsharp/Compiler/CodeGen/EmittedIL/ComputedListExpressions.fs @@ -21,15 +21,16 @@ let ListExpressionSteppingTest1 () = [ yield 1 ] ListExpressionSteppingTest1() cil managed { - .maxstack 4 - .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0) - IL_0000: ldloca.s V_0 - IL_0002: ldc.i4.1 - IL_0003: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) - IL_0008: nop - IL_0009: ldloca.s V_0 - IL_000b: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() - IL_0010: ret + .maxstack 4 + .locals init (valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1 V_0) + IL_0000: nop + IL_0001: ldloca.s V_0 + IL_0003: ldc.i4.1 + IL_0004: call instance void valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Add(!0) + IL_0009: nop + IL_000a: ldloca.s V_0 + IL_000c: call instance class [FSharp.Core]Microsoft.FSharp.Collections.FSharpList`1 valuetype [FSharp.Core]Microsoft.FSharp.Core.CompilerServices.ListCollector`1::Close() + IL_0011: ret } """ ]) From b5ef766cef11b5f95471b9add54ca79caba23d85 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Mon, 7 Feb 2022 13:06:31 +0000 Subject: [PATCH 28/35] fix build --- src/fsharp/pars.fsy | 57 ++++++++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 27 deletions(-) diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy index 81589ebb95c..0201e878c53 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -854,10 +854,10 @@ moduleSpfn: valSpfn: | opt_attributes opt_declVisibility VAL opt_attributes opt_inline opt_mutable opt_access nameop opt_explicitValTyparDecls COLON topTypeWithTypeConstraints optLiteralValueSpfn { if Option.isSome $2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(), rhs parseState 2)) - let attr1, attr2, isInline, isMutable, vis2, id, doc, explicitValTyparDecls, (ty, arity), konst = ($1), ($4), ($5), ($6), ($7), ($8), grabXmlDoc(parseState, $1, 1), ($9), ($11), ($12) + let attr1, attr2, isInline, isMutable, vis2, id, xmlDoc, explicitValTyparDecls, (ty, arity), konst = ($1), ($4), ($5), ($6), ($7), ($8), grabXmlDoc(parseState, $1, 1), ($9), ($11), ($12) if not (isNil attr2) then errorR(Deprecated(FSComp.SR.parsAttributesMustComeBeforeVal(), rhs parseState 4)) - let m = rhs2 parseState 1 11 |> unionRangeWithXmlDoc doc - let valSpfn = SynValSig((attr1@attr2), id, explicitValTyparDecls, ty, arity, isInline, isMutable, doc, vis2, konst, None, m) + let m = rhs2 parseState 1 11 |> unionRangeWithXmlDoc xmlDoc + let valSpfn = SynValSig((attr1@attr2), id, explicitValTyparDecls, ty, arity, isInline, isMutable, xmlDoc, vis2, konst, None, m) SynModuleSigDecl.Val(valSpfn, m) } @@ -1052,7 +1052,7 @@ classSpfnMembersAtLeastOne: classMemberSpfn: | opt_attributes opt_declVisibility memberSpecFlags opt_inline opt_access nameop opt_explicitValTyparDecls COLON topTypeWithTypeConstraints classMemberSpfnGetSet optLiteralValueSpfn { if Option.isSome $2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(), rhs parseState 2)) - let isInline, doc, vis2, id, explicitValTyparDecls, (ty, arity), optLiteralValue = $4, grabXmlDoc(parseState, $1, 1), $5, $6, $7, $9, $11 + let isInline, xmlDoc, vis2, id, explicitValTyparDecls, (ty, arity), optLiteralValue = $4, grabXmlDoc(parseState, $1, 1), $5, $6, $7, $9, $11 let mWith, getSetRangeOpt, getSet = $10 let getSetAdjuster arity = match arity, getSet with SynValInfo([], _), SynMemberKind.Member -> SynMemberKind.PropertyGet | _ -> getSet let wholeRange = @@ -1061,8 +1061,8 @@ classMemberSpfn: | None -> unionRanges m ty.Range | Some m2 -> unionRanges m m2 |> fun m -> (m, $1) ||> unionRangeWithListBy (fun (a: SynAttributeList) -> a.Range) - |> unionRangeWithXmlDoc doc - let valSpfn = SynValSig($1, id, explicitValTyparDecls, ty, arity, isInline, false, doc, vis2, optLiteralValue, mWith, wholeRange) + |> unionRangeWithXmlDoc xmlDoc + let valSpfn = SynValSig($1, id, explicitValTyparDecls, ty, arity, isInline, false, xmlDoc, vis2, optLiteralValue, mWith, wholeRange) let _, flags = $3 SynMemberSig.Member(valSpfn, flags (getSetAdjuster arity), wholeRange) } @@ -1093,10 +1093,10 @@ classMemberSpfn: SynMemberSig.NestedType($5, rhs2 parseState 1 5) } | opt_attributes opt_declVisibility NEW COLON topTypeWithTypeConstraints - { let vis, doc, (ty, valSynInfo) = $2, grabXmlDoc(parseState, $1, 1), $5 + { let vis, xmlDoc, (ty, valSynInfo) = $2, grabXmlDoc(parseState, $1, 1), $5 let m = unionRanges (rhs parseState 1) ty.Range let isInline = false - let valSpfn = SynValSig ($1, mkSynId (rhs parseState 3) "new", noInferredTypars, ty, valSynInfo, isInline, false, doc, vis, None, None, m) + let valSpfn = SynValSig ($1, mkSynId (rhs parseState 3) "new", noInferredTypars, ty, valSynInfo, isInline, false, xmlDoc, vis, None, None, m) SynMemberSig.Member(valSpfn, CtorMemberFlags SynMemberFlagsTrivia.Zero, m) } @@ -1651,9 +1651,10 @@ tyconDefn: | SynTypeDefnRepr.ObjectModel (k, cspec, m) -> SynTypeDefnRepr.ObjectModel (k, memberCtorPattern :: cspec, m) | _ -> reportParseErrorAt (rhs2 parseState 1 5) (FSComp.SR.parsOnlyClassCanTakeValueArguments()); tcDefRepr let declRange = unionRanges (rhs parseState 1) tcDefRepr.Range - let mWhole = (declRange, members) - ||> unionRangeWithListBy (fun (mem:SynMemberDefn) -> mem.Range) - |> unionRangeWithXmlDoc xmlDoc + let mWhole = + (declRange, members) + ||> unionRangeWithListBy (fun (mem:SynMemberDefn) -> mem.Range) + |> unionRangeWithXmlDoc xmlDoc let trivia = { TypeKeyword = None; EqualsRange = Some mEquals; WithKeyword = mWith } SynTypeDefn($1, tcDefRepr, members, Some memberCtorPattern, mWhole, trivia) } @@ -1869,8 +1870,8 @@ memberCore: let attrs = attrs @ optAttrs let trivia: SynBindingTrivia = { LetKeyword = None; EqualsRange = mEquals } - let binding = mkSynBinding (xmlDoc, bindingPat) (visNoLongerUsed, optInline, isMutable, mBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, None, expr, exprm, [], attrs, Some (memFlagsBuilder SynMemberKind.Member), trivia) - let (SynBinding (vis, _, isInline, _, attrs, doc, valSynData, pv, _, _, _, mBindLhs, spBind)) = binding + let binding = mkSynBinding (xmlDoc, bindingPat) (visNoLongerUsed, optInline, isMutable, mBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, expr, exprm, [], attrs, Some (memFlagsBuilder SynMemberKind.Member), trivia) + let (SynBinding (vis, _, isInline, _, attrs, xmlDoc, valSynData, headPat, _, _, mBindLhs, spBind, _)) = binding let memberKind = let getset = let rec go p = @@ -1880,7 +1881,7 @@ memberCore: | SynPat.Typed (p, _, _) -> go p | SynPat.Attrib (p, _, _) -> go p | _ -> raiseParseErrorAt mBindLhs (FSComp.SR.parsInvalidDeclarationSyntax()) - go pv + go headPat if getset = "get" then if hasGet then reportParseErrorAt mBindLhs (FSComp.SR.parsGetAndOrSetRequired()) @@ -1919,9 +1920,9 @@ memberCore: // REDO with the correct member kind let trivia: SynBindingTrivia = { LetKeyword = None; EqualsRange = mEquals } - let binding = mkSynBinding (PreXmlDoc.Empty, bindingPat) (vis, isInline, isMutable, mBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, mEquals, expr, exprm, [], attrs, Some(memFlagsBuilder memberKind), trivia) + let binding = mkSynBinding (PreXmlDoc.Empty, bindingPat) (vis, isInline, isMutable, mBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, expr, exprm, [], attrs, Some(memFlagsBuilder memberKind), trivia) - let (SynBinding (vis, _, isInline, _, attrs, doc, valSynData, pv, rhsRetInfo, rhsExpr, mBindLhs, spBind, trivia)) = binding + let (SynBinding (vis, _, isInline, _, attrs, xmlDoc, valSynData, headPat, rhsRetInfo, rhsExpr, mBindLhs, spBind, trivia)) = binding let mWholeBindLhs = (mBindLhs, attrs) ||> unionRangeWithListBy (fun (a: SynAttributeList) -> a.Range) let (SynValData(_, valSynInfo, _)) = valSynData @@ -1980,9 +1981,9 @@ memberCore: let bindingPatAdjusted, xmlDocAdjusted = let trivia: SynBindingTrivia = { LetKeyword = None; EqualsRange = mEquals } - let bindingOuter = mkSynBinding (xmlDoc, propertyNameBindingPat) (vis, optInline, isMutable, mWholeBindLhs, spBind, optReturnType, mEquals, expr, exprm, [], attrs, Some(memFlagsBuilder SynMemberKind.Member), trivia) + let bindingOuter = mkSynBinding (xmlDoc, propertyNameBindingPat) (vis, optInline, isMutable, mWholeBindLhs, spBind, optReturnType, expr, exprm, [], attrs, Some (memFlagsBuilder SynMemberKind.Member), trivia) - let (SynBinding (_, _, _, _, _, doc2, _, bindingPatOuter, _, _, _, _, _)) = bindingOuter + let (SynBinding (_, _, _, _, _, xmlDoc2, _, bindingPatOuter, _, _, _, _, _)) = bindingOuter let lidOuter, lidVisOuter = match bindingPatOuter with @@ -2028,7 +2029,7 @@ memberCore: | SynPat.Wild(m) -> SynPat.Wild(m) | _ -> raiseParseErrorAt mWholeBindLhs (FSComp.SR.parsInvalidDeclarationSyntax()) - go pv, PreXmlDoc.Merge doc2 doc + go headPat, PreXmlDoc.Merge xmlDoc2 xmlDoc let binding = SynBinding (vis, SynBindingKind.Normal, isInline, isMutable, attrs, xmlDocAdjusted, valSynData, bindingPatAdjusted, rhsRetInfo, rhsExpr, mWholeBindLhs, spBind, trivia) let memberRange = unionRanges rangeStart mWhole |> unionRangeWithXmlDoc xmlDocAdjusted @@ -2080,7 +2081,7 @@ classDefnMember: | opt_attributes opt_declVisibility abstractMemberFlags opt_inline nameop opt_explicitValTyparDecls COLON topTypeWithTypeConstraints classMemberSpfnGetSet opt_ODECLEND { let ty, arity = $8 - let isInline, doc, id, explicitValTyparDecls = $4, grabXmlDoc(parseState, $1, 1), $5, $6 + let isInline, xmlDoc, id, explicitValTyparDecls = $4, grabXmlDoc(parseState, $1, 1), $5, $6 let mWith, getSetRangeOpt, getSet = $9 let getSetAdjuster arity = match arity, getSet with SynValInfo([], _), SynMemberKind.Member -> SynMemberKind.PropertyGet | _ -> getSet let wholeRange = @@ -2088,9 +2089,9 @@ classDefnMember: match getSetRangeOpt with | None -> unionRanges m ty.Range | Some m2 -> unionRanges m m2 - |> unionRangeWithXmlDoc doc + |> unionRangeWithXmlDoc xmlDoc if Option.isSome $2 then errorR(Error(FSComp.SR.parsAccessibilityModsIllegalForAbstract(), wholeRange)) - let valSpfn = SynValSig($1, id, explicitValTyparDecls, ty, arity, isInline, false, doc, None, None, mWith, wholeRange) + let valSpfn = SynValSig($1, id, explicitValTyparDecls, ty, arity, isInline, false, xmlDoc, None, None, mWith, wholeRange) [ SynMemberDefn.AbstractSlot(valSpfn, AbstractMemberFlags $3 (getSetAdjuster arity), wholeRange) ] } | opt_attributes opt_declVisibility inheritsDefn @@ -2880,7 +2881,7 @@ cPrototype: let binding = mkSynBinding (xmlDoc, bindingPat) - (vis, false, false, mWholeBindLhs, DebugPointAtBinding.NoneAtInvisible, Some rty, None, rhsExpr, mRhs, [], attrs, None, SynBindingTrivia.Zero) + (vis, false, false, mWholeBindLhs, DebugPointAtBinding.NoneAtInvisible, Some rty, rhsExpr, mRhs, [], attrs, None, SynBindingTrivia.Zero) [], [binding]) } /* A list of arguments in an 'extern' DllImport function definition */ @@ -3000,7 +3001,7 @@ localBinding: let spBind = if IsDebugPointBinding bindingPat rhsExpr then DebugPointAtBinding.Yes mWhole else DebugPointAtBinding.NoneAtLet let mWholeBindLhs = (mBindLhs, attrs) ||> unionRangeWithListBy (fun (a: SynAttributeList) -> a.Range) let trivia: SynBindingTrivia = { LetKeyword = Some mLetKwd; EqualsRange = Some mEquals } - mkSynBinding (xmlDoc, bindingPat) (vis, $1, $2, mWholeBindLhs, spBind, optReturnType, Some mEquals, rhsExpr, mRhs, opts, attrs, None, trivia)) + mkSynBinding (xmlDoc, bindingPat) (vis, $1, $2, mWholeBindLhs, spBind, optReturnType, rhsExpr, mRhs, opts, attrs, None, trivia)) localBindingRange, localBindingBuilder } | opt_inline opt_mutable bindingPattern opt_topReturnTypeWithTypeConstraints EQUALS error @@ -3014,7 +3015,8 @@ localBinding: let localBindingBuilder = (fun xmlDoc attrs vis mLetKwd -> let spBind = if IsDebugPointBinding bindingPat rhsExpr then DebugPointAtBinding.Yes mWhole else DebugPointAtBinding.NoneAtLet - mkSynBinding (xmlDoc, bindingPat) (vis, $1, $2, mBindLhs, spBind, optReturnType, Some mEquals, rhsExpr, mRhs, [], attrs, None, trivia)) + let trivia = { LetKeyword = Some mLetKwd; EqualsRange = None } + mkSynBinding (xmlDoc, bindingPat) (vis, $1, $2, mBindLhs, spBind, optReturnType, rhsExpr, mRhs, [], attrs, None, trivia)) mWhole, localBindingBuilder } | opt_inline opt_mutable bindingPattern opt_topReturnTypeWithTypeConstraints recover @@ -3027,7 +3029,8 @@ localBinding: (fun xmlDoc attrs vis mLetKwd -> let spBind = DebugPointAtBinding.Yes (unionRanges mLetKwd mRhs) let trivia = { LetKeyword = Some mLetKwd; EqualsRange = None } - mkSynBinding (xmlDoc, bindingPat) (vis, $1, $2, mBindLhs, spBind, optReturnType, None, arbExpr("localBinding2", mRhs), mRhs, [], attrs, None, trivia)) + let rhsExpr = arbExpr("localBinding2", mRhs) + mkSynBinding (xmlDoc, bindingPat) (vis, $1, $2, mBindLhs, spBind, optReturnType, rhsExpr, mRhs, [], attrs, None, trivia)) mWhole, localBindingBuilder } /* A single expression with an optional type annotation, and an optional static optimization block */ @@ -5318,7 +5321,7 @@ atomTypeOrAnonRecdType: { let flds, isStruct = $1 let flds2 = flds |> List.choose (function - | (SynField([], false, Some id, ty, false, _xmldoc, None, _m)) -> Some (id, ty) + | (SynField([], false, Some id, ty, false, _, None, _m)) -> Some (id, ty) | _ -> reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsInvalidAnonRecdType()); None) SynType.AnonRecd (isStruct, flds2, rhs parseState 1) } From f3aa467fc7ebbebe4caff142a339d3c338ede2cb Mon Sep 17 00:00:00 2001 From: Don Syme Date: Mon, 7 Feb 2022 17:20:23 +0000 Subject: [PATCH 29/35] try fix test --- src/fsharp/pars.fsy | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy index 7e2eed4dc30..a3dc583e0d2 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -1854,7 +1854,7 @@ memberCore: (fun visNoLongerUsed memFlagsBuilder attrs rangeStart -> let mutable hasGet = false let mutable hasSet = false - let xmlDoc = grabXmlDocAtRangeStart(parseState, attrs, rangeStart) + let xmlDocAtMember = grabXmlDocAtRangeStart(parseState, attrs, rangeStart) let tryMkSynMemberDefnMember (withPropertyKeyword: PropertyKeyword option) @@ -1870,8 +1870,8 @@ memberCore: let attrs = attrs @ optAttrs let trivia: SynBindingTrivia = { LetKeyword = None; EqualsRange = mEquals } - let binding = mkSynBinding (xmlDoc, bindingPat) (visNoLongerUsed, optInline, isMutable, mBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, expr, exprm, [], attrs, Some (memFlagsBuilder SynMemberKind.Member), trivia) - let (SynBinding (vis, _, isInline, _, attrs, xmlDoc, valSynData, headPat, _, _, mBindLhs, spBind, _)) = binding + let binding = mkSynBinding (xmlDocAtMember, bindingPat) (visNoLongerUsed, optInline, isMutable, mBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, expr, exprm, [], attrs, Some (memFlagsBuilder SynMemberKind.Member), trivia) + let (SynBinding (vis, _, isInline, _, attrs, _, _, headPat, _, _, mBindLhs, _, _)) = binding let memberKind = let getset = let rec go p = @@ -1981,7 +1981,7 @@ memberCore: let bindingPatAdjusted, xmlDocAdjusted = let trivia: SynBindingTrivia = { LetKeyword = None; EqualsRange = mEquals } - let bindingOuter = mkSynBinding (xmlDoc, propertyNameBindingPat) (vis, optInline, isMutable, mWholeBindLhs, spBind, optReturnType, expr, exprm, [], attrs, Some (memFlagsBuilder SynMemberKind.Member), trivia) + let bindingOuter = mkSynBinding (xmlDocAtMember, propertyNameBindingPat) (vis, optInline, isMutable, mWholeBindLhs, spBind, optReturnType, expr, exprm, [], attrs, Some (memFlagsBuilder SynMemberKind.Member), trivia) let (SynBinding (_, _, _, _, _, xmlDoc2, _, bindingPatOuter, _, _, _, _, _)) = bindingOuter @@ -3015,7 +3015,7 @@ localBinding: let localBindingBuilder = (fun xmlDoc attrs vis mLetKwd -> let spBind = if IsDebugPointBinding bindingPat rhsExpr then DebugPointAtBinding.Yes mWhole else DebugPointAtBinding.NoneAtLet - let trivia = { LetKeyword = Some mLetKwd; EqualsRange = None } + let trivia = { LetKeyword = Some mLetKwd; EqualsRange = Some mEquals } mkSynBinding (xmlDoc, bindingPat) (vis, $1, $2, mBindLhs, spBind, optReturnType, rhsExpr, mRhs, [], attrs, None, trivia)) mWhole, localBindingBuilder } From f7c02be0bfa654788b57ffd4fa6db1d70fa1733e Mon Sep 17 00:00:00 2001 From: Don Syme Date: Mon, 7 Feb 2022 17:23:12 +0000 Subject: [PATCH 30/35] try fix test --- src/fsharp/pars.fsy | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy index a3dc583e0d2..8105892781b 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -1922,7 +1922,7 @@ memberCore: let trivia: SynBindingTrivia = { LetKeyword = None; EqualsRange = mEquals } let binding = mkSynBinding (PreXmlDoc.Empty, bindingPat) (vis, isInline, isMutable, mBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, expr, exprm, [], attrs, Some(memFlagsBuilder memberKind), trivia) - let (SynBinding (vis, _, isInline, _, attrs, xmlDoc, valSynData, headPat, rhsRetInfo, rhsExpr, mBindLhs, spBind, trivia)) = binding + let (SynBinding (vis, _, isInline, _, attrs, doc, valSynData, headPat, rhsRetInfo, rhsExpr, mBindLhs, spBind, trivia)) = binding let mWholeBindLhs = (mBindLhs, attrs) ||> unionRangeWithListBy (fun (a: SynAttributeList) -> a.Range) let (SynValData(_, valSynInfo, _)) = valSynData @@ -1983,7 +1983,7 @@ memberCore: let trivia: SynBindingTrivia = { LetKeyword = None; EqualsRange = mEquals } let bindingOuter = mkSynBinding (xmlDocAtMember, propertyNameBindingPat) (vis, optInline, isMutable, mWholeBindLhs, spBind, optReturnType, expr, exprm, [], attrs, Some (memFlagsBuilder SynMemberKind.Member), trivia) - let (SynBinding (_, _, _, _, _, xmlDoc2, _, bindingPatOuter, _, _, _, _, _)) = bindingOuter + let (SynBinding (_, _, _, _, _, doc2, _, bindingPatOuter, _, _, _, _, _)) = bindingOuter let lidOuter, lidVisOuter = match bindingPatOuter with @@ -2029,7 +2029,7 @@ memberCore: | SynPat.Wild(m) -> SynPat.Wild(m) | _ -> raiseParseErrorAt mWholeBindLhs (FSComp.SR.parsInvalidDeclarationSyntax()) - go headPat, PreXmlDoc.Merge xmlDoc2 xmlDoc + go headPat, PreXmlDoc.Merge doc2 doc let binding = SynBinding (vis, SynBindingKind.Normal, isInline, isMutable, attrs, xmlDocAdjusted, valSynData, bindingPatAdjusted, rhsRetInfo, rhsExpr, mWholeBindLhs, spBind, trivia) let memberRange = unionRanges rangeStart mWhole |> unionRangeWithXmlDoc xmlDocAdjusted From 03579cca3b239df1fc930c1359ebd5829e997e01 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Mon, 7 Feb 2022 17:24:16 +0000 Subject: [PATCH 31/35] try fix test --- src/fsharp/pars.fsy | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy index 8105892781b..b17a7788aaf 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -1871,7 +1871,7 @@ memberCore: let trivia: SynBindingTrivia = { LetKeyword = None; EqualsRange = mEquals } let binding = mkSynBinding (xmlDocAtMember, bindingPat) (visNoLongerUsed, optInline, isMutable, mBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, expr, exprm, [], attrs, Some (memFlagsBuilder SynMemberKind.Member), trivia) - let (SynBinding (vis, _, isInline, _, attrs, _, _, headPat, _, _, mBindLhs, _, _)) = binding + let (SynBinding (vis, _, isInline, _, attrs, _, _, pv, _, _, mBindLhs, _, _)) = binding let memberKind = let getset = let rec go p = @@ -1881,7 +1881,7 @@ memberCore: | SynPat.Typed (p, _, _) -> go p | SynPat.Attrib (p, _, _) -> go p | _ -> raiseParseErrorAt mBindLhs (FSComp.SR.parsInvalidDeclarationSyntax()) - go headPat + go pv if getset = "get" then if hasGet then reportParseErrorAt mBindLhs (FSComp.SR.parsGetAndOrSetRequired()) @@ -1922,7 +1922,7 @@ memberCore: let trivia: SynBindingTrivia = { LetKeyword = None; EqualsRange = mEquals } let binding = mkSynBinding (PreXmlDoc.Empty, bindingPat) (vis, isInline, isMutable, mBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, expr, exprm, [], attrs, Some(memFlagsBuilder memberKind), trivia) - let (SynBinding (vis, _, isInline, _, attrs, doc, valSynData, headPat, rhsRetInfo, rhsExpr, mBindLhs, spBind, trivia)) = binding + let (SynBinding (vis, _, isInline, _, attrs, doc, valSynData, pv, rhsRetInfo, rhsExpr, mBindLhs, spBind, trivia)) = binding let mWholeBindLhs = (mBindLhs, attrs) ||> unionRangeWithListBy (fun (a: SynAttributeList) -> a.Range) let (SynValData(_, valSynInfo, _)) = valSynData @@ -2029,7 +2029,7 @@ memberCore: | SynPat.Wild(m) -> SynPat.Wild(m) | _ -> raiseParseErrorAt mWholeBindLhs (FSComp.SR.parsInvalidDeclarationSyntax()) - go headPat, PreXmlDoc.Merge doc2 doc + go pv, PreXmlDoc.Merge doc2 doc let binding = SynBinding (vis, SynBindingKind.Normal, isInline, isMutable, attrs, xmlDocAdjusted, valSynData, bindingPatAdjusted, rhsRetInfo, rhsExpr, mWholeBindLhs, spBind, trivia) let memberRange = unionRanges rangeStart mWhole |> unionRangeWithXmlDoc xmlDocAdjusted From af2e9ed42568c64b410958bd98efdd0df82f8a17 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Mon, 7 Feb 2022 17:28:56 +0000 Subject: [PATCH 32/35] minimise diff --- src/fsharp/pars.fsy | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy index b17a7788aaf..9de010078e6 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -1052,7 +1052,7 @@ classSpfnMembersAtLeastOne: classMemberSpfn: | opt_attributes opt_declVisibility memberSpecFlags opt_inline opt_access nameop opt_explicitValTyparDecls COLON topTypeWithTypeConstraints classMemberSpfnGetSet optLiteralValueSpfn { if Option.isSome $2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(), rhs parseState 2)) - let isInline, xmlDoc, vis2, id, explicitValTyparDecls, (ty, arity), optLiteralValue = $4, grabXmlDoc(parseState, $1, 1), $5, $6, $7, $9, $11 + let isInline, doc, vis2, id, explicitValTyparDecls, (ty, arity), optLiteralValue = $4, grabXmlDoc(parseState, $1, 1), $5, $6, $7, $9, $11 let mWith, getSetRangeOpt, getSet = $10 let getSetAdjuster arity = match arity, getSet with SynValInfo([], _), SynMemberKind.Member -> SynMemberKind.PropertyGet | _ -> getSet let wholeRange = @@ -1061,8 +1061,8 @@ classMemberSpfn: | None -> unionRanges m ty.Range | Some m2 -> unionRanges m m2 |> fun m -> (m, $1) ||> unionRangeWithListBy (fun (a: SynAttributeList) -> a.Range) - |> unionRangeWithXmlDoc xmlDoc - let valSpfn = SynValSig($1, id, explicitValTyparDecls, ty, arity, isInline, false, xmlDoc, vis2, optLiteralValue, mWith, wholeRange) + |> unionRangeWithXmlDoc doc + let valSpfn = SynValSig($1, id, explicitValTyparDecls, ty, arity, isInline, false, doc, vis2, optLiteralValue, mWith, wholeRange) let _, flags = $3 SynMemberSig.Member(valSpfn, flags (getSetAdjuster arity), wholeRange) } @@ -1093,10 +1093,10 @@ classMemberSpfn: SynMemberSig.NestedType($5, rhs2 parseState 1 5) } | opt_attributes opt_declVisibility NEW COLON topTypeWithTypeConstraints - { let vis, xmlDoc, (ty, valSynInfo) = $2, grabXmlDoc(parseState, $1, 1), $5 + { let vis, doc, (ty, valSynInfo) = $2, grabXmlDoc(parseState, $1, 1), $5 let m = unionRanges (rhs parseState 1) ty.Range let isInline = false - let valSpfn = SynValSig ($1, mkSynId (rhs parseState 3) "new", noInferredTypars, ty, valSynInfo, isInline, false, xmlDoc, vis, None, None, m) + let valSpfn = SynValSig ($1, mkSynId (rhs parseState 3) "new", noInferredTypars, ty, valSynInfo, isInline, false, doc, vis, None, None, m) SynMemberSig.Member(valSpfn, CtorMemberFlags SynMemberFlagsTrivia.Zero, m) } @@ -1854,7 +1854,7 @@ memberCore: (fun visNoLongerUsed memFlagsBuilder attrs rangeStart -> let mutable hasGet = false let mutable hasSet = false - let xmlDocAtMember = grabXmlDocAtRangeStart(parseState, attrs, rangeStart) + let xmlDoc = grabXmlDocAtRangeStart(parseState, attrs, rangeStart) let tryMkSynMemberDefnMember (withPropertyKeyword: PropertyKeyword option) @@ -1870,7 +1870,7 @@ memberCore: let attrs = attrs @ optAttrs let trivia: SynBindingTrivia = { LetKeyword = None; EqualsRange = mEquals } - let binding = mkSynBinding (xmlDocAtMember, bindingPat) (visNoLongerUsed, optInline, isMutable, mBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, expr, exprm, [], attrs, Some (memFlagsBuilder SynMemberKind.Member), trivia) + let binding = mkSynBinding (xmlDoc, bindingPat) (visNoLongerUsed, optInline, isMutable, mBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, expr, exprm, [], attrs, Some (memFlagsBuilder SynMemberKind.Member), trivia) let (SynBinding (vis, _, isInline, _, attrs, _, _, pv, _, _, mBindLhs, _, _)) = binding let memberKind = let getset = @@ -1981,7 +1981,7 @@ memberCore: let bindingPatAdjusted, xmlDocAdjusted = let trivia: SynBindingTrivia = { LetKeyword = None; EqualsRange = mEquals } - let bindingOuter = mkSynBinding (xmlDocAtMember, propertyNameBindingPat) (vis, optInline, isMutable, mWholeBindLhs, spBind, optReturnType, expr, exprm, [], attrs, Some (memFlagsBuilder SynMemberKind.Member), trivia) + let bindingOuter = mkSynBinding (xmlDoc, propertyNameBindingPat) (vis, optInline, isMutable, mWholeBindLhs, spBind, optReturnType, expr, exprm, [], attrs, Some (memFlagsBuilder SynMemberKind.Member), trivia) let (SynBinding (_, _, _, _, _, doc2, _, bindingPatOuter, _, _, _, _, _)) = bindingOuter @@ -2081,7 +2081,7 @@ classDefnMember: | opt_attributes opt_declVisibility abstractMemberFlags opt_inline nameop opt_explicitValTyparDecls COLON topTypeWithTypeConstraints classMemberSpfnGetSet opt_ODECLEND { let ty, arity = $8 - let isInline, xmlDoc, id, explicitValTyparDecls = $4, grabXmlDoc(parseState, $1, 1), $5, $6 + let isInline, doc, id, explicitValTyparDecls = $4, grabXmlDoc(parseState, $1, 1), $5, $6 let mWith, getSetRangeOpt, getSet = $9 let getSetAdjuster arity = match arity, getSet with SynValInfo([], _), SynMemberKind.Member -> SynMemberKind.PropertyGet | _ -> getSet let wholeRange = @@ -2089,9 +2089,9 @@ classDefnMember: match getSetRangeOpt with | None -> unionRanges m ty.Range | Some m2 -> unionRanges m m2 - |> unionRangeWithXmlDoc xmlDoc + |> unionRangeWithXmlDoc doc if Option.isSome $2 then errorR(Error(FSComp.SR.parsAccessibilityModsIllegalForAbstract(), wholeRange)) - let valSpfn = SynValSig($1, id, explicitValTyparDecls, ty, arity, isInline, false, xmlDoc, None, None, mWith, wholeRange) + let valSpfn = SynValSig($1, id, explicitValTyparDecls, ty, arity, isInline, false, doc, None, None, mWith, wholeRange) [ SynMemberDefn.AbstractSlot(valSpfn, AbstractMemberFlags $3 (getSetAdjuster arity), wholeRange) ] } | opt_attributes opt_declVisibility inheritsDefn @@ -2989,33 +2989,33 @@ attr_localBinding: /* A single binding in an expression or definition */ localBinding: | opt_inline opt_mutable bindingPattern opt_topReturnTypeWithTypeConstraints EQUALS typedExprWithStaticOptimizationsBlock - { let (rhsExpr:SynExpr), opts = $6 + { let (expr:SynExpr), opts = $6 let mEquals = rhs parseState 5 - let mRhs = rhsExpr.Range + let mRhs = expr.Range let optReturnType = $4 let bindingPat, mBindLhs = $3 let localBindingRange = unionRanges (rhs2 parseState 1 5) mRhs let localBindingBuilder = (fun xmlDoc attrs vis mLetKwd -> let mWhole = (unionRanges mLetKwd mRhs, attrs) ||> unionRangeWithListBy (fun (a: SynAttributeList) -> a.Range) - let spBind = if IsDebugPointBinding bindingPat rhsExpr then DebugPointAtBinding.Yes mWhole else DebugPointAtBinding.NoneAtLet + let spBind = if IsDebugPointBinding bindingPat expr then DebugPointAtBinding.Yes mWhole else DebugPointAtBinding.NoneAtLet let mWholeBindLhs = (mBindLhs, attrs) ||> unionRangeWithListBy (fun (a: SynAttributeList) -> a.Range) let trivia: SynBindingTrivia = { LetKeyword = Some mLetKwd; EqualsRange = Some mEquals } - mkSynBinding (xmlDoc, bindingPat) (vis, $1, $2, mWholeBindLhs, spBind, optReturnType, rhsExpr, mRhs, opts, attrs, None, trivia)) + mkSynBinding (xmlDoc, bindingPat) (vis, $1, $2, mWholeBindLhs, spBind, optReturnType, expr, mRhs, opts, attrs, None, trivia)) localBindingRange, localBindingBuilder } | opt_inline opt_mutable bindingPattern opt_topReturnTypeWithTypeConstraints EQUALS error { let mWhole = rhs2 parseState 1 5 - let mEquals = rhs parseState 5 - let mRhs = mEquals + let mRhs = rhs parseState 5 let optReturnType = $4 - let zeroWidthAtEnd = mEquals.EndRange let bindingPat, mBindLhs = $3 - let rhsExpr = arbExpr("localBinding1", zeroWidthAtEnd) let localBindingBuilder = (fun xmlDoc attrs vis mLetKwd -> + let rhsExpr = arbExpr("localBinding1", zeroWidthAtEnd) let spBind = if IsDebugPointBinding bindingPat rhsExpr then DebugPointAtBinding.Yes mWhole else DebugPointAtBinding.NoneAtLet - let trivia = { LetKeyword = Some mLetKwd; EqualsRange = Some mEquals } + let mEquals = rhs parseState 5 + let zeroWidthAtEnd = mEquals.EndRange + let trivia: SynBindingTrivia = { LetKeyword = Some mLetKwd; EqualsRange = Some mEquals } mkSynBinding (xmlDoc, bindingPat) (vis, $1, $2, mBindLhs, spBind, optReturnType, rhsExpr, mRhs, [], attrs, None, trivia)) mWhole, localBindingBuilder } @@ -5322,7 +5322,7 @@ atomTypeOrAnonRecdType: { let flds, isStruct = $1 let flds2 = flds |> List.choose (function - | (SynField([], false, Some id, ty, false, _, None, _m)) -> Some (id, ty) + | (SynField([], false, Some id, ty, false, _xmldoc, None, _m)) -> Some (id, ty) | _ -> reportParseErrorAt (rhs parseState 1) (FSComp.SR.parsInvalidAnonRecdType()); None) SynType.AnonRecd (isStruct, flds2, rhs parseState 1) } From bcc276da93a8bb7f114f557d0d1bf98804d9215f Mon Sep 17 00:00:00 2001 From: Don Syme Date: Mon, 7 Feb 2022 17:29:52 +0000 Subject: [PATCH 33/35] minimise diff --- src/fsharp/pars.fsy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy index 9de010078e6..f53f63c866e 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -3011,11 +3011,11 @@ localBinding: let bindingPat, mBindLhs = $3 let localBindingBuilder = (fun xmlDoc attrs vis mLetKwd -> - let rhsExpr = arbExpr("localBinding1", zeroWidthAtEnd) let spBind = if IsDebugPointBinding bindingPat rhsExpr then DebugPointAtBinding.Yes mWhole else DebugPointAtBinding.NoneAtLet let mEquals = rhs parseState 5 let zeroWidthAtEnd = mEquals.EndRange let trivia: SynBindingTrivia = { LetKeyword = Some mLetKwd; EqualsRange = Some mEquals } + let rhsExpr = arbExpr("localBinding1", zeroWidthAtEnd) mkSynBinding (xmlDoc, bindingPat) (vis, $1, $2, mBindLhs, spBind, optReturnType, rhsExpr, mRhs, [], attrs, None, trivia)) mWhole, localBindingBuilder } From 49aa34edf5d873d3c0a0ee32512a3a709389a2c2 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Mon, 7 Feb 2022 17:35:06 +0000 Subject: [PATCH 34/35] minimise diff --- src/fsharp/pars.fsy | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/fsharp/pars.fsy b/src/fsharp/pars.fsy index f53f63c866e..15950b1695f 100644 --- a/src/fsharp/pars.fsy +++ b/src/fsharp/pars.fsy @@ -854,10 +854,10 @@ moduleSpfn: valSpfn: | opt_attributes opt_declVisibility VAL opt_attributes opt_inline opt_mutable opt_access nameop opt_explicitValTyparDecls COLON topTypeWithTypeConstraints optLiteralValueSpfn { if Option.isSome $2 then errorR(Error(FSComp.SR.parsVisibilityDeclarationsShouldComePriorToIdentifier(), rhs parseState 2)) - let attr1, attr2, isInline, isMutable, vis2, id, xmlDoc, explicitValTyparDecls, (ty, arity), konst = ($1), ($4), ($5), ($6), ($7), ($8), grabXmlDoc(parseState, $1, 1), ($9), ($11), ($12) + let attr1, attr2, isInline, isMutable, vis2, id, doc, explicitValTyparDecls, (ty, arity), konst = ($1), ($4), ($5), ($6), ($7), ($8), grabXmlDoc(parseState, $1, 1), ($9), ($11), ($12) if not (isNil attr2) then errorR(Deprecated(FSComp.SR.parsAttributesMustComeBeforeVal(), rhs parseState 4)) - let m = rhs2 parseState 1 11 |> unionRangeWithXmlDoc xmlDoc - let valSpfn = SynValSig((attr1@attr2), id, explicitValTyparDecls, ty, arity, isInline, isMutable, xmlDoc, vis2, konst, None, m) + let m = rhs2 parseState 1 11 |> unionRangeWithXmlDoc doc + let valSpfn = SynValSig((attr1@attr2), id, explicitValTyparDecls, ty, arity, isInline, isMutable, doc, vis2, konst, None, m) SynModuleSigDecl.Val(valSpfn, m) } @@ -1651,10 +1651,9 @@ tyconDefn: | SynTypeDefnRepr.ObjectModel (k, cspec, m) -> SynTypeDefnRepr.ObjectModel (k, memberCtorPattern :: cspec, m) | _ -> reportParseErrorAt (rhs2 parseState 1 5) (FSComp.SR.parsOnlyClassCanTakeValueArguments()); tcDefRepr let declRange = unionRanges (rhs parseState 1) tcDefRepr.Range - let mWhole = - (declRange, members) - ||> unionRangeWithListBy (fun (mem:SynMemberDefn) -> mem.Range) - |> unionRangeWithXmlDoc xmlDoc + let mWhole = (declRange, members) + ||> unionRangeWithListBy (fun (mem:SynMemberDefn) -> mem.Range) + |> unionRangeWithXmlDoc xmlDoc let trivia = { TypeKeyword = None; EqualsRange = Some mEquals; WithKeyword = mWith } SynTypeDefn($1, tcDefRepr, members, Some memberCtorPattern, mWhole, trivia) } @@ -1871,7 +1870,7 @@ memberCore: let trivia: SynBindingTrivia = { LetKeyword = None; EqualsRange = mEquals } let binding = mkSynBinding (xmlDoc, bindingPat) (visNoLongerUsed, optInline, isMutable, mBindLhs, DebugPointAtBinding.NoneAtInvisible, optReturnType, expr, exprm, [], attrs, Some (memFlagsBuilder SynMemberKind.Member), trivia) - let (SynBinding (vis, _, isInline, _, attrs, _, _, pv, _, _, mBindLhs, _, _)) = binding + let (SynBinding (vis, _, isInline, _, attrs, doc, valSynData, pv, _, _, mBindLhs, spBind, _)) = binding let memberKind = let getset = let rec go p = @@ -1981,7 +1980,7 @@ memberCore: let bindingPatAdjusted, xmlDocAdjusted = let trivia: SynBindingTrivia = { LetKeyword = None; EqualsRange = mEquals } - let bindingOuter = mkSynBinding (xmlDoc, propertyNameBindingPat) (vis, optInline, isMutable, mWholeBindLhs, spBind, optReturnType, expr, exprm, [], attrs, Some (memFlagsBuilder SynMemberKind.Member), trivia) + let bindingOuter = mkSynBinding (xmlDoc, propertyNameBindingPat) (vis, optInline, isMutable, mWholeBindLhs, spBind, optReturnType, expr, exprm, [], attrs, Some(memFlagsBuilder SynMemberKind.Member), trivia) let (SynBinding (_, _, _, _, _, doc2, _, bindingPatOuter, _, _, _, _, _)) = bindingOuter @@ -2878,10 +2877,9 @@ cPrototype: let bindingPat = SynPat.LongIdent (LongIdentWithDots([nm], []), None, None, Some noInferredTypars, SynArgPats.Pats [SynPat.Tuple(false, args, argsm)], vis, nmm) let mWholeBindLhs = (mBindLhs, attrs) ||> unionRangeWithListBy (fun (a: SynAttributeList) -> a.Range) let xmlDoc = grabXmlDoc(parseState, attrs, 1) - let binding = - mkSynBinding - (xmlDoc, bindingPat) - (vis, false, false, mWholeBindLhs, DebugPointAtBinding.NoneAtInvisible, Some rty, rhsExpr, mRhs, [], attrs, None, SynBindingTrivia.Zero) + let binding = mkSynBinding + (xmlDoc, bindingPat) + (vis, false, false, mWholeBindLhs, DebugPointAtBinding.NoneAtInvisible, Some rty, rhsExpr, mRhs, [], attrs, None, SynBindingTrivia.Zero) [], [binding]) } /* A list of arguments in an 'extern' DllImport function definition */ @@ -3011,11 +3009,11 @@ localBinding: let bindingPat, mBindLhs = $3 let localBindingBuilder = (fun xmlDoc attrs vis mLetKwd -> - let spBind = if IsDebugPointBinding bindingPat rhsExpr then DebugPointAtBinding.Yes mWhole else DebugPointAtBinding.NoneAtLet let mEquals = rhs parseState 5 let zeroWidthAtEnd = mEquals.EndRange - let trivia: SynBindingTrivia = { LetKeyword = Some mLetKwd; EqualsRange = Some mEquals } let rhsExpr = arbExpr("localBinding1", zeroWidthAtEnd) + let spBind = if IsDebugPointBinding bindingPat rhsExpr then DebugPointAtBinding.Yes mWhole else DebugPointAtBinding.NoneAtLet + let trivia: SynBindingTrivia = { LetKeyword = Some mLetKwd; EqualsRange = Some mEquals } mkSynBinding (xmlDoc, bindingPat) (vis, $1, $2, mBindLhs, spBind, optReturnType, rhsExpr, mRhs, [], attrs, None, trivia)) mWhole, localBindingBuilder } From 55905706f4c118699709a632636c3570341a72c8 Mon Sep 17 00:00:00 2001 From: Don Syme Date: Tue, 15 Feb 2022 13:24:44 +0000 Subject: [PATCH 35/35] update docs --- docs/debug-emit.md | 93 ++++++++++++++++------------------------------ 1 file changed, 31 insertions(+), 62 deletions(-) diff --git a/docs/debug-emit.md b/docs/debug-emit.md index e0e89f20e7d..2593cfafe00 100644 --- a/docs/debug-emit.md +++ b/docs/debug-emit.md @@ -248,9 +248,10 @@ These are then used by `ValidateBreakpointLocation`. These same values are also | DebugPointAtTry.No -> ... ... ``` + For many constructs this is adequate. However, in practice the situation is far more complicated. -### Internals: Debug points for `[...]`, `[| ... |]` +### Internals: Debug points for `[...]`, `[| ... |]` The internal implementation of debug points for list and array expressions is conceptually simple but a little complex. @@ -290,67 +291,22 @@ Debug points for `seq { .. }` compiling to state machines poses similar problems Debug points for `task { .. }` poses much harder problems. We use "while" loops as an example: -* The de-sugaring is for computation expressions, and in CheckComputationExpressions.fs "notes" the debug point ranges for the relevant constructs attaching them to the `task.While(...)` call ([example permalink](https://github.com/dotnet/fsharp/blob/db2c9da8d1e76d11217d6da53a64253fd0df0246/src/fsharp/CheckComputationExpressions.fs#L960)) -* The code is then checked and optimized, and all the resumable code is inlined, e.g. [`task.While`](https://github.com/dotnet/fsharp/blob/db2c9da8d1e76d11217d6da53a64253fd0df0246/src/fsharp/FSharp.Core/tasks.fs#L64) becomes [`Resumable.While`](https://github.com/dotnet/fsharp/blob/db2c9da8d1e76d11217d6da53a64253fd0df0246/src/fsharp/FSharp.Core/resumable.fs#L176-L191) which contains a resumable code while loop. -* When inlining the code for `task.While(...)` and all associated transitive inlining, the `remarkExpr` routine is invoked as usual to rewrite all ranges throughout all inlined code to be the range of the outer expression, that is, precisely the earlier noted range. Now [`remarkExpr` is "hacked" to note that the actual resumable "while" loop is being inlined at a noted range](https://github.com/dotnet/fsharp/blob/db2c9da8d1e76d11217d6da53a64253fd0df0246/src/fsharp/TypedTreeOps.fs#L5827-L5832), and places a debug point for that resumable while loop. -* The debug ranges are now attached to the resumable code which is then checked for resumable-code validity and emitted, e.g. see [this](https://github.com/dotnet/fsharp/blob/db2c9da8d1e76d11217d6da53a64253fd0df0246/src/fsharp/LowerStateMachines.fs#L298) - -This however only works fully for those constructs with a single debug point that can be recovered. In particular `TryWith` and `TryFinally` have separate problems - -* `task.TryWith(...)` becomes a resumable code try/with, see [here](https://github.com/dotnet/fsharp/blob/db2c9da8d1e76d11217d6da53a64253fd0df0246/src/fsharp/FSharp.Core/resumable.fs#L216-L230) -* `task.TryFinally(...)` becomes a resumable code try/with, see [here](https://github.com/dotnet/fsharp/blob/db2c9da8d1e76d11217d6da53a64253fd0df0246/src/fsharp/FSharp.Core/resumable.fs#L272-L305) -* Some debug points associated with these `try/with` are suppressed in [`remarkExpr`](https://github.com/dotnet/fsharp/blob/db2c9da8d1e76d11217d6da53a64253fd0df0246/src/fsharp/TypedTreeOps.fs#L5862-L5880) -* The debug points for the `with` and `finally` are not currently recovered. +* The de-sugaring is for computation expressions, and in CheckComputationExpressions.fs places a debug point for `while` directly before the evaluation of the guard +* The code is then checked and optimized, and all the resumable code is inlined, and this debug point is preserved throughout this process. ### Internals: debug points for other computation expressions As mentioned above, other computation expressions such as `async { .. }` have significant problems with their debug points. -> NOTE: A systematic solution for quality debugging of computation expressions and resumable code is still elusive. It really needs the de-sugaring to explicitly or implicitly pass down the debug points through the process of inlining code. For example consider the de-sugaring: - -```fsharp - builder { for x in xs do ... } --> builder.For(xs, fun x -> ...) -``` +The main problem is stepping: even after inlining the code for computation expressions is rarely "flattened" enough, so, for example, a "step-into" is required to get into the second part of an `expr1; expr2` construct (i.e. an `async.Combine(..., async.Delay(fun () -> ...)))`) where the user expects to press "step-over". -Here the debug points could be made explicit and passed as "compile-time parameters" (assuming inlining) +Breakpoints tend to be less problematic. -```fsharp - builder { for[dp] x in xs do ... } --> builder.For(dp, xs, fun x -> ...) -``` - -These could then be used in the implementation: - -```fsharp -type MuBuilder() = - // Some builder implementation of "For" - let's say it prints at each iteration of the loop - member inline _.For(dp, xs, f) = - for[dp] x in xs do - printfn "loop..." - f x -``` - -Adding such compile-time parameters would be over-kill, but it may be possible to augment the compiler to keep a well-specified environment through the process of inlining, e.g. - -```fsharp - builder { for[dp] x in xs do ... } --> builder.For["for-debug-point"-->dp](xs, fun x -> ...) -``` - -And then there is some way to access this and attach to various control constructs: - -```fsharp -type MuBuilder() = - // Some builder implementation of "For" - let's say it prints at each iteration of the loop - member inline _.For(dp, xs, f) = - for["for-debug-point"] x in xs do - printfn "loop..." - f x -``` - -If carefully used this would allow reasonable debugging across multiple-phase boundaries. +> NOTE: A systematic solution for quality debugging of computation expressions code is still elusive, and especially for `async { ... }`. Extensive use of inlining and `InlineIfLambda` can succeed in flattening most simple computation expression code. This is however not yet fully applied to `async` programming. > NOTE: The use of library code to implement "async" and similar computation expressions also interacts badly with "Just My Code" debugging, see https://github.com/dotnet/fsharp/issues/5539 for example. -> NOTE: The use of many functions to implement "async" and friends implements badly with "Step Into" and "Step Over" and related attributes, see for example https://github.com/dotnet/fsharp/issues/3359 +> NOTE: As mentioned, the use of many functions to implement "async" and friends implements badly with "Step Into" and "Step Over" and related attributes, see for example https://github.com/dotnet/fsharp/issues/3359 ### FeeFee and F00F00 debug points (Hidden and JustMyCodeWithNoSource) @@ -366,17 +322,21 @@ The F# compiler generates entire IL classes and methods for constructs such as r ### Generated "augment" methods for records, unions and structs -We currently always emit a debug sequence point for all generated code coming from AugmentWithHashCompare.fs (also anything coming out of optimization etc.) The `SPAlways` at https://github.com/dotnet/fsharp/blob/main/src/fsharp/IlxGen.fs#L4801 has the effect that a debug point based on the range of the method will always appear. +Generated methods for equality, hash and comparison on records, unions and structs do not get debug points at all. + +> NOTE: Methods without debug points (or with only 0xFEEFEE debug points) are shown as "no code available" in Visual Studio - or in Just My Code they are hidden altogether - and are removed from profiling traces (in profiling, their costs are added to the cost of the calling method). + +> TODO: we should also consider emitting `ExcludeFromCodeCoverageAttribute`, being assessed at time of writing, however the absence of debug points should be sufficient to exclude these. ### Generated "New*", "Is*", "Tag" etc. for unions -Discriminated unions generate `NewXYZ`, `IsXYZ`, `Tag` etc. members and the implementations of these lay down debug points. See [here](https://github.com/dotnet/fsharp/blob/db2c9da8d1e76d11217d6da53a64253fd0df0246/src/fsharp/ilx/EraseUnions.fs#L644) for the data that drives this and track back and forth to the production and consumption points of that data. +Discriminated unions generate `NewXYZ`, `IsXYZ`, `Tag` etc. members. These do not get debug points at all. -These all get `CompilerGeneratedAttribute`, and `DebuggerNonUserCodeAttribute`, e.g. [here (permalink)](https://github.com/dotnet/fsharp/blob/db2c9da8d1e76d11217d6da53a64253fd0df0246/src/fsharp/ilx/EraseUnions.fs#L635) +These methods also get `CompilerGeneratedAttribute`, and `DebuggerNonUserCodeAttribute`, e.g. [here (permalink)](https://github.com/dotnet/fsharp/blob/db2c9da8d1e76d11217d6da53a64253fd0df0246/src/fsharp/ilx/EraseUnions.fs#L635) -> TODO: generating debug points for these appears wrong, being assessed at time of writing +> TODO: we should also consider emitting `ExcludeFromCodeCoverageAttribute`, being assessed at time of writing, however the absence of debug points should be sufficient to exclude these. -> TODO: we should also consider emitting `ExcludeFromCodeCoverageAttribute`, being assessed at time of writing +> TODO: the `NewABC` methods are missing `CompilerGeneratedAttribute`, and `DebuggerNonUserCodeAttribute`. However the absence of debug points should be sufficient to exclude these from code coverage and profiling. ### Generated closures for lambdas @@ -392,7 +352,7 @@ The debug codegen involved in closures is as follows: | | `Specialize` method | from body of closure | | | Intermediate closure classes | For long curried closures `fun a b c d e f -> ...`. | See [here](https://github.com/dotnet/fsharp/blob/db2c9da8d1e76d11217d6da53a64253fd0df0246/src/fsharp/ilx/EraseClosures.fs#L459) and [here](https://github.com/dotnet/fsharp/blob/db2c9da8d1e76d11217d6da53a64253fd0df0246/src/fsharp/ilx/EraseClosures.fs#L543). | CompilerGenerated, DebuggerNonUserCode | -> TODO: generating debug points for the intermediate closures appears wrong, this is being assessed at time of writing +Generated intermediate closure methods do not get debug points, and are labelled CompilerGenerated and DebuggerNonUserCode. > TODO: we should also consider emitting `ExcludeFromCodeCoverageAttribute`, being assessed at time of writing @@ -414,7 +374,7 @@ The debug points recovered for the generated state machine code for `seq { ... } > NOTE: it appears from the code that extraneous debug points are not being generated, which is good, though should be checked -> TODO: we should likely be generating attributes for the `Close` and `get_CheckClose` and `.ctor` methods +> TODO: we should likely be generating `CompilerGeneratedAttribute` and `DebuggerNonUserCodeAttribute` attributes for the `Close` and `get_CheckClose` and `.ctor` methods > TODO: we should also consider emitting `ExcludeFromCodeCoverageAttribute`, being assessed at time of writing @@ -434,9 +394,18 @@ The debug points recovered for the generated state machine code for `seq { ... } > TODO: we should assess that only the "MoveNext" method gets any debug points at all -### Generated code for delegate constructions `Func(fun x y -> x + y)` +> TODO: Currently stepping into a task-returning method needs a second `step-into` to get into the MoveNext method of the state machine. We should emit the `StateMachineMethod` and `StateMachineHoistedLocalScopes` tables into the PDB to get better debugging into `task` methods. See https://github.com/dotnet/fsharp/issues/12000. + +### Generated code for delegate constructions `Func(fun x y -> x + y)` + +A closure class is generated. Consider the code + +```fsharp +open System +let d = Func(fun x y -> x + y) +``` -A closure class is generated. +There is one debug point over all of `Func(fun x y -> x + y)` and one over `x+y`. ### Generated code for constant-sized array and list expressions @@ -485,7 +454,7 @@ Here the implicitly captured local is `y`, but `x` is **not** captured, instead ### Provided code -Code provided by erasing type providers has all debugging points removed. It isn't possible to step into such code or if there are implicit debug points they will be the same range as the construct that was macro-expanded by the code erasure. +Code provided by erasing type providers has all debugging points removed. It isn't possible to step into such code or if there are implicit debug points they will be the same range as the construct that was macro-expanded by the code erasure. > For example, a [provided if/then/else expression has no debug point](https://github.com/dotnet/fsharp/blob/main/src/fsharp/MethodCalls.fs#L1805)